diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-11 17:53:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-11 17:53:53 -0400 |
commit | 871039f02f8ec4ab2e5e9010718caa8e085786f1 (patch) | |
tree | f0d2b3127fc48c862967d68c46c2d46668137515 | |
parent | e4077e018b5ead3de9951fc01d8bf12eeeeeefed (diff) | |
parent | 4a1032faac94ebbf647460ae3e06fc21146eb280 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/stmmac/stmmac_main.c
drivers/net/wireless/wl12xx/wl1271_cmd.c
drivers/net/wireless/wl12xx/wl1271_main.c
drivers/net/wireless/wl12xx/wl1271_spi.c
net/core/ethtool.c
net/mac80211/scan.c
4645 files changed, 13577 insertions, 6319 deletions
diff --git a/Documentation/PCI/PCI-DMA-mapping.txt b/Documentation/DMA-API-HOWTO.txt index 52618ab069ad..52618ab069ad 100644 --- a/Documentation/PCI/PCI-DMA-mapping.txt +++ b/Documentation/DMA-API-HOWTO.txt | |||
diff --git a/Documentation/DocBook/tracepoint.tmpl b/Documentation/DocBook/tracepoint.tmpl index 8bca1d5cec09..e8473eae2a20 100644 --- a/Documentation/DocBook/tracepoint.tmpl +++ b/Documentation/DocBook/tracepoint.tmpl | |||
@@ -16,6 +16,15 @@ | |||
16 | </address> | 16 | </address> |
17 | </affiliation> | 17 | </affiliation> |
18 | </author> | 18 | </author> |
19 | <author> | ||
20 | <firstname>William</firstname> | ||
21 | <surname>Cohen</surname> | ||
22 | <affiliation> | ||
23 | <address> | ||
24 | <email>wcohen@redhat.com</email> | ||
25 | </address> | ||
26 | </affiliation> | ||
27 | </author> | ||
19 | </authorgroup> | 28 | </authorgroup> |
20 | 29 | ||
21 | <legalnotice> | 30 | <legalnotice> |
@@ -91,4 +100,8 @@ | |||
91 | !Iinclude/trace/events/signal.h | 100 | !Iinclude/trace/events/signal.h |
92 | </chapter> | 101 | </chapter> |
93 | 102 | ||
103 | <chapter id="block"> | ||
104 | <title>Block IO</title> | ||
105 | !Iinclude/trace/events/block.h | ||
106 | </chapter> | ||
94 | </book> | 107 | </book> |
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt index 6fab97ea7e6b..508b5b2b0289 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt | |||
@@ -1162,8 +1162,8 @@ where a driver received a request ala this before: | |||
1162 | 1162 | ||
1163 | As mentioned, there is no virtual mapping of a bio. For DMA, this is | 1163 | As mentioned, there is no virtual mapping of a bio. For DMA, this is |
1164 | not a problem as the driver probably never will need a virtual mapping. | 1164 | not a problem as the driver probably never will need a virtual mapping. |
1165 | Instead it needs a bus mapping (pci_map_page for a single segment or | 1165 | Instead it needs a bus mapping (dma_map_page for a single segment or |
1166 | use blk_rq_map_sg for scatter gather) to be able to ship it to the driver. For | 1166 | use dma_map_sg for scatter gather) to be able to ship it to the driver. For |
1167 | PIO drivers (or drivers that need to revert to PIO transfer once in a | 1167 | PIO drivers (or drivers that need to revert to PIO transfer once in a |
1168 | while (IDE for example)), where the CPU is doing the actual data | 1168 | while (IDE for example)), where the CPU is doing the actual data |
1169 | transfer a virtual mapping is needed. If the driver supports highmem I/O, | 1169 | transfer a virtual mapping is needed. If the driver supports highmem I/O, |
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index f8bc802d70b9..3a6aecd078ba 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
@@ -340,7 +340,7 @@ Note: | |||
340 | 5.3 swappiness | 340 | 5.3 swappiness |
341 | Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. | 341 | Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. |
342 | 342 | ||
343 | Following cgroups' swapiness can't be changed. | 343 | Following cgroups' swappiness can't be changed. |
344 | - root cgroup (uses /proc/sys/vm/swappiness). | 344 | - root cgroup (uses /proc/sys/vm/swappiness). |
345 | - a cgroup which uses hierarchy and it has child cgroup. | 345 | - a cgroup which uses hierarchy and it has child cgroup. |
346 | - a cgroup which uses hierarchy and not the root of hierarchy. | 346 | - a cgroup which uses hierarchy and not the root of hierarchy. |
diff --git a/Documentation/circular-buffers.txt b/Documentation/circular-buffers.txt new file mode 100644 index 000000000000..8117e5bf6065 --- /dev/null +++ b/Documentation/circular-buffers.txt | |||
@@ -0,0 +1,234 @@ | |||
1 | ================ | ||
2 | CIRCULAR BUFFERS | ||
3 | ================ | ||
4 | |||
5 | By: David Howells <dhowells@redhat.com> | ||
6 | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
7 | |||
8 | |||
9 | Linux provides a number of features that can be used to implement circular | ||
10 | buffering. There are two sets of such features: | ||
11 | |||
12 | (1) Convenience functions for determining information about power-of-2 sized | ||
13 | buffers. | ||
14 | |||
15 | (2) Memory barriers for when the producer and the consumer of objects in the | ||
16 | buffer don't want to share a lock. | ||
17 | |||
18 | To use these facilities, as discussed below, there needs to be just one | ||
19 | producer and just one consumer. It is possible to handle multiple producers by | ||
20 | serialising them, and to handle multiple consumers by serialising them. | ||
21 | |||
22 | |||
23 | Contents: | ||
24 | |||
25 | (*) What is a circular buffer? | ||
26 | |||
27 | (*) Measuring power-of-2 buffers. | ||
28 | |||
29 | (*) Using memory barriers with circular buffers. | ||
30 | - The producer. | ||
31 | - The consumer. | ||
32 | |||
33 | |||
34 | ========================== | ||
35 | WHAT IS A CIRCULAR BUFFER? | ||
36 | ========================== | ||
37 | |||
38 | First of all, what is a circular buffer? A circular buffer is a buffer of | ||
39 | fixed, finite size into which there are two indices: | ||
40 | |||
41 | (1) A 'head' index - the point at which the producer inserts items into the | ||
42 | buffer. | ||
43 | |||
44 | (2) A 'tail' index - the point at which the consumer finds the next item in | ||
45 | the buffer. | ||
46 | |||
47 | Typically when the tail pointer is equal to the head pointer, the buffer is | ||
48 | empty; and the buffer is full when the head pointer is one less than the tail | ||
49 | pointer. | ||
50 | |||
51 | The head index is incremented when items are added, and the tail index when | ||
52 | items are removed. The tail index should never jump the head index, and both | ||
53 | indices should be wrapped to 0 when they reach the end of the buffer, thus | ||
54 | allowing an infinite amount of data to flow through the buffer. | ||
55 | |||
56 | Typically, items will all be of the same unit size, but this isn't strictly | ||
57 | required to use the techniques below. The indices can be increased by more | ||
58 | than 1 if multiple items or variable-sized items are to be included in the | ||
59 | buffer, provided that neither index overtakes the other. The implementer must | ||
60 | be careful, however, as a region more than one unit in size may wrap the end of | ||
61 | the buffer and be broken into two segments. | ||
62 | |||
63 | |||
64 | ============================ | ||
65 | MEASURING POWER-OF-2 BUFFERS | ||
66 | ============================ | ||
67 | |||
68 | Calculation of the occupancy or the remaining capacity of an arbitrarily sized | ||
69 | circular buffer would normally be a slow operation, requiring the use of a | ||
70 | modulus (divide) instruction. However, if the buffer is of a power-of-2 size, | ||
71 | then a much quicker bitwise-AND instruction can be used instead. | ||
72 | |||
73 | Linux provides a set of macros for handling power-of-2 circular buffers. These | ||
74 | can be made use of by: | ||
75 | |||
76 | #include <linux/circ_buf.h> | ||
77 | |||
78 | The macros are: | ||
79 | |||
80 | (*) Measure the remaining capacity of a buffer: | ||
81 | |||
82 | CIRC_SPACE(head_index, tail_index, buffer_size); | ||
83 | |||
84 | This returns the amount of space left in the buffer[1] into which items | ||
85 | can be inserted. | ||
86 | |||
87 | |||
88 | (*) Measure the maximum consecutive immediate space in a buffer: | ||
89 | |||
90 | CIRC_SPACE_TO_END(head_index, tail_index, buffer_size); | ||
91 | |||
92 | This returns the amount of consecutive space left in the buffer[1] into | ||
93 | which items can be immediately inserted without having to wrap back to the | ||
94 | beginning of the buffer. | ||
95 | |||
96 | |||
97 | (*) Measure the occupancy of a buffer: | ||
98 | |||
99 | CIRC_CNT(head_index, tail_index, buffer_size); | ||
100 | |||
101 | This returns the number of items currently occupying a buffer[2]. | ||
102 | |||
103 | |||
104 | (*) Measure the non-wrapping occupancy of a buffer: | ||
105 | |||
106 | CIRC_CNT_TO_END(head_index, tail_index, buffer_size); | ||
107 | |||
108 | This returns the number of consecutive items[2] that can be extracted from | ||
109 | the buffer without having to wrap back to the beginning of the buffer. | ||
110 | |||
111 | |||
112 | Each of these macros will nominally return a value between 0 and buffer_size-1, | ||
113 | however: | ||
114 | |||
115 | [1] CIRC_SPACE*() are intended to be used in the producer. To the producer | ||
116 | they will return a lower bound as the producer controls the head index, | ||
117 | but the consumer may still be depleting the buffer on another CPU and | ||
118 | moving the tail index. | ||
119 | |||
120 | To the consumer it will show an upper bound as the producer may be busy | ||
121 | depleting the space. | ||
122 | |||
123 | [2] CIRC_CNT*() are intended to be used in the consumer. To the consumer they | ||
124 | will return a lower bound as the consumer controls the tail index, but the | ||
125 | producer may still be filling the buffer on another CPU and moving the | ||
126 | head index. | ||
127 | |||
128 | To the producer it will show an upper bound as the consumer may be busy | ||
129 | emptying the buffer. | ||
130 | |||
131 | [3] To a third party, the order in which the writes to the indices by the | ||
132 | producer and consumer become visible cannot be guaranteed as they are | ||
133 | independent and may be made on different CPUs - so the result in such a | ||
134 | situation will merely be a guess, and may even be negative. | ||
135 | |||
136 | |||
137 | =========================================== | ||
138 | USING MEMORY BARRIERS WITH CIRCULAR BUFFERS | ||
139 | =========================================== | ||
140 | |||
141 | By using memory barriers in conjunction with circular buffers, you can avoid | ||
142 | the need to: | ||
143 | |||
144 | (1) use a single lock to govern access to both ends of the buffer, thus | ||
145 | allowing the buffer to be filled and emptied at the same time; and | ||
146 | |||
147 | (2) use atomic counter operations. | ||
148 | |||
149 | There are two sides to this: the producer that fills the buffer, and the | ||
150 | consumer that empties it. Only one thing should be filling a buffer at any one | ||
151 | time, and only one thing should be emptying a buffer at any one time, but the | ||
152 | two sides can operate simultaneously. | ||
153 | |||
154 | |||
155 | THE PRODUCER | ||
156 | ------------ | ||
157 | |||
158 | The producer will look something like this: | ||
159 | |||
160 | spin_lock(&producer_lock); | ||
161 | |||
162 | unsigned long head = buffer->head; | ||
163 | unsigned long tail = ACCESS_ONCE(buffer->tail); | ||
164 | |||
165 | if (CIRC_SPACE(head, tail, buffer->size) >= 1) { | ||
166 | /* insert one item into the buffer */ | ||
167 | struct item *item = buffer[head]; | ||
168 | |||
169 | produce_item(item); | ||
170 | |||
171 | smp_wmb(); /* commit the item before incrementing the head */ | ||
172 | |||
173 | buffer->head = (head + 1) & (buffer->size - 1); | ||
174 | |||
175 | /* wake_up() will make sure that the head is committed before | ||
176 | * waking anyone up */ | ||
177 | wake_up(consumer); | ||
178 | } | ||
179 | |||
180 | spin_unlock(&producer_lock); | ||
181 | |||
182 | This will instruct the CPU that the contents of the new item must be written | ||
183 | before the head index makes it available to the consumer and then instructs the | ||
184 | CPU that the revised head index must be written before the consumer is woken. | ||
185 | |||
186 | Note that wake_up() doesn't have to be the exact mechanism used, but whatever | ||
187 | is used must guarantee a (write) memory barrier between the update of the head | ||
188 | index and the change of state of the consumer, if a change of state occurs. | ||
189 | |||
190 | |||
191 | THE CONSUMER | ||
192 | ------------ | ||
193 | |||
194 | The consumer will look something like this: | ||
195 | |||
196 | spin_lock(&consumer_lock); | ||
197 | |||
198 | unsigned long head = ACCESS_ONCE(buffer->head); | ||
199 | unsigned long tail = buffer->tail; | ||
200 | |||
201 | if (CIRC_CNT(head, tail, buffer->size) >= 1) { | ||
202 | /* read index before reading contents at that index */ | ||
203 | smp_read_barrier_depends(); | ||
204 | |||
205 | /* extract one item from the buffer */ | ||
206 | struct item *item = buffer[tail]; | ||
207 | |||
208 | consume_item(item); | ||
209 | |||
210 | smp_mb(); /* finish reading descriptor before incrementing tail */ | ||
211 | |||
212 | buffer->tail = (tail + 1) & (buffer->size - 1); | ||
213 | } | ||
214 | |||
215 | spin_unlock(&consumer_lock); | ||
216 | |||
217 | This will instruct the CPU to make sure the index is up to date before reading | ||
218 | the new item, and then it shall make sure the CPU has finished reading the item | ||
219 | before it writes the new tail pointer, which will erase the item. | ||
220 | |||
221 | |||
222 | Note the use of ACCESS_ONCE() in both algorithms to read the opposition index. | ||
223 | This prevents the compiler from discarding and reloading its cached value - | ||
224 | which some compilers will do across smp_read_barrier_depends(). This isn't | ||
225 | strictly needed if you can be sure that the opposition index will _only_ be | ||
226 | used the once. | ||
227 | |||
228 | |||
229 | =============== | ||
230 | FURTHER READING | ||
231 | =============== | ||
232 | |||
233 | See also Documentation/memory-barriers.txt for a description of Linux's memory | ||
234 | barrier facilities. | ||
diff --git a/Documentation/connector/cn_test.c b/Documentation/connector/cn_test.c index b07add3467f1..7764594778d4 100644 --- a/Documentation/connector/cn_test.c +++ b/Documentation/connector/cn_test.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/moduleparam.h> | 26 | #include <linux/moduleparam.h> |
27 | #include <linux/skbuff.h> | 27 | #include <linux/skbuff.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/timer.h> | 29 | #include <linux/timer.h> |
29 | 30 | ||
30 | #include <linux/connector.h> | 31 | #include <linux/connector.h> |
diff --git a/Documentation/fb/imacfb.txt b/Documentation/fb/efifb.txt index 316ec9bb7deb..a59916c29b33 100644 --- a/Documentation/fb/imacfb.txt +++ b/Documentation/fb/efifb.txt | |||
@@ -1,9 +1,9 @@ | |||
1 | 1 | ||
2 | What is imacfb? | 2 | What is efifb? |
3 | =============== | 3 | =============== |
4 | 4 | ||
5 | This is a generic EFI platform driver for Intel based Apple computers. | 5 | This is a generic EFI platform driver for Intel based Apple computers. |
6 | Imacfb is only for EFI booted Intel Macs. | 6 | efifb is only for EFI booted Intel Macs. |
7 | 7 | ||
8 | Supported Hardware | 8 | Supported Hardware |
9 | ================== | 9 | ================== |
@@ -16,16 +16,16 @@ MacMini | |||
16 | How to use it? | 16 | How to use it? |
17 | ============== | 17 | ============== |
18 | 18 | ||
19 | Imacfb does not have any kind of autodetection of your machine. | 19 | efifb does not have any kind of autodetection of your machine. |
20 | You have to add the following kernel parameters in your elilo.conf: | 20 | You have to add the following kernel parameters in your elilo.conf: |
21 | Macbook : | 21 | Macbook : |
22 | video=imacfb:macbook | 22 | video=efifb:macbook |
23 | MacMini : | 23 | MacMini : |
24 | video=imacfb:mini | 24 | video=efifb:mini |
25 | Macbook Pro 15", iMac 17" : | 25 | Macbook Pro 15", iMac 17" : |
26 | video=imacfb:i17 | 26 | video=efifb:i17 |
27 | Macbook Pro 17", iMac 20" : | 27 | Macbook Pro 17", iMac 20" : |
28 | video=imacfb:i20 | 28 | video=efifb:i20 |
29 | 29 | ||
30 | -- | 30 | -- |
31 | Edgar Hucek <gimli@dark-green.com> | 31 | Edgar Hucek <gimli@dark-green.com> |
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX index 3bae418c6ad3..4303614b5add 100644 --- a/Documentation/filesystems/00-INDEX +++ b/Documentation/filesystems/00-INDEX | |||
@@ -16,6 +16,8 @@ befs.txt | |||
16 | - information about the BeOS filesystem for Linux. | 16 | - information about the BeOS filesystem for Linux. |
17 | bfs.txt | 17 | bfs.txt |
18 | - info for the SCO UnixWare Boot Filesystem (BFS). | 18 | - info for the SCO UnixWare Boot Filesystem (BFS). |
19 | ceph.txt | ||
20 | - info for the Ceph Distributed File System | ||
19 | cifs.txt | 21 | cifs.txt |
20 | - description of the CIFS filesystem. | 22 | - description of the CIFS filesystem. |
21 | coda.txt | 23 | coda.txt |
diff --git a/Documentation/filesystems/9p.txt b/Documentation/filesystems/9p.txt index 57e0b80a5274..c0236e753bc8 100644 --- a/Documentation/filesystems/9p.txt +++ b/Documentation/filesystems/9p.txt | |||
@@ -37,6 +37,15 @@ For Plan 9 From User Space applications (http://swtch.com/plan9) | |||
37 | 37 | ||
38 | mount -t 9p `namespace`/acme /mnt/9 -o trans=unix,uname=$USER | 38 | mount -t 9p `namespace`/acme /mnt/9 -o trans=unix,uname=$USER |
39 | 39 | ||
40 | For server running on QEMU host with virtio transport: | ||
41 | |||
42 | mount -t 9p -o trans=virtio <mount_tag> /mnt/9 | ||
43 | |||
44 | where mount_tag is the tag associated by the server to each of the exported | ||
45 | mount points. Each 9P export is seen by the client as a virtio device with an | ||
46 | associated "mount_tag" property. Available mount tags can be | ||
47 | seen by reading /sys/bus/virtio/drivers/9pnet_virtio/virtio<n>/mount_tag files. | ||
48 | |||
40 | OPTIONS | 49 | OPTIONS |
41 | ======= | 50 | ======= |
42 | 51 | ||
@@ -47,7 +56,7 @@ OPTIONS | |||
47 | fd - used passed file descriptors for connection | 56 | fd - used passed file descriptors for connection |
48 | (see rfdno and wfdno) | 57 | (see rfdno and wfdno) |
49 | virtio - connect to the next virtio channel available | 58 | virtio - connect to the next virtio channel available |
50 | (from lguest or KVM with trans_virtio module) | 59 | (from QEMU with trans_virtio module) |
51 | rdma - connect to a specified RDMA channel | 60 | rdma - connect to a specified RDMA channel |
52 | 61 | ||
53 | uname=name user name to attempt mount as on the remote server. The | 62 | uname=name user name to attempt mount as on the remote server. The |
@@ -85,7 +94,12 @@ OPTIONS | |||
85 | 94 | ||
86 | port=n port to connect to on the remote server | 95 | port=n port to connect to on the remote server |
87 | 96 | ||
88 | noextend force legacy mode (no 9p2000.u semantics) | 97 | noextend force legacy mode (no 9p2000.u or 9p2000.L semantics) |
98 | |||
99 | version=name Select 9P protocol version. Valid options are: | ||
100 | 9p2000 - Legacy mode (same as noextend) | ||
101 | 9p2000.u - Use 9P2000.u protocol | ||
102 | 9p2000.L - Use 9P2000.L protocol | ||
89 | 103 | ||
90 | dfltuid attempt to mount as a particular uid | 104 | dfltuid attempt to mount as a particular uid |
91 | 105 | ||
diff --git a/Documentation/filesystems/ceph.txt b/Documentation/filesystems/ceph.txt index 6e03917316bd..0660c9f5deef 100644 --- a/Documentation/filesystems/ceph.txt +++ b/Documentation/filesystems/ceph.txt | |||
@@ -8,7 +8,7 @@ Basic features include: | |||
8 | 8 | ||
9 | * POSIX semantics | 9 | * POSIX semantics |
10 | * Seamless scaling from 1 to many thousands of nodes | 10 | * Seamless scaling from 1 to many thousands of nodes |
11 | * High availability and reliability. No single points of failure. | 11 | * High availability and reliability. No single point of failure. |
12 | * N-way replication of data across storage nodes | 12 | * N-way replication of data across storage nodes |
13 | * Fast recovery from node failures | 13 | * Fast recovery from node failures |
14 | * Automatic rebalancing of data on node addition/removal | 14 | * Automatic rebalancing of data on node addition/removal |
@@ -94,7 +94,7 @@ Mount Options | |||
94 | 94 | ||
95 | wsize=X | 95 | wsize=X |
96 | Specify the maximum write size in bytes. By default there is no | 96 | Specify the maximum write size in bytes. By default there is no |
97 | maximu. Ceph will normally size writes based on the file stripe | 97 | maximum. Ceph will normally size writes based on the file stripe |
98 | size. | 98 | size. |
99 | 99 | ||
100 | rsize=X | 100 | rsize=X |
@@ -115,7 +115,7 @@ Mount Options | |||
115 | number of entries in that directory. | 115 | number of entries in that directory. |
116 | 116 | ||
117 | nocrc | 117 | nocrc |
118 | Disable CRC32C calculation for data writes. If set, the OSD | 118 | Disable CRC32C calculation for data writes. If set, the storage node |
119 | must rely on TCP's error correction to detect data corruption | 119 | must rely on TCP's error correction to detect data corruption |
120 | in the data payload. | 120 | in the data payload. |
121 | 121 | ||
@@ -133,7 +133,8 @@ For more information on Ceph, see the home page at | |||
133 | http://ceph.newdream.net/ | 133 | http://ceph.newdream.net/ |
134 | 134 | ||
135 | The Linux kernel client source tree is available at | 135 | The Linux kernel client source tree is available at |
136 | git://ceph.newdream.net/linux-ceph-client.git | 136 | git://ceph.newdream.net/git/ceph-client.git |
137 | git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git | ||
137 | 138 | ||
138 | and the source for the full system is at | 139 | and the source for the full system is at |
139 | git://ceph.newdream.net/ceph.git | 140 | git://ceph.newdream.net/git/ceph.git |
diff --git a/Documentation/filesystems/tmpfs.txt b/Documentation/filesystems/tmpfs.txt index 3015da0c6b2a..fe09a2cb1858 100644 --- a/Documentation/filesystems/tmpfs.txt +++ b/Documentation/filesystems/tmpfs.txt | |||
@@ -82,11 +82,13 @@ tmpfs has a mount option to set the NUMA memory allocation policy for | |||
82 | all files in that instance (if CONFIG_NUMA is enabled) - which can be | 82 | all files in that instance (if CONFIG_NUMA is enabled) - which can be |
83 | adjusted on the fly via 'mount -o remount ...' | 83 | adjusted on the fly via 'mount -o remount ...' |
84 | 84 | ||
85 | mpol=default prefers to allocate memory from the local node | 85 | mpol=default use the process allocation policy |
86 | (see set_mempolicy(2)) | ||
86 | mpol=prefer:Node prefers to allocate memory from the given Node | 87 | mpol=prefer:Node prefers to allocate memory from the given Node |
87 | mpol=bind:NodeList allocates memory only from nodes in NodeList | 88 | mpol=bind:NodeList allocates memory only from nodes in NodeList |
88 | mpol=interleave prefers to allocate from each node in turn | 89 | mpol=interleave prefers to allocate from each node in turn |
89 | mpol=interleave:NodeList allocates from each node of NodeList in turn | 90 | mpol=interleave:NodeList allocates from each node of NodeList in turn |
91 | mpol=local prefers to allocate memory from the local node | ||
90 | 92 | ||
91 | NodeList format is a comma-separated list of decimal numbers and ranges, | 93 | NodeList format is a comma-separated list of decimal numbers and ranges, |
92 | a range being two hyphen-separated decimal numbers, the smallest and | 94 | a range being two hyphen-separated decimal numbers, the smallest and |
@@ -134,3 +136,5 @@ Author: | |||
134 | Christoph Rohland <cr@sap.com>, 1.12.01 | 136 | Christoph Rohland <cr@sap.com>, 1.12.01 |
135 | Updated: | 137 | Updated: |
136 | Hugh Dickins, 4 June 2007 | 138 | Hugh Dickins, 4 June 2007 |
139 | Updated: | ||
140 | KOSAKI Motohiro, 16 Mar 2010 | ||
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 7f5809eddee6..631ad2f1b229 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -3,6 +3,7 @@ | |||
3 | ============================ | 3 | ============================ |
4 | 4 | ||
5 | By: David Howells <dhowells@redhat.com> | 5 | By: David Howells <dhowells@redhat.com> |
6 | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
6 | 7 | ||
7 | Contents: | 8 | Contents: |
8 | 9 | ||
@@ -60,6 +61,10 @@ Contents: | |||
60 | 61 | ||
61 | - And then there's the Alpha. | 62 | - And then there's the Alpha. |
62 | 63 | ||
64 | (*) Example uses. | ||
65 | |||
66 | - Circular buffers. | ||
67 | |||
63 | (*) References. | 68 | (*) References. |
64 | 69 | ||
65 | 70 | ||
@@ -2226,6 +2231,21 @@ The Alpha defines the Linux kernel's memory barrier model. | |||
2226 | See the subsection on "Cache Coherency" above. | 2231 | See the subsection on "Cache Coherency" above. |
2227 | 2232 | ||
2228 | 2233 | ||
2234 | ============ | ||
2235 | EXAMPLE USES | ||
2236 | ============ | ||
2237 | |||
2238 | CIRCULAR BUFFERS | ||
2239 | ---------------- | ||
2240 | |||
2241 | Memory barriers can be used to implement circular buffering without the need | ||
2242 | of a lock to serialise the producer with the consumer. See: | ||
2243 | |||
2244 | Documentation/circular-buffers.txt | ||
2245 | |||
2246 | for details. | ||
2247 | |||
2248 | |||
2229 | ========== | 2249 | ========== |
2230 | REFERENCES | 2250 | REFERENCES |
2231 | ========== | 2251 | ========== |
diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt index 0e58b4539176..e8c8f4f06c67 100644 --- a/Documentation/networking/timestamping.txt +++ b/Documentation/networking/timestamping.txt | |||
@@ -41,11 +41,12 @@ SOF_TIMESTAMPING_SOFTWARE: return system time stamp generated in | |||
41 | SOF_TIMESTAMPING_TX/RX determine how time stamps are generated. | 41 | SOF_TIMESTAMPING_TX/RX determine how time stamps are generated. |
42 | SOF_TIMESTAMPING_RAW/SYS determine how they are reported in the | 42 | SOF_TIMESTAMPING_RAW/SYS determine how they are reported in the |
43 | following control message: | 43 | following control message: |
44 | struct scm_timestamping { | 44 | |
45 | struct timespec systime; | 45 | struct scm_timestamping { |
46 | struct timespec hwtimetrans; | 46 | struct timespec systime; |
47 | struct timespec hwtimeraw; | 47 | struct timespec hwtimetrans; |
48 | }; | 48 | struct timespec hwtimeraw; |
49 | }; | ||
49 | 50 | ||
50 | recvmsg() can be used to get this control message for regular incoming | 51 | recvmsg() can be used to get this control message for regular incoming |
51 | packets. For send time stamps the outgoing packet is looped back to | 52 | packets. For send time stamps the outgoing packet is looped back to |
@@ -87,12 +88,13 @@ by the network device and will be empty without that support. | |||
87 | SIOCSHWTSTAMP: | 88 | SIOCSHWTSTAMP: |
88 | 89 | ||
89 | Hardware time stamping must also be initialized for each device driver | 90 | Hardware time stamping must also be initialized for each device driver |
90 | that is expected to do hardware time stamping. The parameter is: | 91 | that is expected to do hardware time stamping. The parameter is defined in |
92 | /include/linux/net_tstamp.h as: | ||
91 | 93 | ||
92 | struct hwtstamp_config { | 94 | struct hwtstamp_config { |
93 | int flags; /* no flags defined right now, must be zero */ | 95 | int flags; /* no flags defined right now, must be zero */ |
94 | int tx_type; /* HWTSTAMP_TX_* */ | 96 | int tx_type; /* HWTSTAMP_TX_* */ |
95 | int rx_filter; /* HWTSTAMP_FILTER_* */ | 97 | int rx_filter; /* HWTSTAMP_FILTER_* */ |
96 | }; | 98 | }; |
97 | 99 | ||
98 | Desired behavior is passed into the kernel and to a specific device by | 100 | Desired behavior is passed into the kernel and to a specific device by |
@@ -139,42 +141,56 @@ enum { | |||
139 | /* time stamp any incoming packet */ | 141 | /* time stamp any incoming packet */ |
140 | HWTSTAMP_FILTER_ALL, | 142 | HWTSTAMP_FILTER_ALL, |
141 | 143 | ||
142 | /* return value: time stamp all packets requested plus some others */ | 144 | /* return value: time stamp all packets requested plus some others */ |
143 | HWTSTAMP_FILTER_SOME, | 145 | HWTSTAMP_FILTER_SOME, |
144 | 146 | ||
145 | /* PTP v1, UDP, any kind of event packet */ | 147 | /* PTP v1, UDP, any kind of event packet */ |
146 | HWTSTAMP_FILTER_PTP_V1_L4_EVENT, | 148 | HWTSTAMP_FILTER_PTP_V1_L4_EVENT, |
147 | 149 | ||
148 | ... | 150 | /* for the complete list of values, please check |
151 | * the include file /include/linux/net_tstamp.h | ||
152 | */ | ||
149 | }; | 153 | }; |
150 | 154 | ||
151 | 155 | ||
152 | DEVICE IMPLEMENTATION | 156 | DEVICE IMPLEMENTATION |
153 | 157 | ||
154 | A driver which supports hardware time stamping must support the | 158 | A driver which supports hardware time stamping must support the |
155 | SIOCSHWTSTAMP ioctl. Time stamps for received packets must be stored | 159 | SIOCSHWTSTAMP ioctl and update the supplied struct hwtstamp_config with |
156 | in the skb with skb_hwtstamp_set(). | 160 | the actual values as described in the section on SIOCSHWTSTAMP. |
161 | |||
162 | Time stamps for received packets must be stored in the skb. To get a pointer | ||
163 | to the shared time stamp structure of the skb call skb_hwtstamps(). Then | ||
164 | set the time stamps in the structure: | ||
165 | |||
166 | struct skb_shared_hwtstamps { | ||
167 | /* hardware time stamp transformed into duration | ||
168 | * since arbitrary point in time | ||
169 | */ | ||
170 | ktime_t hwtstamp; | ||
171 | ktime_t syststamp; /* hwtstamp transformed to system time base */ | ||
172 | }; | ||
157 | 173 | ||
158 | Time stamps for outgoing packets are to be generated as follows: | 174 | Time stamps for outgoing packets are to be generated as follows: |
159 | - In hard_start_xmit(), check if skb_hwtstamp_check_tx_hardware() | 175 | - In hard_start_xmit(), check if skb_tx(skb)->hardware is set no-zero. |
160 | returns non-zero. If yes, then the driver is expected | 176 | If yes, then the driver is expected to do hardware time stamping. |
161 | to do hardware time stamping. | ||
162 | - If this is possible for the skb and requested, then declare | 177 | - If this is possible for the skb and requested, then declare |
163 | that the driver is doing the time stamping by calling | 178 | that the driver is doing the time stamping by setting the field |
164 | skb_hwtstamp_tx_in_progress(). A driver not supporting | 179 | skb_tx(skb)->in_progress non-zero. You might want to keep a pointer |
165 | hardware time stamping doesn't do that. A driver must never | 180 | to the associated skb for the next step and not free the skb. A driver |
166 | touch sk_buff::tstamp! It is used to store how time stamping | 181 | not supporting hardware time stamping doesn't do that. A driver must |
167 | for an outgoing packets is to be done. | 182 | never touch sk_buff::tstamp! It is used to store software generated |
183 | time stamps by the network subsystem. | ||
168 | - As soon as the driver has sent the packet and/or obtained a | 184 | - As soon as the driver has sent the packet and/or obtained a |
169 | hardware time stamp for it, it passes the time stamp back by | 185 | hardware time stamp for it, it passes the time stamp back by |
170 | calling skb_hwtstamp_tx() with the original skb, the raw | 186 | calling skb_hwtstamp_tx() with the original skb, the raw |
171 | hardware time stamp and a handle to the device (necessary | 187 | hardware time stamp. skb_hwtstamp_tx() clones the original skb and |
172 | to convert the hardware time stamp to system time). If obtaining | 188 | adds the timestamps, therefore the original skb has to be freed now. |
173 | the hardware time stamp somehow fails, then the driver should | 189 | If obtaining the hardware time stamp somehow fails, then the driver |
174 | not fall back to software time stamping. The rationale is that | 190 | should not fall back to software time stamping. The rationale is that |
175 | this would occur at a later time in the processing pipeline | 191 | this would occur at a later time in the processing pipeline than other |
176 | than other software time stamping and therefore could lead | 192 | software time stamping and therefore could lead to unexpected deltas |
177 | to unexpected deltas between time stamps. | 193 | between time stamps. |
178 | - If the driver did not call skb_hwtstamp_tx_in_progress(), then | 194 | - If the driver did not call set skb_tx(skb)->in_progress, then |
179 | dev_hard_start_xmit() checks whether software time stamping | 195 | dev_hard_start_xmit() checks whether software time stamping |
180 | is wanted as fallback and potentially generates the time stamp. | 196 | is wanted as fallback and potentially generates the time stamp. |
diff --git a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe.txt b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe.txt index 6e37be1eeb2d..4f8930263dd9 100644 --- a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe.txt +++ b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe.txt | |||
@@ -21,6 +21,15 @@ Required properties: | |||
21 | - fsl,qe-num-snums: define how many serial number(SNUM) the QE can use for the | 21 | - fsl,qe-num-snums: define how many serial number(SNUM) the QE can use for the |
22 | threads. | 22 | threads. |
23 | 23 | ||
24 | Optional properties: | ||
25 | - fsl,firmware-phandle: | ||
26 | Usage: required only if there is no fsl,qe-firmware child node | ||
27 | Value type: <phandle> | ||
28 | Definition: Points to a firmware node (see "QE Firmware Node" below) | ||
29 | that contains the firmware that should be uploaded for this QE. | ||
30 | The compatible property for the firmware node should say, | ||
31 | "fsl,qe-firmware". | ||
32 | |||
24 | Recommended properties | 33 | Recommended properties |
25 | - brg-frequency : the internal clock source frequency for baud-rate | 34 | - brg-frequency : the internal clock source frequency for baud-rate |
26 | generators in Hz. | 35 | generators in Hz. |
@@ -59,3 +68,48 @@ Example: | |||
59 | reg = <0 c000>; | 68 | reg = <0 c000>; |
60 | }; | 69 | }; |
61 | }; | 70 | }; |
71 | |||
72 | * QE Firmware Node | ||
73 | |||
74 | This node defines a firmware binary that is embedded in the device tree, for | ||
75 | the purpose of passing the firmware from bootloader to the kernel, or from | ||
76 | the hypervisor to the guest. | ||
77 | |||
78 | The firmware node itself contains the firmware binary contents, a compatible | ||
79 | property, and any firmware-specific properties. The node should be placed | ||
80 | inside a QE node that needs it. Doing so eliminates the need for a | ||
81 | fsl,firmware-phandle property. Other QE nodes that need the same firmware | ||
82 | should define an fsl,firmware-phandle property that points to the firmware node | ||
83 | in the first QE node. | ||
84 | |||
85 | The fsl,firmware property can be specified in the DTS (possibly using incbin) | ||
86 | or can be inserted by the boot loader at boot time. | ||
87 | |||
88 | Required properties: | ||
89 | - compatible | ||
90 | Usage: required | ||
91 | Value type: <string> | ||
92 | Definition: A standard property. Specify a string that indicates what | ||
93 | kind of firmware it is. For QE, this should be "fsl,qe-firmware". | ||
94 | |||
95 | - fsl,firmware | ||
96 | Usage: required | ||
97 | Value type: <prop-encoded-array>, encoded as an array of bytes | ||
98 | Definition: A standard property. This property contains the firmware | ||
99 | binary "blob". | ||
100 | |||
101 | Example: | ||
102 | qe1@e0080000 { | ||
103 | compatible = "fsl,qe"; | ||
104 | qe_firmware:qe-firmware { | ||
105 | compatible = "fsl,qe-firmware"; | ||
106 | fsl,firmware = [0x70 0xcd 0x00 0x00 0x01 0x46 0x45 ...]; | ||
107 | }; | ||
108 | ... | ||
109 | }; | ||
110 | |||
111 | qe2@e0090000 { | ||
112 | compatible = "fsl,qe"; | ||
113 | fsl,firmware-phandle = <&qe_firmware>; | ||
114 | ... | ||
115 | }; | ||
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt index f4dd3bf99d12..98d14cb8a85d 100644 --- a/Documentation/sound/alsa/HD-Audio.txt +++ b/Documentation/sound/alsa/HD-Audio.txt | |||
@@ -119,10 +119,18 @@ the codec slots 0 and 1 no matter what the hardware reports. | |||
119 | 119 | ||
120 | Interrupt Handling | 120 | Interrupt Handling |
121 | ~~~~~~~~~~~~~~~~~~ | 121 | ~~~~~~~~~~~~~~~~~~ |
122 | In rare but some cases, the interrupt isn't properly handled as | 122 | HD-audio driver uses MSI as default (if available) since 2.6.33 |
123 | default. You would notice this by the DMA transfer error reported by | 123 | kernel as MSI works better on some machines, and in general, it's |
124 | ALSA PCM core, for example. Using MSI might help in such a case. | 124 | better for performance. However, Nvidia controllers showed bad |
125 | Pass `enable_msi=1` option for enabling MSI. | 125 | regressions with MSI (especially in a combination with AMD chipset), |
126 | thus we disabled MSI for them. | ||
127 | |||
128 | There seem also still other devices that don't work with MSI. If you | ||
129 | see a regression wrt the sound quality (stuttering, etc) or a lock-up | ||
130 | in the recent kernel, try to pass `enable_msi=0` option to disable | ||
131 | MSI. If it works, you can add the known bad device to the blacklist | ||
132 | defined in hda_intel.c. In such a case, please report and give the | ||
133 | patch back to the upstream developer. | ||
126 | 134 | ||
127 | 135 | ||
128 | HD-AUDIO CODEC | 136 | HD-AUDIO CODEC |
diff --git a/Documentation/volatile-considered-harmful.txt b/Documentation/volatile-considered-harmful.txt index 991c26a6ef64..db0cb228d64a 100644 --- a/Documentation/volatile-considered-harmful.txt +++ b/Documentation/volatile-considered-harmful.txt | |||
@@ -63,9 +63,9 @@ way to perform a busy wait is: | |||
63 | cpu_relax(); | 63 | cpu_relax(); |
64 | 64 | ||
65 | The cpu_relax() call can lower CPU power consumption or yield to a | 65 | The cpu_relax() call can lower CPU power consumption or yield to a |
66 | hyperthreaded twin processor; it also happens to serve as a memory barrier, | 66 | hyperthreaded twin processor; it also happens to serve as a compiler |
67 | so, once again, volatile is unnecessary. Of course, busy-waiting is | 67 | barrier, so, once again, volatile is unnecessary. Of course, busy- |
68 | generally an anti-social act to begin with. | 68 | waiting is generally an anti-social act to begin with. |
69 | 69 | ||
70 | There are still a few rare situations where volatile makes sense in the | 70 | There are still a few rare situations where volatile makes sense in the |
71 | kernel: | 71 | kernel: |
diff --git a/Documentation/watchdog/src/watchdog-simple.c b/Documentation/watchdog/src/watchdog-simple.c index 4cf72f3fa8e9..ba45803a2216 100644 --- a/Documentation/watchdog/src/watchdog-simple.c +++ b/Documentation/watchdog/src/watchdog-simple.c | |||
@@ -17,9 +17,6 @@ int main(void) | |||
17 | ret = -1; | 17 | ret = -1; |
18 | break; | 18 | break; |
19 | } | 19 | } |
20 | ret = fsync(fd); | ||
21 | if (ret) | ||
22 | break; | ||
23 | sleep(10); | 20 | sleep(10); |
24 | } | 21 | } |
25 | close(fd); | 22 | close(fd); |
diff --git a/Documentation/watchdog/src/watchdog-test.c b/Documentation/watchdog/src/watchdog-test.c index a750532ffcf8..63fdc34ceb98 100644 --- a/Documentation/watchdog/src/watchdog-test.c +++ b/Documentation/watchdog/src/watchdog-test.c | |||
@@ -31,6 +31,8 @@ static void keep_alive(void) | |||
31 | */ | 31 | */ |
32 | int main(int argc, char *argv[]) | 32 | int main(int argc, char *argv[]) |
33 | { | 33 | { |
34 | int flags; | ||
35 | |||
34 | fd = open("/dev/watchdog", O_WRONLY); | 36 | fd = open("/dev/watchdog", O_WRONLY); |
35 | 37 | ||
36 | if (fd == -1) { | 38 | if (fd == -1) { |
@@ -41,12 +43,14 @@ int main(int argc, char *argv[]) | |||
41 | 43 | ||
42 | if (argc > 1) { | 44 | if (argc > 1) { |
43 | if (!strncasecmp(argv[1], "-d", 2)) { | 45 | if (!strncasecmp(argv[1], "-d", 2)) { |
44 | ioctl(fd, WDIOC_SETOPTIONS, WDIOS_DISABLECARD); | 46 | flags = WDIOS_DISABLECARD; |
47 | ioctl(fd, WDIOC_SETOPTIONS, &flags); | ||
45 | fprintf(stderr, "Watchdog card disabled.\n"); | 48 | fprintf(stderr, "Watchdog card disabled.\n"); |
46 | fflush(stderr); | 49 | fflush(stderr); |
47 | exit(0); | 50 | exit(0); |
48 | } else if (!strncasecmp(argv[1], "-e", 2)) { | 51 | } else if (!strncasecmp(argv[1], "-e", 2)) { |
49 | ioctl(fd, WDIOC_SETOPTIONS, WDIOS_ENABLECARD); | 52 | flags = WDIOS_ENABLECARD; |
53 | ioctl(fd, WDIOC_SETOPTIONS, &flags); | ||
50 | fprintf(stderr, "Watchdog card enabled.\n"); | 54 | fprintf(stderr, "Watchdog card enabled.\n"); |
51 | fflush(stderr); | 55 | fflush(stderr); |
52 | exit(0); | 56 | exit(0); |
diff --git a/Documentation/watchdog/watchdog-api.txt b/Documentation/watchdog/watchdog-api.txt index 4cc4ba9d7150..eb7132ed8bbc 100644 --- a/Documentation/watchdog/watchdog-api.txt +++ b/Documentation/watchdog/watchdog-api.txt | |||
@@ -222,11 +222,10 @@ returned value is the temperature in degrees fahrenheit. | |||
222 | ioctl(fd, WDIOC_GETTEMP, &temperature); | 222 | ioctl(fd, WDIOC_GETTEMP, &temperature); |
223 | 223 | ||
224 | Finally the SETOPTIONS ioctl can be used to control some aspects of | 224 | Finally the SETOPTIONS ioctl can be used to control some aspects of |
225 | the cards operation; right now the pcwd driver is the only one | 225 | the cards operation. |
226 | supporting this ioctl. | ||
227 | 226 | ||
228 | int options = 0; | 227 | int options = 0; |
229 | ioctl(fd, WDIOC_SETOPTIONS, options); | 228 | ioctl(fd, WDIOC_SETOPTIONS, &options); |
230 | 229 | ||
231 | The following options are available: | 230 | The following options are available: |
232 | 231 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 2c569f506498..a7ff13e7ae23 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -797,12 +797,12 @@ M: Michael Petchkovsky <mkpetch@internode.on.net> | |||
797 | S: Maintained | 797 | S: Maintained |
798 | 798 | ||
799 | ARM/NOMADIK ARCHITECTURE | 799 | ARM/NOMADIK ARCHITECTURE |
800 | M: Alessandro Rubini <rubini@unipv.it> | 800 | M: Alessandro Rubini <rubini@unipv.it> |
801 | M: STEricsson <STEricsson_nomadik_linux@list.st.com> | 801 | M: STEricsson <STEricsson_nomadik_linux@list.st.com> |
802 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 802 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
803 | S: Maintained | 803 | S: Maintained |
804 | F: arch/arm/mach-nomadik/ | 804 | F: arch/arm/mach-nomadik/ |
805 | F: arch/arm/plat-nomadik/ | 805 | F: arch/arm/plat-nomadik/ |
806 | 806 | ||
807 | ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT | 807 | ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT |
808 | M: Nelson Castillo <arhuaco@freaks-unidos.net> | 808 | M: Nelson Castillo <arhuaco@freaks-unidos.net> |
@@ -1443,7 +1443,7 @@ F: arch/powerpc/platforms/cell/ | |||
1443 | 1443 | ||
1444 | CEPH DISTRIBUTED FILE SYSTEM CLIENT | 1444 | CEPH DISTRIBUTED FILE SYSTEM CLIENT |
1445 | M: Sage Weil <sage@newdream.net> | 1445 | M: Sage Weil <sage@newdream.net> |
1446 | L: ceph-devel@lists.sourceforge.net | 1446 | L: ceph-devel@vger.kernel.org |
1447 | W: http://ceph.newdream.net/ | 1447 | W: http://ceph.newdream.net/ |
1448 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git | 1448 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git |
1449 | S: Supported | 1449 | S: Supported |
@@ -1927,17 +1927,17 @@ F: drivers/scsi/dpt* | |||
1927 | F: drivers/scsi/dpt/ | 1927 | F: drivers/scsi/dpt/ |
1928 | 1928 | ||
1929 | DRBD DRIVER | 1929 | DRBD DRIVER |
1930 | P: Philipp Reisner | 1930 | P: Philipp Reisner |
1931 | P: Lars Ellenberg | 1931 | P: Lars Ellenberg |
1932 | M: drbd-dev@lists.linbit.com | 1932 | M: drbd-dev@lists.linbit.com |
1933 | L: drbd-user@lists.linbit.com | 1933 | L: drbd-user@lists.linbit.com |
1934 | W: http://www.drbd.org | 1934 | W: http://www.drbd.org |
1935 | T: git git://git.drbd.org/linux-2.6-drbd.git drbd | 1935 | T: git git://git.drbd.org/linux-2.6-drbd.git drbd |
1936 | T: git git://git.drbd.org/drbd-8.3.git | 1936 | T: git git://git.drbd.org/drbd-8.3.git |
1937 | S: Supported | 1937 | S: Supported |
1938 | F: drivers/block/drbd/ | 1938 | F: drivers/block/drbd/ |
1939 | F: lib/lru_cache.c | 1939 | F: lib/lru_cache.c |
1940 | F: Documentation/blockdev/drbd/ | 1940 | F: Documentation/blockdev/drbd/ |
1941 | 1941 | ||
1942 | DRIVER CORE, KOBJECTS, AND SYSFS | 1942 | DRIVER CORE, KOBJECTS, AND SYSFS |
1943 | M: Greg Kroah-Hartman <gregkh@suse.de> | 1943 | M: Greg Kroah-Hartman <gregkh@suse.de> |
@@ -2475,12 +2475,6 @@ L: linuxppc-dev@ozlabs.org | |||
2475 | S: Odd Fixes | 2475 | S: Odd Fixes |
2476 | F: drivers/char/hvc_* | 2476 | F: drivers/char/hvc_* |
2477 | 2477 | ||
2478 | VIRTIO CONSOLE DRIVER | ||
2479 | M: Amit Shah <amit.shah@redhat.com> | ||
2480 | L: virtualization@lists.linux-foundation.org | ||
2481 | S: Maintained | ||
2482 | F: drivers/char/virtio_console.c | ||
2483 | |||
2484 | iSCSI BOOT FIRMWARE TABLE (iBFT) DRIVER | 2478 | iSCSI BOOT FIRMWARE TABLE (iBFT) DRIVER |
2485 | M: Peter Jones <pjones@redhat.com> | 2479 | M: Peter Jones <pjones@redhat.com> |
2486 | M: Konrad Rzeszutek Wilk <konrad@kernel.org> | 2480 | M: Konrad Rzeszutek Wilk <konrad@kernel.org> |
@@ -3270,6 +3264,16 @@ S: Maintained | |||
3270 | F: include/linux/kexec.h | 3264 | F: include/linux/kexec.h |
3271 | F: kernel/kexec.c | 3265 | F: kernel/kexec.c |
3272 | 3266 | ||
3267 | KEYS/KEYRINGS: | ||
3268 | M: David Howells <dhowells@redhat.com> | ||
3269 | L: keyrings@linux-nfs.org | ||
3270 | S: Maintained | ||
3271 | F: Documentation/keys.txt | ||
3272 | F: include/linux/key.h | ||
3273 | F: include/linux/key-type.h | ||
3274 | F: include/keys/ | ||
3275 | F: security/keys/ | ||
3276 | |||
3273 | KGDB | 3277 | KGDB |
3274 | M: Jason Wessel <jason.wessel@windriver.com> | 3278 | M: Jason Wessel <jason.wessel@windriver.com> |
3275 | L: kgdb-bugreport@lists.sourceforge.net | 3279 | L: kgdb-bugreport@lists.sourceforge.net |
@@ -3519,8 +3523,8 @@ F: drivers/scsi/sym53c8xx_2/ | |||
3519 | LTP (Linux Test Project) | 3523 | LTP (Linux Test Project) |
3520 | M: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> | 3524 | M: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> |
3521 | M: Garrett Cooper <yanegomi@gmail.com> | 3525 | M: Garrett Cooper <yanegomi@gmail.com> |
3522 | M: Mike Frysinger <vapier@gentoo.org> | 3526 | M: Mike Frysinger <vapier@gentoo.org> |
3523 | M: Subrata Modak <subrata@linux.vnet.ibm.com> | 3527 | M: Subrata Modak <subrata@linux.vnet.ibm.com> |
3524 | L: ltp-list@lists.sourceforge.net (subscribers-only) | 3528 | L: ltp-list@lists.sourceforge.net (subscribers-only) |
3525 | W: http://ltp.sourceforge.net/ | 3529 | W: http://ltp.sourceforge.net/ |
3526 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/galak/ltp.git | 3530 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/galak/ltp.git |
@@ -5960,6 +5964,13 @@ S: Maintained | |||
5960 | F: Documentation/filesystems/vfat.txt | 5964 | F: Documentation/filesystems/vfat.txt |
5961 | F: fs/fat/ | 5965 | F: fs/fat/ |
5962 | 5966 | ||
5967 | VIRTIO CONSOLE DRIVER | ||
5968 | M: Amit Shah <amit.shah@redhat.com> | ||
5969 | L: virtualization@lists.linux-foundation.org | ||
5970 | S: Maintained | ||
5971 | F: drivers/char/virtio_console.c | ||
5972 | F: include/linux/virtio_console.h | ||
5973 | |||
5963 | VIRTIO HOST (VHOST) | 5974 | VIRTIO HOST (VHOST) |
5964 | M: "Michael S. Tsirkin" <mst@redhat.com> | 5975 | M: "Michael S. Tsirkin" <mst@redhat.com> |
5965 | L: kvm@vger.kernel.org | 5976 | L: kvm@vger.kernel.org |
@@ -6200,7 +6211,7 @@ F: arch/x86/ | |||
6200 | X86 PLATFORM DRIVERS | 6211 | X86 PLATFORM DRIVERS |
6201 | M: Matthew Garrett <mjg@redhat.com> | 6212 | M: Matthew Garrett <mjg@redhat.com> |
6202 | L: platform-driver-x86@vger.kernel.org | 6213 | L: platform-driver-x86@vger.kernel.org |
6203 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86.git | 6214 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86.git |
6204 | S: Maintained | 6215 | S: Maintained |
6205 | F: drivers/platform/x86 | 6216 | F: drivers/platform/x86 |
6206 | 6217 | ||
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 34 | 3 | SUBLEVEL = 34 |
4 | EXTRAVERSION = -rc2 | 4 | EXTRAVERSION = -rc3 |
5 | NAME = Man-Eating Seals of Antiquity | 5 | NAME = Man-Eating Seals of Antiquity |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/alpha/boot/bootp.c b/arch/alpha/boot/bootp.c index 3c8d1b25c661..be61670d4096 100644 --- a/arch/alpha/boot/bootp.c +++ b/arch/alpha/boot/bootp.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * based significantly on the arch/alpha/boot/main.c of Linus Torvalds | 8 | * based significantly on the arch/alpha/boot/main.c of Linus Torvalds |
9 | */ | 9 | */ |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/string.h> | 12 | #include <linux/string.h> |
12 | #include <generated/utsrelease.h> | 13 | #include <generated/utsrelease.h> |
13 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
diff --git a/arch/alpha/boot/bootpz.c b/arch/alpha/boot/bootpz.c index ade3f129dc27..c98865f21423 100644 --- a/arch/alpha/boot/bootpz.c +++ b/arch/alpha/boot/bootpz.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * and the decompression code from MILO. | 10 | * and the decompression code from MILO. |
11 | */ | 11 | */ |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/string.h> | 14 | #include <linux/string.h> |
14 | #include <generated/utsrelease.h> | 15 | #include <generated/utsrelease.h> |
15 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
diff --git a/arch/alpha/boot/main.c b/arch/alpha/boot/main.c index 644b7db55438..ded57d9a80e1 100644 --- a/arch/alpha/boot/main.c +++ b/arch/alpha/boot/main.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * This file is the bootloader for the Linux/AXP kernel | 6 | * This file is the bootloader for the Linux/AXP kernel |
7 | */ | 7 | */ |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/string.h> | 10 | #include <linux/string.h> |
10 | #include <generated/utsrelease.h> | 11 | #include <generated/utsrelease.h> |
11 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c index 3047a1b3a517..3ff9a957a25c 100644 --- a/arch/alpha/boot/misc.c +++ b/arch/alpha/boot/misc.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
24 | 25 | ||
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index 5f2cf23c4648..7f912ba3d9ad 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/ptrace.h> | 19 | #include <linux/ptrace.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/slab.h> | ||
22 | #include <linux/random.h> | 21 | #include <linux/random.h> |
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
24 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 53c213f70fcb..de9d39717808 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/syscalls.h> | 20 | #include <linux/syscalls.h> |
21 | #include <linux/unistd.h> | 21 | #include <linux/unistd.h> |
22 | #include <linux/ptrace.h> | 22 | #include <linux/ptrace.h> |
23 | #include <linux/slab.h> | ||
24 | #include <linux/user.h> | 23 | #include <linux/user.h> |
25 | #include <linux/utsname.h> | 24 | #include <linux/utsname.h> |
26 | #include <linux/time.h> | 25 | #include <linux/time.h> |
@@ -37,6 +36,7 @@ | |||
37 | #include <linux/uio.h> | 36 | #include <linux/uio.h> |
38 | #include <linux/vfs.h> | 37 | #include <linux/vfs.h> |
39 | #include <linux/rcupdate.h> | 38 | #include <linux/rcupdate.h> |
39 | #include <linux/slab.h> | ||
40 | 40 | ||
41 | #include <asm/fpu.h> | 41 | #include <asm/fpu.h> |
42 | #include <asm/io.h> | 42 | #include <asm/io.h> |
diff --git a/arch/alpha/kernel/pci-noop.c b/arch/alpha/kernel/pci-noop.c index 823a540f9f5b..246100ef07c2 100644 --- a/arch/alpha/kernel/pci-noop.c +++ b/arch/alpha/kernel/pci-noop.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/pci.h> | 7 | #include <linux/pci.h> |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/bootmem.h> | 9 | #include <linux/bootmem.h> |
10 | #include <linux/gfp.h> | ||
10 | #include <linux/capability.h> | 11 | #include <linux/capability.h> |
11 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
12 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
diff --git a/arch/alpha/kernel/pci-sysfs.c b/arch/alpha/kernel/pci-sysfs.c index 6ea822e7f724..d979e7c7bc4b 100644 --- a/arch/alpha/kernel/pci-sysfs.c +++ b/arch/alpha/kernel/pci-sysfs.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
14 | 15 | ||
15 | static int hose_mmap_page_range(struct pci_controller *hose, | 16 | static int hose_mmap_page_range(struct pci_controller *hose, |
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c index ce9e54c887fa..d1dbd9acd1df 100644 --- a/arch/alpha/kernel/pci_iommu.c +++ b/arch/alpha/kernel/pci_iommu.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/pci.h> | 7 | #include <linux/pci.h> |
8 | #include <linux/slab.h> | 8 | #include <linux/gfp.h> |
9 | #include <linux/bootmem.h> | 9 | #include <linux/bootmem.h> |
10 | #include <linux/scatterlist.h> | 10 | #include <linux/scatterlist.h> |
11 | #include <linux/log2.h> | 11 | #include <linux/log2.h> |
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index 289039bb6bb2..395a464353b8 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/stddef.h> | 17 | #include <linux/stddef.h> |
18 | #include <linux/unistd.h> | 18 | #include <linux/unistd.h> |
19 | #include <linux/ptrace.h> | 19 | #include <linux/ptrace.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/user.h> | 20 | #include <linux/user.h> |
22 | #include <linux/time.h> | 21 | #include <linux/time.h> |
23 | #include <linux/major.h> | 22 | #include <linux/major.h> |
@@ -28,6 +27,7 @@ | |||
28 | #include <linux/reboot.h> | 27 | #include <linux/reboot.h> |
29 | #include <linux/tty.h> | 28 | #include <linux/tty.h> |
30 | #include <linux/console.h> | 29 | #include <linux/console.h> |
30 | #include <linux/slab.h> | ||
31 | 31 | ||
32 | #include <asm/reg.h> | 32 | #include <asm/reg.h> |
33 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c index 9acadc6b16a0..baa903602f6a 100644 --- a/arch/alpha/kernel/ptrace.c +++ b/arch/alpha/kernel/ptrace.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/ptrace.h> | 12 | #include <linux/ptrace.h> |
13 | #include <linux/user.h> | 13 | #include <linux/user.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/security.h> | 14 | #include <linux/security.h> |
16 | #include <linux/signal.h> | 15 | #include <linux/signal.h> |
17 | 16 | ||
diff --git a/arch/alpha/kernel/smc37c669.c b/arch/alpha/kernel/smc37c669.c index bca5bda90cde..0435921d41c6 100644 --- a/arch/alpha/kernel/smc37c669.c +++ b/arch/alpha/kernel/smc37c669.c | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | 5 | ||
6 | #include <linux/slab.h> | ||
7 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
8 | #include <linux/init.h> | 7 | #include <linux/init.h> |
9 | #include <linux/delay.h> | 8 | #include <linux/delay.h> |
diff --git a/arch/alpha/kernel/smc37c93x.c b/arch/alpha/kernel/smc37c93x.c index 2636cc028d06..3e6a2893af9f 100644 --- a/arch/alpha/kernel/smc37c93x.c +++ b/arch/alpha/kernel/smc37c93x.c | |||
@@ -4,7 +4,6 @@ | |||
4 | 4 | ||
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | 6 | ||
7 | #include <linux/slab.h> | ||
8 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
9 | #include <linux/init.h> | 8 | #include <linux/init.h> |
10 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
diff --git a/arch/alpha/kernel/srm_env.c b/arch/alpha/kernel/srm_env.c index dbbf04f9230e..4afc1a1e2e5a 100644 --- a/arch/alpha/kernel/srm_env.c +++ b/arch/alpha/kernel/srm_env.c | |||
@@ -30,6 +30,7 @@ | |||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/gfp.h> | ||
33 | #include <linux/module.h> | 34 | #include <linux/module.h> |
34 | #include <linux/init.h> | 35 | #include <linux/init.h> |
35 | #include <linux/proc_fs.h> | 36 | #include <linux/proc_fs.h> |
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c index a0902c20d677..86425ab53bf5 100644 --- a/arch/alpha/mm/init.c +++ b/arch/alpha/mm/init.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/bootmem.h> /* max_low_pfn */ | 21 | #include <linux/bootmem.h> /* max_low_pfn */ |
22 | #include <linux/vmalloc.h> | 22 | #include <linux/vmalloc.h> |
23 | #include <linux/gfp.h> | ||
23 | 24 | ||
24 | #include <asm/system.h> | 25 | #include <asm/system.h> |
25 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c index 6416d5b5020d..dba4c1da63ed 100644 --- a/arch/arm/common/clkdev.c +++ b/arch/arm/common/clkdev.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/mutex.h> | 19 | #include <linux/mutex.h> |
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <asm/clkdev.h> | 23 | #include <asm/clkdev.h> |
23 | #include <mach/clkdev.h> | 24 | #include <mach/clkdev.h> |
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c index ee1d3b85eb65..7974baacafce 100644 --- a/arch/arm/common/it8152.c +++ b/arch/arm/common/it8152.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/ptrace.h> | 21 | #include <linux/ptrace.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/init.h> | 24 | #include <linux/init.h> |
26 | #include <linux/ioport.h> | 25 | #include <linux/ioport.h> |
27 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 90ae00b631c2..9dff07c80ddb 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c | |||
@@ -290,7 +290,7 @@ static int locomo_suspend(struct platform_device *dev, pm_message_t state) | |||
290 | save->LCM_GPO = locomo_readl(lchip->base + LOCOMO_GPO); /* GPIO */ | 290 | save->LCM_GPO = locomo_readl(lchip->base + LOCOMO_GPO); /* GPIO */ |
291 | locomo_writel(0x00, lchip->base + LOCOMO_GPO); | 291 | locomo_writel(0x00, lchip->base + LOCOMO_GPO); |
292 | save->LCM_SPICT = locomo_readl(lchip->base + LOCOMO_SPI + LOCOMO_SPICT); /* SPI */ | 292 | save->LCM_SPICT = locomo_readl(lchip->base + LOCOMO_SPI + LOCOMO_SPICT); /* SPI */ |
293 | locomo_writel(0x40, lchip->base + LOCOMO_SPICT); | 293 | locomo_writel(0x40, lchip->base + LOCOMO_SPI + LOCOMO_SPICT); |
294 | save->LCM_GPE = locomo_readl(lchip->base + LOCOMO_GPE); /* GPIO */ | 294 | save->LCM_GPE = locomo_readl(lchip->base + LOCOMO_GPE); /* GPIO */ |
295 | locomo_writel(0x00, lchip->base + LOCOMO_GPE); | 295 | locomo_writel(0x00, lchip->base + LOCOMO_GPE); |
296 | save->LCM_ASD = locomo_readl(lchip->base + LOCOMO_ASD); /* ADSTART */ | 296 | save->LCM_ASD = locomo_readl(lchip->base + LOCOMO_ASD); /* ADSTART */ |
@@ -418,7 +418,7 @@ __locomo_probe(struct device *me, struct resource *mem, int irq) | |||
418 | /* Longtime timer */ | 418 | /* Longtime timer */ |
419 | locomo_writel(0, lchip->base + LOCOMO_LTINT); | 419 | locomo_writel(0, lchip->base + LOCOMO_LTINT); |
420 | /* SPI */ | 420 | /* SPI */ |
421 | locomo_writel(0, lchip->base + LOCOMO_SPIIE); | 421 | locomo_writel(0, lchip->base + LOCOMO_SPI + LOCOMO_SPIIE); |
422 | 422 | ||
423 | locomo_writel(6 + 8 + 320 + 30 - 10, lchip->base + LOCOMO_ASD); | 423 | locomo_writel(6 + 8 + 320 + 30 - 10, lchip->base + LOCOMO_ASD); |
424 | r = locomo_readl(lchip->base + LOCOMO_ASD); | 424 | r = locomo_readl(lchip->base + LOCOMO_ASD); |
@@ -707,7 +707,7 @@ void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int | |||
707 | udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ | 707 | udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ |
708 | if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ | 708 | if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ |
709 | printk(KERN_WARNING "locomo: m62332_senddata Error 1\n"); | 709 | printk(KERN_WARNING "locomo: m62332_senddata Error 1\n"); |
710 | return; | 710 | goto out; |
711 | } | 711 | } |
712 | 712 | ||
713 | /* Send Sub address (LSB is channel select) */ | 713 | /* Send Sub address (LSB is channel select) */ |
@@ -735,7 +735,7 @@ void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int | |||
735 | udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ | 735 | udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ |
736 | if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ | 736 | if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ |
737 | printk(KERN_WARNING "locomo: m62332_senddata Error 2\n"); | 737 | printk(KERN_WARNING "locomo: m62332_senddata Error 2\n"); |
738 | return; | 738 | goto out; |
739 | } | 739 | } |
740 | 740 | ||
741 | /* Send DAC data */ | 741 | /* Send DAC data */ |
@@ -760,9 +760,9 @@ void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int | |||
760 | udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ | 760 | udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ |
761 | if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ | 761 | if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ |
762 | printk(KERN_WARNING "locomo: m62332_senddata Error 3\n"); | 762 | printk(KERN_WARNING "locomo: m62332_senddata Error 3\n"); |
763 | return; | ||
764 | } | 763 | } |
765 | 764 | ||
765 | out: | ||
766 | /* stop */ | 766 | /* stop */ |
767 | r = locomo_readl(mapbase + LOCOMO_DAC); | 767 | r = locomo_readl(mapbase + LOCOMO_DAC); |
768 | r &= ~(LOCOMO_DAC_SCLOEB); | 768 | r &= ~(LOCOMO_DAC_SCLOEB); |
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index 72da7e045c6b..0d08d4170b64 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/glue.h> | 15 | #include <asm/glue.h> |
16 | #include <asm/shmparam.h> | 16 | #include <asm/shmparam.h> |
17 | #include <asm/cachetype.h> | 17 | #include <asm/cachetype.h> |
18 | #include <asm/outercache.h> | ||
18 | 19 | ||
19 | #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) | 20 | #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) |
20 | 21 | ||
@@ -219,12 +220,6 @@ struct cpu_cache_fns { | |||
219 | void (*dma_flush_range)(const void *, const void *); | 220 | void (*dma_flush_range)(const void *, const void *); |
220 | }; | 221 | }; |
221 | 222 | ||
222 | struct outer_cache_fns { | ||
223 | void (*inv_range)(unsigned long, unsigned long); | ||
224 | void (*clean_range)(unsigned long, unsigned long); | ||
225 | void (*flush_range)(unsigned long, unsigned long); | ||
226 | }; | ||
227 | |||
228 | /* | 223 | /* |
229 | * Select the calling method | 224 | * Select the calling method |
230 | */ | 225 | */ |
@@ -281,37 +276,6 @@ extern void dmac_flush_range(const void *, const void *); | |||
281 | 276 | ||
282 | #endif | 277 | #endif |
283 | 278 | ||
284 | #ifdef CONFIG_OUTER_CACHE | ||
285 | |||
286 | extern struct outer_cache_fns outer_cache; | ||
287 | |||
288 | static inline void outer_inv_range(unsigned long start, unsigned long end) | ||
289 | { | ||
290 | if (outer_cache.inv_range) | ||
291 | outer_cache.inv_range(start, end); | ||
292 | } | ||
293 | static inline void outer_clean_range(unsigned long start, unsigned long end) | ||
294 | { | ||
295 | if (outer_cache.clean_range) | ||
296 | outer_cache.clean_range(start, end); | ||
297 | } | ||
298 | static inline void outer_flush_range(unsigned long start, unsigned long end) | ||
299 | { | ||
300 | if (outer_cache.flush_range) | ||
301 | outer_cache.flush_range(start, end); | ||
302 | } | ||
303 | |||
304 | #else | ||
305 | |||
306 | static inline void outer_inv_range(unsigned long start, unsigned long end) | ||
307 | { } | ||
308 | static inline void outer_clean_range(unsigned long start, unsigned long end) | ||
309 | { } | ||
310 | static inline void outer_flush_range(unsigned long start, unsigned long end) | ||
311 | { } | ||
312 | |||
313 | #endif | ||
314 | |||
315 | /* | 279 | /* |
316 | * Copy user data from/to a page which is mapped into a different | 280 | * Copy user data from/to a page which is mapped into a different |
317 | * processes address space. Really, we want to allow our "user | 281 | * processes address space. Really, we want to allow our "user |
diff --git a/arch/arm/include/asm/clkdev.h b/arch/arm/include/asm/clkdev.h index 7a0690da5e63..b56c1389b6fa 100644 --- a/arch/arm/include/asm/clkdev.h +++ b/arch/arm/include/asm/clkdev.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define __ASM_CLKDEV_H | 13 | #define __ASM_CLKDEV_H |
14 | 14 | ||
15 | struct clk; | 15 | struct clk; |
16 | struct device; | ||
16 | 17 | ||
17 | struct clk_lookup { | 18 | struct clk_lookup { |
18 | struct list_head node; | 19 | struct list_head node; |
diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h index 328f14a8b790..237282f7c762 100644 --- a/arch/arm/include/asm/irq.h +++ b/arch/arm/include/asm/irq.h | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #ifndef __ASSEMBLY__ | 18 | #ifndef __ASSEMBLY__ |
19 | struct irqaction; | 19 | struct irqaction; |
20 | struct pt_regs; | ||
20 | extern void migrate_irqs(void); | 21 | extern void migrate_irqs(void); |
21 | 22 | ||
22 | extern void asm_do_IRQ(unsigned int, struct pt_regs *); | 23 | extern void asm_do_IRQ(unsigned int, struct pt_regs *); |
diff --git a/arch/arm/include/asm/outercache.h b/arch/arm/include/asm/outercache.h new file mode 100644 index 000000000000..25f76bae57ab --- /dev/null +++ b/arch/arm/include/asm/outercache.h | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/outercache.h | ||
3 | * | ||
4 | * Copyright (C) 2010 ARM Ltd. | ||
5 | * Written by Catalin Marinas <catalin.marinas@arm.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef __ASM_OUTERCACHE_H | ||
22 | #define __ASM_OUTERCACHE_H | ||
23 | |||
24 | struct outer_cache_fns { | ||
25 | void (*inv_range)(unsigned long, unsigned long); | ||
26 | void (*clean_range)(unsigned long, unsigned long); | ||
27 | void (*flush_range)(unsigned long, unsigned long); | ||
28 | #ifdef CONFIG_OUTER_CACHE_SYNC | ||
29 | void (*sync)(void); | ||
30 | #endif | ||
31 | }; | ||
32 | |||
33 | #ifdef CONFIG_OUTER_CACHE | ||
34 | |||
35 | extern struct outer_cache_fns outer_cache; | ||
36 | |||
37 | static inline void outer_inv_range(unsigned long start, unsigned long end) | ||
38 | { | ||
39 | if (outer_cache.inv_range) | ||
40 | outer_cache.inv_range(start, end); | ||
41 | } | ||
42 | static inline void outer_clean_range(unsigned long start, unsigned long end) | ||
43 | { | ||
44 | if (outer_cache.clean_range) | ||
45 | outer_cache.clean_range(start, end); | ||
46 | } | ||
47 | static inline void outer_flush_range(unsigned long start, unsigned long end) | ||
48 | { | ||
49 | if (outer_cache.flush_range) | ||
50 | outer_cache.flush_range(start, end); | ||
51 | } | ||
52 | |||
53 | #else | ||
54 | |||
55 | static inline void outer_inv_range(unsigned long start, unsigned long end) | ||
56 | { } | ||
57 | static inline void outer_clean_range(unsigned long start, unsigned long end) | ||
58 | { } | ||
59 | static inline void outer_flush_range(unsigned long start, unsigned long end) | ||
60 | { } | ||
61 | |||
62 | #endif | ||
63 | |||
64 | #ifdef CONFIG_OUTER_CACHE_SYNC | ||
65 | static inline void outer_sync(void) | ||
66 | { | ||
67 | if (outer_cache.sync) | ||
68 | outer_cache.sync(); | ||
69 | } | ||
70 | #else | ||
71 | static inline void outer_sync(void) | ||
72 | { } | ||
73 | #endif | ||
74 | |||
75 | #endif /* __ASM_OUTERCACHE_H */ | ||
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index ca88e6a84707..4ace45ec3ef8 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -60,6 +60,8 @@ | |||
60 | #include <linux/linkage.h> | 60 | #include <linux/linkage.h> |
61 | #include <linux/irqflags.h> | 61 | #include <linux/irqflags.h> |
62 | 62 | ||
63 | #include <asm/outercache.h> | ||
64 | |||
63 | #define __exception __attribute__((section(".exception.text"))) | 65 | #define __exception __attribute__((section(".exception.text"))) |
64 | 66 | ||
65 | struct thread_info; | 67 | struct thread_info; |
@@ -137,10 +139,12 @@ extern unsigned int user_debug; | |||
137 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | 139 | #define dmb() __asm__ __volatile__ ("" : : : "memory") |
138 | #endif | 140 | #endif |
139 | 141 | ||
140 | #if __LINUX_ARM_ARCH__ >= 7 || defined(CONFIG_SMP) | 142 | #ifdef CONFIG_ARCH_HAS_BARRIERS |
141 | #define mb() dmb() | 143 | #include <mach/barriers.h> |
144 | #elif __LINUX_ARM_ARCH__ >= 7 || defined(CONFIG_SMP) | ||
145 | #define mb() do { dsb(); outer_sync(); } while (0) | ||
142 | #define rmb() dmb() | 146 | #define rmb() dmb() |
143 | #define wmb() dmb() | 147 | #define wmb() mb() |
144 | #else | 148 | #else |
145 | #define mb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) | 149 | #define mb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) |
146 | #define rmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) | 150 | #define rmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) |
@@ -152,9 +156,9 @@ extern unsigned int user_debug; | |||
152 | #define smp_rmb() barrier() | 156 | #define smp_rmb() barrier() |
153 | #define smp_wmb() barrier() | 157 | #define smp_wmb() barrier() |
154 | #else | 158 | #else |
155 | #define smp_mb() mb() | 159 | #define smp_mb() dmb() |
156 | #define smp_rmb() rmb() | 160 | #define smp_rmb() dmb() |
157 | #define smp_wmb() wmb() | 161 | #define smp_wmb() dmb() |
158 | #endif | 162 | #endif |
159 | 163 | ||
160 | #define read_barrier_depends() do { } while(0) | 164 | #define read_barrier_depends() do { } while(0) |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index b7cb45bb91e8..3b3d2c80509c 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/ioport.h> | 27 | #include <linux/ioport.h> |
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | #include <linux/irq.h> | 29 | #include <linux/irq.h> |
30 | #include <linux/slab.h> | ||
31 | #include <linux/random.h> | 30 | #include <linux/random.h> |
32 | #include <linux/smp.h> | 31 | #include <linux/smp.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c index 60c62c377fa9..2ba7deb3072e 100644 --- a/arch/arm/kernel/kprobes.c +++ b/arch/arm/kernel/kprobes.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/kprobes.h> | 23 | #include <linux/kprobes.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/stop_machine.h> | 26 | #include <linux/stop_machine.h> |
26 | #include <linux/stringify.h> | 27 | #include <linux/stringify.h> |
27 | #include <asm/traps.h> | 28 | #include <asm/traps.h> |
@@ -393,6 +394,14 @@ void __kprobes jprobe_return(void) | |||
393 | /* | 394 | /* |
394 | * Setup an empty pt_regs. Fill SP and PC fields as | 395 | * Setup an empty pt_regs. Fill SP and PC fields as |
395 | * they're needed by longjmp_break_handler. | 396 | * they're needed by longjmp_break_handler. |
397 | * | ||
398 | * We allocate some slack between the original SP and start of | ||
399 | * our fabricated regs. To be precise we want to have worst case | ||
400 | * covered which is STMFD with all 16 regs so we allocate 2 * | ||
401 | * sizeof(struct_pt_regs)). | ||
402 | * | ||
403 | * This is to prevent any simulated instruction from writing | ||
404 | * over the regs when they are accessing the stack. | ||
396 | */ | 405 | */ |
397 | "sub sp, %0, %1 \n\t" | 406 | "sub sp, %0, %1 \n\t" |
398 | "ldr r0, ="__stringify(JPROBE_MAGIC_ADDR)"\n\t" | 407 | "ldr r0, ="__stringify(JPROBE_MAGIC_ADDR)"\n\t" |
@@ -410,7 +419,7 @@ void __kprobes jprobe_return(void) | |||
410 | "ldmia sp, {r0 - pc} \n\t" | 419 | "ldmia sp, {r0 - pc} \n\t" |
411 | : | 420 | : |
412 | : "r" (kcb->jprobe_saved_regs.ARM_sp), | 421 | : "r" (kcb->jprobe_saved_regs.ARM_sp), |
413 | "I" (sizeof(struct pt_regs)), | 422 | "I" (sizeof(struct pt_regs) * 2), |
414 | "J" (offsetof(struct pt_regs, ARM_sp)), | 423 | "J" (offsetof(struct pt_regs, ARM_sp)), |
415 | "J" (offsetof(struct pt_regs, ARM_pc)), | 424 | "J" (offsetof(struct pt_regs, ARM_pc)), |
416 | "J" (offsetof(struct pt_regs, ARM_cpsr)) | 425 | "J" (offsetof(struct pt_regs, ARM_cpsr)) |
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index f28c5e9c51ea..c628bdf6c430 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -16,9 +16,9 @@ | |||
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/elf.h> | 17 | #include <linux/elf.h> |
18 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
21 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/gfp.h> | ||
22 | 22 | ||
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
24 | #include <asm/sections.h> | 24 | #include <asm/sections.h> |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index ba2adefa53f7..0e12e0acbf26 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/stddef.h> | 17 | #include <linux/stddef.h> |
18 | #include <linux/unistd.h> | 18 | #include <linux/unistd.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/user.h> | 19 | #include <linux/user.h> |
21 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
22 | #include <linux/reboot.h> | 21 | #include <linux/reboot.h> |
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index 4350f75e578c..c23501842b98 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
20 | #include <linux/sem.h> | 19 | #include <linux/sem.h> |
21 | #include <linux/msg.h> | 20 | #include <linux/msg.h> |
@@ -27,6 +26,7 @@ | |||
27 | #include <linux/file.h> | 26 | #include <linux/file.h> |
28 | #include <linux/ipc.h> | 27 | #include <linux/ipc.h> |
29 | #include <linux/uaccess.h> | 28 | #include <linux/uaccess.h> |
29 | #include <linux/slab.h> | ||
30 | 30 | ||
31 | /* Fork a new task - this creates a new program thread. | 31 | /* Fork a new task - this creates a new program thread. |
32 | * This is called indirectly via a small wrapper | 32 | * This is called indirectly via a small wrapper |
diff --git a/arch/arm/lib/memmove.S b/arch/arm/lib/memmove.S index 5025c863713d..938fc14f962d 100644 --- a/arch/arm/lib/memmove.S +++ b/arch/arm/lib/memmove.S | |||
@@ -74,7 +74,7 @@ ENTRY(memmove) | |||
74 | rsb ip, ip, #32 | 74 | rsb ip, ip, #32 |
75 | addne pc, pc, ip @ C is always clear here | 75 | addne pc, pc, ip @ C is always clear here |
76 | b 7f | 76 | b 7f |
77 | 6: nop | 77 | 6: W(nop) |
78 | W(ldr) r3, [r1, #-4]! | 78 | W(ldr) r3, [r1, #-4]! |
79 | W(ldr) r4, [r1, #-4]! | 79 | W(ldr) r4, [r1, #-4]! |
80 | W(ldr) r5, [r1, #-4]! | 80 | W(ldr) r5, [r1, #-4]! |
@@ -85,7 +85,7 @@ ENTRY(memmove) | |||
85 | 85 | ||
86 | add pc, pc, ip | 86 | add pc, pc, ip |
87 | nop | 87 | nop |
88 | nop | 88 | W(nop) |
89 | W(str) r3, [r0, #-4]! | 89 | W(str) r3, [r0, #-4]! |
90 | W(str) r4, [r0, #-4]! | 90 | W(str) r4, [r0, #-4]! |
91 | W(str) r5, [r0, #-4]! | 91 | W(str) r5, [r0, #-4]! |
diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c index 6b967ffb6552..e2d2f2cd0c4f 100644 --- a/arch/arm/lib/uaccess_with_memcpy.c +++ b/arch/arm/lib/uaccess_with_memcpy.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/hardirq.h> /* for in_atomic() */ | 18 | #include <linux/hardirq.h> /* for in_atomic() */ |
19 | #include <linux/gfp.h> | ||
19 | #include <asm/current.h> | 20 | #include <asm/current.h> |
20 | #include <asm/page.h> | 21 | #include <asm/page.h> |
21 | 22 | ||
diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c index b5c5fc6ba3a9..3ef68330452a 100644 --- a/arch/arm/mach-aaec2000/core.c +++ b/arch/arm/mach-aaec2000/core.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/timex.h> | 20 | #include <linux/timex.h> |
21 | #include <linux/signal.h> | 21 | #include <linux/signal.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/gfp.h> | ||
23 | 24 | ||
24 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
25 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
diff --git a/arch/arm/mach-bcmring/dma.c b/arch/arm/mach-bcmring/dma.c index 7b20fccb9d4e..2ccf670ce1ac 100644 --- a/arch/arm/mach-bcmring/dma.c +++ b/arch/arm/mach-bcmring/dma.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | #include <linux/irqreturn.h> | 29 | #include <linux/irqreturn.h> |
30 | #include <linux/proc_fs.h> | 30 | #include <linux/proc_fs.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | #include <mach/timer.h> | 33 | #include <mach/timer.h> |
33 | 34 | ||
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index d15beceb632e..df4ab2105869 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/leds.h> | 22 | #include <linux/leds.h> |
23 | #include <linux/mtd/mtd.h> | 23 | #include <linux/mtd/mtd.h> |
24 | #include <linux/mtd/partitions.h> | 24 | #include <linux/mtd/partitions.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/mtd/nand.h> | 26 | #include <linux/mtd/nand.h> |
26 | #include <linux/input.h> | 27 | #include <linux/input.h> |
27 | #include <linux/spi/spi.h> | 28 | #include <linux/spi/spi.h> |
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index 27772e18e45b..0d6ee583f65c 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -758,7 +758,6 @@ static u8 dm365_default_priorities[DAVINCI_N_AINTC_IRQ] = { | |||
758 | [IRQ_MMCINT] = 7, | 758 | [IRQ_MMCINT] = 7, |
759 | [IRQ_DM365_MMCINT1] = 7, | 759 | [IRQ_DM365_MMCINT1] = 7, |
760 | [IRQ_DM365_PWMINT3] = 7, | 760 | [IRQ_DM365_PWMINT3] = 7, |
761 | [IRQ_DDRINT] = 4, | ||
762 | [IRQ_AEMIFINT] = 2, | 761 | [IRQ_AEMIFINT] = 2, |
763 | [IRQ_DM365_SDIOINT1] = 2, | 762 | [IRQ_DM365_SDIOINT1] = 2, |
764 | [IRQ_TINT0_TINT12] = 7, | 763 | [IRQ_TINT0_TINT12] = 7, |
diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c index 15dd886df04c..53137387aee1 100644 --- a/arch/arm/mach-davinci/dma.c +++ b/arch/arm/mach-davinci/dma.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <mach/edma.h> | 28 | #include <mach/edma.h> |
28 | 29 | ||
@@ -1266,7 +1267,8 @@ int edma_start(unsigned channel) | |||
1266 | /* EDMA channel with event association */ | 1267 | /* EDMA channel with event association */ |
1267 | pr_debug("EDMA: ER%d %08x\n", j, | 1268 | pr_debug("EDMA: ER%d %08x\n", j, |
1268 | edma_shadow0_read_array(ctlr, SH_ER, j)); | 1269 | edma_shadow0_read_array(ctlr, SH_ER, j)); |
1269 | /* Clear any pending error */ | 1270 | /* Clear any pending event or error */ |
1271 | edma_write_array(ctlr, EDMA_ECR, j, mask); | ||
1270 | edma_write_array(ctlr, EDMA_EMCR, j, mask); | 1272 | edma_write_array(ctlr, EDMA_EMCR, j, mask); |
1271 | /* Clear any SER */ | 1273 | /* Clear any SER */ |
1272 | edma_shadow0_write_array(ctlr, SH_SECR, j, mask); | 1274 | edma_shadow0_write_array(ctlr, SH_SECR, j, mask); |
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index cc9be7fee627..03acfd39042b 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Author: Mark A. Greer <mgreer@mvista.com> | 4 | * Author: Mark A. Greer <mgreer@mvista.com> |
5 | * | 5 | * |
6 | * 2007, 2009 (c) MontaVista Software, Inc. This file is licensed under | 6 | * 2007, 2009-2010 (c) MontaVista Software, Inc. This file is licensed under |
7 | * the terms of the GNU General Public License version 2. This program | 7 | * the terms of the GNU General Public License version 2. This program |
8 | * is licensed "as is" without any warranty of any kind, whether express | 8 | * is licensed "as is" without any warranty of any kind, whether express |
9 | * or implied. | 9 | * or implied. |
@@ -13,7 +13,9 @@ | |||
13 | 13 | ||
14 | #include <video/da8xx-fb.h> | 14 | #include <video/da8xx-fb.h> |
15 | 15 | ||
16 | #include <linux/platform_device.h> | ||
16 | #include <linux/davinci_emac.h> | 17 | #include <linux/davinci_emac.h> |
18 | |||
17 | #include <mach/serial.h> | 19 | #include <mach/serial.h> |
18 | #include <mach/edma.h> | 20 | #include <mach/edma.h> |
19 | #include <mach/i2c.h> | 21 | #include <mach/i2c.h> |
@@ -144,6 +146,10 @@ extern const short da850_mmcsd0_pins[]; | |||
144 | extern const short da850_nand_pins[]; | 146 | extern const short da850_nand_pins[]; |
145 | extern const short da850_nor_pins[]; | 147 | extern const short da850_nor_pins[]; |
146 | 148 | ||
149 | #ifdef CONFIG_DAVINCI_MUX | ||
147 | int da8xx_pinmux_setup(const short pins[]); | 150 | int da8xx_pinmux_setup(const short pins[]); |
151 | #else | ||
152 | static inline int da8xx_pinmux_setup(const short pins[]) { return 0; } | ||
153 | #endif | ||
148 | 154 | ||
149 | #endif /* __ASM_ARCH_DAVINCI_DA8XX_H */ | 155 | #endif /* __ASM_ARCH_DAVINCI_DA8XX_H */ |
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c index 42d985beece5..9e0b106b4f5f 100644 --- a/arch/arm/mach-davinci/time.c +++ b/arch/arm/mach-davinci/time.c | |||
@@ -253,8 +253,6 @@ static void __init timer_init(void) | |||
253 | irq = USING_COMPARE(t) ? dtip[i].cmp_irq : irq; | 253 | irq = USING_COMPARE(t) ? dtip[i].cmp_irq : irq; |
254 | setup_irq(irq, &t->irqaction); | 254 | setup_irq(irq, &t->irqaction); |
255 | } | 255 | } |
256 | |||
257 | timer32_config(&timers[i]); | ||
258 | } | 256 | } |
259 | } | 257 | } |
260 | 258 | ||
@@ -331,6 +329,7 @@ static void __init davinci_timer_init(void) | |||
331 | unsigned int clocksource_id; | 329 | unsigned int clocksource_id; |
332 | static char err[] __initdata = KERN_ERR | 330 | static char err[] __initdata = KERN_ERR |
333 | "%s: can't register clocksource!\n"; | 331 | "%s: can't register clocksource!\n"; |
332 | int i; | ||
334 | 333 | ||
335 | clockevent_id = soc_info->timer_info->clockevent_id; | 334 | clockevent_id = soc_info->timer_info->clockevent_id; |
336 | clocksource_id = soc_info->timer_info->clocksource_id; | 335 | clocksource_id = soc_info->timer_info->clocksource_id; |
@@ -389,6 +388,9 @@ static void __init davinci_timer_init(void) | |||
389 | 388 | ||
390 | clockevent_davinci.cpumask = cpumask_of(0); | 389 | clockevent_davinci.cpumask = cpumask_of(0); |
391 | clockevents_register_device(&clockevent_davinci); | 390 | clockevents_register_device(&clockevent_davinci); |
391 | |||
392 | for (i=0; i< ARRAY_SIZE(timers); i++) | ||
393 | timer32_config(&timers[i]); | ||
392 | } | 394 | } |
393 | 395 | ||
394 | struct sys_timer davinci_timer = { | 396 | struct sys_timer davinci_timer = { |
diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c index 7a2614828217..bdb3f6706801 100644 --- a/arch/arm/mach-h720x/common.c +++ b/arch/arm/mach-h720x/common.c | |||
@@ -14,7 +14,6 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/mman.h> | 17 | #include <linux/mman.h> |
19 | #include <linux/init.h> | 18 | #include <linux/init.h> |
20 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
diff --git a/arch/arm/mach-integrator/cpu.c b/arch/arm/mach-integrator/cpu.c index 44d4c2e8207b..f77f20255045 100644 --- a/arch/arm/mach-integrator/cpu.c +++ b/arch/arm/mach-integrator/cpu.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/cpufreq.h> | 15 | #include <linux/cpufreq.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
18 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
19 | #include <linux/init.h> | 18 | #include <linux/init.h> |
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 0058c937719e..41b10725cef7 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/amba/bus.h> | 21 | #include <linux/amba/bus.h> |
22 | #include <linux/amba/clcd.h> | 22 | #include <linux/amba/clcd.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <asm/clkdev.h> | 26 | #include <asm/clkdev.h> |
26 | #include <mach/clkdev.h> | 27 | #include <mach/clkdev.h> |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 66ef86d6d9e3..15e6cc5a352f 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/dma-mapping.h> | 15 | #include <linux/dma-mapping.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/string.h> | 16 | #include <linux/string.h> |
18 | #include <linux/sysdev.h> | 17 | #include <linux/sysdev.h> |
19 | #include <linux/amba/bus.h> | 18 | #include <linux/amba/bus.h> |
@@ -21,6 +20,7 @@ | |||
21 | #include <linux/amba/clcd.h> | 20 | #include <linux/amba/clcd.h> |
22 | #include <linux/amba/mmci.h> | 21 | #include <linux/amba/mmci.h> |
23 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/gfp.h> | ||
24 | 24 | ||
25 | #include <asm/clkdev.h> | 25 | #include <asm/clkdev.h> |
26 | #include <mach/clkdev.h> | 26 | #include <mach/clkdev.h> |
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 148d25fc636f..ffbd349363af 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -22,7 +22,6 @@ | |||
22 | */ | 22 | */ |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/slab.h> | ||
26 | #include <linux/ioport.h> | 25 | #include <linux/ioport.h> |
27 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
28 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index 4873f26a42e1..6d5a90813d31 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
22 | #include <linux/jiffies.h> | 23 | #include <linux/jiffies.h> |
23 | #include <asm/irq.h> | 24 | #include <asm/irq.h> |
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c index 93370a46b620..10384fc37cb2 100644 --- a/arch/arm/mach-iop32x/glantank.c +++ b/arch/arm/mach-iop32x/glantank.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | #include <linux/pm.h> | 20 | #include <linux/pm.h> |
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
24 | #include <linux/serial_8250.h> | 23 | #include <linux/serial_8250.h> |
25 | #include <linux/mtd/physmap.h> | 24 | #include <linux/mtd/physmap.h> |
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c index a7a08dda7f33..d6ac85ff109d 100644 --- a/arch/arm/mach-iop32x/iq31244.c +++ b/arch/arm/mach-iop32x/iq31244.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/pm.h> | 22 | #include <linux/pm.h> |
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/serial_core.h> | 24 | #include <linux/serial_core.h> |
26 | #include <linux/serial_8250.h> | 25 | #include <linux/serial_8250.h> |
27 | #include <linux/mtd/physmap.h> | 26 | #include <linux/mtd/physmap.h> |
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c index 0200f80c1e17..c6a0e4ee9d91 100644 --- a/arch/arm/mach-iop32x/iq80321.c +++ b/arch/arm/mach-iop32x/iq80321.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/slab.h> | ||
22 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
23 | #include <linux/serial_8250.h> | 22 | #include <linux/serial_8250.h> |
24 | #include <linux/mtd/physmap.h> | 23 | #include <linux/mtd/physmap.h> |
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index 2a5c637639bb..5d99039286eb 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/pm.h> | 24 | #include <linux/pm.h> |
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/serial_core.h> | 26 | #include <linux/serial_core.h> |
28 | #include <linux/serial_8250.h> | 27 | #include <linux/serial_8250.h> |
29 | #include <linux/mtd/physmap.h> | 28 | #include <linux/mtd/physmap.h> |
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c index 394e95a30b75..c6ff5523b380 100644 --- a/arch/arm/mach-iop33x/iq80331.c +++ b/arch/arm/mach-iop33x/iq80331.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/string.h> | 19 | #include <linux/string.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
22 | #include <linux/serial_8250.h> | 21 | #include <linux/serial_8250.h> |
23 | #include <linux/mtd/physmap.h> | 22 | #include <linux/mtd/physmap.h> |
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c index a40badf126c2..fbf551409394 100644 --- a/arch/arm/mach-iop33x/iq80332.c +++ b/arch/arm/mach-iop33x/iq80332.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/string.h> | 19 | #include <linux/string.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
22 | #include <linux/serial_8250.h> | 21 | #include <linux/serial_8250.h> |
23 | #include <linux/mtd/physmap.h> | 22 | #include <linux/mtd/physmap.h> |
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c index c84dfac13882..1a557e0d055b 100644 --- a/arch/arm/mach-ixp2000/enp2611.c +++ b/arch/arm/mach-ixp2000/enp2611.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/bitops.h> | 26 | #include <linux/bitops.h> |
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/ioport.h> | 28 | #include <linux/ioport.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
31 | #include <linux/serial.h> | 30 | #include <linux/serial.h> |
32 | #include <linux/tty.h> | 31 | #include <linux/tty.h> |
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c index 4467c4224d73..55e5c69352ad 100644 --- a/arch/arm/mach-ixp2000/ixdp2400.c +++ b/arch/arm/mach-ixp2000/ixdp2400.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/bitops.h> | 23 | #include <linux/bitops.h> |
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/ioport.h> | 25 | #include <linux/ioport.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
28 | #include <linux/io.h> | 27 | #include <linux/io.h> |
29 | 28 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c index 94f68ba9ea50..237b61a85e9a 100644 --- a/arch/arm/mach-ixp2000/ixdp2800.c +++ b/arch/arm/mach-ixp2000/ixdp2800.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/bitops.h> | 23 | #include <linux/bitops.h> |
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/ioport.h> | 25 | #include <linux/ioport.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
28 | #include <linux/io.h> | 27 | #include <linux/io.h> |
29 | 28 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c index 30451300751b..91fffb9b2084 100644 --- a/arch/arm/mach-ixp2000/ixdp2x00.c +++ b/arch/arm/mach-ixp2000/ixdp2x00.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/bitops.h> | 23 | #include <linux/bitops.h> |
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/ioport.h> | 25 | #include <linux/ioport.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
28 | #include <linux/io.h> | 27 | #include <linux/io.h> |
29 | 28 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c index 4a12327a09a3..0369ec4242a6 100644 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/arch/arm/mach-ixp2000/ixdp2x01.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/bitops.h> | 23 | #include <linux/bitops.h> |
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/ioport.h> | 25 | #include <linux/ioport.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
28 | #include <linux/serial.h> | 27 | #include <linux/serial.h> |
29 | #include <linux/tty.h> | 28 | #include <linux/tty.h> |
diff --git a/arch/arm/mach-ixp2000/pci.c b/arch/arm/mach-ixp2000/pci.c index 60e9fd08ab80..90771cad06f8 100644 --- a/arch/arm/mach-ixp2000/pci.c +++ b/arch/arm/mach-ixp2000/pci.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/ioport.h> | 24 | #include <linux/ioport.h> |
25 | #include <linux/slab.h> | ||
26 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
27 | #include <linux/io.h> | 26 | #include <linux/io.h> |
28 | 27 | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h index 94a3a86cfeb8..6ef65d813f16 100644 --- a/arch/arm/mach-ixp23xx/include/mach/memory.h +++ b/arch/arm/mach-ixp23xx/include/mach/memory.h | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | #define PHYS_OFFSET (0x00000000) | 20 | #define PHYS_OFFSET (0x00000000) |
21 | 21 | ||
22 | #define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)) | 22 | #define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0) |
23 | 23 | ||
24 | #define __phys_to_bus(x) ((x) + (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) | 24 | #define __phys_to_bus(x) ((x) + (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) |
25 | #define __bus_to_phys(x) ((x) - (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) | 25 | #define __bus_to_phys(x) ((x) - (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) |
diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c index 59022becb134..4b0e598a91c9 100644 --- a/arch/arm/mach-ixp23xx/pci.c +++ b/arch/arm/mach-ixp23xx/pci.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/ioport.h> | 25 | #include <linux/ioport.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
28 | #include <linux/io.h> | 27 | #include <linux/io.h> |
29 | 28 | ||
diff --git a/arch/arm/mach-ixp4xx/avila-setup.c b/arch/arm/mach-ixp4xx/avila-setup.c index 6e558a76457d..d8bc86d76f1d 100644 --- a/arch/arm/mach-ixp4xx/avila-setup.c +++ b/arch/arm/mach-ixp4xx/avila-setup.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/serial.h> | 17 | #include <linux/serial.h> |
18 | #include <linux/tty.h> | 18 | #include <linux/tty.h> |
19 | #include <linux/serial_8250.h> | 19 | #include <linux/serial_8250.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/i2c-gpio.h> | 20 | #include <linux/i2c-gpio.h> |
22 | #include <asm/types.h> | 21 | #include <asm/types.h> |
23 | #include <asm/setup.h> | 22 | #include <asm/setup.h> |
diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c index 25bf5ad770ea..31a47f6a8939 100644 --- a/arch/arm/mach-ixp4xx/coyote-setup.c +++ b/arch/arm/mach-ixp4xx/coyote-setup.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/serial.h> | 14 | #include <linux/serial.h> |
15 | #include <linux/tty.h> | 15 | #include <linux/tty.h> |
16 | #include <linux/serial_8250.h> | 16 | #include <linux/serial_8250.h> |
17 | #include <linux/slab.h> | ||
18 | 17 | ||
19 | #include <asm/types.h> | 18 | #include <asm/types.h> |
20 | #include <asm/setup.h> | 19 | #include <asm/setup.h> |
diff --git a/arch/arm/mach-ixp4xx/gateway7001-setup.c b/arch/arm/mach-ixp4xx/gateway7001-setup.c index 59b73a0ddfa9..2583b2a13174 100644 --- a/arch/arm/mach-ixp4xx/gateway7001-setup.c +++ b/arch/arm/mach-ixp4xx/gateway7001-setup.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/serial.h> | 17 | #include <linux/serial.h> |
18 | #include <linux/tty.h> | 18 | #include <linux/tty.h> |
19 | #include <linux/serial_8250.h> | 19 | #include <linux/serial_8250.h> |
20 | #include <linux/slab.h> | ||
21 | 20 | ||
22 | #include <asm/types.h> | 21 | #include <asm/types.h> |
23 | #include <asm/setup.h> | 22 | #include <asm/setup.h> |
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/arch/arm/mach-ixp4xx/gtwx5715-setup.c index 0bc7185cb6f7..c67586b79400 100644 --- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c +++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/serial.h> | 27 | #include <linux/serial.h> |
28 | #include <linux/tty.h> | 28 | #include <linux/tty.h> |
29 | #include <linux/serial_8250.h> | 29 | #include <linux/serial_8250.h> |
30 | #include <linux/slab.h> | ||
31 | #include <asm/types.h> | 30 | #include <asm/types.h> |
32 | #include <asm/setup.h> | 31 | #include <asm/setup.h> |
33 | #include <asm/memory.h> | 32 | #include <asm/memory.h> |
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c index bbb768988845..827cbc4402f4 100644 --- a/arch/arm/mach-ixp4xx/ixdp425-setup.c +++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/serial.h> | 14 | #include <linux/serial.h> |
15 | #include <linux/tty.h> | 15 | #include <linux/tty.h> |
16 | #include <linux/serial_8250.h> | 16 | #include <linux/serial_8250.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/i2c-gpio.h> | 17 | #include <linux/i2c-gpio.h> |
19 | #include <linux/io.h> | 18 | #include <linux/io.h> |
20 | #include <linux/mtd/mtd.h> | 19 | #include <linux/mtd/mtd.h> |
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_npe.c b/arch/arm/mach-ixp4xx/ixp4xx_npe.c index e8bb25778166..a17ed79207a4 100644 --- a/arch/arm/mach-ixp4xx/ixp4xx_npe.c +++ b/arch/arm/mach-ixp4xx/ixp4xx_npe.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/slab.h> | ||
24 | #include <mach/npe.h> | 23 | #include <mach/npe.h> |
25 | 24 | ||
26 | #define DEBUG_MSG 0 | 25 | #define DEBUG_MSG 0 |
diff --git a/arch/arm/mach-ixp4xx/wg302v2-setup.c b/arch/arm/mach-ixp4xx/wg302v2-setup.c index 7ea782021d1f..4dd74863daa9 100644 --- a/arch/arm/mach-ixp4xx/wg302v2-setup.c +++ b/arch/arm/mach-ixp4xx/wg302v2-setup.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/serial.h> | 18 | #include <linux/serial.h> |
19 | #include <linux/tty.h> | 19 | #include <linux/tty.h> |
20 | #include <linux/serial_8250.h> | 20 | #include <linux/serial_8250.h> |
21 | #include <linux/slab.h> | ||
22 | 21 | ||
23 | #include <asm/types.h> | 22 | #include <asm/types.h> |
24 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c index 0358f45766cb..5e6f711b1c67 100644 --- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +++ b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c | |||
@@ -74,9 +74,9 @@ static struct gpio_keys_button mv88f6281gtw_ge_button_pins[] = { | |||
74 | .desc = "SWR Button", | 74 | .desc = "SWR Button", |
75 | .active_low = 1, | 75 | .active_low = 1, |
76 | }, { | 76 | }, { |
77 | .code = KEY_F1, | 77 | .code = KEY_WPS_BUTTON, |
78 | .gpio = 46, | 78 | .gpio = 46, |
79 | .desc = "WPS Button(F1)", | 79 | .desc = "WPS Button", |
80 | .active_low = 1, | 80 | .active_low = 1, |
81 | }, | 81 | }, |
82 | }; | 82 | }; |
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index a604b2a701aa..dee1eff50d39 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/mbus.h> | 14 | #include <linux/mbus.h> |
14 | #include <asm/irq.h> | 15 | #include <asm/irq.h> |
15 | #include <asm/mach/pci.h> | 16 | #include <asm/mach/pci.h> |
diff --git a/arch/arm/mach-lh7a40x/clcd.c b/arch/arm/mach-lh7a40x/clcd.c index c472b9e8b37c..7fe4fd347c82 100644 --- a/arch/arm/mach-lh7a40x/clcd.c +++ b/arch/arm/mach-lh7a40x/clcd.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/gfp.h> | ||
13 | #include <linux/device.h> | 14 | #include <linux/device.h> |
14 | #include <linux/dma-mapping.h> | 15 | #include <linux/dma-mapping.h> |
15 | #include <linux/sysdev.h> | 16 | #include <linux/sysdev.h> |
diff --git a/arch/arm/mach-mmp/include/mach/uncompress.h b/arch/arm/mach-mmp/include/mach/uncompress.h index a7dcc5307216..85bd8a2d84b5 100644 --- a/arch/arm/mach-mmp/include/mach/uncompress.h +++ b/arch/arm/mach-mmp/include/mach/uncompress.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #define UART2_BASE (APB_PHYS_BASE + 0x17000) | 14 | #define UART2_BASE (APB_PHYS_BASE + 0x17000) |
15 | #define UART3_BASE (APB_PHYS_BASE + 0x18000) | 15 | #define UART3_BASE (APB_PHYS_BASE + 0x18000) |
16 | 16 | ||
17 | static volatile unsigned long *UART = (unsigned long *)UART2_BASE; | 17 | static volatile unsigned long *UART; |
18 | 18 | ||
19 | static inline void putc(char c) | 19 | static inline void putc(char c) |
20 | { | 20 | { |
@@ -37,6 +37,9 @@ static inline void flush(void) | |||
37 | 37 | ||
38 | static inline void arch_decomp_setup(void) | 38 | static inline void arch_decomp_setup(void) |
39 | { | 39 | { |
40 | /* default to UART2 */ | ||
41 | UART = (unsigned long *)UART2_BASE; | ||
42 | |||
40 | if (machine_is_avengers_lite()) | 43 | if (machine_is_avengers_lite()) |
41 | UART = (unsigned long *)UART3_BASE; | 44 | UART = (unsigned long *)UART3_BASE; |
42 | } | 45 | } |
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c index a7dc5191bf5e..fccb9207b78d 100644 --- a/arch/arm/mach-mx3/mach-mx31moboard.c +++ b/arch/arm/mach-mx3/mach-mx31moboard.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/dma-mapping.h> | 20 | #include <linux/dma-mapping.h> |
21 | #include <linux/fsl_devices.h> | 21 | #include <linux/fsl_devices.h> |
22 | #include <linux/gfp.h> | ||
22 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c index 11f531559169..034ec8190065 100644 --- a/arch/arm/mach-mx3/mach-pcm037.c +++ b/arch/arm/mach-mx3/mach-pcm037.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/usb/otg.h> | 36 | #include <linux/usb/otg.h> |
37 | #include <linux/usb/ulpi.h> | 37 | #include <linux/usb/ulpi.h> |
38 | #include <linux/fsl_devices.h> | 38 | #include <linux/fsl_devices.h> |
39 | #include <linux/gfp.h> | ||
39 | 40 | ||
40 | #include <media/soc_camera.h> | 41 | #include <media/soc_camera.h> |
41 | 42 | ||
diff --git a/arch/arm/mach-mx3/mx31moboard-devboard.c b/arch/arm/mach-mx3/mx31moboard-devboard.c index 9fbad2eb3a49..11b906ce7eae 100644 --- a/arch/arm/mach-mx3/mx31moboard-devboard.c +++ b/arch/arm/mach-mx3/mx31moboard-devboard.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/types.h> | 24 | #include <linux/types.h> |
24 | 25 | ||
25 | #include <linux/usb/otg.h> | 26 | #include <linux/usb/otg.h> |
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c index 3958515d75bf..ffb105e14d88 100644 --- a/arch/arm/mach-mx3/mx31moboard-marxbot.c +++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
24 | #include <linux/spi/spi.h> | 24 | #include <linux/spi/spi.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
26 | #include <linux/types.h> | 27 | #include <linux/types.h> |
27 | 28 | ||
diff --git a/arch/arm/mach-netx/fb.c b/arch/arm/mach-netx/fb.c index 1d844e228ea9..5b84bcd30271 100644 --- a/arch/arm/mach-netx/fb.c +++ b/arch/arm/mach-netx/fb.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/amba/bus.h> | 23 | #include <linux/amba/bus.h> |
24 | #include <linux/amba/clcd.h> | 24 | #include <linux/amba/clcd.h> |
25 | #include <linux/err.h> | 25 | #include <linux/err.h> |
26 | #include <linux/gfp.h> | ||
26 | 27 | ||
27 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
28 | 29 | ||
diff --git a/arch/arm/mach-netx/xc.c b/arch/arm/mach-netx/xc.c index 181a78ba8165..f009b54e8d20 100644 --- a/arch/arm/mach-netx/xc.c +++ b/arch/arm/mach-netx/xc.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/firmware.h> | 22 | #include <linux/firmware.h> |
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/io.h> | 25 | #include <linux/io.h> |
25 | 26 | ||
26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-nomadik/gpio.c b/arch/arm/mach-nomadik/gpio.c index 9a09b2791e03..66b1c91ccc74 100644 --- a/arch/arm/mach-nomadik/gpio.c +++ b/arch/arm/mach-nomadik/gpio.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | #include <mach/gpio.h> | 25 | #include <mach/gpio.h> |
diff --git a/arch/arm/mach-ns9xxx/plat-serial8250.c b/arch/arm/mach-ns9xxx/plat-serial8250.c index 795b15e8982a..463e92465fda 100644 --- a/arch/arm/mach-ns9xxx/plat-serial8250.c +++ b/arch/arm/mach-ns9xxx/plat-serial8250.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <linux/serial_8250.h> | 12 | #include <linux/serial_8250.h> |
13 | #include <linux/slab.h> | ||
13 | 14 | ||
14 | #include <mach/regs-board-a9m9750dev.h> | 15 | #include <mach/regs-board-a9m9750dev.h> |
15 | #include <mach/board.h> | 16 | #include <mach/board.h> |
diff --git a/arch/arm/mach-ns9xxx/processor-ns9360.c b/arch/arm/mach-ns9xxx/processor-ns9360.c index abee8338735d..aed1999d24fc 100644 --- a/arch/arm/mach-ns9xxx/processor-ns9360.c +++ b/arch/arm/mach-ns9xxx/processor-ns9360.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/io.h> | 11 | #include <linux/io.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
14 | 13 | ||
15 | #include <asm/page.h> | 14 | #include <asm/page.h> |
16 | #include <asm/mach/map.h> | 15 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c index f9a5cf750b59..e9bdff192f82 100644 --- a/arch/arm/mach-omap1/mcbsp.c +++ b/arch/arm/mach-omap1/mcbsp.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include <mach/irqs.h> | 21 | #include <mach/irqs.h> |
21 | #include <plat/dma.h> | 22 | #include <plat/dma.h> |
diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c index 3b1eac4d5390..e60ca4e47bbd 100644 --- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/clk.h> | 31 | #include <linux/clk.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/cpufreq.h> | 33 | #include <linux/cpufreq.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include <plat/clock.h> | 36 | #include <plat/clock.h> |
36 | #include <plat/sram.h> | 37 | #include <plat/sram.h> |
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index 6f4b7cc8f4d1..4f63dc6859a4 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/jiffies.h> | 16 | #include <linux/jiffies.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/stringify.h> | 19 | #include <linux/stringify.h> |
19 | 20 | ||
20 | #include <plat/iommu.h> | 21 | #include <plat/iommu.h> |
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index be8fce395a58..2f3cad6f9402 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include <mach/irqs.h> | 21 | #include <mach/irqs.h> |
21 | #include <plat/dma.h> | 22 | #include <plat/dma.h> |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index b4ca84ee0a95..8b3d26935a39 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
30 | #include <linux/list.h> | 31 | #include <linux/list.h> |
31 | #include <linux/ctype.h> | 32 | #include <linux/ctype.h> |
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index c18f7f2f19bc..6cac9817c243 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/err.h> | 25 | #include <linux/err.h> |
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include <plat/clock.h> | 30 | #include <plat/clock.h> |
30 | #include <plat/board.h> | 31 | #include <plat/board.h> |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index fee2efb172e7..ea0000bc5358 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <plat/sram.h> | 32 | #include <plat/sram.h> |
32 | #include <plat/clockdomain.h> | 33 | #include <plat/clockdomain.h> |
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index bdf96eb523bc..e8706f15a670 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/mbus.h> | 16 | #include <linux/mbus.h> |
16 | #include <asm/irq.h> | 17 | #include <asm/irq.h> |
17 | #include <asm/mach/pci.h> | 18 | #include <asm/mach/pci.h> |
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index cb0feca193d4..f9f222ebb7ed 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c | |||
@@ -77,7 +77,7 @@ static struct gpio_keys_button wrt350n_v2_buttons[] = { | |||
77 | .desc = "Reset Button", | 77 | .desc = "Reset Button", |
78 | .active_low = 1, | 78 | .active_low = 1, |
79 | }, { | 79 | }, { |
80 | .code = KEY_WLAN, | 80 | .code = KEY_WPS_BUTTON, |
81 | .gpio = 2, | 81 | .gpio = 2, |
82 | .desc = "WPS Button", | 82 | .desc = "WPS Button", |
83 | .active_low = 1, | 83 | .active_low = 1, |
diff --git a/arch/arm/mach-pnx4008/dma.c b/arch/arm/mach-pnx4008/dma.c index 425f7188505e..7fa4bf2e2125 100644 --- a/arch/arm/mach-pnx4008/dma.c +++ b/arch/arm/mach-pnx4008/dma.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/dma-mapping.h> | 22 | #include <linux/dma-mapping.h> |
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/gfp.h> | ||
25 | 26 | ||
26 | #include <asm/system.h> | 27 | #include <asm/system.h> |
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-pnx4008/pm.c b/arch/arm/mach-pnx4008/pm.c index 1f0585329be4..ee3c29c57ae3 100644 --- a/arch/arm/mach-pnx4008/pm.c +++ b/arch/arm/mach-pnx4008/pm.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <asm/cacheflush.h> | 24 | #include <asm/cacheflush.h> |
24 | 25 | ||
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 38fbd0a0e402..5b6ee46fa7f6 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -272,7 +272,6 @@ config MACH_H5000 | |||
272 | config MACH_HIMALAYA | 272 | config MACH_HIMALAYA |
273 | bool "HTC Himalaya Support" | 273 | bool "HTC Himalaya Support" |
274 | select CPU_PXA26x | 274 | select CPU_PXA26x |
275 | select FB_W100 | ||
276 | 275 | ||
277 | config MACH_MAGICIAN | 276 | config MACH_MAGICIAN |
278 | bool "Enable HTC Magician Support" | 277 | bool "Enable HTC Magician Support" |
@@ -454,6 +453,13 @@ config PXA_SHARPSL | |||
454 | config SHARPSL_PM | 453 | config SHARPSL_PM |
455 | bool | 454 | bool |
456 | select APM_EMULATION | 455 | select APM_EMULATION |
456 | select SHARPSL_PM_MAX1111 | ||
457 | |||
458 | config SHARPSL_PM_MAX1111 | ||
459 | bool | ||
460 | depends on !CORGI_SSP_DEPRECATED | ||
461 | select HWMON | ||
462 | select SENSORS_MAX1111 | ||
457 | 463 | ||
458 | config CORGI_SSP_DEPRECATED | 464 | config CORGI_SSP_DEPRECATED |
459 | bool | 465 | bool |
@@ -547,7 +553,6 @@ config MACH_E740 | |||
547 | bool "Toshiba e740" | 553 | bool "Toshiba e740" |
548 | default y | 554 | default y |
549 | depends on ARCH_PXA_ESERIES | 555 | depends on ARCH_PXA_ESERIES |
550 | select FB_W100 | ||
551 | help | 556 | help |
552 | Say Y here if you intend to run this kernel on a Toshiba | 557 | Say Y here if you intend to run this kernel on a Toshiba |
553 | e740 family PDA. | 558 | e740 family PDA. |
@@ -556,7 +561,6 @@ config MACH_E750 | |||
556 | bool "Toshiba e750" | 561 | bool "Toshiba e750" |
557 | default y | 562 | default y |
558 | depends on ARCH_PXA_ESERIES | 563 | depends on ARCH_PXA_ESERIES |
559 | select FB_W100 | ||
560 | help | 564 | help |
561 | Say Y here if you intend to run this kernel on a Toshiba | 565 | Say Y here if you intend to run this kernel on a Toshiba |
562 | e750 family PDA. | 566 | e750 family PDA. |
@@ -573,7 +577,6 @@ config MACH_E800 | |||
573 | bool "Toshiba e800" | 577 | bool "Toshiba e800" |
574 | default y | 578 | default y |
575 | depends on ARCH_PXA_ESERIES | 579 | depends on ARCH_PXA_ESERIES |
576 | select FB_W100 | ||
577 | help | 580 | help |
578 | Say Y here if you intend to run this kernel on a Toshiba | 581 | Say Y here if you intend to run this kernel on a Toshiba |
579 | e800 family PDA. | 582 | e800 family PDA. |
diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c index 1d9bc118ee32..9347254f8bcf 100644 --- a/arch/arm/mach-pxa/corgi_ssp.c +++ b/arch/arm/mach-pxa/corgi_ssp.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
18 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
19 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-pxa/cpufreq-pxa3xx.c b/arch/arm/mach-pxa/cpufreq-pxa3xx.c index 149cdd9aee4d..27fa329d9a8b 100644 --- a/arch/arm/mach-pxa/cpufreq-pxa3xx.c +++ b/arch/arm/mach-pxa/cpufreq-pxa3xx.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/cpufreq.h> | 16 | #include <linux/cpufreq.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include <mach/pxa3xx-regs.h> | 19 | #include <mach/pxa3xx-regs.h> |
19 | 20 | ||
diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c index b2f878bd460b..5161dca8ccc0 100644 --- a/arch/arm/mach-pxa/imote2.c +++ b/arch/arm/mach-pxa/imote2.c | |||
@@ -559,10 +559,6 @@ static void __init imote2_init(void) | |||
559 | pxa_set_btuart_info(NULL); | 559 | pxa_set_btuart_info(NULL); |
560 | pxa_set_stuart_info(NULL); | 560 | pxa_set_stuart_info(NULL); |
561 | 561 | ||
562 | /* SPI chip select directions - all other directions should | ||
563 | * be handled by drivers.*/ | ||
564 | gpio_direction_output(37, 0); | ||
565 | |||
566 | platform_add_devices(imote2_devices, ARRAY_SIZE(imote2_devices)); | 562 | platform_add_devices(imote2_devices, ARRAY_SIZE(imote2_devices)); |
567 | 563 | ||
568 | pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); | 564 | pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); |
diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h index 5ef91d9d17e4..759b851ec985 100644 --- a/arch/arm/mach-pxa/include/mach/uncompress.h +++ b/arch/arm/mach-pxa/include/mach/uncompress.h | |||
@@ -16,9 +16,9 @@ | |||
16 | #define BTUART_BASE (0x40200000) | 16 | #define BTUART_BASE (0x40200000) |
17 | #define STUART_BASE (0x40700000) | 17 | #define STUART_BASE (0x40700000) |
18 | 18 | ||
19 | static unsigned long uart_base = FFUART_BASE; | 19 | static unsigned long uart_base; |
20 | static unsigned int uart_shift = 2; | 20 | static unsigned int uart_shift; |
21 | static unsigned int uart_is_pxa = 1; | 21 | static unsigned int uart_is_pxa; |
22 | 22 | ||
23 | static inline unsigned char uart_read(int offset) | 23 | static inline unsigned char uart_read(int offset) |
24 | { | 24 | { |
@@ -56,6 +56,11 @@ static inline void flush(void) | |||
56 | 56 | ||
57 | static inline void arch_decomp_setup(void) | 57 | static inline void arch_decomp_setup(void) |
58 | { | 58 | { |
59 | /* initialize to default */ | ||
60 | uart_base = FFUART_BASE; | ||
61 | uart_shift = 2; | ||
62 | uart_is_pxa = 1; | ||
63 | |||
59 | if (machine_is_littleton() || machine_is_intelmote2() | 64 | if (machine_is_littleton() || machine_is_intelmote2() |
60 | || machine_is_csb726() || machine_is_stargate2() | 65 | || machine_is_csb726() || machine_is_stargate2() |
61 | || machine_is_cm_x300() || machine_is_balloon3()) | 66 | || machine_is_cm_x300() || machine_is_balloon3()) |
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index 843fcca76e26..7a50ed8fce94 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/mtd/physmap.h> | 38 | #include <linux/mtd/physmap.h> |
39 | #include <linux/usb/gpio_vbus.h> | 39 | #include <linux/usb/gpio_vbus.h> |
40 | #include <linux/regulator/max1586.h> | 40 | #include <linux/regulator/max1586.h> |
41 | #include <linux/slab.h> | ||
41 | 42 | ||
42 | #include <asm/mach-types.h> | 43 | #include <asm/mach-types.h> |
43 | #include <asm/mach/arch.h> | 44 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c index 7693355ee637..166c15f62916 100644 --- a/arch/arm/mach-pxa/pm.c +++ b/arch/arm/mach-pxa/pm.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/suspend.h> | 15 | #include <linux/suspend.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include <mach/pm.h> | 19 | #include <mach/pm.h> |
19 | 20 | ||
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 3184bdc14526..44bb675e47f1 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c | |||
@@ -37,8 +37,6 @@ | |||
37 | #include <linux/lis3lv02d.h> | 37 | #include <linux/lis3lv02d.h> |
38 | #include <linux/pda_power.h> | 38 | #include <linux/pda_power.h> |
39 | #include <linux/power_supply.h> | 39 | #include <linux/power_supply.h> |
40 | #include <linux/pda_power.h> | ||
41 | #include <linux/power_supply.h> | ||
42 | #include <linux/regulator/max8660.h> | 40 | #include <linux/regulator/max8660.h> |
43 | #include <linux/regulator/machine.h> | 41 | #include <linux/regulator/machine.h> |
44 | #include <linux/regulator/fixed.h> | 42 | #include <linux/regulator/fixed.h> |
@@ -444,7 +442,7 @@ static struct gpio_keys_button gpio_keys_button[] = { | |||
444 | .active_low = 0, | 442 | .active_low = 0, |
445 | .wakeup = 0, | 443 | .wakeup = 0, |
446 | .debounce_interval = 5, /* ms */ | 444 | .debounce_interval = 5, /* ms */ |
447 | .desc = "on/off button", | 445 | .desc = "on_off button", |
448 | }, | 446 | }, |
449 | }; | 447 | }; |
450 | 448 | ||
diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c index a98a434f0111..2041eb1d90ba 100644 --- a/arch/arm/mach-pxa/stargate2.c +++ b/arch/arm/mach-pxa/stargate2.c | |||
@@ -764,11 +764,6 @@ static void __init stargate2_init(void) | |||
764 | pxa_set_btuart_info(NULL); | 764 | pxa_set_btuart_info(NULL); |
765 | pxa_set_stuart_info(NULL); | 765 | pxa_set_stuart_info(NULL); |
766 | 766 | ||
767 | /* spi chip selects */ | ||
768 | gpio_direction_output(37, 0); | ||
769 | gpio_direction_output(24, 0); | ||
770 | gpio_direction_output(39, 0); | ||
771 | |||
772 | platform_add_devices(ARRAY_AND_SIZE(stargate2_devices)); | 767 | platform_add_devices(ARRAY_AND_SIZE(stargate2_devices)); |
773 | 768 | ||
774 | pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); | 769 | pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); |
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 1dd13346f977..9e0c5c3988a1 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/fs.h> | 28 | #include <linux/fs.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
31 | #include <linux/major.h> | 32 | #include <linux/major.h> |
32 | #include <linux/module.h> | 33 | #include <linux/module.h> |
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 90bd4ef71b2c..f2dbce5f3cd4 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/smsc911x.h> | 31 | #include <linux/smsc911x.h> |
32 | #include <linux/ata_platform.h> | 32 | #include <linux/ata_platform.h> |
33 | #include <linux/amba/mmci.h> | 33 | #include <linux/amba/mmci.h> |
34 | #include <linux/gfp.h> | ||
34 | 35 | ||
35 | #include <asm/clkdev.h> | 36 | #include <asm/clkdev.h> |
36 | #include <asm/system.h> | 37 | #include <asm/system.h> |
diff --git a/arch/arm/mach-rpc/dma.c b/arch/arm/mach-rpc/dma.c index c47d974d52bd..85883b2e0e49 100644 --- a/arch/arm/mach-rpc/dma.c +++ b/arch/arm/mach-rpc/dma.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | * DMA functions specific to RiscPC architecture | 10 | * DMA functions specific to RiscPC architecture |
11 | */ | 11 | */ |
12 | #include <linux/slab.h> | ||
13 | #include <linux/mman.h> | 12 | #include <linux/mman.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c index b62bdf18dca4..33ccf7bf766a 100644 --- a/arch/arm/mach-s3c64xx/dma.c +++ b/arch/arm/mach-s3c64xx/dma.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/dmapool.h> | 18 | #include <linux/dmapool.h> |
19 | #include <linux/sysdev.h> | 19 | #include <linux/sysdev.h> |
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
22 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
23 | #include <linux/err.h> | 24 | #include <linux/err.h> |
diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c index 9b6dee5d16db..9d490c66891c 100644 --- a/arch/arm/mach-sa1100/jornada720_ssp.c +++ b/arch/arm/mach-sa1100/jornada720_ssp.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/slab.h> | ||
22 | 21 | ||
23 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
24 | #include <mach/jornada720.h> | 23 | #include <mach/jornada720.h> |
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index 0b505d9f22d6..c601a75a333d 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <linux/ioport.h> | 8 | #include <linux/ioport.h> |
9 | #include <linux/serial_core.h> | 9 | #include <linux/serial_core.h> |
10 | #include <linux/platform_device.h> | 10 | #include <linux/platform_device.h> |
11 | #include <linux/slab.h> | ||
12 | 11 | ||
13 | #include <mach/hardware.h> | 12 | #include <mach/hardware.h> |
14 | #include <asm/mach-types.h> | 13 | #include <asm/mach-types.h> |
diff --git a/arch/arm/mach-u300/dummyspichip.c b/arch/arm/mach-u300/dummyspichip.c index 962f9de454de..5f55012b7c9e 100644 --- a/arch/arm/mach-u300/dummyspichip.c +++ b/arch/arm/mach-u300/dummyspichip.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
16 | #include <linux/spi/spi.h> | 16 | #include <linux/spi/spi.h> |
17 | #include <linux/dma-mapping.h> | 17 | #include <linux/dma-mapping.h> |
18 | #include <linux/slab.h> | ||
18 | /* | 19 | /* |
19 | * WARNING! Do not include this pl022-specific controller header | 20 | * WARNING! Do not include this pl022-specific controller header |
20 | * for any generic driver. It is only done in this dummy chip | 21 | * for any generic driver. It is only done in this dummy chip |
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c index 109f5a6e71c7..77fbb1e0e528 100644 --- a/arch/arm/mach-u300/mmc.c +++ b/arch/arm/mach-u300/mmc.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/regulator/machine.h> | 20 | #include <linux/regulator/machine.h> |
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/amba/mmci.h> | 22 | #include <linux/amba/mmci.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include "mmc.h" | 25 | #include "mmc.h" |
25 | #include "padmux.h" | 26 | #include "padmux.h" |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 9ddb49b1cb71..3b1a4ee01815 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/clockchips.h> | 32 | #include <linux/clockchips.h> |
33 | #include <linux/cnt32_to_63.h> | 33 | #include <linux/cnt32_to_63.h> |
34 | #include <linux/io.h> | 34 | #include <linux/io.h> |
35 | #include <linux/gfp.h> | ||
35 | 36 | ||
36 | #include <asm/clkdev.h> | 37 | #include <asm/clkdev.h> |
37 | #include <asm/system.h> | 38 | #include <asm/system.h> |
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index 7161ba23b58a..334f0df4e948 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c | |||
@@ -16,7 +16,6 @@ | |||
16 | */ | 16 | */ |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
21 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
22 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c index 48876122df91..e2958eb567f9 100644 --- a/arch/arm/mach-w90x900/dev.c +++ b/arch/arm/mach-w90x900/dev.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <linux/mtd/physmap.h> | 23 | #include <linux/mtd/physmap.h> |
23 | #include <linux/mtd/mtd.h> | 24 | #include <linux/mtd/mtd.h> |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index c4ed9f93f646..5bd7c89a6045 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -736,6 +736,12 @@ config NEEDS_SYSCALL_FOR_CMPXCHG | |||
736 | config OUTER_CACHE | 736 | config OUTER_CACHE |
737 | bool | 737 | bool |
738 | 738 | ||
739 | config OUTER_CACHE_SYNC | ||
740 | bool | ||
741 | help | ||
742 | The outer cache has a outer_cache_fns.sync function pointer | ||
743 | that can be used to drain the write buffer of the outer cache. | ||
744 | |||
739 | config CACHE_FEROCEON_L2 | 745 | config CACHE_FEROCEON_L2 |
740 | bool "Enable the Feroceon L2 cache controller" | 746 | bool "Enable the Feroceon L2 cache controller" |
741 | depends on ARCH_KIRKWOOD || ARCH_MV78XX0 | 747 | depends on ARCH_KIRKWOOD || ARCH_MV78XX0 |
@@ -757,6 +763,7 @@ config CACHE_L2X0 | |||
757 | REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31 || MACH_REALVIEW_PBX || ARCH_NOMADIK || ARCH_OMAP4 | 763 | REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31 || MACH_REALVIEW_PBX || ARCH_NOMADIK || ARCH_OMAP4 |
758 | default y | 764 | default y |
759 | select OUTER_CACHE | 765 | select OUTER_CACHE |
766 | select OUTER_CACHE_SYNC | ||
760 | help | 767 | help |
761 | This option enables the L2x0 PrimeCell. | 768 | This option enables the L2x0 PrimeCell. |
762 | 769 | ||
@@ -781,3 +788,9 @@ config ARM_L1_CACHE_SHIFT | |||
781 | int | 788 | int |
782 | default 6 if ARM_L1_CACHE_SHIFT_6 | 789 | default 6 if ARM_L1_CACHE_SHIFT_6 |
783 | default 5 | 790 | default 5 |
791 | |||
792 | config ARCH_HAS_BARRIERS | ||
793 | bool | ||
794 | help | ||
795 | This option allows the use of custom mandatory barriers | ||
796 | included via the mach/barriers.h file. | ||
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 07334632d3e2..21ad68ba22ba 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -93,6 +93,15 @@ static inline void l2x0_flush_line(unsigned long addr) | |||
93 | } | 93 | } |
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | static void l2x0_cache_sync(void) | ||
97 | { | ||
98 | unsigned long flags; | ||
99 | |||
100 | spin_lock_irqsave(&l2x0_lock, flags); | ||
101 | cache_sync(); | ||
102 | spin_unlock_irqrestore(&l2x0_lock, flags); | ||
103 | } | ||
104 | |||
96 | static inline void l2x0_inv_all(void) | 105 | static inline void l2x0_inv_all(void) |
97 | { | 106 | { |
98 | unsigned long flags; | 107 | unsigned long flags; |
@@ -225,6 +234,7 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) | |||
225 | outer_cache.inv_range = l2x0_inv_range; | 234 | outer_cache.inv_range = l2x0_inv_range; |
226 | outer_cache.clean_range = l2x0_clean_range; | 235 | outer_cache.clean_range = l2x0_clean_range; |
227 | outer_cache.flush_range = l2x0_flush_range; | 236 | outer_cache.flush_range = l2x0_flush_range; |
237 | outer_cache.sync = l2x0_cache_sync; | ||
228 | 238 | ||
229 | printk(KERN_INFO "L2X0 cache controller enabled\n"); | 239 | printk(KERN_INFO "L2X0 cache controller enabled\n"); |
230 | } | 240 | } |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 0da7eccf7749..1351edc0b26f 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/slab.h> | 14 | #include <linux/gfp.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index c9b97e9836a2..0d414c28eb2c 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/vmalloc.h> | 16 | #include <linux/vmalloc.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/pagemap.h> | 18 | #include <linux/pagemap.h> |
19 | #include <linux/gfp.h> | ||
19 | 20 | ||
20 | #include <asm/bugs.h> | 21 | #include <asm/bugs.h> |
21 | #include <asm/cacheflush.h> | 22 | #include <asm/cacheflush.h> |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 7829cb5425f5..83db12a68d56 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/initrd.h> | 17 | #include <linux/initrd.h> |
18 | #include <linux/sort.h> | 18 | #include <linux/sort.h> |
19 | #include <linux/highmem.h> | 19 | #include <linux/highmem.h> |
20 | #include <linux/gfp.h> | ||
20 | 21 | ||
21 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
22 | #include <asm/sections.h> | 23 | #include <asm/sections.h> |
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c index 2690146161ba..be5f58e153bf 100644 --- a/arch/arm/mm/pgd.c +++ b/arch/arm/mm/pgd.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/gfp.h> | ||
11 | #include <linux/highmem.h> | 12 | #include <linux/highmem.h> |
12 | 13 | ||
13 | #include <asm/pgalloc.h> | 14 | #include <asm/pgalloc.h> |
diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c index d983cd6c788c..0c2cc5cd4d83 100644 --- a/arch/arm/plat-mxc/audmux-v2.c +++ b/arch/arm/plat-mxc/audmux-v2.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
26 | #include <linux/debugfs.h> | 26 | #include <linux/debugfs.h> |
27 | #include <linux/slab.h> | ||
27 | #include <mach/audmux.h> | 28 | #include <mach/audmux.h> |
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
29 | 30 | ||
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c index 4ff6dfe04283..c36f2630ed93 100644 --- a/arch/arm/plat-mxc/pwm.c +++ b/arch/arm/plat-mxc/pwm.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/err.h> | 15 | #include <linux/err.h> |
15 | #include <linux/clk.h> | 16 | #include <linux/clk.h> |
16 | #include <linux/io.h> | 17 | #include <linux/io.h> |
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 4a4cd8774aaa..95677d17cd1c 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
19 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 2ab224c8e16c..5c6c342c53f5 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
30 | #include <linux/irq.h> | 30 | #include <linux/irq.h> |
31 | #include <linux/io.h> | 31 | #include <linux/io.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <asm/system.h> | 34 | #include <asm/system.h> |
34 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
diff --git a/arch/arm/plat-omap/iommu-debug.c b/arch/arm/plat-omap/iommu-debug.c index afd1c27cff7c..e6c0d536899c 100644 --- a/arch/arm/plat-omap/iommu-debug.c +++ b/arch/arm/plat-omap/iommu-debug.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/err.h> | 13 | #include <linux/err.h> |
14 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
18 | #include <linux/debugfs.h> | 19 | #include <linux/debugfs.h> |
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c index 905ed832df56..0e137663349c 100644 --- a/arch/arm/plat-omap/iommu.c +++ b/arch/arm/plat-omap/iommu.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
17 | #include <linux/ioport.h> | 18 | #include <linux/ioport.h> |
18 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c index 936aef1971cd..65c6d1ff7237 100644 --- a/arch/arm/plat-omap/iovmm.c +++ b/arch/arm/plat-omap/iovmm.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/err.h> | 13 | #include <linux/err.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/vmalloc.h> | 15 | #include <linux/vmalloc.h> |
15 | #include <linux/device.h> | 16 | #include <linux/device.h> |
16 | #include <linux/scatterlist.h> | 17 | #include <linux/scatterlist.h> |
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 4229cec53140..08a2df766289 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/device.h> | 26 | #include <linux/device.h> |
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include <plat/mailbox.h> | 30 | #include <plat/mailbox.h> |
30 | 31 | ||
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index 52dfcc81511e..e1d0440fd4a8 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <plat/dma.h> | 28 | #include <plat/dma.h> |
28 | #include <plat/mcbsp.h> | 29 | #include <plat/mcbsp.h> |
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index 590435894848..0f5197479513 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -79,6 +79,7 @@ | |||
79 | 79 | ||
80 | #include <linux/kernel.h> | 80 | #include <linux/kernel.h> |
81 | #include <linux/platform_device.h> | 81 | #include <linux/platform_device.h> |
82 | #include <linux/slab.h> | ||
82 | #include <linux/err.h> | 83 | #include <linux/err.h> |
83 | #include <linux/io.h> | 84 | #include <linux/io.h> |
84 | 85 | ||
diff --git a/arch/arm/plat-pxa/dma.c b/arch/arm/plat-pxa/dma.c index 2975798d411f..742350e0f2a7 100644 --- a/arch/arm/plat-pxa/dma.c +++ b/arch/arm/plat-pxa/dma.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
19 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
diff --git a/arch/arm/plat-pxa/pwm.c b/arch/arm/plat-pxa/pwm.c index 51dc5c8106c0..0732c6c8d511 100644 --- a/arch/arm/plat-pxa/pwm.c +++ b/arch/arm/plat-pxa/pwm.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/err.h> | 18 | #include <linux/err.h> |
18 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
19 | #include <linux/io.h> | 20 | #include <linux/io.h> |
diff --git a/arch/arm/plat-s3c24xx/cpu-freq.c b/arch/arm/plat-s3c24xx/cpu-freq.c index 2d42efb9f4e9..1ecc15bfe9d4 100644 --- a/arch/arm/plat-s3c24xx/cpu-freq.c +++ b/arch/arm/plat-s3c24xx/cpu-freq.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/sysdev.h> | 23 | #include <linux/sysdev.h> |
24 | #include <linux/kobject.h> | 24 | #include <linux/kobject.h> |
25 | #include <linux/sysfs.h> | 25 | #include <linux/sysfs.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c index 8c6de1c9968f..9265f09bfa58 100644 --- a/arch/arm/plat-s3c24xx/devs.c +++ b/arch/arm/plat-s3c24xx/devs.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
diff --git a/arch/arm/plat-s3c24xx/s3c2410-iotiming.c b/arch/arm/plat-s3c24xx/s3c2410-iotiming.c index 963fb0b4379e..b1908e56da1b 100644 --- a/arch/arm/plat-s3c24xx/s3c2410-iotiming.c +++ b/arch/arm/plat-s3c24xx/s3c2410-iotiming.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/cpufreq.h> | 17 | #include <linux/cpufreq.h> |
18 | #include <linux/seq_file.h> | 18 | #include <linux/seq_file.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include <mach/map.h> | 22 | #include <mach/map.h> |
22 | #include <mach/regs-mem.h> | 23 | #include <mach/regs-mem.h> |
diff --git a/arch/arm/plat-s3c24xx/s3c2412-iotiming.c b/arch/arm/plat-s3c24xx/s3c2412-iotiming.c index 24993dce10b5..0b46d3895d62 100644 --- a/arch/arm/plat-s3c24xx/s3c2412-iotiming.c +++ b/arch/arm/plat-s3c24xx/s3c2412-iotiming.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <linux/amba/pl093.h> | 26 | #include <linux/amba/pl093.h> |
26 | 27 | ||
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c index 0b5833b9ac5b..210030d5cfe1 100644 --- a/arch/arm/plat-samsung/adc.c +++ b/arch/arm/plat-samsung/adc.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/err.h> | 20 | #include <linux/err.h> |
20 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
21 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
diff --git a/arch/arm/plat-samsung/dev-fb.c b/arch/arm/plat-samsung/dev-fb.c index a90198fc4b0f..002a15f313f3 100644 --- a/arch/arm/plat-samsung/dev-fb.c +++ b/arch/arm/plat-samsung/dev-fb.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
18 | #include <linux/gfp.h> | ||
18 | 19 | ||
19 | #include <mach/irqs.h> | 20 | #include <mach/irqs.h> |
20 | #include <mach/map.h> | 21 | #include <mach/map.h> |
diff --git a/arch/arm/plat-samsung/dev-i2c0.c b/arch/arm/plat-samsung/dev-i2c0.c index 4c761529b949..3a601c16f03c 100644 --- a/arch/arm/plat-samsung/dev-i2c0.c +++ b/arch/arm/plat-samsung/dev-i2c0.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/gfp.h> | ||
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/string.h> | 16 | #include <linux/string.h> |
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
diff --git a/arch/arm/plat-samsung/dev-i2c1.c b/arch/arm/plat-samsung/dev-i2c1.c index d44f79110506..858ee2a0414c 100644 --- a/arch/arm/plat-samsung/dev-i2c1.c +++ b/arch/arm/plat-samsung/dev-i2c1.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/gfp.h> | ||
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/string.h> | 16 | #include <linux/string.h> |
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
diff --git a/arch/arm/plat-samsung/dev-nand.c b/arch/arm/plat-samsung/dev-nand.c index a52fb6cf618f..3a7b8891ba4f 100644 --- a/arch/arm/plat-samsung/dev-nand.c +++ b/arch/arm/plat-samsung/dev-nand.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/gfp.h> | ||
9 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
10 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
11 | 12 | ||
diff --git a/arch/arm/plat-samsung/dev-usb.c b/arch/arm/plat-samsung/dev-usb.c index 88165657fa53..0e0a3bf5c982 100644 --- a/arch/arm/plat-samsung/dev-usb.c +++ b/arch/arm/plat-samsung/dev-usb.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/gfp.h> | ||
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/string.h> | 16 | #include <linux/string.h> |
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
diff --git a/arch/arm/plat-samsung/pm-check.c b/arch/arm/plat-samsung/pm-check.c index 0b5bb774192a..e4baf76f374a 100644 --- a/arch/arm/plat-samsung/pm-check.c +++ b/arch/arm/plat-samsung/pm-check.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/crc32.h> | 18 | #include <linux/crc32.h> |
19 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include <plat/pm.h> | 22 | #include <plat/pm.h> |
22 | 23 | ||
diff --git a/arch/arm/plat-samsung/pwm.c b/arch/arm/plat-samsung/pwm.c index f2d11390d01c..2eeb49fa056d 100644 --- a/arch/arm/plat-samsung/pwm.c +++ b/arch/arm/plat-samsung/pwm.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/err.h> | 18 | #include <linux/err.h> |
18 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
19 | #include <linux/io.h> | 20 | #include <linux/io.h> |
diff --git a/arch/arm/plat-stmp3xxx/dma.c b/arch/arm/plat-stmp3xxx/dma.c index ef88f25fb870..b4dcf8c0477d 100644 --- a/arch/arm/plat-stmp3xxx/dma.c +++ b/arch/arm/plat-stmp3xxx/dma.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * http://www.opensource.org/licenses/gpl-license.html | 15 | * http://www.opensource.org/licenses/gpl-license.html |
16 | * http://www.gnu.org/copyleft/gpl.html | 16 | * http://www.gnu.org/copyleft/gpl.html |
17 | */ | 17 | */ |
18 | #include <linux/gfp.h> | ||
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
19 | #include <linux/device.h> | 20 | #include <linux/device.h> |
20 | #include <linux/dmapool.h> | 21 | #include <linux/dmapool.h> |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 31c2f4c30a95..1536f1784cac 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -12,7 +12,7 @@ | |||
12 | # | 12 | # |
13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
14 | # | 14 | # |
15 | # Last update: Sat Feb 20 14:16:15 2010 | 15 | # Last update: Sat Mar 20 15:35:41 2010 |
16 | # | 16 | # |
17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
18 | # | 18 | # |
@@ -2663,7 +2663,7 @@ reb01 MACH_REB01 REB01 2675 | |||
2663 | aquila MACH_AQUILA AQUILA 2676 | 2663 | aquila MACH_AQUILA AQUILA 2676 |
2664 | spark_sls_hw2 MACH_SPARK_SLS_HW2 SPARK_SLS_HW2 2677 | 2664 | spark_sls_hw2 MACH_SPARK_SLS_HW2 SPARK_SLS_HW2 2677 |
2665 | sheeva_esata MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 | 2665 | sheeva_esata MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 |
2666 | surf7x30 MACH_SURF7X30 SURF7X30 2679 | 2666 | msm7x30_surf MACH_MSM7X30_SURF MSM7X30_SURF 2679 |
2667 | micro2440 MACH_MICRO2440 MICRO2440 2680 | 2667 | micro2440 MACH_MICRO2440 MICRO2440 2680 |
2668 | am2440 MACH_AM2440 AM2440 2681 | 2668 | am2440 MACH_AM2440 AM2440 2681 |
2669 | tq2440 MACH_TQ2440 TQ2440 2682 | 2669 | tq2440 MACH_TQ2440 TQ2440 2682 |
@@ -2678,3 +2678,74 @@ vc088x MACH_VC088X VC088X 2690 | |||
2678 | mioa702 MACH_MIOA702 MIOA702 2691 | 2678 | mioa702 MACH_MIOA702 MIOA702 2691 |
2679 | hpmin MACH_HPMIN HPMIN 2692 | 2679 | hpmin MACH_HPMIN HPMIN 2692 |
2680 | ak880xak MACH_AK880XAK AK880XAK 2693 | 2680 | ak880xak MACH_AK880XAK AK880XAK 2693 |
2681 | arm926tomap850 MACH_ARM926TOMAP850 ARM926TOMAP850 2694 | ||
2682 | lkevm MACH_LKEVM LKEVM 2695 | ||
2683 | mw6410 MACH_MW6410 MW6410 2696 | ||
2684 | terastation_wxl MACH_TERASTATION_WXL TERASTATION_WXL 2697 | ||
2685 | cpu8000e MACH_CPU8000E CPU8000E 2698 | ||
2686 | catania MACH_CATANIA CATANIA 2699 | ||
2687 | tokyo MACH_TOKYO TOKYO 2700 | ||
2688 | msm7201a_surf MACH_MSM7201A_SURF MSM7201A_SURF 2701 | ||
2689 | msm7201a_ffa MACH_MSM7201A_FFA MSM7201A_FFA 2702 | ||
2690 | msm7x25_surf MACH_MSM7X25_SURF MSM7X25_SURF 2703 | ||
2691 | msm7x25_ffa MACH_MSM7X25_FFA MSM7X25_FFA 2704 | ||
2692 | msm7x27_surf MACH_MSM7X27_SURF MSM7X27_SURF 2705 | ||
2693 | msm7x27_ffa MACH_MSM7X27_FFA MSM7X27_FFA 2706 | ||
2694 | msm7x30_ffa MACH_MSM7X30_FFA MSM7X30_FFA 2707 | ||
2695 | qsd8x50_surf MACH_QSD8X50_SURF QSD8X50_SURF 2708 | ||
2696 | qsd8x50_comet MACH_QSD8X50_COMET QSD8X50_COMET 2709 | ||
2697 | qsd8x50_ffa MACH_QSD8X50_FFA QSD8X50_FFA 2710 | ||
2698 | qsd8x50a_surf MACH_QSD8X50A_SURF QSD8X50A_SURF 2711 | ||
2699 | qsd8x50a_ffa MACH_QSD8X50A_FFA QSD8X50A_FFA 2712 | ||
2700 | adx_xgcp10 MACH_ADX_XGCP10 ADX_XGCP10 2713 | ||
2701 | mcgwumts2a MACH_MCGWUMTS2A MCGWUMTS2A 2714 | ||
2702 | mobikt MACH_MOBIKT MOBIKT 2715 | ||
2703 | mx53_evk MACH_MX53_EVK MX53_EVK 2716 | ||
2704 | igep0030 MACH_IGEP0030 IGEP0030 2717 | ||
2705 | axell_h40_h50_ctrl MACH_AXELL_H40_H50_CTRL AXELL_H40_H50_CTRL 2718 | ||
2706 | dtcommod MACH_DTCOMMOD DTCOMMOD 2719 | ||
2707 | gould MACH_GOULD GOULD 2720 | ||
2708 | siberia MACH_SIBERIA SIBERIA 2721 | ||
2709 | sbc3530 MACH_SBC3530 SBC3530 2722 | ||
2710 | qarm MACH_QARM QARM 2723 | ||
2711 | mips MACH_MIPS MIPS 2724 | ||
2712 | mx27grb MACH_MX27GRB MX27GRB 2725 | ||
2713 | sbc8100 MACH_SBC8100 SBC8100 2726 | ||
2714 | saarb MACH_SAARB SAARB 2727 | ||
2715 | omap3mini MACH_OMAP3MINI OMAP3MINI 2728 | ||
2716 | cnmbook7se MACH_CNMBOOK7SE CNMBOOK7SE 2729 | ||
2717 | catan MACH_CATAN CATAN 2730 | ||
2718 | harmony MACH_HARMONY HARMONY 2731 | ||
2719 | tonga MACH_TONGA TONGA 2732 | ||
2720 | cybook_orizon MACH_CYBOOK_ORIZON CYBOOK_ORIZON 2733 | ||
2721 | htcrhodiumcdma MACH_HTCRHODIUMCDMA HTCRHODIUMCDMA 2734 | ||
2722 | epc_g45 MACH_EPC_G45 EPC_G45 2735 | ||
2723 | epc_lpc3250 MACH_EPC_LPC3250 EPC_LPC3250 2736 | ||
2724 | mxc91341evb MACH_MXC91341EVB MXC91341EVB 2737 | ||
2725 | rtw1000 MACH_RTW1000 RTW1000 2738 | ||
2726 | bobcat MACH_BOBCAT BOBCAT 2739 | ||
2727 | trizeps6 MACH_TRIZEPS6 TRIZEPS6 2740 | ||
2728 | msm7x30_fluid MACH_MSM7X30_FLUID MSM7X30_FLUID 2741 | ||
2729 | nedap9263 MACH_NEDAP9263 NEDAP9263 2742 | ||
2730 | netgear_ms2110 MACH_NETGEAR_MS2110 NETGEAR_MS2110 2743 | ||
2731 | bmx MACH_BMX BMX 2744 | ||
2732 | netstream MACH_NETSTREAM NETSTREAM 2745 | ||
2733 | vpnext_rcu MACH_VPNEXT_RCU VPNEXT_RCU 2746 | ||
2734 | vpnext_mpu MACH_VPNEXT_MPU VPNEXT_MPU 2747 | ||
2735 | bcmring_tablet_v1 MACH_BCMRING_TABLET_V1 BCMRING_TABLET_V1 2748 | ||
2736 | sgarm10 MACH_SGARM10 SGARM10 2749 | ||
2737 | cm_t3517 MACH_CM_T3517 CM_T3517 2750 | ||
2738 | omap3_cps MACH_OMAP3_CPS OMAP3_CPS 2751 | ||
2739 | axar1500_receiver MACH_AXAR1500_RECEIVER AXAR1500_RECEIVER 2752 | ||
2740 | wbd222 MACH_WBD222 WBD222 2753 | ||
2741 | mt65xx MACH_MT65XX MT65XX 2754 | ||
2742 | msm8x60_surf MACH_MSM8X60_SURF MSM8X60_SURF 2755 | ||
2743 | msm8x60_sim MACH_MSM8X60_SIM MSM8X60_SIM 2756 | ||
2744 | vmc300 MACH_VMC300 VMC300 2757 | ||
2745 | tcc8000_sdk MACH_TCC8000_SDK TCC8000_SDK 2758 | ||
2746 | nanos MACH_NANOS NANOS 2759 | ||
2747 | stamp9g10 MACH_STAMP9G10 STAMP9G10 2760 | ||
2748 | stamp9g45 MACH_STAMP9G45 STAMP9G45 2761 | ||
2749 | h6053 MACH_H6053 H6053 2762 | ||
2750 | smint01 MACH_SMINT01 SMINT01 2763 | ||
2751 | prtlvt2 MACH_PRTLVT2 PRTLVT2 2764 | ||
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 7f3f59fcaa21..a420cb949328 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -545,7 +545,7 @@ static int __init vfp_init(void) | |||
545 | */ | 545 | */ |
546 | elf_hwcap |= HWCAP_VFP; | 546 | elf_hwcap |= HWCAP_VFP; |
547 | #ifdef CONFIG_VFPv3 | 547 | #ifdef CONFIG_VFPv3 |
548 | if (VFP_arch >= 3) { | 548 | if (VFP_arch >= 2) { |
549 | elf_hwcap |= HWCAP_VFPv3; | 549 | elf_hwcap |= HWCAP_VFPv3; |
550 | 550 | ||
551 | /* | 551 | /* |
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index 93c0342530a0..2d76515745a4 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
12 | #include <linux/pm.h> | 12 | #include <linux/pm.h> |
13 | #include <linux/ptrace.h> | 13 | #include <linux/ptrace.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/reboot.h> | 15 | #include <linux/reboot.h> |
15 | #include <linux/tick.h> | 16 | #include <linux/tick.h> |
16 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index 3a4bc1a18433..e67c99945428 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/dma-mapping.h> | 14 | #include <linux/dma-mapping.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
16 | #include <linux/spi/spi.h> | 17 | #include <linux/spi/spi.h> |
17 | #include <linux/usb/atmel_usba_udc.h> | 18 | #include <linux/usb/atmel_usba_udc.h> |
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c index 310477ba1bbf..e9d12058ffd3 100644 --- a/arch/avr32/mach-at32ap/extint.c +++ b/arch/avr32/mach-at32ap/extint.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/random.h> | 16 | #include <linux/random.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include <asm/io.h> | 19 | #include <asm/io.h> |
19 | 20 | ||
diff --git a/arch/avr32/mach-at32ap/hsmc.c b/arch/avr32/mach-at32ap/hsmc.c index 2875c11be95d..f7672d3e86b8 100644 --- a/arch/avr32/mach-at32ap/hsmc.c +++ b/arch/avr32/mach-at32ap/hsmc.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | #include <mach/smc.h> | 18 | #include <mach/smc.h> |
diff --git a/arch/avr32/mm/dma-coherent.c b/arch/avr32/mm/dma-coherent.c index 6d8c794c3b81..3c0042247ea9 100644 --- a/arch/avr32/mm/dma-coherent.c +++ b/arch/avr32/mm/dma-coherent.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/dma-mapping.h> | 9 | #include <linux/dma-mapping.h> |
10 | #include <linux/gfp.h> | ||
10 | 11 | ||
11 | #include <asm/addrspace.h> | 12 | #include <asm/addrspace.h> |
12 | #include <asm/cacheflush.h> | 13 | #include <asm/cacheflush.h> |
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c index 94925641e53e..a7314d44b17b 100644 --- a/arch/avr32/mm/init.c +++ b/arch/avr32/mm/init.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/gfp.h> | ||
10 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
11 | #include <linux/swap.h> | 12 | #include <linux/swap.h> |
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
diff --git a/arch/avr32/mm/ioremap.c b/arch/avr32/mm/ioremap.c index f03b79f0e0ab..7def0d84cec6 100644 --- a/arch/avr32/mm/ioremap.c +++ b/arch/avr32/mm/ioremap.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/io.h> | 11 | #include <linux/io.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | #include <asm/pgtable.h> | 14 | #include <asm/pgtable.h> |
14 | #include <asm/addrspace.h> | 15 | #include <asm/addrspace.h> |
diff --git a/arch/blackfin/include/asm/mmu_context.h b/arch/blackfin/include/asm/mmu_context.h index 7f363d7e43a5..e1a9b4624f91 100644 --- a/arch/blackfin/include/asm/mmu_context.h +++ b/arch/blackfin/include/asm/mmu_context.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #ifndef __BLACKFIN_MMU_CONTEXT_H__ | 7 | #ifndef __BLACKFIN_MMU_CONTEXT_H__ |
8 | #define __BLACKFIN_MMU_CONTEXT_H__ | 8 | #define __BLACKFIN_MMU_CONTEXT_H__ |
9 | 9 | ||
10 | #include <linux/gfp.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <asm/setup.h> | 12 | #include <asm/setup.h> |
13 | #include <asm/page.h> | 13 | #include <asm/page.h> |
diff --git a/arch/blackfin/kernel/ipipe.c b/arch/blackfin/kernel/ipipe.c index a77307a4473b..1a496cd71ba2 100644 --- a/arch/blackfin/kernel/ipipe.c +++ b/arch/blackfin/kernel/ipipe.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/percpu.h> | 28 | #include <linux/percpu.h> |
29 | #include <linux/bitops.h> | 29 | #include <linux/bitops.h> |
30 | #include <linux/slab.h> | ||
31 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
32 | #include <linux/kthread.h> | 31 | #include <linux/kthread.h> |
33 | #include <linux/unistd.h> | 32 | #include <linux/unistd.h> |
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 29705cec91de..93ec07da2e51 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/unistd.h> | 11 | #include <linux/unistd.h> |
12 | #include <linux/user.h> | 12 | #include <linux/user.h> |
13 | #include <linux/uaccess.h> | 13 | #include <linux/uaccess.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
15 | #include <linux/tick.h> | 16 | #include <linux/tick.h> |
16 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c index 8837be4edb4a..c1f1ccc846f0 100644 --- a/arch/blackfin/mach-common/pm.c +++ b/arch/blackfin/mach-common/pm.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/suspend.h> | 11 | #include <linux/suspend.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/io.h> | 15 | #include <linux/io.h> |
15 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
16 | 17 | ||
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index 7803f22d2ca7..7cecbaf0358a 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/smp.h> | 21 | #include <linux/smp.h> |
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/slab.h> | ||
24 | #include <asm/atomic.h> | 25 | #include <asm/atomic.h> |
25 | #include <asm/cacheflush.h> | 26 | #include <asm/cacheflush.h> |
26 | #include <asm/mmu_context.h> | 27 | #include <asm/mmu_context.h> |
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c index bb9c98f9cb5b..355b87aa6b93 100644 --- a/arch/blackfin/mm/init.c +++ b/arch/blackfin/mm/init.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Licensed under the GPL-2 or later. | 4 | * Licensed under the GPL-2 or later. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/gfp.h> | ||
7 | #include <linux/swap.h> | 8 | #include <linux/swap.h> |
8 | #include <linux/bootmem.h> | 9 | #include <linux/bootmem.h> |
9 | #include <linux/uaccess.h> | 10 | #include <linux/uaccess.h> |
diff --git a/arch/blackfin/mm/isram-driver.c b/arch/blackfin/mm/isram-driver.c index 9213e2357888..39b058564f62 100644 --- a/arch/blackfin/mm/isram-driver.c +++ b/arch/blackfin/mm/isram-driver.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
15 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
16 | 17 | ||
diff --git a/arch/blackfin/mm/sram-alloc.c b/arch/blackfin/mm/sram-alloc.c index 5732da25ee2d..49b2ff2c8b74 100644 --- a/arch/blackfin/mm/sram-alloc.c +++ b/arch/blackfin/mm/sram-alloc.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
19 | #include <linux/rtc.h> | 19 | #include <linux/rtc.h> |
20 | #include <linux/slab.h> | ||
20 | #include <asm/blackfin.h> | 21 | #include <asm/blackfin.h> |
21 | #include <asm/mem_map.h> | 22 | #include <asm/mem_map.h> |
22 | #include "blackfin_sram.h" | 23 | #include "blackfin_sram.h" |
diff --git a/arch/cris/arch-v10/drivers/i2c.c b/arch/cris/arch-v10/drivers/i2c.c index 7f656ae0b21d..a8737a8eb229 100644 --- a/arch/cris/arch-v10/drivers/i2c.c +++ b/arch/cris/arch-v10/drivers/i2c.c | |||
@@ -14,7 +14,6 @@ | |||
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/smp_lock.h> | 17 | #include <linux/smp_lock.h> |
19 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
20 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/arch/cris/arch-v10/drivers/sync_serial.c b/arch/cris/arch-v10/drivers/sync_serial.c index 562b9a7feae7..109dcd826d17 100644 --- a/arch/cris/arch-v10/drivers/sync_serial.c +++ b/arch/cris/arch-v10/drivers/sync_serial.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/major.h> | 18 | #include <linux/major.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
22 | #include <linux/poll.h> | 21 | #include <linux/poll.h> |
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c index c4c69cf721e5..93f0f64b1326 100644 --- a/arch/cris/arch-v10/kernel/process.c +++ b/arch/cris/arch-v10/kernel/process.c | |||
@@ -11,9 +11,9 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/err.h> | 15 | #include <linux/err.h> |
15 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
16 | #include <linux/slab.h> | ||
17 | #include <arch/svinto.h> | 17 | #include <arch/svinto.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | 19 | ||
diff --git a/arch/cris/arch-v32/drivers/i2c.c b/arch/cris/arch-v32/drivers/i2c.c index 179e7b804331..506826399ae7 100644 --- a/arch/cris/arch-v32/drivers/i2c.c +++ b/arch/cris/arch-v32/drivers/i2c.c | |||
@@ -27,7 +27,6 @@ | |||
27 | 27 | ||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/slab.h> | ||
31 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
diff --git a/arch/cris/arch-v32/drivers/pci/bios.c b/arch/cris/arch-v32/drivers/pci/bios.c index d4b9c36ddc0f..bc0cfdad1cbc 100644 --- a/arch/cris/arch-v32/drivers/pci/bios.c +++ b/arch/cris/arch-v32/drivers/pci/bios.c | |||
@@ -50,7 +50,7 @@ pcibios_align_resource(void *data, const struct resource *res, | |||
50 | if ((res->flags & IORESOURCE_IO) && (start & 0x300)) | 50 | if ((res->flags & IORESOURCE_IO) && (start & 0x300)) |
51 | start = (start + 0x3ff) & ~0x3ff; | 51 | start = (start + 0x3ff) & ~0x3ff; |
52 | 52 | ||
53 | return start | 53 | return start; |
54 | } | 54 | } |
55 | 55 | ||
56 | int pcibios_enable_resources(struct pci_dev *dev, int mask) | 56 | int pcibios_enable_resources(struct pci_dev *dev, int mask) |
diff --git a/arch/cris/arch-v32/drivers/pci/dma.c b/arch/cris/arch-v32/drivers/pci/dma.c index fbe65954ee6c..ee55578d9834 100644 --- a/arch/cris/arch-v32/drivers/pci/dma.c +++ b/arch/cris/arch-v32/drivers/pci/dma.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
16 | #include <linux/gfp.h> | ||
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | 18 | ||
18 | void *dma_alloc_coherent(struct device *dev, size_t size, | 19 | void *dma_alloc_coherent(struct device *dev, size_t size, |
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c index d2a0fbf5341f..4889f196ecd6 100644 --- a/arch/cris/arch-v32/drivers/sync_serial.c +++ b/arch/cris/arch-v32/drivers/sync_serial.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/major.h> | 14 | #include <linux/major.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/smp_lock.h> | 16 | #include <linux/smp_lock.h> |
18 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
19 | #include <linux/poll.h> | 18 | #include <linux/poll.h> |
diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c index 120e7f796fea..2661a9529d70 100644 --- a/arch/cris/arch-v32/kernel/process.c +++ b/arch/cris/arch-v32/kernel/process.c | |||
@@ -9,9 +9,9 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/err.h> | 13 | #include <linux/err.h> |
13 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
14 | #include <linux/slab.h> | ||
15 | #include <hwregs/reg_rdwr.h> | 15 | #include <hwregs/reg_rdwr.h> |
16 | #include <hwregs/reg_map.h> | 16 | #include <hwregs/reg_map.h> |
17 | #include <hwregs/timer_defs.h> | 17 | #include <hwregs/timer_defs.h> |
diff --git a/arch/cris/arch-v32/kernel/signal.c b/arch/cris/arch-v32/kernel/signal.c index 372d0ca6efbc..0b7e3f143281 100644 --- a/arch/cris/arch-v32/kernel/signal.c +++ b/arch/cris/arch-v32/kernel/signal.c | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
8 | #include <linux/signal.h> | 9 | #include <linux/signal.h> |
9 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c index 6d7b9eda4036..469f7f9d62e0 100644 --- a/arch/cris/kernel/irq.c +++ b/arch/cris/kernel/irq.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/ioport.h> | 29 | #include <linux/ioport.h> |
30 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
31 | #include <linux/timex.h> | 31 | #include <linux/timex.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/random.h> | 32 | #include <linux/random.h> |
34 | #include <linux/init.h> | 33 | #include <linux/init.h> |
35 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
diff --git a/arch/cris/kernel/module.c b/arch/cris/kernel/module.c index abc13e368b90..bcd502f74cda 100644 --- a/arch/cris/kernel/module.c +++ b/arch/cris/kernel/module.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
22 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #if 0 | 26 | #if 0 |
26 | #define DEBUGP printk | 27 | #define DEBUGP printk |
diff --git a/arch/cris/kernel/profile.c b/arch/cris/kernel/profile.c index 9aa571169bcc..b917549a7d94 100644 --- a/arch/cris/kernel/profile.c +++ b/arch/cris/kernel/profile.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <linux/errno.h> | 2 | #include <linux/errno.h> |
3 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
4 | #include <linux/proc_fs.h> | 4 | #include <linux/proc_fs.h> |
5 | #include <linux/slab.h> | ||
5 | #include <linux/types.h> | 6 | #include <linux/types.h> |
6 | #include <asm/ptrace.h> | 7 | #include <asm/ptrace.h> |
7 | #include <asm/uaccess.h> | 8 | #include <asm/uaccess.h> |
diff --git a/arch/cris/mm/init.c b/arch/cris/mm/init.c index ff68b9f516a1..df33ab89d70f 100644 --- a/arch/cris/mm/init.c +++ b/arch/cris/mm/init.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/gfp.h> | ||
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/bootmem.h> | 13 | #include <linux/bootmem.h> |
13 | #include <asm/tlb.h> | 14 | #include <asm/tlb.h> |
diff --git a/arch/frv/include/asm/segment.h b/arch/frv/include/asm/segment.h index e3616a6f941d..a2320a4a0042 100644 --- a/arch/frv/include/asm/segment.h +++ b/arch/frv/include/asm/segment.h | |||
@@ -21,12 +21,12 @@ typedef struct { | |||
21 | 21 | ||
22 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) | 22 | #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) |
23 | 23 | ||
24 | #define KERNEL_DS MAKE_MM_SEG(0xdfffffffUL) | ||
25 | |||
26 | #ifdef CONFIG_MMU | 24 | #ifdef CONFIG_MMU |
27 | #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) | 25 | #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) |
26 | #define KERNEL_DS MAKE_MM_SEG(0xdfffffffUL) | ||
28 | #else | 27 | #else |
29 | #define USER_DS KERNEL_DS | 28 | #define USER_DS MAKE_MM_SEG(memory_end) |
29 | #define KERNEL_DS MAKE_MM_SEG(0xe0000000UL) | ||
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #define get_ds() (KERNEL_DS) | 32 | #define get_ds() (KERNEL_DS) |
diff --git a/arch/frv/include/asm/uaccess.h b/arch/frv/include/asm/uaccess.h index 53650c958f41..0b67ec5b4414 100644 --- a/arch/frv/include/asm/uaccess.h +++ b/arch/frv/include/asm/uaccess.h | |||
@@ -27,8 +27,6 @@ | |||
27 | #define VERIFY_READ 0 | 27 | #define VERIFY_READ 0 |
28 | #define VERIFY_WRITE 1 | 28 | #define VERIFY_WRITE 1 |
29 | 29 | ||
30 | #define __addr_ok(addr) ((unsigned long)(addr) < get_addr_limit()) | ||
31 | |||
32 | /* | 30 | /* |
33 | * check that a range of addresses falls within the current address limit | 31 | * check that a range of addresses falls within the current address limit |
34 | */ | 32 | */ |
diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c index 62d1aba615dc..625136625a7f 100644 --- a/arch/frv/kernel/irq.c +++ b/arch/frv/kernel/irq.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/ioport.h> | 16 | #include <linux/ioport.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/timex.h> | 18 | #include <linux/timex.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/random.h> | 19 | #include <linux/random.h> |
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include <linux/kernel_stat.h> | 21 | #include <linux/kernel_stat.h> |
diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c index 035516cb7a97..71abd1510a59 100644 --- a/arch/frv/kernel/sysctl.c +++ b/arch/frv/kernel/sysctl.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
13 | #include <linux/sysctl.h> | 12 | #include <linux/sysctl.h> |
14 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
diff --git a/arch/frv/mb93090-mb00/pci-dma.c b/arch/frv/mb93090-mb00/pci-dma.c index 2c912e805162..85d110b71cf7 100644 --- a/arch/frv/mb93090-mb00/pci-dma.c +++ b/arch/frv/mb93090-mb00/pci-dma.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/dma-mapping.h> | 13 | #include <linux/dma-mapping.h> |
15 | #include <linux/list.h> | 14 | #include <linux/list.h> |
16 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
diff --git a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c index 1ed15d7fea20..6b4fb28e9f99 100644 --- a/arch/frv/mb93090-mb00/pci-frv.c +++ b/arch/frv/mb93090-mb00/pci-frv.c | |||
@@ -41,7 +41,7 @@ pcibios_align_resource(void *data, const struct resource *res, | |||
41 | if ((res->flags & IORESOURCE_IO) && (start & 0x300)) | 41 | if ((res->flags & IORESOURCE_IO) && (start & 0x300)) |
42 | start = (start + 0x3ff) & ~0x3ff; | 42 | start = (start + 0x3ff) & ~0x3ff; |
43 | 43 | ||
44 | return start | 44 | return start; |
45 | } | 45 | } |
46 | 46 | ||
47 | 47 | ||
@@ -94,8 +94,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list) | |||
94 | r = &dev->resource[idx]; | 94 | r = &dev->resource[idx]; |
95 | if (!r->start) | 95 | if (!r->start) |
96 | continue; | 96 | continue; |
97 | if (pci_claim_resource(dev, idx) < 0) | 97 | pci_claim_resource(dev, idx); |
98 | printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev)); | ||
99 | } | 98 | } |
100 | } | 99 | } |
101 | pcibios_allocate_bus_resources(&bus->children); | 100 | pcibios_allocate_bus_resources(&bus->children); |
@@ -125,7 +124,6 @@ static void __init pcibios_allocate_resources(int pass) | |||
125 | DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n", | 124 | DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n", |
126 | r->start, r->end, r->flags, disabled, pass); | 125 | r->start, r->end, r->flags, disabled, pass); |
127 | if (pci_claim_resource(dev, idx) < 0) { | 126 | if (pci_claim_resource(dev, idx) < 0) { |
128 | printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, pci_name(dev)); | ||
129 | /* We'll assign a new address later */ | 127 | /* We'll assign a new address later */ |
130 | r->end -= r->start; | 128 | r->end -= r->start; |
131 | r->start = 0; | 129 | r->start = 0; |
diff --git a/arch/frv/mb93090-mb00/pci-irq.c b/arch/frv/mb93090-mb00/pci-irq.c index ba587523c015..20f6497b2cd5 100644 --- a/arch/frv/mb93090-mb00/pci-irq.c +++ b/arch/frv/mb93090-mb00/pci-irq.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
14 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
15 | 14 | ||
diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c index c0dcec65c6b7..f8dd37e49535 100644 --- a/arch/frv/mb93090-mb00/pci-vdk.c +++ b/arch/frv/mb93090-mb00/pci-vdk.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/ioport.h> | 17 | #include <linux/ioport.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/slab.h> | ||
20 | 19 | ||
21 | #include <asm/segment.h> | 20 | #include <asm/segment.h> |
22 | #include <asm/io.h> | 21 | #include <asm/io.h> |
diff --git a/arch/frv/mm/dma-alloc.c b/arch/frv/mm/dma-alloc.c index 44840e73e907..7a73aaeae3ac 100644 --- a/arch/frv/mm/dma-alloc.c +++ b/arch/frv/mm/dma-alloc.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/init.h> | 37 | #include <linux/init.h> |
38 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
39 | #include <linux/hardirq.h> | 39 | #include <linux/hardirq.h> |
40 | #include <linux/gfp.h> | ||
40 | 41 | ||
41 | #include <asm/pgalloc.h> | 42 | #include <asm/pgalloc.h> |
42 | #include <asm/io.h> | 43 | #include <asm/io.h> |
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c index 0708284f85fb..ed64588ac3a7 100644 --- a/arch/frv/mm/init.c +++ b/arch/frv/mm/init.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/signal.h> | 19 | #include <linux/signal.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/pagemap.h> | 21 | #include <linux/pagemap.h> |
22 | #include <linux/gfp.h> | ||
22 | #include <linux/swap.h> | 23 | #include <linux/swap.h> |
23 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
diff --git a/arch/frv/mm/pgalloc.c b/arch/frv/mm/pgalloc.c index 66f616fb4860..c42c83d507bc 100644 --- a/arch/frv/mm/pgalloc.c +++ b/arch/frv/mm/pgalloc.c | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/gfp.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/highmem.h> | 15 | #include <linux/highmem.h> |
16 | #include <linux/quicklist.h> | 16 | #include <linux/quicklist.h> |
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index bd883faa983d..8c8b0ffa6ad7 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c | |||
@@ -32,11 +32,11 @@ | |||
32 | #include <linux/stddef.h> | 32 | #include <linux/stddef.h> |
33 | #include <linux/unistd.h> | 33 | #include <linux/unistd.h> |
34 | #include <linux/ptrace.h> | 34 | #include <linux/ptrace.h> |
35 | #include <linux/slab.h> | ||
36 | #include <linux/user.h> | 35 | #include <linux/user.h> |
37 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
38 | #include <linux/reboot.h> | 37 | #include <linux/reboot.h> |
39 | #include <linux/fs.h> | 38 | #include <linux/fs.h> |
39 | #include <linux/slab.h> | ||
40 | 40 | ||
41 | #include <asm/uaccess.h> | 41 | #include <asm/uaccess.h> |
42 | #include <asm/system.h> | 42 | #include <asm/system.h> |
diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c index 9942f24aff9e..7cc3380f250c 100644 --- a/arch/h8300/mm/init.c +++ b/arch/h8300/mm/init.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/highmem.h> | 30 | #include <linux/highmem.h> |
31 | #include <linux/pagemap.h> | 31 | #include <linux/pagemap.h> |
32 | #include <linux/bootmem.h> | 32 | #include <linux/bootmem.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/gfp.h> |
34 | 34 | ||
35 | #include <asm/setup.h> | 35 | #include <asm/setup.h> |
36 | #include <asm/segment.h> | 36 | #include <asm/segment.h> |
diff --git a/arch/h8300/mm/kmap.c b/arch/h8300/mm/kmap.c index 5c7af09ae8d1..944a502c2e56 100644 --- a/arch/h8300/mm/kmap.c +++ b/arch/h8300/mm/kmap.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/string.h> | 13 | #include <linux/string.h> |
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/vmalloc.h> | 15 | #include <linux/vmalloc.h> |
17 | 16 | ||
18 | #include <asm/setup.h> | 17 | #include <asm/setup.h> |
diff --git a/arch/h8300/mm/memory.c b/arch/h8300/mm/memory.c index 40d8aa811e4e..5552ddfaab5e 100644 --- a/arch/h8300/mm/memory.c +++ b/arch/h8300/mm/memory.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/slab.h> | ||
25 | 24 | ||
26 | #include <asm/setup.h> | 25 | #include <asm/setup.h> |
27 | #include <asm/segment.h> | 26 | #include <asm/segment.h> |
diff --git a/arch/ia64/include/asm/dmi.h b/arch/ia64/include/asm/dmi.h index 00eb1b130b63..1ed4c8fedb83 100644 --- a/arch/ia64/include/asm/dmi.h +++ b/arch/ia64/include/asm/dmi.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _ASM_DMI_H | 1 | #ifndef _ASM_DMI_H |
2 | #define _ASM_DMI_H 1 | 2 | #define _ASM_DMI_H 1 |
3 | 3 | ||
4 | #include <linux/slab.h> | ||
4 | #include <asm/io.h> | 5 | #include <asm/io.h> |
5 | 6 | ||
6 | /* Use normal IO mappings for DMI */ | 7 | /* Use normal IO mappings for DMI */ |
diff --git a/arch/ia64/kernel/acpi-ext.c b/arch/ia64/kernel/acpi-ext.c index b7515bc808a8..8b9318d311a0 100644 --- a/arch/ia64/kernel/acpi-ext.c +++ b/arch/ia64/kernel/acpi-ext.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/acpi.h> | 14 | #include <linux/acpi.h> |
14 | 15 | ||
15 | #include <asm/acpi-ext.h> | 16 | #include <asm/acpi-ext.h> |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index f1c9f70b4e45..4d1a7e9314cf 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/efi.h> | 44 | #include <linux/efi.h> |
45 | #include <linux/mmzone.h> | 45 | #include <linux/mmzone.h> |
46 | #include <linux/nodemask.h> | 46 | #include <linux/nodemask.h> |
47 | #include <linux/slab.h> | ||
47 | #include <acpi/processor.h> | 48 | #include <acpi/processor.h> |
48 | #include <asm/io.h> | 49 | #include <asm/io.h> |
49 | #include <asm/iosapic.h> | 50 | #include <asm/iosapic.h> |
diff --git a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c index 7b435451b3dc..b0b4e6e710f2 100644 --- a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c +++ b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/cpufreq.h> | 16 | #include <linux/cpufreq.h> |
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index c745d0aeb6e0..a0f001928502 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/time.h> | 30 | #include <linux/time.h> |
30 | #include <linux/efi.h> | 31 | #include <linux/efi.h> |
31 | #include <linux/kexec.h> | 32 | #include <linux/kexec.h> |
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 95ac77aeae9b..7ded76658d2d 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -86,6 +86,7 @@ | |||
86 | #include <linux/kernel.h> | 86 | #include <linux/kernel.h> |
87 | #include <linux/list.h> | 87 | #include <linux/list.h> |
88 | #include <linux/pci.h> | 88 | #include <linux/pci.h> |
89 | #include <linux/slab.h> | ||
89 | #include <linux/smp.h> | 90 | #include <linux/smp.h> |
90 | #include <linux/string.h> | 91 | #include <linux/string.h> |
91 | #include <linux/bootmem.h> | 92 | #include <linux/bootmem.h> |
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index d4093a173a3e..640479304ac0 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/ioport.h> | 23 | #include <linux/ioport.h> |
24 | #include <linux/kernel_stat.h> | 24 | #include <linux/kernel_stat.h> |
25 | #include <linux/slab.h> | ||
26 | #include <linux/ptrace.h> | 25 | #include <linux/ptrace.h> |
27 | #include <linux/random.h> /* for rand_initialize_irq() */ | 26 | #include <linux/random.h> /* for rand_initialize_irq() */ |
28 | #include <linux/signal.h> | 27 | #include <linux/signal.h> |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 378b4833024f..a0220dc5ff42 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -85,6 +85,7 @@ | |||
85 | #include <linux/cpumask.h> | 85 | #include <linux/cpumask.h> |
86 | #include <linux/kdebug.h> | 86 | #include <linux/kdebug.h> |
87 | #include <linux/cpu.h> | 87 | #include <linux/cpu.h> |
88 | #include <linux/gfp.h> | ||
88 | 89 | ||
89 | #include <asm/delay.h> | 90 | #include <asm/delay.h> |
90 | #include <asm/machvec.h> | 91 | #include <asm/machvec.h> |
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c index f94aaa86933f..09b4d6828c45 100644 --- a/arch/ia64/kernel/mca_drv.c +++ b/arch/ia64/kernel/mca_drv.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
23 | #include <linux/workqueue.h> | 23 | #include <linux/workqueue.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <asm/delay.h> | 27 | #include <asm/delay.h> |
27 | #include <asm/machvec.h> | 28 | #include <asm/machvec.h> |
diff --git a/arch/ia64/kernel/pci-swiotlb.c b/arch/ia64/kernel/pci-swiotlb.c index 53292abf846c..3095654f9ab3 100644 --- a/arch/ia64/kernel/pci-swiotlb.c +++ b/arch/ia64/kernel/pci-swiotlb.c | |||
@@ -1,6 +1,7 @@ | |||
1 | /* Glue code to lib/swiotlb.c */ | 1 | /* Glue code to lib/swiotlb.c */ |
2 | 2 | ||
3 | #include <linux/pci.h> | 3 | #include <linux/pci.h> |
4 | #include <linux/gfp.h> | ||
4 | #include <linux/cache.h> | 5 | #include <linux/cache.h> |
5 | #include <linux/module.h> | 6 | #include <linux/module.h> |
6 | #include <linux/dma-mapping.h> | 7 | #include <linux/dma-mapping.h> |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 703062c44fb9..ab985f785c14 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/rcupdate.h> | 41 | #include <linux/rcupdate.h> |
42 | #include <linux/completion.h> | 42 | #include <linux/completion.h> |
43 | #include <linux/tracehook.h> | 43 | #include <linux/tracehook.h> |
44 | #include <linux/slab.h> | ||
44 | 45 | ||
45 | #include <asm/errno.h> | 46 | #include <asm/errno.h> |
46 | #include <asm/intrinsics.h> | 47 | #include <asm/intrinsics.h> |
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index d92765cae10a..53f1648c8b81 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -15,11 +15,11 @@ | |||
15 | #include <linux/kallsyms.h> | 15 | #include <linux/kallsyms.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/module.h> | 19 | #include <linux/module.h> |
19 | #include <linux/notifier.h> | 20 | #include <linux/notifier.h> |
20 | #include <linux/personality.h> | 21 | #include <linux/personality.h> |
21 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/stddef.h> | 23 | #include <linux/stddef.h> |
24 | #include <linux/thread_info.h> | 24 | #include <linux/thread_info.h> |
25 | #include <linux/unistd.h> | 25 | #include <linux/unistd.h> |
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c index b61afbbe076f..0dec7f702448 100644 --- a/arch/ia64/kernel/ptrace.c +++ b/arch/ia64/kernel/ptrace.c | |||
@@ -11,7 +11,6 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
16 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
17 | #include <linux/ptrace.h> | 16 | #include <linux/ptrace.h> |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index b3a5818088d9..28f299de2903 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/node.h> | 19 | #include <linux/node.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | #include <linux/bootmem.h> | 22 | #include <linux/bootmem.h> |
22 | #include <linux/nodemask.h> | 23 | #include <linux/nodemask.h> |
diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c index a595823582d9..c4696d217ce0 100644 --- a/arch/ia64/kernel/uncached.c +++ b/arch/ia64/kernel/uncached.c | |||
@@ -18,9 +18,9 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/slab.h> | ||
22 | #include <linux/efi.h> | 21 | #include <linux/efi.h> |
23 | #include <linux/genalloc.h> | 22 | #include <linux/genalloc.h> |
23 | #include <linux/gfp.h> | ||
24 | #include <asm/page.h> | 24 | #include <asm/page.h> |
25 | #include <asm/pal.h> | 25 | #include <asm/pal.h> |
26 | #include <asm/system.h> | 26 | #include <asm/system.h> |
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index 26e0e089bfe7..73c5c2b05f64 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c | |||
@@ -23,8 +23,8 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/percpu.h> | 25 | #include <linux/percpu.h> |
26 | #include <linux/gfp.h> | ||
27 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/smp.h> | 28 | #include <linux/smp.h> |
29 | #include <linux/kvm_host.h> | 29 | #include <linux/kvm_host.h> |
30 | #include <linux/kvm.h> | 30 | #include <linux/kvm.h> |
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index 8d586d1e2515..61620323bb60 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/acpi.h> | 22 | #include <linux/acpi.h> |
23 | #include <linux/efi.h> | 23 | #include <linux/efi.h> |
24 | #include <linux/nodemask.h> | 24 | #include <linux/nodemask.h> |
25 | #include <linux/slab.h> | ||
25 | #include <asm/pgalloc.h> | 26 | #include <asm/pgalloc.h> |
26 | #include <asm/tlb.h> | 27 | #include <asm/tlb.h> |
27 | #include <asm/meminit.h> | 28 | #include <asm/meminit.h> |
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index b0f615759e97..1841ee7e65f9 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/hugetlb.h> | 14 | #include <linux/hugetlb.h> |
15 | #include <linux/pagemap.h> | 15 | #include <linux/pagemap.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/sysctl.h> | 17 | #include <linux/sysctl.h> |
19 | #include <linux/log2.h> | 18 | #include <linux/log2.h> |
20 | #include <asm/mman.h> | 19 | #include <asm/mman.h> |
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c index f3de9d7a98b4..5dfd916e9ea6 100644 --- a/arch/ia64/mm/tlb.c +++ b/arch/ia64/mm/tlb.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/bootmem.h> | 24 | #include <linux/bootmem.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <asm/delay.h> | 27 | #include <asm/delay.h> |
27 | #include <asm/mmu_context.h> | 28 | #include <asm/mmu_context.h> |
diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c index c6d6b62db66c..cad775a1a157 100644 --- a/arch/ia64/sn/kernel/bte.c +++ b/arch/ia64/sn/kernel/bte.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/bootmem.h> | 19 | #include <linux/bootmem.h> |
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <asm/sn/bte.h> | 24 | #include <asm/sn/bte.h> |
24 | 25 | ||
diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c index 66f633bff059..8cdcb173a138 100644 --- a/arch/ia64/sn/kernel/io_acpi_init.c +++ b/arch/ia64/sn/kernel/io_acpi_init.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <asm/sn/sn_sal.h> | 13 | #include <asm/sn/sn_sal.h> |
14 | #include "xtalk/hubdev.h" | 14 | #include "xtalk/hubdev.h" |
15 | #include <linux/acpi.h> | 15 | #include <linux/acpi.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | 18 | ||
18 | /* | 19 | /* |
diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c index 308e6595110e..4433dd019d3c 100644 --- a/arch/ia64/sn/kernel/io_common.c +++ b/arch/ia64/sn/kernel/io_common.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/bootmem.h> | 9 | #include <linux/bootmem.h> |
10 | #include <linux/slab.h> | ||
10 | #include <asm/sn/types.h> | 11 | #include <asm/sn/types.h> |
11 | #include <asm/sn/addrs.h> | 12 | #include <asm/sn/addrs.h> |
12 | #include <asm/sn/sn_feature_sets.h> | 13 | #include <asm/sn/sn_feature_sets.h> |
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index ee774c366a06..98079f29d9a9 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Copyright (C) 1992 - 1997, 2000-2006 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 1992 - 1997, 2000-2006 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/slab.h> | ||
9 | #include <asm/sn/types.h> | 10 | #include <asm/sn/types.h> |
10 | #include <asm/sn/addrs.h> | 11 | #include <asm/sn/addrs.h> |
11 | #include <asm/sn/io.h> | 12 | #include <asm/sn/io.h> |
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c index 40d6eeda1c4b..13c15d968098 100644 --- a/arch/ia64/sn/kernel/irq.c +++ b/arch/ia64/sn/kernel/irq.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/rculist.h> | 14 | #include <linux/rculist.h> |
15 | #include <linux/slab.h> | ||
15 | #include <asm/sn/addrs.h> | 16 | #include <asm/sn/addrs.h> |
16 | #include <asm/sn/arch.h> | 17 | #include <asm/sn/arch.h> |
17 | #include <asm/sn/intr.h> | 18 | #include <asm/sn/intr.h> |
diff --git a/arch/ia64/sn/kernel/msi_sn.c b/arch/ia64/sn/kernel/msi_sn.c index fbbfb9701201..ebfdd6a9ae1a 100644 --- a/arch/ia64/sn/kernel/msi_sn.c +++ b/arch/ia64/sn/kernel/msi_sn.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
12 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
13 | #include <linux/msi.h> | 13 | #include <linux/msi.h> |
14 | #include <linux/slab.h> | ||
14 | 15 | ||
15 | #include <asm/sn/addrs.h> | 16 | #include <asm/sn/addrs.h> |
16 | #include <asm/sn/intr.h> | 17 | #include <asm/sn/intr.h> |
diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c index 98b684928e12..a9d310de57da 100644 --- a/arch/ia64/sn/pci/pci_dma.c +++ b/arch/ia64/sn/pci/pci_dma.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * a description of how these routines should be used. | 9 | * a description of how these routines should be used. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/gfp.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/dma-mapping.h> | 14 | #include <linux/dma-mapping.h> |
14 | #include <asm/dma.h> | 15 | #include <asm/dma.h> |
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c index d13e5a22a558..3cb5cf377644 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/interrupt.h> | 9 | #include <linux/interrupt.h> |
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
12 | #include <asm/sn/addrs.h> | 13 | #include <asm/sn/addrs.h> |
13 | #include <asm/sn/geo.h> | 14 | #include <asm/sn/geo.h> |
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c index efb454534e52..4d4536e3b6f3 100644 --- a/arch/ia64/sn/pci/tioca_provider.c +++ b/arch/ia64/sn/pci/tioca_provider.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
11 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
12 | #include <linux/bitmap.h> | 12 | #include <linux/bitmap.h> |
13 | #include <linux/slab.h> | ||
13 | #include <asm/sn/sn_sal.h> | 14 | #include <asm/sn/sn_sal.h> |
14 | #include <asm/sn/addrs.h> | 15 | #include <asm/sn/addrs.h> |
15 | #include <asm/sn/io.h> | 16 | #include <asm/sn/io.h> |
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c index 012f3b82ee55..27faba035f3a 100644 --- a/arch/ia64/sn/pci/tioce_provider.c +++ b/arch/ia64/sn/pci/tioce_provider.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
12 | #include <asm/sn/sn_sal.h> | 13 | #include <asm/sn/sn_sal.h> |
13 | #include <asm/sn/addrs.h> | 14 | #include <asm/sn/addrs.h> |
diff --git a/arch/ia64/xen/grant-table.c b/arch/ia64/xen/grant-table.c index 777dd9a9108b..48cca37625eb 100644 --- a/arch/ia64/xen/grant-table.c +++ b/arch/ia64/xen/grant-table.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/vmalloc.h> | 24 | #include <linux/vmalloc.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
26 | 27 | ||
27 | #include <xen/interface/xen.h> | 28 | #include <xen/interface/xen.h> |
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c index 67a01e1e4283..bc8c8c1511b2 100644 --- a/arch/m32r/kernel/process.c +++ b/arch/m32r/kernel/process.c | |||
@@ -21,10 +21,10 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/fs.h> | 23 | #include <linux/fs.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
25 | #include <linux/ptrace.h> | 26 | #include <linux/ptrace.h> |
26 | #include <linux/unistd.h> | 27 | #include <linux/unistd.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/hardirq.h> | 28 | #include <linux/hardirq.h> |
29 | 29 | ||
30 | #include <asm/io.h> | 30 | #include <asm/io.h> |
diff --git a/arch/m32r/mm/init.c b/arch/m32r/mm/init.c index 9f581df3952b..73e2205ebf5a 100644 --- a/arch/m32r/mm/init.c +++ b/arch/m32r/mm/init.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/bitops.h> | 19 | #include <linux/bitops.h> |
20 | #include <linux/nodemask.h> | 20 | #include <linux/nodemask.h> |
21 | #include <linux/pfn.h> | 21 | #include <linux/pfn.h> |
22 | #include <linux/gfp.h> | ||
22 | #include <asm/types.h> | 23 | #include <asm/types.h> |
23 | #include <asm/processor.h> | 24 | #include <asm/processor.h> |
24 | #include <asm/page.h> | 25 | #include <asm/page.h> |
diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c index c50bec8aabb1..b46ea1714a89 100644 --- a/arch/m68k/bvme6000/rtc.c +++ b/arch/m68k/bvme6000/rtc.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/miscdevice.h> | 11 | #include <linux/miscdevice.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/smp_lock.h> | 12 | #include <linux/smp_lock.h> |
14 | #include <linux/ioport.h> | 13 | #include <linux/ioport.h> |
15 | #include <linux/capability.h> | 14 | #include <linux/capability.h> |
diff --git a/arch/m68k/kernel/dma.c b/arch/m68k/kernel/dma.c index 2bb4245404d8..4bbb3c2a8880 100644 --- a/arch/m68k/kernel/dma.c +++ b/arch/m68k/kernel/dma.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/scatterlist.h> | 12 | #include <linux/scatterlist.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/vmalloc.h> | 14 | #include <linux/vmalloc.h> |
14 | 15 | ||
15 | #include <asm/pgalloc.h> | 16 | #include <asm/pgalloc.h> |
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c index 17c3f325255d..1a6be27cf165 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c | |||
@@ -15,13 +15,13 @@ | |||
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
19 | #include <linux/smp.h> | 20 | #include <linux/smp.h> |
20 | #include <linux/smp_lock.h> | 21 | #include <linux/smp_lock.h> |
21 | #include <linux/stddef.h> | 22 | #include <linux/stddef.h> |
22 | #include <linux/unistd.h> | 23 | #include <linux/unistd.h> |
23 | #include <linux/ptrace.h> | 24 | #include <linux/ptrace.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/user.h> | 25 | #include <linux/user.h> |
26 | #include <linux/reboot.h> | 26 | #include <linux/reboot.h> |
27 | #include <linux/init_task.h> | 27 | #include <linux/init_task.h> |
diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c index 5d818568b343..0f118ca156d9 100644 --- a/arch/m68k/mac/misc.c +++ b/arch/m68k/mac/misc.c | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/slab.h> | ||
12 | #include <linux/time.h> | 11 | #include <linux/time.h> |
13 | #include <linux/rtc.h> | 12 | #include <linux/rtc.h> |
14 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index 774549accd2d..8bc842554e5b 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/bootmem.h> | 19 | #include <linux/bootmem.h> |
20 | #include <linux/gfp.h> | ||
20 | 21 | ||
21 | #include <asm/setup.h> | 22 | #include <asm/setup.h> |
22 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
diff --git a/arch/m68k/mm/memory.c b/arch/m68k/mm/memory.c index b7473525b431..34c77ce24fba 100644 --- a/arch/m68k/mm/memory.c +++ b/arch/m68k/mm/memory.c | |||
@@ -9,9 +9,9 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
14 | #include <linux/pagemap.h> | 13 | #include <linux/pagemap.h> |
14 | #include <linux/gfp.h> | ||
15 | 15 | ||
16 | #include <asm/setup.h> | 16 | #include <asm/setup.h> |
17 | #include <asm/segment.h> | 17 | #include <asm/segment.h> |
diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index 4665fc84b7dc..02b7a03e4226 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/bootmem.h> | 20 | #include <linux/bootmem.h> |
21 | #include <linux/gfp.h> | ||
21 | 22 | ||
22 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
23 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
diff --git a/arch/m68k/mvme16x/rtc.c b/arch/m68k/mvme16x/rtc.c index cea5e3e4e636..8da9c250d3e1 100644 --- a/arch/m68k/mvme16x/rtc.c +++ b/arch/m68k/mvme16x/rtc.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/miscdevice.h> | 11 | #include <linux/miscdevice.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/smp_lock.h> | 12 | #include <linux/smp_lock.h> |
14 | #include <linux/ioport.h> | 13 | #include <linux/ioport.h> |
15 | #include <linux/capability.h> | 14 | #include <linux/capability.h> |
diff --git a/arch/m68k/sun3/sun3dvma.c b/arch/m68k/sun3/sun3dvma.c index f9277e8b4159..ca0966cac72a 100644 --- a/arch/m68k/sun3/sun3dvma.c +++ b/arch/m68k/sun3/sun3dvma.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/gfp.h> | ||
11 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
12 | #include <linux/list.h> | 13 | #include <linux/list.h> |
13 | 14 | ||
diff --git a/arch/m68k/sun3x/dvma.c b/arch/m68k/sun3x/dvma.c index 117481e86305..d5ddcdaa2347 100644 --- a/arch/m68k/sun3x/dvma.c +++ b/arch/m68k/sun3x/dvma.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/bitops.h> | 15 | #include <linux/bitops.h> |
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/bootmem.h> | 17 | #include <linux/bootmem.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
20 | 19 | ||
21 | #include <asm/sun3x.h> | 20 | #include <asm/sun3x.h> |
diff --git a/arch/m68knommu/kernel/dma.c b/arch/m68knommu/kernel/dma.c index aaf38bbbb6cd..fc61541aeb71 100644 --- a/arch/m68knommu/kernel/dma.c +++ b/arch/m68knommu/kernel/dma.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
9 | #include <linux/gfp.h> | ||
9 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
10 | #include <linux/device.h> | 11 | #include <linux/device.h> |
11 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c index 959cb249c759..6aa66134b433 100644 --- a/arch/m68knommu/kernel/process.c +++ b/arch/m68knommu/kernel/process.c | |||
@@ -23,11 +23,11 @@ | |||
23 | #include <linux/stddef.h> | 23 | #include <linux/stddef.h> |
24 | #include <linux/unistd.h> | 24 | #include <linux/unistd.h> |
25 | #include <linux/ptrace.h> | 25 | #include <linux/ptrace.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/user.h> | 26 | #include <linux/user.h> |
28 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
29 | #include <linux/reboot.h> | 28 | #include <linux/reboot.h> |
30 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/slab.h> | ||
31 | 31 | ||
32 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
33 | #include <asm/system.h> | 33 | #include <asm/system.h> |
diff --git a/arch/m68knommu/mm/init.c b/arch/m68knommu/mm/init.c index f3236d0b522d..8a6653f56bd8 100644 --- a/arch/m68knommu/mm/init.c +++ b/arch/m68knommu/mm/init.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/highmem.h> | 29 | #include <linux/highmem.h> |
30 | #include <linux/pagemap.h> | 30 | #include <linux/pagemap.h> |
31 | #include <linux/bootmem.h> | 31 | #include <linux/bootmem.h> |
32 | #include <linux/slab.h> | 32 | #include <linux/gfp.h> |
33 | 33 | ||
34 | #include <asm/setup.h> | 34 | #include <asm/setup.h> |
35 | #include <asm/segment.h> | 35 | #include <asm/segment.h> |
diff --git a/arch/m68knommu/mm/kmap.c b/arch/m68knommu/mm/kmap.c index bc32f38843f0..902c1dfda9e5 100644 --- a/arch/m68knommu/mm/kmap.c +++ b/arch/m68knommu/mm/kmap.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/vmalloc.h> | 12 | #include <linux/vmalloc.h> |
14 | 13 | ||
15 | #include <asm/setup.h> | 14 | #include <asm/setup.h> |
diff --git a/arch/m68knommu/mm/memory.c b/arch/m68knommu/mm/memory.c index d5b9e1357808..8f7949e786d4 100644 --- a/arch/m68knommu/mm/memory.c +++ b/arch/m68knommu/mm/memory.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/slab.h> | ||
19 | 18 | ||
20 | #include <asm/segment.h> | 19 | #include <asm/segment.h> |
21 | #include <asm/page.h> | 20 | #include <asm/page.h> |
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index 203ec61c6d4c..76818f926539 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
@@ -75,9 +75,6 @@ config LOCKDEP_SUPPORT | |||
75 | config HAVE_LATENCYTOP_SUPPORT | 75 | config HAVE_LATENCYTOP_SUPPORT |
76 | def_bool y | 76 | def_bool y |
77 | 77 | ||
78 | config PCI | ||
79 | def_bool n | ||
80 | |||
81 | config DTC | 78 | config DTC |
82 | def_bool y | 79 | def_bool y |
83 | 80 | ||
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 836832dd9b26..72f6e8583746 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile | |||
@@ -84,7 +84,7 @@ define archhelp | |||
84 | echo '* linux.bin - Create raw binary' | 84 | echo '* linux.bin - Create raw binary' |
85 | echo ' linux.bin.gz - Create compressed raw binary' | 85 | echo ' linux.bin.gz - Create compressed raw binary' |
86 | echo ' simpleImage.<dt> - ELF image with $(arch)/boot/dts/<dt>.dts linked in' | 86 | echo ' simpleImage.<dt> - ELF image with $(arch)/boot/dts/<dt>.dts linked in' |
87 | echo ' - stripped elf with fdt blob | 87 | echo ' - stripped elf with fdt blob' |
88 | echo ' simpleImage.<dt>.unstrip - full ELF image with fdt blob' | 88 | echo ' simpleImage.<dt>.unstrip - full ELF image with fdt blob' |
89 | echo ' *_defconfig - Select default config from arch/microblaze/configs' | 89 | echo ' *_defconfig - Select default config from arch/microblaze/configs' |
90 | echo '' | 90 | echo '' |
@@ -94,3 +94,5 @@ define archhelp | |||
94 | echo ' name of a dts file from the arch/microblaze/boot/dts/ directory' | 94 | echo ' name of a dts file from the arch/microblaze/boot/dts/ directory' |
95 | echo ' (minus the .dts extension).' | 95 | echo ' (minus the .dts extension).' |
96 | endef | 96 | endef |
97 | |||
98 | MRPROPER_FILES += $(boot)/simpleImage.* | ||
diff --git a/arch/microblaze/boot/Makefile b/arch/microblaze/boot/Makefile index 902cf9846c3c..57f50c2371c6 100644 --- a/arch/microblaze/boot/Makefile +++ b/arch/microblaze/boot/Makefile | |||
@@ -23,8 +23,6 @@ $(obj)/system.dtb: $(obj)/$(DTB).dtb | |||
23 | endif | 23 | endif |
24 | 24 | ||
25 | $(obj)/linux.bin: vmlinux FORCE | 25 | $(obj)/linux.bin: vmlinux FORCE |
26 | [ -n $(CONFIG_INITRAMFS_SOURCE) ] && [ ! -e $(CONFIG_INITRAMFS_SOURCE) ] && \ | ||
27 | touch $(CONFIG_INITRAMFS_SOURCE) || echo "No CPIO image" | ||
28 | $(call if_changed,objcopy) | 26 | $(call if_changed,objcopy) |
29 | $(call if_changed,uimage) | 27 | $(call if_changed,uimage) |
30 | @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' | 28 | @echo 'Kernel: $@ is ready' ' (#'`cat .version`')' |
@@ -62,6 +60,4 @@ quiet_cmd_dtc = DTC $@ | |||
62 | $(obj)/%.dtb: $(dtstree)/%.dts FORCE | 60 | $(obj)/%.dtb: $(dtstree)/%.dts FORCE |
63 | $(call if_changed,dtc) | 61 | $(call if_changed,dtc) |
64 | 62 | ||
65 | clean-kernel += linux.bin linux.bin.gz simpleImage.* | 63 | clean-files += *.dtb simpleImage.*.unstrip linux.bin.ub |
66 | |||
67 | clean-files += *.dtb simpleImage.*.unstrip | ||
diff --git a/arch/microblaze/include/asm/futex.h b/arch/microblaze/include/asm/futex.h index 8dbb6e7a03a2..ad3fd61b2fe7 100644 --- a/arch/microblaze/include/asm/futex.h +++ b/arch/microblaze/include/asm/futex.h | |||
@@ -55,7 +55,7 @@ futex_atomic_op_inuser(int encoded_op, int __user *uaddr) | |||
55 | __futex_atomic_op("or %1,%0,%4;", ret, oldval, uaddr, oparg); | 55 | __futex_atomic_op("or %1,%0,%4;", ret, oldval, uaddr, oparg); |
56 | break; | 56 | break; |
57 | case FUTEX_OP_ANDN: | 57 | case FUTEX_OP_ANDN: |
58 | __futex_atomic_op("and %1,%0,%4;", ret, oldval, uaddr, oparg); | 58 | __futex_atomic_op("andn %1,%0,%4;", ret, oldval, uaddr, oparg); |
59 | break; | 59 | break; |
60 | case FUTEX_OP_XOR: | 60 | case FUTEX_OP_XOR: |
61 | __futex_atomic_op("xor %1,%0,%4;", ret, oldval, uaddr, oparg); | 61 | __futex_atomic_op("xor %1,%0,%4;", ret, oldval, uaddr, oparg); |
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h index 32d621a56aee..e45a6eea92e0 100644 --- a/arch/microblaze/include/asm/io.h +++ b/arch/microblaze/include/asm/io.h | |||
@@ -108,6 +108,11 @@ static inline void writel(unsigned int v, volatile void __iomem *addr) | |||
108 | #define iowrite16(v, addr) __raw_writew((u16)(v), (u16 *)(addr)) | 108 | #define iowrite16(v, addr) __raw_writew((u16)(v), (u16 *)(addr)) |
109 | #define iowrite32(v, addr) __raw_writel((u32)(v), (u32 *)(addr)) | 109 | #define iowrite32(v, addr) __raw_writel((u32)(v), (u32 *)(addr)) |
110 | 110 | ||
111 | #define ioread16be(addr) __raw_readw((u16 *)(addr)) | ||
112 | #define ioread32be(addr) __raw_readl((u32 *)(addr)) | ||
113 | #define iowrite16be(v, addr) __raw_writew((u16)(v), (u16 *)(addr)) | ||
114 | #define iowrite32be(v, addr) __raw_writel((u32)(v), (u32 *)(addr)) | ||
115 | |||
111 | /* These are the definitions for the x86 IO instructions | 116 | /* These are the definitions for the x86 IO instructions |
112 | * inb/inw/inl/outb/outw/outl, the "string" versions | 117 | * inb/inw/inl/outb/outw/outl, the "string" versions |
113 | * insb/insw/insl/outsb/outsw/outsl, and the "pausing" versions | 118 | * insb/insw/insl/outsb/outsw/outsl, and the "pausing" versions |
diff --git a/arch/microblaze/include/asm/processor.h b/arch/microblaze/include/asm/processor.h index 563c6b9453f0..8eeb09211ece 100644 --- a/arch/microblaze/include/asm/processor.h +++ b/arch/microblaze/include/asm/processor.h | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> |
15 | #include <asm/setup.h> | 15 | #include <asm/setup.h> |
16 | #include <asm/registers.h> | 16 | #include <asm/registers.h> |
17 | #include <asm/segment.h> | ||
18 | #include <asm/entry.h> | 17 | #include <asm/entry.h> |
19 | #include <asm/current.h> | 18 | #include <asm/current.h> |
20 | 19 | ||
diff --git a/arch/microblaze/include/asm/segment.h b/arch/microblaze/include/asm/segment.h deleted file mode 100644 index 0e7102c3fb11..000000000000 --- a/arch/microblaze/include/asm/segment.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu> | ||
3 | * Copyright (C) 2008-2009 PetaLogix | ||
4 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | |||
11 | #ifndef _ASM_MICROBLAZE_SEGMENT_H | ||
12 | #define _ASM_MICROBLAZE_SEGMENT_H | ||
13 | |||
14 | # ifndef __ASSEMBLY__ | ||
15 | |||
16 | typedef struct { | ||
17 | unsigned long seg; | ||
18 | } mm_segment_t; | ||
19 | |||
20 | /* | ||
21 | * On Microblaze the fs value is actually the top of the corresponding | ||
22 | * address space. | ||
23 | * | ||
24 | * The fs value determines whether argument validity checking should be | ||
25 | * performed or not. If get_fs() == USER_DS, checking is performed, with | ||
26 | * get_fs() == KERNEL_DS, checking is bypassed. | ||
27 | * | ||
28 | * For historical reasons, these macros are grossly misnamed. | ||
29 | * | ||
30 | * For non-MMU arch like Microblaze, KERNEL_DS and USER_DS is equal. | ||
31 | */ | ||
32 | # define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) | ||
33 | |||
34 | # ifndef CONFIG_MMU | ||
35 | # define KERNEL_DS MAKE_MM_SEG(0) | ||
36 | # define USER_DS KERNEL_DS | ||
37 | # else | ||
38 | # define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF) | ||
39 | # define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) | ||
40 | # endif | ||
41 | |||
42 | # define get_ds() (KERNEL_DS) | ||
43 | # define get_fs() (current_thread_info()->addr_limit) | ||
44 | # define set_fs(val) (current_thread_info()->addr_limit = (val)) | ||
45 | |||
46 | # define segment_eq(a, b) ((a).seg == (b).seg) | ||
47 | |||
48 | # endif /* __ASSEMBLY__ */ | ||
49 | #endif /* _ASM_MICROBLAZE_SEGMENT_H */ | ||
diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h index 6e92885d381a..b2ca80f64640 100644 --- a/arch/microblaze/include/asm/thread_info.h +++ b/arch/microblaze/include/asm/thread_info.h | |||
@@ -19,7 +19,6 @@ | |||
19 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
20 | # include <linux/types.h> | 20 | # include <linux/types.h> |
21 | # include <asm/processor.h> | 21 | # include <asm/processor.h> |
22 | # include <asm/segment.h> | ||
23 | 22 | ||
24 | /* | 23 | /* |
25 | * low level task data that entry.S needs immediate access to | 24 | * low level task data that entry.S needs immediate access to |
@@ -60,6 +59,10 @@ struct cpu_context { | |||
60 | __u32 fsr; | 59 | __u32 fsr; |
61 | }; | 60 | }; |
62 | 61 | ||
62 | typedef struct { | ||
63 | unsigned long seg; | ||
64 | } mm_segment_t; | ||
65 | |||
63 | struct thread_info { | 66 | struct thread_info { |
64 | struct task_struct *task; /* main task structure */ | 67 | struct task_struct *task; /* main task structure */ |
65 | struct exec_domain *exec_domain; /* execution domain */ | 68 | struct exec_domain *exec_domain; /* execution domain */ |
diff --git a/arch/microblaze/include/asm/tlbflush.h b/arch/microblaze/include/asm/tlbflush.h index bcb8b41d55af..2e1353c2d18d 100644 --- a/arch/microblaze/include/asm/tlbflush.h +++ b/arch/microblaze/include/asm/tlbflush.h | |||
@@ -24,6 +24,7 @@ extern void _tlbie(unsigned long address); | |||
24 | extern void _tlbia(void); | 24 | extern void _tlbia(void); |
25 | 25 | ||
26 | #define __tlbia() { preempt_disable(); _tlbia(); preempt_enable(); } | 26 | #define __tlbia() { preempt_disable(); _tlbia(); preempt_enable(); } |
27 | #define __tlbie(x) { _tlbie(x); } | ||
27 | 28 | ||
28 | static inline void local_flush_tlb_all(void) | 29 | static inline void local_flush_tlb_all(void) |
29 | { __tlbia(); } | 30 | { __tlbia(); } |
@@ -31,7 +32,7 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm) | |||
31 | { __tlbia(); } | 32 | { __tlbia(); } |
32 | static inline void local_flush_tlb_page(struct vm_area_struct *vma, | 33 | static inline void local_flush_tlb_page(struct vm_area_struct *vma, |
33 | unsigned long vmaddr) | 34 | unsigned long vmaddr) |
34 | { _tlbie(vmaddr); } | 35 | { __tlbie(vmaddr); } |
35 | static inline void local_flush_tlb_range(struct vm_area_struct *vma, | 36 | static inline void local_flush_tlb_range(struct vm_area_struct *vma, |
36 | unsigned long start, unsigned long end) | 37 | unsigned long start, unsigned long end) |
37 | { __tlbia(); } | 38 | { __tlbia(); } |
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h index 371bd6e56d9a..446bec29b142 100644 --- a/arch/microblaze/include/asm/uaccess.h +++ b/arch/microblaze/include/asm/uaccess.h | |||
@@ -22,101 +22,73 @@ | |||
22 | #include <asm/mmu.h> | 22 | #include <asm/mmu.h> |
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
25 | #include <asm/segment.h> | ||
26 | #include <linux/string.h> | 25 | #include <linux/string.h> |
27 | 26 | ||
28 | #define VERIFY_READ 0 | 27 | #define VERIFY_READ 0 |
29 | #define VERIFY_WRITE 1 | 28 | #define VERIFY_WRITE 1 |
30 | 29 | ||
31 | #define __clear_user(addr, n) (memset((void *)(addr), 0, (n)), 0) | 30 | /* |
32 | 31 | * On Microblaze the fs value is actually the top of the corresponding | |
33 | #ifndef CONFIG_MMU | 32 | * address space. |
34 | 33 | * | |
35 | extern int ___range_ok(unsigned long addr, unsigned long size); | 34 | * The fs value determines whether argument validity checking should be |
36 | 35 | * performed or not. If get_fs() == USER_DS, checking is performed, with | |
37 | #define __range_ok(addr, size) \ | 36 | * get_fs() == KERNEL_DS, checking is bypassed. |
38 | ___range_ok((unsigned long)(addr), (unsigned long)(size)) | 37 | * |
39 | 38 | * For historical reasons, these macros are grossly misnamed. | |
40 | #define access_ok(type, addr, size) (__range_ok((addr), (size)) == 0) | 39 | * |
41 | #define __access_ok(add, size) (__range_ok((addr), (size)) == 0) | 40 | * For non-MMU arch like Microblaze, KERNEL_DS and USER_DS is equal. |
42 | 41 | */ | |
43 | /* Undefined function to trigger linker error */ | 42 | # define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) |
44 | extern int bad_user_access_length(void); | ||
45 | |||
46 | /* FIXME this is function for optimalization -> memcpy */ | ||
47 | #define __get_user(var, ptr) \ | ||
48 | ({ \ | ||
49 | int __gu_err = 0; \ | ||
50 | switch (sizeof(*(ptr))) { \ | ||
51 | case 1: \ | ||
52 | case 2: \ | ||
53 | case 4: \ | ||
54 | (var) = *(ptr); \ | ||
55 | break; \ | ||
56 | case 8: \ | ||
57 | memcpy((void *) &(var), (ptr), 8); \ | ||
58 | break; \ | ||
59 | default: \ | ||
60 | (var) = 0; \ | ||
61 | __gu_err = __get_user_bad(); \ | ||
62 | break; \ | ||
63 | } \ | ||
64 | __gu_err; \ | ||
65 | }) | ||
66 | 43 | ||
67 | #define __get_user_bad() (bad_user_access_length(), (-EFAULT)) | 44 | # ifndef CONFIG_MMU |
45 | # define KERNEL_DS MAKE_MM_SEG(0) | ||
46 | # define USER_DS KERNEL_DS | ||
47 | # else | ||
48 | # define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF) | ||
49 | # define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) | ||
50 | # endif | ||
68 | 51 | ||
69 | /* FIXME is not there defined __pu_val */ | 52 | # define get_ds() (KERNEL_DS) |
70 | #define __put_user(var, ptr) \ | 53 | # define get_fs() (current_thread_info()->addr_limit) |
71 | ({ \ | 54 | # define set_fs(val) (current_thread_info()->addr_limit = (val)) |
72 | int __pu_err = 0; \ | ||
73 | switch (sizeof(*(ptr))) { \ | ||
74 | case 1: \ | ||
75 | case 2: \ | ||
76 | case 4: \ | ||
77 | *(ptr) = (var); \ | ||
78 | break; \ | ||
79 | case 8: { \ | ||
80 | typeof(*(ptr)) __pu_val = (var); \ | ||
81 | memcpy(ptr, &__pu_val, sizeof(__pu_val)); \ | ||
82 | } \ | ||
83 | break; \ | ||
84 | default: \ | ||
85 | __pu_err = __put_user_bad(); \ | ||
86 | break; \ | ||
87 | } \ | ||
88 | __pu_err; \ | ||
89 | }) | ||
90 | 55 | ||
91 | #define __put_user_bad() (bad_user_access_length(), (-EFAULT)) | 56 | # define segment_eq(a, b) ((a).seg == (b).seg) |
92 | 57 | ||
93 | #define put_user(x, ptr) __put_user((x), (ptr)) | 58 | /* |
94 | #define get_user(x, ptr) __get_user((x), (ptr)) | 59 | * The exception table consists of pairs of addresses: the first is the |
60 | * address of an instruction that is allowed to fault, and the second is | ||
61 | * the address at which the program should continue. No registers are | ||
62 | * modified, so it is entirely up to the continuation code to figure out | ||
63 | * what to do. | ||
64 | * | ||
65 | * All the routines below use bits of fixup code that are out of line | ||
66 | * with the main instruction path. This means when everything is well, | ||
67 | * we don't even have to jump over them. Further, they do not intrude | ||
68 | * on our cache or tlb entries. | ||
69 | */ | ||
70 | struct exception_table_entry { | ||
71 | unsigned long insn, fixup; | ||
72 | }; | ||
95 | 73 | ||
96 | #define copy_to_user(to, from, n) (memcpy((to), (from), (n)), 0) | 74 | /* Returns 0 if exception not found and fixup otherwise. */ |
97 | #define copy_from_user(to, from, n) (memcpy((to), (from), (n)), 0) | 75 | extern unsigned long search_exception_table(unsigned long); |
98 | 76 | ||
99 | #define __copy_to_user(to, from, n) (copy_to_user((to), (from), (n))) | 77 | #ifndef CONFIG_MMU |
100 | #define __copy_from_user(to, from, n) (copy_from_user((to), (from), (n))) | ||
101 | #define __copy_to_user_inatomic(to, from, n) \ | ||
102 | (__copy_to_user((to), (from), (n))) | ||
103 | #define __copy_from_user_inatomic(to, from, n) \ | ||
104 | (__copy_from_user((to), (from), (n))) | ||
105 | 78 | ||
106 | static inline unsigned long clear_user(void *addr, unsigned long size) | 79 | /* Check against bounds of physical memory */ |
80 | static inline int ___range_ok(unsigned long addr, unsigned long size) | ||
107 | { | 81 | { |
108 | if (access_ok(VERIFY_WRITE, addr, size)) | 82 | return ((addr < memory_start) || |
109 | size = __clear_user(addr, size); | 83 | ((addr + size) > memory_end)); |
110 | return size; | ||
111 | } | 84 | } |
112 | 85 | ||
113 | /* Returns 0 if exception not found and fixup otherwise. */ | 86 | #define __range_ok(addr, size) \ |
114 | extern unsigned long search_exception_table(unsigned long); | 87 | ___range_ok((unsigned long)(addr), (unsigned long)(size)) |
115 | 88 | ||
116 | extern long strncpy_from_user(char *dst, const char *src, long count); | 89 | #define access_ok(type, addr, size) (__range_ok((addr), (size)) == 0) |
117 | extern long strnlen_user(const char *src, long count); | ||
118 | 90 | ||
119 | #else /* CONFIG_MMU */ | 91 | #else |
120 | 92 | ||
121 | /* | 93 | /* |
122 | * Address is valid if: | 94 | * Address is valid if: |
@@ -129,24 +101,88 @@ extern long strnlen_user(const char *src, long count); | |||
129 | /* || printk("access_ok failed for %s at 0x%08lx (size %d), seg 0x%08x\n", | 101 | /* || printk("access_ok failed for %s at 0x%08lx (size %d), seg 0x%08x\n", |
130 | type?"WRITE":"READ",addr,size,get_fs().seg)) */ | 102 | type?"WRITE":"READ",addr,size,get_fs().seg)) */ |
131 | 103 | ||
132 | /* | 104 | #endif |
133 | * All the __XXX versions macros/functions below do not perform | ||
134 | * access checking. It is assumed that the necessary checks have been | ||
135 | * already performed before the finction (macro) is called. | ||
136 | */ | ||
137 | 105 | ||
138 | #define get_user(x, ptr) \ | 106 | #ifdef CONFIG_MMU |
139 | ({ \ | 107 | # define __FIXUP_SECTION ".section .fixup,\"ax\"\n" |
140 | access_ok(VERIFY_READ, (ptr), sizeof(*(ptr))) \ | 108 | # define __EX_TABLE_SECTION ".section __ex_table,\"a\"\n" |
141 | ? __get_user((x), (ptr)) : -EFAULT; \ | 109 | #else |
142 | }) | 110 | # define __FIXUP_SECTION ".section .discard,\"ax\"\n" |
111 | # define __EX_TABLE_SECTION ".section .discard,\"a\"\n" | ||
112 | #endif | ||
143 | 113 | ||
144 | #define put_user(x, ptr) \ | 114 | extern unsigned long __copy_tofrom_user(void __user *to, |
145 | ({ \ | 115 | const void __user *from, unsigned long size); |
146 | access_ok(VERIFY_WRITE, (ptr), sizeof(*(ptr))) \ | 116 | |
147 | ? __put_user((x), (ptr)) : -EFAULT; \ | 117 | /* Return: number of not copied bytes, i.e. 0 if OK or non-zero if fail. */ |
118 | static inline unsigned long __must_check __clear_user(void __user *to, | ||
119 | unsigned long n) | ||
120 | { | ||
121 | /* normal memset with two words to __ex_table */ | ||
122 | __asm__ __volatile__ ( \ | ||
123 | "1: sb r0, %2, r0;" \ | ||
124 | " addik %0, %0, -1;" \ | ||
125 | " bneid %0, 1b;" \ | ||
126 | " addik %2, %2, 1;" \ | ||
127 | "2: " \ | ||
128 | __EX_TABLE_SECTION \ | ||
129 | ".word 1b,2b;" \ | ||
130 | ".previous;" \ | ||
131 | : "=r"(n) \ | ||
132 | : "0"(n), "r"(to) | ||
133 | ); | ||
134 | return n; | ||
135 | } | ||
136 | |||
137 | static inline unsigned long __must_check clear_user(void __user *to, | ||
138 | unsigned long n) | ||
139 | { | ||
140 | might_sleep(); | ||
141 | if (unlikely(!access_ok(VERIFY_WRITE, to, n))) | ||
142 | return n; | ||
143 | |||
144 | return __clear_user(to, n); | ||
145 | } | ||
146 | |||
147 | /* put_user and get_user macros */ | ||
148 | extern long __user_bad(void); | ||
149 | |||
150 | #define __get_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ | ||
151 | ({ \ | ||
152 | __asm__ __volatile__ ( \ | ||
153 | "1:" insn " %1, %2, r0;" \ | ||
154 | " addk %0, r0, r0;" \ | ||
155 | "2: " \ | ||
156 | __FIXUP_SECTION \ | ||
157 | "3: brid 2b;" \ | ||
158 | " addik %0, r0, %3;" \ | ||
159 | ".previous;" \ | ||
160 | __EX_TABLE_SECTION \ | ||
161 | ".word 1b,3b;" \ | ||
162 | ".previous;" \ | ||
163 | : "=&r"(__gu_err), "=r"(__gu_val) \ | ||
164 | : "r"(__gu_ptr), "i"(-EFAULT) \ | ||
165 | ); \ | ||
148 | }) | 166 | }) |
149 | 167 | ||
168 | /** | ||
169 | * get_user: - Get a simple variable from user space. | ||
170 | * @x: Variable to store result. | ||
171 | * @ptr: Source address, in user space. | ||
172 | * | ||
173 | * Context: User context only. This function may sleep. | ||
174 | * | ||
175 | * This macro copies a single simple variable from user space to kernel | ||
176 | * space. It supports simple types like char and int, but not larger | ||
177 | * data types like structures or arrays. | ||
178 | * | ||
179 | * @ptr must have pointer-to-simple-variable type, and the result of | ||
180 | * dereferencing @ptr must be assignable to @x without a cast. | ||
181 | * | ||
182 | * Returns zero on success, or -EFAULT on error. | ||
183 | * On error, the variable @x is set to zero. | ||
184 | */ | ||
185 | |||
150 | #define __get_user(x, ptr) \ | 186 | #define __get_user(x, ptr) \ |
151 | ({ \ | 187 | ({ \ |
152 | unsigned long __gu_val; \ | 188 | unsigned long __gu_val; \ |
@@ -163,30 +199,74 @@ extern long strnlen_user(const char *src, long count); | |||
163 | __get_user_asm("lw", (ptr), __gu_val, __gu_err); \ | 199 | __get_user_asm("lw", (ptr), __gu_val, __gu_err); \ |
164 | break; \ | 200 | break; \ |
165 | default: \ | 201 | default: \ |
166 | __gu_val = 0; __gu_err = -EINVAL; \ | 202 | /* __gu_val = 0; __gu_err = -EINVAL;*/ __gu_err = __user_bad();\ |
167 | } \ | 203 | } \ |
168 | x = (__typeof__(*(ptr))) __gu_val; \ | 204 | x = (__typeof__(*(ptr))) __gu_val; \ |
169 | __gu_err; \ | 205 | __gu_err; \ |
170 | }) | 206 | }) |
171 | 207 | ||
172 | #define __get_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ | 208 | |
209 | #define get_user(x, ptr) \ | ||
173 | ({ \ | 210 | ({ \ |
174 | __asm__ __volatile__ ( \ | 211 | access_ok(VERIFY_READ, (ptr), sizeof(*(ptr))) \ |
175 | "1:" insn " %1, %2, r0; \ | 212 | ? __get_user((x), (ptr)) : -EFAULT; \ |
176 | addk %0, r0, r0; \ | 213 | }) |
177 | 2: \ | 214 | |
178 | .section .fixup,\"ax\"; \ | 215 | #define __put_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ |
179 | 3: brid 2b; \ | 216 | ({ \ |
180 | addik %0, r0, %3; \ | 217 | __asm__ __volatile__ ( \ |
181 | .previous; \ | 218 | "1:" insn " %1, %2, r0;" \ |
182 | .section __ex_table,\"a\"; \ | 219 | " addk %0, r0, r0;" \ |
183 | .word 1b,3b; \ | 220 | "2: " \ |
184 | .previous;" \ | 221 | __FIXUP_SECTION \ |
185 | : "=r"(__gu_err), "=r"(__gu_val) \ | 222 | "3: brid 2b;" \ |
186 | : "r"(__gu_ptr), "i"(-EFAULT) \ | 223 | " addik %0, r0, %3;" \ |
187 | ); \ | 224 | ".previous;" \ |
225 | __EX_TABLE_SECTION \ | ||
226 | ".word 1b,3b;" \ | ||
227 | ".previous;" \ | ||
228 | : "=&r"(__gu_err) \ | ||
229 | : "r"(__gu_val), "r"(__gu_ptr), "i"(-EFAULT) \ | ||
230 | ); \ | ||
188 | }) | 231 | }) |
189 | 232 | ||
233 | #define __put_user_asm_8(__gu_ptr, __gu_val, __gu_err) \ | ||
234 | ({ \ | ||
235 | __asm__ __volatile__ (" lwi %0, %1, 0;" \ | ||
236 | "1: swi %0, %2, 0;" \ | ||
237 | " lwi %0, %1, 4;" \ | ||
238 | "2: swi %0, %2, 4;" \ | ||
239 | " addk %0, r0, r0;" \ | ||
240 | "3: " \ | ||
241 | __FIXUP_SECTION \ | ||
242 | "4: brid 3b;" \ | ||
243 | " addik %0, r0, %3;" \ | ||
244 | ".previous;" \ | ||
245 | __EX_TABLE_SECTION \ | ||
246 | ".word 1b,4b,2b,4b;" \ | ||
247 | ".previous;" \ | ||
248 | : "=&r"(__gu_err) \ | ||
249 | : "r"(&__gu_val), "r"(__gu_ptr), "i"(-EFAULT) \ | ||
250 | ); \ | ||
251 | }) | ||
252 | |||
253 | /** | ||
254 | * put_user: - Write a simple value into user space. | ||
255 | * @x: Value to copy to user space. | ||
256 | * @ptr: Destination address, in user space. | ||
257 | * | ||
258 | * Context: User context only. This function may sleep. | ||
259 | * | ||
260 | * This macro copies a single simple value from kernel space to user | ||
261 | * space. It supports simple types like char and int, but not larger | ||
262 | * data types like structures or arrays. | ||
263 | * | ||
264 | * @ptr must have pointer-to-simple-variable type, and @x must be assignable | ||
265 | * to the result of dereferencing @ptr. | ||
266 | * | ||
267 | * Returns zero on success, or -EFAULT on error. | ||
268 | */ | ||
269 | |||
190 | #define __put_user(x, ptr) \ | 270 | #define __put_user(x, ptr) \ |
191 | ({ \ | 271 | ({ \ |
192 | __typeof__(*(ptr)) volatile __gu_val = (x); \ | 272 | __typeof__(*(ptr)) volatile __gu_val = (x); \ |
@@ -195,7 +275,7 @@ extern long strnlen_user(const char *src, long count); | |||
195 | case 1: \ | 275 | case 1: \ |
196 | __put_user_asm("sb", (ptr), __gu_val, __gu_err); \ | 276 | __put_user_asm("sb", (ptr), __gu_val, __gu_err); \ |
197 | break; \ | 277 | break; \ |
198 | case 2: \ | 278 | case 2: \ |
199 | __put_user_asm("sh", (ptr), __gu_val, __gu_err); \ | 279 | __put_user_asm("sh", (ptr), __gu_val, __gu_err); \ |
200 | break; \ | 280 | break; \ |
201 | case 4: \ | 281 | case 4: \ |
@@ -205,121 +285,82 @@ extern long strnlen_user(const char *src, long count); | |||
205 | __put_user_asm_8((ptr), __gu_val, __gu_err); \ | 285 | __put_user_asm_8((ptr), __gu_val, __gu_err); \ |
206 | break; \ | 286 | break; \ |
207 | default: \ | 287 | default: \ |
208 | __gu_err = -EINVAL; \ | 288 | /*__gu_err = -EINVAL;*/ __gu_err = __user_bad(); \ |
209 | } \ | 289 | } \ |
210 | __gu_err; \ | 290 | __gu_err; \ |
211 | }) | 291 | }) |
212 | 292 | ||
213 | #define __put_user_asm_8(__gu_ptr, __gu_val, __gu_err) \ | 293 | #ifndef CONFIG_MMU |
214 | ({ \ | ||
215 | __asm__ __volatile__ (" lwi %0, %1, 0; \ | ||
216 | 1: swi %0, %2, 0; \ | ||
217 | lwi %0, %1, 4; \ | ||
218 | 2: swi %0, %2, 4; \ | ||
219 | addk %0,r0,r0; \ | ||
220 | 3: \ | ||
221 | .section .fixup,\"ax\"; \ | ||
222 | 4: brid 3b; \ | ||
223 | addik %0, r0, %3; \ | ||
224 | .previous; \ | ||
225 | .section __ex_table,\"a\"; \ | ||
226 | .word 1b,4b,2b,4b; \ | ||
227 | .previous;" \ | ||
228 | : "=&r"(__gu_err) \ | ||
229 | : "r"(&__gu_val), \ | ||
230 | "r"(__gu_ptr), "i"(-EFAULT) \ | ||
231 | ); \ | ||
232 | }) | ||
233 | 294 | ||
234 | #define __put_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ | 295 | #define put_user(x, ptr) __put_user((x), (ptr)) |
235 | ({ \ | ||
236 | __asm__ __volatile__ ( \ | ||
237 | "1:" insn " %1, %2, r0; \ | ||
238 | addk %0, r0, r0; \ | ||
239 | 2: \ | ||
240 | .section .fixup,\"ax\"; \ | ||
241 | 3: brid 2b; \ | ||
242 | addik %0, r0, %3; \ | ||
243 | .previous; \ | ||
244 | .section __ex_table,\"a\"; \ | ||
245 | .word 1b,3b; \ | ||
246 | .previous;" \ | ||
247 | : "=r"(__gu_err) \ | ||
248 | : "r"(__gu_val), "r"(__gu_ptr), "i"(-EFAULT) \ | ||
249 | ); \ | ||
250 | }) | ||
251 | 296 | ||
252 | /* | 297 | #else /* CONFIG_MMU */ |
253 | * Return: number of not copied bytes, i.e. 0 if OK or non-zero if fail. | ||
254 | */ | ||
255 | static inline int clear_user(char *to, int size) | ||
256 | { | ||
257 | if (size && access_ok(VERIFY_WRITE, to, size)) { | ||
258 | __asm__ __volatile__ (" \ | ||
259 | 1: \ | ||
260 | sb r0, %2, r0; \ | ||
261 | addik %0, %0, -1; \ | ||
262 | bneid %0, 1b; \ | ||
263 | addik %2, %2, 1; \ | ||
264 | 2: \ | ||
265 | .section __ex_table,\"a\"; \ | ||
266 | .word 1b,2b; \ | ||
267 | .section .text;" \ | ||
268 | : "=r"(size) \ | ||
269 | : "0"(size), "r"(to) | ||
270 | ); | ||
271 | } | ||
272 | return size; | ||
273 | } | ||
274 | 298 | ||
275 | #define __copy_from_user(to, from, n) copy_from_user((to), (from), (n)) | 299 | #define put_user(x, ptr) \ |
300 | ({ \ | ||
301 | access_ok(VERIFY_WRITE, (ptr), sizeof(*(ptr))) \ | ||
302 | ? __put_user((x), (ptr)) : -EFAULT; \ | ||
303 | }) | ||
304 | #endif /* CONFIG_MMU */ | ||
305 | |||
306 | /* copy_to_from_user */ | ||
307 | #define __copy_from_user(to, from, n) \ | ||
308 | __copy_tofrom_user((__force void __user *)(to), \ | ||
309 | (void __user *)(from), (n)) | ||
276 | #define __copy_from_user_inatomic(to, from, n) \ | 310 | #define __copy_from_user_inatomic(to, from, n) \ |
277 | copy_from_user((to), (from), (n)) | 311 | copy_from_user((to), (from), (n)) |
278 | 312 | ||
279 | #define copy_to_user(to, from, n) \ | 313 | static inline long copy_from_user(void *to, |
280 | (access_ok(VERIFY_WRITE, (to), (n)) ? \ | 314 | const void __user *from, unsigned long n) |
281 | __copy_tofrom_user((void __user *)(to), \ | 315 | { |
282 | (__force const void __user *)(from), (n)) \ | 316 | might_sleep(); |
283 | : -EFAULT) | 317 | if (access_ok(VERIFY_READ, from, n)) |
318 | return __copy_from_user(to, from, n); | ||
319 | return n; | ||
320 | } | ||
284 | 321 | ||
285 | #define __copy_to_user(to, from, n) copy_to_user((to), (from), (n)) | 322 | #define __copy_to_user(to, from, n) \ |
323 | __copy_tofrom_user((void __user *)(to), \ | ||
324 | (__force const void __user *)(from), (n)) | ||
286 | #define __copy_to_user_inatomic(to, from, n) copy_to_user((to), (from), (n)) | 325 | #define __copy_to_user_inatomic(to, from, n) copy_to_user((to), (from), (n)) |
287 | 326 | ||
288 | #define copy_from_user(to, from, n) \ | 327 | static inline long copy_to_user(void __user *to, |
289 | (access_ok(VERIFY_READ, (from), (n)) ? \ | 328 | const void *from, unsigned long n) |
290 | __copy_tofrom_user((__force void __user *)(to), \ | 329 | { |
291 | (void __user *)(from), (n)) \ | 330 | might_sleep(); |
292 | : -EFAULT) | 331 | if (access_ok(VERIFY_WRITE, to, n)) |
332 | return __copy_to_user(to, from, n); | ||
333 | return n; | ||
334 | } | ||
293 | 335 | ||
336 | /* | ||
337 | * Copy a null terminated string from userspace. | ||
338 | */ | ||
294 | extern int __strncpy_user(char *to, const char __user *from, int len); | 339 | extern int __strncpy_user(char *to, const char __user *from, int len); |
295 | extern int __strnlen_user(const char __user *sstr, int len); | ||
296 | 340 | ||
297 | #define strncpy_from_user(to, from, len) \ | 341 | #define __strncpy_from_user __strncpy_user |
298 | (access_ok(VERIFY_READ, from, 1) ? \ | ||
299 | __strncpy_user(to, from, len) : -EFAULT) | ||
300 | #define strnlen_user(str, len) \ | ||
301 | (access_ok(VERIFY_READ, str, 1) ? __strnlen_user(str, len) : 0) | ||
302 | 342 | ||
303 | #endif /* CONFIG_MMU */ | 343 | static inline long |
304 | 344 | strncpy_from_user(char *dst, const char __user *src, long count) | |
305 | extern unsigned long __copy_tofrom_user(void __user *to, | 345 | { |
306 | const void __user *from, unsigned long size); | 346 | if (!access_ok(VERIFY_READ, src, 1)) |
347 | return -EFAULT; | ||
348 | return __strncpy_from_user(dst, src, count); | ||
349 | } | ||
307 | 350 | ||
308 | /* | 351 | /* |
309 | * The exception table consists of pairs of addresses: the first is the | 352 | * Return the size of a string (including the ending 0) |
310 | * address of an instruction that is allowed to fault, and the second is | ||
311 | * the address at which the program should continue. No registers are | ||
312 | * modified, so it is entirely up to the continuation code to figure out | ||
313 | * what to do. | ||
314 | * | 353 | * |
315 | * All the routines below use bits of fixup code that are out of line | 354 | * Return 0 on exception, a value greater than N if too long |
316 | * with the main instruction path. This means when everything is well, | ||
317 | * we don't even have to jump over them. Further, they do not intrude | ||
318 | * on our cache or tlb entries. | ||
319 | */ | 355 | */ |
320 | struct exception_table_entry { | 356 | extern int __strnlen_user(const char __user *sstr, int len); |
321 | unsigned long insn, fixup; | 357 | |
322 | }; | 358 | static inline long strnlen_user(const char __user *src, long n) |
359 | { | ||
360 | if (!access_ok(VERIFY_READ, src, 1)) | ||
361 | return 0; | ||
362 | return __strnlen_user(src, n); | ||
363 | } | ||
323 | 364 | ||
324 | #endif /* __ASSEMBLY__ */ | 365 | #endif /* __ASSEMBLY__ */ |
325 | #endif /* __KERNEL__ */ | 366 | #endif /* __KERNEL__ */ |
diff --git a/arch/microblaze/kernel/cpu/cpuinfo.c b/arch/microblaze/kernel/cpu/cpuinfo.c index 991d71311b0e..255ef880351e 100644 --- a/arch/microblaze/kernel/cpu/cpuinfo.c +++ b/arch/microblaze/kernel/cpu/cpuinfo.c | |||
@@ -9,7 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/slab.h> | ||
13 | #include <asm/cpuinfo.h> | 12 | #include <asm/cpuinfo.h> |
14 | #include <asm/pvr.h> | 13 | #include <asm/pvr.h> |
15 | 14 | ||
diff --git a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c index b1084974fccd..ce72dd4967cf 100644 --- a/arch/microblaze/kernel/dma.c +++ b/arch/microblaze/kernel/dma.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/dma-mapping.h> | 10 | #include <linux/dma-mapping.h> |
11 | #include <linux/gfp.h> | ||
11 | #include <linux/dma-debug.h> | 12 | #include <linux/dma-debug.h> |
12 | #include <asm/bug.h> | 13 | #include <asm/bug.h> |
13 | #include <asm/cacheflush.h> | 14 | #include <asm/cacheflush.h> |
@@ -37,7 +38,7 @@ static inline void __dma_sync_page(unsigned long paddr, unsigned long offset, | |||
37 | 38 | ||
38 | static unsigned long get_dma_direct_offset(struct device *dev) | 39 | static unsigned long get_dma_direct_offset(struct device *dev) |
39 | { | 40 | { |
40 | if (dev) | 41 | if (likely(dev)) |
41 | return (unsigned long)dev->archdata.dma_data; | 42 | return (unsigned long)dev->archdata.dma_data; |
42 | 43 | ||
43 | return PCI_DRAM_OFFSET; /* FIXME Not sure if is correct */ | 44 | return PCI_DRAM_OFFSET; /* FIXME Not sure if is correct */ |
diff --git a/arch/microblaze/kernel/ftrace.c b/arch/microblaze/kernel/ftrace.c index 388b31ca65a1..515feb404555 100644 --- a/arch/microblaze/kernel/ftrace.c +++ b/arch/microblaze/kernel/ftrace.c | |||
@@ -151,13 +151,10 @@ int ftrace_make_nop(struct module *mod, | |||
151 | return ret; | 151 | return ret; |
152 | } | 152 | } |
153 | 153 | ||
154 | static int ret_addr; /* initialized as 0 by default */ | ||
155 | |||
156 | /* I believe that first is called ftrace_make_nop before this function */ | 154 | /* I believe that first is called ftrace_make_nop before this function */ |
157 | int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) | 155 | int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) |
158 | { | 156 | { |
159 | int ret; | 157 | int ret; |
160 | ret_addr = addr; /* saving where the barrier jump is */ | ||
161 | pr_debug("%s: addr:0x%x, rec->ip: 0x%x, imm:0x%x\n", | 158 | pr_debug("%s: addr:0x%x, rec->ip: 0x%x, imm:0x%x\n", |
162 | __func__, (unsigned int)addr, (unsigned int)rec->ip, imm); | 159 | __func__, (unsigned int)addr, (unsigned int)rec->ip, imm); |
163 | ret = ftrace_modify_code(rec->ip, imm); | 160 | ret = ftrace_modify_code(rec->ip, imm); |
@@ -194,12 +191,9 @@ int ftrace_update_ftrace_func(ftrace_func_t func) | |||
194 | ret = ftrace_modify_code(ip, upper); | 191 | ret = ftrace_modify_code(ip, upper); |
195 | ret += ftrace_modify_code(ip + 4, lower); | 192 | ret += ftrace_modify_code(ip + 4, lower); |
196 | 193 | ||
197 | /* We just need to remove the rtsd r15, 8 by NOP */ | 194 | /* We just need to replace the rtsd r15, 8 with NOP */ |
198 | BUG_ON(!ret_addr); | 195 | ret += ftrace_modify_code((unsigned long)&ftrace_caller, |
199 | if (ret_addr) | 196 | MICROBLAZE_NOP); |
200 | ret += ftrace_modify_code(ret_addr, MICROBLAZE_NOP); | ||
201 | else | ||
202 | ret = 1; /* fault */ | ||
203 | 197 | ||
204 | /* All changes are done - lets do caches consistent */ | 198 | /* All changes are done - lets do caches consistent */ |
205 | flush_icache(); | 199 | flush_icache(); |
diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S index cb7815cfe5ab..da6a5f5dc766 100644 --- a/arch/microblaze/kernel/head.S +++ b/arch/microblaze/kernel/head.S | |||
@@ -51,6 +51,12 @@ swapper_pg_dir: | |||
51 | 51 | ||
52 | .text | 52 | .text |
53 | ENTRY(_start) | 53 | ENTRY(_start) |
54 | #if CONFIG_KERNEL_BASE_ADDR == 0 | ||
55 | brai TOPHYS(real_start) | ||
56 | .org 0x100 | ||
57 | real_start: | ||
58 | #endif | ||
59 | |||
54 | mfs r1, rmsr | 60 | mfs r1, rmsr |
55 | andi r1, r1, ~2 | 61 | andi r1, r1, ~2 |
56 | mts rmsr, r1 | 62 | mts rmsr, r1 |
@@ -99,8 +105,8 @@ no_fdt_arg: | |||
99 | tophys(r4,r4) /* convert to phys address */ | 105 | tophys(r4,r4) /* convert to phys address */ |
100 | ori r3, r0, COMMAND_LINE_SIZE - 1 /* number of loops */ | 106 | ori r3, r0, COMMAND_LINE_SIZE - 1 /* number of loops */ |
101 | _copy_command_line: | 107 | _copy_command_line: |
102 | lbu r2, r5, r6 /* r7=r5+r6 - r5 contain pointer to command line */ | 108 | lbu r2, r5, r6 /* r2=r5+r6 - r5 contain pointer to command line */ |
103 | sb r2, r4, r6 /* addr[r4+r6]= r7*/ | 109 | sb r2, r4, r6 /* addr[r4+r6]= r2*/ |
104 | addik r6, r6, 1 /* increment counting */ | 110 | addik r6, r6, 1 /* increment counting */ |
105 | bgtid r3, _copy_command_line /* loop for all entries */ | 111 | bgtid r3, _copy_command_line /* loop for all entries */ |
106 | addik r3, r3, -1 /* descrement loop */ | 112 | addik r3, r3, -1 /* descrement loop */ |
@@ -128,7 +134,7 @@ _copy_bram: | |||
128 | * virtual to physical. | 134 | * virtual to physical. |
129 | */ | 135 | */ |
130 | nop | 136 | nop |
131 | addik r3, r0, 63 /* Invalidate all TLB entries */ | 137 | addik r3, r0, MICROBLAZE_TLB_SIZE -1 /* Invalidate all TLB entries */ |
132 | _invalidate: | 138 | _invalidate: |
133 | mts rtlbx, r3 | 139 | mts rtlbx, r3 |
134 | mts rtlbhi, r0 /* flush: ensure V is clear */ | 140 | mts rtlbhi, r0 /* flush: ensure V is clear */ |
diff --git a/arch/microblaze/kernel/hw_exception_handler.S b/arch/microblaze/kernel/hw_exception_handler.S index 2b86c03aa841..995a2123635b 100644 --- a/arch/microblaze/kernel/hw_exception_handler.S +++ b/arch/microblaze/kernel/hw_exception_handler.S | |||
@@ -313,13 +313,13 @@ _hw_exception_handler: | |||
313 | mfs r5, rmsr; | 313 | mfs r5, rmsr; |
314 | nop | 314 | nop |
315 | swi r5, r1, 0; | 315 | swi r5, r1, 0; |
316 | mfs r3, resr | 316 | mfs r4, resr |
317 | nop | 317 | nop |
318 | mfs r4, rear; | 318 | mfs r3, rear; |
319 | nop | 319 | nop |
320 | 320 | ||
321 | #ifndef CONFIG_MMU | 321 | #ifndef CONFIG_MMU |
322 | andi r5, r3, 0x1000; /* Check ESR[DS] */ | 322 | andi r5, r4, 0x1000; /* Check ESR[DS] */ |
323 | beqi r5, not_in_delay_slot; /* Branch if ESR[DS] not set */ | 323 | beqi r5, not_in_delay_slot; /* Branch if ESR[DS] not set */ |
324 | mfs r17, rbtr; /* ESR[DS] set - return address in BTR */ | 324 | mfs r17, rbtr; /* ESR[DS] set - return address in BTR */ |
325 | nop | 325 | nop |
@@ -327,13 +327,14 @@ not_in_delay_slot: | |||
327 | swi r17, r1, PT_R17 | 327 | swi r17, r1, PT_R17 |
328 | #endif | 328 | #endif |
329 | 329 | ||
330 | andi r5, r3, 0x1F; /* Extract ESR[EXC] */ | 330 | andi r5, r4, 0x1F; /* Extract ESR[EXC] */ |
331 | 331 | ||
332 | #ifdef CONFIG_MMU | 332 | #ifdef CONFIG_MMU |
333 | /* Calculate exception vector offset = r5 << 2 */ | 333 | /* Calculate exception vector offset = r5 << 2 */ |
334 | addk r6, r5, r5; /* << 1 */ | 334 | addk r6, r5, r5; /* << 1 */ |
335 | addk r6, r6, r6; /* << 2 */ | 335 | addk r6, r6, r6; /* << 2 */ |
336 | 336 | ||
337 | #ifdef DEBUG | ||
337 | /* counting which exception happen */ | 338 | /* counting which exception happen */ |
338 | lwi r5, r0, 0x200 + TOPHYS(r0_ram) | 339 | lwi r5, r0, 0x200 + TOPHYS(r0_ram) |
339 | addi r5, r5, 1 | 340 | addi r5, r5, 1 |
@@ -341,6 +342,7 @@ not_in_delay_slot: | |||
341 | lwi r5, r6, 0x200 + TOPHYS(r0_ram) | 342 | lwi r5, r6, 0x200 + TOPHYS(r0_ram) |
342 | addi r5, r5, 1 | 343 | addi r5, r5, 1 |
343 | swi r5, r6, 0x200 + TOPHYS(r0_ram) | 344 | swi r5, r6, 0x200 + TOPHYS(r0_ram) |
345 | #endif | ||
344 | /* end */ | 346 | /* end */ |
345 | /* Load the HW Exception vector */ | 347 | /* Load the HW Exception vector */ |
346 | lwi r6, r6, TOPHYS(_MB_HW_ExceptionVectorTable) | 348 | lwi r6, r6, TOPHYS(_MB_HW_ExceptionVectorTable) |
@@ -376,7 +378,7 @@ handle_other_ex: /* Handle Other exceptions here */ | |||
376 | swi r18, r1, PT_R18 | 378 | swi r18, r1, PT_R18 |
377 | 379 | ||
378 | or r5, r1, r0 | 380 | or r5, r1, r0 |
379 | andi r6, r3, 0x1F; /* Load ESR[EC] */ | 381 | andi r6, r4, 0x1F; /* Load ESR[EC] */ |
380 | lwi r7, r0, PER_CPU(KM) /* MS: saving current kernel mode to regs */ | 382 | lwi r7, r0, PER_CPU(KM) /* MS: saving current kernel mode to regs */ |
381 | swi r7, r1, PT_MODE | 383 | swi r7, r1, PT_MODE |
382 | mfs r7, rfsr | 384 | mfs r7, rfsr |
@@ -426,11 +428,11 @@ handle_other_ex: /* Handle Other exceptions here */ | |||
426 | */ | 428 | */ |
427 | handle_unaligned_ex: | 429 | handle_unaligned_ex: |
428 | /* Working registers already saved: R3, R4, R5, R6 | 430 | /* Working registers already saved: R3, R4, R5, R6 |
429 | * R3 = ESR | 431 | * R4 = ESR |
430 | * R4 = EAR | 432 | * R3 = EAR |
431 | */ | 433 | */ |
432 | #ifdef CONFIG_MMU | 434 | #ifdef CONFIG_MMU |
433 | andi r6, r3, 0x1000 /* Check ESR[DS] */ | 435 | andi r6, r4, 0x1000 /* Check ESR[DS] */ |
434 | beqi r6, _no_delayslot /* Branch if ESR[DS] not set */ | 436 | beqi r6, _no_delayslot /* Branch if ESR[DS] not set */ |
435 | mfs r17, rbtr; /* ESR[DS] set - return address in BTR */ | 437 | mfs r17, rbtr; /* ESR[DS] set - return address in BTR */ |
436 | nop | 438 | nop |
@@ -439,7 +441,7 @@ _no_delayslot: | |||
439 | RESTORE_STATE; | 441 | RESTORE_STATE; |
440 | bri unaligned_data_trap | 442 | bri unaligned_data_trap |
441 | #endif | 443 | #endif |
442 | andi r6, r3, 0x3E0; /* Mask and extract the register operand */ | 444 | andi r6, r4, 0x3E0; /* Mask and extract the register operand */ |
443 | srl r6, r6; /* r6 >> 5 */ | 445 | srl r6, r6; /* r6 >> 5 */ |
444 | srl r6, r6; | 446 | srl r6, r6; |
445 | srl r6, r6; | 447 | srl r6, r6; |
@@ -448,33 +450,33 @@ _no_delayslot: | |||
448 | /* Store the register operand in a temporary location */ | 450 | /* Store the register operand in a temporary location */ |
449 | sbi r6, r0, TOPHYS(ex_reg_op); | 451 | sbi r6, r0, TOPHYS(ex_reg_op); |
450 | 452 | ||
451 | andi r6, r3, 0x400; /* Extract ESR[S] */ | 453 | andi r6, r4, 0x400; /* Extract ESR[S] */ |
452 | bnei r6, ex_sw; | 454 | bnei r6, ex_sw; |
453 | ex_lw: | 455 | ex_lw: |
454 | andi r6, r3, 0x800; /* Extract ESR[W] */ | 456 | andi r6, r4, 0x800; /* Extract ESR[W] */ |
455 | beqi r6, ex_lhw; | 457 | beqi r6, ex_lhw; |
456 | lbui r5, r4, 0; /* Exception address in r4 */ | 458 | lbui r5, r3, 0; /* Exception address in r3 */ |
457 | /* Load a word, byte-by-byte from destination address | 459 | /* Load a word, byte-by-byte from destination address |
458 | and save it in tmp space */ | 460 | and save it in tmp space */ |
459 | sbi r5, r0, TOPHYS(ex_tmp_data_loc_0); | 461 | sbi r5, r0, TOPHYS(ex_tmp_data_loc_0); |
460 | lbui r5, r4, 1; | 462 | lbui r5, r3, 1; |
461 | sbi r5, r0, TOPHYS(ex_tmp_data_loc_1); | 463 | sbi r5, r0, TOPHYS(ex_tmp_data_loc_1); |
462 | lbui r5, r4, 2; | 464 | lbui r5, r3, 2; |
463 | sbi r5, r0, TOPHYS(ex_tmp_data_loc_2); | 465 | sbi r5, r0, TOPHYS(ex_tmp_data_loc_2); |
464 | lbui r5, r4, 3; | 466 | lbui r5, r3, 3; |
465 | sbi r5, r0, TOPHYS(ex_tmp_data_loc_3); | 467 | sbi r5, r0, TOPHYS(ex_tmp_data_loc_3); |
466 | /* Get the destination register value into r3 */ | 468 | /* Get the destination register value into r4 */ |
467 | lwi r3, r0, TOPHYS(ex_tmp_data_loc_0); | 469 | lwi r4, r0, TOPHYS(ex_tmp_data_loc_0); |
468 | bri ex_lw_tail; | 470 | bri ex_lw_tail; |
469 | ex_lhw: | 471 | ex_lhw: |
470 | lbui r5, r4, 0; /* Exception address in r4 */ | 472 | lbui r5, r3, 0; /* Exception address in r3 */ |
471 | /* Load a half-word, byte-by-byte from destination | 473 | /* Load a half-word, byte-by-byte from destination |
472 | address and save it in tmp space */ | 474 | address and save it in tmp space */ |
473 | sbi r5, r0, TOPHYS(ex_tmp_data_loc_0); | 475 | sbi r5, r0, TOPHYS(ex_tmp_data_loc_0); |
474 | lbui r5, r4, 1; | 476 | lbui r5, r3, 1; |
475 | sbi r5, r0, TOPHYS(ex_tmp_data_loc_1); | 477 | sbi r5, r0, TOPHYS(ex_tmp_data_loc_1); |
476 | /* Get the destination register value into r3 */ | 478 | /* Get the destination register value into r4 */ |
477 | lhui r3, r0, TOPHYS(ex_tmp_data_loc_0); | 479 | lhui r4, r0, TOPHYS(ex_tmp_data_loc_0); |
478 | ex_lw_tail: | 480 | ex_lw_tail: |
479 | /* Get the destination register number into r5 */ | 481 | /* Get the destination register number into r5 */ |
480 | lbui r5, r0, TOPHYS(ex_reg_op); | 482 | lbui r5, r0, TOPHYS(ex_reg_op); |
@@ -502,25 +504,25 @@ ex_sw_tail: | |||
502 | andi r6, r6, 0x800; /* Extract ESR[W] */ | 504 | andi r6, r6, 0x800; /* Extract ESR[W] */ |
503 | beqi r6, ex_shw; | 505 | beqi r6, ex_shw; |
504 | /* Get the word - delay slot */ | 506 | /* Get the word - delay slot */ |
505 | swi r3, r0, TOPHYS(ex_tmp_data_loc_0); | 507 | swi r4, r0, TOPHYS(ex_tmp_data_loc_0); |
506 | /* Store the word, byte-by-byte into destination address */ | 508 | /* Store the word, byte-by-byte into destination address */ |
507 | lbui r3, r0, TOPHYS(ex_tmp_data_loc_0); | 509 | lbui r4, r0, TOPHYS(ex_tmp_data_loc_0); |
508 | sbi r3, r4, 0; | 510 | sbi r4, r3, 0; |
509 | lbui r3, r0, TOPHYS(ex_tmp_data_loc_1); | 511 | lbui r4, r0, TOPHYS(ex_tmp_data_loc_1); |
510 | sbi r3, r4, 1; | 512 | sbi r4, r3, 1; |
511 | lbui r3, r0, TOPHYS(ex_tmp_data_loc_2); | 513 | lbui r4, r0, TOPHYS(ex_tmp_data_loc_2); |
512 | sbi r3, r4, 2; | 514 | sbi r4, r3, 2; |
513 | lbui r3, r0, TOPHYS(ex_tmp_data_loc_3); | 515 | lbui r4, r0, TOPHYS(ex_tmp_data_loc_3); |
514 | sbi r3, r4, 3; | 516 | sbi r4, r3, 3; |
515 | bri ex_handler_done; | 517 | bri ex_handler_done; |
516 | 518 | ||
517 | ex_shw: | 519 | ex_shw: |
518 | /* Store the lower half-word, byte-by-byte into destination address */ | 520 | /* Store the lower half-word, byte-by-byte into destination address */ |
519 | swi r3, r0, TOPHYS(ex_tmp_data_loc_0); | 521 | swi r4, r0, TOPHYS(ex_tmp_data_loc_0); |
520 | lbui r3, r0, TOPHYS(ex_tmp_data_loc_2); | 522 | lbui r4, r0, TOPHYS(ex_tmp_data_loc_2); |
521 | sbi r3, r4, 0; | 523 | sbi r4, r3, 0; |
522 | lbui r3, r0, TOPHYS(ex_tmp_data_loc_3); | 524 | lbui r4, r0, TOPHYS(ex_tmp_data_loc_3); |
523 | sbi r3, r4, 1; | 525 | sbi r4, r3, 1; |
524 | ex_sw_end: /* Exception handling of store word, ends. */ | 526 | ex_sw_end: /* Exception handling of store word, ends. */ |
525 | 527 | ||
526 | ex_handler_done: | 528 | ex_handler_done: |
@@ -560,21 +562,16 @@ ex_handler_done: | |||
560 | */ | 562 | */ |
561 | mfs r11, rpid | 563 | mfs r11, rpid |
562 | nop | 564 | nop |
563 | bri 4 | ||
564 | mfs r3, rear /* Get faulting address */ | ||
565 | nop | ||
566 | /* If we are faulting a kernel address, we have to use the | 565 | /* If we are faulting a kernel address, we have to use the |
567 | * kernel page tables. | 566 | * kernel page tables. |
568 | */ | 567 | */ |
569 | ori r4, r0, CONFIG_KERNEL_START | 568 | ori r5, r0, CONFIG_KERNEL_START |
570 | cmpu r4, r3, r4 | 569 | cmpu r5, r3, r5 |
571 | bgti r4, ex3 | 570 | bgti r5, ex3 |
572 | /* First, check if it was a zone fault (which means a user | 571 | /* First, check if it was a zone fault (which means a user |
573 | * tried to access a kernel or read-protected page - always | 572 | * tried to access a kernel or read-protected page - always |
574 | * a SEGV). All other faults here must be stores, so no | 573 | * a SEGV). All other faults here must be stores, so no |
575 | * need to check ESR_S as well. */ | 574 | * need to check ESR_S as well. */ |
576 | mfs r4, resr | ||
577 | nop | ||
578 | andi r4, r4, 0x800 /* ESR_Z - zone protection */ | 575 | andi r4, r4, 0x800 /* ESR_Z - zone protection */ |
579 | bnei r4, ex2 | 576 | bnei r4, ex2 |
580 | 577 | ||
@@ -589,8 +586,6 @@ ex_handler_done: | |||
589 | * tried to access a kernel or read-protected page - always | 586 | * tried to access a kernel or read-protected page - always |
590 | * a SEGV). All other faults here must be stores, so no | 587 | * a SEGV). All other faults here must be stores, so no |
591 | * need to check ESR_S as well. */ | 588 | * need to check ESR_S as well. */ |
592 | mfs r4, resr | ||
593 | nop | ||
594 | andi r4, r4, 0x800 /* ESR_Z */ | 589 | andi r4, r4, 0x800 /* ESR_Z */ |
595 | bnei r4, ex2 | 590 | bnei r4, ex2 |
596 | /* get current task address */ | 591 | /* get current task address */ |
@@ -665,8 +660,6 @@ ex_handler_done: | |||
665 | * R3 = ESR | 660 | * R3 = ESR |
666 | */ | 661 | */ |
667 | 662 | ||
668 | mfs r3, rear /* Get faulting address */ | ||
669 | nop | ||
670 | RESTORE_STATE; | 663 | RESTORE_STATE; |
671 | bri page_fault_instr_trap | 664 | bri page_fault_instr_trap |
672 | 665 | ||
@@ -677,18 +670,15 @@ ex_handler_done: | |||
677 | */ | 670 | */ |
678 | handle_data_tlb_miss_exception: | 671 | handle_data_tlb_miss_exception: |
679 | /* Working registers already saved: R3, R4, R5, R6 | 672 | /* Working registers already saved: R3, R4, R5, R6 |
680 | * R3 = ESR | 673 | * R3 = EAR, R4 = ESR |
681 | */ | 674 | */ |
682 | mfs r11, rpid | 675 | mfs r11, rpid |
683 | nop | 676 | nop |
684 | bri 4 | ||
685 | mfs r3, rear /* Get faulting address */ | ||
686 | nop | ||
687 | 677 | ||
688 | /* If we are faulting a kernel address, we have to use the | 678 | /* If we are faulting a kernel address, we have to use the |
689 | * kernel page tables. */ | 679 | * kernel page tables. */ |
690 | ori r4, r0, CONFIG_KERNEL_START | 680 | ori r6, r0, CONFIG_KERNEL_START |
691 | cmpu r4, r3, r4 | 681 | cmpu r4, r3, r6 |
692 | bgti r4, ex5 | 682 | bgti r4, ex5 |
693 | ori r4, r0, swapper_pg_dir | 683 | ori r4, r0, swapper_pg_dir |
694 | mts rpid, r0 /* TLB will have 0 TID */ | 684 | mts rpid, r0 /* TLB will have 0 TID */ |
@@ -731,9 +721,8 @@ ex_handler_done: | |||
731 | * Many of these bits are software only. Bits we don't set | 721 | * Many of these bits are software only. Bits we don't set |
732 | * here we (properly should) assume have the appropriate value. | 722 | * here we (properly should) assume have the appropriate value. |
733 | */ | 723 | */ |
724 | brid finish_tlb_load | ||
734 | andni r4, r4, 0x0ce2 /* Make sure 20, 21 are zero */ | 725 | andni r4, r4, 0x0ce2 /* Make sure 20, 21 are zero */ |
735 | |||
736 | bri finish_tlb_load | ||
737 | ex7: | 726 | ex7: |
738 | /* The bailout. Restore registers to pre-exception conditions | 727 | /* The bailout. Restore registers to pre-exception conditions |
739 | * and call the heavyweights to help us out. | 728 | * and call the heavyweights to help us out. |
@@ -754,9 +743,6 @@ ex_handler_done: | |||
754 | */ | 743 | */ |
755 | mfs r11, rpid | 744 | mfs r11, rpid |
756 | nop | 745 | nop |
757 | bri 4 | ||
758 | mfs r3, rear /* Get faulting address */ | ||
759 | nop | ||
760 | 746 | ||
761 | /* If we are faulting a kernel address, we have to use the | 747 | /* If we are faulting a kernel address, we have to use the |
762 | * kernel page tables. | 748 | * kernel page tables. |
@@ -792,7 +778,7 @@ ex_handler_done: | |||
792 | lwi r4, r5, 0 /* Get Linux PTE */ | 778 | lwi r4, r5, 0 /* Get Linux PTE */ |
793 | 779 | ||
794 | andi r6, r4, _PAGE_PRESENT | 780 | andi r6, r4, _PAGE_PRESENT |
795 | beqi r6, ex7 | 781 | beqi r6, ex10 |
796 | 782 | ||
797 | ori r4, r4, _PAGE_ACCESSED | 783 | ori r4, r4, _PAGE_ACCESSED |
798 | swi r4, r5, 0 | 784 | swi r4, r5, 0 |
@@ -805,9 +791,8 @@ ex_handler_done: | |||
805 | * Many of these bits are software only. Bits we don't set | 791 | * Many of these bits are software only. Bits we don't set |
806 | * here we (properly should) assume have the appropriate value. | 792 | * here we (properly should) assume have the appropriate value. |
807 | */ | 793 | */ |
794 | brid finish_tlb_load | ||
808 | andni r4, r4, 0x0ce2 /* Make sure 20, 21 are zero */ | 795 | andni r4, r4, 0x0ce2 /* Make sure 20, 21 are zero */ |
809 | |||
810 | bri finish_tlb_load | ||
811 | ex10: | 796 | ex10: |
812 | /* The bailout. Restore registers to pre-exception conditions | 797 | /* The bailout. Restore registers to pre-exception conditions |
813 | * and call the heavyweights to help us out. | 798 | * and call the heavyweights to help us out. |
@@ -837,9 +822,9 @@ ex_handler_done: | |||
837 | andi r5, r5, (MICROBLAZE_TLB_SIZE-1) | 822 | andi r5, r5, (MICROBLAZE_TLB_SIZE-1) |
838 | ori r6, r0, 1 | 823 | ori r6, r0, 1 |
839 | cmp r31, r5, r6 | 824 | cmp r31, r5, r6 |
840 | blti r31, sem | 825 | blti r31, ex12 |
841 | addik r5, r6, 1 | 826 | addik r5, r6, 1 |
842 | sem: | 827 | ex12: |
843 | /* MS: save back current TLB index */ | 828 | /* MS: save back current TLB index */ |
844 | swi r5, r0, TOPHYS(tlb_index) | 829 | swi r5, r0, TOPHYS(tlb_index) |
845 | 830 | ||
@@ -859,7 +844,6 @@ ex_handler_done: | |||
859 | nop | 844 | nop |
860 | 845 | ||
861 | /* Done...restore registers and get out of here. */ | 846 | /* Done...restore registers and get out of here. */ |
862 | ex12: | ||
863 | mts rpid, r11 | 847 | mts rpid, r11 |
864 | nop | 848 | nop |
865 | bri 4 | 849 | bri 4 |
diff --git a/arch/microblaze/kernel/misc.S b/arch/microblaze/kernel/misc.S index df16c6287a8e..7cf86498326c 100644 --- a/arch/microblaze/kernel/misc.S +++ b/arch/microblaze/kernel/misc.S | |||
@@ -26,9 +26,10 @@ | |||
26 | * We avoid flushing the pinned 0, 1 and possibly 2 entries. | 26 | * We avoid flushing the pinned 0, 1 and possibly 2 entries. |
27 | */ | 27 | */ |
28 | .globl _tlbia; | 28 | .globl _tlbia; |
29 | .type _tlbia, @function | ||
29 | .align 4; | 30 | .align 4; |
30 | _tlbia: | 31 | _tlbia: |
31 | addik r12, r0, 63 /* flush all entries (63 - 3) */ | 32 | addik r12, r0, MICROBLAZE_TLB_SIZE - 1 /* flush all entries (63 - 3) */ |
32 | /* isync */ | 33 | /* isync */ |
33 | _tlbia_1: | 34 | _tlbia_1: |
34 | mts rtlbx, r12 | 35 | mts rtlbx, r12 |
@@ -41,11 +42,13 @@ _tlbia_1: | |||
41 | /* sync */ | 42 | /* sync */ |
42 | rtsd r15, 8 | 43 | rtsd r15, 8 |
43 | nop | 44 | nop |
45 | .size _tlbia, . - _tlbia | ||
44 | 46 | ||
45 | /* | 47 | /* |
46 | * Flush MMU TLB for a particular address (in r5) | 48 | * Flush MMU TLB for a particular address (in r5) |
47 | */ | 49 | */ |
48 | .globl _tlbie; | 50 | .globl _tlbie; |
51 | .type _tlbie, @function | ||
49 | .align 4; | 52 | .align 4; |
50 | _tlbie: | 53 | _tlbie: |
51 | mts rtlbsx, r5 /* look up the address in TLB */ | 54 | mts rtlbsx, r5 /* look up the address in TLB */ |
@@ -59,17 +62,20 @@ _tlbie_1: | |||
59 | rtsd r15, 8 | 62 | rtsd r15, 8 |
60 | nop | 63 | nop |
61 | 64 | ||
65 | .size _tlbie, . - _tlbie | ||
66 | |||
62 | /* | 67 | /* |
63 | * Allocate TLB entry for early console | 68 | * Allocate TLB entry for early console |
64 | */ | 69 | */ |
65 | .globl early_console_reg_tlb_alloc; | 70 | .globl early_console_reg_tlb_alloc; |
71 | .type early_console_reg_tlb_alloc, @function | ||
66 | .align 4; | 72 | .align 4; |
67 | early_console_reg_tlb_alloc: | 73 | early_console_reg_tlb_alloc: |
68 | /* | 74 | /* |
69 | * Load a TLB entry for the UART, so that microblaze_progress() can use | 75 | * Load a TLB entry for the UART, so that microblaze_progress() can use |
70 | * the UARTs nice and early. We use a 4k real==virtual mapping. | 76 | * the UARTs nice and early. We use a 4k real==virtual mapping. |
71 | */ | 77 | */ |
72 | ori r4, r0, 63 | 78 | ori r4, r0, MICROBLAZE_TLB_SIZE - 1 |
73 | mts rtlbx, r4 /* TLB slot 2 */ | 79 | mts rtlbx, r4 /* TLB slot 2 */ |
74 | 80 | ||
75 | or r4,r5,r0 | 81 | or r4,r5,r0 |
@@ -86,6 +92,8 @@ early_console_reg_tlb_alloc: | |||
86 | rtsd r15, 8 | 92 | rtsd r15, 8 |
87 | nop | 93 | nop |
88 | 94 | ||
95 | .size early_console_reg_tlb_alloc, . - early_console_reg_tlb_alloc | ||
96 | |||
89 | /* | 97 | /* |
90 | * Copy a whole page (4096 bytes). | 98 | * Copy a whole page (4096 bytes). |
91 | */ | 99 | */ |
@@ -104,6 +112,7 @@ early_console_reg_tlb_alloc: | |||
104 | #define DCACHE_LINE_BYTES (4 * 4) | 112 | #define DCACHE_LINE_BYTES (4 * 4) |
105 | 113 | ||
106 | .globl copy_page; | 114 | .globl copy_page; |
115 | .type copy_page, @function | ||
107 | .align 4; | 116 | .align 4; |
108 | copy_page: | 117 | copy_page: |
109 | ori r11, r0, (PAGE_SIZE/DCACHE_LINE_BYTES) - 1 | 118 | ori r11, r0, (PAGE_SIZE/DCACHE_LINE_BYTES) - 1 |
@@ -118,3 +127,5 @@ _copy_page_loop: | |||
118 | addik r11, r11, -1 | 127 | addik r11, r11, -1 |
119 | rtsd r15, 8 | 128 | rtsd r15, 8 |
120 | nop | 129 | nop |
130 | |||
131 | .size copy_page, . - copy_page | ||
diff --git a/arch/microblaze/kernel/module.c b/arch/microblaze/kernel/module.c index 5a45b1adfef1..cbecf110dc30 100644 --- a/arch/microblaze/kernel/module.c +++ b/arch/microblaze/kernel/module.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/elf.h> | 13 | #include <linux/elf.h> |
14 | #include <linux/vmalloc.h> | 14 | #include <linux/vmalloc.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
17 | #include <linux/string.h> | 16 | #include <linux/string.h> |
18 | 17 | ||
diff --git a/arch/microblaze/kernel/of_platform.c b/arch/microblaze/kernel/of_platform.c index 1c6d684996d7..0dc755286d38 100644 --- a/arch/microblaze/kernel/of_platform.c +++ b/arch/microblaze/kernel/of_platform.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/mod_devicetable.h> | 19 | #include <linux/mod_devicetable.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
22 | #include <linux/of.h> | 21 | #include <linux/of.h> |
23 | #include <linux/of_device.h> | 22 | #include <linux/of_device.h> |
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c index 812f1bf06c9e..09bed44dfcd3 100644 --- a/arch/microblaze/kernel/process.c +++ b/arch/microblaze/kernel/process.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/bitops.h> | 15 | #include <linux/bitops.h> |
16 | #include <asm/system.h> | 16 | #include <asm/system.h> |
17 | #include <asm/pgalloc.h> | 17 | #include <asm/pgalloc.h> |
18 | #include <asm/uaccess.h> /* for USER_DS macros */ | ||
18 | #include <asm/cacheflush.h> | 19 | #include <asm/cacheflush.h> |
19 | 20 | ||
20 | void show_regs(struct pt_regs *regs) | 21 | void show_regs(struct pt_regs *regs) |
@@ -74,7 +75,10 @@ __setup("hlt", hlt_setup); | |||
74 | 75 | ||
75 | void default_idle(void) | 76 | void default_idle(void) |
76 | { | 77 | { |
77 | if (!hlt_counter) { | 78 | if (likely(hlt_counter)) { |
79 | while (!need_resched()) | ||
80 | cpu_relax(); | ||
81 | } else { | ||
78 | clear_thread_flag(TIF_POLLING_NRFLAG); | 82 | clear_thread_flag(TIF_POLLING_NRFLAG); |
79 | smp_mb__after_clear_bit(); | 83 | smp_mb__after_clear_bit(); |
80 | local_irq_disable(); | 84 | local_irq_disable(); |
@@ -82,9 +86,7 @@ void default_idle(void) | |||
82 | cpu_sleep(); | 86 | cpu_sleep(); |
83 | local_irq_enable(); | 87 | local_irq_enable(); |
84 | set_thread_flag(TIF_POLLING_NRFLAG); | 88 | set_thread_flag(TIF_POLLING_NRFLAG); |
85 | } else | 89 | } |
86 | while (!need_resched()) | ||
87 | cpu_relax(); | ||
88 | } | 90 | } |
89 | 91 | ||
90 | void cpu_idle(void) | 92 | void cpu_idle(void) |
diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c index 6d6349a145f9..a4a7770c6140 100644 --- a/arch/microblaze/kernel/ptrace.c +++ b/arch/microblaze/kernel/ptrace.c | |||
@@ -75,7 +75,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
75 | { | 75 | { |
76 | int rval; | 76 | int rval; |
77 | unsigned long val = 0; | 77 | unsigned long val = 0; |
78 | unsigned long copied; | ||
79 | 78 | ||
80 | switch (request) { | 79 | switch (request) { |
81 | /* Read/write the word at location ADDR in the registers. */ | 80 | /* Read/write the word at location ADDR in the registers. */ |
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index f974ec7aa357..17c98dbcec88 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c | |||
@@ -92,6 +92,12 @@ inline unsigned get_romfs_len(unsigned *addr) | |||
92 | } | 92 | } |
93 | #endif /* CONFIG_MTD_UCLINUX_EBSS */ | 93 | #endif /* CONFIG_MTD_UCLINUX_EBSS */ |
94 | 94 | ||
95 | #if defined(CONFIG_EARLY_PRINTK) && defined(CONFIG_SERIAL_UARTLITE_CONSOLE) | ||
96 | #define eprintk early_printk | ||
97 | #else | ||
98 | #define eprintk printk | ||
99 | #endif | ||
100 | |||
95 | void __init machine_early_init(const char *cmdline, unsigned int ram, | 101 | void __init machine_early_init(const char *cmdline, unsigned int ram, |
96 | unsigned int fdt, unsigned int msr) | 102 | unsigned int fdt, unsigned int msr) |
97 | { | 103 | { |
@@ -139,32 +145,32 @@ void __init machine_early_init(const char *cmdline, unsigned int ram, | |||
139 | setup_early_printk(NULL); | 145 | setup_early_printk(NULL); |
140 | #endif | 146 | #endif |
141 | 147 | ||
142 | early_printk("Ramdisk addr 0x%08x, ", ram); | 148 | eprintk("Ramdisk addr 0x%08x, ", ram); |
143 | if (fdt) | 149 | if (fdt) |
144 | early_printk("FDT at 0x%08x\n", fdt); | 150 | eprintk("FDT at 0x%08x\n", fdt); |
145 | else | 151 | else |
146 | early_printk("Compiled-in FDT at 0x%08x\n", | 152 | eprintk("Compiled-in FDT at 0x%08x\n", |
147 | (unsigned int)_fdt_start); | 153 | (unsigned int)_fdt_start); |
148 | 154 | ||
149 | #ifdef CONFIG_MTD_UCLINUX | 155 | #ifdef CONFIG_MTD_UCLINUX |
150 | early_printk("Found romfs @ 0x%08x (0x%08x)\n", | 156 | eprintk("Found romfs @ 0x%08x (0x%08x)\n", |
151 | romfs_base, romfs_size); | 157 | romfs_base, romfs_size); |
152 | early_printk("#### klimit %p ####\n", old_klimit); | 158 | eprintk("#### klimit %p ####\n", old_klimit); |
153 | BUG_ON(romfs_size < 0); /* What else can we do? */ | 159 | BUG_ON(romfs_size < 0); /* What else can we do? */ |
154 | 160 | ||
155 | early_printk("Moved 0x%08x bytes from 0x%08x to 0x%08x\n", | 161 | eprintk("Moved 0x%08x bytes from 0x%08x to 0x%08x\n", |
156 | romfs_size, romfs_base, (unsigned)&_ebss); | 162 | romfs_size, romfs_base, (unsigned)&_ebss); |
157 | 163 | ||
158 | early_printk("New klimit: 0x%08x\n", (unsigned)klimit); | 164 | eprintk("New klimit: 0x%08x\n", (unsigned)klimit); |
159 | #endif | 165 | #endif |
160 | 166 | ||
161 | #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR | 167 | #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR |
162 | if (msr) | 168 | if (msr) |
163 | early_printk("!!!Your kernel has setup MSR instruction but " | 169 | eprintk("!!!Your kernel has setup MSR instruction but " |
164 | "CPU don't have it %d\n", msr); | 170 | "CPU don't have it %d\n", msr); |
165 | #else | 171 | #else |
166 | if (!msr) | 172 | if (!msr) |
167 | early_printk("!!!Your kernel not setup MSR instruction but " | 173 | eprintk("!!!Your kernel not setup MSR instruction but " |
168 | "CPU have it %d\n", msr); | 174 | "CPU have it %d\n", msr); |
169 | #endif | 175 | #endif |
170 | 176 | ||
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c index 9f3c205fb75b..f4e00b7f1259 100644 --- a/arch/microblaze/kernel/sys_microblaze.c +++ b/arch/microblaze/kernel/sys_microblaze.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/semaphore.h> | 30 | #include <linux/semaphore.h> |
31 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
32 | #include <linux/unistd.h> | 32 | #include <linux/unistd.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include <asm/syscalls.h> | 35 | #include <asm/syscalls.h> |
35 | 36 | ||
diff --git a/arch/microblaze/kernel/traps.c b/arch/microblaze/kernel/traps.c index eaaaf805f31b..5e4570ef515c 100644 --- a/arch/microblaze/kernel/traps.c +++ b/arch/microblaze/kernel/traps.c | |||
@@ -22,13 +22,11 @@ void trap_init(void) | |||
22 | __enable_hw_exceptions(); | 22 | __enable_hw_exceptions(); |
23 | } | 23 | } |
24 | 24 | ||
25 | static int kstack_depth_to_print = 24; | 25 | static unsigned long kstack_depth_to_print = 24; |
26 | 26 | ||
27 | static int __init kstack_setup(char *s) | 27 | static int __init kstack_setup(char *s) |
28 | { | 28 | { |
29 | kstack_depth_to_print = strict_strtoul(s, 0, NULL); | 29 | return !strict_strtoul(s, 0, &kstack_depth_to_print); |
30 | |||
31 | return 1; | ||
32 | } | 30 | } |
33 | __setup("kstack=", kstack_setup); | 31 | __setup("kstack=", kstack_setup); |
34 | 32 | ||
diff --git a/arch/microblaze/lib/Makefile b/arch/microblaze/lib/Makefile index b579db068c06..4dfe47d3cd91 100644 --- a/arch/microblaze/lib/Makefile +++ b/arch/microblaze/lib/Makefile | |||
@@ -10,5 +10,4 @@ else | |||
10 | lib-y += memcpy.o memmove.o | 10 | lib-y += memcpy.o memmove.o |
11 | endif | 11 | endif |
12 | 12 | ||
13 | lib-$(CONFIG_NO_MMU) += uaccess.o | 13 | lib-y += uaccess_old.o |
14 | lib-$(CONFIG_MMU) += uaccess_old.o | ||
diff --git a/arch/microblaze/lib/fastcopy.S b/arch/microblaze/lib/fastcopy.S index 02e3ab4eddf3..fdc48bb065d8 100644 --- a/arch/microblaze/lib/fastcopy.S +++ b/arch/microblaze/lib/fastcopy.S | |||
@@ -30,8 +30,9 @@ | |||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/linkage.h> | 32 | #include <linux/linkage.h> |
33 | 33 | .text | |
34 | .globl memcpy | 34 | .globl memcpy |
35 | .type memcpy, @function | ||
35 | .ent memcpy | 36 | .ent memcpy |
36 | 37 | ||
37 | memcpy: | 38 | memcpy: |
@@ -345,9 +346,11 @@ a_done: | |||
345 | rtsd r15, 8 | 346 | rtsd r15, 8 |
346 | nop | 347 | nop |
347 | 348 | ||
349 | .size memcpy, . - memcpy | ||
348 | .end memcpy | 350 | .end memcpy |
349 | /*----------------------------------------------------------------------------*/ | 351 | /*----------------------------------------------------------------------------*/ |
350 | .globl memmove | 352 | .globl memmove |
353 | .type memmove, @function | ||
351 | .ent memmove | 354 | .ent memmove |
352 | 355 | ||
353 | memmove: | 356 | memmove: |
@@ -659,4 +662,5 @@ d_done: | |||
659 | rtsd r15, 8 | 662 | rtsd r15, 8 |
660 | nop | 663 | nop |
661 | 664 | ||
665 | .size memmove, . - memmove | ||
662 | .end memmove | 666 | .end memmove |
diff --git a/arch/microblaze/lib/memcpy.c b/arch/microblaze/lib/memcpy.c index cc2108b6b260..014bac92bdff 100644 --- a/arch/microblaze/lib/memcpy.c +++ b/arch/microblaze/lib/memcpy.c | |||
@@ -53,7 +53,7 @@ void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c) | |||
53 | const uint32_t *i_src; | 53 | const uint32_t *i_src; |
54 | uint32_t *i_dst; | 54 | uint32_t *i_dst; |
55 | 55 | ||
56 | if (c >= 4) { | 56 | if (likely(c >= 4)) { |
57 | unsigned value, buf_hold; | 57 | unsigned value, buf_hold; |
58 | 58 | ||
59 | /* Align the dstination to a word boundry. */ | 59 | /* Align the dstination to a word boundry. */ |
diff --git a/arch/microblaze/lib/memset.c b/arch/microblaze/lib/memset.c index 4df851d41a29..ecfb663e1fc1 100644 --- a/arch/microblaze/lib/memset.c +++ b/arch/microblaze/lib/memset.c | |||
@@ -33,22 +33,23 @@ | |||
33 | #ifdef __HAVE_ARCH_MEMSET | 33 | #ifdef __HAVE_ARCH_MEMSET |
34 | void *memset(void *v_src, int c, __kernel_size_t n) | 34 | void *memset(void *v_src, int c, __kernel_size_t n) |
35 | { | 35 | { |
36 | |||
37 | char *src = v_src; | 36 | char *src = v_src; |
38 | #ifdef CONFIG_OPT_LIB_FUNCTION | 37 | #ifdef CONFIG_OPT_LIB_FUNCTION |
39 | uint32_t *i_src; | 38 | uint32_t *i_src; |
40 | uint32_t w32; | 39 | uint32_t w32 = 0; |
41 | #endif | 40 | #endif |
42 | /* Truncate c to 8 bits */ | 41 | /* Truncate c to 8 bits */ |
43 | c = (c & 0xFF); | 42 | c = (c & 0xFF); |
44 | 43 | ||
45 | #ifdef CONFIG_OPT_LIB_FUNCTION | 44 | #ifdef CONFIG_OPT_LIB_FUNCTION |
46 | /* Make a repeating word out of it */ | 45 | if (unlikely(c)) { |
47 | w32 = c; | 46 | /* Make a repeating word out of it */ |
48 | w32 |= w32 << 8; | 47 | w32 = c; |
49 | w32 |= w32 << 16; | 48 | w32 |= w32 << 8; |
49 | w32 |= w32 << 16; | ||
50 | } | ||
50 | 51 | ||
51 | if (n >= 4) { | 52 | if (likely(n >= 4)) { |
52 | /* Align the destination to a word boundary */ | 53 | /* Align the destination to a word boundary */ |
53 | /* This is done in an endian independant manner */ | 54 | /* This is done in an endian independant manner */ |
54 | switch ((unsigned) src & 3) { | 55 | switch ((unsigned) src & 3) { |
diff --git a/arch/microblaze/lib/uaccess.c b/arch/microblaze/lib/uaccess.c deleted file mode 100644 index a853fe089c44..000000000000 --- a/arch/microblaze/lib/uaccess.c +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Atmark Techno, Inc. | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | */ | ||
8 | |||
9 | #include <linux/string.h> | ||
10 | #include <asm/uaccess.h> | ||
11 | |||
12 | #include <asm/bug.h> | ||
13 | |||
14 | long strnlen_user(const char __user *src, long count) | ||
15 | { | ||
16 | return strlen(src) + 1; | ||
17 | } | ||
18 | |||
19 | #define __do_strncpy_from_user(dst, src, count, res) \ | ||
20 | do { \ | ||
21 | char *tmp; \ | ||
22 | strncpy(dst, src, count); \ | ||
23 | for (tmp = dst; *tmp && count > 0; tmp++, count--) \ | ||
24 | ; \ | ||
25 | res = (tmp - dst); \ | ||
26 | } while (0) | ||
27 | |||
28 | long __strncpy_from_user(char *dst, const char __user *src, long count) | ||
29 | { | ||
30 | long res; | ||
31 | __do_strncpy_from_user(dst, src, count, res); | ||
32 | return res; | ||
33 | } | ||
34 | |||
35 | long strncpy_from_user(char *dst, const char __user *src, long count) | ||
36 | { | ||
37 | long res = -EFAULT; | ||
38 | if (access_ok(VERIFY_READ, src, 1)) | ||
39 | __do_strncpy_from_user(dst, src, count, res); | ||
40 | return res; | ||
41 | } | ||
42 | |||
43 | unsigned long __copy_tofrom_user(void __user *to, | ||
44 | const void __user *from, unsigned long size) | ||
45 | { | ||
46 | memcpy(to, from, size); | ||
47 | return 0; | ||
48 | } | ||
diff --git a/arch/microblaze/lib/uaccess_old.S b/arch/microblaze/lib/uaccess_old.S index 67f991c14b8a..5810cec54a7a 100644 --- a/arch/microblaze/lib/uaccess_old.S +++ b/arch/microblaze/lib/uaccess_old.S | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | .text | 23 | .text |
24 | .globl __strncpy_user; | 24 | .globl __strncpy_user; |
25 | .type __strncpy_user, @function | ||
25 | .align 4; | 26 | .align 4; |
26 | __strncpy_user: | 27 | __strncpy_user: |
27 | 28 | ||
@@ -50,7 +51,7 @@ __strncpy_user: | |||
50 | 3: | 51 | 3: |
51 | rtsd r15,8 | 52 | rtsd r15,8 |
52 | nop | 53 | nop |
53 | 54 | .size __strncpy_user, . - __strncpy_user | |
54 | 55 | ||
55 | .section .fixup, "ax" | 56 | .section .fixup, "ax" |
56 | .align 2 | 57 | .align 2 |
@@ -72,6 +73,7 @@ __strncpy_user: | |||
72 | 73 | ||
73 | .text | 74 | .text |
74 | .globl __strnlen_user; | 75 | .globl __strnlen_user; |
76 | .type __strnlen_user, @function | ||
75 | .align 4; | 77 | .align 4; |
76 | __strnlen_user: | 78 | __strnlen_user: |
77 | addik r3,r6,0 | 79 | addik r3,r6,0 |
@@ -90,7 +92,7 @@ __strnlen_user: | |||
90 | 3: | 92 | 3: |
91 | rtsd r15,8 | 93 | rtsd r15,8 |
92 | nop | 94 | nop |
93 | 95 | .size __strnlen_user, . - __strnlen_user | |
94 | 96 | ||
95 | .section .fixup,"ax" | 97 | .section .fixup,"ax" |
96 | 4: | 98 | 4: |
@@ -108,6 +110,7 @@ __strnlen_user: | |||
108 | */ | 110 | */ |
109 | .text | 111 | .text |
110 | .globl __copy_tofrom_user; | 112 | .globl __copy_tofrom_user; |
113 | .type __copy_tofrom_user, @function | ||
111 | .align 4; | 114 | .align 4; |
112 | __copy_tofrom_user: | 115 | __copy_tofrom_user: |
113 | /* | 116 | /* |
@@ -116,20 +119,34 @@ __copy_tofrom_user: | |||
116 | * r7, r3 - count | 119 | * r7, r3 - count |
117 | * r4 - tempval | 120 | * r4 - tempval |
118 | */ | 121 | */ |
119 | addik r3,r7,0 | 122 | beqid r7, 3f /* zero size is not likely */ |
120 | beqi r3,3f | 123 | andi r3, r7, 0x3 /* filter add count */ |
121 | 1: | 124 | bneid r3, 4f /* if is odd value then byte copying */ |
122 | lbu r4,r6,r0 | 125 | or r3, r5, r6 /* find if is any to/from unaligned */ |
123 | addik r6,r6,1 | 126 | andi r3, r3, 0x3 /* mask unaligned */ |
124 | 2: | 127 | bneid r3, 1f /* it is unaligned -> then jump */ |
125 | sb r4,r5,r0 | 128 | or r3, r0, r0 |
126 | addik r3,r3,-1 | 129 | |
127 | bneid r3,1b | 130 | /* at least one 4 byte copy */ |
128 | addik r5,r5,1 /* delay slot */ | 131 | 5: lw r4, r6, r3 |
132 | 6: sw r4, r5, r3 | ||
133 | addik r7, r7, -4 | ||
134 | bneid r7, 5b | ||
135 | addik r3, r3, 4 | ||
136 | addik r3, r7, 0 | ||
137 | rtsd r15, 8 | ||
138 | nop | ||
139 | 4: or r3, r0, r0 | ||
140 | 1: lbu r4,r6,r3 | ||
141 | 2: sb r4,r5,r3 | ||
142 | addik r7,r7,-1 | ||
143 | bneid r7,1b | ||
144 | addik r3,r3,1 /* delay slot */ | ||
129 | 3: | 145 | 3: |
146 | addik r3,r7,0 | ||
130 | rtsd r15,8 | 147 | rtsd r15,8 |
131 | nop | 148 | nop |
132 | 149 | .size __copy_tofrom_user, . - __copy_tofrom_user | |
133 | 150 | ||
134 | .section __ex_table,"a" | 151 | .section __ex_table,"a" |
135 | .word 1b,3b,2b,3b | 152 | .word 1b,3b,2b,3b,5b,3b,6b,3b |
diff --git a/arch/microblaze/mm/consistent.c b/arch/microblaze/mm/consistent.c index a9b443e3fb98..f956e24fe49c 100644 --- a/arch/microblaze/mm/consistent.c +++ b/arch/microblaze/mm/consistent.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/highmem.h> | 32 | #include <linux/highmem.h> |
33 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/gfp.h> | ||
35 | 36 | ||
36 | #include <asm/pgalloc.h> | 37 | #include <asm/pgalloc.h> |
37 | #include <linux/io.h> | 38 | #include <linux/io.h> |
diff --git a/arch/microblaze/mm/fault.c b/arch/microblaze/mm/fault.c index d9d249a66ff2..7af87f4b2c2c 100644 --- a/arch/microblaze/mm/fault.c +++ b/arch/microblaze/mm/fault.c | |||
@@ -106,7 +106,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, | |||
106 | regs->esr = error_code; | 106 | regs->esr = error_code; |
107 | 107 | ||
108 | /* On a kernel SLB miss we can only check for a valid exception entry */ | 108 | /* On a kernel SLB miss we can only check for a valid exception entry */ |
109 | if (kernel_mode(regs) && (address >= TASK_SIZE)) { | 109 | if (unlikely(kernel_mode(regs) && (address >= TASK_SIZE))) { |
110 | printk(KERN_WARNING "kernel task_size exceed"); | 110 | printk(KERN_WARNING "kernel task_size exceed"); |
111 | _exception(SIGSEGV, regs, code, address); | 111 | _exception(SIGSEGV, regs, code, address); |
112 | } | 112 | } |
@@ -122,7 +122,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, | |||
122 | } | 122 | } |
123 | #endif /* CONFIG_KGDB */ | 123 | #endif /* CONFIG_KGDB */ |
124 | 124 | ||
125 | if (in_atomic() || !mm) { | 125 | if (unlikely(in_atomic() || !mm)) { |
126 | if (kernel_mode(regs)) | 126 | if (kernel_mode(regs)) |
127 | goto bad_area_nosemaphore; | 127 | goto bad_area_nosemaphore; |
128 | 128 | ||
@@ -150,7 +150,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, | |||
150 | * source. If this is invalid we can skip the address space check, | 150 | * source. If this is invalid we can skip the address space check, |
151 | * thus avoiding the deadlock. | 151 | * thus avoiding the deadlock. |
152 | */ | 152 | */ |
153 | if (!down_read_trylock(&mm->mmap_sem)) { | 153 | if (unlikely(!down_read_trylock(&mm->mmap_sem))) { |
154 | if (kernel_mode(regs) && !search_exception_tables(regs->pc)) | 154 | if (kernel_mode(regs) && !search_exception_tables(regs->pc)) |
155 | goto bad_area_nosemaphore; | 155 | goto bad_area_nosemaphore; |
156 | 156 | ||
@@ -158,16 +158,16 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, | |||
158 | } | 158 | } |
159 | 159 | ||
160 | vma = find_vma(mm, address); | 160 | vma = find_vma(mm, address); |
161 | if (!vma) | 161 | if (unlikely(!vma)) |
162 | goto bad_area; | 162 | goto bad_area; |
163 | 163 | ||
164 | if (vma->vm_start <= address) | 164 | if (vma->vm_start <= address) |
165 | goto good_area; | 165 | goto good_area; |
166 | 166 | ||
167 | if (!(vma->vm_flags & VM_GROWSDOWN)) | 167 | if (unlikely(!(vma->vm_flags & VM_GROWSDOWN))) |
168 | goto bad_area; | 168 | goto bad_area; |
169 | 169 | ||
170 | if (!is_write) | 170 | if (unlikely(!is_write)) |
171 | goto bad_area; | 171 | goto bad_area; |
172 | 172 | ||
173 | /* | 173 | /* |
@@ -179,7 +179,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, | |||
179 | * before setting the user r1. Thus we allow the stack to | 179 | * before setting the user r1. Thus we allow the stack to |
180 | * expand to 1MB without further checks. | 180 | * expand to 1MB without further checks. |
181 | */ | 181 | */ |
182 | if (address + 0x100000 < vma->vm_end) { | 182 | if (unlikely(address + 0x100000 < vma->vm_end)) { |
183 | 183 | ||
184 | /* get user regs even if this fault is in kernel mode */ | 184 | /* get user regs even if this fault is in kernel mode */ |
185 | struct pt_regs *uregs = current->thread.regs; | 185 | struct pt_regs *uregs = current->thread.regs; |
@@ -209,15 +209,15 @@ good_area: | |||
209 | code = SEGV_ACCERR; | 209 | code = SEGV_ACCERR; |
210 | 210 | ||
211 | /* a write */ | 211 | /* a write */ |
212 | if (is_write) { | 212 | if (unlikely(is_write)) { |
213 | if (!(vma->vm_flags & VM_WRITE)) | 213 | if (unlikely(!(vma->vm_flags & VM_WRITE))) |
214 | goto bad_area; | 214 | goto bad_area; |
215 | /* a read */ | 215 | /* a read */ |
216 | } else { | 216 | } else { |
217 | /* protection fault */ | 217 | /* protection fault */ |
218 | if (error_code & 0x08000000) | 218 | if (unlikely(error_code & 0x08000000)) |
219 | goto bad_area; | 219 | goto bad_area; |
220 | if (!(vma->vm_flags & (VM_READ | VM_EXEC))) | 220 | if (unlikely(!(vma->vm_flags & (VM_READ | VM_EXEC)))) |
221 | goto bad_area; | 221 | goto bad_area; |
222 | } | 222 | } |
223 | 223 | ||
@@ -235,7 +235,7 @@ survive: | |||
235 | goto do_sigbus; | 235 | goto do_sigbus; |
236 | BUG(); | 236 | BUG(); |
237 | } | 237 | } |
238 | if (fault & VM_FAULT_MAJOR) | 238 | if (unlikely(fault & VM_FAULT_MAJOR)) |
239 | current->maj_flt++; | 239 | current->maj_flt++; |
240 | else | 240 | else |
241 | current->min_flt++; | 241 | current->min_flt++; |
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index 1608e2e1a44a..f42c2dde8b1c 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/initrd.h> | 15 | #include <linux/initrd.h> |
16 | #include <linux/pagemap.h> | 16 | #include <linux/pagemap.h> |
17 | #include <linux/pfn.h> | 17 | #include <linux/pfn.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/swap.h> | 19 | #include <linux/swap.h> |
19 | 20 | ||
20 | #include <asm/page.h> | 21 | #include <asm/page.h> |
@@ -165,7 +166,6 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) | |||
165 | for (addr = begin; addr < end; addr += PAGE_SIZE) { | 166 | for (addr = begin; addr < end; addr += PAGE_SIZE) { |
166 | ClearPageReserved(virt_to_page(addr)); | 167 | ClearPageReserved(virt_to_page(addr)); |
167 | init_page_count(virt_to_page(addr)); | 168 | init_page_count(virt_to_page(addr)); |
168 | memset((void *)addr, 0xcc, PAGE_SIZE); | ||
169 | free_page(addr); | 169 | free_page(addr); |
170 | totalram_pages++; | 170 | totalram_pages++; |
171 | } | 171 | } |
@@ -208,14 +208,6 @@ void __init mem_init(void) | |||
208 | } | 208 | } |
209 | 209 | ||
210 | #ifndef CONFIG_MMU | 210 | #ifndef CONFIG_MMU |
211 | /* Check against bounds of physical memory */ | ||
212 | int ___range_ok(unsigned long addr, unsigned long size) | ||
213 | { | ||
214 | return ((addr < memory_start) || | ||
215 | ((addr + size) > memory_end)); | ||
216 | } | ||
217 | EXPORT_SYMBOL(___range_ok); | ||
218 | |||
219 | int page_is_ram(unsigned long pfn) | 211 | int page_is_ram(unsigned long pfn) |
220 | { | 212 | { |
221 | return __range_ok(pfn, 0); | 213 | return __range_ok(pfn, 0); |
diff --git a/arch/microblaze/mm/pgtable.c b/arch/microblaze/mm/pgtable.c index 63a6fd07c48f..d31312cde6ea 100644 --- a/arch/microblaze/mm/pgtable.c +++ b/arch/microblaze/mm/pgtable.c | |||
@@ -154,7 +154,7 @@ int map_page(unsigned long va, phys_addr_t pa, int flags) | |||
154 | err = 0; | 154 | err = 0; |
155 | set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, | 155 | set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, |
156 | __pgprot(flags))); | 156 | __pgprot(flags))); |
157 | if (mem_init_done) | 157 | if (unlikely(mem_init_done)) |
158 | flush_HPTE(0, va, pmd_val(*pd)); | 158 | flush_HPTE(0, va, pmd_val(*pd)); |
159 | /* flush_HPTE(0, va, pg); */ | 159 | /* flush_HPTE(0, va, pg); */ |
160 | } | 160 | } |
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index 0be34350d733..740bb32ec57e 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/syscalls.h> | 26 | #include <linux/syscalls.h> |
27 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
28 | #include <linux/vmalloc.h> | 28 | #include <linux/vmalloc.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <asm/processor.h> | 31 | #include <asm/processor.h> |
31 | #include <asm/io.h> | 32 | #include <asm/io.h> |
diff --git a/arch/microblaze/pci/pci_32.c b/arch/microblaze/pci/pci_32.c index 7e0c94f501cc..3c3d808d7ce0 100644 --- a/arch/microblaze/pci/pci_32.c +++ b/arch/microblaze/pci/pci_32.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/of.h> | 16 | #include <linux/of.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include <asm/processor.h> | 19 | #include <asm/processor.h> |
19 | #include <asm/io.h> | 20 | #include <asm/io.h> |
diff --git a/arch/mips/jazz/jazzdma.c b/arch/mips/jazz/jazzdma.c index 0d64d0f46418..9ce9f64cb76f 100644 --- a/arch/mips/jazz/jazzdma.c +++ b/arch/mips/jazz/jazzdma.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/bootmem.h> | 15 | #include <linux/bootmem.h> |
16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/gfp.h> | ||
17 | #include <asm/mipsregs.h> | 18 | #include <asm/mipsregs.h> |
18 | #include <asm/jazz.h> | 19 | #include <asm/jazz.h> |
19 | #include <asm/io.h> | 20 | #include <asm/io.h> |
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c index 981f86c26168..c6345f579a8a 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/kernel_stat.h> | 15 | #include <linux/kernel_stat.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
20 | #include <linux/random.h> | 19 | #include <linux/random.h> |
21 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index a39d0597a375..c2dab140dc98 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/time.h> | 15 | #include <linux/time.h> |
16 | #include <linux/times.h> | 16 | #include <linux/times.h> |
17 | #include <linux/poll.h> | 17 | #include <linux/poll.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/skbuff.h> | 18 | #include <linux/skbuff.h> |
20 | #include <linux/filter.h> | 19 | #include <linux/filter.h> |
21 | #include <linux/shm.h> | 20 | #include <linux/shm.h> |
@@ -34,6 +33,7 @@ | |||
34 | #include <linux/compat.h> | 33 | #include <linux/compat.h> |
35 | #include <linux/vfs.h> | 34 | #include <linux/vfs.h> |
36 | #include <linux/ipc.h> | 35 | #include <linux/ipc.h> |
36 | #include <linux/slab.h> | ||
37 | 37 | ||
38 | #include <net/sock.h> | 38 | #include <net/sock.h> |
39 | #include <net/scm.h> | 39 | #include <net/scm.h> |
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index f3d73e1831c1..463b71b90a00 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/stddef.h> | 17 | #include <linux/stddef.h> |
18 | #include <linux/unistd.h> | 18 | #include <linux/unistd.h> |
19 | #include <linux/ptrace.h> | 19 | #include <linux/ptrace.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/mman.h> | 20 | #include <linux/mman.h> |
22 | #include <linux/personality.h> | 21 | #include <linux/personality.h> |
23 | #include <linux/sys.h> | 22 | #include <linux/sys.h> |
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c index dcaed1bbbfe5..26f9b9ab19cc 100644 --- a/arch/mips/kernel/rtlx.c +++ b/arch/mips/kernel/rtlx.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/fs.h> | 23 | #include <linux/fs.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/list.h> | 26 | #include <linux/list.h> |
28 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
29 | #include <linux/elf.h> | 28 | #include <linux/elf.h> |
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index 23499b5bd9c3..25e825aea327 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kernel_stat.h> | 26 | #include <linux/kernel_stat.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/ftrace.h> | 28 | #include <linux/ftrace.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <asm/cpu.h> | 31 | #include <asm/cpu.h> |
31 | #include <asm/processor.h> | 32 | #include <asm/processor.h> |
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index e96b1c30c7aa..9587abc67f35 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/string.h> | 19 | #include <linux/string.h> |
20 | #include <linux/syscalls.h> | 20 | #include <linux/syscalls.h> |
21 | #include <linux/file.h> | 21 | #include <linux/file.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/utsname.h> | 22 | #include <linux/utsname.h> |
24 | #include <linux/unistd.h> | 23 | #include <linux/unistd.h> |
25 | #include <linux/sem.h> | 24 | #include <linux/sem.h> |
@@ -29,6 +28,7 @@ | |||
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/ipc.h> | 29 | #include <linux/ipc.h> |
31 | #include <linux/uaccess.h> | 30 | #include <linux/uaccess.h> |
31 | #include <linux/slab.h> | ||
32 | 32 | ||
33 | #include <asm/asm.h> | 33 | #include <asm/asm.h> |
34 | #include <asm/branch.h> | 34 | #include <asm/branch.h> |
diff --git a/arch/mips/mipssim/sim_int.c b/arch/mips/mipssim/sim_int.c index 46067ad542dc..5c779be6f082 100644 --- a/arch/mips/mipssim/sim_int.c +++ b/arch/mips/mipssim/sim_int.c | |||
@@ -17,7 +17,6 @@ | |||
17 | */ | 17 | */ |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
22 | #include <linux/kernel_stat.h> | 21 | #include <linux/kernel_stat.h> |
23 | #include <asm/mips-boards/simint.h> | 22 | #include <asm/mips-boards/simint.h> |
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index 9367e33fbd18..9547bc0cf188 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/scatterlist.h> | 15 | #include <linux/scatterlist.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/gfp.h> | ||
17 | 18 | ||
18 | #include <asm/cache.h> | 19 | #include <asm/cache.h> |
19 | #include <asm/io.h> | 20 | #include <asm/io.h> |
diff --git a/arch/mips/mm/hugetlbpage.c b/arch/mips/mm/hugetlbpage.c index cd0660c51f28..a7fee0dfb7a9 100644 --- a/arch/mips/mm/hugetlbpage.c +++ b/arch/mips/mm/hugetlbpage.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/hugetlb.h> | 17 | #include <linux/hugetlb.h> |
18 | #include <linux/pagemap.h> | 18 | #include <linux/pagemap.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/err.h> | 19 | #include <linux/err.h> |
21 | #include <linux/sysctl.h> | 20 | #include <linux/sysctl.h> |
22 | #include <asm/mman.h> | 21 | #include <asm/mman.h> |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 12539af38a99..2efcbd24c82f 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/proc_fs.h> | 28 | #include <linux/proc_fs.h> |
29 | #include <linux/pfn.h> | 29 | #include <linux/pfn.h> |
30 | #include <linux/hardirq.h> | 30 | #include <linux/hardirq.h> |
31 | #include <linux/gfp.h> | ||
31 | 32 | ||
32 | #include <asm/asm-offsets.h> | 33 | #include <asm/asm-offsets.h> |
33 | #include <asm/bootinfo.h> | 34 | #include <asm/bootinfo.h> |
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c index 0c43248347bd..cacfd31e8ec9 100644 --- a/arch/mips/mm/ioremap.c +++ b/arch/mips/mm/ioremap.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/addrspace.h> | 10 | #include <asm/addrspace.h> |
11 | #include <asm/byteorder.h> | 11 | #include <asm/byteorder.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/vmalloc.h> | 14 | #include <linux/vmalloc.h> |
14 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
15 | #include <asm/io.h> | 16 | #include <asm/io.h> |
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c index 2cb5ae790203..15949b0be811 100644 --- a/arch/mips/mti-malta/malta-int.c +++ b/arch/mips/mti-malta/malta-int.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/irq.h> | 25 | #include <linux/irq.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/smp.h> | 27 | #include <linux/smp.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
30 | #include <linux/io.h> | 29 | #include <linux/io.h> |
31 | #include <linux/kernel_stat.h> | 30 | #include <linux/kernel_stat.h> |
diff --git a/arch/mips/nxp/pnx833x/common/reset.c b/arch/mips/nxp/pnx833x/common/reset.c index a9bc9bacad2b..e0ea96d29fde 100644 --- a/arch/mips/nxp/pnx833x/common/reset.c +++ b/arch/mips/nxp/pnx833x/common/reset.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * along with this program; if not, write to the Free Software | 22 | * along with this program; if not, write to the Free Software |
23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
24 | */ | 24 | */ |
25 | #include <linux/slab.h> | ||
26 | #include <linux/reboot.h> | 25 | #include <linux/reboot.h> |
27 | #include <pnx833x.h> | 26 | #include <pnx833x.h> |
28 | 27 | ||
diff --git a/arch/mips/nxp/pnx8550/common/int.c b/arch/mips/nxp/pnx8550/common/int.c index 7aca7d5375e5..cfed5051dc6d 100644 --- a/arch/mips/nxp/pnx8550/common/int.c +++ b/arch/mips/nxp/pnx8550/common/int.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/irq.h> | 28 | #include <linux/irq.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/slab.h> | ||
31 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
32 | #include <linux/kernel_stat.h> | 31 | #include <linux/kernel_stat.h> |
33 | #include <linux/random.h> | 32 | #include <linux/random.h> |
diff --git a/arch/mips/nxp/pnx8550/common/proc.c b/arch/mips/nxp/pnx8550/common/proc.c index af094cd1d85b..3bba5ec828e8 100644 --- a/arch/mips/nxp/pnx8550/common/proc.c +++ b/arch/mips/nxp/pnx8550/common/proc.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/proc_fs.h> | 16 | #include <linux/proc_fs.h> |
17 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
21 | #include <linux/kernel_stat.h> | 20 | #include <linux/kernel_stat.h> |
22 | #include <linux/random.h> | 21 | #include <linux/random.h> |
diff --git a/arch/mips/nxp/pnx8550/common/reset.c b/arch/mips/nxp/pnx8550/common/reset.c index 7b2cbc5b2c7c..76bc3ec634ee 100644 --- a/arch/mips/nxp/pnx8550/common/reset.c +++ b/arch/mips/nxp/pnx8550/common/reset.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * Reset the PNX8550 board. | 20 | * Reset the PNX8550 board. |
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | #include <linux/slab.h> | ||
24 | #include <asm/reboot.h> | 23 | #include <asm/reboot.h> |
25 | #include <glb.h> | 24 | #include <glb.h> |
26 | 25 | ||
diff --git a/arch/mips/pci/ops-titan-ht.c b/arch/mips/pci/ops-titan-ht.c index 46c636c27e06..749c1922d420 100644 --- a/arch/mips/pci/ops-titan-ht.c +++ b/arch/mips/pci/ops-titan-ht.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
31 | #include <asm/io.h> | 30 | #include <asm/io.h> |
32 | 31 | ||
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_prom.c b/arch/mips/pmc-sierra/msp71xx/msp_prom.c index db98d87a0922..db00deb59b9c 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_prom.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_prom.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/string.h> | 40 | #include <linux/string.h> |
41 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
42 | #include <linux/mm.h> | 42 | #include <linux/mm.h> |
43 | #include <linux/slab.h> | ||
43 | 44 | ||
44 | #include <asm/addrspace.h> | 45 | #include <asm/addrspace.h> |
45 | #include <asm/bootinfo.h> | 46 | #include <asm/bootinfo.h> |
diff --git a/arch/mips/pmc-sierra/yosemite/ht.c b/arch/mips/pmc-sierra/yosemite/ht.c index fd22597edb64..63be40e470db 100644 --- a/arch/mips/pmc-sierra/yosemite/ht.c +++ b/arch/mips/pmc-sierra/yosemite/ht.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/slab.h> | ||
30 | #include <asm/pci.h> | 29 | #include <asm/pci.h> |
31 | #include <asm/io.h> | 30 | #include <asm/io.h> |
32 | 31 | ||
diff --git a/arch/mips/pmc-sierra/yosemite/irq.c b/arch/mips/pmc-sierra/yosemite/irq.c index 5f673eba142c..51021cfd04bc 100644 --- a/arch/mips/pmc-sierra/yosemite/irq.c +++ b/arch/mips/pmc-sierra/yosemite/irq.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <linux/ioport.h> | 37 | #include <linux/ioport.h> |
38 | #include <linux/irq.h> | 38 | #include <linux/irq.h> |
39 | #include <linux/timex.h> | 39 | #include <linux/timex.h> |
40 | #include <linux/slab.h> | ||
41 | #include <linux/random.h> | 40 | #include <linux/random.h> |
42 | #include <linux/bitops.h> | 41 | #include <linux/bitops.h> |
43 | #include <asm/bootinfo.h> | 42 | #include <asm/bootinfo.h> |
diff --git a/arch/mips/powertv/asic/asic_devices.c b/arch/mips/powertv/asic/asic_devices.c index 217424231eb6..8ee77887306a 100644 --- a/arch/mips/powertv/asic/asic_devices.c +++ b/arch/mips/powertv/asic/asic_devices.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/mm.h> | 39 | #include <linux/mm.h> |
40 | #include <linux/platform_device.h> | 40 | #include <linux/platform_device.h> |
41 | #include <linux/module.h> | 41 | #include <linux/module.h> |
42 | #include <linux/gfp.h> | ||
42 | #include <asm/page.h> | 43 | #include <asm/page.h> |
43 | #include <linux/swap.h> | 44 | #include <linux/swap.h> |
44 | #include <linux/highmem.h> | 45 | #include <linux/highmem.h> |
diff --git a/arch/mips/powertv/asic/asic_int.c b/arch/mips/powertv/asic/asic_int.c index 325fab9685d1..529c44a52d64 100644 --- a/arch/mips/powertv/asic/asic_int.c +++ b/arch/mips/powertv/asic/asic_int.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
28 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
31 | #include <linux/kernel_stat.h> | 30 | #include <linux/kernel_stat.h> |
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
diff --git a/arch/mips/rb532/irq.c b/arch/mips/rb532/irq.c index f07882029a90..ea6cec3c1e0d 100644 --- a/arch/mips/rb532/irq.c +++ b/arch/mips/rb532/irq.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
37 | #include <linux/ioport.h> | 37 | #include <linux/ioport.h> |
38 | #include <linux/timex.h> | 38 | #include <linux/timex.h> |
39 | #include <linux/slab.h> | ||
40 | #include <linux/random.h> | 39 | #include <linux/random.h> |
41 | #include <linux/delay.h> | 40 | #include <linux/delay.h> |
42 | 41 | ||
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index c1c8e40d65d6..6a123ea72de5 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/ioport.h> | 18 | #include <linux/ioport.h> |
19 | #include <linux/timex.h> | 19 | #include <linux/timex.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/smp.h> | 20 | #include <linux/smp.h> |
22 | #include <linux/random.h> | 21 | #include <linux/random.h> |
23 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c index d8b65204d288..eb40824b172a 100644 --- a/arch/mips/sgi-ip32/ip32-irq.c +++ b/arch/mips/sgi-ip32/ip32-irq.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/irq.h> | 15 | #include <linux/irq.h> |
16 | #include <linux/bitops.h> | 16 | #include <linux/bitops.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
20 | #include <linux/random.h> | 19 | #include <linux/random.h> |
21 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c index 06e25d949768..7a8b0a8b643a 100644 --- a/arch/mips/sibyte/bcm1480/irq.c +++ b/arch/mips/sibyte/bcm1480/irq.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/slab.h> | ||
26 | #include <linux/kernel_stat.h> | 25 | #include <linux/kernel_stat.h> |
27 | 26 | ||
28 | #include <asm/errno.h> | 27 | #include <asm/errno.h> |
diff --git a/arch/mips/sibyte/common/sb_tbprof.c b/arch/mips/sibyte/common/sb_tbprof.c index ed2453eab5cb..d4ed7a9156f5 100644 --- a/arch/mips/sibyte/common/sb_tbprof.c +++ b/arch/mips/sibyte/common/sb_tbprof.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
30 | #include <linux/slab.h> | ||
31 | #include <linux/vmalloc.h> | 30 | #include <linux/vmalloc.h> |
32 | #include <linux/fs.h> | 31 | #include <linux/fs.h> |
33 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c index ab44a2f59ee4..62371f772553 100644 --- a/arch/mips/sibyte/sb1250/irq.c +++ b/arch/mips/sibyte/sb1250/irq.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
23 | #include <linux/smp.h> | 23 | #include <linux/smp.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/slab.h> | ||
26 | #include <linux/kernel_stat.h> | 25 | #include <linux/kernel_stat.h> |
27 | 26 | ||
28 | #include <asm/errno.h> | 27 | #include <asm/errno.h> |
diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c index 707cfa9c547d..9a0be810cafa 100644 --- a/arch/mips/txx9/generic/pci.c +++ b/arch/mips/txx9/generic/pci.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/txx9/pci.h> | 20 | #include <asm/txx9/pci.h> |
21 | #ifdef CONFIG_TOSHIBA_FPCIB0 | 21 | #ifdef CONFIG_TOSHIBA_FPCIB0 |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/slab.h> | ||
23 | #include <asm/i8259.h> | 24 | #include <asm/i8259.h> |
24 | #include <asm/txx9/smsc_fdc37m81x.h> | 25 | #include <asm/txx9/smsc_fdc37m81x.h> |
25 | #endif | 26 | #endif |
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index 95184a0a1ae6..adc69291f9e2 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mtd/physmap.h> | 23 | #include <linux/mtd/physmap.h> |
24 | #include <linux/leds.h> | 24 | #include <linux/leds.h> |
25 | #include <linux/sysdev.h> | 25 | #include <linux/sysdev.h> |
26 | #include <linux/slab.h> | ||
26 | #include <asm/bootinfo.h> | 27 | #include <asm/bootinfo.h> |
27 | #include <asm/time.h> | 28 | #include <asm/time.h> |
28 | #include <asm/reboot.h> | 29 | #include <asm/reboot.h> |
diff --git a/arch/mips/txx9/generic/spi_eeprom.c b/arch/mips/txx9/generic/spi_eeprom.c index 75c347238f47..103abc13d623 100644 --- a/arch/mips/txx9/generic/spi_eeprom.c +++ b/arch/mips/txx9/generic/spi_eeprom.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) | 10 | * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) |
11 | */ | 11 | */ |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/device.h> | 14 | #include <linux/device.h> |
14 | #include <linux/spi/spi.h> | 15 | #include <linux/spi/spi.h> |
15 | #include <linux/spi/eeprom.h> | 16 | #include <linux/spi/eeprom.h> |
diff --git a/arch/mips/txx9/rbtx4939/setup.c b/arch/mips/txx9/rbtx4939/setup.c index b0c241ecf603..7dc0fafbec80 100644 --- a/arch/mips/txx9/rbtx4939/setup.c +++ b/arch/mips/txx9/rbtx4939/setup.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
16 | #include <linux/leds.h> | 17 | #include <linux/leds.h> |
17 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c index ec8a21df1142..82b817c7f7b6 100644 --- a/arch/mn10300/kernel/process.c +++ b/arch/mn10300/kernel/process.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/stddef.h> | 18 | #include <linux/stddef.h> |
19 | #include <linux/unistd.h> | 19 | #include <linux/unistd.h> |
20 | #include <linux/ptrace.h> | 20 | #include <linux/ptrace.h> |
21 | #include <linux/slab.h> | ||
22 | #include <linux/user.h> | 21 | #include <linux/user.h> |
23 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
24 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
@@ -26,6 +25,7 @@ | |||
26 | #include <linux/percpu.h> | 25 | #include <linux/percpu.h> |
27 | #include <linux/err.h> | 26 | #include <linux/err.h> |
28 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
28 | #include <linux/slab.h> | ||
29 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
30 | #include <asm/pgtable.h> | 30 | #include <asm/pgtable.h> |
31 | #include <asm/system.h> | 31 | #include <asm/system.h> |
diff --git a/arch/mn10300/kernel/setup.c b/arch/mn10300/kernel/setup.c index 3f24c298a3af..d464affcba0e 100644 --- a/arch/mn10300/kernel/setup.c +++ b/arch/mn10300/kernel/setup.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/stddef.h> | 15 | #include <linux/stddef.h> |
16 | #include <linux/unistd.h> | 16 | #include <linux/unistd.h> |
17 | #include <linux/ptrace.h> | 17 | #include <linux/ptrace.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/user.h> | 18 | #include <linux/user.h> |
20 | #include <linux/tty.h> | 19 | #include <linux/tty.h> |
21 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
diff --git a/arch/mn10300/mm/dma-alloc.c b/arch/mn10300/mm/dma-alloc.c index ee82d624b3c6..4e34880bea03 100644 --- a/arch/mn10300/mm/dma-alloc.c +++ b/arch/mn10300/mm/dma-alloc.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/pci.h> | 16 | #include <linux/pci.h> |
17 | #include <linux/gfp.h> | ||
17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
18 | 19 | ||
19 | static unsigned long pci_sram_allocated = 0xbc000000; | 20 | static unsigned long pci_sram_allocated = 0xbc000000; |
diff --git a/arch/mn10300/mm/init.c b/arch/mn10300/mm/init.c index dd27a9a35152..6e6bc0e51521 100644 --- a/arch/mn10300/mm/init.c +++ b/arch/mn10300/mm/init.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/ptrace.h> | 18 | #include <linux/ptrace.h> |
19 | #include <linux/mman.h> | 19 | #include <linux/mman.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
22 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
23 | #include <linux/swap.h> | 22 | #include <linux/swap.h> |
@@ -27,6 +26,7 @@ | |||
27 | #include <linux/highmem.h> | 26 | #include <linux/highmem.h> |
28 | #include <linux/pagemap.h> | 27 | #include <linux/pagemap.h> |
29 | #include <linux/bootmem.h> | 28 | #include <linux/bootmem.h> |
29 | #include <linux/gfp.h> | ||
30 | 30 | ||
31 | #include <asm/processor.h> | 31 | #include <asm/processor.h> |
32 | #include <asm/system.h> | 32 | #include <asm/system.h> |
diff --git a/arch/mn10300/mm/pgtable.c b/arch/mn10300/mm/pgtable.c index baffc581e031..9c1624c9e4e9 100644 --- a/arch/mn10300/mm/pgtable.c +++ b/arch/mn10300/mm/pgtable.c | |||
@@ -12,11 +12,11 @@ | |||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/gfp.h> | ||
15 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
16 | #include <linux/swap.h> | 17 | #include <linux/swap.h> |
17 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
18 | #include <linux/highmem.h> | 19 | #include <linux/highmem.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/pagemap.h> | 20 | #include <linux/pagemap.h> |
21 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
22 | #include <linux/quicklist.h> | 22 | #include <linux/quicklist.h> |
diff --git a/arch/mn10300/unit-asb2305/pci-irq.c b/arch/mn10300/unit-asb2305/pci-irq.c index 58cfb44f0acf..91212ea71e69 100644 --- a/arch/mn10300/unit-asb2305/pci-irq.c +++ b/arch/mn10300/unit-asb2305/pci-irq.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
19 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
20 | #include <asm/io.h> | 19 | #include <asm/io.h> |
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c index 54075360a8fd..6935123178eb 100644 --- a/arch/parisc/hpux/fs.c +++ b/arch/parisc/hpux/fs.c | |||
@@ -26,8 +26,8 @@ | |||
26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/file.h> | 28 | #include <linux/file.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/ptrace.h> | 29 | #include <linux/ptrace.h> |
30 | #include <linux/slab.h> | ||
31 | #include <asm/errno.h> | 31 | #include <asm/errno.h> |
32 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
33 | 33 | ||
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index 212074653df7..159a2b81e90c 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <linux/string.h> | 61 | #include <linux/string.h> |
62 | #include <linux/kernel.h> | 62 | #include <linux/kernel.h> |
63 | #include <linux/bug.h> | 63 | #include <linux/bug.h> |
64 | #include <linux/slab.h> | ||
64 | 65 | ||
65 | #include <asm/unwind.h> | 66 | #include <asm/unwind.h> |
66 | 67 | ||
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c index c07f618ff7da..a029f74a3c5c 100644 --- a/arch/parisc/kernel/pci-dma.c +++ b/arch/parisc/kernel/pci-dma.c | |||
@@ -18,11 +18,11 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/gfp.h> | ||
21 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
22 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
23 | #include <linux/proc_fs.h> | 24 | #include <linux/proc_fs.h> |
24 | #include <linux/seq_file.h> | 25 | #include <linux/seq_file.h> |
25 | #include <linux/slab.h> | ||
26 | #include <linux/string.h> | 26 | #include <linux/string.h> |
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/scatterlist.h> | 28 | #include <linux/scatterlist.h> |
diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c index 38372e7cbb88..9efd97405317 100644 --- a/arch/parisc/kernel/pci.c +++ b/arch/parisc/kernel/pci.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/types.h> | 16 | #include <linux/types.h> |
18 | 17 | ||
19 | #include <asm/io.h> | 18 | #include <asm/io.h> |
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 1f3aa8db0203..76332dadc6e9 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/personality.h> | 43 | #include <linux/personality.h> |
44 | #include <linux/ptrace.h> | 44 | #include <linux/ptrace.h> |
45 | #include <linux/sched.h> | 45 | #include <linux/sched.h> |
46 | #include <linux/slab.h> | ||
46 | #include <linux/stddef.h> | 47 | #include <linux/stddef.h> |
47 | #include <linux/unistd.h> | 48 | #include <linux/unistd.h> |
48 | #include <linux/kallsyms.h> | 49 | #include <linux/kallsyms.h> |
diff --git a/arch/parisc/kernel/signal32.c b/arch/parisc/kernel/signal32.c index fb59852006de..e14132430762 100644 --- a/arch/parisc/kernel/signal32.c +++ b/arch/parisc/kernel/signal32.c | |||
@@ -23,7 +23,6 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/compat.h> | 25 | #include <linux/compat.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/module.h> | 26 | #include <linux/module.h> |
28 | #include <linux/unistd.h> | 27 | #include <linux/unistd.h> |
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 3f2fce8ce6b6..69d63d354ef0 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -18,7 +18,6 @@ | |||
18 | */ | 18 | */ |
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/slab.h> | ||
22 | 21 | ||
23 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 13b6e3e59b99..f4f4d700833a 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/bootmem.h> | 16 | #include <linux/bootmem.h> |
17 | #include <linux/gfp.h> | ||
17 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <linux/pci.h> /* for hppa_dma_ops and pcxl_dma_ops */ | 20 | #include <linux/pci.h> /* for hppa_dma_ops and pcxl_dma_ops */ |
diff --git a/arch/powerpc/include/asm/asm-compat.h b/arch/powerpc/include/asm/asm-compat.h index c1b475a941eb..a9b91ed3d4b9 100644 --- a/arch/powerpc/include/asm/asm-compat.h +++ b/arch/powerpc/include/asm/asm-compat.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #define PPC_LLARX(t, a, b, eh) PPC_LDARX(t, a, b, eh) | 28 | #define PPC_LLARX(t, a, b, eh) PPC_LDARX(t, a, b, eh) |
29 | #define PPC_STLCX stringify_in_c(stdcx.) | 29 | #define PPC_STLCX stringify_in_c(stdcx.) |
30 | #define PPC_CNTLZL stringify_in_c(cntlzd) | 30 | #define PPC_CNTLZL stringify_in_c(cntlzd) |
31 | #define PPC_LR_STKOFF 16 | ||
31 | 32 | ||
32 | /* Move to CR, single-entry optimized version. Only available | 33 | /* Move to CR, single-entry optimized version. Only available |
33 | * on POWER4 and later. | 34 | * on POWER4 and later. |
@@ -51,6 +52,7 @@ | |||
51 | #define PPC_STLCX stringify_in_c(stwcx.) | 52 | #define PPC_STLCX stringify_in_c(stwcx.) |
52 | #define PPC_CNTLZL stringify_in_c(cntlzw) | 53 | #define PPC_CNTLZL stringify_in_c(cntlzw) |
53 | #define PPC_MTOCRF stringify_in_c(mtcrf) | 54 | #define PPC_MTOCRF stringify_in_c(mtcrf) |
55 | #define PPC_LR_STKOFF 4 | ||
54 | 56 | ||
55 | #endif | 57 | #endif |
56 | 58 | ||
diff --git a/arch/powerpc/kernel/cacheinfo.c b/arch/powerpc/kernel/cacheinfo.c index 01fe9ce28379..a3c684b4c862 100644 --- a/arch/powerpc/kernel/cacheinfo.c +++ b/arch/powerpc/kernel/cacheinfo.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | #include <linux/percpu.h> | 21 | #include <linux/percpu.h> |
22 | #include <linux/slab.h> | ||
22 | #include <asm/prom.h> | 23 | #include <asm/prom.h> |
23 | 24 | ||
24 | #include "cacheinfo.h" | 25 | #include "cacheinfo.h" |
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index 6215062caf8c..6c1df5757cd6 100644 --- a/arch/powerpc/kernel/dma.c +++ b/arch/powerpc/kernel/dma.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/device.h> | 8 | #include <linux/device.h> |
9 | #include <linux/dma-mapping.h> | 9 | #include <linux/dma-mapping.h> |
10 | #include <linux/dma-debug.h> | 10 | #include <linux/dma-debug.h> |
11 | #include <linux/gfp.h> | ||
11 | #include <linux/lmb.h> | 12 | #include <linux/lmb.h> |
12 | #include <asm/bug.h> | 13 | #include <asm/bug.h> |
13 | #include <asm/abs_addr.h> | 14 | #include <asm/abs_addr.h> |
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index a4c8b38b0ba1..71cf280da184 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/dma-mapping.h> | 42 | #include <linux/dma-mapping.h> |
43 | #include <linux/interrupt.h> | 43 | #include <linux/interrupt.h> |
44 | #include <linux/of.h> | 44 | #include <linux/of.h> |
45 | #include <linux/slab.h> | ||
45 | #include <linux/of_platform.h> | 46 | #include <linux/of_platform.h> |
46 | #include <asm/ibmebus.h> | 47 | #include <asm/ibmebus.h> |
47 | #include <asm/abs_addr.h> | 48 | #include <asm/abs_addr.h> |
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 3fd1af902112..b36f074524ad 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/preempt.h> | 31 | #include <linux/preempt.h> |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/kdebug.h> | 33 | #include <linux/kdebug.h> |
34 | #include <linux/slab.h> | ||
34 | #include <asm/cacheflush.h> | 35 | #include <asm/cacheflush.h> |
35 | #include <asm/sstep.h> | 36 | #include <asm/sstep.h> |
36 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index d09d1c615150..c2c70e1b32cd 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/proc_fs.h> | 24 | #include <linux/proc_fs.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/seq_file.h> | 26 | #include <linux/seq_file.h> |
27 | #include <linux/slab.h> | ||
27 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
28 | #include <asm/iseries/hv_lp_config.h> | 29 | #include <asm/iseries/hv_lp_config.h> |
29 | #include <asm/lppaca.h> | 30 | #include <asm/lppaca.h> |
diff --git a/arch/powerpc/kernel/misc.S b/arch/powerpc/kernel/misc.S index 2d29752cbe16..22e507c8a556 100644 --- a/arch/powerpc/kernel/misc.S +++ b/arch/powerpc/kernel/misc.S | |||
@@ -127,3 +127,29 @@ _GLOBAL(__setup_cpu_power7) | |||
127 | _GLOBAL(__restore_cpu_power7) | 127 | _GLOBAL(__restore_cpu_power7) |
128 | /* place holder */ | 128 | /* place holder */ |
129 | blr | 129 | blr |
130 | |||
131 | /* | ||
132 | * Get a minimal set of registers for our caller's nth caller. | ||
133 | * r3 = regs pointer, r5 = n. | ||
134 | * | ||
135 | * We only get R1 (stack pointer), NIP (next instruction pointer) | ||
136 | * and LR (link register). These are all we can get in the | ||
137 | * general case without doing complicated stack unwinding, but | ||
138 | * fortunately they are enough to do a stack backtrace, which | ||
139 | * is all we need them for. | ||
140 | */ | ||
141 | _GLOBAL(perf_arch_fetch_caller_regs) | ||
142 | mr r6,r1 | ||
143 | cmpwi r5,0 | ||
144 | mflr r4 | ||
145 | ble 2f | ||
146 | mtctr r5 | ||
147 | 1: PPC_LL r6,0(r6) | ||
148 | bdnz 1b | ||
149 | PPC_LL r4,PPC_LR_STKOFF(r6) | ||
150 | 2: PPC_LL r7,0(r6) | ||
151 | PPC_LL r7,PPC_LR_STKOFF(r7) | ||
152 | PPC_STL r6,GPR1-STACK_FRAME_OVERHEAD(r3) | ||
153 | PPC_STL r4,_NIP-STACK_FRAME_OVERHEAD(r3) | ||
154 | PPC_STL r7,_LINK-STACK_FRAME_OVERHEAD(r3) | ||
155 | blr | ||
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index 666d08db319e..6c1dfc3ff8bc 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/mod_devicetable.h> | 19 | #include <linux/mod_devicetable.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
22 | #include <linux/of.h> | 21 | #include <linux/of.h> |
23 | #include <linux/of_device.h> | 22 | #include <linux/of_device.h> |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index f3c42ce516e7..0c0567e58409 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/syscalls.h> | 26 | #include <linux/syscalls.h> |
27 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
28 | #include <linux/vmalloc.h> | 28 | #include <linux/vmalloc.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <asm/processor.h> | 31 | #include <asm/processor.h> |
31 | #include <asm/io.h> | 32 | #include <asm/io.h> |
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index c13668cf36d9..e7db5b48004a 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/of.h> | 16 | #include <linux/of.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include <asm/processor.h> | 19 | #include <asm/processor.h> |
19 | #include <asm/io.h> | 20 | #include <asm/io.h> |
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c index d5e36e5dc7c2..d56b35ee7f74 100644 --- a/arch/powerpc/kernel/pci_dn.c +++ b/arch/powerpc/kernel/pci_dn.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/string.h> | 24 | #include <linux/string.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/gfp.h> | ||
26 | 27 | ||
27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
28 | #include <asm/prom.h> | 29 | #include <asm/prom.h> |
diff --git a/arch/powerpc/kernel/proc_powerpc.c b/arch/powerpc/kernel/proc_powerpc.c index 1ed3b8d7981e..c8ae3714e79b 100644 --- a/arch/powerpc/kernel/proc_powerpc.c +++ b/arch/powerpc/kernel/proc_powerpc.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
21 | #include <linux/proc_fs.h> | 21 | #include <linux/proc_fs.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
24 | 23 | ||
25 | #include <asm/machdep.h> | 24 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index fd0d29493fd6..74367841615a 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/completion.h> | 23 | #include <linux/completion.h> |
24 | #include <linux/cpumask.h> | 24 | #include <linux/cpumask.h> |
25 | #include <linux/lmb.h> | 25 | #include <linux/lmb.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <asm/prom.h> | 28 | #include <asm/prom.h> |
28 | #include <asm/rtas.h> | 29 | #include <asm/rtas.h> |
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index a85117d5c9a4..bfc2abafac44 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
19 | #include <asm/delay.h> | 20 | #include <asm/delay.h> |
20 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c index 2e4832ab2108..4190eae7850a 100644 --- a/arch/powerpc/kernel/rtasd.c +++ b/arch/powerpc/kernel/rtasd.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/cpu.h> | 21 | #include <linux/cpu.h> |
22 | #include <linux/workqueue.h> | 22 | #include <linux/workqueue.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
diff --git a/arch/powerpc/kernel/smp-tbsync.c b/arch/powerpc/kernel/smp-tbsync.c index a5e54526403d..03e45c4a9ef1 100644 --- a/arch/powerpc/kernel/smp-tbsync.c +++ b/arch/powerpc/kernel/smp-tbsync.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/smp.h> | 10 | #include <linux/smp.h> |
11 | #include <linux/unistd.h> | 11 | #include <linux/unistd.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/slab.h> | ||
13 | #include <asm/atomic.h> | 14 | #include <asm/atomic.h> |
14 | #include <asm/smp.h> | 15 | #include <asm/smp.h> |
15 | #include <asm/time.h> | 16 | #include <asm/time.h> |
diff --git a/arch/powerpc/kernel/softemu8xx.c b/arch/powerpc/kernel/softemu8xx.c index 23c8c5e7dc4d..af0e8290b4fc 100644 --- a/arch/powerpc/kernel/softemu8xx.c +++ b/arch/powerpc/kernel/softemu8xx.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/stddef.h> | 21 | #include <linux/stddef.h> |
22 | #include <linux/unistd.h> | 22 | #include <linux/unistd.h> |
23 | #include <linux/ptrace.h> | 23 | #include <linux/ptrace.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/user.h> | 24 | #include <linux/user.h> |
26 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
27 | 26 | ||
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c index c5a4732bcc48..19471a1cef1a 100644 --- a/arch/powerpc/kernel/sys_ppc32.c +++ b/arch/powerpc/kernel/sys_ppc32.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/ptrace.h> | 41 | #include <linux/ptrace.h> |
42 | #include <linux/elf.h> | 42 | #include <linux/elf.h> |
43 | #include <linux/ipc.h> | 43 | #include <linux/ipc.h> |
44 | #include <linux/slab.h> | ||
44 | 45 | ||
45 | #include <asm/ptrace.h> | 46 | #include <asm/ptrace.h> |
46 | #include <asm/types.h> | 47 | #include <asm/types.h> |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 696626a2e835..29d128eb6c43 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/stddef.h> | 21 | #include <linux/stddef.h> |
22 | #include <linux/unistd.h> | 22 | #include <linux/unistd.h> |
23 | #include <linux/ptrace.h> | 23 | #include <linux/ptrace.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/user.h> | 24 | #include <linux/user.h> |
26 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
27 | #include <linux/init.h> | 26 | #include <linux/init.h> |
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 77f64218abf3..82237176a2a3 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/device.h> | 18 | #include <linux/device.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/console.h> | 21 | #include <linux/console.h> |
21 | #include <linux/module.h> | 22 | #include <linux/module.h> |
22 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
diff --git a/arch/powerpc/kvm/44x.c b/arch/powerpc/kvm/44x.c index f4d1b55aa70b..689a57c2ac80 100644 --- a/arch/powerpc/kvm/44x.c +++ b/arch/powerpc/kvm/44x.c | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/kvm_host.h> | 20 | #include <linux/kvm_host.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/err.h> | 22 | #include <linux/err.h> |
22 | 23 | ||
23 | #include <asm/reg.h> | 24 | #include <asm/reg.h> |
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index 9a271f0929c7..25da07fd9f77 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <asm/kvm_ppc.h> | 26 | #include <asm/kvm_ppc.h> |
27 | #include <asm/kvm_book3s.h> | 27 | #include <asm/kvm_book3s.h> |
28 | #include <asm/mmu_context.h> | 28 | #include <asm/mmu_context.h> |
29 | #include <linux/gfp.h> | ||
29 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
30 | #include <linux/vmalloc.h> | 31 | #include <linux/vmalloc.h> |
31 | 32 | ||
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 4d686cc6b260..2a3a1953d4bd 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/err.h> | 22 | #include <linux/err.h> |
23 | #include <linux/kvm_host.h> | 23 | #include <linux/kvm_host.h> |
24 | #include <linux/gfp.h> | ||
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
25 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
26 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c index efa1198940ab..669a5c5fc7d7 100644 --- a/arch/powerpc/kvm/e500.c +++ b/arch/powerpc/kvm/e500.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/kvm_host.h> | 15 | #include <linux/kvm_host.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/err.h> | 17 | #include <linux/err.h> |
17 | 18 | ||
18 | #include <asm/reg.h> | 19 | #include <asm/reg.h> |
diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c index 0d772e6b6318..21011e12caeb 100644 --- a/arch/powerpc/kvm/e500_tlb.c +++ b/arch/powerpc/kvm/e500_tlb.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/string.h> | 17 | #include <linux/string.h> |
17 | #include <linux/kvm.h> | 18 | #include <linux/kvm.h> |
18 | #include <linux/kvm_host.h> | 19 | #include <linux/kvm_host.h> |
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 51aedd7f16bc..297fcd2ff7d0 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/vmalloc.h> | 25 | #include <linux/vmalloc.h> |
26 | #include <linux/hrtimer.h> | 26 | #include <linux/hrtimer.h> |
27 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
28 | #include <linux/slab.h> | ||
28 | #include <asm/cputable.h> | 29 | #include <asm/cputable.h> |
29 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
30 | #include <asm/kvm_ppc.h> | 31 | #include <asm/kvm_ppc.h> |
diff --git a/arch/powerpc/lib/devres.c b/arch/powerpc/lib/devres.c index 292115d98ea9..deac4d30daf4 100644 --- a/arch/powerpc/lib/devres.c +++ b/arch/powerpc/lib/devres.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/device.h> /* devres_*(), devm_ioremap_release() */ | 10 | #include <linux/device.h> /* devres_*(), devm_ioremap_release() */ |
11 | #include <linux/gfp.h> | ||
11 | #include <linux/io.h> /* ioremap_flags() */ | 12 | #include <linux/io.h> /* ioremap_flags() */ |
12 | #include <linux/module.h> /* EXPORT_SYMBOL() */ | 13 | #include <linux/module.h> /* EXPORT_SYMBOL() */ |
13 | 14 | ||
diff --git a/arch/powerpc/mm/dma-noncoherent.c b/arch/powerpc/mm/dma-noncoherent.c index 36692f5c9a76..757c0bed9a91 100644 --- a/arch/powerpc/mm/dma-noncoherent.c +++ b/arch/powerpc/mm/dma-noncoherent.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
27 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
28 | #include <linux/string.h> | 29 | #include <linux/string.h> |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 123f7070238a..9bb249c3046e 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/io.h> | 11 | #include <linux/io.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/hugetlb.h> | 13 | #include <linux/hugetlb.h> |
13 | #include <asm/pgtable.h> | 14 | #include <asm/pgtable.h> |
14 | #include <asm/pgalloc.h> | 15 | #include <asm/pgalloc.h> |
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index b1dbd9ee87cc..767333005eb4 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/initrd.h> | 31 | #include <linux/initrd.h> |
32 | #include <linux/pagemap.h> | 32 | #include <linux/pagemap.h> |
33 | #include <linux/lmb.h> | 33 | #include <linux/lmb.h> |
34 | #include <linux/gfp.h> | ||
34 | 35 | ||
35 | #include <asm/pgalloc.h> | 36 | #include <asm/pgalloc.h> |
36 | #include <asm/prom.h> | 37 | #include <asm/prom.h> |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 776f28d02b6b..d7fa50b09b4a 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/poison.h> | 42 | #include <linux/poison.h> |
43 | #include <linux/lmb.h> | 43 | #include <linux/lmb.h> |
44 | #include <linux/hugetlb.h> | 44 | #include <linux/hugetlb.h> |
45 | #include <linux/slab.h> | ||
45 | 46 | ||
46 | #include <asm/pgalloc.h> | 47 | #include <asm/pgalloc.h> |
47 | #include <asm/page.h> | 48 | #include <asm/page.h> |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 448f972b22f5..0f594d774bf7 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
24 | #include <linux/string.h> | 24 | #include <linux/string.h> |
25 | #include <linux/gfp.h> | ||
25 | #include <linux/types.h> | 26 | #include <linux/types.h> |
26 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
27 | #include <linux/stddef.h> | 28 | #include <linux/stddef.h> |
diff --git a/arch/powerpc/mm/mmu_context_hash64.c b/arch/powerpc/mm/mmu_context_hash64.c index 51622daae09d..2535828aa84b 100644 --- a/arch/powerpc/mm/mmu_context_hash64.c +++ b/arch/powerpc/mm/mmu_context_hash64.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
20 | #include <linux/idr.h> | 20 | #include <linux/idr.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/gfp.h> | ||
22 | 23 | ||
23 | #include <asm/mmu_context.h> | 24 | #include <asm/mmu_context.h> |
24 | 25 | ||
diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c index dbc692145ecb..1f2d9ff09895 100644 --- a/arch/powerpc/mm/mmu_context_nohash.c +++ b/arch/powerpc/mm/mmu_context_nohash.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/bootmem.h> | 47 | #include <linux/bootmem.h> |
48 | #include <linux/notifier.h> | 48 | #include <linux/notifier.h> |
49 | #include <linux/cpu.h> | 49 | #include <linux/cpu.h> |
50 | #include <linux/slab.h> | ||
50 | 51 | ||
51 | #include <asm/mmu_context.h> | 52 | #include <asm/mmu_context.h> |
52 | #include <asm/tlbflush.h> | 53 | #include <asm/tlbflush.h> |
diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c index 99df697c601a..ebc2f38eb381 100644 --- a/arch/powerpc/mm/pgtable.c +++ b/arch/powerpc/mm/pgtable.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/gfp.h> | ||
25 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
26 | #include <linux/init.h> | 27 | #include <linux/init.h> |
27 | #include <linux/percpu.h> | 28 | #include <linux/percpu.h> |
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index 573b3bd1c45b..b9243e7557ae 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/highmem.h> | 28 | #include <linux/highmem.h> |
29 | #include <linux/lmb.h> | 29 | #include <linux/lmb.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <asm/pgtable.h> | 32 | #include <asm/pgtable.h> |
32 | #include <asm/pgalloc.h> | 33 | #include <asm/pgalloc.h> |
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index 853d5565eed5..d95679a5fb29 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/bootmem.h> | 36 | #include <linux/bootmem.h> |
37 | #include <linux/lmb.h> | 37 | #include <linux/lmb.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include <asm/pgalloc.h> | 40 | #include <asm/pgalloc.h> |
40 | #include <asm/page.h> | 41 | #include <asm/page.h> |
diff --git a/arch/powerpc/mm/subpage-prot.c b/arch/powerpc/mm/subpage-prot.c index a040b81e93bd..e4f8f1fc81a5 100644 --- a/arch/powerpc/mm/subpage-prot.c +++ b/arch/powerpc/mm/subpage-prot.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/gfp.h> | 12 | #include <linux/gfp.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
16 | #include <linux/hugetlb.h> | 15 | #include <linux/hugetlb.h> |
diff --git a/arch/powerpc/oprofile/cell/spu_task_sync.c b/arch/powerpc/oprofile/cell/spu_task_sync.c index 6b793aeda72e..642fca137ccb 100644 --- a/arch/powerpc/oprofile/cell/spu_task_sync.c +++ b/arch/powerpc/oprofile/cell/spu_task_sync.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/notifier.h> | 26 | #include <linux/notifier.h> |
27 | #include <linux/numa.h> | 27 | #include <linux/numa.h> |
28 | #include <linux/oprofile.h> | 28 | #include <linux/oprofile.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
30 | #include "pr_util.h" | 31 | #include "pr_util.h" |
31 | 32 | ||
diff --git a/arch/powerpc/oprofile/cell/vma_map.c b/arch/powerpc/oprofile/cell/vma_map.c index c591339daf58..c579b16845da 100644 --- a/arch/powerpc/oprofile/cell/vma_map.c +++ b/arch/powerpc/oprofile/cell/vma_map.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/uaccess.h> | 21 | #include <linux/uaccess.h> |
22 | #include <linux/elf.h> | 22 | #include <linux/elf.h> |
23 | #include <linux/slab.h> | ||
23 | #include "pr_util.h" | 24 | #include "pr_util.h" |
24 | 25 | ||
25 | 26 | ||
diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c index e5c1b096c3e1..8f771395f424 100644 --- a/arch/powerpc/platforms/44x/warp.c +++ b/arch/powerpc/platforms/44x/warp.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/of_gpio.h> | 18 | #include <linux/of_gpio.h> |
19 | #include <linux/of_i2c.h> | 19 | #include <linux/of_i2c.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include <asm/machdep.h> | 22 | #include <asm/machdep.h> |
22 | #include <asm/prom.h> | 23 | #include <asm/prom.h> |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c index 2b8d8ef32e4e..fda7c2a18282 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/of_gpio.h> | 23 | #include <linux/of_gpio.h> |
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
24 | #include <linux/of_platform.h> | 25 | #include <linux/of_platform.h> |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c index 5d7cc88dae6b..a60ee39d3b78 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #include <linux/of_platform.h> | 62 | #include <linux/of_platform.h> |
63 | #include <linux/of_gpio.h> | 63 | #include <linux/of_gpio.h> |
64 | #include <linux/kernel.h> | 64 | #include <linux/kernel.h> |
65 | #include <linux/slab.h> | ||
65 | #include <linux/watchdog.h> | 66 | #include <linux/watchdog.h> |
66 | #include <linux/miscdevice.h> | 67 | #include <linux/miscdevice.h> |
67 | #include <linux/uaccess.h> | 68 | #include <linux/uaccess.h> |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c index 929d017535a3..d4f8be307cd5 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | |||
@@ -481,6 +481,8 @@ mpc52xx_lpbfifo_probe(struct of_device *op, const struct of_device_id *match) | |||
481 | if (rc) | 481 | if (rc) |
482 | goto err_bcom_rx_irq; | 482 | goto err_bcom_rx_irq; |
483 | 483 | ||
484 | lpbfifo.dma_irqs_enabled = 1; | ||
485 | |||
484 | /* Request the Bestcomm transmit (memory --> fifo) task and IRQ */ | 486 | /* Request the Bestcomm transmit (memory --> fifo) task and IRQ */ |
485 | lpbfifo.bcom_tx_task = | 487 | lpbfifo.bcom_tx_task = |
486 | bcom_gen_bd_tx_init(2, res.start + LPBFIFO_REG_FIFO_DATA, | 488 | bcom_gen_bd_tx_init(2, res.start + LPBFIFO_REG_FIFO_DATA, |
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c index f9aee182e6f7..f21555d3395a 100644 --- a/arch/powerpc/platforms/82xx/ep8248e.c +++ b/arch/powerpc/platforms/82xx/ep8248e.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/fsl_devices.h> | 15 | #include <linux/fsl_devices.h> |
16 | #include <linux/mdio-bitbang.h> | 16 | #include <linux/mdio-bitbang.h> |
17 | #include <linux/of_mdio.h> | 17 | #include <linux/of_mdio.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
19 | 20 | ||
20 | #include <asm/io.h> | 21 | #include <asm/io.h> |
diff --git a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c index d4a09f8705b5..5a55d87d6bd6 100644 --- a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c +++ b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <linux/bootmem.h> | 19 | #include <linux/bootmem.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
22 | #include <asm/prom.h> | 23 | #include <asm/prom.h> |
diff --git a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c index 82a9bcb858b6..d119a7c1c17a 100644 --- a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c +++ b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | #include <linux/of.h> | 21 | #include <linux/of.h> |
22 | #include <linux/of_gpio.h> | 22 | #include <linux/of_gpio.h> |
23 | #include <linux/slab.h> | ||
23 | #include <asm/prom.h> | 24 | #include <asm/prom.h> |
24 | #include <asm/machdep.h> | 25 | #include <asm/machdep.h> |
25 | 26 | ||
diff --git a/arch/powerpc/platforms/86xx/gef_gpio.c b/arch/powerpc/platforms/86xx/gef_gpio.c index 11f7b2b6f49e..b8cb08dbd89c 100644 --- a/arch/powerpc/platforms/86xx/gef_gpio.c +++ b/arch/powerpc/platforms/86xx/gef_gpio.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
27 | #include <linux/of_gpio.h> | 27 | #include <linux/of_gpio.h> |
28 | #include <linux/gpio.h> | 28 | #include <linux/gpio.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #define GEF_GPIO_DIRECT 0x00 | 31 | #define GEF_GPIO_DIRECT 0x00 |
31 | #define GEF_GPIO_IN 0x04 | 32 | #define GEF_GPIO_IN 0x04 |
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c index 242954c4293f..60168c1f98fe 100644 --- a/arch/powerpc/platforms/8xx/m8xx_setup.c +++ b/arch/powerpc/platforms/8xx/m8xx_setup.c | |||
@@ -11,7 +11,6 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/time.h> | 16 | #include <linux/time.h> |
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c index 96fe896f6df3..8efe48192f3f 100644 --- a/arch/powerpc/platforms/cell/axon_msi.c +++ b/arch/powerpc/platforms/cell/axon_msi.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/msi.h> | 15 | #include <linux/msi.h> |
16 | #include <linux/of_platform.h> | 16 | #include <linux/of_platform.h> |
17 | #include <linux/debugfs.h> | 17 | #include <linux/debugfs.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include <asm/dcr.h> | 20 | #include <asm/dcr.h> |
20 | #include <asm/machdep.h> | 21 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/platforms/cell/celleb_pci.c b/arch/powerpc/platforms/cell/celleb_pci.c index 00eaaa71630f..404d1fc04d59 100644 --- a/arch/powerpc/platforms/cell/celleb_pci.c +++ b/arch/powerpc/platforms/cell/celleb_pci.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/pci_regs.h> | 33 | #include <linux/pci_regs.h> |
34 | #include <linux/of.h> | 34 | #include <linux/of.h> |
35 | #include <linux/of_device.h> | 35 | #include <linux/of_device.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <asm/io.h> | 38 | #include <asm/io.h> |
38 | #include <asm/irq.h> | 39 | #include <asm/irq.h> |
diff --git a/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/arch/powerpc/platforms/cell/celleb_scc_pciex.c index 7fca09f990ba..a881bbee8de0 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_pciex.c +++ b/arch/powerpc/platforms/cell/celleb_scc_pciex.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/init.h> | 27 | #include <linux/init.h> |
27 | #include <linux/bootmem.h> | 28 | #include <linux/bootmem.h> |
28 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index ca5bfdfe47f2..e3ec4976fae7 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/notifier.h> | 28 | #include <linux/notifier.h> |
29 | #include <linux/of.h> | 29 | #include <linux/of.h> |
30 | #include <linux/of_platform.h> | 30 | #include <linux/of_platform.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/lmb.h> | 32 | #include <linux/lmb.h> |
32 | 33 | ||
33 | #include <asm/prom.h> | 34 | #include <asm/prom.h> |
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c index 608fd2b584c9..1d3c4effea10 100644 --- a/arch/powerpc/platforms/cell/ras.c +++ b/arch/powerpc/platforms/cell/ras.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
15 | #include <linux/reboot.h> | 16 | #include <linux/reboot.h> |
16 | #include <linux/kexec.h> | 17 | #include <linux/kexec.h> |
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c index 59305369f6b2..50385db586bd 100644 --- a/arch/powerpc/platforms/cell/setup.c +++ b/arch/powerpc/platforms/cell/setup.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/stddef.h> | 20 | #include <linux/stddef.h> |
21 | #include <linux/unistd.h> | 21 | #include <linux/unistd.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/user.h> | 22 | #include <linux/user.h> |
24 | #include <linux/reboot.h> | 23 | #include <linux/reboot.h> |
25 | #include <linux/init.h> | 24 | #include <linux/init.h> |
diff --git a/arch/powerpc/platforms/cell/spider-pci.c b/arch/powerpc/platforms/cell/spider-pci.c index 5122ec145271..ca7731c0b595 100644 --- a/arch/powerpc/platforms/cell/spider-pci.c +++ b/arch/powerpc/platforms/cell/spider-pci.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/of_platform.h> | 24 | #include <linux/of_platform.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/io.h> | 26 | #include <linux/io.h> |
26 | 27 | ||
27 | #include <asm/ppc-pci.h> | 28 | #include <asm/ppc-pci.h> |
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c index 891f18e337a2..f465d474ad9b 100644 --- a/arch/powerpc/platforms/cell/spu_manage.c +++ b/arch/powerpc/platforms/cell/spu_manage.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/list.h> | 23 | #include <linux/list.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/ptrace.h> | 25 | #include <linux/ptrace.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/wait.h> | 26 | #include <linux/wait.h> |
28 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
29 | #include <linux/io.h> | 28 | #include <linux/io.h> |
diff --git a/arch/powerpc/platforms/cell/spu_priv1_mmio.c b/arch/powerpc/platforms/cell/spu_priv1_mmio.c index 1410443731eb..121aec353f26 100644 --- a/arch/powerpc/platforms/cell/spu_priv1_mmio.c +++ b/arch/powerpc/platforms/cell/spu_priv1_mmio.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/list.h> | 22 | #include <linux/list.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/ptrace.h> | 24 | #include <linux/ptrace.h> |
25 | #include <linux/slab.h> | ||
26 | #include <linux/wait.h> | 25 | #include <linux/wait.h> |
27 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
28 | #include <linux/io.h> | 27 | #include <linux/io.h> |
diff --git a/arch/powerpc/platforms/cell/spufs/coredump.c b/arch/powerpc/platforms/cell/spufs/coredump.c index eea120229cdb..6cf3ec628527 100644 --- a/arch/powerpc/platforms/cell/spufs/coredump.c +++ b/arch/powerpc/platforms/cell/spufs/coredump.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/file.h> | 24 | #include <linux/file.h> |
25 | #include <linux/fdtable.h> | 25 | #include <linux/fdtable.h> |
26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
27 | #include <linux/gfp.h> | ||
27 | #include <linux/list.h> | 28 | #include <linux/list.h> |
28 | #include <linux/module.h> | 29 | #include <linux/module.h> |
29 | #include <linux/syscalls.h> | 30 | #include <linux/syscalls.h> |
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 64a4c2d85f7c..5c2808252516 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/poll.h> | 29 | #include <linux/poll.h> |
30 | #include <linux/ptrace.h> | 30 | #include <linux/ptrace.h> |
31 | #include <linux/seq_file.h> | 31 | #include <linux/seq_file.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
34 | #include <asm/time.h> | 35 | #include <asm/time.h> |
diff --git a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c index 0e9f325c9ff7..a101abf17504 100644 --- a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c +++ b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
26 | 27 | ||
27 | #include <asm/spu.h> | 28 | #include <asm/spu.h> |
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 4678078fede8..0b0466284932 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/completion.h> | 31 | #include <linux/completion.h> |
31 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
32 | #include <linux/smp.h> | 33 | #include <linux/smp.h> |
diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c index c23617c6baf3..187a7d32f86a 100644 --- a/arch/powerpc/platforms/cell/spufs/syscalls.c +++ b/arch/powerpc/platforms/cell/spufs/syscalls.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include <linux/mount.h> | 4 | #include <linux/mount.h> |
5 | #include <linux/namei.h> | 5 | #include <linux/namei.h> |
6 | #include <linux/slab.h> | ||
6 | 7 | ||
7 | #include <asm/uaccess.h> | 8 | #include <asm/uaccess.h> |
8 | 9 | ||
diff --git a/arch/powerpc/platforms/chrp/nvram.c b/arch/powerpc/platforms/chrp/nvram.c index 8efd4244701c..ba3588f2d8e0 100644 --- a/arch/powerpc/platforms/chrp/nvram.c +++ b/arch/powerpc/platforms/chrp/nvram.c | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
17 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
18 | #include <asm/prom.h> | 17 | #include <asm/prom.h> |
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 8f41685d8f42..8553cc49e0d6 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/stddef.h> | 15 | #include <linux/stddef.h> |
16 | #include <linux/unistd.h> | 16 | #include <linux/unistd.h> |
17 | #include <linux/ptrace.h> | 17 | #include <linux/ptrace.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/user.h> | 18 | #include <linux/user.h> |
20 | #include <linux/tty.h> | 19 | #include <linux/tty.h> |
21 | #include <linux/major.h> | 20 | #include <linux/major.h> |
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index 9d53cb481a7c..ce61cea0afb5 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/list.h> | 29 | #include <linux/list.h> |
30 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <asm/iommu.h> | 34 | #include <asm/iommu.h> |
34 | #include <asm/vio.h> | 35 | #include <asm/vio.h> |
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c index 6617915bcb1a..d2c1d497846e 100644 --- a/arch/powerpc/platforms/iseries/mf.c +++ b/arch/powerpc/platforms/iseries/mf.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/dma-mapping.h> | 33 | #include <linux/dma-mapping.h> |
34 | #include <linux/bcd.h> | 34 | #include <linux/bcd.h> |
35 | #include <linux/rtc.h> | 35 | #include <linux/rtc.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <asm/time.h> | 38 | #include <asm/time.h> |
38 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> |
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index 175aac8ca7e5..b841c9a9db87 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
29 | #include <linux/string.h> | 29 | #include <linux/string.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/init.h> | 31 | #include <linux/init.h> |
31 | #include <linux/module.h> | 32 | #include <linux/module.h> |
32 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
diff --git a/arch/powerpc/platforms/iseries/vio.c b/arch/powerpc/platforms/iseries/vio.c index 2aa8b5631beb..00b6730bc48f 100644 --- a/arch/powerpc/platforms/iseries/vio.c +++ b/arch/powerpc/platforms/iseries/vio.c | |||
@@ -22,7 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | #include <linux/of.h> | 23 | #include <linux/of.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/gfp.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/completion.h> | 26 | #include <linux/completion.h> |
27 | #include <linux/proc_fs.h> | 27 | #include <linux/proc_fs.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c index 5aea94f30836..b5f05d943a90 100644 --- a/arch/powerpc/platforms/iseries/viopath.c +++ b/arch/powerpc/platforms/iseries/viopath.c | |||
@@ -29,6 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
33 | #include <linux/vmalloc.h> | 34 | #include <linux/vmalloc.h> |
34 | #include <linux/string.h> | 35 | #include <linux/string.h> |
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c index 0636a3df6978..39df70529d29 100644 --- a/arch/powerpc/platforms/maple/setup.c +++ b/arch/powerpc/platforms/maple/setup.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/stddef.h> | 21 | #include <linux/stddef.h> |
22 | #include <linux/unistd.h> | 22 | #include <linux/unistd.h> |
23 | #include <linux/ptrace.h> | 23 | #include <linux/ptrace.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/user.h> | 24 | #include <linux/user.h> |
26 | #include <linux/tty.h> | 25 | #include <linux/tty.h> |
27 | #include <linux/string.h> | 26 | #include <linux/string.h> |
diff --git a/arch/powerpc/platforms/pasemi/dma_lib.c b/arch/powerpc/platforms/pasemi/dma_lib.c index a6152d922243..09695ae50f91 100644 --- a/arch/powerpc/platforms/pasemi/dma_lib.c +++ b/arch/powerpc/platforms/pasemi/dma_lib.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/of.h> | 25 | #include <linux/of.h> |
25 | 26 | ||
26 | #include <asm/pasemi_dma.h> | 27 | #include <asm/pasemi_dma.h> |
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c index 3bf546797cbb..0f881f64583e 100644 --- a/arch/powerpc/platforms/pasemi/gpio_mdio.c +++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
28 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
29 | #include <linux/ioport.h> | 30 | #include <linux/ioport.h> |
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index 242f8095c2df..ac6fdd973291 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/console.h> | 28 | #include <linux/console.h> |
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/of_platform.h> | 30 | #include <linux/of_platform.h> |
31 | #include <linux/gfp.h> | ||
31 | 32 | ||
32 | #include <asm/prom.h> | 33 | #include <asm/prom.h> |
33 | #include <asm/system.h> | 34 | #include <asm/system.h> |
diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c index d4f127d18141..1e9eba175ff0 100644 --- a/arch/powerpc/platforms/powermac/cpufreq_32.c +++ b/arch/powerpc/platforms/powermac/cpufreq_32.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/adb.h> | 22 | #include <linux/adb.h> |
23 | #include <linux/pmu.h> | 23 | #include <linux/pmu.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/cpufreq.h> | 24 | #include <linux/cpufreq.h> |
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
27 | #include <linux/sysdev.h> | 26 | #include <linux/sysdev.h> |
diff --git a/arch/powerpc/platforms/powermac/cpufreq_64.c b/arch/powerpc/platforms/powermac/cpufreq_64.c index 3ed288e68ec4..3ca09d3ccce3 100644 --- a/arch/powerpc/platforms/powermac/cpufreq_64.c +++ b/arch/powerpc/platforms/powermac/cpufreq_64.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/slab.h> | ||
22 | #include <linux/cpufreq.h> | 21 | #include <linux/cpufreq.h> |
23 | #include <linux/init.h> | 22 | #include <linux/init.h> |
24 | #include <linux/completion.h> | 23 | #include <linux/completion.h> |
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index 345e2da56767..f45331ab97cb 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/timer.h> | 43 | #include <linux/timer.h> |
44 | #include <linux/mutex.h> | 44 | #include <linux/mutex.h> |
45 | #include <linux/i2c.h> | 45 | #include <linux/i2c.h> |
46 | #include <linux/slab.h> | ||
46 | #include <asm/keylargo.h> | 47 | #include <asm/keylargo.h> |
47 | #include <asm/uninorth.h> | 48 | #include <asm/uninorth.h> |
48 | #include <asm/io.h> | 49 | #include <asm/io.h> |
diff --git a/arch/powerpc/platforms/powermac/nvram.c b/arch/powerpc/platforms/powermac/nvram.c index 80a5258d0364..b1cdcf94aa8e 100644 --- a/arch/powerpc/platforms/powermac/nvram.c +++ b/arch/powerpc/platforms/powermac/nvram.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/nvram.h> | 15 | #include <linux/nvram.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
19 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
20 | #include <linux/adb.h> | 19 | #include <linux/adb.h> |
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c index ede49e78a8da..cec635942657 100644 --- a/arch/powerpc/platforms/powermac/pfunc_core.c +++ b/arch/powerpc/platforms/powermac/pfunc_core.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/spinlock.h> | 11 | #include <linux/spinlock.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
14 | 15 | ||
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index c20522656367..15c2241f9c72 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/stddef.h> | 31 | #include <linux/stddef.h> |
32 | #include <linux/unistd.h> | 32 | #include <linux/unistd.h> |
33 | #include <linux/ptrace.h> | 33 | #include <linux/ptrace.h> |
34 | #include <linux/slab.h> | ||
35 | #include <linux/user.h> | 34 | #include <linux/user.h> |
36 | #include <linux/tty.h> | 35 | #include <linux/tty.h> |
37 | #include <linux/string.h> | 36 | #include <linux/string.h> |
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c index bb028f165fb3..b341018326df 100644 --- a/arch/powerpc/platforms/ps3/device-init.c +++ b/arch/powerpc/platforms/ps3/device-init.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/kthread.h> | 24 | #include <linux/kthread.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/reboot.h> | 27 | #include <linux/reboot.h> |
27 | 28 | ||
28 | #include <asm/firmware.h> | 29 | #include <asm/firmware.h> |
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index e81b028a2a48..7925751e464a 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/memory_hotplug.h> | 23 | #include <linux/memory_hotplug.h> |
24 | #include <linux/lmb.h> | 24 | #include <linux/lmb.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <asm/cell-regs.h> | 27 | #include <asm/cell-regs.h> |
27 | #include <asm/firmware.h> | 28 | #include <asm/firmware.h> |
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c index d6487a9c8019..dd521a181f23 100644 --- a/arch/powerpc/platforms/ps3/os-area.c +++ b/arch/powerpc/platforms/ps3/os-area.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/ctype.h> | 26 | #include <linux/ctype.h> |
27 | #include <linux/lmb.h> | 27 | #include <linux/lmb.h> |
28 | #include <linux/of.h> | 28 | #include <linux/of.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <asm/prom.h> | 31 | #include <asm/prom.h> |
31 | 32 | ||
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c index b3c6a993f9f3..39a472e9e80f 100644 --- a/arch/powerpc/platforms/ps3/spu.c +++ b/arch/powerpc/platforms/ps3/spu.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/mmzone.h> | 24 | #include <linux/mmzone.h> |
24 | #include <linux/io.h> | 25 | #include <linux/io.h> |
25 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c index e34b305a7a52..6d09f5e3e7e4 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
25 | #include <linux/err.h> | 25 | #include <linux/err.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <asm/udbg.h> | 28 | #include <asm/udbg.h> |
28 | #include <asm/lv1call.h> | 29 | #include <asm/lv1call.h> |
diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c index a277f2e28dbc..f4803868642c 100644 --- a/arch/powerpc/platforms/pseries/cmm.c +++ b/arch/powerpc/platforms/pseries/cmm.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
27 | #include <linux/gfp.h> | ||
27 | #include <linux/init.h> | 28 | #include <linux/init.h> |
28 | #include <linux/kthread.h> | 29 | #include <linux/kthread.h> |
29 | #include <linux/module.h> | 30 | #include <linux/module.h> |
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c index 37bce52526da..e1682bc168a3 100644 --- a/arch/powerpc/platforms/pseries/dlpar.c +++ b/arch/powerpc/platforms/pseries/dlpar.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/proc_fs.h> | 16 | #include <linux/proc_fs.h> |
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <linux/cpu.h> | 18 | #include <linux/cpu.h> |
19 | #include <linux/slab.h> | ||
19 | #include "offline_states.h" | 20 | #include "offline_states.h" |
20 | 21 | ||
21 | #include <asm/prom.h> | 22 | #include <asm/prom.h> |
diff --git a/arch/powerpc/platforms/pseries/dtl.c b/arch/powerpc/platforms/pseries/dtl.c index c5f3116b6ca5..a00addb55945 100644 --- a/arch/powerpc/platforms/pseries/dtl.c +++ b/arch/powerpc/platforms/pseries/dtl.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/debugfs.h> | 25 | #include <linux/debugfs.h> |
25 | #include <asm/smp.h> | 26 | #include <asm/smp.h> |
26 | #include <asm/system.h> | 27 | #include <asm/system.h> |
diff --git a/arch/powerpc/platforms/pseries/eeh_cache.c b/arch/powerpc/platforms/pseries/eeh_cache.c index ce37040af870..30b987b73c20 100644 --- a/arch/powerpc/platforms/pseries/eeh_cache.c +++ b/arch/powerpc/platforms/pseries/eeh_cache.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/list.h> | 23 | #include <linux/list.h> |
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/rbtree.h> | 25 | #include <linux/rbtree.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
27 | #include <asm/atomic.h> | 28 | #include <asm/atomic.h> |
28 | #include <asm/pci-bridge.h> | 29 | #include <asm/pci-bridge.h> |
diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c index ec5df8f519c7..2ec500c130b5 100644 --- a/arch/powerpc/platforms/pseries/eeh_event.c +++ b/arch/powerpc/platforms/pseries/eeh_event.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/list.h> | 22 | #include <linux/list.h> |
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
26 | #include <asm/eeh_event.h> | 27 | #include <asm/eeh_event.h> |
27 | #include <asm/ppc-pci.h> | 28 | #include <asm/ppc-pci.h> |
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c index 42f7e384e6c4..bc3c7f2abd79 100644 --- a/arch/powerpc/platforms/pseries/nvram.c +++ b/arch/powerpc/platforms/pseries/nvram.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
20 | #include <asm/uaccess.h> | 19 | #include <asm/uaccess.h> |
21 | #include <asm/nvram.h> | 20 | #include <asm/nvram.h> |
diff --git a/arch/powerpc/platforms/pseries/phyp_dump.c b/arch/powerpc/platforms/pseries/phyp_dump.c index 225a50ab14be..7ebd9e88d369 100644 --- a/arch/powerpc/platforms/pseries/phyp_dump.c +++ b/arch/powerpc/platforms/pseries/phyp_dump.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/gfp.h> | ||
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/kobject.h> | 16 | #include <linux/kobject.h> |
16 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c index d20b96e22c2e..db940d2c39a0 100644 --- a/arch/powerpc/platforms/pseries/ras.c +++ b/arch/powerpc/platforms/pseries/ras.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
31 | #include <linux/timex.h> | 31 | #include <linux/timex.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/slab.h> | ||
34 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
35 | #include <linux/irq.h> | 34 | #include <linux/irq.h> |
36 | #include <linux/random.h> | 35 | #include <linux/random.h> |
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c index a2305d29bbbd..1a58637bcea5 100644 --- a/arch/powerpc/platforms/pseries/reconfig.c +++ b/arch/powerpc/platforms/pseries/reconfig.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kref.h> | 15 | #include <linux/kref.h> |
16 | #include <linux/notifier.h> | 16 | #include <linux/notifier.h> |
17 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include <asm/prom.h> | 20 | #include <asm/prom.h> |
20 | #include <asm/machdep.h> | 21 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c index 1b45c458f952..80e9e7652a4d 100644 --- a/arch/powerpc/platforms/pseries/scanlog.c +++ b/arch/powerpc/platforms/pseries/scanlog.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/proc_fs.h> | 26 | #include <linux/proc_fs.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/slab.h> | ||
29 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
30 | #include <asm/rtas.h> | 31 | #include <asm/rtas.h> |
31 | #include <asm/prom.h> | 32 | #include <asm/prom.h> |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index ca5f2e10972c..6710761bf60f 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/stddef.h> | 24 | #include <linux/stddef.h> |
25 | #include <linux/unistd.h> | 25 | #include <linux/unistd.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/user.h> | 26 | #include <linux/user.h> |
28 | #include <linux/tty.h> | 27 | #include <linux/tty.h> |
29 | #include <linux/major.h> | 28 | #include <linux/major.h> |
diff --git a/arch/powerpc/sysdev/cpm1.c b/arch/powerpc/sysdev/cpm1.c index ecad10d4e928..4dae3698bf24 100644 --- a/arch/powerpc/sysdev/cpm1.c +++ b/arch/powerpc/sysdev/cpm1.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/irq.h> | 31 | #include <linux/irq.h> |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/spinlock.h> | 33 | #include <linux/spinlock.h> |
34 | #include <linux/slab.h> | ||
34 | #include <asm/page.h> | 35 | #include <asm/page.h> |
35 | #include <asm/pgtable.h> | 36 | #include <asm/pgtable.h> |
36 | #include <asm/8xx_immap.h> | 37 | #include <asm/8xx_immap.h> |
diff --git a/arch/powerpc/sysdev/cpm_common.c b/arch/powerpc/sysdev/cpm_common.c index 9de72c96e6d1..88b9812c854f 100644 --- a/arch/powerpc/sysdev/cpm_common.c +++ b/arch/powerpc/sysdev/cpm_common.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/of_device.h> | 21 | #include <linux/of_device.h> |
22 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
23 | #include <linux/of.h> | 23 | #include <linux/of.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <asm/udbg.h> | 26 | #include <asm/udbg.h> |
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index bafc3f85360d..c8b96ed7c015 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/mm.h> | 32 | #include <linux/mm.h> |
34 | #include <linux/spinlock.h> | 33 | #include <linux/spinlock.h> |
35 | #include <linux/string.h> | 34 | #include <linux/string.h> |
@@ -38,6 +37,7 @@ | |||
38 | #include <linux/vmalloc.h> | 37 | #include <linux/vmalloc.h> |
39 | #include <linux/suspend.h> | 38 | #include <linux/suspend.h> |
40 | #include <linux/lmb.h> | 39 | #include <linux/lmb.h> |
40 | #include <linux/gfp.h> | ||
41 | #include <asm/io.h> | 41 | #include <asm/io.h> |
42 | #include <asm/prom.h> | 42 | #include <asm/prom.h> |
43 | #include <asm/iommu.h> | 43 | #include <asm/iommu.h> |
diff --git a/arch/powerpc/sysdev/fsl_gtm.c b/arch/powerpc/sysdev/fsl_gtm.c index 714ec02fed2e..eca4545dd52e 100644 --- a/arch/powerpc/sysdev/fsl_gtm.c +++ b/arch/powerpc/sysdev/fsl_gtm.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
22 | #include <linux/bitops.h> | 22 | #include <linux/bitops.h> |
23 | #include <linux/slab.h> | ||
23 | #include <asm/fsl_gtm.h> | 24 | #include <asm/fsl_gtm.h> |
24 | 25 | ||
25 | #define GTCFR_STP(x) ((x) & 1 ? 1 << 5 : 1 << 1) | 26 | #define GTCFR_STP(x) ((x) & 1 ? 1 << 5 : 1 << 1) |
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index e094367d7739..3482e3fd89c0 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/bootmem.h> | 16 | #include <linux/bootmem.h> |
17 | #include <linux/msi.h> | 17 | #include <linux/msi.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/of_platform.h> | 20 | #include <linux/of_platform.h> |
20 | #include <sysdev/fsl_soc.h> | 21 | #include <sysdev/fsl_soc.h> |
21 | #include <asm/prom.h> | 22 | #include <asm/prom.h> |
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index e1a028c1f18d..a14760fe513a 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/bootmem.h> | 25 | #include <linux/bootmem.h> |
26 | #include <linux/lmb.h> | 26 | #include <linux/lmb.h> |
27 | #include <linux/log2.h> | 27 | #include <linux/log2.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
30 | #include <asm/prom.h> | 31 | #include <asm/prom.h> |
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 757a83fe5e59..71fba88f50db 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/rio_drv.h> | 23 | #include <linux/rio_drv.h> |
24 | #include <linux/of_platform.h> | 24 | #include <linux/of_platform.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
28 | 29 | ||
diff --git a/arch/powerpc/sysdev/mpc8xxx_gpio.c b/arch/powerpc/sysdev/mpc8xxx_gpio.c index ee1c0e1cf4a7..6478eb10691a 100644 --- a/arch/powerpc/sysdev/mpc8xxx_gpio.c +++ b/arch/powerpc/sysdev/mpc8xxx_gpio.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
16 | #include <linux/of_gpio.h> | 16 | #include <linux/of_gpio.h> |
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #define MPC8XXX_GPIO_PINS 32 | 20 | #define MPC8XXX_GPIO_PINS 32 |
20 | 21 | ||
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 339e8a3e26d2..260295b10557 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/bootmem.h> | 26 | #include <linux/bootmem.h> |
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <asm/ptrace.h> | 31 | #include <asm/ptrace.h> |
31 | #include <asm/signal.h> | 32 | #include <asm/signal.h> |
diff --git a/arch/powerpc/sysdev/msi_bitmap.c b/arch/powerpc/sysdev/msi_bitmap.c index 5a32cbef9b6c..5287e95cec3a 100644 --- a/arch/powerpc/sysdev/msi_bitmap.c +++ b/arch/powerpc/sysdev/msi_bitmap.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/slab.h> | ||
11 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
12 | #include <linux/bitmap.h> | 13 | #include <linux/bitmap.h> |
13 | #include <asm/msi_bitmap.h> | 14 | #include <asm/msi_bitmap.h> |
diff --git a/arch/powerpc/sysdev/of_rtc.c b/arch/powerpc/sysdev/of_rtc.c index 3d54450640c1..c9e803f3e267 100644 --- a/arch/powerpc/sysdev/of_rtc.c +++ b/arch/powerpc/sysdev/of_rtc.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/of.h> | 12 | #include <linux/of.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/of_platform.h> | 14 | #include <linux/of_platform.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | static __initdata struct { | 17 | static __initdata struct { |
17 | const char *compatible; | 18 | const char *compatible; |
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c index aaa915998eb6..652652db4ce2 100644 --- a/arch/powerpc/sysdev/pmi.c +++ b/arch/powerpc/sysdev/pmi.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/completion.h> | 29 | #include <linux/completion.h> |
29 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
30 | #include <linux/workqueue.h> | 31 | #include <linux/workqueue.h> |
diff --git a/arch/powerpc/sysdev/ppc4xx_gpio.c b/arch/powerpc/sysdev/ppc4xx_gpio.c index 110efe2a54fc..3812fc366bec 100644 --- a/arch/powerpc/sysdev/ppc4xx_gpio.c +++ b/arch/powerpc/sysdev/ppc4xx_gpio.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/of_gpio.h> | 29 | #include <linux/of_gpio.h> |
30 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #define GPIO_MASK(gpio) (0x80000000 >> (gpio)) | 34 | #define GPIO_MASK(gpio) (0x80000000 >> (gpio)) |
34 | #define GPIO_MASK2(gpio) (0xc0000000 >> ((gpio) * 2)) | 35 | #define GPIO_MASK2(gpio) (0xc0000000 >> ((gpio) * 2)) |
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index 8aa33021e50b..106d767bf65b 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/of.h> | 24 | #include <linux/of.h> |
25 | #include <linux/bootmem.h> | 25 | #include <linux/bootmem.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include <asm/io.h> | 29 | #include <asm/io.h> |
29 | #include <asm/pci-bridge.h> | 30 | #include <asm/pci-bridge.h> |
diff --git a/arch/powerpc/sysdev/qe_lib/gpio.c b/arch/powerpc/sysdev/qe_lib/gpio.c index 8e7a7767dd5c..dc8f8d618074 100644 --- a/arch/powerpc/sysdev/qe_lib/gpio.c +++ b/arch/powerpc/sysdev/qe_lib/gpio.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | #include <linux/of_gpio.h> | 20 | #include <linux/of_gpio.h> |
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/slab.h> | ||
22 | #include <asm/qe.h> | 23 | #include <asm/qe.h> |
23 | 24 | ||
24 | struct qe_gpio_chip { | 25 | struct qe_gpio_chip { |
diff --git a/arch/powerpc/sysdev/qe_lib/ucc.c b/arch/powerpc/sysdev/qe_lib/ucc.c index ebb442ea1917..fa589b21dbcd 100644 --- a/arch/powerpc/sysdev/qe_lib/ucc.c +++ b/arch/powerpc/sysdev/qe_lib/ucc.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/stddef.h> | 19 | #include <linux/stddef.h> |
21 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
diff --git a/arch/powerpc/sysdev/simple_gpio.c b/arch/powerpc/sysdev/simple_gpio.c index 43c4569e24b7..d5fb173e588c 100644 --- a/arch/powerpc/sysdev/simple_gpio.c +++ b/arch/powerpc/sysdev/simple_gpio.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/of.h> | 21 | #include <linux/of.h> |
22 | #include <linux/of_gpio.h> | 22 | #include <linux/of_gpio.h> |
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/slab.h> | ||
24 | #include <asm/prom.h> | 25 | #include <asm/prom.h> |
25 | #include "simple_gpio.h" | 26 | #include "simple_gpio.h" |
26 | 27 | ||
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c index 595034cfb85a..0ab9281e49ae 100644 --- a/arch/powerpc/sysdev/tsi108_pci.c +++ b/arch/powerpc/sysdev/tsi108_pci.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/pci.h> | 26 | #include <linux/pci.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
29 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
30 | 29 | ||
diff --git a/arch/s390/appldata/appldata_mem.c b/arch/s390/appldata/appldata_mem.c index 4188cbe63a54..e43fe7537031 100644 --- a/arch/s390/appldata/appldata_mem.c +++ b/arch/s390/appldata/appldata_mem.c | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
16 | #include <linux/kernel_stat.h> | 15 | #include <linux/kernel_stat.h> |
17 | #include <linux/pagemap.h> | 16 | #include <linux/pagemap.h> |
diff --git a/arch/s390/appldata/appldata_net_sum.c b/arch/s390/appldata/appldata_net_sum.c index 4ce7fa95880f..9a9586f4103f 100644 --- a/arch/s390/appldata/appldata_net_sum.c +++ b/arch/s390/appldata/appldata_net_sum.c | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
17 | #include <linux/kernel_stat.h> | 16 | #include <linux/kernel_stat.h> |
18 | #include <linux/netdevice.h> | 17 | #include <linux/netdevice.h> |
diff --git a/arch/s390/boot/compressed/misc.c b/arch/s390/boot/compressed/misc.c index a97d69525829..14e0479d3888 100644 --- a/arch/s390/boot/compressed/misc.c +++ b/arch/s390/boot/compressed/misc.c | |||
@@ -24,8 +24,8 @@ | |||
24 | /* Symbols defined by linker scripts */ | 24 | /* Symbols defined by linker scripts */ |
25 | extern char input_data[]; | 25 | extern char input_data[]; |
26 | extern int input_len; | 26 | extern int input_len; |
27 | extern int _text; | 27 | extern char _text, _end; |
28 | extern int _end; | 28 | extern char _bss, _ebss; |
29 | 29 | ||
30 | static void error(char *m); | 30 | static void error(char *m); |
31 | 31 | ||
@@ -129,12 +129,12 @@ unsigned long decompress_kernel(void) | |||
129 | unsigned long output_addr; | 129 | unsigned long output_addr; |
130 | unsigned char *output; | 130 | unsigned char *output; |
131 | 131 | ||
132 | check_ipl_parmblock((void *) 0, (unsigned long) output + SZ__bss_start); | ||
133 | memset(&_bss, 0, &_ebss - &_bss); | ||
132 | free_mem_ptr = (unsigned long)&_end; | 134 | free_mem_ptr = (unsigned long)&_end; |
133 | free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; | 135 | free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; |
134 | output = (unsigned char *) ((free_mem_end_ptr + 4095UL) & -4096UL); | 136 | output = (unsigned char *) ((free_mem_end_ptr + 4095UL) & -4096UL); |
135 | 137 | ||
136 | check_ipl_parmblock((void *) 0, (unsigned long) output + SZ__bss_start); | ||
137 | |||
138 | #ifdef CONFIG_BLK_DEV_INITRD | 138 | #ifdef CONFIG_BLK_DEV_INITRD |
139 | /* | 139 | /* |
140 | * Move the initrd right behind the end of the decompressed | 140 | * Move the initrd right behind the end of the decompressed |
diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c index a3209906739e..aa819dac2360 100644 --- a/arch/s390/crypto/prng.c +++ b/arch/s390/crypto/prng.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/moduleparam.h> | 11 | #include <linux/moduleparam.h> |
12 | #include <linux/random.h> | 12 | #include <linux/random.h> |
13 | #include <linux/slab.h> | ||
13 | #include <asm/debug.h> | 14 | #include <asm/debug.h> |
14 | #include <asm/uaccess.h> | 15 | #include <asm/uaccess.h> |
15 | 16 | ||
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index 7ae71cc56973..bcd6884985ad 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.33-rc2 | 3 | # Linux kernel version: 2.6.34-rc3 |
4 | # Mon Jan 4 09:03:07 2010 | 4 | # Fri Apr 9 09:57:10 2010 |
5 | # | 5 | # |
6 | CONFIG_SCHED_MC=y | 6 | CONFIG_SCHED_MC=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -17,6 +17,7 @@ CONFIG_GENERIC_TIME=y | |||
17 | CONFIG_GENERIC_TIME_VSYSCALL=y | 17 | CONFIG_GENERIC_TIME_VSYSCALL=y |
18 | CONFIG_GENERIC_CLOCKEVENTS=y | 18 | CONFIG_GENERIC_CLOCKEVENTS=y |
19 | CONFIG_GENERIC_BUG=y | 19 | CONFIG_GENERIC_BUG=y |
20 | CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y | ||
20 | CONFIG_NO_IOMEM=y | 21 | CONFIG_NO_IOMEM=y |
21 | CONFIG_NO_DMA=y | 22 | CONFIG_NO_DMA=y |
22 | CONFIG_GENERIC_LOCKBREAK=y | 23 | CONFIG_GENERIC_LOCKBREAK=y |
@@ -62,15 +63,11 @@ CONFIG_TREE_RCU=y | |||
62 | # CONFIG_RCU_TRACE is not set | 63 | # CONFIG_RCU_TRACE is not set |
63 | CONFIG_RCU_FANOUT=64 | 64 | CONFIG_RCU_FANOUT=64 |
64 | # CONFIG_RCU_FANOUT_EXACT is not set | 65 | # CONFIG_RCU_FANOUT_EXACT is not set |
66 | # CONFIG_RCU_FAST_NO_HZ is not set | ||
65 | # CONFIG_TREE_RCU_TRACE is not set | 67 | # CONFIG_TREE_RCU_TRACE is not set |
66 | CONFIG_IKCONFIG=y | 68 | CONFIG_IKCONFIG=y |
67 | CONFIG_IKCONFIG_PROC=y | 69 | CONFIG_IKCONFIG_PROC=y |
68 | CONFIG_LOG_BUF_SHIFT=17 | 70 | CONFIG_LOG_BUF_SHIFT=17 |
69 | CONFIG_GROUP_SCHED=y | ||
70 | CONFIG_FAIR_GROUP_SCHED=y | ||
71 | # CONFIG_RT_GROUP_SCHED is not set | ||
72 | CONFIG_USER_SCHED=y | ||
73 | # CONFIG_CGROUP_SCHED is not set | ||
74 | CONFIG_CGROUPS=y | 71 | CONFIG_CGROUPS=y |
75 | # CONFIG_CGROUP_DEBUG is not set | 72 | # CONFIG_CGROUP_DEBUG is not set |
76 | CONFIG_CGROUP_NS=y | 73 | CONFIG_CGROUP_NS=y |
@@ -79,6 +76,7 @@ CONFIG_CGROUP_NS=y | |||
79 | # CONFIG_CPUSETS is not set | 76 | # CONFIG_CPUSETS is not set |
80 | # CONFIG_CGROUP_CPUACCT is not set | 77 | # CONFIG_CGROUP_CPUACCT is not set |
81 | # CONFIG_RESOURCE_COUNTERS is not set | 78 | # CONFIG_RESOURCE_COUNTERS is not set |
79 | # CONFIG_CGROUP_SCHED is not set | ||
82 | CONFIG_SYSFS_DEPRECATED=y | 80 | CONFIG_SYSFS_DEPRECATED=y |
83 | CONFIG_SYSFS_DEPRECATED_V2=y | 81 | CONFIG_SYSFS_DEPRECATED_V2=y |
84 | # CONFIG_RELAY is not set | 82 | # CONFIG_RELAY is not set |
@@ -93,6 +91,7 @@ CONFIG_INITRAMFS_SOURCE="" | |||
93 | CONFIG_RD_GZIP=y | 91 | CONFIG_RD_GZIP=y |
94 | CONFIG_RD_BZIP2=y | 92 | CONFIG_RD_BZIP2=y |
95 | CONFIG_RD_LZMA=y | 93 | CONFIG_RD_LZMA=y |
94 | CONFIG_RD_LZO=y | ||
96 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 95 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
97 | CONFIG_SYSCTL=y | 96 | CONFIG_SYSCTL=y |
98 | CONFIG_ANON_INODES=y | 97 | CONFIG_ANON_INODES=y |
@@ -126,6 +125,7 @@ CONFIG_SLAB=y | |||
126 | # CONFIG_SLUB is not set | 125 | # CONFIG_SLUB is not set |
127 | # CONFIG_SLOB is not set | 126 | # CONFIG_SLOB is not set |
128 | # CONFIG_PROFILING is not set | 127 | # CONFIG_PROFILING is not set |
128 | CONFIG_TRACEPOINTS=y | ||
129 | CONFIG_HAVE_OPROFILE=y | 129 | CONFIG_HAVE_OPROFILE=y |
130 | CONFIG_KPROBES=y | 130 | CONFIG_KPROBES=y |
131 | CONFIG_HAVE_SYSCALL_WRAPPERS=y | 131 | CONFIG_HAVE_SYSCALL_WRAPPERS=y |
@@ -134,6 +134,7 @@ CONFIG_HAVE_KPROBES=y | |||
134 | CONFIG_HAVE_KRETPROBES=y | 134 | CONFIG_HAVE_KRETPROBES=y |
135 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 135 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
136 | CONFIG_USE_GENERIC_SMP_HELPERS=y | 136 | CONFIG_USE_GENERIC_SMP_HELPERS=y |
137 | CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y | ||
137 | CONFIG_HAVE_DEFAULT_NO_SPIN_MUTEXES=y | 138 | CONFIG_HAVE_DEFAULT_NO_SPIN_MUTEXES=y |
138 | 139 | ||
139 | # | 140 | # |
@@ -246,6 +247,7 @@ CONFIG_64BIT=y | |||
246 | CONFIG_SMP=y | 247 | CONFIG_SMP=y |
247 | CONFIG_NR_CPUS=32 | 248 | CONFIG_NR_CPUS=32 |
248 | CONFIG_HOTPLUG_CPU=y | 249 | CONFIG_HOTPLUG_CPU=y |
250 | # CONFIG_SCHED_BOOK is not set | ||
249 | CONFIG_COMPAT=y | 251 | CONFIG_COMPAT=y |
250 | CONFIG_SYSVIPC_COMPAT=y | 252 | CONFIG_SYSVIPC_COMPAT=y |
251 | CONFIG_AUDIT_ARCH=y | 253 | CONFIG_AUDIT_ARCH=y |
@@ -345,13 +347,13 @@ CONFIG_PM_SLEEP=y | |||
345 | CONFIG_HIBERNATION=y | 347 | CONFIG_HIBERNATION=y |
346 | CONFIG_PM_STD_PARTITION="" | 348 | CONFIG_PM_STD_PARTITION="" |
347 | # CONFIG_PM_RUNTIME is not set | 349 | # CONFIG_PM_RUNTIME is not set |
350 | CONFIG_PM_OPS=y | ||
348 | CONFIG_NET=y | 351 | CONFIG_NET=y |
349 | 352 | ||
350 | # | 353 | # |
351 | # Networking options | 354 | # Networking options |
352 | # | 355 | # |
353 | CONFIG_PACKET=y | 356 | CONFIG_PACKET=y |
354 | # CONFIG_PACKET_MMAP is not set | ||
355 | CONFIG_UNIX=y | 357 | CONFIG_UNIX=y |
356 | CONFIG_XFRM=y | 358 | CONFIG_XFRM=y |
357 | # CONFIG_XFRM_USER is not set | 359 | # CONFIG_XFRM_USER is not set |
@@ -529,6 +531,7 @@ CONFIG_NET_SCH_FIFO=y | |||
529 | # | 531 | # |
530 | # CONFIG_NET_PKTGEN is not set | 532 | # CONFIG_NET_PKTGEN is not set |
531 | # CONFIG_NET_TCPPROBE is not set | 533 | # CONFIG_NET_TCPPROBE is not set |
534 | # CONFIG_NET_DROP_MONITOR is not set | ||
532 | CONFIG_CAN=m | 535 | CONFIG_CAN=m |
533 | CONFIG_CAN_RAW=m | 536 | CONFIG_CAN_RAW=m |
534 | CONFIG_CAN_BCM=m | 537 | CONFIG_CAN_BCM=m |
@@ -605,6 +608,7 @@ CONFIG_MISC_DEVICES=y | |||
605 | # | 608 | # |
606 | # SCSI device support | 609 | # SCSI device support |
607 | # | 610 | # |
611 | CONFIG_SCSI_MOD=y | ||
608 | # CONFIG_RAID_ATTRS is not set | 612 | # CONFIG_RAID_ATTRS is not set |
609 | CONFIG_SCSI=y | 613 | CONFIG_SCSI=y |
610 | # CONFIG_SCSI_DMA is not set | 614 | # CONFIG_SCSI_DMA is not set |
@@ -863,6 +867,7 @@ CONFIG_MISC_FILESYSTEMS=y | |||
863 | # CONFIG_BEFS_FS is not set | 867 | # CONFIG_BEFS_FS is not set |
864 | # CONFIG_BFS_FS is not set | 868 | # CONFIG_BFS_FS is not set |
865 | # CONFIG_EFS_FS is not set | 869 | # CONFIG_EFS_FS is not set |
870 | # CONFIG_LOGFS is not set | ||
866 | # CONFIG_CRAMFS is not set | 871 | # CONFIG_CRAMFS is not set |
867 | # CONFIG_SQUASHFS is not set | 872 | # CONFIG_SQUASHFS is not set |
868 | # CONFIG_VXFS_FS is not set | 873 | # CONFIG_VXFS_FS is not set |
@@ -891,6 +896,7 @@ CONFIG_SUNRPC=y | |||
891 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 896 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
892 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 897 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
893 | # CONFIG_SMB_FS is not set | 898 | # CONFIG_SMB_FS is not set |
899 | # CONFIG_CEPH_FS is not set | ||
894 | # CONFIG_CIFS is not set | 900 | # CONFIG_CIFS is not set |
895 | # CONFIG_NCP_FS is not set | 901 | # CONFIG_NCP_FS is not set |
896 | # CONFIG_CODA_FS is not set | 902 | # CONFIG_CODA_FS is not set |
@@ -952,6 +958,7 @@ CONFIG_DEBUG_MUTEXES=y | |||
952 | # CONFIG_LOCK_STAT is not set | 958 | # CONFIG_LOCK_STAT is not set |
953 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | 959 | CONFIG_DEBUG_SPINLOCK_SLEEP=y |
954 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 960 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
961 | CONFIG_STACKTRACE=y | ||
955 | # CONFIG_DEBUG_KOBJECT is not set | 962 | # CONFIG_DEBUG_KOBJECT is not set |
956 | CONFIG_DEBUG_BUGVERBOSE=y | 963 | CONFIG_DEBUG_BUGVERBOSE=y |
957 | # CONFIG_DEBUG_INFO is not set | 964 | # CONFIG_DEBUG_INFO is not set |
@@ -973,12 +980,17 @@ CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y | |||
973 | # CONFIG_LATENCYTOP is not set | 980 | # CONFIG_LATENCYTOP is not set |
974 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 981 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
975 | # CONFIG_DEBUG_PAGEALLOC is not set | 982 | # CONFIG_DEBUG_PAGEALLOC is not set |
983 | CONFIG_NOP_TRACER=y | ||
976 | CONFIG_HAVE_FUNCTION_TRACER=y | 984 | CONFIG_HAVE_FUNCTION_TRACER=y |
977 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | 985 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y |
978 | CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y | 986 | CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y |
979 | CONFIG_HAVE_DYNAMIC_FTRACE=y | 987 | CONFIG_HAVE_DYNAMIC_FTRACE=y |
980 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | 988 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y |
981 | CONFIG_HAVE_SYSCALL_TRACEPOINTS=y | 989 | CONFIG_HAVE_SYSCALL_TRACEPOINTS=y |
990 | CONFIG_RING_BUFFER=y | ||
991 | CONFIG_EVENT_TRACING=y | ||
992 | CONFIG_CONTEXT_SWITCH_TRACER=y | ||
993 | CONFIG_TRACING=y | ||
982 | CONFIG_TRACING_SUPPORT=y | 994 | CONFIG_TRACING_SUPPORT=y |
983 | CONFIG_FTRACE=y | 995 | CONFIG_FTRACE=y |
984 | # CONFIG_FUNCTION_TRACER is not set | 996 | # CONFIG_FUNCTION_TRACER is not set |
@@ -995,10 +1007,15 @@ CONFIG_BRANCH_PROFILE_NONE=y | |||
995 | # CONFIG_KMEMTRACE is not set | 1007 | # CONFIG_KMEMTRACE is not set |
996 | # CONFIG_WORKQUEUE_TRACER is not set | 1008 | # CONFIG_WORKQUEUE_TRACER is not set |
997 | # CONFIG_BLK_DEV_IO_TRACE is not set | 1009 | # CONFIG_BLK_DEV_IO_TRACE is not set |
1010 | CONFIG_KPROBE_EVENT=y | ||
1011 | # CONFIG_RING_BUFFER_BENCHMARK is not set | ||
998 | # CONFIG_DYNAMIC_DEBUG is not set | 1012 | # CONFIG_DYNAMIC_DEBUG is not set |
999 | CONFIG_SAMPLES=y | 1013 | CONFIG_SAMPLES=y |
1014 | # CONFIG_SAMPLE_TRACEPOINTS is not set | ||
1015 | # CONFIG_SAMPLE_TRACE_EVENTS is not set | ||
1000 | # CONFIG_SAMPLE_KOBJECT is not set | 1016 | # CONFIG_SAMPLE_KOBJECT is not set |
1001 | # CONFIG_SAMPLE_KPROBES is not set | 1017 | # CONFIG_SAMPLE_KPROBES is not set |
1018 | # CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set | ||
1002 | 1019 | ||
1003 | # | 1020 | # |
1004 | # Security options | 1021 | # Security options |
@@ -1032,6 +1049,7 @@ CONFIG_CRYPTO_MANAGER=y | |||
1032 | CONFIG_CRYPTO_MANAGER2=y | 1049 | CONFIG_CRYPTO_MANAGER2=y |
1033 | CONFIG_CRYPTO_GF128MUL=m | 1050 | CONFIG_CRYPTO_GF128MUL=m |
1034 | # CONFIG_CRYPTO_NULL is not set | 1051 | # CONFIG_CRYPTO_NULL is not set |
1052 | # CONFIG_CRYPTO_PCRYPT is not set | ||
1035 | CONFIG_CRYPTO_WORKQUEUE=y | 1053 | CONFIG_CRYPTO_WORKQUEUE=y |
1036 | # CONFIG_CRYPTO_CRYPTD is not set | 1054 | # CONFIG_CRYPTO_CRYPTD is not set |
1037 | CONFIG_CRYPTO_AUTHENC=m | 1055 | CONFIG_CRYPTO_AUTHENC=m |
@@ -1119,7 +1137,7 @@ CONFIG_CRYPTO_SHA512_S390=m | |||
1119 | # CONFIG_CRYPTO_DES_S390 is not set | 1137 | # CONFIG_CRYPTO_DES_S390 is not set |
1120 | # CONFIG_CRYPTO_AES_S390 is not set | 1138 | # CONFIG_CRYPTO_AES_S390 is not set |
1121 | CONFIG_S390_PRNG=m | 1139 | CONFIG_S390_PRNG=m |
1122 | # CONFIG_BINARY_PRINTF is not set | 1140 | CONFIG_BINARY_PRINTF=y |
1123 | 1141 | ||
1124 | # | 1142 | # |
1125 | # Library routines | 1143 | # Library routines |
@@ -1136,14 +1154,16 @@ CONFIG_LIBCRC32C=m | |||
1136 | CONFIG_ZLIB_INFLATE=y | 1154 | CONFIG_ZLIB_INFLATE=y |
1137 | CONFIG_ZLIB_DEFLATE=m | 1155 | CONFIG_ZLIB_DEFLATE=m |
1138 | CONFIG_LZO_COMPRESS=m | 1156 | CONFIG_LZO_COMPRESS=m |
1139 | CONFIG_LZO_DECOMPRESS=m | 1157 | CONFIG_LZO_DECOMPRESS=y |
1140 | CONFIG_DECOMPRESS_GZIP=y | 1158 | CONFIG_DECOMPRESS_GZIP=y |
1141 | CONFIG_DECOMPRESS_BZIP2=y | 1159 | CONFIG_DECOMPRESS_BZIP2=y |
1142 | CONFIG_DECOMPRESS_LZMA=y | 1160 | CONFIG_DECOMPRESS_LZMA=y |
1161 | CONFIG_DECOMPRESS_LZO=y | ||
1143 | CONFIG_NLATTR=y | 1162 | CONFIG_NLATTR=y |
1144 | CONFIG_HAVE_KVM=y | 1163 | CONFIG_HAVE_KVM=y |
1145 | CONFIG_VIRTUALIZATION=y | 1164 | CONFIG_VIRTUALIZATION=y |
1146 | CONFIG_KVM=m | 1165 | CONFIG_KVM=m |
1166 | # CONFIG_VHOST_NET is not set | ||
1147 | CONFIG_VIRTIO=y | 1167 | CONFIG_VIRTIO=y |
1148 | CONFIG_VIRTIO_RING=y | 1168 | CONFIG_VIRTIO_RING=y |
1149 | CONFIG_VIRTIO_BALLOON=m | 1169 | CONFIG_VIRTIO_BALLOON=m |
diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c index 87cf523192e9..5b1acdba6495 100644 --- a/arch/s390/hypfs/hypfs_diag.c +++ b/arch/s390/hypfs/hypfs_diag.c | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/gfp.h> | ||
16 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
17 | #include <linux/string.h> | 16 | #include <linux/string.h> |
18 | #include <linux/vmalloc.h> | 17 | #include <linux/vmalloc.h> |
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c index cd128b07beda..c53f8ac825ca 100644 --- a/arch/s390/hypfs/inode.c +++ b/arch/s390/hypfs/inode.c | |||
@@ -14,8 +14,8 @@ | |||
14 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
15 | #include <linux/namei.h> | 15 | #include <linux/namei.h> |
16 | #include <linux/vfs.h> | 16 | #include <linux/vfs.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/pagemap.h> | 18 | #include <linux/pagemap.h> |
18 | #include <linux/gfp.h> | ||
19 | #include <linux/time.h> | 19 | #include <linux/time.h> |
20 | #include <linux/parser.h> | 20 | #include <linux/parser.h> |
21 | #include <linux/sysfs.h> | 21 | #include <linux/sysfs.h> |
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 9b5b9189c15e..89a504c3f12e 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -105,7 +105,7 @@ extern char empty_zero_page[PAGE_SIZE]; | |||
105 | #ifndef __ASSEMBLY__ | 105 | #ifndef __ASSEMBLY__ |
106 | /* | 106 | /* |
107 | * The vmalloc area will always be on the topmost area of the kernel | 107 | * The vmalloc area will always be on the topmost area of the kernel |
108 | * mapping. We reserve 96MB (31bit) / 1GB (64bit) for vmalloc, | 108 | * mapping. We reserve 96MB (31bit) / 128GB (64bit) for vmalloc, |
109 | * which should be enough for any sane case. | 109 | * which should be enough for any sane case. |
110 | * By putting vmalloc at the top, we maximise the gap between physical | 110 | * By putting vmalloc at the top, we maximise the gap between physical |
111 | * memory and vmalloc to catch misplaced memory accesses. As a side | 111 | * memory and vmalloc to catch misplaced memory accesses. As a side |
@@ -120,8 +120,8 @@ extern unsigned long VMALLOC_START; | |||
120 | #define VMALLOC_END 0x7e000000UL | 120 | #define VMALLOC_END 0x7e000000UL |
121 | #define VMEM_MAP_END 0x80000000UL | 121 | #define VMEM_MAP_END 0x80000000UL |
122 | #else /* __s390x__ */ | 122 | #else /* __s390x__ */ |
123 | #define VMALLOC_SIZE (1UL << 30) | 123 | #define VMALLOC_SIZE (128UL << 30) |
124 | #define VMALLOC_END 0x3e040000000UL | 124 | #define VMALLOC_END 0x3e000000000UL |
125 | #define VMEM_MAP_END 0x40000000000UL | 125 | #define VMEM_MAP_END 0x40000000000UL |
126 | #endif /* __s390x__ */ | 126 | #endif /* __s390x__ */ |
127 | 127 | ||
diff --git a/arch/s390/include/asm/system.h b/arch/s390/include/asm/system.h index 67ee6c3c6bb3..1741c1556a4e 100644 --- a/arch/s390/include/asm/system.h +++ b/arch/s390/include/asm/system.h | |||
@@ -110,6 +110,7 @@ extern void pfault_fini(void); | |||
110 | #endif /* CONFIG_PFAULT */ | 110 | #endif /* CONFIG_PFAULT */ |
111 | 111 | ||
112 | extern void cmma_init(void); | 112 | extern void cmma_init(void); |
113 | extern int memcpy_real(void *, void *, size_t); | ||
113 | 114 | ||
114 | #define finish_arch_switch(prev) do { \ | 115 | #define finish_arch_switch(prev) do { \ |
115 | set_fs(current->thread.mm_segment); \ | 116 | set_fs(current->thread.mm_segment); \ |
@@ -218,8 +219,8 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
218 | " l %0,%2\n" | 219 | " l %0,%2\n" |
219 | "0: nr %0,%5\n" | 220 | "0: nr %0,%5\n" |
220 | " lr %1,%0\n" | 221 | " lr %1,%0\n" |
221 | " or %0,%2\n" | 222 | " or %0,%3\n" |
222 | " or %1,%3\n" | 223 | " or %1,%4\n" |
223 | " cs %0,%1,%2\n" | 224 | " cs %0,%1,%2\n" |
224 | " jnl 1f\n" | 225 | " jnl 1f\n" |
225 | " xr %1,%0\n" | 226 | " xr %1,%0\n" |
@@ -239,8 +240,8 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
239 | " l %0,%2\n" | 240 | " l %0,%2\n" |
240 | "0: nr %0,%5\n" | 241 | "0: nr %0,%5\n" |
241 | " lr %1,%0\n" | 242 | " lr %1,%0\n" |
242 | " or %0,%2\n" | 243 | " or %0,%3\n" |
243 | " or %1,%3\n" | 244 | " or %1,%4\n" |
244 | " cs %0,%1,%2\n" | 245 | " cs %0,%1,%2\n" |
245 | " jnl 1f\n" | 246 | " jnl 1f\n" |
246 | " xr %1,%0\n" | 247 | " xr %1,%0\n" |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 11c3aba664ea..73b624ed9cd8 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/sem.h> | 29 | #include <linux/sem.h> |
30 | #include <linux/msg.h> | 30 | #include <linux/msg.h> |
31 | #include <linux/shm.h> | 31 | #include <linux/shm.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/uio.h> | 32 | #include <linux/uio.h> |
34 | #include <linux/quota.h> | 33 | #include <linux/quota.h> |
35 | #include <linux/module.h> | 34 | #include <linux/module.h> |
@@ -52,6 +51,7 @@ | |||
52 | #include <linux/ptrace.h> | 51 | #include <linux/ptrace.h> |
53 | #include <linux/fadvise.h> | 52 | #include <linux/fadvise.h> |
54 | #include <linux/ipc.h> | 53 | #include <linux/ipc.h> |
54 | #include <linux/slab.h> | ||
55 | 55 | ||
56 | #include <asm/types.h> | 56 | #include <asm/types.h> |
57 | #include <asm/uaccess.h> | 57 | #include <asm/uaccess.h> |
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 31d618a443af..2d92c2cf92d7 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -82,7 +82,8 @@ asm( | |||
82 | " lm 6,15,24(15)\n" | 82 | " lm 6,15,24(15)\n" |
83 | #endif | 83 | #endif |
84 | " br 14\n" | 84 | " br 14\n" |
85 | " .size savesys_ipl_nss, .-savesys_ipl_nss\n"); | 85 | " .size savesys_ipl_nss, .-savesys_ipl_nss\n" |
86 | " .previous\n"); | ||
86 | 87 | ||
87 | static __initdata char upper_command_line[COMMAND_LINE_SIZE]; | 88 | static __initdata char upper_command_line[COMMAND_LINE_SIZE]; |
88 | 89 | ||
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 4348f9bc5393..6af7045280a8 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -964,7 +964,7 @@ cleanup_critical: | |||
964 | clc 4(4,%r12),BASED(cleanup_table_io_work_loop) | 964 | clc 4(4,%r12),BASED(cleanup_table_io_work_loop) |
965 | bl BASED(0f) | 965 | bl BASED(0f) |
966 | clc 4(4,%r12),BASED(cleanup_table_io_work_loop+4) | 966 | clc 4(4,%r12),BASED(cleanup_table_io_work_loop+4) |
967 | bl BASED(cleanup_io_return) | 967 | bl BASED(cleanup_io_work_loop) |
968 | 0: | 968 | 0: |
969 | br %r14 | 969 | br %r14 |
970 | 970 | ||
@@ -1039,6 +1039,12 @@ cleanup_sysc_leave_insn: | |||
1039 | 1039 | ||
1040 | cleanup_io_return: | 1040 | cleanup_io_return: |
1041 | mvc __LC_RETURN_PSW(4),0(%r12) | 1041 | mvc __LC_RETURN_PSW(4),0(%r12) |
1042 | mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_io_return) | ||
1043 | la %r12,__LC_RETURN_PSW | ||
1044 | br %r14 | ||
1045 | |||
1046 | cleanup_io_work_loop: | ||
1047 | mvc __LC_RETURN_PSW(4),0(%r12) | ||
1042 | mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_io_work_loop) | 1048 | mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_io_work_loop) |
1043 | la %r12,__LC_RETURN_PSW | 1049 | la %r12,__LC_RETURN_PSW |
1044 | br %r14 | 1050 | br %r14 |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 29fd0f1e6ec4..52106d53271c 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -946,7 +946,7 @@ cleanup_critical: | |||
946 | clc 8(8,%r12),BASED(cleanup_table_io_work_loop) | 946 | clc 8(8,%r12),BASED(cleanup_table_io_work_loop) |
947 | jl 0f | 947 | jl 0f |
948 | clc 8(8,%r12),BASED(cleanup_table_io_work_loop+8) | 948 | clc 8(8,%r12),BASED(cleanup_table_io_work_loop+8) |
949 | jl cleanup_io_return | 949 | jl cleanup_io_work_loop |
950 | 0: | 950 | 0: |
951 | br %r14 | 951 | br %r14 |
952 | 952 | ||
@@ -1021,6 +1021,12 @@ cleanup_sysc_leave_insn: | |||
1021 | 1021 | ||
1022 | cleanup_io_return: | 1022 | cleanup_io_return: |
1023 | mvc __LC_RETURN_PSW(8),0(%r12) | 1023 | mvc __LC_RETURN_PSW(8),0(%r12) |
1024 | mvc __LC_RETURN_PSW+8(8),BASED(cleanup_table_io_return) | ||
1025 | la %r12,__LC_RETURN_PSW | ||
1026 | br %r14 | ||
1027 | |||
1028 | cleanup_io_work_loop: | ||
1029 | mvc __LC_RETURN_PSW(8),0(%r12) | ||
1024 | mvc __LC_RETURN_PSW+8(8),BASED(cleanup_table_io_work_loop) | 1030 | mvc __LC_RETURN_PSW+8(8),BASED(cleanup_table_io_work_loop) |
1025 | la %r12,__LC_RETURN_PSW | 1031 | la %r12,__LC_RETURN_PSW |
1026 | br %r14 | 1032 | br %r14 |
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index ca4a62bd862f..9d1f76702d47 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S | |||
@@ -517,7 +517,10 @@ startup: | |||
517 | lhi %r1,2 # mode 2 = esame (dump) | 517 | lhi %r1,2 # mode 2 = esame (dump) |
518 | sigp %r1,%r0,0x12 # switch to esame mode | 518 | sigp %r1,%r0,0x12 # switch to esame mode |
519 | sam64 # switch to 64 bit mode | 519 | sam64 # switch to 64 bit mode |
520 | larl %r13,4f | ||
521 | lmh %r0,%r15,0(%r13) # clear high-order half | ||
520 | jg startup_continue | 522 | jg startup_continue |
523 | 4: .fill 16,4,0x0 | ||
521 | #else | 524 | #else |
522 | mvi __LC_AR_MODE_ID,0 # set ESA flag (mode 0) | 525 | mvi __LC_AR_MODE_ID,0 # set ESA flag (mode 0) |
523 | l %r13,4f-.LPG0(%r13) | 526 | l %r13,4f-.LPG0(%r13) |
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index 39580e768658..1f70970de0aa 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
@@ -21,7 +21,6 @@ startup_continue: | |||
21 | larl %r1,sched_clock_base_cc | 21 | larl %r1,sched_clock_base_cc |
22 | mvc 0(8,%r1),__LC_LAST_UPDATE_CLOCK | 22 | mvc 0(8,%r1),__LC_LAST_UPDATE_CLOCK |
23 | larl %r13,.LPG1 # get base | 23 | larl %r13,.LPG1 # get base |
24 | lmh %r0,%r15,.Lzero64-.LPG1(%r13) # clear high-order half | ||
25 | lctlg %c0,%c15,.Lctl-.LPG1(%r13) # load control registers | 24 | lctlg %c0,%c15,.Lctl-.LPG1(%r13) # load control registers |
26 | lg %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area | 25 | lg %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area |
27 | # move IPL device to lowcore | 26 | # move IPL device to lowcore |
@@ -67,7 +66,6 @@ startup_continue: | |||
67 | .L4malign:.quad 0xffffffffffc00000 | 66 | .L4malign:.quad 0xffffffffffc00000 |
68 | .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 | 67 | .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 |
69 | .Lnop: .long 0x07000700 | 68 | .Lnop: .long 0x07000700 |
70 | .Lzero64:.fill 16,4,0x0 | ||
71 | .Lparmaddr: | 69 | .Lparmaddr: |
72 | .quad PARMAREA | 70 | .quad PARMAREA |
73 | .align 64 | 71 | .align 64 |
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index 7eedbbcb54aa..72c8b0d070c8 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/reboot.h> | 15 | #include <linux/reboot.h> |
16 | #include <linux/ctype.h> | 16 | #include <linux/ctype.h> |
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/gfp.h> | ||
18 | #include <asm/ipl.h> | 19 | #include <asm/ipl.h> |
19 | #include <asm/smp.h> | 20 | #include <asm/smp.h> |
20 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index 86783efa24ee..3d34eef5a2c3 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/cacheflush.h> | 29 | #include <asm/cacheflush.h> |
30 | #include <asm/sections.h> | 30 | #include <asm/sections.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; | 34 | DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; |
34 | DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); | 35 | DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 00b6d1d292f2..1039fdea15b5 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -16,9 +16,9 @@ | |||
16 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
17 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
18 | #include <linux/stddef.h> | 18 | #include <linux/stddef.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/unistd.h> | 20 | #include <linux/unistd.h> |
20 | #include <linux/ptrace.h> | 21 | #include <linux/ptrace.h> |
21 | #include <linux/slab.h> | ||
22 | #include <linux/vmalloc.h> | 22 | #include <linux/vmalloc.h> |
23 | #include <linux/user.h> | 23 | #include <linux/user.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 77a63ae419f0..91625f759ccd 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/stddef.h> | 25 | #include <linux/stddef.h> |
26 | #include <linux/unistd.h> | 26 | #include <linux/unistd.h> |
27 | #include <linux/ptrace.h> | 27 | #include <linux/ptrace.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/user.h> | 28 | #include <linux/user.h> |
30 | #include <linux/tty.h> | 29 | #include <linux/tty.h> |
31 | #include <linux/ioport.h> | 30 | #include <linux/ioport.h> |
@@ -401,7 +400,7 @@ setup_lowcore(void) | |||
401 | * Setup lowcore for boot cpu | 400 | * Setup lowcore for boot cpu |
402 | */ | 401 | */ |
403 | BUILD_BUG_ON(sizeof(struct _lowcore) != LC_PAGES * 4096); | 402 | BUILD_BUG_ON(sizeof(struct _lowcore) != LC_PAGES * 4096); |
404 | lc = __alloc_bootmem(LC_PAGES * PAGE_SIZE, LC_PAGES * PAGE_SIZE, 0); | 403 | lc = __alloc_bootmem_low(LC_PAGES * PAGE_SIZE, LC_PAGES * PAGE_SIZE, 0); |
405 | lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; | 404 | lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; |
406 | lc->restart_psw.addr = | 405 | lc->restart_psw.addr = |
407 | PSW_ADDR_AMODE | (unsigned long) restart_int_handler; | 406 | PSW_ADDR_AMODE | (unsigned long) restart_int_handler; |
@@ -433,7 +432,7 @@ setup_lowcore(void) | |||
433 | #ifndef CONFIG_64BIT | 432 | #ifndef CONFIG_64BIT |
434 | if (MACHINE_HAS_IEEE) { | 433 | if (MACHINE_HAS_IEEE) { |
435 | lc->extended_save_area_addr = (__u32) | 434 | lc->extended_save_area_addr = (__u32) |
436 | __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, 0); | 435 | __alloc_bootmem_low(PAGE_SIZE, PAGE_SIZE, 0); |
437 | /* enable extended save area */ | 436 | /* enable extended save area */ |
438 | __ctl_set_bit(14, 29); | 437 | __ctl_set_bit(14, 29); |
439 | } | 438 | } |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 29f65bce55e1..e4d98de83dd8 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/cpu.h> | 36 | #include <linux/cpu.h> |
37 | #include <linux/timex.h> | 37 | #include <linux/timex.h> |
38 | #include <linux/bootmem.h> | 38 | #include <linux/bootmem.h> |
39 | #include <linux/slab.h> | ||
39 | #include <asm/asm-offsets.h> | 40 | #include <asm/asm-offsets.h> |
40 | #include <asm/ipl.h> | 41 | #include <asm/ipl.h> |
41 | #include <asm/setup.h> | 42 | #include <asm/setup.h> |
@@ -292,9 +293,9 @@ static void __init smp_get_save_area(unsigned int cpu, unsigned int phy_cpu) | |||
292 | zfcpdump_save_areas[cpu] = kmalloc(sizeof(struct save_area), GFP_KERNEL); | 293 | zfcpdump_save_areas[cpu] = kmalloc(sizeof(struct save_area), GFP_KERNEL); |
293 | while (raw_sigp(phy_cpu, sigp_stop_and_store_status) == sigp_busy) | 294 | while (raw_sigp(phy_cpu, sigp_stop_and_store_status) == sigp_busy) |
294 | cpu_relax(); | 295 | cpu_relax(); |
295 | memcpy(zfcpdump_save_areas[cpu], | 296 | memcpy_real(zfcpdump_save_areas[cpu], |
296 | (void *)(unsigned long) store_prefix() + SAVE_AREA_BASE, | 297 | (void *)(unsigned long) store_prefix() + SAVE_AREA_BASE, |
297 | sizeof(struct save_area)); | 298 | sizeof(struct save_area)); |
298 | } | 299 | } |
299 | 300 | ||
300 | struct save_area *zfcpdump_save_areas[NR_CPUS + 1]; | 301 | struct save_area *zfcpdump_save_areas[NR_CPUS + 1]; |
diff --git a/arch/s390/kernel/sysinfo.c b/arch/s390/kernel/sysinfo.c index b5e75e1061c8..a0ffc7717ed6 100644 --- a/arch/s390/kernel/sysinfo.c +++ b/arch/s390/kernel/sysinfo.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/slab.h> | ||
14 | #include <asm/ebcdic.h> | 15 | #include <asm/ebcdic.h> |
15 | #include <asm/sysinfo.h> | 16 | #include <asm/sysinfo.h> |
16 | #include <asm/cpcmd.h> | 17 | #include <asm/cpcmd.h> |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index aa2483e460f3..fba6dec156bf 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/notifier.h> | 36 | #include <linux/notifier.h> |
37 | #include <linux/clocksource.h> | 37 | #include <linux/clocksource.h> |
38 | #include <linux/clockchips.h> | 38 | #include <linux/clockchips.h> |
39 | #include <linux/gfp.h> | ||
39 | #include <asm/uaccess.h> | 40 | #include <asm/uaccess.h> |
40 | #include <asm/delay.h> | 41 | #include <asm/delay.h> |
41 | #include <asm/s390_ext.h> | 42 | #include <asm/s390_ext.h> |
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 14ef6f05e432..247b4c2d1e51 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
@@ -165,10 +165,11 @@ static void tl_to_cores(struct tl_info *info) | |||
165 | default: | 165 | default: |
166 | clear_cores(); | 166 | clear_cores(); |
167 | machine_has_topology = 0; | 167 | machine_has_topology = 0; |
168 | return; | 168 | goto out; |
169 | } | 169 | } |
170 | tle = next_tle(tle); | 170 | tle = next_tle(tle); |
171 | } | 171 | } |
172 | out: | ||
172 | spin_unlock_irq(&topology_lock); | 173 | spin_unlock_irq(&topology_lock); |
173 | } | 174 | } |
174 | 175 | ||
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 834774d8d5f3..35c21bf910c5 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kvm_host.h> | 14 | #include <linux/kvm_host.h> |
15 | #include <linux/hrtimer.h> | 15 | #include <linux/hrtimer.h> |
16 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
17 | #include <linux/slab.h> | ||
17 | #include <asm/asm-offsets.h> | 18 | #include <asm/asm-offsets.h> |
18 | #include <asm/uaccess.h> | 19 | #include <asm/uaccess.h> |
19 | #include "kvm-s390.h" | 20 | #include "kvm-s390.h" |
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 28c55677eb39..44205507717c 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/kvm.h> | 14 | #include <linux/kvm.h> |
15 | #include <linux/gfp.h> | ||
15 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
16 | #include <asm/current.h> | 17 | #include <asm/current.h> |
17 | #include <asm/debug.h> | 18 | #include <asm/debug.h> |
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c index 241a48459b66..eff3c5989b46 100644 --- a/arch/s390/kvm/sigp.c +++ b/arch/s390/kvm/sigp.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/kvm.h> | 15 | #include <linux/kvm.h> |
16 | #include <linux/kvm_host.h> | 16 | #include <linux/kvm_host.h> |
17 | #include <linux/slab.h> | ||
17 | #include "gaccess.h" | 18 | #include "gaccess.h" |
18 | #include "kvm-s390.h" | 19 | #include "kvm-s390.h" |
19 | 20 | ||
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index f16bd04e39e9..f87b34731e1d 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/gfp.h> | ||
15 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
16 | #include <linux/sysctl.h> | 17 | #include <linux/sysctl.h> |
17 | #include <linux/ctype.h> | 18 | #include <linux/ctype.h> |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index d5865e4024ce..acc91c75bc94 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/pfn.h> | 26 | #include <linux/pfn.h> |
27 | #include <linux/poison.h> | 27 | #include <linux/poison.h> |
28 | #include <linux/initrd.h> | 28 | #include <linux/initrd.h> |
29 | #include <linux/gfp.h> | ||
29 | #include <asm/processor.h> | 30 | #include <asm/processor.h> |
30 | #include <asm/system.h> | 31 | #include <asm/system.h> |
31 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
diff --git a/arch/s390/mm/maccess.c b/arch/s390/mm/maccess.c index 81756271dc44..a8c2af8c650f 100644 --- a/arch/s390/mm/maccess.c +++ b/arch/s390/mm/maccess.c | |||
@@ -59,3 +59,29 @@ long probe_kernel_write(void *dst, void *src, size_t size) | |||
59 | } | 59 | } |
60 | return copied < 0 ? -EFAULT : 0; | 60 | return copied < 0 ? -EFAULT : 0; |
61 | } | 61 | } |
62 | |||
63 | int memcpy_real(void *dest, void *src, size_t count) | ||
64 | { | ||
65 | register unsigned long _dest asm("2") = (unsigned long) dest; | ||
66 | register unsigned long _len1 asm("3") = (unsigned long) count; | ||
67 | register unsigned long _src asm("4") = (unsigned long) src; | ||
68 | register unsigned long _len2 asm("5") = (unsigned long) count; | ||
69 | unsigned long flags; | ||
70 | int rc = -EFAULT; | ||
71 | |||
72 | if (!count) | ||
73 | return 0; | ||
74 | flags = __raw_local_irq_stnsm(0xf8UL); | ||
75 | asm volatile ( | ||
76 | "0: mvcle %1,%2,0x0\n" | ||
77 | "1: jo 0b\n" | ||
78 | " lhi %0,0x0\n" | ||
79 | "2:\n" | ||
80 | EX_TABLE(1b,2b) | ||
81 | : "+d" (rc), "+d" (_dest), "+d" (_src), "+d" (_len1), | ||
82 | "+d" (_len2), "=m" (*((long *) dest)) | ||
83 | : "m" (*((long *) src)) | ||
84 | : "cc", "memory"); | ||
85 | __raw_local_irq_ssm(flags); | ||
86 | return rc; | ||
87 | } | ||
diff --git a/arch/s390/mm/page-states.c b/arch/s390/mm/page-states.c index 098923ae458f..a90d45e9dfb0 100644 --- a/arch/s390/mm/page-states.c +++ b/arch/s390/mm/page-states.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/gfp.h> | ||
13 | #include <linux/init.h> | 14 | #include <linux/init.h> |
14 | 15 | ||
15 | #define ESSA_SET_STABLE 1 | 16 | #define ESSA_SET_STABLE 1 |
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index ad621e06ada3..8d999249d357 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -6,11 +6,11 @@ | |||
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/gfp.h> | ||
9 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
10 | #include <linux/swap.h> | 11 | #include <linux/swap.h> |
11 | #include <linux/smp.h> | 12 | #include <linux/smp.h> |
12 | #include <linux/highmem.h> | 13 | #include <linux/highmem.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/pagemap.h> | 14 | #include <linux/pagemap.h> |
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c index 300ab012b0fd..90165e7ca04e 100644 --- a/arch/s390/mm/vmem.c +++ b/arch/s390/mm/vmem.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/list.h> | 12 | #include <linux/list.h> |
13 | #include <linux/hugetlb.h> | 13 | #include <linux/hugetlb.h> |
14 | #include <linux/slab.h> | ||
14 | #include <asm/pgalloc.h> | 15 | #include <asm/pgalloc.h> |
15 | #include <asm/pgtable.h> | 16 | #include <asm/pgtable.h> |
16 | #include <asm/setup.h> | 17 | #include <asm/setup.h> |
@@ -70,12 +71,8 @@ static pte_t __ref *vmem_pte_alloc(void) | |||
70 | pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t)); | 71 | pte = alloc_bootmem(PTRS_PER_PTE * sizeof(pte_t)); |
71 | if (!pte) | 72 | if (!pte) |
72 | return NULL; | 73 | return NULL; |
73 | if (MACHINE_HAS_HPAGE) | 74 | clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY, |
74 | clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY | _PAGE_CO, | 75 | PTRS_PER_PTE * sizeof(pte_t)); |
75 | PTRS_PER_PTE * sizeof(pte_t)); | ||
76 | else | ||
77 | clear_table((unsigned long *) pte, _PAGE_TYPE_EMPTY, | ||
78 | PTRS_PER_PTE * sizeof(pte_t)); | ||
79 | return pte; | 76 | return pte; |
80 | } | 77 | } |
81 | 78 | ||
@@ -116,8 +113,7 @@ static int vmem_add_mem(unsigned long start, unsigned long size, int ro) | |||
116 | if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) && | 113 | if (MACHINE_HAS_HPAGE && !(address & ~HPAGE_MASK) && |
117 | (address + HPAGE_SIZE <= start + size) && | 114 | (address + HPAGE_SIZE <= start + size) && |
118 | (address >= HPAGE_SIZE)) { | 115 | (address >= HPAGE_SIZE)) { |
119 | pte_val(pte) |= _SEGMENT_ENTRY_LARGE | | 116 | pte_val(pte) |= _SEGMENT_ENTRY_LARGE; |
120 | _SEGMENT_ENTRY_CO; | ||
121 | pmd_val(*pm_dir) = pte_val(pte); | 117 | pmd_val(*pm_dir) = pte_val(pte); |
122 | address += HPAGE_SIZE - PAGE_SIZE; | 118 | address += HPAGE_SIZE - PAGE_SIZE; |
123 | continue; | 119 | continue; |
diff --git a/arch/score/kernel/sys_score.c b/arch/score/kernel/sys_score.c index 856ed68a58e6..651096ff8db4 100644 --- a/arch/score/kernel/sys_score.c +++ b/arch/score/kernel/sys_score.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/mman.h> | 29 | #include <linux/mman.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/unistd.h> | 32 | #include <linux/unistd.h> |
32 | #include <linux/syscalls.h> | 33 | #include <linux/syscalls.h> |
33 | #include <asm/syscalls.h> | 34 | #include <asm/syscalls.h> |
diff --git a/arch/score/mm/init.c b/arch/score/mm/init.c index 7f001bbedb00..50fdec54c70a 100644 --- a/arch/score/mm/init.c +++ b/arch/score/mm/init.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
27 | #include <linux/bootmem.h> | 27 | #include <linux/bootmem.h> |
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/gfp.h> | ||
29 | #include <linux/init.h> | 30 | #include <linux/init.h> |
30 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
31 | #include <linux/mman.h> | 32 | #include <linux/mman.h> |
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 39ed8722d11a..6c13b92742e8 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -836,6 +836,8 @@ static void __init sh_eth_init(struct sh_eth_plat_data *pd) | |||
836 | pd->mac_addr[i] = mac_read(a, 0x10 + i); | 836 | pd->mac_addr[i] = mac_read(a, 0x10 + i); |
837 | msleep(10); | 837 | msleep(10); |
838 | } | 838 | } |
839 | |||
840 | i2c_put_adapter(a); | ||
839 | } | 841 | } |
840 | #else | 842 | #else |
841 | static void __init sh_eth_init(struct sh_eth_plat_data *pd) | 843 | static void __init sh_eth_init(struct sh_eth_plat_data *pd) |
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 66cdbc3c7af9..ccaa290e9aba 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c | |||
@@ -52,6 +52,13 @@ | |||
52 | * and change SW41 to use 720p | 52 | * and change SW41 to use 720p |
53 | */ | 53 | */ |
54 | 54 | ||
55 | /* | ||
56 | * about sound | ||
57 | * | ||
58 | * This setup.c supports FSI slave mode. | ||
59 | * Please change J20, J21, J22 pin to 1-2 connection. | ||
60 | */ | ||
61 | |||
55 | /* Heartbeat */ | 62 | /* Heartbeat */ |
56 | static struct resource heartbeat_resource = { | 63 | static struct resource heartbeat_resource = { |
57 | .start = PA_LED, | 64 | .start = PA_LED, |
@@ -276,6 +283,7 @@ static struct clk fsimcka_clk = { | |||
276 | .rate = 0, /* unknown */ | 283 | .rate = 0, /* unknown */ |
277 | }; | 284 | }; |
278 | 285 | ||
286 | /* change J20, J21, J22 pin to 1-2 connection to use slave mode */ | ||
279 | struct sh_fsi_platform_info fsi_info = { | 287 | struct sh_fsi_platform_info fsi_info = { |
280 | .porta_flags = SH_FSI_BRS_INV | | 288 | .porta_flags = SH_FSI_BRS_INV | |
281 | SH_FSI_OUT_SLAVE_MODE | | 289 | SH_FSI_OUT_SLAVE_MODE | |
diff --git a/arch/sh/configs/ecovec24_defconfig b/arch/sh/configs/ecovec24_defconfig index 18e3356406f3..6041c66dd10e 100644 --- a/arch/sh/configs/ecovec24_defconfig +++ b/arch/sh/configs/ecovec24_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.33-rc2 | 3 | # Linux kernel version: 2.6.34-rc2 |
4 | # Mon Jan 4 11:20:36 2010 | 4 | # Mon Mar 29 02:21:58 2010 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_SUPERH32=y | 7 | CONFIG_SUPERH32=y |
@@ -13,8 +13,8 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y | |||
13 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
14 | CONFIG_GENERIC_HARDIRQS=y | 14 | CONFIG_GENERIC_HARDIRQS=y |
15 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | 15 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y |
16 | CONFIG_GENERIC_IRQ_PROBE=y | ||
17 | CONFIG_IRQ_PER_CPU=y | 16 | CONFIG_IRQ_PER_CPU=y |
17 | CONFIG_SPARSE_IRQ=y | ||
18 | CONFIG_GENERIC_GPIO=y | 18 | CONFIG_GENERIC_GPIO=y |
19 | CONFIG_GENERIC_TIME=y | 19 | CONFIG_GENERIC_TIME=y |
20 | CONFIG_GENERIC_CLOCKEVENTS=y | 20 | CONFIG_GENERIC_CLOCKEVENTS=y |
@@ -32,6 +32,7 @@ CONFIG_ARCH_NO_VIRT_TO_BUS=y | |||
32 | CONFIG_ARCH_HAS_DEFAULT_IDLE=y | 32 | CONFIG_ARCH_HAS_DEFAULT_IDLE=y |
33 | CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y | 33 | CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y |
34 | CONFIG_DMA_NONCOHERENT=y | 34 | CONFIG_DMA_NONCOHERENT=y |
35 | CONFIG_NEED_DMA_MAP_STATE=y | ||
35 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 36 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
36 | CONFIG_CONSTRUCTORS=y | 37 | CONFIG_CONSTRUCTORS=y |
37 | 38 | ||
@@ -47,9 +48,11 @@ CONFIG_LOCALVERSION="" | |||
47 | CONFIG_HAVE_KERNEL_GZIP=y | 48 | CONFIG_HAVE_KERNEL_GZIP=y |
48 | CONFIG_HAVE_KERNEL_BZIP2=y | 49 | CONFIG_HAVE_KERNEL_BZIP2=y |
49 | CONFIG_HAVE_KERNEL_LZMA=y | 50 | CONFIG_HAVE_KERNEL_LZMA=y |
51 | CONFIG_HAVE_KERNEL_LZO=y | ||
50 | CONFIG_KERNEL_GZIP=y | 52 | CONFIG_KERNEL_GZIP=y |
51 | # CONFIG_KERNEL_BZIP2 is not set | 53 | # CONFIG_KERNEL_BZIP2 is not set |
52 | # CONFIG_KERNEL_LZMA is not set | 54 | # CONFIG_KERNEL_LZMA is not set |
55 | # CONFIG_KERNEL_LZO is not set | ||
53 | CONFIG_SWAP=y | 56 | CONFIG_SWAP=y |
54 | CONFIG_SYSVIPC=y | 57 | CONFIG_SYSVIPC=y |
55 | CONFIG_SYSVIPC_SYSCTL=y | 58 | CONFIG_SYSVIPC_SYSCTL=y |
@@ -71,14 +74,8 @@ CONFIG_RCU_FANOUT=32 | |||
71 | # CONFIG_TREE_RCU_TRACE is not set | 74 | # CONFIG_TREE_RCU_TRACE is not set |
72 | # CONFIG_IKCONFIG is not set | 75 | # CONFIG_IKCONFIG is not set |
73 | CONFIG_LOG_BUF_SHIFT=14 | 76 | CONFIG_LOG_BUF_SHIFT=14 |
74 | CONFIG_GROUP_SCHED=y | ||
75 | CONFIG_FAIR_GROUP_SCHED=y | ||
76 | # CONFIG_RT_GROUP_SCHED is not set | ||
77 | CONFIG_USER_SCHED=y | ||
78 | # CONFIG_CGROUP_SCHED is not set | ||
79 | # CONFIG_CGROUPS is not set | 77 | # CONFIG_CGROUPS is not set |
80 | CONFIG_SYSFS_DEPRECATED=y | 78 | # CONFIG_SYSFS_DEPRECATED_V2 is not set |
81 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
82 | # CONFIG_RELAY is not set | 79 | # CONFIG_RELAY is not set |
83 | # CONFIG_NAMESPACES is not set | 80 | # CONFIG_NAMESPACES is not set |
84 | # CONFIG_BLK_DEV_INITRD is not set | 81 | # CONFIG_BLK_DEV_INITRD is not set |
@@ -107,7 +104,7 @@ CONFIG_PERF_USE_VMALLOC=y | |||
107 | # | 104 | # |
108 | # Kernel Performance Events And Counters | 105 | # Kernel Performance Events And Counters |
109 | # | 106 | # |
110 | # CONFIG_PERF_EVENTS is not set | 107 | CONFIG_PERF_EVENTS=y |
111 | # CONFIG_PERF_COUNTERS is not set | 108 | # CONFIG_PERF_COUNTERS is not set |
112 | CONFIG_VM_EVENT_COUNTERS=y | 109 | CONFIG_VM_EVENT_COUNTERS=y |
113 | CONFIG_COMPAT_BRK=y | 110 | CONFIG_COMPAT_BRK=y |
@@ -116,13 +113,13 @@ CONFIG_SLAB=y | |||
116 | # CONFIG_SLOB is not set | 113 | # CONFIG_SLOB is not set |
117 | # CONFIG_PROFILING is not set | 114 | # CONFIG_PROFILING is not set |
118 | CONFIG_HAVE_OPROFILE=y | 115 | CONFIG_HAVE_OPROFILE=y |
119 | CONFIG_HAVE_IOREMAP_PROT=y | ||
120 | CONFIG_HAVE_KPROBES=y | 116 | CONFIG_HAVE_KPROBES=y |
121 | CONFIG_HAVE_KRETPROBES=y | 117 | CONFIG_HAVE_KRETPROBES=y |
122 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 118 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
123 | CONFIG_HAVE_DMA_ATTRS=y | 119 | CONFIG_HAVE_DMA_ATTRS=y |
124 | CONFIG_HAVE_CLK=y | 120 | CONFIG_HAVE_CLK=y |
125 | CONFIG_HAVE_DMA_API_DEBUG=y | 121 | CONFIG_HAVE_DMA_API_DEBUG=y |
122 | CONFIG_HAVE_HW_BREAKPOINT=y | ||
126 | 123 | ||
127 | # | 124 | # |
128 | # GCOV-based kernel profiling | 125 | # GCOV-based kernel profiling |
@@ -234,12 +231,12 @@ CONFIG_CPU_SUBTYPE_SH7724=y | |||
234 | CONFIG_QUICKLIST=y | 231 | CONFIG_QUICKLIST=y |
235 | CONFIG_MMU=y | 232 | CONFIG_MMU=y |
236 | CONFIG_PAGE_OFFSET=0x80000000 | 233 | CONFIG_PAGE_OFFSET=0x80000000 |
237 | CONFIG_FORCE_MAX_ZONEORDER=11 | 234 | CONFIG_FORCE_MAX_ZONEORDER=12 |
238 | CONFIG_MEMORY_START=0x08000000 | 235 | CONFIG_MEMORY_START=0x08000000 |
239 | CONFIG_MEMORY_SIZE=0x10000000 | 236 | CONFIG_MEMORY_SIZE=0x10000000 |
240 | CONFIG_29BIT=y | 237 | CONFIG_29BIT=y |
241 | # CONFIG_PMB_ENABLE is not set | 238 | # CONFIG_PMB is not set |
242 | # CONFIG_X2TLB is not set | 239 | CONFIG_X2TLB=y |
243 | CONFIG_VSYSCALL=y | 240 | CONFIG_VSYSCALL=y |
244 | CONFIG_ARCH_FLATMEM_ENABLE=y | 241 | CONFIG_ARCH_FLATMEM_ENABLE=y |
245 | CONFIG_ARCH_SPARSEMEM_ENABLE=y | 242 | CONFIG_ARCH_SPARSEMEM_ENABLE=y |
@@ -247,6 +244,8 @@ CONFIG_ARCH_SPARSEMEM_DEFAULT=y | |||
247 | CONFIG_MAX_ACTIVE_REGIONS=1 | 244 | CONFIG_MAX_ACTIVE_REGIONS=1 |
248 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 245 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
249 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | 246 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y |
247 | CONFIG_IOREMAP_FIXED=y | ||
248 | CONFIG_UNCACHED_MAPPING=y | ||
250 | CONFIG_PAGE_SIZE_4KB=y | 249 | CONFIG_PAGE_SIZE_4KB=y |
251 | # CONFIG_PAGE_SIZE_8KB is not set | 250 | # CONFIG_PAGE_SIZE_8KB is not set |
252 | # CONFIG_PAGE_SIZE_16KB is not set | 251 | # CONFIG_PAGE_SIZE_16KB is not set |
@@ -262,7 +261,7 @@ CONFIG_PAGEFLAGS_EXTENDED=y | |||
262 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 261 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
263 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 262 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
264 | CONFIG_ZONE_DMA_FLAG=0 | 263 | CONFIG_ZONE_DMA_FLAG=0 |
265 | CONFIG_NR_QUICK=2 | 264 | CONFIG_NR_QUICK=1 |
266 | # CONFIG_KSM is not set | 265 | # CONFIG_KSM is not set |
267 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | 266 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 |
268 | 267 | ||
@@ -337,7 +336,6 @@ CONFIG_SECCOMP=y | |||
337 | # CONFIG_PREEMPT_VOLUNTARY is not set | 336 | # CONFIG_PREEMPT_VOLUNTARY is not set |
338 | CONFIG_PREEMPT=y | 337 | CONFIG_PREEMPT=y |
339 | CONFIG_GUSA=y | 338 | CONFIG_GUSA=y |
340 | # CONFIG_SPARSE_IRQ is not set | ||
341 | 339 | ||
342 | # | 340 | # |
343 | # Boot options | 341 | # Boot options |
@@ -347,7 +345,7 @@ CONFIG_BOOT_LINK_OFFSET=0x00800000 | |||
347 | CONFIG_ENTRY_OFFSET=0x00001000 | 345 | CONFIG_ENTRY_OFFSET=0x00001000 |
348 | CONFIG_CMDLINE_OVERWRITE=y | 346 | CONFIG_CMDLINE_OVERWRITE=y |
349 | # CONFIG_CMDLINE_EXTEND is not set | 347 | # CONFIG_CMDLINE_EXTEND is not set |
350 | CONFIG_CMDLINE="console=tty0, console=ttySC0,115200 root=/dev/nfs ip=dhcp mem=120M memchunk.vpu=4m" | 348 | CONFIG_CMDLINE="console=tty0, console=ttySC0,115200 root=/dev/nfs ip=dhcp mem=248M memchunk.vpu=8m memchunk.veu0=4m" |
351 | 349 | ||
352 | # | 350 | # |
353 | # Bus options | 351 | # Bus options |
@@ -373,6 +371,7 @@ CONFIG_SUSPEND=y | |||
373 | CONFIG_SUSPEND_FREEZER=y | 371 | CONFIG_SUSPEND_FREEZER=y |
374 | # CONFIG_HIBERNATION is not set | 372 | # CONFIG_HIBERNATION is not set |
375 | CONFIG_PM_RUNTIME=y | 373 | CONFIG_PM_RUNTIME=y |
374 | CONFIG_PM_OPS=y | ||
376 | # CONFIG_CPU_IDLE is not set | 375 | # CONFIG_CPU_IDLE is not set |
377 | CONFIG_NET=y | 376 | CONFIG_NET=y |
378 | 377 | ||
@@ -380,7 +379,6 @@ CONFIG_NET=y | |||
380 | # Networking options | 379 | # Networking options |
381 | # | 380 | # |
382 | CONFIG_PACKET=y | 381 | CONFIG_PACKET=y |
383 | # CONFIG_PACKET_MMAP is not set | ||
384 | CONFIG_UNIX=y | 382 | CONFIG_UNIX=y |
385 | # CONFIG_NET_KEY is not set | 383 | # CONFIG_NET_KEY is not set |
386 | CONFIG_INET=y | 384 | CONFIG_INET=y |
@@ -445,7 +443,45 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
445 | # CONFIG_NET_PKTGEN is not set | 443 | # CONFIG_NET_PKTGEN is not set |
446 | # CONFIG_HAMRADIO is not set | 444 | # CONFIG_HAMRADIO is not set |
447 | # CONFIG_CAN is not set | 445 | # CONFIG_CAN is not set |
448 | # CONFIG_IRDA is not set | 446 | CONFIG_IRDA=y |
447 | |||
448 | # | ||
449 | # IrDA protocols | ||
450 | # | ||
451 | # CONFIG_IRLAN is not set | ||
452 | # CONFIG_IRCOMM is not set | ||
453 | # CONFIG_IRDA_ULTRA is not set | ||
454 | |||
455 | # | ||
456 | # IrDA options | ||
457 | # | ||
458 | # CONFIG_IRDA_CACHE_LAST_LSAP is not set | ||
459 | # CONFIG_IRDA_FAST_RR is not set | ||
460 | # CONFIG_IRDA_DEBUG is not set | ||
461 | |||
462 | # | ||
463 | # Infrared-port device drivers | ||
464 | # | ||
465 | |||
466 | # | ||
467 | # SIR device drivers | ||
468 | # | ||
469 | # CONFIG_IRTTY_SIR is not set | ||
470 | |||
471 | # | ||
472 | # Dongle support | ||
473 | # | ||
474 | CONFIG_SH_SIR=y | ||
475 | # CONFIG_KINGSUN_DONGLE is not set | ||
476 | # CONFIG_KSDAZZLE_DONGLE is not set | ||
477 | # CONFIG_KS959_DONGLE is not set | ||
478 | |||
479 | # | ||
480 | # FIR device drivers | ||
481 | # | ||
482 | # CONFIG_USB_IRDA is not set | ||
483 | # CONFIG_SIGMATEL_FIR is not set | ||
484 | # CONFIG_MCS_FIR is not set | ||
449 | # CONFIG_BT is not set | 485 | # CONFIG_BT is not set |
450 | # CONFIG_AF_RXRPC is not set | 486 | # CONFIG_AF_RXRPC is not set |
451 | CONFIG_WIRELESS=y | 487 | CONFIG_WIRELESS=y |
@@ -556,6 +592,7 @@ CONFIG_MTD_NAND_IDS=y | |||
556 | # CONFIG_MTD_NAND_NANDSIM is not set | 592 | # CONFIG_MTD_NAND_NANDSIM is not set |
557 | # CONFIG_MTD_NAND_PLATFORM is not set | 593 | # CONFIG_MTD_NAND_PLATFORM is not set |
558 | # CONFIG_MTD_ALAUDA is not set | 594 | # CONFIG_MTD_ALAUDA is not set |
595 | # CONFIG_MTD_NAND_SH_FLCTL is not set | ||
559 | # CONFIG_MTD_ONENAND is not set | 596 | # CONFIG_MTD_ONENAND is not set |
560 | 597 | ||
561 | # | 598 | # |
@@ -597,6 +634,7 @@ CONFIG_MISC_DEVICES=y | |||
597 | # CONFIG_ICS932S401 is not set | 634 | # CONFIG_ICS932S401 is not set |
598 | # CONFIG_ENCLOSURE_SERVICES is not set | 635 | # CONFIG_ENCLOSURE_SERVICES is not set |
599 | # CONFIG_ISL29003 is not set | 636 | # CONFIG_ISL29003 is not set |
637 | # CONFIG_SENSORS_TSL2550 is not set | ||
600 | # CONFIG_DS1682 is not set | 638 | # CONFIG_DS1682 is not set |
601 | # CONFIG_TI_DAC7512 is not set | 639 | # CONFIG_TI_DAC7512 is not set |
602 | # CONFIG_C2PORT is not set | 640 | # CONFIG_C2PORT is not set |
@@ -616,6 +654,7 @@ CONFIG_HAVE_IDE=y | |||
616 | # | 654 | # |
617 | # SCSI device support | 655 | # SCSI device support |
618 | # | 656 | # |
657 | CONFIG_SCSI_MOD=y | ||
619 | # CONFIG_RAID_ATTRS is not set | 658 | # CONFIG_RAID_ATTRS is not set |
620 | CONFIG_SCSI=y | 659 | CONFIG_SCSI=y |
621 | CONFIG_SCSI_DMA=y | 660 | CONFIG_SCSI_DMA=y |
@@ -768,7 +807,29 @@ CONFIG_KEYBOARD_SH_KEYSC=y | |||
768 | # CONFIG_INPUT_MOUSE is not set | 807 | # CONFIG_INPUT_MOUSE is not set |
769 | # CONFIG_INPUT_JOYSTICK is not set | 808 | # CONFIG_INPUT_JOYSTICK is not set |
770 | # CONFIG_INPUT_TABLET is not set | 809 | # CONFIG_INPUT_TABLET is not set |
771 | # CONFIG_INPUT_TOUCHSCREEN is not set | 810 | CONFIG_INPUT_TOUCHSCREEN=y |
811 | # CONFIG_TOUCHSCREEN_ADS7846 is not set | ||
812 | # CONFIG_TOUCHSCREEN_AD7877 is not set | ||
813 | # CONFIG_TOUCHSCREEN_AD7879_I2C is not set | ||
814 | # CONFIG_TOUCHSCREEN_AD7879_SPI is not set | ||
815 | # CONFIG_TOUCHSCREEN_AD7879 is not set | ||
816 | # CONFIG_TOUCHSCREEN_DYNAPRO is not set | ||
817 | # CONFIG_TOUCHSCREEN_EETI is not set | ||
818 | # CONFIG_TOUCHSCREEN_FUJITSU is not set | ||
819 | # CONFIG_TOUCHSCREEN_GUNZE is not set | ||
820 | # CONFIG_TOUCHSCREEN_ELO is not set | ||
821 | # CONFIG_TOUCHSCREEN_WACOM_W8001 is not set | ||
822 | # CONFIG_TOUCHSCREEN_MCS5000 is not set | ||
823 | # CONFIG_TOUCHSCREEN_MTOUCH is not set | ||
824 | # CONFIG_TOUCHSCREEN_INEXIO is not set | ||
825 | # CONFIG_TOUCHSCREEN_MK712 is not set | ||
826 | # CONFIG_TOUCHSCREEN_PENMOUNT is not set | ||
827 | # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set | ||
828 | # CONFIG_TOUCHSCREEN_TOUCHWIN is not set | ||
829 | # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set | ||
830 | # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set | ||
831 | CONFIG_TOUCHSCREEN_TSC2007=y | ||
832 | # CONFIG_TOUCHSCREEN_W90X900 is not set | ||
772 | # CONFIG_INPUT_MISC is not set | 833 | # CONFIG_INPUT_MISC is not set |
773 | 834 | ||
774 | # | 835 | # |
@@ -802,10 +863,10 @@ CONFIG_SERIAL_SH_SCI_NR_UARTS=6 | |||
802 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | 863 | CONFIG_SERIAL_SH_SCI_CONSOLE=y |
803 | CONFIG_SERIAL_CORE=y | 864 | CONFIG_SERIAL_CORE=y |
804 | CONFIG_SERIAL_CORE_CONSOLE=y | 865 | CONFIG_SERIAL_CORE_CONSOLE=y |
866 | # CONFIG_SERIAL_TIMBERDALE is not set | ||
805 | CONFIG_UNIX98_PTYS=y | 867 | CONFIG_UNIX98_PTYS=y |
806 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | 868 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set |
807 | CONFIG_LEGACY_PTYS=y | 869 | # CONFIG_LEGACY_PTYS is not set |
808 | CONFIG_LEGACY_PTY_COUNT=256 | ||
809 | # CONFIG_IPMI_HANDLER is not set | 870 | # CONFIG_IPMI_HANDLER is not set |
810 | CONFIG_HW_RANDOM=y | 871 | CONFIG_HW_RANDOM=y |
811 | # CONFIG_HW_RANDOM_TIMERIOMEM is not set | 872 | # CONFIG_HW_RANDOM_TIMERIOMEM is not set |
@@ -830,6 +891,7 @@ CONFIG_I2C_HELPER_AUTO=y | |||
830 | # CONFIG_I2C_OCORES is not set | 891 | # CONFIG_I2C_OCORES is not set |
831 | CONFIG_I2C_SH_MOBILE=y | 892 | CONFIG_I2C_SH_MOBILE=y |
832 | # CONFIG_I2C_SIMTEC is not set | 893 | # CONFIG_I2C_SIMTEC is not set |
894 | # CONFIG_I2C_XILINX is not set | ||
833 | 895 | ||
834 | # | 896 | # |
835 | # External I2C/SMBus adapter drivers | 897 | # External I2C/SMBus adapter drivers |
@@ -843,15 +905,9 @@ CONFIG_I2C_SH_MOBILE=y | |||
843 | # | 905 | # |
844 | # CONFIG_I2C_PCA_PLATFORM is not set | 906 | # CONFIG_I2C_PCA_PLATFORM is not set |
845 | # CONFIG_I2C_STUB is not set | 907 | # CONFIG_I2C_STUB is not set |
846 | |||
847 | # | ||
848 | # Miscellaneous I2C Chip support | ||
849 | # | ||
850 | # CONFIG_SENSORS_TSL2550 is not set | ||
851 | # CONFIG_I2C_DEBUG_CORE is not set | 908 | # CONFIG_I2C_DEBUG_CORE is not set |
852 | # CONFIG_I2C_DEBUG_ALGO is not set | 909 | # CONFIG_I2C_DEBUG_ALGO is not set |
853 | # CONFIG_I2C_DEBUG_BUS is not set | 910 | # CONFIG_I2C_DEBUG_BUS is not set |
854 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
855 | CONFIG_SPI=y | 911 | CONFIG_SPI=y |
856 | CONFIG_SPI_MASTER=y | 912 | CONFIG_SPI_MASTER=y |
857 | 913 | ||
@@ -882,13 +938,16 @@ CONFIG_GPIOLIB=y | |||
882 | # | 938 | # |
883 | # Memory mapped GPIO expanders: | 939 | # Memory mapped GPIO expanders: |
884 | # | 940 | # |
941 | # CONFIG_GPIO_IT8761E is not set | ||
885 | 942 | ||
886 | # | 943 | # |
887 | # I2C GPIO expanders: | 944 | # I2C GPIO expanders: |
888 | # | 945 | # |
946 | # CONFIG_GPIO_MAX7300 is not set | ||
889 | # CONFIG_GPIO_MAX732X is not set | 947 | # CONFIG_GPIO_MAX732X is not set |
890 | # CONFIG_GPIO_PCA953X is not set | 948 | # CONFIG_GPIO_PCA953X is not set |
891 | # CONFIG_GPIO_PCF857X is not set | 949 | # CONFIG_GPIO_PCF857X is not set |
950 | # CONFIG_GPIO_ADP5588 is not set | ||
892 | 951 | ||
893 | # | 952 | # |
894 | # PCI GPIO expanders: | 953 | # PCI GPIO expanders: |
@@ -919,23 +978,26 @@ CONFIG_SSB_POSSIBLE=y | |||
919 | # | 978 | # |
920 | # Multifunction device drivers | 979 | # Multifunction device drivers |
921 | # | 980 | # |
922 | # CONFIG_MFD_CORE is not set | 981 | CONFIG_MFD_CORE=y |
982 | # CONFIG_MFD_88PM860X is not set | ||
923 | # CONFIG_MFD_SM501 is not set | 983 | # CONFIG_MFD_SM501 is not set |
924 | # CONFIG_MFD_SH_MOBILE_SDHI is not set | 984 | CONFIG_MFD_SH_MOBILE_SDHI=y |
925 | # CONFIG_HTC_PASIC3 is not set | 985 | # CONFIG_HTC_PASIC3 is not set |
986 | # CONFIG_HTC_I2CPLD is not set | ||
926 | # CONFIG_TPS65010 is not set | 987 | # CONFIG_TPS65010 is not set |
927 | # CONFIG_TWL4030_CORE is not set | 988 | # CONFIG_TWL4030_CORE is not set |
928 | # CONFIG_MFD_TMIO is not set | 989 | # CONFIG_MFD_TMIO is not set |
929 | # CONFIG_PMIC_DA903X is not set | 990 | # CONFIG_PMIC_DA903X is not set |
930 | # CONFIG_PMIC_ADP5520 is not set | 991 | # CONFIG_PMIC_ADP5520 is not set |
992 | # CONFIG_MFD_MAX8925 is not set | ||
931 | # CONFIG_MFD_WM8400 is not set | 993 | # CONFIG_MFD_WM8400 is not set |
932 | # CONFIG_MFD_WM831X is not set | 994 | # CONFIG_MFD_WM831X is not set |
933 | # CONFIG_MFD_WM8350_I2C is not set | 995 | # CONFIG_MFD_WM8350_I2C is not set |
996 | # CONFIG_MFD_WM8994 is not set | ||
934 | # CONFIG_MFD_PCF50633 is not set | 997 | # CONFIG_MFD_PCF50633 is not set |
935 | # CONFIG_MFD_MC13783 is not set | 998 | # CONFIG_MFD_MC13783 is not set |
936 | # CONFIG_AB3100_CORE is not set | 999 | # CONFIG_AB3100_CORE is not set |
937 | # CONFIG_EZX_PCAP is not set | 1000 | # CONFIG_EZX_PCAP is not set |
938 | # CONFIG_MFD_88PM8607 is not set | ||
939 | # CONFIG_AB4500_CORE is not set | 1001 | # CONFIG_AB4500_CORE is not set |
940 | # CONFIG_REGULATOR is not set | 1002 | # CONFIG_REGULATOR is not set |
941 | CONFIG_MEDIA_SUPPORT=y | 1003 | CONFIG_MEDIA_SUPPORT=y |
@@ -985,10 +1047,10 @@ CONFIG_SOC_CAMERA=y | |||
985 | # CONFIG_SOC_CAMERA_MT9M001 is not set | 1047 | # CONFIG_SOC_CAMERA_MT9M001 is not set |
986 | # CONFIG_SOC_CAMERA_MT9M111 is not set | 1048 | # CONFIG_SOC_CAMERA_MT9M111 is not set |
987 | # CONFIG_SOC_CAMERA_MT9T031 is not set | 1049 | # CONFIG_SOC_CAMERA_MT9T031 is not set |
988 | # CONFIG_SOC_CAMERA_MT9T112 is not set | 1050 | CONFIG_SOC_CAMERA_MT9T112=y |
989 | # CONFIG_SOC_CAMERA_MT9V022 is not set | 1051 | # CONFIG_SOC_CAMERA_MT9V022 is not set |
990 | # CONFIG_SOC_CAMERA_RJ54N1 is not set | 1052 | # CONFIG_SOC_CAMERA_RJ54N1 is not set |
991 | # CONFIG_SOC_CAMERA_TW9910 is not set | 1053 | CONFIG_SOC_CAMERA_TW9910=y |
992 | # CONFIG_SOC_CAMERA_PLATFORM is not set | 1054 | # CONFIG_SOC_CAMERA_PLATFORM is not set |
993 | # CONFIG_SOC_CAMERA_OV772X is not set | 1055 | # CONFIG_SOC_CAMERA_OV772X is not set |
994 | # CONFIG_SOC_CAMERA_OV9640 is not set | 1056 | # CONFIG_SOC_CAMERA_OV9640 is not set |
@@ -1001,6 +1063,7 @@ CONFIG_RADIO_ADAPTERS=y | |||
1001 | # CONFIG_RADIO_SI470X is not set | 1063 | # CONFIG_RADIO_SI470X is not set |
1002 | # CONFIG_USB_MR800 is not set | 1064 | # CONFIG_USB_MR800 is not set |
1003 | # CONFIG_RADIO_TEA5764 is not set | 1065 | # CONFIG_RADIO_TEA5764 is not set |
1066 | # CONFIG_RADIO_SAA7706H is not set | ||
1004 | # CONFIG_RADIO_TEF6862 is not set | 1067 | # CONFIG_RADIO_TEF6862 is not set |
1005 | # CONFIG_DAB is not set | 1068 | # CONFIG_DAB is not set |
1006 | 1069 | ||
@@ -1034,6 +1097,7 @@ CONFIG_FB_DEFERRED_IO=y | |||
1034 | # | 1097 | # |
1035 | # CONFIG_FB_S1D13XXX is not set | 1098 | # CONFIG_FB_S1D13XXX is not set |
1036 | CONFIG_FB_SH_MOBILE_LCDC=y | 1099 | CONFIG_FB_SH_MOBILE_LCDC=y |
1100 | # CONFIG_FB_TMIO is not set | ||
1037 | # CONFIG_FB_VIRTUAL is not set | 1101 | # CONFIG_FB_VIRTUAL is not set |
1038 | # CONFIG_FB_METRONOME is not set | 1102 | # CONFIG_FB_METRONOME is not set |
1039 | # CONFIG_FB_MB862XX is not set | 1103 | # CONFIG_FB_MB862XX is not set |
@@ -1062,7 +1126,46 @@ CONFIG_LOGO=y | |||
1062 | # CONFIG_LOGO_SUPERH_MONO is not set | 1126 | # CONFIG_LOGO_SUPERH_MONO is not set |
1063 | # CONFIG_LOGO_SUPERH_VGA16 is not set | 1127 | # CONFIG_LOGO_SUPERH_VGA16 is not set |
1064 | CONFIG_LOGO_SUPERH_CLUT224=y | 1128 | CONFIG_LOGO_SUPERH_CLUT224=y |
1065 | # CONFIG_SOUND is not set | 1129 | CONFIG_SOUND=y |
1130 | CONFIG_SOUND_OSS_CORE=y | ||
1131 | CONFIG_SOUND_OSS_CORE_PRECLAIM=y | ||
1132 | CONFIG_SND=y | ||
1133 | CONFIG_SND_TIMER=y | ||
1134 | CONFIG_SND_PCM=y | ||
1135 | CONFIG_SND_JACK=y | ||
1136 | CONFIG_SND_SEQUENCER=y | ||
1137 | CONFIG_SND_SEQ_DUMMY=y | ||
1138 | CONFIG_SND_OSSEMUL=y | ||
1139 | CONFIG_SND_MIXER_OSS=y | ||
1140 | CONFIG_SND_PCM_OSS=y | ||
1141 | CONFIG_SND_PCM_OSS_PLUGINS=y | ||
1142 | # CONFIG_SND_SEQUENCER_OSS is not set | ||
1143 | # CONFIG_SND_DYNAMIC_MINORS is not set | ||
1144 | CONFIG_SND_SUPPORT_OLD_API=y | ||
1145 | CONFIG_SND_VERBOSE_PROCFS=y | ||
1146 | # CONFIG_SND_VERBOSE_PRINTK is not set | ||
1147 | # CONFIG_SND_DEBUG is not set | ||
1148 | # CONFIG_SND_RAWMIDI_SEQ is not set | ||
1149 | # CONFIG_SND_OPL3_LIB_SEQ is not set | ||
1150 | # CONFIG_SND_OPL4_LIB_SEQ is not set | ||
1151 | # CONFIG_SND_SBAWE_SEQ is not set | ||
1152 | # CONFIG_SND_EMU10K1_SEQ is not set | ||
1153 | # CONFIG_SND_DRIVERS is not set | ||
1154 | # CONFIG_SND_SPI is not set | ||
1155 | CONFIG_SND_SUPERH=y | ||
1156 | # CONFIG_SND_USB is not set | ||
1157 | CONFIG_SND_SOC=y | ||
1158 | |||
1159 | # | ||
1160 | # SoC Audio support for SuperH | ||
1161 | # | ||
1162 | CONFIG_SND_SOC_SH4_FSI=y | ||
1163 | # CONFIG_SND_FSI_AK4642 is not set | ||
1164 | CONFIG_SND_FSI_DA7210=y | ||
1165 | CONFIG_SND_SOC_I2C_AND_SPI=y | ||
1166 | # CONFIG_SND_SOC_ALL_CODECS is not set | ||
1167 | CONFIG_SND_SOC_DA7210=y | ||
1168 | # CONFIG_SOUND_PRIME is not set | ||
1066 | CONFIG_HID_SUPPORT=y | 1169 | CONFIG_HID_SUPPORT=y |
1067 | CONFIG_HID=y | 1170 | CONFIG_HID=y |
1068 | # CONFIG_HIDRAW is not set | 1171 | # CONFIG_HIDRAW is not set |
@@ -1077,6 +1180,7 @@ CONFIG_USB_HID=y | |||
1077 | # | 1180 | # |
1078 | # Special HID drivers | 1181 | # Special HID drivers |
1079 | # | 1182 | # |
1183 | # CONFIG_HID_3M_PCT is not set | ||
1080 | # CONFIG_HID_A4TECH is not set | 1184 | # CONFIG_HID_A4TECH is not set |
1081 | # CONFIG_HID_APPLE is not set | 1185 | # CONFIG_HID_APPLE is not set |
1082 | # CONFIG_HID_BELKIN is not set | 1186 | # CONFIG_HID_BELKIN is not set |
@@ -1091,12 +1195,16 @@ CONFIG_USB_HID=y | |||
1091 | # CONFIG_HID_KENSINGTON is not set | 1195 | # CONFIG_HID_KENSINGTON is not set |
1092 | # CONFIG_HID_LOGITECH is not set | 1196 | # CONFIG_HID_LOGITECH is not set |
1093 | # CONFIG_HID_MICROSOFT is not set | 1197 | # CONFIG_HID_MICROSOFT is not set |
1198 | # CONFIG_HID_MOSART is not set | ||
1094 | # CONFIG_HID_MONTEREY is not set | 1199 | # CONFIG_HID_MONTEREY is not set |
1095 | # CONFIG_HID_NTRIG is not set | 1200 | # CONFIG_HID_NTRIG is not set |
1201 | # CONFIG_HID_ORTEK is not set | ||
1096 | # CONFIG_HID_PANTHERLORD is not set | 1202 | # CONFIG_HID_PANTHERLORD is not set |
1097 | # CONFIG_HID_PETALYNX is not set | 1203 | # CONFIG_HID_PETALYNX is not set |
1204 | # CONFIG_HID_QUANTA is not set | ||
1098 | # CONFIG_HID_SAMSUNG is not set | 1205 | # CONFIG_HID_SAMSUNG is not set |
1099 | # CONFIG_HID_SONY is not set | 1206 | # CONFIG_HID_SONY is not set |
1207 | # CONFIG_HID_STANTUM is not set | ||
1100 | # CONFIG_HID_SUNPLUS is not set | 1208 | # CONFIG_HID_SUNPLUS is not set |
1101 | # CONFIG_HID_GREENASIA is not set | 1209 | # CONFIG_HID_GREENASIA is not set |
1102 | # CONFIG_HID_SMARTJOYPLUS is not set | 1210 | # CONFIG_HID_SMARTJOYPLUS is not set |
@@ -1136,6 +1244,7 @@ CONFIG_USB_MON=y | |||
1136 | # CONFIG_USB_SL811_HCD is not set | 1244 | # CONFIG_USB_SL811_HCD is not set |
1137 | CONFIG_USB_R8A66597_HCD=y | 1245 | CONFIG_USB_R8A66597_HCD=y |
1138 | # CONFIG_USB_HWA_HCD is not set | 1246 | # CONFIG_USB_HWA_HCD is not set |
1247 | # CONFIG_USB_GADGET_MUSB_HDRC is not set | ||
1139 | 1248 | ||
1140 | # | 1249 | # |
1141 | # USB Device Class drivers | 1250 | # USB Device Class drivers |
@@ -1188,7 +1297,6 @@ CONFIG_USB_STORAGE=y | |||
1188 | # CONFIG_USB_RIO500 is not set | 1297 | # CONFIG_USB_RIO500 is not set |
1189 | # CONFIG_USB_LEGOTOWER is not set | 1298 | # CONFIG_USB_LEGOTOWER is not set |
1190 | # CONFIG_USB_LCD is not set | 1299 | # CONFIG_USB_LCD is not set |
1191 | # CONFIG_USB_BERRY_CHARGE is not set | ||
1192 | # CONFIG_USB_LED is not set | 1300 | # CONFIG_USB_LED is not set |
1193 | # CONFIG_USB_CYPRESS_CY7C63 is not set | 1301 | # CONFIG_USB_CYPRESS_CY7C63 is not set |
1194 | # CONFIG_USB_CYTHERM is not set | 1302 | # CONFIG_USB_CYTHERM is not set |
@@ -1200,8 +1308,45 @@ CONFIG_USB_STORAGE=y | |||
1200 | # CONFIG_USB_IOWARRIOR is not set | 1308 | # CONFIG_USB_IOWARRIOR is not set |
1201 | # CONFIG_USB_TEST is not set | 1309 | # CONFIG_USB_TEST is not set |
1202 | # CONFIG_USB_ISIGHTFW is not set | 1310 | # CONFIG_USB_ISIGHTFW is not set |
1203 | # CONFIG_USB_VST is not set | 1311 | CONFIG_USB_GADGET=y |
1204 | # CONFIG_USB_GADGET is not set | 1312 | # CONFIG_USB_GADGET_DEBUG_FILES is not set |
1313 | # CONFIG_USB_GADGET_DEBUG_FS is not set | ||
1314 | CONFIG_USB_GADGET_VBUS_DRAW=2 | ||
1315 | CONFIG_USB_GADGET_SELECTED=y | ||
1316 | # CONFIG_USB_GADGET_AT91 is not set | ||
1317 | # CONFIG_USB_GADGET_ATMEL_USBA is not set | ||
1318 | # CONFIG_USB_GADGET_FSL_USB2 is not set | ||
1319 | # CONFIG_USB_GADGET_LH7A40X is not set | ||
1320 | # CONFIG_USB_GADGET_OMAP is not set | ||
1321 | # CONFIG_USB_GADGET_PXA25X is not set | ||
1322 | CONFIG_USB_GADGET_R8A66597=y | ||
1323 | CONFIG_USB_R8A66597=y | ||
1324 | # CONFIG_USB_GADGET_PXA27X is not set | ||
1325 | # CONFIG_USB_GADGET_S3C_HSOTG is not set | ||
1326 | # CONFIG_USB_GADGET_IMX is not set | ||
1327 | # CONFIG_USB_GADGET_S3C2410 is not set | ||
1328 | # CONFIG_USB_GADGET_M66592 is not set | ||
1329 | # CONFIG_USB_GADGET_AMD5536UDC is not set | ||
1330 | # CONFIG_USB_GADGET_FSL_QE is not set | ||
1331 | # CONFIG_USB_GADGET_CI13XXX is not set | ||
1332 | # CONFIG_USB_GADGET_NET2280 is not set | ||
1333 | # CONFIG_USB_GADGET_GOKU is not set | ||
1334 | # CONFIG_USB_GADGET_LANGWELL is not set | ||
1335 | # CONFIG_USB_GADGET_DUMMY_HCD is not set | ||
1336 | CONFIG_USB_GADGET_DUALSPEED=y | ||
1337 | # CONFIG_USB_ZERO is not set | ||
1338 | # CONFIG_USB_AUDIO is not set | ||
1339 | # CONFIG_USB_ETH is not set | ||
1340 | # CONFIG_USB_GADGETFS is not set | ||
1341 | CONFIG_USB_FILE_STORAGE=m | ||
1342 | # CONFIG_USB_FILE_STORAGE_TEST is not set | ||
1343 | # CONFIG_USB_MASS_STORAGE is not set | ||
1344 | # CONFIG_USB_G_SERIAL is not set | ||
1345 | # CONFIG_USB_MIDI_GADGET is not set | ||
1346 | # CONFIG_USB_G_PRINTER is not set | ||
1347 | # CONFIG_USB_CDC_COMPOSITE is not set | ||
1348 | # CONFIG_USB_G_NOKIA is not set | ||
1349 | # CONFIG_USB_G_MULTI is not set | ||
1205 | 1350 | ||
1206 | # | 1351 | # |
1207 | # OTG and related infrastructure | 1352 | # OTG and related infrastructure |
@@ -1224,10 +1369,8 @@ CONFIG_MMC_BLOCK_BOUNCE=y | |||
1224 | # MMC/SD/SDIO Host Controller Drivers | 1369 | # MMC/SD/SDIO Host Controller Drivers |
1225 | # | 1370 | # |
1226 | # CONFIG_MMC_SDHCI is not set | 1371 | # CONFIG_MMC_SDHCI is not set |
1227 | # CONFIG_MMC_AT91 is not set | ||
1228 | # CONFIG_MMC_ATMELMCI is not set | ||
1229 | CONFIG_MMC_SPI=y | 1372 | CONFIG_MMC_SPI=y |
1230 | # CONFIG_MMC_TMIO is not set | 1373 | CONFIG_MMC_TMIO=y |
1231 | # CONFIG_MEMSTICK is not set | 1374 | # CONFIG_MEMSTICK is not set |
1232 | # CONFIG_NEW_LEDS is not set | 1375 | # CONFIG_NEW_LEDS is not set |
1233 | # CONFIG_ACCESSIBILITY is not set | 1376 | # CONFIG_ACCESSIBILITY is not set |
@@ -1253,10 +1396,10 @@ CONFIG_RTC_INTF_DEV=y | |||
1253 | # CONFIG_RTC_DRV_DS1374 is not set | 1396 | # CONFIG_RTC_DRV_DS1374 is not set |
1254 | # CONFIG_RTC_DRV_DS1672 is not set | 1397 | # CONFIG_RTC_DRV_DS1672 is not set |
1255 | # CONFIG_RTC_DRV_MAX6900 is not set | 1398 | # CONFIG_RTC_DRV_MAX6900 is not set |
1256 | # CONFIG_RTC_DRV_RS5C372 is not set | 1399 | CONFIG_RTC_DRV_RS5C372=y |
1257 | # CONFIG_RTC_DRV_ISL1208 is not set | 1400 | # CONFIG_RTC_DRV_ISL1208 is not set |
1258 | # CONFIG_RTC_DRV_X1205 is not set | 1401 | # CONFIG_RTC_DRV_X1205 is not set |
1259 | CONFIG_RTC_DRV_PCF8563=y | 1402 | # CONFIG_RTC_DRV_PCF8563 is not set |
1260 | # CONFIG_RTC_DRV_PCF8583 is not set | 1403 | # CONFIG_RTC_DRV_PCF8583 is not set |
1261 | # CONFIG_RTC_DRV_M41T80 is not set | 1404 | # CONFIG_RTC_DRV_M41T80 is not set |
1262 | # CONFIG_RTC_DRV_BQ32K is not set | 1405 | # CONFIG_RTC_DRV_BQ32K is not set |
@@ -1303,8 +1446,6 @@ CONFIG_RTC_DRV_PCF8563=y | |||
1303 | CONFIG_UIO=y | 1446 | CONFIG_UIO=y |
1304 | # CONFIG_UIO_PDRV is not set | 1447 | # CONFIG_UIO_PDRV is not set |
1305 | CONFIG_UIO_PDRV_GENIRQ=y | 1448 | CONFIG_UIO_PDRV_GENIRQ=y |
1306 | # CONFIG_UIO_SMX is not set | ||
1307 | # CONFIG_UIO_SERCOS3 is not set | ||
1308 | 1449 | ||
1309 | # | 1450 | # |
1310 | # TI VLYNQ | 1451 | # TI VLYNQ |
@@ -1390,6 +1531,7 @@ CONFIG_MISC_FILESYSTEMS=y | |||
1390 | # CONFIG_EFS_FS is not set | 1531 | # CONFIG_EFS_FS is not set |
1391 | # CONFIG_JFFS2_FS is not set | 1532 | # CONFIG_JFFS2_FS is not set |
1392 | # CONFIG_UBIFS_FS is not set | 1533 | # CONFIG_UBIFS_FS is not set |
1534 | # CONFIG_LOGFS is not set | ||
1393 | # CONFIG_CRAMFS is not set | 1535 | # CONFIG_CRAMFS is not set |
1394 | # CONFIG_SQUASHFS is not set | 1536 | # CONFIG_SQUASHFS is not set |
1395 | # CONFIG_VXFS_FS is not set | 1537 | # CONFIG_VXFS_FS is not set |
@@ -1418,6 +1560,7 @@ CONFIG_SUNRPC=y | |||
1418 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 1560 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
1419 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 1561 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
1420 | # CONFIG_SMB_FS is not set | 1562 | # CONFIG_SMB_FS is not set |
1563 | # CONFIG_CEPH_FS is not set | ||
1421 | # CONFIG_CIFS is not set | 1564 | # CONFIG_CIFS is not set |
1422 | # CONFIG_NCP_FS is not set | 1565 | # CONFIG_NCP_FS is not set |
1423 | # CONFIG_CODA_FS is not set | 1566 | # CONFIG_CODA_FS is not set |
@@ -1487,6 +1630,7 @@ CONFIG_DEBUG_FS=y | |||
1487 | CONFIG_DEBUG_BUGVERBOSE=y | 1630 | CONFIG_DEBUG_BUGVERBOSE=y |
1488 | # CONFIG_DEBUG_MEMORY_INIT is not set | 1631 | # CONFIG_DEBUG_MEMORY_INIT is not set |
1489 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 1632 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
1633 | # CONFIG_LKDTM is not set | ||
1490 | # CONFIG_LATENCYTOP is not set | 1634 | # CONFIG_LATENCYTOP is not set |
1491 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 1635 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
1492 | CONFIG_HAVE_FUNCTION_TRACER=y | 1636 | CONFIG_HAVE_FUNCTION_TRACER=y |
@@ -1618,7 +1762,7 @@ CONFIG_CRYPTO_HW=y | |||
1618 | # | 1762 | # |
1619 | CONFIG_BITREVERSE=y | 1763 | CONFIG_BITREVERSE=y |
1620 | CONFIG_GENERIC_FIND_LAST_BIT=y | 1764 | CONFIG_GENERIC_FIND_LAST_BIT=y |
1621 | # CONFIG_CRC_CCITT is not set | 1765 | CONFIG_CRC_CCITT=y |
1622 | # CONFIG_CRC16 is not set | 1766 | # CONFIG_CRC16 is not set |
1623 | CONFIG_CRC_T10DIF=y | 1767 | CONFIG_CRC_T10DIF=y |
1624 | CONFIG_CRC_ITU_T=y | 1768 | CONFIG_CRC_ITU_T=y |
diff --git a/arch/sh/drivers/dma/dma-api.c b/arch/sh/drivers/dma/dma-api.c index 727126e907e3..4a277224a871 100644 --- a/arch/sh/drivers/dma/dma-api.c +++ b/arch/sh/drivers/dma/dma-api.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/slab.h> | ||
20 | #include <asm/dma.h> | 21 | #include <asm/dma.h> |
21 | 22 | ||
22 | DEFINE_SPINLOCK(dma_spin_lock); | 23 | DEFINE_SPINLOCK(dma_spin_lock); |
diff --git a/arch/sh/drivers/dma/dmabrg.c b/arch/sh/drivers/dma/dmabrg.c index 72622e307613..6ab9c4a15439 100644 --- a/arch/sh/drivers/dma/dmabrg.c +++ b/arch/sh/drivers/dma/dmabrg.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/interrupt.h> | 9 | #include <linux/interrupt.h> |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/slab.h> | ||
11 | #include <asm/dma.h> | 12 | #include <asm/dma.h> |
12 | #include <asm/dmabrg.h> | 13 | #include <asm/dmabrg.h> |
13 | #include <asm/io.h> | 14 | #include <asm/io.h> |
diff --git a/arch/sh/drivers/heartbeat.c b/arch/sh/drivers/heartbeat.c index 2acbc793032d..7efc9c354fc7 100644 --- a/arch/sh/drivers/heartbeat.c +++ b/arch/sh/drivers/heartbeat.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/slab.h> | ||
27 | #include <asm/heartbeat.h> | 28 | #include <asm/heartbeat.h> |
28 | 29 | ||
29 | #define DRV_NAME "heartbeat" | 30 | #define DRV_NAME "heartbeat" |
diff --git a/arch/sh/drivers/pci/pcie-sh7786.c b/arch/sh/drivers/pci/pcie-sh7786.c index ae91a2dd9183..68cb9b0ac9d2 100644 --- a/arch/sh/drivers/pci/pcie-sh7786.c +++ b/arch/sh/drivers/pci/pcie-sh7786.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
15 | #include <linux/slab.h> | ||
15 | #include "pcie-sh7786.h" | 16 | #include "pcie-sh7786.h" |
16 | #include <asm/sizes.h> | 17 | #include <asm/sizes.h> |
17 | 18 | ||
diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c index 725be6de589b..7b42c247316c 100644 --- a/arch/sh/drivers/push-switch.c +++ b/arch/sh/drivers/push-switch.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * for more details. | 8 | * for more details. |
9 | */ | 9 | */ |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/module.h> | 12 | #include <linux/module.h> |
12 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
13 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
diff --git a/arch/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h index ac04255022b6..ce830faeebbf 100644 --- a/arch/sh/include/asm/elf.h +++ b/arch/sh/include/asm/elf.h | |||
@@ -211,7 +211,9 @@ extern void __kernel_vsyscall; | |||
211 | 211 | ||
212 | #define VSYSCALL_AUX_ENT \ | 212 | #define VSYSCALL_AUX_ENT \ |
213 | if (vdso_enabled) \ | 213 | if (vdso_enabled) \ |
214 | NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); | 214 | NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); \ |
215 | else \ | ||
216 | NEW_AUX_ENT(AT_IGNORE, 0); | ||
215 | #else | 217 | #else |
216 | #define VSYSCALL_AUX_ENT | 218 | #define VSYSCALL_AUX_ENT |
217 | #endif /* CONFIG_VSYSCALL */ | 219 | #endif /* CONFIG_VSYSCALL */ |
@@ -219,7 +221,7 @@ extern void __kernel_vsyscall; | |||
219 | #ifdef CONFIG_SH_FPU | 221 | #ifdef CONFIG_SH_FPU |
220 | #define FPU_AUX_ENT NEW_AUX_ENT(AT_FPUCW, FPSCR_INIT) | 222 | #define FPU_AUX_ENT NEW_AUX_ENT(AT_FPUCW, FPSCR_INIT) |
221 | #else | 223 | #else |
222 | #define FPU_AUX_ENT | 224 | #define FPU_AUX_ENT NEW_AUX_ENT(AT_IGNORE, 0) |
223 | #endif | 225 | #endif |
224 | 226 | ||
225 | extern int l1i_cache_shape, l1d_cache_shape, l2_cache_shape; | 227 | extern int l1i_cache_shape, l1d_cache_shape, l2_cache_shape; |
diff --git a/arch/sh/include/cpu-sh4/cpu/mmu_context.h b/arch/sh/include/cpu-sh4/cpu/mmu_context.h index 03ea75c5315d..5963124c1d4a 100644 --- a/arch/sh/include/cpu-sh4/cpu/mmu_context.h +++ b/arch/sh/include/cpu-sh4/cpu/mmu_context.h | |||
@@ -19,6 +19,8 @@ | |||
19 | 19 | ||
20 | #define MMUCR 0xFF000010 /* MMU Control Register */ | 20 | #define MMUCR 0xFF000010 /* MMU Control Register */ |
21 | 21 | ||
22 | #define MMU_ITLB_ADDRESS_ARRAY 0xF2000000 | ||
23 | #define MMU_ITLB_ADDRESS_ARRAY2 0xF2800000 | ||
22 | #define MMU_UTLB_ADDRESS_ARRAY 0xF6000000 | 24 | #define MMU_UTLB_ADDRESS_ARRAY 0xF6000000 |
23 | #define MMU_UTLB_ADDRESS_ARRAY2 0xF6800000 | 25 | #define MMU_UTLB_ADDRESS_ARRAY2 0xF6800000 |
24 | #define MMU_PAGE_ASSOC_BIT 0x80 | 26 | #define MMU_PAGE_ASSOC_BIT 0x80 |
@@ -28,6 +30,8 @@ | |||
28 | #define MMUCR_URB 0x00FC0000 | 30 | #define MMUCR_URB 0x00FC0000 |
29 | #define MMUCR_URB_SHIFT 18 | 31 | #define MMUCR_URB_SHIFT 18 |
30 | #define MMUCR_URB_NENTRIES 64 | 32 | #define MMUCR_URB_NENTRIES 64 |
33 | #define MMUCR_URC 0x0000FC00 | ||
34 | #define MMUCR_URC_SHIFT 10 | ||
31 | 35 | ||
32 | #if defined(CONFIG_32BIT) && defined(CONFIG_CPU_SUBTYPE_ST40) | 36 | #if defined(CONFIG_32BIT) && defined(CONFIG_CPU_SUBTYPE_ST40) |
33 | #define MMUCR_SE (1 << 4) | 37 | #define MMUCR_SE (1 << 4) |
diff --git a/arch/sh/include/cpu-sh4/cpu/watchdog.h b/arch/sh/include/cpu-sh4/cpu/watchdog.h index 7672301d0c70..7f62b9380938 100644 --- a/arch/sh/include/cpu-sh4/cpu/watchdog.h +++ b/arch/sh/include/cpu-sh4/cpu/watchdog.h | |||
@@ -21,6 +21,12 @@ | |||
21 | #define WTCNT 0xffcc0000 /*WDTST*/ | 21 | #define WTCNT 0xffcc0000 /*WDTST*/ |
22 | #define WTST WTCNT | 22 | #define WTST WTCNT |
23 | #define WTBST 0xffcc0008 /*WDTBST*/ | 23 | #define WTBST 0xffcc0008 /*WDTBST*/ |
24 | /* Register definitions */ | ||
25 | #elif defined(CONFIG_CPU_SUBTYPE_SH7722) || \ | ||
26 | defined(CONFIG_CPU_SUBTYPE_SH7723) || \ | ||
27 | defined(CONFIG_CPU_SUBTYPE_SH7724) | ||
28 | #define WTCNT 0xa4520000 | ||
29 | #define WTCSR 0xa4520004 | ||
24 | #else | 30 | #else |
25 | /* Register definitions */ | 31 | /* Register definitions */ |
26 | #define WTCNT 0xffc00008 | 32 | #define WTCNT 0xffc00008 |
diff --git a/arch/sh/kernel/cpu/fpu.c b/arch/sh/kernel/cpu/fpu.c index f059ed62cf57..7f1b70cace35 100644 --- a/arch/sh/kernel/cpu/fpu.c +++ b/arch/sh/kernel/cpu/fpu.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/sched.h> | 1 | #include <linux/sched.h> |
2 | #include <linux/slab.h> | ||
2 | #include <asm/processor.h> | 3 | #include <asm/processor.h> |
3 | #include <asm/fpu.h> | 4 | #include <asm/fpu.h> |
4 | 5 | ||
diff --git a/arch/sh/kernel/cpu/hwblk.c b/arch/sh/kernel/cpu/hwblk.c index c0ad7d46e784..67a1e811cfe8 100644 --- a/arch/sh/kernel/cpu/hwblk.c +++ b/arch/sh/kernel/cpu/hwblk.c | |||
@@ -1,6 +1,5 @@ | |||
1 | #include <linux/clk.h> | 1 | #include <linux/clk.h> |
2 | #include <linux/compiler.h> | 2 | #include <linux/compiler.h> |
3 | #include <linux/slab.h> | ||
4 | #include <linux/io.h> | 3 | #include <linux/io.h> |
5 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
6 | #include <asm/suspend.h> | 5 | #include <asm/suspend.h> |
diff --git a/arch/sh/kernel/cpufreq.c b/arch/sh/kernel/cpufreq.c index dce4f3ff0932..0fffacea6ed9 100644 --- a/arch/sh/kernel/cpufreq.c +++ b/arch/sh/kernel/cpufreq.c | |||
@@ -48,7 +48,7 @@ static int sh_cpufreq_target(struct cpufreq_policy *policy, | |||
48 | return -ENODEV; | 48 | return -ENODEV; |
49 | 49 | ||
50 | cpus_allowed = current->cpus_allowed; | 50 | cpus_allowed = current->cpus_allowed; |
51 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 51 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
52 | 52 | ||
53 | BUG_ON(smp_processor_id() != cpu); | 53 | BUG_ON(smp_processor_id() != cpu); |
54 | 54 | ||
@@ -66,7 +66,7 @@ static int sh_cpufreq_target(struct cpufreq_policy *policy, | |||
66 | freqs.flags = 0; | 66 | freqs.flags = 0; |
67 | 67 | ||
68 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 68 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
69 | set_cpus_allowed(current, cpus_allowed); | 69 | set_cpus_allowed_ptr(current, &cpus_allowed); |
70 | clk_set_rate(cpuclk, freq); | 70 | clk_set_rate(cpuclk, freq); |
71 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 71 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
72 | 72 | ||
diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index bd1c497280a6..a8234b2010d1 100644 --- a/arch/sh/kernel/dwarf.c +++ b/arch/sh/kernel/dwarf.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/elf.h> | 23 | #include <linux/elf.h> |
24 | #include <linux/ftrace.h> | 24 | #include <linux/ftrace.h> |
25 | #include <linux/slab.h> | ||
25 | #include <asm/dwarf.h> | 26 | #include <asm/dwarf.h> |
26 | #include <asm/unwinder.h> | 27 | #include <asm/unwinder.h> |
27 | #include <asm/sections.h> | 28 | #include <asm/sections.h> |
@@ -727,7 +728,7 @@ static int dwarf_parse_cie(void *entry, void *p, unsigned long len, | |||
727 | unsigned char *end, struct module *mod) | 728 | unsigned char *end, struct module *mod) |
728 | { | 729 | { |
729 | struct rb_node **rb_node = &cie_root.rb_node; | 730 | struct rb_node **rb_node = &cie_root.rb_node; |
730 | struct rb_node *parent; | 731 | struct rb_node *parent = *rb_node; |
731 | struct dwarf_cie *cie; | 732 | struct dwarf_cie *cie; |
732 | unsigned long flags; | 733 | unsigned long flags; |
733 | int count; | 734 | int count; |
@@ -856,7 +857,7 @@ static int dwarf_parse_fde(void *entry, u32 entry_type, | |||
856 | unsigned char *end, struct module *mod) | 857 | unsigned char *end, struct module *mod) |
857 | { | 858 | { |
858 | struct rb_node **rb_node = &fde_root.rb_node; | 859 | struct rb_node **rb_node = &fde_root.rb_node; |
859 | struct rb_node *parent; | 860 | struct rb_node *parent = *rb_node; |
860 | struct dwarf_fde *fde; | 861 | struct dwarf_fde *fde; |
861 | struct dwarf_cie *cie; | 862 | struct dwarf_cie *cie; |
862 | unsigned long flags; | 863 | unsigned long flags; |
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c index 0fd7b41f0a22..273f890b17ae 100644 --- a/arch/sh/kernel/idle.c +++ b/arch/sh/kernel/idle.c | |||
@@ -112,7 +112,7 @@ void cpu_idle(void) | |||
112 | } | 112 | } |
113 | } | 113 | } |
114 | 114 | ||
115 | void __cpuinit select_idle_routine(void) | 115 | void __init select_idle_routine(void) |
116 | { | 116 | { |
117 | /* | 117 | /* |
118 | * If a platform has set its own idle routine, leave it alone. | 118 | * If a platform has set its own idle routine, leave it alone. |
diff --git a/arch/sh/kernel/kprobes.c b/arch/sh/kernel/kprobes.c index c96850b061fb..4049d99f76e1 100644 --- a/arch/sh/kernel/kprobes.c +++ b/arch/sh/kernel/kprobes.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/ptrace.h> | 13 | #include <linux/ptrace.h> |
14 | #include <linux/preempt.h> | 14 | #include <linux/preempt.h> |
15 | #include <linux/kdebug.h> | 15 | #include <linux/kdebug.h> |
16 | #include <linux/slab.h> | ||
16 | #include <asm/cacheflush.h> | 17 | #include <asm/cacheflush.h> |
17 | #include <asm/uaccess.h> | 18 | #include <asm/uaccess.h> |
18 | 19 | ||
diff --git a/arch/sh/kernel/perf_event.c b/arch/sh/kernel/perf_event.c index 9f253e9cce01..81b6de41ae5d 100644 --- a/arch/sh/kernel/perf_event.c +++ b/arch/sh/kernel/perf_event.c | |||
@@ -315,7 +315,7 @@ void hw_perf_disable(void) | |||
315 | sh_pmu->disable_all(); | 315 | sh_pmu->disable_all(); |
316 | } | 316 | } |
317 | 317 | ||
318 | int register_sh_pmu(struct sh_pmu *pmu) | 318 | int __cpuinit register_sh_pmu(struct sh_pmu *pmu) |
319 | { | 319 | { |
320 | if (sh_pmu) | 320 | if (sh_pmu) |
321 | return -EBUSY; | 321 | return -EBUSY; |
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 81add9b9ea6e..17f89aa4e1b3 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/mm.h> | 1 | #include <linux/mm.h> |
2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
3 | #include <linux/slab.h> | ||
3 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
4 | 5 | ||
5 | struct kmem_cache *task_xstate_cachep = NULL; | 6 | struct kmem_cache *task_xstate_cachep = NULL; |
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index 3cb88f114d7a..052981972ae6 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/elfcore.h> | 19 | #include <linux/elfcore.h> |
19 | #include <linux/kallsyms.h> | 20 | #include <linux/kallsyms.h> |
20 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c index c90957a459ac..d4ca6480e355 100644 --- a/arch/sh/kernel/process_64.c +++ b/arch/sh/kernel/process_64.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
22 | #include <linux/ptrace.h> | 22 | #include <linux/ptrace.h> |
23 | #include <linux/reboot.h> | 23 | #include <linux/reboot.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
26 | #include <linux/io.h> | 27 | #include <linux/io.h> |
@@ -504,13 +505,6 @@ out: | |||
504 | return error; | 505 | return error; |
505 | } | 506 | } |
506 | 507 | ||
507 | /* | ||
508 | * These bracket the sleeping functions.. | ||
509 | */ | ||
510 | extern void interruptible_sleep_on(wait_queue_head_t *q); | ||
511 | |||
512 | #define mid_sched ((unsigned long) interruptible_sleep_on) | ||
513 | |||
514 | #ifdef CONFIG_FRAME_POINTER | 508 | #ifdef CONFIG_FRAME_POINTER |
515 | static int in_sh64_switch_to(unsigned long pc) | 509 | static int in_sh64_switch_to(unsigned long pc) |
516 | { | 510 | { |
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index c625cdab76dd..7759a9a93211 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/ptrace.h> | 18 | #include <linux/ptrace.h> |
19 | #include <linux/user.h> | 19 | #include <linux/user.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/security.h> | 20 | #include <linux/security.h> |
22 | #include <linux/signal.h> | 21 | #include <linux/signal.h> |
23 | #include <linux/io.h> | 22 | #include <linux/io.h> |
diff --git a/arch/sh/kernel/return_address.c b/arch/sh/kernel/return_address.c index df3ab5811074..cbf1dd5372b2 100644 --- a/arch/sh/kernel/return_address.c +++ b/arch/sh/kernel/return_address.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * for more details. | 9 | * for more details. |
10 | */ | 10 | */ |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/module.h> | ||
12 | #include <asm/dwarf.h> | 13 | #include <asm/dwarf.h> |
13 | 14 | ||
14 | #ifdef CONFIG_DWARF_UNWINDER | 15 | #ifdef CONFIG_DWARF_UNWINDER |
@@ -52,3 +53,5 @@ void *return_address(unsigned int depth) | |||
52 | } | 53 | } |
53 | 54 | ||
54 | #endif | 55 | #endif |
56 | |||
57 | EXPORT_SYMBOL_GPL(return_address); | ||
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index e124cf7008df..002cc612deef 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c | |||
@@ -69,6 +69,7 @@ asmlinkage void __cpuinit start_secondary(void) | |||
69 | unsigned int cpu; | 69 | unsigned int cpu; |
70 | struct mm_struct *mm = &init_mm; | 70 | struct mm_struct *mm = &init_mm; |
71 | 71 | ||
72 | enable_mmu(); | ||
72 | atomic_inc(&mm->mm_count); | 73 | atomic_inc(&mm->mm_count); |
73 | atomic_inc(&mm->mm_users); | 74 | atomic_inc(&mm->mm_users); |
74 | current->active_mm = mm; | 75 | current->active_mm = mm; |
diff --git a/arch/sh/kernel/vsyscall/vsyscall.c b/arch/sh/kernel/vsyscall/vsyscall.c index 3f7e415be86a..242117cbad67 100644 --- a/arch/sh/kernel/vsyscall/vsyscall.c +++ b/arch/sh/kernel/vsyscall/vsyscall.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * for more details. | 11 | * for more details. |
12 | */ | 12 | */ |
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/gfp.h> | 16 | #include <linux/gfp.h> |
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c index 902967e3f841..c86a08540258 100644 --- a/arch/sh/mm/consistent.c +++ b/arch/sh/mm/consistent.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/dma-debug.h> | 16 | #include <linux/dma-debug.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/gfp.h> | ||
19 | #include <asm/cacheflush.h> | 20 | #include <asm/cacheflush.h> |
20 | #include <asm/addrspace.h> | 21 | #include <asm/addrspace.h> |
21 | 22 | ||
diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c index 9304117039c4..9163db3e8d15 100644 --- a/arch/sh/mm/hugetlbpage.c +++ b/arch/sh/mm/hugetlbpage.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/hugetlb.h> | 14 | #include <linux/hugetlb.h> |
15 | #include <linux/pagemap.h> | 15 | #include <linux/pagemap.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/sysctl.h> | 16 | #include <linux/sysctl.h> |
18 | 17 | ||
19 | #include <asm/mman.h> | 18 | #include <asm/mman.h> |
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 68028e8f26ce..c505de61a5ca 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/swap.h> | 11 | #include <linux/swap.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/gfp.h> | ||
13 | #include <linux/bootmem.h> | 14 | #include <linux/bootmem.h> |
14 | #include <linux/proc_fs.h> | 15 | #include <linux/proc_fs.h> |
15 | #include <linux/pagemap.h> | 16 | #include <linux/pagemap.h> |
diff --git a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c index 1ab2385ecefe..0c99ec2e7ed8 100644 --- a/arch/sh/mm/ioremap.c +++ b/arch/sh/mm/ioremap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | #include <linux/vmalloc.h> | 15 | #include <linux/vmalloc.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
18 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
19 | #include <linux/io.h> | 20 | #include <linux/io.h> |
diff --git a/arch/sh/mm/ioremap_fixed.c b/arch/sh/mm/ioremap_fixed.c index 7f682e5dafcf..efbe84af9983 100644 --- a/arch/sh/mm/ioremap_fixed.c +++ b/arch/sh/mm/ioremap_fixed.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/bootmem.h> | 16 | #include <linux/bootmem.h> |
17 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
18 | #include <linux/slab.h> | ||
19 | #include <asm/fixmap.h> | 18 | #include <asm/fixmap.h> |
20 | #include <asm/page.h> | 19 | #include <asm/page.h> |
21 | #include <asm/pgalloc.h> | 20 | #include <asm/pgalloc.h> |
diff --git a/arch/sh/mm/pgtable.c b/arch/sh/mm/pgtable.c index 6f21fb1d8726..26e03a1f7ca4 100644 --- a/arch/sh/mm/pgtable.c +++ b/arch/sh/mm/pgtable.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/mm.h> | 1 | #include <linux/mm.h> |
2 | #include <linux/slab.h> | ||
2 | 3 | ||
3 | #define PGALLOC_GFP GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO | 4 | #define PGALLOC_GFP GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO |
4 | 5 | ||
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index a4662e2782c3..e43ec600afcf 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/sysdev.h> | 15 | #include <linux/sysdev.h> |
16 | #include <linux/cpu.h> | 16 | #include <linux/cpu.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/bitops.h> | 18 | #include <linux/bitops.h> |
20 | #include <linux/debugfs.h> | 19 | #include <linux/debugfs.h> |
21 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
@@ -323,6 +322,7 @@ static void __clear_pmb_entry(struct pmb_entry *pmbe) | |||
323 | writel_uncached(data_val & ~PMB_V, data); | 322 | writel_uncached(data_val & ~PMB_V, data); |
324 | } | 323 | } |
325 | 324 | ||
325 | #ifdef CONFIG_PM | ||
326 | static void set_pmb_entry(struct pmb_entry *pmbe) | 326 | static void set_pmb_entry(struct pmb_entry *pmbe) |
327 | { | 327 | { |
328 | unsigned long flags; | 328 | unsigned long flags; |
@@ -331,6 +331,7 @@ static void set_pmb_entry(struct pmb_entry *pmbe) | |||
331 | __set_pmb_entry(pmbe); | 331 | __set_pmb_entry(pmbe); |
332 | spin_unlock_irqrestore(&pmbe->lock, flags); | 332 | spin_unlock_irqrestore(&pmbe->lock, flags); |
333 | } | 333 | } |
334 | #endif /* CONFIG_PM */ | ||
334 | 335 | ||
335 | int pmb_bolt_mapping(unsigned long vaddr, phys_addr_t phys, | 336 | int pmb_bolt_mapping(unsigned long vaddr, phys_addr_t phys, |
336 | unsigned long size, pgprot_t prot) | 337 | unsigned long size, pgprot_t prot) |
@@ -802,7 +803,7 @@ void __init pmb_init(void) | |||
802 | writel_uncached(0, PMB_IRMCR); | 803 | writel_uncached(0, PMB_IRMCR); |
803 | 804 | ||
804 | /* Flush out the TLB */ | 805 | /* Flush out the TLB */ |
805 | __raw_writel(__raw_readl(MMUCR) | MMUCR_TI, MMUCR); | 806 | local_flush_tlb_all(); |
806 | ctrl_barrier(); | 807 | ctrl_barrier(); |
807 | } | 808 | } |
808 | 809 | ||
diff --git a/arch/sh/mm/tlb-pteaex.c b/arch/sh/mm/tlb-pteaex.c index 32dc674c550c..b71db6af8060 100644 --- a/arch/sh/mm/tlb-pteaex.c +++ b/arch/sh/mm/tlb-pteaex.c | |||
@@ -73,5 +73,35 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page) | |||
73 | jump_to_uncached(); | 73 | jump_to_uncached(); |
74 | __raw_writel(page, MMU_UTLB_ADDRESS_ARRAY | MMU_PAGE_ASSOC_BIT); | 74 | __raw_writel(page, MMU_UTLB_ADDRESS_ARRAY | MMU_PAGE_ASSOC_BIT); |
75 | __raw_writel(asid, MMU_UTLB_ADDRESS_ARRAY2 | MMU_PAGE_ASSOC_BIT); | 75 | __raw_writel(asid, MMU_UTLB_ADDRESS_ARRAY2 | MMU_PAGE_ASSOC_BIT); |
76 | __raw_writel(page, MMU_ITLB_ADDRESS_ARRAY | MMU_PAGE_ASSOC_BIT); | ||
77 | __raw_writel(asid, MMU_ITLB_ADDRESS_ARRAY2 | MMU_PAGE_ASSOC_BIT); | ||
76 | back_to_cached(); | 78 | back_to_cached(); |
77 | } | 79 | } |
80 | |||
81 | void local_flush_tlb_all(void) | ||
82 | { | ||
83 | unsigned long flags, status; | ||
84 | int i; | ||
85 | |||
86 | /* | ||
87 | * Flush all the TLB. | ||
88 | */ | ||
89 | local_irq_save(flags); | ||
90 | jump_to_uncached(); | ||
91 | |||
92 | status = __raw_readl(MMUCR); | ||
93 | status = ((status & MMUCR_URB) >> MMUCR_URB_SHIFT); | ||
94 | |||
95 | if (status == 0) | ||
96 | status = MMUCR_URB_NENTRIES; | ||
97 | |||
98 | for (i = 0; i < status; i++) | ||
99 | __raw_writel(0x0, MMU_UTLB_ADDRESS_ARRAY | (i << 8)); | ||
100 | |||
101 | for (i = 0; i < 4; i++) | ||
102 | __raw_writel(0x0, MMU_ITLB_ADDRESS_ARRAY | (i << 8)); | ||
103 | |||
104 | back_to_cached(); | ||
105 | ctrl_barrier(); | ||
106 | local_irq_restore(flags); | ||
107 | } | ||
diff --git a/arch/sh/mm/tlb-sh3.c b/arch/sh/mm/tlb-sh3.c index 4f5f7cbdd508..7a940dbfc2e9 100644 --- a/arch/sh/mm/tlb-sh3.c +++ b/arch/sh/mm/tlb-sh3.c | |||
@@ -77,3 +77,22 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page) | |||
77 | for (i = 0; i < ways; i++) | 77 | for (i = 0; i < ways; i++) |
78 | __raw_writel(data, addr + (i << 8)); | 78 | __raw_writel(data, addr + (i << 8)); |
79 | } | 79 | } |
80 | |||
81 | void local_flush_tlb_all(void) | ||
82 | { | ||
83 | unsigned long flags, status; | ||
84 | |||
85 | /* | ||
86 | * Flush all the TLB. | ||
87 | * | ||
88 | * Write to the MMU control register's bit: | ||
89 | * TF-bit for SH-3, TI-bit for SH-4. | ||
90 | * It's same position, bit #2. | ||
91 | */ | ||
92 | local_irq_save(flags); | ||
93 | status = __raw_readl(MMUCR); | ||
94 | status |= 0x04; | ||
95 | __raw_writel(status, MMUCR); | ||
96 | ctrl_barrier(); | ||
97 | local_irq_restore(flags); | ||
98 | } | ||
diff --git a/arch/sh/mm/tlb-sh4.c b/arch/sh/mm/tlb-sh4.c index ccac77f504a8..cfdf7930d294 100644 --- a/arch/sh/mm/tlb-sh4.c +++ b/arch/sh/mm/tlb-sh4.c | |||
@@ -80,3 +80,31 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page) | |||
80 | __raw_writel(data, addr); | 80 | __raw_writel(data, addr); |
81 | back_to_cached(); | 81 | back_to_cached(); |
82 | } | 82 | } |
83 | |||
84 | void local_flush_tlb_all(void) | ||
85 | { | ||
86 | unsigned long flags, status; | ||
87 | int i; | ||
88 | |||
89 | /* | ||
90 | * Flush all the TLB. | ||
91 | */ | ||
92 | local_irq_save(flags); | ||
93 | jump_to_uncached(); | ||
94 | |||
95 | status = __raw_readl(MMUCR); | ||
96 | status = ((status & MMUCR_URB) >> MMUCR_URB_SHIFT); | ||
97 | |||
98 | if (status == 0) | ||
99 | status = MMUCR_URB_NENTRIES; | ||
100 | |||
101 | for (i = 0; i < status; i++) | ||
102 | __raw_writel(0x0, MMU_UTLB_ADDRESS_ARRAY | (i << 8)); | ||
103 | |||
104 | for (i = 0; i < 4; i++) | ||
105 | __raw_writel(0x0, MMU_ITLB_ADDRESS_ARRAY | (i << 8)); | ||
106 | |||
107 | back_to_cached(); | ||
108 | ctrl_barrier(); | ||
109 | local_irq_restore(flags); | ||
110 | } | ||
diff --git a/arch/sh/mm/tlb-urb.c b/arch/sh/mm/tlb-urb.c index bb5b9098956d..c92ce20db39b 100644 --- a/arch/sh/mm/tlb-urb.c +++ b/arch/sh/mm/tlb-urb.c | |||
@@ -24,13 +24,9 @@ void tlb_wire_entry(struct vm_area_struct *vma, unsigned long addr, pte_t pte) | |||
24 | 24 | ||
25 | local_irq_save(flags); | 25 | local_irq_save(flags); |
26 | 26 | ||
27 | /* Load the entry into the TLB */ | ||
28 | __update_tlb(vma, addr, pte); | ||
29 | |||
30 | /* ... and wire it up. */ | ||
31 | status = __raw_readl(MMUCR); | 27 | status = __raw_readl(MMUCR); |
32 | urb = (status & MMUCR_URB) >> MMUCR_URB_SHIFT; | 28 | urb = (status & MMUCR_URB) >> MMUCR_URB_SHIFT; |
33 | status &= ~MMUCR_URB; | 29 | status &= ~MMUCR_URC; |
34 | 30 | ||
35 | /* | 31 | /* |
36 | * Make sure we're not trying to wire the last TLB entry slot. | 32 | * Make sure we're not trying to wire the last TLB entry slot. |
@@ -39,7 +35,23 @@ void tlb_wire_entry(struct vm_area_struct *vma, unsigned long addr, pte_t pte) | |||
39 | 35 | ||
40 | urb = urb % MMUCR_URB_NENTRIES; | 36 | urb = urb % MMUCR_URB_NENTRIES; |
41 | 37 | ||
38 | /* | ||
39 | * Insert this entry into the highest non-wired TLB slot (via | ||
40 | * the URC field). | ||
41 | */ | ||
42 | status |= (urb << MMUCR_URC_SHIFT); | ||
43 | __raw_writel(status, MMUCR); | ||
44 | ctrl_barrier(); | ||
45 | |||
46 | /* Load the entry into the TLB */ | ||
47 | __update_tlb(vma, addr, pte); | ||
48 | |||
49 | /* ... and wire it up. */ | ||
50 | status = __raw_readl(MMUCR); | ||
51 | |||
52 | status &= ~MMUCR_URB; | ||
42 | status |= (urb << MMUCR_URB_SHIFT); | 53 | status |= (urb << MMUCR_URB_SHIFT); |
54 | |||
43 | __raw_writel(status, MMUCR); | 55 | __raw_writel(status, MMUCR); |
44 | ctrl_barrier(); | 56 | ctrl_barrier(); |
45 | 57 | ||
diff --git a/arch/sh/mm/tlbflush_32.c b/arch/sh/mm/tlbflush_32.c index 004bb3f25b5f..3fbe03ce8fe3 100644 --- a/arch/sh/mm/tlbflush_32.c +++ b/arch/sh/mm/tlbflush_32.c | |||
@@ -119,22 +119,3 @@ void local_flush_tlb_mm(struct mm_struct *mm) | |||
119 | local_irq_restore(flags); | 119 | local_irq_restore(flags); |
120 | } | 120 | } |
121 | } | 121 | } |
122 | |||
123 | void local_flush_tlb_all(void) | ||
124 | { | ||
125 | unsigned long flags, status; | ||
126 | |||
127 | /* | ||
128 | * Flush all the TLB. | ||
129 | * | ||
130 | * Write to the MMU control register's bit: | ||
131 | * TF-bit for SH-3, TI-bit for SH-4. | ||
132 | * It's same position, bit #2. | ||
133 | */ | ||
134 | local_irq_save(flags); | ||
135 | status = __raw_readl(MMUCR); | ||
136 | status |= 0x04; | ||
137 | __raw_writel(status, MMUCR); | ||
138 | ctrl_barrier(); | ||
139 | local_irq_restore(flags); | ||
140 | } | ||
diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig index 56e3163673e3..259e3fd50993 100644 --- a/arch/sparc/configs/sparc64_defconfig +++ b/arch/sparc/configs/sparc64_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.33 | 3 | # Linux kernel version: 2.6.34-rc3 |
4 | # Wed Mar 3 02:54:29 2010 | 4 | # Sat Apr 3 15:49:56 2010 |
5 | # | 5 | # |
6 | CONFIG_64BIT=y | 6 | CONFIG_64BIT=y |
7 | CONFIG_SPARC=y | 7 | CONFIG_SPARC=y |
@@ -23,6 +23,7 @@ CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y | |||
23 | CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y | 23 | CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y |
24 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | 24 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y |
25 | CONFIG_MMU=y | 25 | CONFIG_MMU=y |
26 | CONFIG_NEED_DMA_MAP_STATE=y | ||
26 | CONFIG_ARCH_NO_VIRT_TO_BUS=y | 27 | CONFIG_ARCH_NO_VIRT_TO_BUS=y |
27 | CONFIG_OF=y | 28 | CONFIG_OF=y |
28 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y | 29 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y |
@@ -439,6 +440,7 @@ CONFIG_MISC_DEVICES=y | |||
439 | # CONFIG_ENCLOSURE_SERVICES is not set | 440 | # CONFIG_ENCLOSURE_SERVICES is not set |
440 | # CONFIG_HP_ILO is not set | 441 | # CONFIG_HP_ILO is not set |
441 | # CONFIG_ISL29003 is not set | 442 | # CONFIG_ISL29003 is not set |
443 | # CONFIG_SENSORS_TSL2550 is not set | ||
442 | # CONFIG_DS1682 is not set | 444 | # CONFIG_DS1682 is not set |
443 | # CONFIG_C2PORT is not set | 445 | # CONFIG_C2PORT is not set |
444 | 446 | ||
@@ -511,6 +513,7 @@ CONFIG_BLK_DEV_IDEDMA=y | |||
511 | # | 513 | # |
512 | # SCSI device support | 514 | # SCSI device support |
513 | # | 515 | # |
516 | CONFIG_SCSI_MOD=y | ||
514 | CONFIG_RAID_ATTRS=m | 517 | CONFIG_RAID_ATTRS=m |
515 | CONFIG_SCSI=y | 518 | CONFIG_SCSI=y |
516 | CONFIG_SCSI_DMA=y | 519 | CONFIG_SCSI_DMA=y |
@@ -888,6 +891,7 @@ CONFIG_SERIAL_SUNHV=y | |||
888 | CONFIG_SERIAL_CORE=y | 891 | CONFIG_SERIAL_CORE=y |
889 | CONFIG_SERIAL_CORE_CONSOLE=y | 892 | CONFIG_SERIAL_CORE_CONSOLE=y |
890 | # CONFIG_SERIAL_JSM is not set | 893 | # CONFIG_SERIAL_JSM is not set |
894 | # CONFIG_SERIAL_TIMBERDALE is not set | ||
891 | # CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set | 895 | # CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set |
892 | CONFIG_UNIX98_PTYS=y | 896 | CONFIG_UNIX98_PTYS=y |
893 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | 897 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set |
@@ -935,6 +939,7 @@ CONFIG_I2C_ALGOBIT=y | |||
935 | # | 939 | # |
936 | # CONFIG_I2C_OCORES is not set | 940 | # CONFIG_I2C_OCORES is not set |
937 | # CONFIG_I2C_SIMTEC is not set | 941 | # CONFIG_I2C_SIMTEC is not set |
942 | # CONFIG_I2C_XILINX is not set | ||
938 | 943 | ||
939 | # | 944 | # |
940 | # External I2C/SMBus adapter drivers | 945 | # External I2C/SMBus adapter drivers |
@@ -948,15 +953,9 @@ CONFIG_I2C_ALGOBIT=y | |||
948 | # | 953 | # |
949 | # CONFIG_I2C_PCA_PLATFORM is not set | 954 | # CONFIG_I2C_PCA_PLATFORM is not set |
950 | # CONFIG_I2C_STUB is not set | 955 | # CONFIG_I2C_STUB is not set |
951 | |||
952 | # | ||
953 | # Miscellaneous I2C Chip support | ||
954 | # | ||
955 | # CONFIG_SENSORS_TSL2550 is not set | ||
956 | # CONFIG_I2C_DEBUG_CORE is not set | 956 | # CONFIG_I2C_DEBUG_CORE is not set |
957 | # CONFIG_I2C_DEBUG_ALGO is not set | 957 | # CONFIG_I2C_DEBUG_ALGO is not set |
958 | # CONFIG_I2C_DEBUG_BUS is not set | 958 | # CONFIG_I2C_DEBUG_BUS is not set |
959 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
960 | # CONFIG_SPI is not set | 959 | # CONFIG_SPI is not set |
961 | 960 | ||
962 | # | 961 | # |
@@ -982,10 +981,11 @@ CONFIG_HWMON=y | |||
982 | # CONFIG_SENSORS_ADM1029 is not set | 981 | # CONFIG_SENSORS_ADM1029 is not set |
983 | # CONFIG_SENSORS_ADM1031 is not set | 982 | # CONFIG_SENSORS_ADM1031 is not set |
984 | # CONFIG_SENSORS_ADM9240 is not set | 983 | # CONFIG_SENSORS_ADM9240 is not set |
984 | # CONFIG_SENSORS_ADT7411 is not set | ||
985 | # CONFIG_SENSORS_ADT7462 is not set | 985 | # CONFIG_SENSORS_ADT7462 is not set |
986 | # CONFIG_SENSORS_ADT7470 is not set | 986 | # CONFIG_SENSORS_ADT7470 is not set |
987 | # CONFIG_SENSORS_ADT7473 is not set | ||
988 | # CONFIG_SENSORS_ADT7475 is not set | 987 | # CONFIG_SENSORS_ADT7475 is not set |
988 | # CONFIG_SENSORS_ASC7621 is not set | ||
989 | # CONFIG_SENSORS_ATXP1 is not set | 989 | # CONFIG_SENSORS_ATXP1 is not set |
990 | # CONFIG_SENSORS_DS1621 is not set | 990 | # CONFIG_SENSORS_DS1621 is not set |
991 | # CONFIG_SENSORS_I5K_AMB is not set | 991 | # CONFIG_SENSORS_I5K_AMB is not set |
@@ -1052,18 +1052,21 @@ CONFIG_SSB_POSSIBLE=y | |||
1052 | # Multifunction device drivers | 1052 | # Multifunction device drivers |
1053 | # | 1053 | # |
1054 | # CONFIG_MFD_CORE is not set | 1054 | # CONFIG_MFD_CORE is not set |
1055 | # CONFIG_MFD_88PM860X is not set | ||
1055 | # CONFIG_MFD_SM501 is not set | 1056 | # CONFIG_MFD_SM501 is not set |
1056 | # CONFIG_HTC_PASIC3 is not set | 1057 | # CONFIG_HTC_PASIC3 is not set |
1057 | # CONFIG_TWL4030_CORE is not set | 1058 | # CONFIG_TWL4030_CORE is not set |
1058 | # CONFIG_MFD_TMIO is not set | 1059 | # CONFIG_MFD_TMIO is not set |
1059 | # CONFIG_PMIC_DA903X is not set | 1060 | # CONFIG_PMIC_DA903X is not set |
1060 | # CONFIG_PMIC_ADP5520 is not set | 1061 | # CONFIG_PMIC_ADP5520 is not set |
1062 | # CONFIG_MFD_MAX8925 is not set | ||
1061 | # CONFIG_MFD_WM8400 is not set | 1063 | # CONFIG_MFD_WM8400 is not set |
1062 | # CONFIG_MFD_WM831X is not set | 1064 | # CONFIG_MFD_WM831X is not set |
1063 | # CONFIG_MFD_WM8350_I2C is not set | 1065 | # CONFIG_MFD_WM8350_I2C is not set |
1066 | # CONFIG_MFD_WM8994 is not set | ||
1064 | # CONFIG_MFD_PCF50633 is not set | 1067 | # CONFIG_MFD_PCF50633 is not set |
1065 | # CONFIG_AB3100_CORE is not set | 1068 | # CONFIG_AB3100_CORE is not set |
1066 | # CONFIG_MFD_88PM8607 is not set | 1069 | # CONFIG_LPC_SCH is not set |
1067 | # CONFIG_REGULATOR is not set | 1070 | # CONFIG_REGULATOR is not set |
1068 | # CONFIG_MEDIA_SUPPORT is not set | 1071 | # CONFIG_MEDIA_SUPPORT is not set |
1069 | 1072 | ||
@@ -1113,6 +1116,7 @@ CONFIG_FB_FFB=y | |||
1113 | # CONFIG_FB_LEO is not set | 1116 | # CONFIG_FB_LEO is not set |
1114 | CONFIG_FB_XVR500=y | 1117 | CONFIG_FB_XVR500=y |
1115 | CONFIG_FB_XVR2500=y | 1118 | CONFIG_FB_XVR2500=y |
1119 | CONFIG_FB_XVR1000=y | ||
1116 | # CONFIG_FB_S1D13XXX is not set | 1120 | # CONFIG_FB_S1D13XXX is not set |
1117 | # CONFIG_FB_NVIDIA is not set | 1121 | # CONFIG_FB_NVIDIA is not set |
1118 | # CONFIG_FB_RIVA is not set | 1122 | # CONFIG_FB_RIVA is not set |
@@ -1430,7 +1434,6 @@ CONFIG_USB_STORAGE=m | |||
1430 | # CONFIG_USB_RIO500 is not set | 1434 | # CONFIG_USB_RIO500 is not set |
1431 | # CONFIG_USB_LEGOTOWER is not set | 1435 | # CONFIG_USB_LEGOTOWER is not set |
1432 | # CONFIG_USB_LCD is not set | 1436 | # CONFIG_USB_LCD is not set |
1433 | # CONFIG_USB_BERRY_CHARGE is not set | ||
1434 | # CONFIG_USB_LED is not set | 1437 | # CONFIG_USB_LED is not set |
1435 | # CONFIG_USB_CYPRESS_CY7C63 is not set | 1438 | # CONFIG_USB_CYPRESS_CY7C63 is not set |
1436 | # CONFIG_USB_CYTHERM is not set | 1439 | # CONFIG_USB_CYTHERM is not set |
@@ -1443,7 +1446,6 @@ CONFIG_USB_STORAGE=m | |||
1443 | # CONFIG_USB_IOWARRIOR is not set | 1446 | # CONFIG_USB_IOWARRIOR is not set |
1444 | # CONFIG_USB_TEST is not set | 1447 | # CONFIG_USB_TEST is not set |
1445 | # CONFIG_USB_ISIGHTFW is not set | 1448 | # CONFIG_USB_ISIGHTFW is not set |
1446 | # CONFIG_USB_VST is not set | ||
1447 | # CONFIG_USB_GADGET is not set | 1449 | # CONFIG_USB_GADGET is not set |
1448 | 1450 | ||
1449 | # | 1451 | # |
@@ -1610,6 +1612,7 @@ CONFIG_MISC_FILESYSTEMS=y | |||
1610 | # CONFIG_BEFS_FS is not set | 1612 | # CONFIG_BEFS_FS is not set |
1611 | # CONFIG_BFS_FS is not set | 1613 | # CONFIG_BFS_FS is not set |
1612 | # CONFIG_EFS_FS is not set | 1614 | # CONFIG_EFS_FS is not set |
1615 | # CONFIG_LOGFS is not set | ||
1613 | # CONFIG_CRAMFS is not set | 1616 | # CONFIG_CRAMFS is not set |
1614 | # CONFIG_SQUASHFS is not set | 1617 | # CONFIG_SQUASHFS is not set |
1615 | # CONFIG_VXFS_FS is not set | 1618 | # CONFIG_VXFS_FS is not set |
@@ -1624,6 +1627,7 @@ CONFIG_NETWORK_FILESYSTEMS=y | |||
1624 | # CONFIG_NFS_FS is not set | 1627 | # CONFIG_NFS_FS is not set |
1625 | # CONFIG_NFSD is not set | 1628 | # CONFIG_NFSD is not set |
1626 | # CONFIG_SMB_FS is not set | 1629 | # CONFIG_SMB_FS is not set |
1630 | # CONFIG_CEPH_FS is not set | ||
1627 | # CONFIG_CIFS is not set | 1631 | # CONFIG_CIFS is not set |
1628 | # CONFIG_NCP_FS is not set | 1632 | # CONFIG_NCP_FS is not set |
1629 | # CONFIG_CODA_FS is not set | 1633 | # CONFIG_CODA_FS is not set |
diff --git a/arch/sparc/include/asm/stat.h b/arch/sparc/include/asm/stat.h index 39327d6a57eb..a232e9e1f4e5 100644 --- a/arch/sparc/include/asm/stat.h +++ b/arch/sparc/include/asm/stat.h | |||
@@ -53,8 +53,8 @@ struct stat { | |||
53 | ino_t st_ino; | 53 | ino_t st_ino; |
54 | mode_t st_mode; | 54 | mode_t st_mode; |
55 | short st_nlink; | 55 | short st_nlink; |
56 | uid16_t st_uid; | 56 | unsigned short st_uid; |
57 | gid16_t st_gid; | 57 | unsigned short st_gid; |
58 | unsigned short st_rdev; | 58 | unsigned short st_rdev; |
59 | off_t st_size; | 59 | off_t st_size; |
60 | time_t st_atime; | 60 | time_t st_atime; |
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c index 4589ca33220f..415c86d5a8da 100644 --- a/arch/sparc/kernel/central.c +++ b/arch/sparc/kernel/central.c | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/string.h> | 9 | #include <linux/string.h> |
9 | #include <linux/init.h> | 10 | #include <linux/init.h> |
10 | #include <linux/of_device.h> | 11 | #include <linux/of_device.h> |
diff --git a/arch/sparc/kernel/cpumap.c b/arch/sparc/kernel/cpumap.c index 7430ed080b23..8de64c8126bc 100644 --- a/arch/sparc/kernel/cpumap.c +++ b/arch/sparc/kernel/cpumap.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
8 | #include <linux/init.h> | 9 | #include <linux/init.h> |
9 | #include <linux/cpumask.h> | 10 | #include <linux/cpumask.h> |
diff --git a/arch/sparc/kernel/helpers.S b/arch/sparc/kernel/helpers.S index 314dd0c9fc5b..92090cc9e829 100644 --- a/arch/sparc/kernel/helpers.S +++ b/arch/sparc/kernel/helpers.S | |||
@@ -46,6 +46,81 @@ stack_trace_flush: | |||
46 | nop | 46 | nop |
47 | .size stack_trace_flush,.-stack_trace_flush | 47 | .size stack_trace_flush,.-stack_trace_flush |
48 | 48 | ||
49 | #ifdef CONFIG_PERF_EVENTS | ||
50 | .globl perf_arch_fetch_caller_regs | ||
51 | .type perf_arch_fetch_caller_regs,#function | ||
52 | perf_arch_fetch_caller_regs: | ||
53 | /* We always read the %pstate into %o5 since we will use | ||
54 | * that to construct a fake %tstate to store into the regs. | ||
55 | */ | ||
56 | rdpr %pstate, %o5 | ||
57 | brz,pn %o2, 50f | ||
58 | mov %o2, %g7 | ||
59 | |||
60 | /* Turn off interrupts while we walk around the register | ||
61 | * window by hand. | ||
62 | */ | ||
63 | wrpr %o5, PSTATE_IE, %pstate | ||
64 | |||
65 | /* The %canrestore tells us how many register windows are | ||
66 | * still live in the chip above us, past that we have to | ||
67 | * walk the frame as saved on the stack. We stash away | ||
68 | * the %cwp in %g1 so we can return back to the original | ||
69 | * register window. | ||
70 | */ | ||
71 | rdpr %cwp, %g1 | ||
72 | rdpr %canrestore, %g2 | ||
73 | sub %g1, 1, %g3 | ||
74 | |||
75 | /* We have the skip count in %g7, if it hits zero then | ||
76 | * %fp/%i7 are the registers we need. Otherwise if our | ||
77 | * %canrestore count maintained in %g2 hits zero we have | ||
78 | * to start traversing the stack. | ||
79 | */ | ||
80 | 10: brz,pn %g2, 4f | ||
81 | sub %g2, 1, %g2 | ||
82 | wrpr %g3, %cwp | ||
83 | subcc %g7, 1, %g7 | ||
84 | bne,pt %xcc, 10b | ||
85 | sub %g3, 1, %g3 | ||
86 | |||
87 | /* We found the values we need in the cpu's register | ||
88 | * windows. | ||
89 | */ | ||
90 | mov %fp, %g3 | ||
91 | ba,pt %xcc, 3f | ||
92 | mov %i7, %g2 | ||
93 | |||
94 | 50: mov %fp, %g3 | ||
95 | ba,pt %xcc, 2f | ||
96 | mov %i7, %g2 | ||
97 | |||
98 | /* We hit the end of the valid register windows in the | ||
99 | * cpu, start traversing the stack frame. | ||
100 | */ | ||
101 | 4: mov %fp, %g3 | ||
102 | |||
103 | 20: ldx [%g3 + STACK_BIAS + RW_V9_I7], %g2 | ||
104 | subcc %g7, 1, %g7 | ||
105 | bne,pn %xcc, 20b | ||
106 | ldx [%g3 + STACK_BIAS + RW_V9_I6], %g3 | ||
107 | |||
108 | /* Restore the current register window position and | ||
109 | * re-enable interrupts. | ||
110 | */ | ||
111 | 3: wrpr %g1, %cwp | ||
112 | wrpr %o5, %pstate | ||
113 | |||
114 | 2: stx %g3, [%o0 + PT_V9_FP] | ||
115 | sllx %o5, 8, %o5 | ||
116 | stx %o5, [%o0 + PT_V9_TSTATE] | ||
117 | stx %g2, [%o0 + PT_V9_TPC] | ||
118 | add %g2, 4, %g2 | ||
119 | retl | ||
120 | stx %g2, [%o0 + PT_V9_TNPC] | ||
121 | .size perf_arch_fetch_caller_regs,.-perf_arch_fetch_caller_regs | ||
122 | #endif /* CONFIG_PERF_EVENTS */ | ||
123 | |||
49 | #ifdef CONFIG_SMP | 124 | #ifdef CONFIG_SMP |
50 | .globl hard_smp_processor_id | 125 | .globl hard_smp_processor_id |
51 | .type hard_smp_processor_id,#function | 126 | .type hard_smp_processor_id,#function |
diff --git a/arch/sparc/kernel/hvapi.c b/arch/sparc/kernel/hvapi.c index 1d272c3b5740..7c60afb835b0 100644 --- a/arch/sparc/kernel/hvapi.c +++ b/arch/sparc/kernel/hvapi.c | |||
@@ -5,7 +5,6 @@ | |||
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/slab.h> | ||
9 | 8 | ||
10 | #include <asm/hypervisor.h> | 9 | #include <asm/hypervisor.h> |
11 | #include <asm/oplib.h> | 10 | #include <asm/oplib.h> |
diff --git a/arch/sparc/kernel/iommu.c b/arch/sparc/kernel/iommu.c index 8414549c1834..47977a77f6c6 100644 --- a/arch/sparc/kernel/iommu.c +++ b/arch/sparc/kernel/iommu.c | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/delay.h> | 10 | #include <linux/delay.h> |
10 | #include <linux/device.h> | 11 | #include <linux/device.h> |
11 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
diff --git a/arch/sparc/kernel/kprobes.c b/arch/sparc/kernel/kprobes.c index 6716584e48ab..a39d1ba5a119 100644 --- a/arch/sparc/kernel/kprobes.c +++ b/arch/sparc/kernel/kprobes.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/kprobes.h> | 7 | #include <linux/kprobes.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/kdebug.h> | 9 | #include <linux/kdebug.h> |
10 | #include <linux/slab.h> | ||
10 | #include <asm/signal.h> | 11 | #include <asm/signal.h> |
11 | #include <asm/cacheflush.h> | 12 | #include <asm/cacheflush.h> |
12 | #include <asm/uaccess.h> | 13 | #include <asm/uaccess.h> |
diff --git a/arch/sparc/kernel/led.c b/arch/sparc/kernel/led.c index 00d034ea2164..3ae36f36e758 100644 --- a/arch/sparc/kernel/led.c +++ b/arch/sparc/kernel/led.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/init.h> | 3 | #include <linux/init.h> |
4 | #include <linux/proc_fs.h> | 4 | #include <linux/proc_fs.h> |
5 | #include <linux/seq_file.h> | 5 | #include <linux/seq_file.h> |
6 | #include <linux/slab.h> | ||
6 | #include <linux/string.h> | 7 | #include <linux/string.h> |
7 | #include <linux/jiffies.h> | 8 | #include <linux/jiffies.h> |
8 | #include <linux/timer.h> | 9 | #include <linux/timer.h> |
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c index 0409d62d8ca2..6a7b4dbc8e09 100644 --- a/arch/sparc/kernel/leon_kernel.c +++ b/arch/sparc/kernel/leon_kernel.c | |||
@@ -7,7 +7,6 @@ | |||
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/mutex.h> | 9 | #include <linux/mutex.h> |
10 | #include <linux/slab.h> | ||
11 | #include <linux/of.h> | 10 | #include <linux/of.h> |
12 | #include <linux/of_platform.h> | 11 | #include <linux/of_platform.h> |
13 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index 85787577f683..e1656fc41ccb 100644 --- a/arch/sparc/kernel/leon_smp.c +++ b/arch/sparc/kernel/leon_smp.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/profile.h> | 22 | #include <linux/profile.h> |
23 | #include <linux/pm.h> | 23 | #include <linux/pm.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/gfp.h> | ||
25 | 26 | ||
26 | #include <asm/cacheflush.h> | 27 | #include <asm/cacheflush.h> |
27 | #include <asm/tlbflush.h> | 28 | #include <asm/tlbflush.h> |
diff --git a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c index 0ee642f63234..f848aadf54dc 100644 --- a/arch/sparc/kernel/module.c +++ b/arch/sparc/kernel/module.c | |||
@@ -9,9 +9,9 @@ | |||
9 | #include <linux/elf.h> | 9 | #include <linux/elf.h> |
10 | #include <linux/vmalloc.h> | 10 | #include <linux/vmalloc.h> |
11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
12 | #include <linux/gfp.h> | ||
12 | #include <linux/string.h> | 13 | #include <linux/string.h> |
13 | #include <linux/ctype.h> | 14 | #include <linux/ctype.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | 16 | ||
17 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
diff --git a/arch/sparc/kernel/of_device_common.c b/arch/sparc/kernel/of_device_common.c index cb8eb799bb6c..0247e68210b3 100644 --- a/arch/sparc/kernel/of_device_common.c +++ b/arch/sparc/kernel/of_device_common.c | |||
@@ -4,7 +4,6 @@ | |||
4 | #include <linux/init.h> | 4 | #include <linux/init.h> |
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/mod_devicetable.h> | 6 | #include <linux/mod_devicetable.h> |
7 | #include <linux/slab.h> | ||
8 | #include <linux/errno.h> | 7 | #include <linux/errno.h> |
9 | #include <linux/irq.h> | 8 | #include <linux/irq.h> |
10 | #include <linux/of_device.h> | 9 | #include <linux/of_device.h> |
diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c index e1b0541feb19..e0ef847219c3 100644 --- a/arch/sparc/kernel/pci_msi.c +++ b/arch/sparc/kernel/pci_msi.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/interrupt.h> | 6 | #include <linux/interrupt.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/irq.h> | 8 | #include <linux/irq.h> |
8 | 9 | ||
9 | #include "pci_impl.h" | 10 | #include "pci_impl.h" |
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index 68cb9b42088f..e2771939341d 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
@@ -1337,7 +1337,7 @@ static void perf_callchain_user_32(struct pt_regs *regs, | |||
1337 | callchain_store(entry, PERF_CONTEXT_USER); | 1337 | callchain_store(entry, PERF_CONTEXT_USER); |
1338 | callchain_store(entry, regs->tpc); | 1338 | callchain_store(entry, regs->tpc); |
1339 | 1339 | ||
1340 | ufp = regs->u_regs[UREG_I6]; | 1340 | ufp = regs->u_regs[UREG_I6] & 0xffffffffUL; |
1341 | do { | 1341 | do { |
1342 | struct sparc_stackf32 *usf, sf; | 1342 | struct sparc_stackf32 *usf, sf; |
1343 | unsigned long pc; | 1343 | unsigned long pc; |
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c index c49865b30719..40e29fc8a4d6 100644 --- a/arch/sparc/kernel/process_32.c +++ b/arch/sparc/kernel/process_32.c | |||
@@ -17,13 +17,13 @@ | |||
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/stddef.h> | 18 | #include <linux/stddef.h> |
19 | #include <linux/ptrace.h> | 19 | #include <linux/ptrace.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/user.h> | 20 | #include <linux/user.h> |
22 | #include <linux/smp.h> | 21 | #include <linux/smp.h> |
23 | #include <linux/reboot.h> | 22 | #include <linux/reboot.h> |
24 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
25 | #include <linux/pm.h> | 24 | #include <linux/pm.h> |
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/slab.h> | ||
27 | 27 | ||
28 | #include <asm/auxio.h> | 28 | #include <asm/auxio.h> |
29 | #include <asm/oplib.h> | 29 | #include <asm/oplib.h> |
diff --git a/arch/sparc/kernel/ptrace_32.c b/arch/sparc/kernel/ptrace_32.c index 7e3dfd9bb97e..e608f397e11f 100644 --- a/arch/sparc/kernel/ptrace_32.c +++ b/arch/sparc/kernel/ptrace_32.c | |||
@@ -65,6 +65,7 @@ static int genregs32_get(struct task_struct *target, | |||
65 | *k++ = regs->u_regs[pos++]; | 65 | *k++ = regs->u_regs[pos++]; |
66 | 66 | ||
67 | reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; | 67 | reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; |
68 | reg_window -= 16; | ||
68 | for (; count > 0 && pos < 32; count--) { | 69 | for (; count > 0 && pos < 32; count--) { |
69 | if (get_user(*k++, ®_window[pos++])) | 70 | if (get_user(*k++, ®_window[pos++])) |
70 | return -EFAULT; | 71 | return -EFAULT; |
@@ -76,6 +77,7 @@ static int genregs32_get(struct task_struct *target, | |||
76 | } | 77 | } |
77 | 78 | ||
78 | reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; | 79 | reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; |
80 | reg_window -= 16; | ||
79 | for (; count > 0 && pos < 32; count--) { | 81 | for (; count > 0 && pos < 32; count--) { |
80 | if (get_user(reg, ®_window[pos++]) || | 82 | if (get_user(reg, ®_window[pos++]) || |
81 | put_user(reg, u++)) | 83 | put_user(reg, u++)) |
@@ -141,6 +143,7 @@ static int genregs32_set(struct task_struct *target, | |||
141 | regs->u_regs[pos++] = *k++; | 143 | regs->u_regs[pos++] = *k++; |
142 | 144 | ||
143 | reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; | 145 | reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; |
146 | reg_window -= 16; | ||
144 | for (; count > 0 && pos < 32; count--) { | 147 | for (; count > 0 && pos < 32; count--) { |
145 | if (put_user(*k++, ®_window[pos++])) | 148 | if (put_user(*k++, ®_window[pos++])) |
146 | return -EFAULT; | 149 | return -EFAULT; |
@@ -153,6 +156,7 @@ static int genregs32_set(struct task_struct *target, | |||
153 | } | 156 | } |
154 | 157 | ||
155 | reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; | 158 | reg_window = (unsigned long __user *) regs->u_regs[UREG_I6]; |
159 | reg_window -= 16; | ||
156 | for (; count > 0 && pos < 32; count--) { | 160 | for (; count > 0 && pos < 32; count--) { |
157 | if (get_user(reg, u++) || | 161 | if (get_user(reg, u++) || |
158 | put_user(reg, ®_window[pos++])) | 162 | put_user(reg, ®_window[pos++])) |
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c index 2f6524d1a817..aa90da08bf61 100644 --- a/arch/sparc/kernel/ptrace_64.c +++ b/arch/sparc/kernel/ptrace_64.c | |||
@@ -492,6 +492,7 @@ static int genregs32_get(struct task_struct *target, | |||
492 | *k++ = regs->u_regs[pos++]; | 492 | *k++ = regs->u_regs[pos++]; |
493 | 493 | ||
494 | reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; | 494 | reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; |
495 | reg_window -= 16; | ||
495 | if (target == current) { | 496 | if (target == current) { |
496 | for (; count > 0 && pos < 32; count--) { | 497 | for (; count > 0 && pos < 32; count--) { |
497 | if (get_user(*k++, ®_window[pos++])) | 498 | if (get_user(*k++, ®_window[pos++])) |
@@ -516,6 +517,7 @@ static int genregs32_get(struct task_struct *target, | |||
516 | } | 517 | } |
517 | 518 | ||
518 | reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; | 519 | reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; |
520 | reg_window -= 16; | ||
519 | if (target == current) { | 521 | if (target == current) { |
520 | for (; count > 0 && pos < 32; count--) { | 522 | for (; count > 0 && pos < 32; count--) { |
521 | if (get_user(reg, ®_window[pos++]) || | 523 | if (get_user(reg, ®_window[pos++]) || |
@@ -599,6 +601,7 @@ static int genregs32_set(struct task_struct *target, | |||
599 | regs->u_regs[pos++] = *k++; | 601 | regs->u_regs[pos++] = *k++; |
600 | 602 | ||
601 | reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; | 603 | reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; |
604 | reg_window -= 16; | ||
602 | if (target == current) { | 605 | if (target == current) { |
603 | for (; count > 0 && pos < 32; count--) { | 606 | for (; count > 0 && pos < 32; count--) { |
604 | if (put_user(*k++, ®_window[pos++])) | 607 | if (put_user(*k++, ®_window[pos++])) |
@@ -625,6 +628,7 @@ static int genregs32_set(struct task_struct *target, | |||
625 | } | 628 | } |
626 | 629 | ||
627 | reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; | 630 | reg_window = (compat_ulong_t __user *) regs->u_regs[UREG_I6]; |
631 | reg_window -= 16; | ||
628 | if (target == current) { | 632 | if (target == current) { |
629 | for (; count > 0 && pos < 32; count--) { | 633 | for (; count > 0 && pos < 32; count--) { |
630 | if (get_user(reg, u++) || | 634 | if (get_user(reg, u++) || |
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index a2a79e76344f..5f72de67588b 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/stddef.h> | 12 | #include <linux/stddef.h> |
13 | #include <linux/unistd.h> | 13 | #include <linux/unistd.h> |
14 | #include <linux/ptrace.h> | 14 | #include <linux/ptrace.h> |
15 | #include <linux/slab.h> | ||
16 | #include <asm/smp.h> | 15 | #include <asm/smp.h> |
17 | #include <linux/user.h> | 16 | #include <linux/user.h> |
18 | #include <linux/screen_info.h> | 17 | #include <linux/screen_info.h> |
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index eb14844a0021..4c5334528109 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/bootmem.h> | 23 | #include <linux/bootmem.h> |
24 | #include <linux/vmalloc.h> | 24 | #include <linux/vmalloc.h> |
25 | #include <linux/cpu.h> | 25 | #include <linux/cpu.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <asm/head.h> | 28 | #include <asm/head.h> |
28 | #include <asm/ptrace.h> | 29 | #include <asm/ptrace.h> |
diff --git a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c index bc3adbf79c6a..892fb884910a 100644 --- a/arch/sparc/kernel/sun4c_irq.c +++ b/arch/sparc/kernel/sun4c_irq.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/ptrace.h> | 17 | #include <linux/ptrace.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/init.h> | 19 | #include <linux/init.h> |
21 | #include <linux/of.h> | 20 | #include <linux/of.h> |
22 | #include <linux/of_device.h> | 21 | #include <linux/of_device.h> |
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c index 301892e2d718..7f3b97ff62c1 100644 --- a/arch/sparc/kernel/sun4m_irq.c +++ b/arch/sparc/kernel/sun4m_irq.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/ptrace.h> | 17 | #include <linux/ptrace.h> |
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
23 | #include <linux/of.h> | 22 | #include <linux/of.h> |
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c index daded3b96398..c0ca87553e1c 100644 --- a/arch/sparc/kernel/sys_sparc32.c +++ b/arch/sparc/kernel/sys_sparc32.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/sem.h> | 21 | #include <linux/sem.h> |
22 | #include <linux/msg.h> | 22 | #include <linux/msg.h> |
23 | #include <linux/shm.h> | 23 | #include <linux/shm.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/uio.h> | 24 | #include <linux/uio.h> |
26 | #include <linux/nfs_fs.h> | 25 | #include <linux/nfs_fs.h> |
27 | #include <linux/quota.h> | 26 | #include <linux/quota.h> |
@@ -44,6 +43,7 @@ | |||
44 | #include <linux/compat.h> | 43 | #include <linux/compat.h> |
45 | #include <linux/vfs.h> | 44 | #include <linux/vfs.h> |
46 | #include <linux/ptrace.h> | 45 | #include <linux/ptrace.h> |
46 | #include <linux/slab.h> | ||
47 | 47 | ||
48 | #include <asm/types.h> | 48 | #include <asm/types.h> |
49 | #include <asm/uaccess.h> | 49 | #include <asm/uaccess.h> |
diff --git a/arch/sparc/kernel/sysfs.c b/arch/sparc/kernel/sysfs.c index ca39c606fe8e..1eb8b00aed75 100644 --- a/arch/sparc/kernel/sysfs.c +++ b/arch/sparc/kernel/sysfs.c | |||
@@ -107,12 +107,12 @@ static unsigned long run_on_cpu(unsigned long cpu, | |||
107 | unsigned long ret; | 107 | unsigned long ret; |
108 | 108 | ||
109 | /* should return -EINVAL to userspace */ | 109 | /* should return -EINVAL to userspace */ |
110 | if (set_cpus_allowed(current, cpumask_of_cpu(cpu))) | 110 | if (set_cpus_allowed_ptr(current, cpumask_of(cpu))) |
111 | return 0; | 111 | return 0; |
112 | 112 | ||
113 | ret = func(arg); | 113 | ret = func(arg); |
114 | 114 | ||
115 | set_cpus_allowed(current, old_affinity); | 115 | set_cpus_allowed_ptr(current, &old_affinity); |
116 | 116 | ||
117 | return ret; | 117 | return ret; |
118 | } | 118 | } |
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c index bdc05a21908b..837dfc2390d6 100644 --- a/arch/sparc/kernel/traps_64.c +++ b/arch/sparc/kernel/traps_64.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/kdebug.h> | 19 | #include <linux/kdebug.h> |
20 | #include <linux/gfp.h> | ||
20 | 21 | ||
21 | #include <asm/smp.h> | 22 | #include <asm/smp.h> |
22 | #include <asm/delay.h> | 23 | #include <asm/delay.h> |
diff --git a/arch/sparc/kernel/us2e_cpufreq.c b/arch/sparc/kernel/us2e_cpufreq.c index 791c15138f3a..8f982b76c712 100644 --- a/arch/sparc/kernel/us2e_cpufreq.c +++ b/arch/sparc/kernel/us2e_cpufreq.c | |||
@@ -238,12 +238,12 @@ static unsigned int us2e_freq_get(unsigned int cpu) | |||
238 | return 0; | 238 | return 0; |
239 | 239 | ||
240 | cpus_allowed = current->cpus_allowed; | 240 | cpus_allowed = current->cpus_allowed; |
241 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 241 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
242 | 242 | ||
243 | clock_tick = sparc64_get_clock_tick(cpu) / 1000; | 243 | clock_tick = sparc64_get_clock_tick(cpu) / 1000; |
244 | estar = read_hbreg(HBIRD_ESTAR_MODE_ADDR); | 244 | estar = read_hbreg(HBIRD_ESTAR_MODE_ADDR); |
245 | 245 | ||
246 | set_cpus_allowed(current, cpus_allowed); | 246 | set_cpus_allowed_ptr(current, &cpus_allowed); |
247 | 247 | ||
248 | return clock_tick / estar_to_divisor(estar); | 248 | return clock_tick / estar_to_divisor(estar); |
249 | } | 249 | } |
@@ -259,7 +259,7 @@ static void us2e_set_cpu_divider_index(unsigned int cpu, unsigned int index) | |||
259 | return; | 259 | return; |
260 | 260 | ||
261 | cpus_allowed = current->cpus_allowed; | 261 | cpus_allowed = current->cpus_allowed; |
262 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 262 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
263 | 263 | ||
264 | new_freq = clock_tick = sparc64_get_clock_tick(cpu) / 1000; | 264 | new_freq = clock_tick = sparc64_get_clock_tick(cpu) / 1000; |
265 | new_bits = index_to_estar_mode(index); | 265 | new_bits = index_to_estar_mode(index); |
@@ -281,7 +281,7 @@ static void us2e_set_cpu_divider_index(unsigned int cpu, unsigned int index) | |||
281 | 281 | ||
282 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 282 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
283 | 283 | ||
284 | set_cpus_allowed(current, cpus_allowed); | 284 | set_cpus_allowed_ptr(current, &cpus_allowed); |
285 | } | 285 | } |
286 | 286 | ||
287 | static int us2e_freq_target(struct cpufreq_policy *policy, | 287 | static int us2e_freq_target(struct cpufreq_policy *policy, |
diff --git a/arch/sparc/kernel/us3_cpufreq.c b/arch/sparc/kernel/us3_cpufreq.c index 365b6464e2ce..f35d1e794548 100644 --- a/arch/sparc/kernel/us3_cpufreq.c +++ b/arch/sparc/kernel/us3_cpufreq.c | |||
@@ -86,12 +86,12 @@ static unsigned int us3_freq_get(unsigned int cpu) | |||
86 | return 0; | 86 | return 0; |
87 | 87 | ||
88 | cpus_allowed = current->cpus_allowed; | 88 | cpus_allowed = current->cpus_allowed; |
89 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 89 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
90 | 90 | ||
91 | reg = read_safari_cfg(); | 91 | reg = read_safari_cfg(); |
92 | ret = get_current_freq(cpu, reg); | 92 | ret = get_current_freq(cpu, reg); |
93 | 93 | ||
94 | set_cpus_allowed(current, cpus_allowed); | 94 | set_cpus_allowed_ptr(current, &cpus_allowed); |
95 | 95 | ||
96 | return ret; | 96 | return ret; |
97 | } | 97 | } |
@@ -106,7 +106,7 @@ static void us3_set_cpu_divider_index(unsigned int cpu, unsigned int index) | |||
106 | return; | 106 | return; |
107 | 107 | ||
108 | cpus_allowed = current->cpus_allowed; | 108 | cpus_allowed = current->cpus_allowed; |
109 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 109 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
110 | 110 | ||
111 | new_freq = sparc64_get_clock_tick(cpu) / 1000; | 111 | new_freq = sparc64_get_clock_tick(cpu) / 1000; |
112 | switch (index) { | 112 | switch (index) { |
@@ -140,7 +140,7 @@ static void us3_set_cpu_divider_index(unsigned int cpu, unsigned int index) | |||
140 | 140 | ||
141 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 141 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
142 | 142 | ||
143 | set_cpus_allowed(current, cpus_allowed); | 143 | set_cpus_allowed_ptr(current, &cpus_allowed); |
144 | } | 144 | } |
145 | 145 | ||
146 | static int us3_freq_target(struct cpufreq_policy *policy, | 146 | static int us3_freq_target(struct cpufreq_policy *policy, |
diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c index c28c71449a6c..3cb1def9806c 100644 --- a/arch/sparc/kernel/vio.c +++ b/arch/sparc/kernel/vio.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | 16 | ||
diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c index f27d10369e0c..5fdddf134caa 100644 --- a/arch/sparc/mm/hugetlbpage.c +++ b/arch/sparc/mm/hugetlbpage.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/hugetlb.h> | 11 | #include <linux/hugetlb.h> |
12 | #include <linux/pagemap.h> | 12 | #include <linux/pagemap.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/sysctl.h> | 13 | #include <linux/sysctl.h> |
15 | 14 | ||
16 | #include <asm/mman.h> | 15 | #include <asm/mman.h> |
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index dc7c3b17a15f..6d0e02c4fe09 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm/init_32.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/bootmem.h> | 24 | #include <linux/bootmem.h> |
25 | #include <linux/pagemap.h> | 25 | #include <linux/pagemap.h> |
26 | #include <linux/poison.h> | 26 | #include <linux/poison.h> |
27 | #include <linux/gfp.h> | ||
27 | 28 | ||
28 | #include <asm/sections.h> | 29 | #include <asm/sections.h> |
29 | #include <asm/system.h> | 30 | #include <asm/system.h> |
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 9245a822a2f1..b2831dc3c121 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/bootmem.h> | 13 | #include <linux/bootmem.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/hugetlb.h> | 15 | #include <linux/hugetlb.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/initrd.h> | 16 | #include <linux/initrd.h> |
18 | #include <linux/swap.h> | 17 | #include <linux/swap.h> |
19 | #include <linux/pagemap.h> | 18 | #include <linux/pagemap.h> |
@@ -26,6 +25,7 @@ | |||
26 | #include <linux/percpu.h> | 25 | #include <linux/percpu.h> |
27 | #include <linux/lmb.h> | 26 | #include <linux/lmb.h> |
28 | #include <linux/mmzone.h> | 27 | #include <linux/mmzone.h> |
28 | #include <linux/gfp.h> | ||
29 | 29 | ||
30 | #include <asm/head.h> | 30 | #include <asm/head.h> |
31 | #include <asm/system.h> | 31 | #include <asm/system.h> |
@@ -2117,7 +2117,7 @@ int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node) | |||
2117 | "node=%d entry=%lu/%lu\n", start, block, nr, | 2117 | "node=%d entry=%lu/%lu\n", start, block, nr, |
2118 | node, | 2118 | node, |
2119 | addr >> VMEMMAP_CHUNK_SHIFT, | 2119 | addr >> VMEMMAP_CHUNK_SHIFT, |
2120 | VMEMMAP_SIZE >> VMEMMAP_CHUNK_SHIFT); | 2120 | VMEMMAP_SIZE); |
2121 | } | 2121 | } |
2122 | } | 2122 | } |
2123 | return 0; | 2123 | return 0; |
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index df49b200ca4c..f5f75a58e0b3 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/vmalloc.h> | 13 | #include <linux/vmalloc.h> |
15 | #include <linux/pagemap.h> | 14 | #include <linux/pagemap.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
@@ -20,6 +19,7 @@ | |||
20 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
21 | #include <linux/kdebug.h> | 20 | #include <linux/kdebug.h> |
22 | #include <linux/log2.h> | 21 | #include <linux/log2.h> |
22 | #include <linux/gfp.h> | ||
23 | 23 | ||
24 | #include <asm/bitext.h> | 24 | #include <asm/bitext.h> |
25 | #include <asm/page.h> | 25 | #include <asm/page.h> |
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index 18652534b91a..cf38846753dd 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/bootmem.h> | 16 | #include <linux/bootmem.h> |
16 | #include <linux/highmem.h> | 17 | #include <linux/highmem.h> |
17 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
diff --git a/arch/sparc/mm/tsb.c b/arch/sparc/mm/tsb.c index 36a0813f9517..101d7c82870b 100644 --- a/arch/sparc/mm/tsb.c +++ b/arch/sparc/mm/tsb.c | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/preempt.h> | 7 | #include <linux/preempt.h> |
8 | #include <linux/slab.h> | ||
8 | #include <asm/system.h> | 9 | #include <asm/system.h> |
9 | #include <asm/page.h> | 10 | #include <asm/page.h> |
10 | #include <asm/tlbflush.h> | 11 | #include <asm/tlbflush.h> |
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index a74245ae3a84..f05372694233 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/rtnetlink.h> | 17 | #include <linux/rtnetlink.h> |
18 | #include <linux/skbuff.h> | 18 | #include <linux/skbuff.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
20 | #include "init.h" | 21 | #include "init.h" |
21 | #include "irq_kern.h" | 22 | #include "irq_kern.h" |
diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c index 4ebc8a34738f..a11573be0961 100644 --- a/arch/um/drivers/port_kern.c +++ b/arch/um/drivers/port_kern.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "linux/interrupt.h" | 7 | #include "linux/interrupt.h" |
8 | #include "linux/list.h" | 8 | #include "linux/list.h" |
9 | #include "linux/mutex.h" | 9 | #include "linux/mutex.h" |
10 | #include "linux/slab.h" | ||
10 | #include "linux/workqueue.h" | 11 | #include "linux/workqueue.h" |
11 | #include "asm/atomic.h" | 12 | #include "asm/atomic.h" |
12 | #include "init.h" | 13 | #include "init.h" |
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index c1ff6903b622..da992a3ad6b7 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "linux/ctype.h" | 31 | #include "linux/ctype.h" |
32 | #include "linux/capability.h" | 32 | #include "linux/capability.h" |
33 | #include "linux/mm.h" | 33 | #include "linux/mm.h" |
34 | #include "linux/slab.h" | ||
34 | #include "linux/vmalloc.h" | 35 | #include "linux/vmalloc.h" |
35 | #include "linux/blkpg.h" | 36 | #include "linux/blkpg.h" |
36 | #include "linux/genhd.h" | 37 | #include "linux/genhd.h" |
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c index fda30d21fb90..97974c1bdd12 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include "linux/smp_lock.h" | 8 | #include "linux/smp_lock.h" |
9 | #include "linux/ptrace.h" | 9 | #include "linux/ptrace.h" |
10 | #include "linux/sched.h" | 10 | #include "linux/sched.h" |
11 | #include "linux/slab.h" | ||
11 | #include "asm/current.h" | 12 | #include "asm/current.h" |
12 | #include "asm/processor.h" | 13 | #include "asm/processor.h" |
13 | #include "asm/uaccess.h" | 14 | #include "asm/uaccess.h" |
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 89474ba0741e..a3f0b04d7101 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include "linux/module.h" | 12 | #include "linux/module.h" |
13 | #include "linux/sched.h" | 13 | #include "linux/sched.h" |
14 | #include "linux/seq_file.h" | 14 | #include "linux/seq_file.h" |
15 | #include "linux/slab.h" | ||
15 | #include "as-layout.h" | 16 | #include "as-layout.h" |
16 | #include "kern_util.h" | 17 | #include "kern_util.h" |
17 | #include "os.h" | 18 | #include "os.h" |
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index a5d5e70cf6f5..8137ccc9635b 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
@@ -5,10 +5,10 @@ | |||
5 | 5 | ||
6 | #include <linux/stddef.h> | 6 | #include <linux/stddef.h> |
7 | #include <linux/bootmem.h> | 7 | #include <linux/bootmem.h> |
8 | #include <linux/gfp.h> | ||
9 | #include <linux/highmem.h> | 8 | #include <linux/highmem.h> |
10 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
11 | #include <linux/swap.h> | 10 | #include <linux/swap.h> |
11 | #include <linux/slab.h> | ||
12 | #include <asm/fixmap.h> | 12 | #include <asm/fixmap.h> |
13 | #include <asm/page.h> | 13 | #include <asm/page.h> |
14 | #include "as-layout.h" | 14 | #include "as-layout.h" |
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 2f910a1b7454..fab4371184f6 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c | |||
@@ -7,13 +7,13 @@ | |||
7 | #include <linux/stddef.h> | 7 | #include <linux/stddef.h> |
8 | #include <linux/err.h> | 8 | #include <linux/err.h> |
9 | #include <linux/hardirq.h> | 9 | #include <linux/hardirq.h> |
10 | #include <linux/gfp.h> | ||
11 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
13 | #include <linux/personality.h> | 12 | #include <linux/personality.h> |
14 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
15 | #include <linux/ptrace.h> | 14 | #include <linux/ptrace.h> |
16 | #include <linux/random.h> | 15 | #include <linux/random.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/seq_file.h> | 18 | #include <linux/seq_file.h> |
19 | #include <linux/tick.h> | 19 | #include <linux/tick.h> |
diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c index 00197d3d21ec..869bec9f2516 100644 --- a/arch/um/kernel/reboot.c +++ b/arch/um/kernel/reboot.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/sched.h" | 6 | #include "linux/sched.h" |
7 | #include "linux/slab.h" | ||
7 | #include "kern_util.h" | 8 | #include "kern_util.h" |
8 | #include "os.h" | 9 | #include "os.h" |
9 | #include "skas.h" | 10 | #include "skas.h" |
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index 8bfd1e905812..3d099f974785 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #include "linux/mm.h" | 6 | #include "linux/mm.h" |
7 | #include "linux/sched.h" | 7 | #include "linux/sched.h" |
8 | #include "linux/slab.h" | ||
8 | #include "asm/pgalloc.h" | 9 | #include "asm/pgalloc.h" |
9 | #include "asm/pgtable.h" | 10 | #include "asm/pgtable.h" |
10 | #include "as-layout.h" | 11 | #include "as-layout.h" |
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c index b6b1096152aa..06d6ccf0e444 100644 --- a/arch/um/os-Linux/helper.c +++ b/arch/um/os-Linux/helper.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <errno.h> | 8 | #include <errno.h> |
9 | #include <sched.h> | 9 | #include <sched.h> |
10 | #include <linux/limits.h> | 10 | #include <linux/limits.h> |
11 | #include <linux/slab.h> | ||
11 | #include <sys/socket.h> | 12 | #include <sys/socket.h> |
12 | #include <sys/wait.h> | 13 | #include <sys/wait.h> |
13 | #include "kern_constants.h" | 14 | #include "kern_constants.h" |
diff --git a/arch/um/sys-i386/ldt.c b/arch/um/sys-i386/ldt.c index a4846a84a7be..3f2bf208d884 100644 --- a/arch/um/sys-i386/ldt.c +++ b/arch/um/sys-i386/ldt.c | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/slab.h> | ||
8 | #include <asm/unistd.h> | 9 | #include <asm/unistd.h> |
9 | #include "os.h" | 10 | #include "os.h" |
10 | #include "proc_mm.h" | 11 | #include "proc_mm.h" |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 0eacb1ffb421..9458685902bd 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -1216,8 +1216,8 @@ config NUMA_EMU | |||
1216 | 1216 | ||
1217 | config NODES_SHIFT | 1217 | config NODES_SHIFT |
1218 | int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP | 1218 | int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP |
1219 | range 1 9 | 1219 | range 1 10 |
1220 | default "9" if MAXSMP | 1220 | default "10" if MAXSMP |
1221 | default "6" if X86_64 | 1221 | default "6" if X86_64 |
1222 | default "4" if X86_NUMAQ | 1222 | default "4" if X86_NUMAQ |
1223 | default "3" | 1223 | default "3" |
diff --git a/arch/x86/crypto/fpu.c b/arch/x86/crypto/fpu.c index daef6cd2b45d..1a8f8649c035 100644 --- a/arch/x86/crypto/fpu.c +++ b/arch/x86/crypto/fpu.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/slab.h> | ||
19 | #include <asm/i387.h> | 20 | #include <asm/i387.h> |
20 | 21 | ||
21 | struct crypto_fpu_ctx { | 22 | struct crypto_fpu_ctx { |
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index 280c019cfad8..0350311906ae 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/fcntl.h> | 21 | #include <linux/fcntl.h> |
22 | #include <linux/ptrace.h> | 22 | #include <linux/ptrace.h> |
23 | #include <linux/user.h> | 23 | #include <linux/user.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/binfmts.h> | 24 | #include <linux/binfmts.h> |
26 | #include <linux/personality.h> | 25 | #include <linux/personality.h> |
27 | #include <linux/init.h> | 26 | #include <linux/init.h> |
diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c index 74c35431b7d8..626be156d88d 100644 --- a/arch/x86/ia32/sys_ia32.c +++ b/arch/x86/ia32/sys_ia32.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/ptrace.h> | 40 | #include <linux/ptrace.h> |
41 | #include <linux/highuid.h> | 41 | #include <linux/highuid.h> |
42 | #include <linux/sysctl.h> | 42 | #include <linux/sysctl.h> |
43 | #include <linux/slab.h> | ||
43 | #include <asm/mman.h> | 44 | #include <asm/mman.h> |
44 | #include <asm/types.h> | 45 | #include <asm/types.h> |
45 | #include <asm/uaccess.h> | 46 | #include <asm/uaccess.h> |
diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h index 635f03bb4995..d07b44f7d1dc 100644 --- a/arch/x86/include/asm/fixmap.h +++ b/arch/x86/include/asm/fixmap.h | |||
@@ -82,6 +82,9 @@ enum fixed_addresses { | |||
82 | #endif | 82 | #endif |
83 | FIX_DBGP_BASE, | 83 | FIX_DBGP_BASE, |
84 | FIX_EARLYCON_MEM_BASE, | 84 | FIX_EARLYCON_MEM_BASE, |
85 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT | ||
86 | FIX_OHCI1394_BASE, | ||
87 | #endif | ||
85 | #ifdef CONFIG_X86_LOCAL_APIC | 88 | #ifdef CONFIG_X86_LOCAL_APIC |
86 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ | 89 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ |
87 | #endif | 90 | #endif |
@@ -132,9 +135,6 @@ enum fixed_addresses { | |||
132 | (__end_of_permanent_fixed_addresses & (TOTAL_FIX_BTMAPS - 1)) | 135 | (__end_of_permanent_fixed_addresses & (TOTAL_FIX_BTMAPS - 1)) |
133 | : __end_of_permanent_fixed_addresses, | 136 | : __end_of_permanent_fixed_addresses, |
134 | FIX_BTMAP_BEGIN = FIX_BTMAP_END + TOTAL_FIX_BTMAPS - 1, | 137 | FIX_BTMAP_BEGIN = FIX_BTMAP_END + TOTAL_FIX_BTMAPS - 1, |
135 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT | ||
136 | FIX_OHCI1394_BASE, | ||
137 | #endif | ||
138 | #ifdef CONFIG_X86_32 | 138 | #ifdef CONFIG_X86_32 |
139 | FIX_WP_TEST, | 139 | FIX_WP_TEST, |
140 | #endif | 140 | #endif |
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h index a929c9ede33d..46c0fe05f230 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h | |||
@@ -133,6 +133,7 @@ extern void (*__initconst interrupt[NR_VECTORS-FIRST_EXTERNAL_VECTOR])(void); | |||
133 | 133 | ||
134 | typedef int vector_irq_t[NR_VECTORS]; | 134 | typedef int vector_irq_t[NR_VECTORS]; |
135 | DECLARE_PER_CPU(vector_irq_t, vector_irq); | 135 | DECLARE_PER_CPU(vector_irq_t, vector_irq); |
136 | extern void setup_vector_irq(int cpu); | ||
136 | 137 | ||
137 | #ifdef CONFIG_X86_IO_APIC | 138 | #ifdef CONFIG_X86_IO_APIC |
138 | extern void lock_vector_lock(void); | 139 | extern void lock_vector_lock(void); |
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index 1cd58cdbc03f..4604e6a54d36 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h | |||
@@ -105,6 +105,8 @@ | |||
105 | #define MSR_AMD64_PATCH_LEVEL 0x0000008b | 105 | #define MSR_AMD64_PATCH_LEVEL 0x0000008b |
106 | #define MSR_AMD64_NB_CFG 0xc001001f | 106 | #define MSR_AMD64_NB_CFG 0xc001001f |
107 | #define MSR_AMD64_PATCH_LOADER 0xc0010020 | 107 | #define MSR_AMD64_PATCH_LOADER 0xc0010020 |
108 | #define MSR_AMD64_OSVW_ID_LENGTH 0xc0010140 | ||
109 | #define MSR_AMD64_OSVW_STATUS 0xc0010141 | ||
108 | #define MSR_AMD64_IBSFETCHCTL 0xc0011030 | 110 | #define MSR_AMD64_IBSFETCHCTL 0xc0011030 |
109 | #define MSR_AMD64_IBSFETCHLINAD 0xc0011031 | 111 | #define MSR_AMD64_IBSFETCHLINAD 0xc0011031 |
110 | #define MSR_AMD64_IBSFETCHPHYSAD 0xc0011032 | 112 | #define MSR_AMD64_IBSFETCHPHYSAD 0xc0011032 |
diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h index 47339a1ac7b6..2984a25ff383 100644 --- a/arch/x86/include/asm/pgtable_32.h +++ b/arch/x86/include/asm/pgtable_32.h | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <asm/paravirt.h> | 19 | #include <asm/paravirt.h> |
20 | 20 | ||
21 | #include <linux/bitops.h> | 21 | #include <linux/bitops.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/list.h> | 22 | #include <linux/list.h> |
24 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
25 | 24 | ||
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 0061ea263061..cd40aba6aa95 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/dmi.h> | 32 | #include <linux/dmi.h> |
33 | #include <linux/irq.h> | 33 | #include <linux/irq.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/bootmem.h> | 35 | #include <linux/bootmem.h> |
35 | #include <linux/ioport.h> | 36 | #include <linux/ioport.h> |
36 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index 3a4bf35c179b..1a160d5d44d0 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/vmalloc.h> | 8 | #include <linux/vmalloc.h> |
9 | #include <linux/memory.h> | 9 | #include <linux/memory.h> |
10 | #include <linux/stop_machine.h> | 10 | #include <linux/stop_machine.h> |
11 | #include <linux/slab.h> | ||
11 | #include <asm/alternative.h> | 12 | #include <asm/alternative.h> |
12 | #include <asm/sections.h> | 13 | #include <asm/sections.h> |
13 | #include <asm/pgtable.h> | 14 | #include <asm/pgtable.h> |
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index adb0ba025702..f3dadb571d9b 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -18,8 +18,8 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
21 | #include <linux/gfp.h> | ||
22 | #include <linux/bitmap.h> | 21 | #include <linux/bitmap.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/debugfs.h> | 23 | #include <linux/debugfs.h> |
24 | #include <linux/scatterlist.h> | 24 | #include <linux/scatterlist.h> |
25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 9dc91b431470..42f5350b908f 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
@@ -19,8 +19,8 @@ | |||
19 | 19 | ||
20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
21 | #include <linux/acpi.h> | 21 | #include <linux/acpi.h> |
22 | #include <linux/gfp.h> | ||
23 | #include <linux/list.h> | 22 | #include <linux/list.h> |
23 | #include <linux/slab.h> | ||
24 | #include <linux/sysdev.h> | 24 | #include <linux/sysdev.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/msi.h> | 26 | #include <linux/msi.h> |
diff --git a/arch/x86/kernel/apb_timer.c b/arch/x86/kernel/apb_timer.c index 4b7099526d2c..ff469e470059 100644 --- a/arch/x86/kernel/apb_timer.c +++ b/arch/x86/kernel/apb_timer.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
35 | #include <linux/sysdev.h> | 35 | #include <linux/sysdev.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/pm.h> | 37 | #include <linux/pm.h> |
37 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
38 | #include <linux/sfi.h> | 39 | #include <linux/sfi.h> |
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 00187f1fcfb7..e5a4a1e01618 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -1640,8 +1640,10 @@ int __init APIC_init_uniprocessor(void) | |||
1640 | } | 1640 | } |
1641 | #endif | 1641 | #endif |
1642 | 1642 | ||
1643 | #ifndef CONFIG_SMP | ||
1643 | enable_IR_x2apic(); | 1644 | enable_IR_x2apic(); |
1644 | default_setup_apic_routing(); | 1645 | default_setup_apic_routing(); |
1646 | #endif | ||
1645 | 1647 | ||
1646 | verify_local_APIC(); | 1648 | verify_local_APIC(); |
1647 | connect_bsp_APIC(); | 1649 | connect_bsp_APIC(); |
diff --git a/arch/x86/kernel/apic/es7000_32.c b/arch/x86/kernel/apic/es7000_32.c index dd2b5f264643..03ba1b895f5e 100644 --- a/arch/x86/kernel/apic/es7000_32.c +++ b/arch/x86/kernel/apic/es7000_32.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/errno.h> | 42 | #include <linux/errno.h> |
43 | #include <linux/acpi.h> | 43 | #include <linux/acpi.h> |
44 | #include <linux/init.h> | 44 | #include <linux/init.h> |
45 | #include <linux/gfp.h> | ||
45 | #include <linux/nmi.h> | 46 | #include <linux/nmi.h> |
46 | #include <linux/smp.h> | 47 | #include <linux/smp.h> |
47 | #include <linux/io.h> | 48 | #include <linux/io.h> |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index e4e0ddcb1546..127b8718abfb 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/freezer.h> | 36 | #include <linux/freezer.h> |
37 | #include <linux/kthread.h> | 37 | #include <linux/kthread.h> |
38 | #include <linux/jiffies.h> /* time_after() */ | 38 | #include <linux/jiffies.h> /* time_after() */ |
39 | #include <linux/slab.h> | ||
39 | #ifdef CONFIG_ACPI | 40 | #ifdef CONFIG_ACPI |
40 | #include <acpi/acpi_bus.h> | 41 | #include <acpi/acpi_bus.h> |
41 | #endif | 42 | #endif |
@@ -1268,6 +1269,14 @@ void __setup_vector_irq(int cpu) | |||
1268 | /* Mark the inuse vectors */ | 1269 | /* Mark the inuse vectors */ |
1269 | for_each_irq_desc(irq, desc) { | 1270 | for_each_irq_desc(irq, desc) { |
1270 | cfg = desc->chip_data; | 1271 | cfg = desc->chip_data; |
1272 | |||
1273 | /* | ||
1274 | * If it is a legacy IRQ handled by the legacy PIC, this cpu | ||
1275 | * will be part of the irq_cfg's domain. | ||
1276 | */ | ||
1277 | if (irq < legacy_pic->nr_legacy_irqs && !IO_APIC_IRQ(irq)) | ||
1278 | cpumask_set_cpu(cpu, cfg->domain); | ||
1279 | |||
1271 | if (!cpumask_test_cpu(cpu, cfg->domain)) | 1280 | if (!cpumask_test_cpu(cpu, cfg->domain)) |
1272 | continue; | 1281 | continue; |
1273 | vector = cfg->vector; | 1282 | vector = cfg->vector; |
diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c index 8aa65adbd25d..1edaf15c0b8e 100644 --- a/arch/x86/kernel/apic/nmi.c +++ b/arch/x86/kernel/apic/nmi.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/sysdev.h> | 22 | #include <linux/sysdev.h> |
22 | #include <linux/sysctl.h> | 23 | #include <linux/sysctl.h> |
23 | #include <linux/percpu.h> | 24 | #include <linux/percpu.h> |
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 49dbeaef2a27..c085d52dbaf2 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/ctype.h> | 17 | #include <linux/ctype.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/cpu.h> | 21 | #include <linux/cpu.h> |
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
22 | #include <linux/io.h> | 23 | #include <linux/io.h> |
diff --git a/arch/x86/kernel/bootflag.c b/arch/x86/kernel/bootflag.c index 30f25a75fe28..5de7f4c56971 100644 --- a/arch/x86/kernel/bootflag.c +++ b/arch/x86/kernel/bootflag.c | |||
@@ -5,7 +5,6 @@ | |||
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/string.h> | 7 | #include <linux/string.h> |
8 | #include <linux/slab.h> | ||
9 | #include <linux/spinlock.h> | 8 | #include <linux/spinlock.h> |
10 | #include <linux/acpi.h> | 9 | #include <linux/acpi.h> |
11 | #include <asm/io.h> | 10 | #include <asm/io.h> |
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index 1b1920fa7c80..459168083b77 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/cpufreq.h> | 33 | #include <linux/cpufreq.h> |
34 | #include <linux/compiler.h> | 34 | #include <linux/compiler.h> |
35 | #include <linux/dmi.h> | 35 | #include <linux/dmi.h> |
36 | #include <linux/slab.h> | ||
36 | #include <trace/events/power.h> | 37 | #include <trace/events/power.h> |
37 | 38 | ||
38 | #include <linux/acpi.h> | 39 | #include <linux/acpi.h> |
diff --git a/arch/x86/kernel/cpu/cpufreq/elanfreq.c b/arch/x86/kernel/cpu/cpufreq/elanfreq.c index 006b278b0d5d..c587db472a75 100644 --- a/arch/x86/kernel/cpu/cpufreq/elanfreq.c +++ b/arch/x86/kernel/cpu/cpufreq/elanfreq.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | 22 | ||
23 | #include <linux/slab.h> | ||
24 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
25 | #include <linux/cpufreq.h> | 24 | #include <linux/cpufreq.h> |
26 | 25 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c index ac27ec2264d5..16e3483be9e3 100644 --- a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c +++ b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c | |||
@@ -80,6 +80,7 @@ | |||
80 | #include <linux/cpufreq.h> | 80 | #include <linux/cpufreq.h> |
81 | #include <linux/pci.h> | 81 | #include <linux/pci.h> |
82 | #include <linux/errno.h> | 82 | #include <linux/errno.h> |
83 | #include <linux/slab.h> | ||
83 | 84 | ||
84 | #include <asm/processor-cyrix.h> | 85 | #include <asm/processor-cyrix.h> |
85 | 86 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/longrun.c b/arch/x86/kernel/cpu/cpufreq/longrun.c index da5f70fcb766..e7b559d74c52 100644 --- a/arch/x86/kernel/cpu/cpufreq/longrun.c +++ b/arch/x86/kernel/cpu/cpufreq/longrun.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/cpufreq.h> | 12 | #include <linux/cpufreq.h> |
14 | #include <linux/timex.h> | 13 | #include <linux/timex.h> |
15 | 14 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c index 869615193720..7b8a8ba67b07 100644 --- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/smp.h> | 26 | #include <linux/smp.h> |
27 | #include <linux/cpufreq.h> | 27 | #include <linux/cpufreq.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/cpumask.h> | 28 | #include <linux/cpumask.h> |
30 | #include <linux/timex.h> | 29 | #include <linux/timex.h> |
31 | 30 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c index ff36d2979a90..ce7cde713e71 100644 --- a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
31 | #include <linux/cpufreq.h> | 31 | #include <linux/cpufreq.h> |
32 | #include <linux/compiler.h> | 32 | #include <linux/compiler.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include <linux/acpi.h> | 35 | #include <linux/acpi.h> |
35 | #include <linux/io.h> | 36 | #include <linux/io.h> |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c index cb01dac267d3..b3379d6a5c57 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/cpufreq.h> | 14 | #include <linux/cpufreq.h> |
15 | #include <linux/ioport.h> | 15 | #include <linux/ioport.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/timex.h> | 16 | #include <linux/timex.h> |
18 | #include <linux/io.h> | 17 | #include <linux/io.h> |
19 | 18 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c index 8d672ef162ce..9b1ff37de46a 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/sched.h> /* current */ | 20 | #include <linux/sched.h> /* current */ |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/compiler.h> | 22 | #include <linux/compiler.h> |
23 | #include <linux/gfp.h> | ||
23 | 24 | ||
24 | #include <asm/msr.h> | 25 | #include <asm/msr.h> |
25 | #include <asm/processor.h> | 26 | #include <asm/processor.h> |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c index 2ce8e0b5cc54..561758e95180 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/cpufreq.h> | 24 | #include <linux/cpufreq.h> |
25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
28 | 27 | ||
29 | #include "speedstep-lib.h" | 28 | #include "speedstep-lib.h" |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c index ad0083abfa23..a94ec6be69fa 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/moduleparam.h> | 13 | #include <linux/moduleparam.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/cpufreq.h> | 15 | #include <linux/cpufreq.h> |
16 | #include <linux/slab.h> | ||
17 | 16 | ||
18 | #include <asm/msr.h> | 17 | #include <asm/msr.h> |
19 | #include <asm/tsc.h> | 18 | #include <asm/tsc.h> |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c b/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c index 04d73c114e49..8abd869baabf 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/moduleparam.h> | 17 | #include <linux/moduleparam.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/cpufreq.h> | 19 | #include <linux/cpufreq.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
22 | #include <linux/io.h> | 21 | #include <linux/io.h> |
23 | #include <asm/ist.h> | 22 | #include <asm/ist.h> |
diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c index 73734baa50f2..e7dbde7bfedb 100644 --- a/arch/x86/kernel/cpu/mcheck/mce-inject.c +++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/kdebug.h> | 22 | #include <linux/kdebug.h> |
23 | #include <linux/cpu.h> | 23 | #include <linux/cpu.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/gfp.h> | ||
25 | #include <asm/mce.h> | 26 | #include <asm/mce.h> |
26 | #include <asm/apic.h> | 27 | #include <asm/apic.h> |
27 | 28 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 3ab9c886b613..8a6f0afa767e 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/sysfs.h> | 27 | #include <linux/sysfs.h> |
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/init.h> | 30 | #include <linux/init.h> |
30 | #include <linux/kmod.h> | 31 | #include <linux/kmod.h> |
31 | #include <linux/poll.h> | 32 | #include <linux/poll.h> |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index cda932ca3ade..224392d8fe8c 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/sysfs.h> | 23 | #include <linux/sysfs.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/cpu.h> | 26 | #include <linux/cpu.h> |
26 | #include <linux/smp.h> | 27 | #include <linux/smp.h> |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel.c b/arch/x86/kernel/cpu/mcheck/mce_intel.c index d15df6e49bf0..62b48e40920a 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_intel.c +++ b/arch/x86/kernel/cpu/mcheck/mce_intel.c | |||
@@ -5,6 +5,7 @@ | |||
5 | * Author: Andi Kleen | 5 | * Author: Andi Kleen |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/gfp.h> | ||
8 | #include <linux/init.h> | 9 | #include <linux/init.h> |
9 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
10 | #include <linux/percpu.h> | 11 | #include <linux/percpu.h> |
diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index 9aa5dc76ff4a..fd31a441c61c 100644 --- a/arch/x86/kernel/cpu/mtrr/generic.c +++ b/arch/x86/kernel/cpu/mtrr/generic.c | |||
@@ -6,7 +6,6 @@ | |||
6 | 6 | ||
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/slab.h> | ||
10 | #include <linux/io.h> | 9 | #include <linux/io.h> |
11 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
12 | 11 | ||
diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c index e006e56f699c..79289632cb27 100644 --- a/arch/x86/kernel/cpu/mtrr/if.c +++ b/arch/x86/kernel/cpu/mtrr/if.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/ctype.h> | 6 | #include <linux/ctype.h> |
7 | #include <linux/string.h> | 7 | #include <linux/string.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/init.h> | 9 | #include <linux/init.h> |
9 | 10 | ||
10 | #define LINE_SIZE 80 | 11 | #define LINE_SIZE 80 |
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 60398a0d947c..db5bdc8addf8 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/kdebug.h> | 21 | #include <linux/kdebug.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/uaccess.h> | 23 | #include <linux/uaccess.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/highmem.h> | 25 | #include <linux/highmem.h> |
25 | #include <linux/cpu.h> | 26 | #include <linux/cpu.h> |
26 | #include <linux/bitops.h> | 27 | #include <linux/bitops.h> |
@@ -28,6 +29,7 @@ | |||
28 | #include <asm/apic.h> | 29 | #include <asm/apic.h> |
29 | #include <asm/stacktrace.h> | 30 | #include <asm/stacktrace.h> |
30 | #include <asm/nmi.h> | 31 | #include <asm/nmi.h> |
32 | #include <asm/compat.h> | ||
31 | 33 | ||
32 | static u64 perf_event_mask __read_mostly; | 34 | static u64 perf_event_mask __read_mostly; |
33 | 35 | ||
@@ -158,7 +160,7 @@ struct x86_pmu { | |||
158 | struct perf_event *event); | 160 | struct perf_event *event); |
159 | struct event_constraint *event_constraints; | 161 | struct event_constraint *event_constraints; |
160 | 162 | ||
161 | void (*cpu_prepare)(int cpu); | 163 | int (*cpu_prepare)(int cpu); |
162 | void (*cpu_starting)(int cpu); | 164 | void (*cpu_starting)(int cpu); |
163 | void (*cpu_dying)(int cpu); | 165 | void (*cpu_dying)(int cpu); |
164 | void (*cpu_dead)(int cpu); | 166 | void (*cpu_dead)(int cpu); |
@@ -1333,11 +1335,12 @@ static int __cpuinit | |||
1333 | x86_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) | 1335 | x86_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) |
1334 | { | 1336 | { |
1335 | unsigned int cpu = (long)hcpu; | 1337 | unsigned int cpu = (long)hcpu; |
1338 | int ret = NOTIFY_OK; | ||
1336 | 1339 | ||
1337 | switch (action & ~CPU_TASKS_FROZEN) { | 1340 | switch (action & ~CPU_TASKS_FROZEN) { |
1338 | case CPU_UP_PREPARE: | 1341 | case CPU_UP_PREPARE: |
1339 | if (x86_pmu.cpu_prepare) | 1342 | if (x86_pmu.cpu_prepare) |
1340 | x86_pmu.cpu_prepare(cpu); | 1343 | ret = x86_pmu.cpu_prepare(cpu); |
1341 | break; | 1344 | break; |
1342 | 1345 | ||
1343 | case CPU_STARTING: | 1346 | case CPU_STARTING: |
@@ -1350,6 +1353,7 @@ x86_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) | |||
1350 | x86_pmu.cpu_dying(cpu); | 1353 | x86_pmu.cpu_dying(cpu); |
1351 | break; | 1354 | break; |
1352 | 1355 | ||
1356 | case CPU_UP_CANCELED: | ||
1353 | case CPU_DEAD: | 1357 | case CPU_DEAD: |
1354 | if (x86_pmu.cpu_dead) | 1358 | if (x86_pmu.cpu_dead) |
1355 | x86_pmu.cpu_dead(cpu); | 1359 | x86_pmu.cpu_dead(cpu); |
@@ -1359,7 +1363,7 @@ x86_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) | |||
1359 | break; | 1363 | break; |
1360 | } | 1364 | } |
1361 | 1365 | ||
1362 | return NOTIFY_OK; | 1366 | return ret; |
1363 | } | 1367 | } |
1364 | 1368 | ||
1365 | static void __init pmu_check_apic(void) | 1369 | static void __init pmu_check_apic(void) |
@@ -1628,14 +1632,42 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n) | |||
1628 | return len; | 1632 | return len; |
1629 | } | 1633 | } |
1630 | 1634 | ||
1631 | static int copy_stack_frame(const void __user *fp, struct stack_frame *frame) | 1635 | #ifdef CONFIG_COMPAT |
1636 | static inline int | ||
1637 | perf_callchain_user32(struct pt_regs *regs, struct perf_callchain_entry *entry) | ||
1632 | { | 1638 | { |
1633 | unsigned long bytes; | 1639 | /* 32-bit process in 64-bit kernel. */ |
1640 | struct stack_frame_ia32 frame; | ||
1641 | const void __user *fp; | ||
1634 | 1642 | ||
1635 | bytes = copy_from_user_nmi(frame, fp, sizeof(*frame)); | 1643 | if (!test_thread_flag(TIF_IA32)) |
1644 | return 0; | ||
1645 | |||
1646 | fp = compat_ptr(regs->bp); | ||
1647 | while (entry->nr < PERF_MAX_STACK_DEPTH) { | ||
1648 | unsigned long bytes; | ||
1649 | frame.next_frame = 0; | ||
1650 | frame.return_address = 0; | ||
1651 | |||
1652 | bytes = copy_from_user_nmi(&frame, fp, sizeof(frame)); | ||
1653 | if (bytes != sizeof(frame)) | ||
1654 | break; | ||
1655 | |||
1656 | if (fp < compat_ptr(regs->sp)) | ||
1657 | break; | ||
1636 | 1658 | ||
1637 | return bytes == sizeof(*frame); | 1659 | callchain_store(entry, frame.return_address); |
1660 | fp = compat_ptr(frame.next_frame); | ||
1661 | } | ||
1662 | return 1; | ||
1663 | } | ||
1664 | #else | ||
1665 | static inline int | ||
1666 | perf_callchain_user32(struct pt_regs *regs, struct perf_callchain_entry *entry) | ||
1667 | { | ||
1668 | return 0; | ||
1638 | } | 1669 | } |
1670 | #endif | ||
1639 | 1671 | ||
1640 | static void | 1672 | static void |
1641 | perf_callchain_user(struct pt_regs *regs, struct perf_callchain_entry *entry) | 1673 | perf_callchain_user(struct pt_regs *regs, struct perf_callchain_entry *entry) |
@@ -1651,11 +1683,16 @@ perf_callchain_user(struct pt_regs *regs, struct perf_callchain_entry *entry) | |||
1651 | callchain_store(entry, PERF_CONTEXT_USER); | 1683 | callchain_store(entry, PERF_CONTEXT_USER); |
1652 | callchain_store(entry, regs->ip); | 1684 | callchain_store(entry, regs->ip); |
1653 | 1685 | ||
1686 | if (perf_callchain_user32(regs, entry)) | ||
1687 | return; | ||
1688 | |||
1654 | while (entry->nr < PERF_MAX_STACK_DEPTH) { | 1689 | while (entry->nr < PERF_MAX_STACK_DEPTH) { |
1690 | unsigned long bytes; | ||
1655 | frame.next_frame = NULL; | 1691 | frame.next_frame = NULL; |
1656 | frame.return_address = 0; | 1692 | frame.return_address = 0; |
1657 | 1693 | ||
1658 | if (!copy_stack_frame(fp, &frame)) | 1694 | bytes = copy_from_user_nmi(&frame, fp, sizeof(frame)); |
1695 | if (bytes != sizeof(frame)) | ||
1659 | break; | 1696 | break; |
1660 | 1697 | ||
1661 | if ((unsigned long)fp < regs->sp) | 1698 | if ((unsigned long)fp < regs->sp) |
@@ -1702,7 +1739,6 @@ struct perf_callchain_entry *perf_callchain(struct pt_regs *regs) | |||
1702 | return entry; | 1739 | return entry; |
1703 | } | 1740 | } |
1704 | 1741 | ||
1705 | #ifdef CONFIG_EVENT_TRACING | ||
1706 | void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip) | 1742 | void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip) |
1707 | { | 1743 | { |
1708 | regs->ip = ip; | 1744 | regs->ip = ip; |
@@ -1714,4 +1750,3 @@ void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int ski | |||
1714 | regs->cs = __KERNEL_CS; | 1750 | regs->cs = __KERNEL_CS; |
1715 | local_save_flags(regs->flags); | 1751 | local_save_flags(regs->flags); |
1716 | } | 1752 | } |
1717 | #endif | ||
diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c index b87e0b6970cb..db6f7d4056e1 100644 --- a/arch/x86/kernel/cpu/perf_event_amd.c +++ b/arch/x86/kernel/cpu/perf_event_amd.c | |||
@@ -137,6 +137,13 @@ static inline int amd_is_nb_event(struct hw_perf_event *hwc) | |||
137 | return (hwc->config & 0xe0) == 0xe0; | 137 | return (hwc->config & 0xe0) == 0xe0; |
138 | } | 138 | } |
139 | 139 | ||
140 | static inline int amd_has_nb(struct cpu_hw_events *cpuc) | ||
141 | { | ||
142 | struct amd_nb *nb = cpuc->amd_nb; | ||
143 | |||
144 | return nb && nb->nb_id != -1; | ||
145 | } | ||
146 | |||
140 | static void amd_put_event_constraints(struct cpu_hw_events *cpuc, | 147 | static void amd_put_event_constraints(struct cpu_hw_events *cpuc, |
141 | struct perf_event *event) | 148 | struct perf_event *event) |
142 | { | 149 | { |
@@ -147,7 +154,7 @@ static void amd_put_event_constraints(struct cpu_hw_events *cpuc, | |||
147 | /* | 154 | /* |
148 | * only care about NB events | 155 | * only care about NB events |
149 | */ | 156 | */ |
150 | if (!(nb && amd_is_nb_event(hwc))) | 157 | if (!(amd_has_nb(cpuc) && amd_is_nb_event(hwc))) |
151 | return; | 158 | return; |
152 | 159 | ||
153 | /* | 160 | /* |
@@ -214,7 +221,7 @@ amd_get_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) | |||
214 | /* | 221 | /* |
215 | * if not NB event or no NB, then no constraints | 222 | * if not NB event or no NB, then no constraints |
216 | */ | 223 | */ |
217 | if (!(nb && amd_is_nb_event(hwc))) | 224 | if (!(amd_has_nb(cpuc) && amd_is_nb_event(hwc))) |
218 | return &unconstrained; | 225 | return &unconstrained; |
219 | 226 | ||
220 | /* | 227 | /* |
@@ -293,51 +300,55 @@ static struct amd_nb *amd_alloc_nb(int cpu, int nb_id) | |||
293 | return nb; | 300 | return nb; |
294 | } | 301 | } |
295 | 302 | ||
296 | static void amd_pmu_cpu_online(int cpu) | 303 | static int amd_pmu_cpu_prepare(int cpu) |
304 | { | ||
305 | struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); | ||
306 | |||
307 | WARN_ON_ONCE(cpuc->amd_nb); | ||
308 | |||
309 | if (boot_cpu_data.x86_max_cores < 2) | ||
310 | return NOTIFY_OK; | ||
311 | |||
312 | cpuc->amd_nb = amd_alloc_nb(cpu, -1); | ||
313 | if (!cpuc->amd_nb) | ||
314 | return NOTIFY_BAD; | ||
315 | |||
316 | return NOTIFY_OK; | ||
317 | } | ||
318 | |||
319 | static void amd_pmu_cpu_starting(int cpu) | ||
297 | { | 320 | { |
298 | struct cpu_hw_events *cpu1, *cpu2; | 321 | struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); |
299 | struct amd_nb *nb = NULL; | 322 | struct amd_nb *nb; |
300 | int i, nb_id; | 323 | int i, nb_id; |
301 | 324 | ||
302 | if (boot_cpu_data.x86_max_cores < 2) | 325 | if (boot_cpu_data.x86_max_cores < 2) |
303 | return; | 326 | return; |
304 | 327 | ||
305 | /* | ||
306 | * function may be called too early in the | ||
307 | * boot process, in which case nb_id is bogus | ||
308 | */ | ||
309 | nb_id = amd_get_nb_id(cpu); | 328 | nb_id = amd_get_nb_id(cpu); |
310 | if (nb_id == BAD_APICID) | 329 | WARN_ON_ONCE(nb_id == BAD_APICID); |
311 | return; | ||
312 | |||
313 | cpu1 = &per_cpu(cpu_hw_events, cpu); | ||
314 | cpu1->amd_nb = NULL; | ||
315 | 330 | ||
316 | raw_spin_lock(&amd_nb_lock); | 331 | raw_spin_lock(&amd_nb_lock); |
317 | 332 | ||
318 | for_each_online_cpu(i) { | 333 | for_each_online_cpu(i) { |
319 | cpu2 = &per_cpu(cpu_hw_events, i); | 334 | nb = per_cpu(cpu_hw_events, i).amd_nb; |
320 | nb = cpu2->amd_nb; | 335 | if (WARN_ON_ONCE(!nb)) |
321 | if (!nb) | ||
322 | continue; | 336 | continue; |
323 | if (nb->nb_id == nb_id) | ||
324 | goto found; | ||
325 | } | ||
326 | 337 | ||
327 | nb = amd_alloc_nb(cpu, nb_id); | 338 | if (nb->nb_id == nb_id) { |
328 | if (!nb) { | 339 | kfree(cpuc->amd_nb); |
329 | pr_err("perf_events: failed NB allocation for CPU%d\n", cpu); | 340 | cpuc->amd_nb = nb; |
330 | raw_spin_unlock(&amd_nb_lock); | 341 | break; |
331 | return; | 342 | } |
332 | } | 343 | } |
333 | found: | 344 | |
334 | nb->refcnt++; | 345 | cpuc->amd_nb->nb_id = nb_id; |
335 | cpu1->amd_nb = nb; | 346 | cpuc->amd_nb->refcnt++; |
336 | 347 | ||
337 | raw_spin_unlock(&amd_nb_lock); | 348 | raw_spin_unlock(&amd_nb_lock); |
338 | } | 349 | } |
339 | 350 | ||
340 | static void amd_pmu_cpu_offline(int cpu) | 351 | static void amd_pmu_cpu_dead(int cpu) |
341 | { | 352 | { |
342 | struct cpu_hw_events *cpuhw; | 353 | struct cpu_hw_events *cpuhw; |
343 | 354 | ||
@@ -349,8 +360,10 @@ static void amd_pmu_cpu_offline(int cpu) | |||
349 | raw_spin_lock(&amd_nb_lock); | 360 | raw_spin_lock(&amd_nb_lock); |
350 | 361 | ||
351 | if (cpuhw->amd_nb) { | 362 | if (cpuhw->amd_nb) { |
352 | if (--cpuhw->amd_nb->refcnt == 0) | 363 | struct amd_nb *nb = cpuhw->amd_nb; |
353 | kfree(cpuhw->amd_nb); | 364 | |
365 | if (nb->nb_id == -1 || --nb->refcnt == 0) | ||
366 | kfree(nb); | ||
354 | 367 | ||
355 | cpuhw->amd_nb = NULL; | 368 | cpuhw->amd_nb = NULL; |
356 | } | 369 | } |
@@ -379,8 +392,9 @@ static __initconst struct x86_pmu amd_pmu = { | |||
379 | .get_event_constraints = amd_get_event_constraints, | 392 | .get_event_constraints = amd_get_event_constraints, |
380 | .put_event_constraints = amd_put_event_constraints, | 393 | .put_event_constraints = amd_put_event_constraints, |
381 | 394 | ||
382 | .cpu_prepare = amd_pmu_cpu_online, | 395 | .cpu_prepare = amd_pmu_cpu_prepare, |
383 | .cpu_dead = amd_pmu_cpu_offline, | 396 | .cpu_starting = amd_pmu_cpu_starting, |
397 | .cpu_dead = amd_pmu_cpu_dead, | ||
384 | }; | 398 | }; |
385 | 399 | ||
386 | static __init int amd_pmu_init(void) | 400 | static __init int amd_pmu_init(void) |
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c index 84bfde64a337..9c794ac87837 100644 --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c | |||
@@ -936,6 +936,7 @@ static __init int intel_pmu_init(void) | |||
936 | 936 | ||
937 | case 26: /* 45 nm nehalem, "Bloomfield" */ | 937 | case 26: /* 45 nm nehalem, "Bloomfield" */ |
938 | case 30: /* 45 nm nehalem, "Lynnfield" */ | 938 | case 30: /* 45 nm nehalem, "Lynnfield" */ |
939 | case 46: /* 45 nm nehalem-ex, "Beckton" */ | ||
939 | memcpy(hw_cache_event_ids, nehalem_hw_cache_event_ids, | 940 | memcpy(hw_cache_event_ids, nehalem_hw_cache_event_ids, |
940 | sizeof(hw_cache_event_ids)); | 941 | sizeof(hw_cache_event_ids)); |
941 | 942 | ||
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c index 83e5e628de73..8b862d5900fe 100644 --- a/arch/x86/kernel/cpuid.c +++ b/arch/x86/kernel/cpuid.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/cpu.h> | 40 | #include <linux/cpu.h> |
41 | #include <linux/notifier.h> | 41 | #include <linux/notifier.h> |
42 | #include <linux/uaccess.h> | 42 | #include <linux/uaccess.h> |
43 | #include <linux/gfp.h> | ||
43 | 44 | ||
44 | #include <asm/processor.h> | 45 | #include <asm/processor.h> |
45 | #include <asm/msr.h> | 46 | #include <asm/msr.h> |
diff --git a/arch/x86/kernel/crash_dump_32.c b/arch/x86/kernel/crash_dump_32.c index cd97ce18c29d..67414550c3cc 100644 --- a/arch/x86/kernel/crash_dump_32.c +++ b/arch/x86/kernel/crash_dump_32.c | |||
@@ -5,6 +5,7 @@ | |||
5 | * Copyright (C) IBM Corporation, 2004. All rights reserved | 5 | * Copyright (C) IBM Corporation, 2004. All rights reserved |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/slab.h> | ||
8 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
9 | #include <linux/highmem.h> | 10 | #include <linux/highmem.h> |
10 | #include <linux/crash_dump.h> | 11 | #include <linux/crash_dump.h> |
diff --git a/arch/x86/kernel/dumpstack.h b/arch/x86/kernel/dumpstack.h index 29e5f7c845b2..e39e77168a37 100644 --- a/arch/x86/kernel/dumpstack.h +++ b/arch/x86/kernel/dumpstack.h | |||
@@ -30,6 +30,11 @@ struct stack_frame { | |||
30 | unsigned long return_address; | 30 | unsigned long return_address; |
31 | }; | 31 | }; |
32 | 32 | ||
33 | struct stack_frame_ia32 { | ||
34 | u32 next_frame; | ||
35 | u32 return_address; | ||
36 | }; | ||
37 | |||
33 | static inline unsigned long rewind_frame_pointer(int n) | 38 | static inline unsigned long rewind_frame_pointer(int n) |
34 | { | 39 | { |
35 | struct stack_frame *frame; | 40 | struct stack_frame *frame; |
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 740b440fbd73..7bca3c6a02fb 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -519,29 +519,45 @@ u64 __init e820_remove_range(u64 start, u64 size, unsigned old_type, | |||
519 | printk(KERN_DEBUG "e820 remove range: %016Lx - %016Lx ", | 519 | printk(KERN_DEBUG "e820 remove range: %016Lx - %016Lx ", |
520 | (unsigned long long) start, | 520 | (unsigned long long) start, |
521 | (unsigned long long) end); | 521 | (unsigned long long) end); |
522 | e820_print_type(old_type); | 522 | if (checktype) |
523 | e820_print_type(old_type); | ||
523 | printk(KERN_CONT "\n"); | 524 | printk(KERN_CONT "\n"); |
524 | 525 | ||
525 | for (i = 0; i < e820.nr_map; i++) { | 526 | for (i = 0; i < e820.nr_map; i++) { |
526 | struct e820entry *ei = &e820.map[i]; | 527 | struct e820entry *ei = &e820.map[i]; |
527 | u64 final_start, final_end; | 528 | u64 final_start, final_end; |
529 | u64 ei_end; | ||
528 | 530 | ||
529 | if (checktype && ei->type != old_type) | 531 | if (checktype && ei->type != old_type) |
530 | continue; | 532 | continue; |
533 | |||
534 | ei_end = ei->addr + ei->size; | ||
531 | /* totally covered? */ | 535 | /* totally covered? */ |
532 | if (ei->addr >= start && | 536 | if (ei->addr >= start && ei_end <= end) { |
533 | (ei->addr + ei->size) <= (start + size)) { | ||
534 | real_removed_size += ei->size; | 537 | real_removed_size += ei->size; |
535 | memset(ei, 0, sizeof(struct e820entry)); | 538 | memset(ei, 0, sizeof(struct e820entry)); |
536 | continue; | 539 | continue; |
537 | } | 540 | } |
541 | |||
542 | /* new range is totally covered? */ | ||
543 | if (ei->addr < start && ei_end > end) { | ||
544 | e820_add_region(end, ei_end - end, ei->type); | ||
545 | ei->size = start - ei->addr; | ||
546 | real_removed_size += size; | ||
547 | continue; | ||
548 | } | ||
549 | |||
538 | /* partially covered */ | 550 | /* partially covered */ |
539 | final_start = max(start, ei->addr); | 551 | final_start = max(start, ei->addr); |
540 | final_end = min(start + size, ei->addr + ei->size); | 552 | final_end = min(end, ei_end); |
541 | if (final_start >= final_end) | 553 | if (final_start >= final_end) |
542 | continue; | 554 | continue; |
543 | real_removed_size += final_end - final_start; | 555 | real_removed_size += final_end - final_start; |
544 | 556 | ||
557 | /* | ||
558 | * left range could be head or tail, so need to update | ||
559 | * size at first. | ||
560 | */ | ||
545 | ei->size -= final_end - final_start; | 561 | ei->size -= final_end - final_start; |
546 | if (ei->addr < final_start) | 562 | if (ei->addr < final_start) |
547 | continue; | 563 | continue; |
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c index adedeef1dedc..b2e246037392 100644 --- a/arch/x86/kernel/head32.c +++ b/arch/x86/kernel/head32.c | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/start_kernel.h> | 9 | #include <linux/start_kernel.h> |
10 | #include <linux/mm.h> | ||
10 | 11 | ||
11 | #include <asm/setup.h> | 12 | #include <asm/setup.h> |
12 | #include <asm/sections.h> | 13 | #include <asm/sections.h> |
@@ -44,9 +45,10 @@ void __init i386_start_kernel(void) | |||
44 | #ifdef CONFIG_BLK_DEV_INITRD | 45 | #ifdef CONFIG_BLK_DEV_INITRD |
45 | /* Reserve INITRD */ | 46 | /* Reserve INITRD */ |
46 | if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) { | 47 | if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) { |
48 | /* Assume only end is not page aligned */ | ||
47 | u64 ramdisk_image = boot_params.hdr.ramdisk_image; | 49 | u64 ramdisk_image = boot_params.hdr.ramdisk_image; |
48 | u64 ramdisk_size = boot_params.hdr.ramdisk_size; | 50 | u64 ramdisk_size = boot_params.hdr.ramdisk_size; |
49 | u64 ramdisk_end = ramdisk_image + ramdisk_size; | 51 | u64 ramdisk_end = PAGE_ALIGN(ramdisk_image + ramdisk_size); |
50 | reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); | 52 | reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); |
51 | } | 53 | } |
52 | #endif | 54 | #endif |
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index b5a9896ca1e7..7147143fd614 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c | |||
@@ -103,9 +103,10 @@ void __init x86_64_start_reservations(char *real_mode_data) | |||
103 | #ifdef CONFIG_BLK_DEV_INITRD | 103 | #ifdef CONFIG_BLK_DEV_INITRD |
104 | /* Reserve INITRD */ | 104 | /* Reserve INITRD */ |
105 | if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) { | 105 | if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) { |
106 | /* Assume only end is not page aligned */ | ||
106 | unsigned long ramdisk_image = boot_params.hdr.ramdisk_image; | 107 | unsigned long ramdisk_image = boot_params.hdr.ramdisk_image; |
107 | unsigned long ramdisk_size = boot_params.hdr.ramdisk_size; | 108 | unsigned long ramdisk_size = boot_params.hdr.ramdisk_size; |
108 | unsigned long ramdisk_end = ramdisk_image + ramdisk_size; | 109 | unsigned long ramdisk_end = PAGE_ALIGN(ramdisk_image + ramdisk_size); |
109 | reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); | 110 | reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); |
110 | } | 111 | } |
111 | #endif | 112 | #endif |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index ee4fa1bfcb33..23b4ecdffa9b 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/sysdev.h> | 4 | #include <linux/sysdev.h> |
5 | #include <linux/delay.h> | 5 | #include <linux/delay.h> |
6 | #include <linux/errno.h> | 6 | #include <linux/errno.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/hpet.h> | 8 | #include <linux/hpet.h> |
8 | #include <linux/init.h> | 9 | #include <linux/init.h> |
9 | #include <linux/cpu.h> | 10 | #include <linux/cpu.h> |
@@ -399,9 +400,15 @@ static int hpet_next_event(unsigned long delta, | |||
399 | * then we might have a real hardware problem. We can not do | 400 | * then we might have a real hardware problem. We can not do |
400 | * much about it here, but at least alert the user/admin with | 401 | * much about it here, but at least alert the user/admin with |
401 | * a prominent warning. | 402 | * a prominent warning. |
403 | * An erratum on some chipsets (ICH9,..), results in comparator read | ||
404 | * immediately following a write returning old value. Workaround | ||
405 | * for this is to read this value second time, when first | ||
406 | * read returns old value. | ||
402 | */ | 407 | */ |
403 | WARN_ONCE(hpet_readl(HPET_Tn_CMP(timer)) != cnt, | 408 | if (unlikely((u32)hpet_readl(HPET_Tn_CMP(timer)) != cnt)) { |
409 | WARN_ONCE(hpet_readl(HPET_Tn_CMP(timer)) != cnt, | ||
404 | KERN_WARNING "hpet: compare register read back failed.\n"); | 410 | KERN_WARNING "hpet: compare register read back failed.\n"); |
411 | } | ||
405 | 412 | ||
406 | return (s32)(hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0; | 413 | return (s32)(hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0; |
407 | } | 414 | } |
@@ -1143,6 +1150,7 @@ int hpet_set_periodic_freq(unsigned long freq) | |||
1143 | do_div(clc, freq); | 1150 | do_div(clc, freq); |
1144 | clc >>= hpet_clockevent.shift; | 1151 | clc >>= hpet_clockevent.shift; |
1145 | hpet_pie_delta = clc; | 1152 | hpet_pie_delta = clc; |
1153 | hpet_pie_limit = 0; | ||
1146 | } | 1154 | } |
1147 | return 1; | 1155 | return 1; |
1148 | } | 1156 | } |
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c index c01a2b846d47..54c31c285488 100644 --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/regset.h> | 9 | #include <linux/regset.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/slab.h> | ||
11 | 12 | ||
12 | #include <asm/sigcontext.h> | 13 | #include <asm/sigcontext.h> |
13 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c index fb725ee15f55..7c9f02c130f3 100644 --- a/arch/x86/kernel/i8259.c +++ b/arch/x86/kernel/i8259.c | |||
@@ -5,7 +5,6 @@ | |||
5 | #include <linux/ioport.h> | 5 | #include <linux/ioport.h> |
6 | #include <linux/interrupt.h> | 6 | #include <linux/interrupt.h> |
7 | #include <linux/timex.h> | 7 | #include <linux/timex.h> |
8 | #include <linux/slab.h> | ||
9 | #include <linux/random.h> | 8 | #include <linux/random.h> |
10 | #include <linux/init.h> | 9 | #include <linux/init.h> |
11 | #include <linux/kernel_stat.h> | 10 | #include <linux/kernel_stat.h> |
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c index ef257fc2921b..0ed2d300cd46 100644 --- a/arch/x86/kernel/irqinit.c +++ b/arch/x86/kernel/irqinit.c | |||
@@ -5,7 +5,6 @@ | |||
5 | #include <linux/ioport.h> | 5 | #include <linux/ioport.h> |
6 | #include <linux/interrupt.h> | 6 | #include <linux/interrupt.h> |
7 | #include <linux/timex.h> | 7 | #include <linux/timex.h> |
8 | #include <linux/slab.h> | ||
9 | #include <linux/random.h> | 8 | #include <linux/random.h> |
10 | #include <linux/kprobes.h> | 9 | #include <linux/kprobes.h> |
11 | #include <linux/init.h> | 10 | #include <linux/init.h> |
@@ -141,6 +140,28 @@ void __init init_IRQ(void) | |||
141 | x86_init.irqs.intr_init(); | 140 | x86_init.irqs.intr_init(); |
142 | } | 141 | } |
143 | 142 | ||
143 | /* | ||
144 | * Setup the vector to irq mappings. | ||
145 | */ | ||
146 | void setup_vector_irq(int cpu) | ||
147 | { | ||
148 | #ifndef CONFIG_X86_IO_APIC | ||
149 | int irq; | ||
150 | |||
151 | /* | ||
152 | * On most of the platforms, legacy PIC delivers the interrupts on the | ||
153 | * boot cpu. But there are certain platforms where PIC interrupts are | ||
154 | * delivered to multiple cpu's. If the legacy IRQ is handled by the | ||
155 | * legacy PIC, for the new cpu that is coming online, setup the static | ||
156 | * legacy vector to irq mapping: | ||
157 | */ | ||
158 | for (irq = 0; irq < legacy_pic->nr_legacy_irqs; irq++) | ||
159 | per_cpu(vector_irq, cpu)[IRQ0_VECTOR + irq] = irq; | ||
160 | #endif | ||
161 | |||
162 | __setup_vector_irq(cpu); | ||
163 | } | ||
164 | |||
144 | static void __init smp_intr_init(void) | 165 | static void __init smp_intr_init(void) |
145 | { | 166 | { |
146 | #ifdef CONFIG_SMP | 167 | #ifdef CONFIG_SMP |
diff --git a/arch/x86/kernel/k8.c b/arch/x86/kernel/k8.c index 9b895464dd03..0f7bc20cfcde 100644 --- a/arch/x86/kernel/k8.c +++ b/arch/x86/kernel/k8.c | |||
@@ -2,8 +2,8 @@ | |||
2 | * Shared support code for AMD K8 northbridges and derivates. | 2 | * Shared support code for AMD K8 northbridges and derivates. |
3 | * Copyright 2006 Andi Kleen, SUSE Labs. Subject to GPLv2. | 3 | * Copyright 2006 Andi Kleen, SUSE Labs. Subject to GPLv2. |
4 | */ | 4 | */ |
5 | #include <linux/gfp.h> | ||
6 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/slab.h> | ||
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
diff --git a/arch/x86/kernel/kdebugfs.c b/arch/x86/kernel/kdebugfs.c index e444357375ce..8afd9f321f10 100644 --- a/arch/x86/kernel/kdebugfs.c +++ b/arch/x86/kernel/kdebugfs.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/debugfs.h> | 9 | #include <linux/debugfs.h> |
10 | #include <linux/uaccess.h> | 10 | #include <linux/uaccess.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
13 | #include <linux/stat.h> | 14 | #include <linux/stat.h> |
14 | #include <linux/io.h> | 15 | #include <linux/io.h> |
diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c index bfba6019d762..b2258ca91003 100644 --- a/arch/x86/kernel/kgdb.c +++ b/arch/x86/kernel/kgdb.c | |||
@@ -618,8 +618,8 @@ int kgdb_arch_init(void) | |||
618 | * portion of kgdb because this operation requires mutexs to | 618 | * portion of kgdb because this operation requires mutexs to |
619 | * complete. | 619 | * complete. |
620 | */ | 620 | */ |
621 | hw_breakpoint_init(&attr); | ||
621 | attr.bp_addr = (unsigned long)kgdb_arch_init; | 622 | attr.bp_addr = (unsigned long)kgdb_arch_init; |
622 | attr.type = PERF_TYPE_BREAKPOINT; | ||
623 | attr.bp_len = HW_BREAKPOINT_LEN_1; | 623 | attr.bp_len = HW_BREAKPOINT_LEN_1; |
624 | attr.bp_type = HW_BREAKPOINT_W; | 624 | attr.bp_type = HW_BREAKPOINT_W; |
625 | attr.disabled = 1; | 625 | attr.disabled = 1; |
diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c index ec6ef60cbd17..ea697263b373 100644 --- a/arch/x86/kernel/ldt.c +++ b/arch/x86/kernel/ldt.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
10 | #include <linux/gfp.h> | ||
10 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
11 | #include <linux/string.h> | 12 | #include <linux/string.h> |
12 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c index 4a8bb82248ae..035c8c529181 100644 --- a/arch/x86/kernel/machine_kexec_64.c +++ b/arch/x86/kernel/machine_kexec_64.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/kexec.h> | 10 | #include <linux/kexec.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/gfp.h> | ||
12 | #include <linux/reboot.h> | 13 | #include <linux/reboot.h> |
13 | #include <linux/numa.h> | 14 | #include <linux/numa.h> |
14 | #include <linux/ftrace.h> | 15 | #include <linux/ftrace.h> |
diff --git a/arch/x86/kernel/mca_32.c b/arch/x86/kernel/mca_32.c index 845d80ce1ef1..63eaf6596233 100644 --- a/arch/x86/kernel/mca_32.c +++ b/arch/x86/kernel/mca_32.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/kernel.h> | 42 | #include <linux/kernel.h> |
43 | #include <linux/mca.h> | 43 | #include <linux/mca.h> |
44 | #include <linux/kprobes.h> | 44 | #include <linux/kprobes.h> |
45 | #include <linux/slab.h> | ||
45 | #include <asm/system.h> | 46 | #include <asm/system.h> |
46 | #include <asm/io.h> | 47 | #include <asm/io.h> |
47 | #include <linux/proc_fs.h> | 48 | #include <linux/proc_fs.h> |
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c index 89f386f044e4..e0bc186d7501 100644 --- a/arch/x86/kernel/module.c +++ b/arch/x86/kernel/module.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/bug.h> | 24 | #include <linux/bug.h> |
25 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
26 | #include <linux/gfp.h> | ||
26 | 27 | ||
27 | #include <asm/system.h> | 28 | #include <asm/system.h> |
28 | #include <asm/page.h> | 29 | #include <asm/page.h> |
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index a2c1edd2d3ac..e81030f71a8f 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -664,7 +664,7 @@ static void __init smp_reserve_memory(struct mpf_intel *mpf) | |||
664 | { | 664 | { |
665 | unsigned long size = get_mpc_size(mpf->physptr); | 665 | unsigned long size = get_mpc_size(mpf->physptr); |
666 | 666 | ||
667 | reserve_early(mpf->physptr, mpf->physptr+size, "MP-table mpc"); | 667 | reserve_early_overlap_ok(mpf->physptr, mpf->physptr+size, "MP-table mpc"); |
668 | } | 668 | } |
669 | 669 | ||
670 | static int __init smp_scan_config(unsigned long base, unsigned long length) | 670 | static int __init smp_scan_config(unsigned long base, unsigned long length) |
@@ -693,7 +693,7 @@ static int __init smp_scan_config(unsigned long base, unsigned long length) | |||
693 | mpf, (u64)virt_to_phys(mpf)); | 693 | mpf, (u64)virt_to_phys(mpf)); |
694 | 694 | ||
695 | mem = virt_to_phys(mpf); | 695 | mem = virt_to_phys(mpf); |
696 | reserve_early(mem, mem + sizeof(*mpf), "MP-table mpf"); | 696 | reserve_early_overlap_ok(mem, mem + sizeof(*mpf), "MP-table mpf"); |
697 | if (mpf->physptr) | 697 | if (mpf->physptr) |
698 | smp_reserve_memory(mpf); | 698 | smp_reserve_memory(mpf); |
699 | 699 | ||
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index 206735ac8cbd..4d4468e9f47c 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/cpu.h> | 37 | #include <linux/cpu.h> |
38 | #include <linux/notifier.h> | 38 | #include <linux/notifier.h> |
39 | #include <linux/uaccess.h> | 39 | #include <linux/uaccess.h> |
40 | #include <linux/gfp.h> | ||
40 | 41 | ||
41 | #include <asm/processor.h> | 42 | #include <asm/processor.h> |
42 | #include <asm/msr.h> | 43 | #include <asm/msr.h> |
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index a4ac764a6880..4b7e3d8b01dd 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <linux/dma-debug.h> | 2 | #include <linux/dma-debug.h> |
3 | #include <linux/dmar.h> | 3 | #include <linux/dmar.h> |
4 | #include <linux/bootmem.h> | 4 | #include <linux/bootmem.h> |
5 | #include <linux/gfp.h> | ||
5 | #include <linux/pci.h> | 6 | #include <linux/pci.h> |
6 | #include <linux/kmemleak.h> | 7 | #include <linux/kmemleak.h> |
7 | 8 | ||
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index f3af115a573a..68cd24f9deae 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/iommu-helper.h> | 29 | #include <linux/iommu-helper.h> |
30 | #include <linux/sysdev.h> | 30 | #include <linux/sysdev.h> |
31 | #include <linux/io.h> | 31 | #include <linux/io.h> |
32 | #include <linux/gfp.h> | ||
32 | #include <asm/atomic.h> | 33 | #include <asm/atomic.h> |
33 | #include <asm/mtrr.h> | 34 | #include <asm/mtrr.h> |
34 | #include <asm/pgtable.h> | 35 | #include <asm/pgtable.h> |
diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c index 22be12b60a8f..3af4af810c07 100644 --- a/arch/x86/kernel/pci-nommu.c +++ b/arch/x86/kernel/pci-nommu.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/scatterlist.h> | 4 | #include <linux/scatterlist.h> |
5 | #include <linux/string.h> | 5 | #include <linux/string.h> |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/gfp.h> | ||
7 | #include <linux/pci.h> | 8 | #include <linux/pci.h> |
8 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
9 | 10 | ||
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index ad9540676fcc..28ad9f4d8b94 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -526,21 +526,37 @@ static int __cpuinit mwait_usable(const struct cpuinfo_x86 *c) | |||
526 | } | 526 | } |
527 | 527 | ||
528 | /* | 528 | /* |
529 | * Check for AMD CPUs, which have potentially C1E support | 529 | * Check for AMD CPUs, where APIC timer interrupt does not wake up CPU from C1e. |
530 | * For more information see | ||
531 | * - Erratum #400 for NPT family 0xf and family 0x10 CPUs | ||
532 | * - Erratum #365 for family 0x11 (not affected because C1e not in use) | ||
530 | */ | 533 | */ |
531 | static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c) | 534 | static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c) |
532 | { | 535 | { |
536 | u64 val; | ||
533 | if (c->x86_vendor != X86_VENDOR_AMD) | 537 | if (c->x86_vendor != X86_VENDOR_AMD) |
534 | return 0; | 538 | goto no_c1e_idle; |
535 | |||
536 | if (c->x86 < 0x0F) | ||
537 | return 0; | ||
538 | 539 | ||
539 | /* Family 0x0f models < rev F do not have C1E */ | 540 | /* Family 0x0f models < rev F do not have C1E */ |
540 | if (c->x86 == 0x0f && c->x86_model < 0x40) | 541 | if (c->x86 == 0x0F && c->x86_model >= 0x40) |
541 | return 0; | 542 | return 1; |
542 | 543 | ||
543 | return 1; | 544 | if (c->x86 == 0x10) { |
545 | /* | ||
546 | * check OSVW bit for CPUs that are not affected | ||
547 | * by erratum #400 | ||
548 | */ | ||
549 | rdmsrl(MSR_AMD64_OSVW_ID_LENGTH, val); | ||
550 | if (val >= 2) { | ||
551 | rdmsrl(MSR_AMD64_OSVW_STATUS, val); | ||
552 | if (!(val & BIT(1))) | ||
553 | goto no_c1e_idle; | ||
554 | } | ||
555 | return 1; | ||
556 | } | ||
557 | |||
558 | no_c1e_idle: | ||
559 | return 0; | ||
544 | } | 560 | } |
545 | 561 | ||
546 | static cpumask_var_t c1e_mask; | 562 | static cpumask_var_t c1e_mask; |
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index a503b1fd04e5..2e9b55027b7e 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/ptrace.h> | 16 | #include <linux/ptrace.h> |
16 | #include <linux/regset.h> | 17 | #include <linux/regset.h> |
17 | #include <linux/tracehook.h> | 18 | #include <linux/tracehook.h> |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 5d7ba1a449bd..c4851eff57b3 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -55,7 +55,6 @@ | |||
55 | #include <linux/stddef.h> | 55 | #include <linux/stddef.h> |
56 | #include <linux/unistd.h> | 56 | #include <linux/unistd.h> |
57 | #include <linux/ptrace.h> | 57 | #include <linux/ptrace.h> |
58 | #include <linux/slab.h> | ||
59 | #include <linux/user.h> | 58 | #include <linux/user.h> |
60 | #include <linux/delay.h> | 59 | #include <linux/delay.h> |
61 | 60 | ||
@@ -314,16 +313,17 @@ static void __init reserve_brk(void) | |||
314 | #define MAX_MAP_CHUNK (NR_FIX_BTMAPS << PAGE_SHIFT) | 313 | #define MAX_MAP_CHUNK (NR_FIX_BTMAPS << PAGE_SHIFT) |
315 | static void __init relocate_initrd(void) | 314 | static void __init relocate_initrd(void) |
316 | { | 315 | { |
317 | 316 | /* Assume only end is not page aligned */ | |
318 | u64 ramdisk_image = boot_params.hdr.ramdisk_image; | 317 | u64 ramdisk_image = boot_params.hdr.ramdisk_image; |
319 | u64 ramdisk_size = boot_params.hdr.ramdisk_size; | 318 | u64 ramdisk_size = boot_params.hdr.ramdisk_size; |
319 | u64 area_size = PAGE_ALIGN(ramdisk_size); | ||
320 | u64 end_of_lowmem = max_low_pfn_mapped << PAGE_SHIFT; | 320 | u64 end_of_lowmem = max_low_pfn_mapped << PAGE_SHIFT; |
321 | u64 ramdisk_here; | 321 | u64 ramdisk_here; |
322 | unsigned long slop, clen, mapaddr; | 322 | unsigned long slop, clen, mapaddr; |
323 | char *p, *q; | 323 | char *p, *q; |
324 | 324 | ||
325 | /* We need to move the initrd down into lowmem */ | 325 | /* We need to move the initrd down into lowmem */ |
326 | ramdisk_here = find_e820_area(0, end_of_lowmem, ramdisk_size, | 326 | ramdisk_here = find_e820_area(0, end_of_lowmem, area_size, |
327 | PAGE_SIZE); | 327 | PAGE_SIZE); |
328 | 328 | ||
329 | if (ramdisk_here == -1ULL) | 329 | if (ramdisk_here == -1ULL) |
@@ -332,7 +332,7 @@ static void __init relocate_initrd(void) | |||
332 | 332 | ||
333 | /* Note: this includes all the lowmem currently occupied by | 333 | /* Note: this includes all the lowmem currently occupied by |
334 | the initrd, we rely on that fact to keep the data intact. */ | 334 | the initrd, we rely on that fact to keep the data intact. */ |
335 | reserve_early(ramdisk_here, ramdisk_here + ramdisk_size, | 335 | reserve_early(ramdisk_here, ramdisk_here + area_size, |
336 | "NEW RAMDISK"); | 336 | "NEW RAMDISK"); |
337 | initrd_start = ramdisk_here + PAGE_OFFSET; | 337 | initrd_start = ramdisk_here + PAGE_OFFSET; |
338 | initrd_end = initrd_start + ramdisk_size; | 338 | initrd_end = initrd_start + ramdisk_size; |
@@ -376,9 +376,10 @@ static void __init relocate_initrd(void) | |||
376 | 376 | ||
377 | static void __init reserve_initrd(void) | 377 | static void __init reserve_initrd(void) |
378 | { | 378 | { |
379 | /* Assume only end is not page aligned */ | ||
379 | u64 ramdisk_image = boot_params.hdr.ramdisk_image; | 380 | u64 ramdisk_image = boot_params.hdr.ramdisk_image; |
380 | u64 ramdisk_size = boot_params.hdr.ramdisk_size; | 381 | u64 ramdisk_size = boot_params.hdr.ramdisk_size; |
381 | u64 ramdisk_end = ramdisk_image + ramdisk_size; | 382 | u64 ramdisk_end = PAGE_ALIGN(ramdisk_image + ramdisk_size); |
382 | u64 end_of_lowmem = max_low_pfn_mapped << PAGE_SHIFT; | 383 | u64 end_of_lowmem = max_low_pfn_mapped << PAGE_SHIFT; |
383 | 384 | ||
384 | if (!boot_params.hdr.type_of_loader || | 385 | if (!boot_params.hdr.type_of_loader || |
@@ -606,6 +607,16 @@ static int __init setup_elfcorehdr(char *arg) | |||
606 | early_param("elfcorehdr", setup_elfcorehdr); | 607 | early_param("elfcorehdr", setup_elfcorehdr); |
607 | #endif | 608 | #endif |
608 | 609 | ||
610 | static __init void reserve_ibft_region(void) | ||
611 | { | ||
612 | unsigned long addr, size = 0; | ||
613 | |||
614 | addr = find_ibft_region(&size); | ||
615 | |||
616 | if (size) | ||
617 | reserve_early_overlap_ok(addr, addr + size, "ibft"); | ||
618 | } | ||
619 | |||
609 | #ifdef CONFIG_X86_RESERVE_LOW_64K | 620 | #ifdef CONFIG_X86_RESERVE_LOW_64K |
610 | static int __init dmi_low_memory_corruption(const struct dmi_system_id *d) | 621 | static int __init dmi_low_memory_corruption(const struct dmi_system_id *d) |
611 | { | 622 | { |
@@ -908,6 +919,8 @@ void __init setup_arch(char **cmdline_p) | |||
908 | */ | 919 | */ |
909 | find_smp_config(); | 920 | find_smp_config(); |
910 | 921 | ||
922 | reserve_ibft_region(); | ||
923 | |||
911 | reserve_trampoline_memory(); | 924 | reserve_trampoline_memory(); |
912 | 925 | ||
913 | #ifdef CONFIG_ACPI_SLEEP | 926 | #ifdef CONFIG_ACPI_SLEEP |
@@ -975,8 +988,6 @@ void __init setup_arch(char **cmdline_p) | |||
975 | 988 | ||
976 | dma32_reserve_bootmem(); | 989 | dma32_reserve_bootmem(); |
977 | 990 | ||
978 | reserve_ibft_region(); | ||
979 | |||
980 | #ifdef CONFIG_KVM_CLOCK | 991 | #ifdef CONFIG_KVM_CLOCK |
981 | kvmclock_init(); | 992 | kvmclock_init(); |
982 | #endif | 993 | #endif |
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index ec1de97600e7..d801210945d6 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/cache.h> | 21 | #include <linux/cache.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/cpu.h> | 23 | #include <linux/cpu.h> |
24 | #include <linux/gfp.h> | ||
24 | 25 | ||
25 | #include <asm/mtrr.h> | 26 | #include <asm/mtrr.h> |
26 | #include <asm/tlbflush.h> | 27 | #include <asm/tlbflush.h> |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index a02e80c3c54b..763d815e27a0 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/nmi.h> | 49 | #include <linux/nmi.h> |
50 | #include <linux/tboot.h> | 50 | #include <linux/tboot.h> |
51 | #include <linux/stackprotector.h> | 51 | #include <linux/stackprotector.h> |
52 | #include <linux/gfp.h> | ||
52 | 53 | ||
53 | #include <asm/acpi.h> | 54 | #include <asm/acpi.h> |
54 | #include <asm/desc.h> | 55 | #include <asm/desc.h> |
@@ -242,12 +243,10 @@ static void __cpuinit smp_callin(void) | |||
242 | end_local_APIC_setup(); | 243 | end_local_APIC_setup(); |
243 | map_cpu_to_logical_apicid(); | 244 | map_cpu_to_logical_apicid(); |
244 | 245 | ||
245 | notify_cpu_starting(cpuid); | ||
246 | |||
247 | /* | 246 | /* |
248 | * Need to setup vector mappings before we enable interrupts. | 247 | * Need to setup vector mappings before we enable interrupts. |
249 | */ | 248 | */ |
250 | __setup_vector_irq(smp_processor_id()); | 249 | setup_vector_irq(smp_processor_id()); |
251 | /* | 250 | /* |
252 | * Get our bogomips. | 251 | * Get our bogomips. |
253 | * | 252 | * |
@@ -264,6 +263,8 @@ static void __cpuinit smp_callin(void) | |||
264 | */ | 263 | */ |
265 | smp_store_cpu_info(cpuid); | 264 | smp_store_cpu_info(cpuid); |
266 | 265 | ||
266 | notify_cpu_starting(cpuid); | ||
267 | |||
267 | /* | 268 | /* |
268 | * Allow the master to continue. | 269 | * Allow the master to continue. |
269 | */ | 270 | */ |
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c index 364d015efebc..17b03dd3a6b5 100644 --- a/arch/x86/kernel/tlb_uv.c +++ b/arch/x86/kernel/tlb_uv.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/seq_file.h> | 9 | #include <linux/seq_file.h> |
10 | #include <linux/proc_fs.h> | 10 | #include <linux/proc_fs.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | #include <asm/mmu_context.h> | 14 | #include <asm/mmu_context.h> |
14 | #include <asm/uv/uv.h> | 15 | #include <asm/uv/uv.h> |
diff --git a/arch/x86/kernel/uv_irq.c b/arch/x86/kernel/uv_irq.c index ece73d8e3240..1d40336b030a 100644 --- a/arch/x86/kernel/uv_irq.c +++ b/arch/x86/kernel/uv_irq.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/rbtree.h> | 12 | #include <linux/rbtree.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
14 | 15 | ||
15 | #include <asm/apic.h> | 16 | #include <asm/apic.h> |
diff --git a/arch/x86/kernel/uv_time.c b/arch/x86/kernel/uv_time.c index 2b75ef638dbc..56e421bc379b 100644 --- a/arch/x86/kernel/uv_time.c +++ b/arch/x86/kernel/uv_time.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * Copyright (c) Dimitri Sivanich | 19 | * Copyright (c) Dimitri Sivanich |
20 | */ | 20 | */ |
21 | #include <linux/clockchips.h> | 21 | #include <linux/clockchips.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <asm/uv/uv_mmrs.h> | 24 | #include <asm/uv/uv_mmrs.h> |
24 | #include <asm/uv/uv_hub.h> | 25 | #include <asm/uv/uv_hub.h> |
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c index 7dd599deca4a..ce9fbacb7526 100644 --- a/arch/x86/kernel/vmi_32.c +++ b/arch/x86/kernel/vmi_32.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/highmem.h> | 29 | #include <linux/highmem.h> |
30 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
31 | #include <linux/gfp.h> | ||
31 | #include <asm/vmi.h> | 32 | #include <asm/vmi.h> |
32 | #include <asm/io.h> | 33 | #include <asm/io.h> |
33 | #include <asm/fixmap.h> | 34 | #include <asm/fixmap.h> |
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 44879df55696..2cc249718c46 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S | |||
@@ -291,8 +291,8 @@ SECTIONS | |||
291 | .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { | 291 | .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { |
292 | __smp_locks = .; | 292 | __smp_locks = .; |
293 | *(.smp_locks) | 293 | *(.smp_locks) |
294 | __smp_locks_end = .; | ||
295 | . = ALIGN(PAGE_SIZE); | 294 | . = ALIGN(PAGE_SIZE); |
295 | __smp_locks_end = .; | ||
296 | } | 296 | } |
297 | 297 | ||
298 | #ifdef CONFIG_X86_64 | 298 | #ifdef CONFIG_X86_64 |
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 294698b6daff..0150affad25d 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #define pr_fmt(fmt) "pit: " fmt | 32 | #define pr_fmt(fmt) "pit: " fmt |
33 | 33 | ||
34 | #include <linux/kvm_host.h> | 34 | #include <linux/kvm_host.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #include "irq.h" | 37 | #include "irq.h" |
37 | #include "i8254.h" | 38 | #include "i8254.h" |
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index 07771da85de5..a790fa128a9f 100644 --- a/arch/x86/kvm/i8259.c +++ b/arch/x86/kvm/i8259.c | |||
@@ -26,6 +26,7 @@ | |||
26 | * Port from Qemu. | 26 | * Port from Qemu. |
27 | */ | 27 | */ |
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/bitops.h> | 30 | #include <linux/bitops.h> |
30 | #include "irq.h" | 31 | #include "irq.h" |
31 | 32 | ||
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 4b224f90087b..1eb7a4ae0c9c 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/math64.h> | 28 | #include <linux/math64.h> |
29 | #include <linux/slab.h> | ||
29 | #include <asm/processor.h> | 30 | #include <asm/processor.h> |
30 | #include <asm/msr.h> | 31 | #include <asm/msr.h> |
31 | #include <asm/page.h> | 32 | #include <asm/page.h> |
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 741373e8ca77..48aeee8eefb0 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/hugetlb.h> | 31 | #include <linux/hugetlb.h> |
32 | #include <linux/compiler.h> | 32 | #include <linux/compiler.h> |
33 | #include <linux/srcu.h> | 33 | #include <linux/srcu.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include <asm/page.h> | 36 | #include <asm/page.h> |
36 | #include <asm/cmpxchg.h> | 37 | #include <asm/cmpxchg.h> |
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 52f78dd03010..445c59411ed0 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/highmem.h> | 26 | #include <linux/highmem.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/ftrace_event.h> | 28 | #include <linux/ftrace_event.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <asm/desc.h> | 31 | #include <asm/desc.h> |
31 | 32 | ||
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 14873b9f8430..686492ed3079 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/moduleparam.h> | 27 | #include <linux/moduleparam.h> |
28 | #include <linux/ftrace_event.h> | 28 | #include <linux/ftrace_event.h> |
29 | #include <linux/slab.h> | ||
29 | #include "kvm_cache_regs.h" | 30 | #include "kvm_cache_regs.h" |
30 | #include "x86.h" | 31 | #include "x86.h" |
31 | 32 | ||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index e46282a56565..24cd0ee896e9 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/cpufreq.h> | 39 | #include <linux/cpufreq.h> |
40 | #include <linux/user-return-notifier.h> | 40 | #include <linux/user-return-notifier.h> |
41 | #include <linux/srcu.h> | 41 | #include <linux/srcu.h> |
42 | #include <linux/slab.h> | ||
42 | #include <trace/events/kvm.h> | 43 | #include <trace/events/kvm.h> |
43 | #undef TRACE_INCLUDE_FILE | 44 | #undef TRACE_INCLUDE_FILE |
44 | #define CREATE_TRACE_POINTS | 45 | #define CREATE_TRACE_POINTS |
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c index f46c340727b8..069ce7c37c01 100644 --- a/arch/x86/mm/hugetlbpage.c +++ b/arch/x86/mm/hugetlbpage.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/hugetlb.h> | 10 | #include <linux/hugetlb.h> |
11 | #include <linux/pagemap.h> | 11 | #include <linux/pagemap.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/err.h> | 12 | #include <linux/err.h> |
14 | #include <linux/sysctl.h> | 13 | #include <linux/sysctl.h> |
15 | #include <asm/mman.h> | 14 | #include <asm/mman.h> |
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index e71c5cbc8f35..b278535b14aa 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #include <linux/gfp.h> | ||
1 | #include <linux/initrd.h> | 2 | #include <linux/initrd.h> |
2 | #include <linux/ioport.h> | 3 | #include <linux/ioport.h> |
3 | #include <linux/swap.h> | 4 | #include <linux/swap.h> |
@@ -331,11 +332,23 @@ int devmem_is_allowed(unsigned long pagenr) | |||
331 | 332 | ||
332 | void free_init_pages(char *what, unsigned long begin, unsigned long end) | 333 | void free_init_pages(char *what, unsigned long begin, unsigned long end) |
333 | { | 334 | { |
334 | unsigned long addr = begin; | 335 | unsigned long addr; |
336 | unsigned long begin_aligned, end_aligned; | ||
335 | 337 | ||
336 | if (addr >= end) | 338 | /* Make sure boundaries are page aligned */ |
339 | begin_aligned = PAGE_ALIGN(begin); | ||
340 | end_aligned = end & PAGE_MASK; | ||
341 | |||
342 | if (WARN_ON(begin_aligned != begin || end_aligned != end)) { | ||
343 | begin = begin_aligned; | ||
344 | end = end_aligned; | ||
345 | } | ||
346 | |||
347 | if (begin >= end) | ||
337 | return; | 348 | return; |
338 | 349 | ||
350 | addr = begin; | ||
351 | |||
339 | /* | 352 | /* |
340 | * If debugging page accesses then do not free this memory but | 353 | * If debugging page accesses then do not free this memory but |
341 | * mark them not present - any buggy init-section access will | 354 | * mark them not present - any buggy init-section access will |
@@ -343,7 +356,7 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) | |||
343 | */ | 356 | */ |
344 | #ifdef CONFIG_DEBUG_PAGEALLOC | 357 | #ifdef CONFIG_DEBUG_PAGEALLOC |
345 | printk(KERN_INFO "debug: unmapping init memory %08lx..%08lx\n", | 358 | printk(KERN_INFO "debug: unmapping init memory %08lx..%08lx\n", |
346 | begin, PAGE_ALIGN(end)); | 359 | begin, end); |
347 | set_memory_np(begin, (end - begin) >> PAGE_SHIFT); | 360 | set_memory_np(begin, (end - begin) >> PAGE_SHIFT); |
348 | #else | 361 | #else |
349 | /* | 362 | /* |
@@ -358,8 +371,7 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) | |||
358 | for (; addr < end; addr += PAGE_SIZE) { | 371 | for (; addr < end; addr += PAGE_SIZE) { |
359 | ClearPageReserved(virt_to_page(addr)); | 372 | ClearPageReserved(virt_to_page(addr)); |
360 | init_page_count(virt_to_page(addr)); | 373 | init_page_count(virt_to_page(addr)); |
361 | memset((void *)(addr & ~(PAGE_SIZE-1)), | 374 | memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE); |
362 | POISON_FREE_INITMEM, PAGE_SIZE); | ||
363 | free_page(addr); | 375 | free_page(addr); |
364 | totalram_pages++; | 376 | totalram_pages++; |
365 | } | 377 | } |
@@ -376,6 +388,15 @@ void free_initmem(void) | |||
376 | #ifdef CONFIG_BLK_DEV_INITRD | 388 | #ifdef CONFIG_BLK_DEV_INITRD |
377 | void free_initrd_mem(unsigned long start, unsigned long end) | 389 | void free_initrd_mem(unsigned long start, unsigned long end) |
378 | { | 390 | { |
379 | free_init_pages("initrd memory", start, end); | 391 | /* |
392 | * end could be not aligned, and We can not align that, | ||
393 | * decompresser could be confused by aligned initrd_end | ||
394 | * We already reserve the end partial page before in | ||
395 | * - i386_start_kernel() | ||
396 | * - x86_64_start_kernel() | ||
397 | * - relocate_initrd() | ||
398 | * So here We can do PAGE_ALIGN() safely to get partial page to be freed | ||
399 | */ | ||
400 | free_init_pages("initrd memory", start, PAGE_ALIGN(end)); | ||
380 | } | 401 | } |
381 | #endif | 402 | #endif |
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 5cb3f0f54f47..bca79091b9d6 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -25,11 +25,11 @@ | |||
25 | #include <linux/pfn.h> | 25 | #include <linux/pfn.h> |
26 | #include <linux/poison.h> | 26 | #include <linux/poison.h> |
27 | #include <linux/bootmem.h> | 27 | #include <linux/bootmem.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/proc_fs.h> | 28 | #include <linux/proc_fs.h> |
30 | #include <linux/memory_hotplug.h> | 29 | #include <linux/memory_hotplug.h> |
31 | #include <linux/initrd.h> | 30 | #include <linux/initrd.h> |
32 | #include <linux/cpumask.h> | 31 | #include <linux/cpumask.h> |
32 | #include <linux/gfp.h> | ||
33 | 33 | ||
34 | #include <asm/asm.h> | 34 | #include <asm/asm.h> |
35 | #include <asm/bios_ebda.h> | 35 | #include <asm/bios_ebda.h> |
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index e9b040e1cde5..ee41bba315d1 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/memory_hotplug.h> | 30 | #include <linux/memory_hotplug.h> |
31 | #include <linux/nmi.h> | 31 | #include <linux/nmi.h> |
32 | #include <linux/gfp.h> | ||
32 | 33 | ||
33 | #include <asm/processor.h> | 34 | #include <asm/processor.h> |
34 | #include <asm/bios_ebda.h> | 35 | #include <asm/bios_ebda.h> |
diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c index 536fb6823366..5d0e67fff1a6 100644 --- a/arch/x86/mm/kmmio.c +++ b/arch/x86/mm/kmmio.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/kdebug.h> | 21 | #include <linux/kdebug.h> |
22 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/slab.h> | ||
24 | #include <asm/cacheflush.h> | 25 | #include <asm/cacheflush.h> |
25 | #include <asm/tlbflush.h> | 26 | #include <asm/tlbflush.h> |
26 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c index 34a3291ca103..3adff7dcc148 100644 --- a/arch/x86/mm/mmio-mod.c +++ b/arch/x86/mm/mmio-mod.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/debugfs.h> | 28 | #include <linux/debugfs.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/uaccess.h> | 30 | #include <linux/uaccess.h> |
30 | #include <linux/io.h> | 31 | #include <linux/io.h> |
31 | #include <linux/version.h> | 32 | #include <linux/version.h> |
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index cf07c26d9a4a..28195c350b97 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -6,13 +6,13 @@ | |||
6 | #include <linux/bootmem.h> | 6 | #include <linux/bootmem.h> |
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/slab.h> | ||
10 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
11 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
12 | #include <linux/seq_file.h> | 11 | #include <linux/seq_file.h> |
13 | #include <linux/debugfs.h> | 12 | #include <linux/debugfs.h> |
14 | #include <linux/pfn.h> | 13 | #include <linux/pfn.h> |
15 | #include <linux/percpu.h> | 14 | #include <linux/percpu.h> |
15 | #include <linux/gfp.h> | ||
16 | 16 | ||
17 | #include <asm/e820.h> | 17 | #include <asm/e820.h> |
18 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index ae9648eb1c7f..edc8b95afc1a 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/debugfs.h> | 12 | #include <linux/debugfs.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/gfp.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/rbtree.h> | 18 | #include <linux/rbtree.h> |
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index c9ba9deafe83..5c4ee422590e 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/mm.h> | 1 | #include <linux/mm.h> |
2 | #include <linux/gfp.h> | ||
2 | #include <asm/pgalloc.h> | 3 | #include <asm/pgalloc.h> |
3 | #include <asm/pgtable.h> | 4 | #include <asm/pgtable.h> |
4 | #include <asm/tlb.h> | 5 | #include <asm/tlb.h> |
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c index 46c8834aedc0..1a8faf09afed 100644 --- a/arch/x86/mm/pgtable_32.c +++ b/arch/x86/mm/pgtable_32.c | |||
@@ -6,7 +6,6 @@ | |||
6 | #include <linux/swap.h> | 6 | #include <linux/swap.h> |
7 | #include <linux/smp.h> | 7 | #include <linux/smp.h> |
8 | #include <linux/highmem.h> | 8 | #include <linux/highmem.h> |
9 | #include <linux/slab.h> | ||
10 | #include <linux/pagemap.h> | 9 | #include <linux/pagemap.h> |
11 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 6e22454bfaa6..c7b1ebfb7da7 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/init.h> | 3 | #include <linux/init.h> |
4 | #include <linux/irq.h> | 4 | #include <linux/irq.h> |
5 | #include <linux/dmi.h> | 5 | #include <linux/dmi.h> |
6 | #include <linux/slab.h> | ||
6 | #include <asm/numa.h> | 7 | #include <asm/numa.h> |
7 | #include <asm/pci_x86.h> | 8 | #include <asm/pci_x86.h> |
8 | 9 | ||
@@ -122,8 +123,8 @@ setup_resource(struct acpi_resource *acpi_res, void *data) | |||
122 | struct acpi_resource_address64 addr; | 123 | struct acpi_resource_address64 addr; |
123 | acpi_status status; | 124 | acpi_status status; |
124 | unsigned long flags; | 125 | unsigned long flags; |
125 | struct resource *root; | 126 | struct resource *root, *conflict; |
126 | u64 start, end; | 127 | u64 start, end, max_len; |
127 | 128 | ||
128 | status = resource_to_addr(acpi_res, &addr); | 129 | status = resource_to_addr(acpi_res, &addr); |
129 | if (!ACPI_SUCCESS(status)) | 130 | if (!ACPI_SUCCESS(status)) |
@@ -140,6 +141,17 @@ setup_resource(struct acpi_resource *acpi_res, void *data) | |||
140 | } else | 141 | } else |
141 | return AE_OK; | 142 | return AE_OK; |
142 | 143 | ||
144 | max_len = addr.maximum - addr.minimum + 1; | ||
145 | if (addr.address_length > max_len) { | ||
146 | dev_printk(KERN_DEBUG, &info->bridge->dev, | ||
147 | "host bridge window length %#llx doesn't fit in " | ||
148 | "%#llx-%#llx, trimming\n", | ||
149 | (unsigned long long) addr.address_length, | ||
150 | (unsigned long long) addr.minimum, | ||
151 | (unsigned long long) addr.maximum); | ||
152 | addr.address_length = max_len; | ||
153 | } | ||
154 | |||
143 | start = addr.minimum + addr.translation_offset; | 155 | start = addr.minimum + addr.translation_offset; |
144 | end = start + addr.address_length - 1; | 156 | end = start + addr.address_length - 1; |
145 | 157 | ||
@@ -157,9 +169,12 @@ setup_resource(struct acpi_resource *acpi_res, void *data) | |||
157 | return AE_OK; | 169 | return AE_OK; |
158 | } | 170 | } |
159 | 171 | ||
160 | if (insert_resource(root, res)) { | 172 | conflict = insert_resource_conflict(root, res); |
173 | if (conflict) { | ||
161 | dev_err(&info->bridge->dev, | 174 | dev_err(&info->bridge->dev, |
162 | "can't allocate host bridge window %pR\n", res); | 175 | "address space collision: host bridge window %pR " |
176 | "conflicts with %s %pR\n", | ||
177 | res, conflict->name, conflict); | ||
163 | } else { | 178 | } else { |
164 | pci_bus_add_resource(info->bus, res, 0); | 179 | pci_bus_add_resource(info->bus, res, 0); |
165 | info->res_num++; | 180 | info->res_num++; |
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 294e10cb11e1..cf2e93869c48 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/ioport.h> | 9 | #include <linux/ioport.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/dmi.h> | 11 | #include <linux/dmi.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | #include <asm/acpi.h> | 14 | #include <asm/acpi.h> |
14 | #include <asm/segment.h> | 15 | #include <asm/segment.h> |
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index dece3eb9c906..46fd43f79103 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
@@ -127,9 +127,6 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list) | |||
127 | continue; | 127 | continue; |
128 | if (!r->start || | 128 | if (!r->start || |
129 | pci_claim_resource(dev, idx) < 0) { | 129 | pci_claim_resource(dev, idx) < 0) { |
130 | dev_info(&dev->dev, | ||
131 | "can't reserve window %pR\n", | ||
132 | r); | ||
133 | /* | 130 | /* |
134 | * Something is wrong with the region. | 131 | * Something is wrong with the region. |
135 | * Invalidate the resource to prevent | 132 | * Invalidate the resource to prevent |
@@ -181,8 +178,6 @@ static void __init pcibios_allocate_resources(int pass) | |||
181 | "BAR %d: reserving %pr (d=%d, p=%d)\n", | 178 | "BAR %d: reserving %pr (d=%d, p=%d)\n", |
182 | idx, r, disabled, pass); | 179 | idx, r, disabled, pass); |
183 | if (pci_claim_resource(dev, idx) < 0) { | 180 | if (pci_claim_resource(dev, idx) < 0) { |
184 | dev_info(&dev->dev, | ||
185 | "can't reserve %pR\n", r); | ||
186 | /* We'll assign a new address later */ | 181 | /* We'll assign a new address later */ |
187 | r->end -= r->start; | 182 | r->end -= r->start; |
188 | r->start = 0; | 183 | r->start = 0; |
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index 8b107521d24e..5d362b5ba06f 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/pci.h> | 9 | #include <linux/pci.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/slab.h> | ||
12 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
13 | #include <linux/dmi.h> | 12 | #include <linux/dmi.h> |
14 | #include <linux/io.h> | 13 | #include <linux/io.h> |
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 8f3f9a50b1e0..39b9ebe8f886 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/sfi_acpi.h> | 16 | #include <linux/sfi_acpi.h> |
17 | #include <linux/bitmap.h> | 17 | #include <linux/bitmap.h> |
18 | #include <linux/dmi.h> | 18 | #include <linux/dmi.h> |
19 | #include <linux/slab.h> | ||
19 | #include <asm/e820.h> | 20 | #include <asm/e820.h> |
20 | #include <asm/pci_x86.h> | 21 | #include <asm/pci_x86.h> |
21 | #include <asm/acpi.h> | 22 | #include <asm/acpi.h> |
diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c index 1c975cc9839e..59a225c17b84 100644 --- a/arch/x86/pci/pcbios.c +++ b/arch/x86/pci/pcbios.c | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | #include <linux/pci.h> | 5 | #include <linux/pci.h> |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/module.h> | 8 | #include <linux/module.h> |
8 | #include <linux/uaccess.h> | 9 | #include <linux/uaccess.h> |
9 | #include <asm/pci_x86.h> | 10 | #include <asm/pci_x86.h> |
diff --git a/arch/x86/power/hibernate_32.c b/arch/x86/power/hibernate_32.c index 81197c62d5b3..3769079874d8 100644 --- a/arch/x86/power/hibernate_32.c +++ b/arch/x86/power/hibernate_32.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Copyright (c) 2006 Rafael J. Wysocki <rjw@sisk.pl> | 6 | * Copyright (c) 2006 Rafael J. Wysocki <rjw@sisk.pl> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/gfp.h> | ||
9 | #include <linux/suspend.h> | 10 | #include <linux/suspend.h> |
10 | #include <linux/bootmem.h> | 11 | #include <linux/bootmem.h> |
11 | 12 | ||
diff --git a/arch/x86/power/hibernate_64.c b/arch/x86/power/hibernate_64.c index 65fdc86e923f..d24f983ba1e5 100644 --- a/arch/x86/power/hibernate_64.c +++ b/arch/x86/power/hibernate_64.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * Copyright (c) 2001 Patrick Mochel <mochel@osdl.org> | 8 | * Copyright (c) 2001 Patrick Mochel <mochel@osdl.org> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/gfp.h> | ||
11 | #include <linux/smp.h> | 12 | #include <linux/smp.h> |
12 | #include <linux/suspend.h> | 13 | #include <linux/suspend.h> |
13 | #include <asm/proto.h> | 14 | #include <asm/proto.h> |
diff --git a/arch/x86/power/hibernate_asm_32.S b/arch/x86/power/hibernate_asm_32.S index b641388d8286..ad47daeafa4e 100644 --- a/arch/x86/power/hibernate_asm_32.S +++ b/arch/x86/power/hibernate_asm_32.S | |||
@@ -27,10 +27,17 @@ ENTRY(swsusp_arch_suspend) | |||
27 | ret | 27 | ret |
28 | 28 | ||
29 | ENTRY(restore_image) | 29 | ENTRY(restore_image) |
30 | movl mmu_cr4_features, %ecx | ||
30 | movl resume_pg_dir, %eax | 31 | movl resume_pg_dir, %eax |
31 | subl $__PAGE_OFFSET, %eax | 32 | subl $__PAGE_OFFSET, %eax |
32 | movl %eax, %cr3 | 33 | movl %eax, %cr3 |
33 | 34 | ||
35 | jecxz 1f # cr4 Pentium and higher, skip if zero | ||
36 | andl $~(X86_CR4_PGE), %ecx | ||
37 | movl %ecx, %cr4; # turn off PGE | ||
38 | movl %cr3, %eax; # flush TLB | ||
39 | movl %eax, %cr3 | ||
40 | 1: | ||
34 | movl restore_pblist, %edx | 41 | movl restore_pblist, %edx |
35 | .p2align 4,,7 | 42 | .p2align 4,,7 |
36 | 43 | ||
@@ -54,16 +61,8 @@ done: | |||
54 | movl $swapper_pg_dir, %eax | 61 | movl $swapper_pg_dir, %eax |
55 | subl $__PAGE_OFFSET, %eax | 62 | subl $__PAGE_OFFSET, %eax |
56 | movl %eax, %cr3 | 63 | movl %eax, %cr3 |
57 | /* Flush TLB, including "global" things (vmalloc) */ | ||
58 | movl mmu_cr4_features, %ecx | 64 | movl mmu_cr4_features, %ecx |
59 | jecxz 1f # cr4 Pentium and higher, skip if zero | 65 | jecxz 1f # cr4 Pentium and higher, skip if zero |
60 | movl %ecx, %edx | ||
61 | andl $~(X86_CR4_PGE), %edx | ||
62 | movl %edx, %cr4; # turn off PGE | ||
63 | 1: | ||
64 | movl %cr3, %eax; # flush TLB | ||
65 | movl %eax, %cr3 | ||
66 | jecxz 1f # cr4 Pentium and higher, skip if zero | ||
67 | movl %ecx, %cr4; # turn PGE back on | 66 | movl %ecx, %cr4; # turn PGE back on |
68 | 1: | 67 | 1: |
69 | 68 | ||
diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c index 21e1aeb9f3ea..ac74869b8140 100644 --- a/arch/x86/vdso/vma.c +++ b/arch/x86/vdso/vma.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/err.h> | 7 | #include <linux/err.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/init.h> | 10 | #include <linux/init.h> |
10 | #include <linux/random.h> | 11 | #include <linux/random.h> |
11 | #include <linux/elf.h> | 12 | #include <linux/elf.h> |
diff --git a/arch/x86/xen/debugfs.c b/arch/x86/xen/debugfs.c index e133ce25e290..1304bcec8ee5 100644 --- a/arch/x86/xen/debugfs.c +++ b/arch/x86/xen/debugfs.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/init.h> | 1 | #include <linux/init.h> |
2 | #include <linux/debugfs.h> | 2 | #include <linux/debugfs.h> |
3 | #include <linux/slab.h> | ||
3 | #include <linux/module.h> | 4 | #include <linux/module.h> |
4 | 5 | ||
5 | #include "debugfs.h" | 6 | #include "debugfs.h" |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index b607239c1ba8..65d8d79b46a8 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/highmem.h> | 28 | #include <linux/highmem.h> |
29 | #include <linux/console.h> | 29 | #include <linux/console.h> |
30 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
31 | #include <linux/gfp.h> | ||
31 | 32 | ||
32 | #include <xen/xen.h> | 33 | #include <xen/xen.h> |
33 | #include <xen/interface/xen.h> | 34 | #include <xen/interface/xen.h> |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index f9eb7de74f42..914f04695ce5 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/debugfs.h> | 43 | #include <linux/debugfs.h> |
44 | #include <linux/bug.h> | 44 | #include <linux/bug.h> |
45 | #include <linux/module.h> | 45 | #include <linux/module.h> |
46 | #include <linux/gfp.h> | ||
46 | 47 | ||
47 | #include <asm/pgtable.h> | 48 | #include <asm/pgtable.h> |
48 | #include <asm/tlbflush.h> | 49 | #include <asm/tlbflush.h> |
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index deafb65ef44e..a29693fd3138 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
18 | 19 | ||
19 | #include <asm/paravirt.h> | 20 | #include <asm/paravirt.h> |
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 24ded31b5aec..e0500646585d 100644 --- a/arch/x86/xen/spinlock.c +++ b/arch/x86/xen/spinlock.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
7 | #include <linux/debugfs.h> | 7 | #include <linux/debugfs.h> |
8 | #include <linux/log2.h> | 8 | #include <linux/log2.h> |
9 | #include <linux/gfp.h> | ||
9 | 10 | ||
10 | #include <asm/paravirt.h> | 11 | #include <asm/paravirt.h> |
11 | 12 | ||
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c index 0d3f07cd1b5f..32764b8880b5 100644 --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/clockchips.h> | 13 | #include <linux/clockchips.h> |
14 | #include <linux/kernel_stat.h> | 14 | #include <linux/kernel_stat.h> |
15 | #include <linux/math64.h> | 15 | #include <linux/math64.h> |
16 | #include <linux/gfp.h> | ||
16 | 17 | ||
17 | #include <asm/pvclock.h> | 18 | #include <asm/pvclock.h> |
18 | #include <asm/xen/hypervisor.h> | 19 | #include <asm/xen/hypervisor.h> |
diff --git a/arch/xtensa/kernel/pci-dma.c b/arch/xtensa/kernel/pci-dma.c index f5319d78c876..2783fda76ddc 100644 --- a/arch/xtensa/kernel/pci-dma.c +++ b/arch/xtensa/kernel/pci-dma.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/gfp.h> | ||
23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
24 | #include <asm/cacheflush.h> | 25 | #include <asm/cacheflush.h> |
25 | 26 | ||
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index e1a04a346e75..f167e0f5e05e 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/stddef.h> | 23 | #include <linux/stddef.h> |
24 | #include <linux/unistd.h> | 24 | #include <linux/unistd.h> |
25 | #include <linux/ptrace.h> | 25 | #include <linux/ptrace.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/elf.h> | 26 | #include <linux/elf.h> |
28 | #include <linux/init.h> | 27 | #include <linux/init.h> |
29 | #include <linux/prctl.h> | 28 | #include <linux/prctl.h> |
@@ -31,6 +30,7 @@ | |||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/mqueue.h> | 31 | #include <linux/mqueue.h> |
33 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
33 | #include <linux/slab.h> | ||
34 | 34 | ||
35 | #include <asm/pgtable.h> | 35 | #include <asm/pgtable.h> |
36 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index cdbc27ca9665..ba150e5de2eb 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c | |||
@@ -18,11 +18,11 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/bootmem.h> | 20 | #include <linux/bootmem.h> |
21 | #include <linux/gfp.h> | ||
21 | #include <linux/swap.h> | 22 | #include <linux/swap.h> |
22 | #include <linux/mman.h> | 23 | #include <linux/mman.h> |
23 | #include <linux/nodemask.h> | 24 | #include <linux/nodemask.h> |
24 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
25 | #include <linux/slab.h> | ||
26 | 26 | ||
27 | #include <asm/bootparam.h> | 27 | #include <asm/bootparam.h> |
28 | #include <asm/page.h> | 28 | #include <asm/page.h> |
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c index e60a1f57022f..2c723e8b30da 100644 --- a/arch/xtensa/platforms/iss/console.c +++ b/arch/xtensa/platforms/iss/console.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/console.h> | 15 | #include <linux/console.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
19 | #include <linux/major.h> | 18 | #include <linux/major.h> |
20 | #include <linux/param.h> | 19 | #include <linux/param.h> |
diff --git a/block/Kconfig b/block/Kconfig index 62a5921321cd..f9e89f4d94bb 100644 --- a/block/Kconfig +++ b/block/Kconfig | |||
@@ -78,8 +78,9 @@ config BLK_DEV_INTEGRITY | |||
78 | Protection. If in doubt, say N. | 78 | Protection. If in doubt, say N. |
79 | 79 | ||
80 | config BLK_CGROUP | 80 | config BLK_CGROUP |
81 | tristate | 81 | tristate "Block cgroup support" |
82 | depends on CGROUPS | 82 | depends on CGROUPS |
83 | depends on CFQ_GROUP_IOSCHED | ||
83 | default n | 84 | default n |
84 | ---help--- | 85 | ---help--- |
85 | Generic block IO controller cgroup interface. This is the common | 86 | Generic block IO controller cgroup interface. This is the common |
diff --git a/block/blk-barrier.c b/block/blk-barrier.c index 8618d8996fea..6d88544b677f 100644 --- a/block/blk-barrier.c +++ b/block/blk-barrier.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/bio.h> | 6 | #include <linux/bio.h> |
7 | #include <linux/blkdev.h> | 7 | #include <linux/blkdev.h> |
8 | #include <linux/gfp.h> | ||
8 | 9 | ||
9 | #include "blk.h" | 10 | #include "blk.h" |
10 | 11 | ||
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 4b686ad08eaa..5fe03def34b2 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kdev_t.h> | 15 | #include <linux/kdev_t.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/slab.h> | ||
18 | #include "blk-cgroup.h" | 19 | #include "blk-cgroup.h" |
19 | 20 | ||
20 | static DEFINE_SPINLOCK(blkio_list_lock); | 21 | static DEFINE_SPINLOCK(blkio_list_lock); |
diff --git a/block/blk-integrity.c b/block/blk-integrity.c index 96e83c2bdb94..edce1ef7933d 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/mempool.h> | 24 | #include <linux/mempool.h> |
25 | #include <linux/bio.h> | 25 | #include <linux/bio.h> |
26 | #include <linux/scatterlist.h> | 26 | #include <linux/scatterlist.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include "blk.h" | 29 | #include "blk.h" |
29 | 30 | ||
diff --git a/block/blk-ioc.c b/block/blk-ioc.c index 3f65c8aadb2f..d22c4c55c406 100644 --- a/block/blk-ioc.c +++ b/block/blk-ioc.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/bio.h> | 7 | #include <linux/bio.h> |
8 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
9 | #include <linux/bootmem.h> /* for max_pfn/max_low_pfn */ | 9 | #include <linux/bootmem.h> /* for max_pfn/max_low_pfn */ |
10 | #include <linux/slab.h> | ||
10 | 11 | ||
11 | #include "blk.h" | 12 | #include "blk.h" |
12 | 13 | ||
diff --git a/block/blk-settings.c b/block/blk-settings.c index 31e7a9375c13..f5ed5a1187ba 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c | |||
@@ -8,7 +8,9 @@ | |||
8 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
9 | #include <linux/bootmem.h> /* for max_pfn/max_low_pfn */ | 9 | #include <linux/bootmem.h> /* for max_pfn/max_low_pfn */ |
10 | #include <linux/gcd.h> | 10 | #include <linux/gcd.h> |
11 | #include <linux/lcm.h> | ||
11 | #include <linux/jiffies.h> | 12 | #include <linux/jiffies.h> |
13 | #include <linux/gfp.h> | ||
12 | 14 | ||
13 | #include "blk.h" | 15 | #include "blk.h" |
14 | 16 | ||
@@ -461,16 +463,6 @@ void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b) | |||
461 | } | 463 | } |
462 | EXPORT_SYMBOL(blk_queue_stack_limits); | 464 | EXPORT_SYMBOL(blk_queue_stack_limits); |
463 | 465 | ||
464 | static unsigned int lcm(unsigned int a, unsigned int b) | ||
465 | { | ||
466 | if (a && b) | ||
467 | return (a * b) / gcd(a, b); | ||
468 | else if (b) | ||
469 | return b; | ||
470 | |||
471 | return a; | ||
472 | } | ||
473 | |||
474 | /** | 466 | /** |
475 | * blk_stack_limits - adjust queue_limits for stacked devices | 467 | * blk_stack_limits - adjust queue_limits for stacked devices |
476 | * @t: the stacking driver limits (top device) | 468 | * @t: the stacking driver limits (top device) |
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 2ae2cb3f362f..306759bbdf1b 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * Functions related to sysfs handling | 2 | * Functions related to sysfs handling |
3 | */ | 3 | */ |
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/slab.h> | ||
5 | #include <linux/module.h> | 6 | #include <linux/module.h> |
6 | #include <linux/bio.h> | 7 | #include <linux/bio.h> |
7 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
@@ -106,6 +107,19 @@ static ssize_t queue_max_sectors_show(struct request_queue *q, char *page) | |||
106 | return queue_var_show(max_sectors_kb, (page)); | 107 | return queue_var_show(max_sectors_kb, (page)); |
107 | } | 108 | } |
108 | 109 | ||
110 | static ssize_t queue_max_segments_show(struct request_queue *q, char *page) | ||
111 | { | ||
112 | return queue_var_show(queue_max_segments(q), (page)); | ||
113 | } | ||
114 | |||
115 | static ssize_t queue_max_segment_size_show(struct request_queue *q, char *page) | ||
116 | { | ||
117 | if (test_bit(QUEUE_FLAG_CLUSTER, &q->queue_flags)) | ||
118 | return queue_var_show(queue_max_segment_size(q), (page)); | ||
119 | |||
120 | return queue_var_show(PAGE_CACHE_SIZE, (page)); | ||
121 | } | ||
122 | |||
109 | static ssize_t queue_logical_block_size_show(struct request_queue *q, char *page) | 123 | static ssize_t queue_logical_block_size_show(struct request_queue *q, char *page) |
110 | { | 124 | { |
111 | return queue_var_show(queue_logical_block_size(q), page); | 125 | return queue_var_show(queue_logical_block_size(q), page); |
@@ -280,6 +294,16 @@ static struct queue_sysfs_entry queue_max_hw_sectors_entry = { | |||
280 | .show = queue_max_hw_sectors_show, | 294 | .show = queue_max_hw_sectors_show, |
281 | }; | 295 | }; |
282 | 296 | ||
297 | static struct queue_sysfs_entry queue_max_segments_entry = { | ||
298 | .attr = {.name = "max_segments", .mode = S_IRUGO }, | ||
299 | .show = queue_max_segments_show, | ||
300 | }; | ||
301 | |||
302 | static struct queue_sysfs_entry queue_max_segment_size_entry = { | ||
303 | .attr = {.name = "max_segment_size", .mode = S_IRUGO }, | ||
304 | .show = queue_max_segment_size_show, | ||
305 | }; | ||
306 | |||
283 | static struct queue_sysfs_entry queue_iosched_entry = { | 307 | static struct queue_sysfs_entry queue_iosched_entry = { |
284 | .attr = {.name = "scheduler", .mode = S_IRUGO | S_IWUSR }, | 308 | .attr = {.name = "scheduler", .mode = S_IRUGO | S_IWUSR }, |
285 | .show = elv_iosched_show, | 309 | .show = elv_iosched_show, |
@@ -355,6 +379,8 @@ static struct attribute *default_attrs[] = { | |||
355 | &queue_ra_entry.attr, | 379 | &queue_ra_entry.attr, |
356 | &queue_max_hw_sectors_entry.attr, | 380 | &queue_max_hw_sectors_entry.attr, |
357 | &queue_max_sectors_entry.attr, | 381 | &queue_max_sectors_entry.attr, |
382 | &queue_max_segments_entry.attr, | ||
383 | &queue_max_segment_size_entry.attr, | ||
358 | &queue_iosched_entry.attr, | 384 | &queue_iosched_entry.attr, |
359 | &queue_hw_sector_size_entry.attr, | 385 | &queue_hw_sector_size_entry.attr, |
360 | &queue_logical_block_size_entry.attr, | 386 | &queue_logical_block_size_entry.attr, |
diff --git a/block/blk-tag.c b/block/blk-tag.c index 6b0f52c20964..ece65fc4c79b 100644 --- a/block/blk-tag.c +++ b/block/blk-tag.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/bio.h> | 6 | #include <linux/bio.h> |
7 | #include <linux/blkdev.h> | 7 | #include <linux/blkdev.h> |
8 | #include <linux/slab.h> | ||
8 | 9 | ||
9 | #include "blk.h" | 10 | #include "blk.h" |
10 | 11 | ||
diff --git a/block/bsg.c b/block/bsg.c index 46597a6bd112..82d58829ba59 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/idr.h> | 21 | #include <linux/idr.h> |
22 | #include <linux/bsg.h> | 22 | #include <linux/bsg.h> |
23 | #include <linux/smp_lock.h> | 23 | #include <linux/smp_lock.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <scsi/scsi.h> | 26 | #include <scsi/scsi.h> |
26 | #include <scsi/scsi_ioctl.h> | 27 | #include <scsi/scsi_ioctl.h> |
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index dee9d9378fee..838834be115b 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Copyright (C) 2003 Jens Axboe <axboe@kernel.dk> | 7 | * Copyright (C) 2003 Jens Axboe <axboe@kernel.dk> |
8 | */ | 8 | */ |
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/blkdev.h> | 11 | #include <linux/blkdev.h> |
11 | #include <linux/elevator.h> | 12 | #include <linux/elevator.h> |
12 | #include <linux/jiffies.h> | 13 | #include <linux/jiffies.h> |
@@ -47,6 +48,7 @@ static const int cfq_hist_divisor = 4; | |||
47 | #define CFQ_SERVICE_SHIFT 12 | 48 | #define CFQ_SERVICE_SHIFT 12 |
48 | 49 | ||
49 | #define CFQQ_SEEK_THR (sector_t)(8 * 100) | 50 | #define CFQQ_SEEK_THR (sector_t)(8 * 100) |
51 | #define CFQQ_CLOSE_THR (sector_t)(8 * 1024) | ||
50 | #define CFQQ_SECT_THR_NONROT (sector_t)(2 * 32) | 52 | #define CFQQ_SECT_THR_NONROT (sector_t)(2 * 32) |
51 | #define CFQQ_SEEKY(cfqq) (hweight32(cfqq->seek_history) > 32/8) | 53 | #define CFQQ_SEEKY(cfqq) (hweight32(cfqq->seek_history) > 32/8) |
52 | 54 | ||
@@ -947,6 +949,11 @@ cfq_find_alloc_cfqg(struct cfq_data *cfqd, struct cgroup *cgroup, int create) | |||
947 | unsigned int major, minor; | 949 | unsigned int major, minor; |
948 | 950 | ||
949 | cfqg = cfqg_of_blkg(blkiocg_lookup_group(blkcg, key)); | 951 | cfqg = cfqg_of_blkg(blkiocg_lookup_group(blkcg, key)); |
952 | if (cfqg && !cfqg->blkg.dev && bdi->dev && dev_name(bdi->dev)) { | ||
953 | sscanf(dev_name(bdi->dev), "%u:%u", &major, &minor); | ||
954 | cfqg->blkg.dev = MKDEV(major, minor); | ||
955 | goto done; | ||
956 | } | ||
950 | if (cfqg || !create) | 957 | if (cfqg || !create) |
951 | goto done; | 958 | goto done; |
952 | 959 | ||
@@ -1517,7 +1524,8 @@ static void __cfq_set_active_queue(struct cfq_data *cfqd, | |||
1517 | struct cfq_queue *cfqq) | 1524 | struct cfq_queue *cfqq) |
1518 | { | 1525 | { |
1519 | if (cfqq) { | 1526 | if (cfqq) { |
1520 | cfq_log_cfqq(cfqd, cfqq, "set_active"); | 1527 | cfq_log_cfqq(cfqd, cfqq, "set_active wl_prio:%d wl_type:%d", |
1528 | cfqd->serving_prio, cfqd->serving_type); | ||
1521 | cfqq->slice_start = 0; | 1529 | cfqq->slice_start = 0; |
1522 | cfqq->dispatch_start = jiffies; | 1530 | cfqq->dispatch_start = jiffies; |
1523 | cfqq->allocated_slice = 0; | 1531 | cfqq->allocated_slice = 0; |
@@ -1660,9 +1668,9 @@ static inline sector_t cfq_dist_from_last(struct cfq_data *cfqd, | |||
1660 | } | 1668 | } |
1661 | 1669 | ||
1662 | static inline int cfq_rq_close(struct cfq_data *cfqd, struct cfq_queue *cfqq, | 1670 | static inline int cfq_rq_close(struct cfq_data *cfqd, struct cfq_queue *cfqq, |
1663 | struct request *rq, bool for_preempt) | 1671 | struct request *rq) |
1664 | { | 1672 | { |
1665 | return cfq_dist_from_last(cfqd, rq) <= CFQQ_SEEK_THR; | 1673 | return cfq_dist_from_last(cfqd, rq) <= CFQQ_CLOSE_THR; |
1666 | } | 1674 | } |
1667 | 1675 | ||
1668 | static struct cfq_queue *cfqq_close(struct cfq_data *cfqd, | 1676 | static struct cfq_queue *cfqq_close(struct cfq_data *cfqd, |
@@ -1689,7 +1697,7 @@ static struct cfq_queue *cfqq_close(struct cfq_data *cfqd, | |||
1689 | * will contain the closest sector. | 1697 | * will contain the closest sector. |
1690 | */ | 1698 | */ |
1691 | __cfqq = rb_entry(parent, struct cfq_queue, p_node); | 1699 | __cfqq = rb_entry(parent, struct cfq_queue, p_node); |
1692 | if (cfq_rq_close(cfqd, cur_cfqq, __cfqq->next_rq, false)) | 1700 | if (cfq_rq_close(cfqd, cur_cfqq, __cfqq->next_rq)) |
1693 | return __cfqq; | 1701 | return __cfqq; |
1694 | 1702 | ||
1695 | if (blk_rq_pos(__cfqq->next_rq) < sector) | 1703 | if (blk_rq_pos(__cfqq->next_rq) < sector) |
@@ -1700,7 +1708,7 @@ static struct cfq_queue *cfqq_close(struct cfq_data *cfqd, | |||
1700 | return NULL; | 1708 | return NULL; |
1701 | 1709 | ||
1702 | __cfqq = rb_entry(node, struct cfq_queue, p_node); | 1710 | __cfqq = rb_entry(node, struct cfq_queue, p_node); |
1703 | if (cfq_rq_close(cfqd, cur_cfqq, __cfqq->next_rq, false)) | 1711 | if (cfq_rq_close(cfqd, cur_cfqq, __cfqq->next_rq)) |
1704 | return __cfqq; | 1712 | return __cfqq; |
1705 | 1713 | ||
1706 | return NULL; | 1714 | return NULL; |
@@ -1721,6 +1729,8 @@ static struct cfq_queue *cfq_close_cooperator(struct cfq_data *cfqd, | |||
1721 | { | 1729 | { |
1722 | struct cfq_queue *cfqq; | 1730 | struct cfq_queue *cfqq; |
1723 | 1731 | ||
1732 | if (cfq_class_idle(cur_cfqq)) | ||
1733 | return NULL; | ||
1724 | if (!cfq_cfqq_sync(cur_cfqq)) | 1734 | if (!cfq_cfqq_sync(cur_cfqq)) |
1725 | return NULL; | 1735 | return NULL; |
1726 | if (CFQQ_SEEKY(cur_cfqq)) | 1736 | if (CFQQ_SEEKY(cur_cfqq)) |
@@ -1787,7 +1797,11 @@ static bool cfq_should_idle(struct cfq_data *cfqd, struct cfq_queue *cfqq) | |||
1787 | * Otherwise, we do only if they are the last ones | 1797 | * Otherwise, we do only if they are the last ones |
1788 | * in their service tree. | 1798 | * in their service tree. |
1789 | */ | 1799 | */ |
1790 | return service_tree->count == 1 && cfq_cfqq_sync(cfqq); | 1800 | if (service_tree->count == 1 && cfq_cfqq_sync(cfqq)) |
1801 | return 1; | ||
1802 | cfq_log_cfqq(cfqd, cfqq, "Not idling. st->count:%d", | ||
1803 | service_tree->count); | ||
1804 | return 0; | ||
1791 | } | 1805 | } |
1792 | 1806 | ||
1793 | static void cfq_arm_slice_timer(struct cfq_data *cfqd) | 1807 | static void cfq_arm_slice_timer(struct cfq_data *cfqd) |
@@ -1832,8 +1846,11 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd) | |||
1832 | * time slice. | 1846 | * time slice. |
1833 | */ | 1847 | */ |
1834 | if (sample_valid(cic->ttime_samples) && | 1848 | if (sample_valid(cic->ttime_samples) && |
1835 | (cfqq->slice_end - jiffies < cic->ttime_mean)) | 1849 | (cfqq->slice_end - jiffies < cic->ttime_mean)) { |
1850 | cfq_log_cfqq(cfqd, cfqq, "Not idling. think_time:%d", | ||
1851 | cic->ttime_mean); | ||
1836 | return; | 1852 | return; |
1853 | } | ||
1837 | 1854 | ||
1838 | cfq_mark_cfqq_wait_request(cfqq); | 1855 | cfq_mark_cfqq_wait_request(cfqq); |
1839 | 1856 | ||
@@ -2041,6 +2058,7 @@ static void choose_service_tree(struct cfq_data *cfqd, struct cfq_group *cfqg) | |||
2041 | slice = max(slice, 2 * cfqd->cfq_slice_idle); | 2058 | slice = max(slice, 2 * cfqd->cfq_slice_idle); |
2042 | 2059 | ||
2043 | slice = max_t(unsigned, slice, CFQ_MIN_TT); | 2060 | slice = max_t(unsigned, slice, CFQ_MIN_TT); |
2061 | cfq_log(cfqd, "workload slice:%d", slice); | ||
2044 | cfqd->workload_expires = jiffies + slice; | 2062 | cfqd->workload_expires = jiffies + slice; |
2045 | cfqd->noidle_tree_requires_idle = false; | 2063 | cfqd->noidle_tree_requires_idle = false; |
2046 | } | 2064 | } |
@@ -2188,10 +2206,13 @@ static int cfq_forced_dispatch(struct cfq_data *cfqd) | |||
2188 | struct cfq_queue *cfqq; | 2206 | struct cfq_queue *cfqq; |
2189 | int dispatched = 0; | 2207 | int dispatched = 0; |
2190 | 2208 | ||
2191 | while ((cfqq = cfq_get_next_queue_forced(cfqd)) != NULL) | 2209 | /* Expire the timeslice of the current active queue first */ |
2210 | cfq_slice_expired(cfqd, 0); | ||
2211 | while ((cfqq = cfq_get_next_queue_forced(cfqd)) != NULL) { | ||
2212 | __cfq_set_active_queue(cfqd, cfqq); | ||
2192 | dispatched += __cfq_forced_dispatch_cfqq(cfqq); | 2213 | dispatched += __cfq_forced_dispatch_cfqq(cfqq); |
2214 | } | ||
2193 | 2215 | ||
2194 | cfq_slice_expired(cfqd, 0); | ||
2195 | BUG_ON(cfqd->busy_queues); | 2216 | BUG_ON(cfqd->busy_queues); |
2196 | 2217 | ||
2197 | cfq_log(cfqd, "forced_dispatch=%d", dispatched); | 2218 | cfq_log(cfqd, "forced_dispatch=%d", dispatched); |
@@ -3103,7 +3124,7 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq, | |||
3103 | * if this request is as-good as one we would expect from the | 3124 | * if this request is as-good as one we would expect from the |
3104 | * current cfqq, let it preempt | 3125 | * current cfqq, let it preempt |
3105 | */ | 3126 | */ |
3106 | if (cfq_rq_close(cfqd, cfqq, rq, true)) | 3127 | if (cfq_rq_close(cfqd, cfqq, rq)) |
3107 | return true; | 3128 | return true; |
3108 | 3129 | ||
3109 | return false; | 3130 | return false; |
@@ -3307,6 +3328,7 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq) | |||
3307 | if (cfq_should_wait_busy(cfqd, cfqq)) { | 3328 | if (cfq_should_wait_busy(cfqd, cfqq)) { |
3308 | cfqq->slice_end = jiffies + cfqd->cfq_slice_idle; | 3329 | cfqq->slice_end = jiffies + cfqd->cfq_slice_idle; |
3309 | cfq_mark_cfqq_wait_busy(cfqq); | 3330 | cfq_mark_cfqq_wait_busy(cfqq); |
3331 | cfq_log_cfqq(cfqd, cfqq, "will busy wait"); | ||
3310 | } | 3332 | } |
3311 | 3333 | ||
3312 | /* | 3334 | /* |
diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c index 4eb8e9ea4af5..f26051f44681 100644 --- a/block/compat_ioctl.c +++ b/block/compat_ioctl.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/elevator.h> | 6 | #include <linux/elevator.h> |
7 | #include <linux/fd.h> | 7 | #include <linux/fd.h> |
8 | #include <linux/hdreg.h> | 8 | #include <linux/hdreg.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/syscalls.h> | 10 | #include <linux/syscalls.h> |
10 | #include <linux/smp_lock.h> | 11 | #include <linux/smp_lock.h> |
11 | #include <linux/types.h> | 12 | #include <linux/types.h> |
diff --git a/block/elevator.c b/block/elevator.c index df75676f6671..76e3702d5381 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -154,7 +154,7 @@ static struct elevator_type *elevator_get(const char *name) | |||
154 | 154 | ||
155 | spin_unlock(&elv_list_lock); | 155 | spin_unlock(&elv_list_lock); |
156 | 156 | ||
157 | sprintf(elv, "%s-iosched", name); | 157 | snprintf(elv, sizeof(elv), "%s-iosched", name); |
158 | 158 | ||
159 | request_module("%s", elv); | 159 | request_module("%s", elv); |
160 | spin_lock(&elv_list_lock); | 160 | spin_lock(&elv_list_lock); |
diff --git a/block/ioctl.c b/block/ioctl.c index be48ea51faee..8905d2a2a717 100644 --- a/block/ioctl.c +++ b/block/ioctl.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/capability.h> | 1 | #include <linux/capability.h> |
2 | #include <linux/blkdev.h> | 2 | #include <linux/blkdev.h> |
3 | #include <linux/gfp.h> | ||
3 | #include <linux/blkpg.h> | 4 | #include <linux/blkpg.h> |
4 | #include <linux/hdreg.h> | 5 | #include <linux/hdreg.h> |
5 | #include <linux/backing-dev.h> | 6 | #include <linux/backing-dev.h> |
diff --git a/block/noop-iosched.c b/block/noop-iosched.c index 3a0d369d08c7..232c4b38cd37 100644 --- a/block/noop-iosched.c +++ b/block/noop-iosched.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/elevator.h> | 5 | #include <linux/elevator.h> |
6 | #include <linux/bio.h> | 6 | #include <linux/bio.h> |
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/init.h> | 9 | #include <linux/init.h> |
9 | 10 | ||
10 | struct noop_data { | 11 | struct noop_data { |
diff --git a/crypto/algapi.c b/crypto/algapi.c index 3e4524e6139b..76fae27ed01c 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/rtnetlink.h> | 19 | #include <linux/rtnetlink.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/string.h> | 21 | #include <linux/string.h> |
21 | 22 | ||
22 | #include "internal.h" | 23 | #include "internal.h" |
diff --git a/crypto/algboss.c b/crypto/algboss.c index 412241ce4cfa..c3c196b5823a 100644 --- a/crypto/algboss.c +++ b/crypto/algboss.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
20 | #include <linux/rtnetlink.h> | 20 | #include <linux/rtnetlink.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/string.h> | 23 | #include <linux/string.h> |
23 | 24 | ||
24 | #include "internal.h" | 25 | #include "internal.h" |
diff --git a/crypto/async_tx/async_pq.c b/crypto/async_tx/async_pq.c index ec87f53d5059..fdd8257d35d9 100644 --- a/crypto/async_tx/async_pq.c +++ b/crypto/async_tx/async_pq.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
25 | #include <linux/raid/pq.h> | 25 | #include <linux/raid/pq.h> |
26 | #include <linux/async_tx.h> | 26 | #include <linux/async_tx.h> |
27 | #include <linux/gfp.h> | ||
27 | 28 | ||
28 | /** | 29 | /** |
29 | * pq_scribble_page - space to hold throwaway P or Q buffer for | 30 | * pq_scribble_page - space to hold throwaway P or Q buffer for |
diff --git a/crypto/async_tx/raid6test.c b/crypto/async_tx/raid6test.c index f84f6b4301d9..c1321935ebcc 100644 --- a/crypto/async_tx/raid6test.c +++ b/crypto/async_tx/raid6test.c | |||
@@ -20,6 +20,7 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | #include <linux/async_tx.h> | 22 | #include <linux/async_tx.h> |
23 | #include <linux/gfp.h> | ||
23 | #include <linux/random.h> | 24 | #include <linux/random.h> |
24 | 25 | ||
25 | #undef pr | 26 | #undef pr |
diff --git a/crypto/hmac.c b/crypto/hmac.c index 15c2eb534541..8d9544cf8169 100644 --- a/crypto/hmac.c +++ b/crypto/hmac.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/scatterlist.h> | 25 | #include <linux/scatterlist.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/string.h> | 26 | #include <linux/string.h> |
28 | 27 | ||
29 | struct hmac_ctx { | 28 | struct hmac_ctx { |
diff --git a/crypto/rng.c b/crypto/rng.c index ba05e7380e76..f93cb5311182 100644 --- a/crypto/rng.c +++ b/crypto/rng.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mutex.h> | 19 | #include <linux/mutex.h> |
20 | #include <linux/random.h> | 20 | #include <linux/random.h> |
21 | #include <linux/seq_file.h> | 21 | #include <linux/seq_file.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/string.h> | 23 | #include <linux/string.h> |
23 | 24 | ||
24 | static DEFINE_MUTEX(crypto_default_rng_lock); | 25 | static DEFINE_MUTEX(crypto_default_rng_lock); |
diff --git a/crypto/seqiv.c b/crypto/seqiv.c index 5a013a8bf87a..4c4491229417 100644 --- a/crypto/seqiv.c +++ b/crypto/seqiv.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
24 | #include <linux/string.h> | 25 | #include <linux/string.h> |
25 | 26 | ||
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index aa3f84ccc786..a35159947a26 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c | |||
@@ -18,8 +18,8 @@ | |||
18 | #include <crypto/hash.h> | 18 | #include <crypto/hash.h> |
19 | #include <linux/err.h> | 19 | #include <linux/err.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/gfp.h> | ||
21 | #include <linux/module.h> | 22 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/scatterlist.h> | 23 | #include <linux/scatterlist.h> |
24 | #include <linux/string.h> | 24 | #include <linux/string.h> |
25 | #include <linux/moduleparam.h> | 25 | #include <linux/moduleparam.h> |
diff --git a/crypto/xor.c b/crypto/xor.c index fc5b836f3430..b75182d8ab14 100644 --- a/crypto/xor.c +++ b/crypto/xor.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #define BH_TRACE 0 | 19 | #define BH_TRACE 0 |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/gfp.h> | ||
21 | #include <linux/raid/xor.h> | 22 | #include <linux/raid/xor.h> |
22 | #include <linux/jiffies.h> | 23 | #include <linux/jiffies.h> |
23 | #include <asm/xor.h> | 24 | #include <asm/xor.h> |
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index b6ed60b57b0d..56205a0b85df 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/init.h> | 29 | #include <linux/init.h> |
29 | #include <linux/types.h> | 30 | #include <linux/types.h> |
30 | #ifdef CONFIG_ACPI_PROCFS_POWER | 31 | #ifdef CONFIG_ACPI_PROCFS_POWER |
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 3597d73f28f6..d98571385656 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/memory_hotplug.h> | 32 | #include <linux/memory_hotplug.h> |
33 | #include <linux/slab.h> | ||
33 | #include <acpi/acpi_drivers.h> | 34 | #include <acpi/acpi_drivers.h> |
34 | 35 | ||
35 | #define ACPI_MEMORY_DEVICE_CLASS "memory" | 36 | #define ACPI_MEMORY_DEVICE_CLASS "memory" |
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index 7e52295f1ecc..19dacfd43163 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/freezer.h> | 27 | #include <linux/freezer.h> |
28 | #include <linux/cpu.h> | 28 | #include <linux/cpu.h> |
29 | #include <linux/clockchips.h> | 29 | #include <linux/clockchips.h> |
30 | #include <linux/slab.h> | ||
30 | #include <acpi/acpi_bus.h> | 31 | #include <acpi/acpi_bus.h> |
31 | #include <acpi/acpi_drivers.h> | 32 | #include <acpi/acpi_drivers.h> |
32 | 33 | ||
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c index 837de669743a..78c55508aff5 100644 --- a/drivers/acpi/acpica/evgpe.c +++ b/drivers/acpi/acpica/evgpe.c | |||
@@ -117,19 +117,14 @@ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
117 | if (ACPI_FAILURE(status)) | 117 | if (ACPI_FAILURE(status)) |
118 | return_ACPI_STATUS(status); | 118 | return_ACPI_STATUS(status); |
119 | 119 | ||
120 | /* Mark wake-enabled or HW enable, or both */ | 120 | /* Clear the GPE (of stale events), then enable it */ |
121 | 121 | status = acpi_hw_clear_gpe(gpe_event_info); | |
122 | if (gpe_event_info->runtime_count) { | 122 | if (ACPI_FAILURE(status)) |
123 | /* Clear the GPE (of stale events), then enable it */ | 123 | return_ACPI_STATUS(status); |
124 | status = acpi_hw_clear_gpe(gpe_event_info); | ||
125 | if (ACPI_FAILURE(status)) | ||
126 | return_ACPI_STATUS(status); | ||
127 | |||
128 | /* Enable the requested runtime GPE */ | ||
129 | status = acpi_hw_write_gpe_enable_reg(gpe_event_info); | ||
130 | } | ||
131 | 124 | ||
132 | return_ACPI_STATUS(AE_OK); | 125 | /* Enable the requested GPE */ |
126 | status = acpi_hw_write_gpe_enable_reg(gpe_event_info); | ||
127 | return_ACPI_STATUS(status); | ||
133 | } | 128 | } |
134 | 129 | ||
135 | /******************************************************************************* | 130 | /******************************************************************************* |
diff --git a/drivers/acpi/acpica/exprep.c b/drivers/acpi/acpica/exprep.c index edf62bf5b266..a610ebe18edd 100644 --- a/drivers/acpi/acpica/exprep.c +++ b/drivers/acpi/acpica/exprep.c | |||
@@ -468,6 +468,18 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) | |||
468 | 468 | ||
469 | acpi_ut_add_reference(obj_desc->field.region_obj); | 469 | acpi_ut_add_reference(obj_desc->field.region_obj); |
470 | 470 | ||
471 | /* allow full data read from EC address space */ | ||
472 | if (obj_desc->field.region_obj->region.space_id == | ||
473 | ACPI_ADR_SPACE_EC) { | ||
474 | if (obj_desc->common_field.bit_length > 8) | ||
475 | obj_desc->common_field.access_bit_width = | ||
476 | ACPI_ROUND_UP(obj_desc->common_field. | ||
477 | bit_length, 8); | ||
478 | obj_desc->common_field.access_byte_width = | ||
479 | ACPI_DIV_8(obj_desc->common_field. | ||
480 | access_bit_width); | ||
481 | } | ||
482 | |||
471 | ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, | 483 | ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, |
472 | "RegionField: BitOff %X, Off %X, Gran %X, Region %p\n", | 484 | "RegionField: BitOff %X, Off %X, Gran %X, Region %p\n", |
473 | obj_desc->field.start_field_bit_offset, | 485 | obj_desc->field.start_field_bit_offset, |
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 75f39f2c166d..3026e3fa83ef 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/jiffies.h> | 32 | #include <linux/jiffies.h> |
33 | #include <linux/async.h> | 33 | #include <linux/async.h> |
34 | #include <linux/dmi.h> | 34 | #include <linux/dmi.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #ifdef CONFIG_ACPI_PROCFS_POWER | 37 | #ifdef CONFIG_ACPI_PROCFS_POWER |
37 | #include <linux/proc_fs.h> | 38 | #include <linux/proc_fs.h> |
@@ -567,13 +568,13 @@ static int acpi_battery_update(struct acpi_battery *battery) | |||
567 | result = acpi_battery_get_status(battery); | 568 | result = acpi_battery_get_status(battery); |
568 | if (result) | 569 | if (result) |
569 | return result; | 570 | return result; |
570 | #ifdef CONFIG_ACPI_SYSFS_POWER | ||
571 | if (!acpi_battery_present(battery)) { | 571 | if (!acpi_battery_present(battery)) { |
572 | #ifdef CONFIG_ACPI_SYSFS_POWER | ||
572 | sysfs_remove_battery(battery); | 573 | sysfs_remove_battery(battery); |
574 | #endif | ||
573 | battery->update_time = 0; | 575 | battery->update_time = 0; |
574 | return 0; | 576 | return 0; |
575 | } | 577 | } |
576 | #endif | ||
577 | if (!battery->update_time || | 578 | if (!battery->update_time || |
578 | old_present != acpi_battery_present(battery)) { | 579 | old_present != acpi_battery_present(battery)) { |
579 | result = acpi_battery_get_info(battery); | 580 | result = acpi_battery_get_info(battery); |
@@ -879,7 +880,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event) | |||
879 | #ifdef CONFIG_ACPI_SYSFS_POWER | 880 | #ifdef CONFIG_ACPI_SYSFS_POWER |
880 | /* acpi_battery_update could remove power_supply object */ | 881 | /* acpi_battery_update could remove power_supply object */ |
881 | if (battery->bat.dev) | 882 | if (battery->bat.dev) |
882 | kobject_uevent(&battery->bat.dev->kobj, KOBJ_CHANGE); | 883 | power_supply_changed(&battery->bat); |
883 | #endif | 884 | #endif |
884 | } | 885 | } |
885 | 886 | ||
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index b70cd3756142..37132dc2da03 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/device.h> | 32 | #include <linux/device.h> |
33 | #include <linux/proc_fs.h> | 33 | #include <linux/proc_fs.h> |
34 | #include <linux/acpi.h> | 34 | #include <linux/acpi.h> |
35 | #include <linux/slab.h> | ||
35 | #ifdef CONFIG_X86 | 36 | #ifdef CONFIG_X86 |
36 | #include <asm/mpspec.h> | 37 | #include <asm/mpspec.h> |
37 | #endif | 38 | #endif |
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index f53fbe307c9d..fd51c4ab4829 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/proc_fs.h> | 30 | #include <linux/proc_fs.h> |
31 | #include <linux/seq_file.h> | 31 | #include <linux/seq_file.h> |
32 | #include <linux/input.h> | 32 | #include <linux/input.h> |
33 | #include <linux/slab.h> | ||
33 | #include <acpi/acpi_bus.h> | 34 | #include <acpi/acpi_bus.h> |
34 | #include <acpi/acpi_drivers.h> | 35 | #include <acpi/acpi_drivers.h> |
35 | 36 | ||
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index 5faf6c21257d..45cd03b4630e 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/types.h> | 33 | #include <linux/types.h> |
33 | #include <linux/acpi.h> | 34 | #include <linux/acpi.h> |
34 | #include <acpi/acpi_bus.h> | 35 | #include <acpi/acpi_bus.h> |
diff --git a/drivers/acpi/debug.c b/drivers/acpi/debug.c index cc421b7ae166..146135e7a6a1 100644 --- a/drivers/acpi/debug.c +++ b/drivers/acpi/debug.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/moduleparam.h> | 10 | #include <linux/moduleparam.h> |
11 | #include <linux/debugfs.h> | 11 | #include <linux/debugfs.h> |
12 | #include <linux/slab.h> | ||
12 | #include <asm/uaccess.h> | 13 | #include <asm/uaccess.h> |
13 | #include <acpi/acpi_drivers.h> | 14 | #include <acpi/acpi_drivers.h> |
14 | 15 | ||
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index d9a85f1ddde6..3fe29e992be8 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/init.h> | 28 | #include <linux/init.h> |
28 | #include <linux/types.h> | 29 | #include <linux/types.h> |
29 | #include <linux/notifier.h> | 30 | #include <linux/notifier.h> |
@@ -1025,13 +1026,10 @@ static int dock_remove(struct dock_station *ds) | |||
1025 | static acpi_status | 1026 | static acpi_status |
1026 | find_dock(acpi_handle handle, u32 lvl, void *context, void **rv) | 1027 | find_dock(acpi_handle handle, u32 lvl, void *context, void **rv) |
1027 | { | 1028 | { |
1028 | acpi_status status = AE_OK; | ||
1029 | |||
1030 | if (is_dock(handle)) | 1029 | if (is_dock(handle)) |
1031 | if (dock_add(handle) >= 0) | 1030 | dock_add(handle); |
1032 | status = AE_CTRL_TERMINATE; | ||
1033 | 1031 | ||
1034 | return status; | 1032 | return AE_OK; |
1035 | } | 1033 | } |
1036 | 1034 | ||
1037 | static acpi_status | 1035 | static acpi_status |
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 1ac28c6a672e..f2234db85da0 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
40 | #include <linux/list.h> | 40 | #include <linux/list.h> |
41 | #include <linux/spinlock.h> | 41 | #include <linux/spinlock.h> |
42 | #include <linux/slab.h> | ||
42 | #include <asm/io.h> | 43 | #include <asm/io.h> |
43 | #include <acpi/acpi_bus.h> | 44 | #include <acpi/acpi_bus.h> |
44 | #include <acpi/acpi_drivers.h> | 45 | #include <acpi/acpi_drivers.h> |
@@ -628,12 +629,12 @@ static u32 acpi_ec_gpe_handler(void *data) | |||
628 | 629 | ||
629 | static acpi_status | 630 | static acpi_status |
630 | acpi_ec_space_handler(u32 function, acpi_physical_address address, | 631 | acpi_ec_space_handler(u32 function, acpi_physical_address address, |
631 | u32 bits, u64 *value, | 632 | u32 bits, u64 *value64, |
632 | void *handler_context, void *region_context) | 633 | void *handler_context, void *region_context) |
633 | { | 634 | { |
634 | struct acpi_ec *ec = handler_context; | 635 | struct acpi_ec *ec = handler_context; |
635 | int result = 0, i; | 636 | int result = 0, i, bytes = bits / 8; |
636 | u8 temp = 0; | 637 | u8 *value = (u8 *)value64; |
637 | 638 | ||
638 | if ((address > 0xFF) || !value || !handler_context) | 639 | if ((address > 0xFF) || !value || !handler_context) |
639 | return AE_BAD_PARAMETER; | 640 | return AE_BAD_PARAMETER; |
@@ -641,32 +642,15 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address, | |||
641 | if (function != ACPI_READ && function != ACPI_WRITE) | 642 | if (function != ACPI_READ && function != ACPI_WRITE) |
642 | return AE_BAD_PARAMETER; | 643 | return AE_BAD_PARAMETER; |
643 | 644 | ||
644 | if (bits != 8 && acpi_strict) | 645 | if (EC_FLAGS_MSI || bits > 8) |
645 | return AE_BAD_PARAMETER; | ||
646 | |||
647 | if (EC_FLAGS_MSI) | ||
648 | acpi_ec_burst_enable(ec); | 646 | acpi_ec_burst_enable(ec); |
649 | 647 | ||
650 | if (function == ACPI_READ) { | 648 | for (i = 0; i < bytes; ++i, ++address, ++value) |
651 | result = acpi_ec_read(ec, address, &temp); | 649 | result = (function == ACPI_READ) ? |
652 | *value = temp; | 650 | acpi_ec_read(ec, address, value) : |
653 | } else { | 651 | acpi_ec_write(ec, address, *value); |
654 | temp = 0xff & (*value); | ||
655 | result = acpi_ec_write(ec, address, temp); | ||
656 | } | ||
657 | |||
658 | for (i = 8; unlikely(bits - i > 0); i += 8) { | ||
659 | ++address; | ||
660 | if (function == ACPI_READ) { | ||
661 | result = acpi_ec_read(ec, address, &temp); | ||
662 | (*value) |= ((u64)temp) << i; | ||
663 | } else { | ||
664 | temp = 0xff & ((*value) >> i); | ||
665 | result = acpi_ec_write(ec, address, temp); | ||
666 | } | ||
667 | } | ||
668 | 652 | ||
669 | if (EC_FLAGS_MSI) | 653 | if (EC_FLAGS_MSI || bits > 8) |
670 | acpi_ec_burst_disable(ec); | 654 | acpi_ec_burst_disable(ec); |
671 | 655 | ||
672 | switch (result) { | 656 | switch (result) { |
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c index c511071bfd79..d439314a75d8 100644 --- a/drivers/acpi/event.c +++ b/drivers/acpi/event.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/proc_fs.h> | 10 | #include <linux/proc_fs.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/poll.h> | 12 | #include <linux/poll.h> |
13 | #include <linux/gfp.h> | ||
13 | #include <acpi/acpi_drivers.h> | 14 | #include <acpi/acpi_drivers.h> |
14 | #include <net/netlink.h> | 15 | #include <net/netlink.h> |
15 | #include <net/genetlink.h> | 16 | #include <net/genetlink.h> |
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 6d5b64b7d526..4af6301601e7 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/list.h> | 10 | #include <linux/list.h> |
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/rwsem.h> | 13 | #include <linux/rwsem.h> |
13 | #include <linux/acpi.h> | 14 | #include <linux/acpi.h> |
14 | 15 | ||
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index b8725461d887..b0337d314604 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -61,8 +61,10 @@ int node_to_pxm(int node) | |||
61 | 61 | ||
62 | void __acpi_map_pxm_to_node(int pxm, int node) | 62 | void __acpi_map_pxm_to_node(int pxm, int node) |
63 | { | 63 | { |
64 | pxm_to_node_map[pxm] = node; | 64 | if (pxm_to_node_map[pxm] == NUMA_NO_NODE || node < pxm_to_node_map[pxm]) |
65 | node_to_pxm_map[node] = pxm; | 65 | pxm_to_node_map[pxm] = node; |
66 | if (node_to_pxm_map[node] == PXM_INVAL || pxm < node_to_pxm_map[node]) | ||
67 | node_to_pxm_map[node] = pxm; | ||
66 | } | 68 | } |
67 | 69 | ||
68 | int acpi_map_pxm_to_node(int pxm) | 70 | int acpi_map_pxm_to_node(int pxm) |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 8e6d8665f0ae..7594f65800cf 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -758,7 +758,14 @@ static acpi_status __acpi_os_execute(acpi_execute_type type, | |||
758 | queue = hp ? kacpi_hotplug_wq : | 758 | queue = hp ? kacpi_hotplug_wq : |
759 | (type == OSL_NOTIFY_HANDLER ? kacpi_notify_wq : kacpid_wq); | 759 | (type == OSL_NOTIFY_HANDLER ? kacpi_notify_wq : kacpid_wq); |
760 | dpc->wait = hp ? 1 : 0; | 760 | dpc->wait = hp ? 1 : 0; |
761 | INIT_WORK(&dpc->work, acpi_os_execute_deferred); | 761 | |
762 | if (queue == kacpi_hotplug_wq) | ||
763 | INIT_WORK(&dpc->work, acpi_os_execute_deferred); | ||
764 | else if (queue == kacpi_notify_wq) | ||
765 | INIT_WORK(&dpc->work, acpi_os_execute_deferred); | ||
766 | else | ||
767 | INIT_WORK(&dpc->work, acpi_os_execute_deferred); | ||
768 | |||
762 | ret = queue_work(queue, &dpc->work); | 769 | ret = queue_work(queue, &dpc->work); |
763 | 770 | ||
764 | if (!ret) { | 771 | if (!ret) { |
@@ -1151,16 +1158,10 @@ int acpi_check_resource_conflict(const struct resource *res) | |||
1151 | 1158 | ||
1152 | if (clash) { | 1159 | if (clash) { |
1153 | if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) { | 1160 | if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) { |
1154 | printk("%sACPI: %s resource %s [0x%llx-0x%llx]" | 1161 | printk(KERN_WARNING "ACPI: resource %s %pR" |
1155 | " conflicts with ACPI region %s" | 1162 | " conflicts with ACPI region %s %pR\n", |
1156 | " [0x%llx-0x%llx]\n", | 1163 | res->name, res, res_list_elem->name, |
1157 | acpi_enforce_resources == ENFORCE_RESOURCES_LAX | 1164 | res_list_elem); |
1158 | ? KERN_WARNING : KERN_ERR, | ||
1159 | ioport ? "I/O" : "Memory", res->name, | ||
1160 | (long long) res->start, (long long) res->end, | ||
1161 | res_list_elem->name, | ||
1162 | (long long) res_list_elem->start, | ||
1163 | (long long) res_list_elem->end); | ||
1164 | if (acpi_enforce_resources == ENFORCE_RESOURCES_LAX) | 1165 | if (acpi_enforce_resources == ENFORCE_RESOURCES_LAX) |
1165 | printk(KERN_NOTICE "ACPI: This conflict may" | 1166 | printk(KERN_NOTICE "ACPI: This conflict may" |
1166 | " cause random problems and system" | 1167 | " cause random problems and system" |
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 843699ed93f2..b0a71ecee682 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/pm.h> | 37 | #include <linux/pm.h> |
38 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
39 | #include <linux/acpi.h> | 39 | #include <linux/acpi.h> |
40 | #include <linux/slab.h> | ||
40 | #include <acpi/acpi_bus.h> | 41 | #include <acpi/acpi_bus.h> |
41 | #include <acpi/acpi_drivers.h> | 42 | #include <acpi/acpi_drivers.h> |
42 | 43 | ||
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 04b0f007c9b7..8d47a5846aeb 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/pm.h> | 39 | #include <linux/pm.h> |
40 | #include <linux/pci.h> | 40 | #include <linux/pci.h> |
41 | #include <linux/mutex.h> | 41 | #include <linux/mutex.h> |
42 | #include <linux/slab.h> | ||
42 | 43 | ||
43 | #include <acpi/acpi_bus.h> | 44 | #include <acpi/acpi_bus.h> |
44 | #include <acpi/acpi_drivers.h> | 45 | #include <acpi/acpi_drivers.h> |
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index d724736d56c8..aefce33f2a09 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/pci.h> | 34 | #include <linux/pci.h> |
35 | #include <linux/pci-acpi.h> | 35 | #include <linux/pci-acpi.h> |
36 | #include <linux/acpi.h> | 36 | #include <linux/acpi.h> |
37 | #include <linux/slab.h> | ||
37 | #include <acpi/acpi_bus.h> | 38 | #include <acpi/acpi_bus.h> |
38 | #include <acpi/acpi_drivers.h> | 39 | #include <acpi/acpi_drivers.h> |
39 | 40 | ||
diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c index 11f219743204..07f7fea8a4e2 100644 --- a/drivers/acpi/pci_slot.c +++ b/drivers/acpi/pci_slot.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/types.h> | 30 | #include <linux/types.h> |
30 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
31 | #include <linux/acpi.h> | 32 | #include <linux/acpi.h> |
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 0f30c3c1eea4..ddc76787b842 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/module.h> | 39 | #include <linux/module.h> |
40 | #include <linux/init.h> | 40 | #include <linux/init.h> |
41 | #include <linux/types.h> | 41 | #include <linux/types.h> |
42 | #include <linux/slab.h> | ||
42 | #include <linux/proc_fs.h> | 43 | #include <linux/proc_fs.h> |
43 | #include <linux/seq_file.h> | 44 | #include <linux/seq_file.h> |
44 | #include <acpi/acpi_bus.h> | 45 | #include <acpi/acpi_bus.h> |
diff --git a/drivers/acpi/power_meter.c b/drivers/acpi/power_meter.c index 834c5af0de4b..e8c32a49f14e 100644 --- a/drivers/acpi/power_meter.c +++ b/drivers/acpi/power_meter.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/jiffies.h> | 25 | #include <linux/jiffies.h> |
26 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
27 | #include <linux/dmi.h> | 27 | #include <linux/dmi.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/kdev_t.h> | 29 | #include <linux/kdev_t.h> |
29 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
30 | #include <linux/time.h> | 31 | #include <linux/time.h> |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 791ac7b0f8df..51284351418f 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * - Added _PDC for platforms with Intel CPUs | 8 | * - Added _PDC for platforms with Intel CPUs |
9 | */ | 9 | */ |
10 | #include <linux/dmi.h> | 10 | #include <linux/dmi.h> |
11 | #include <linux/slab.h> | ||
11 | 12 | ||
12 | #include <acpi/acpi_drivers.h> | 13 | #include <acpi/acpi_drivers.h> |
13 | #include <acpi/processor.h> | 14 | #include <acpi/processor.h> |
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index b5658cdce27f..5675d9747e87 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/dmi.h> | 45 | #include <linux/dmi.h> |
46 | #include <linux/moduleparam.h> | 46 | #include <linux/moduleparam.h> |
47 | #include <linux/cpuidle.h> | 47 | #include <linux/cpuidle.h> |
48 | #include <linux/slab.h> | ||
48 | 49 | ||
49 | #include <asm/io.h> | 50 | #include <asm/io.h> |
50 | #include <asm/system.h> | 51 | #include <asm/system.h> |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 37dfce749398..5939e7f7d8e9 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | #include <linux/cpufreq.h> | 34 | #include <linux/cpufreq.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/proc_fs.h> | 36 | #include <linux/proc_fs.h> |
36 | #include <linux/seq_file.h> | 37 | #include <linux/seq_file.h> |
37 | #include <linux/acpi.h> | 38 | #include <linux/acpi.h> |
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index d648a9860b88..ba1bd263d903 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/cpufreq.h> | 32 | #include <linux/cpufreq.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #ifdef CONFIG_X86 | 35 | #ifdef CONFIG_X86 |
35 | #include <asm/cpufeature.h> | 36 | #include <asm/cpufeature.h> |
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index 29c6f5766dcf..9ade1a5b32ed 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/init.h> | 32 | #include <linux/init.h> |
32 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
33 | #include <linux/cpufreq.h> | 34 | #include <linux/cpufreq.h> |
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 89ad11138e48..4ff76e8174eb 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/module.h> | 29 | #include <linux/module.h> |
29 | #include <linux/moduleparam.h> | 30 | #include <linux/moduleparam.h> |
30 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c index fd09229282ea..36704b887ccf 100644 --- a/drivers/acpi/sbshc.c +++ b/drivers/acpi/sbshc.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <acpi/acpi_bus.h> | 11 | #include <acpi/acpi_bus.h> |
12 | #include <acpi/acpi_drivers.h> | 12 | #include <acpi/acpi_drivers.h> |
13 | #include <linux/wait.h> | 13 | #include <linux/wait.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
15 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
16 | #include "sbshc.h" | 17 | #include "sbshc.h" |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index fb7fc24fe727..0338f513a010 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -4,10 +4,12 @@ | |||
4 | 4 | ||
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
8 | #include <linux/acpi.h> | 9 | #include <linux/acpi.h> |
9 | #include <linux/signal.h> | 10 | #include <linux/signal.h> |
10 | #include <linux/kthread.h> | 11 | #include <linux/kthread.h> |
12 | #include <linux/dmi.h> | ||
11 | 13 | ||
12 | #include <acpi/acpi_drivers.h> | 14 | #include <acpi/acpi_drivers.h> |
13 | 15 | ||
@@ -1032,6 +1034,41 @@ static void acpi_add_id(struct acpi_device *device, const char *dev_id) | |||
1032 | list_add_tail(&id->list, &device->pnp.ids); | 1034 | list_add_tail(&id->list, &device->pnp.ids); |
1033 | } | 1035 | } |
1034 | 1036 | ||
1037 | /* | ||
1038 | * Old IBM workstations have a DSDT bug wherein the SMBus object | ||
1039 | * lacks the SMBUS01 HID and the methods do not have the necessary "_" | ||
1040 | * prefix. Work around this. | ||
1041 | */ | ||
1042 | static int acpi_ibm_smbus_match(struct acpi_device *device) | ||
1043 | { | ||
1044 | acpi_handle h_dummy; | ||
1045 | struct acpi_buffer path = {ACPI_ALLOCATE_BUFFER, NULL}; | ||
1046 | int result; | ||
1047 | |||
1048 | if (!dmi_name_in_vendors("IBM")) | ||
1049 | return -ENODEV; | ||
1050 | |||
1051 | /* Look for SMBS object */ | ||
1052 | result = acpi_get_name(device->handle, ACPI_SINGLE_NAME, &path); | ||
1053 | if (result) | ||
1054 | return result; | ||
1055 | |||
1056 | if (strcmp("SMBS", path.pointer)) { | ||
1057 | result = -ENODEV; | ||
1058 | goto out; | ||
1059 | } | ||
1060 | |||
1061 | /* Does it have the necessary (but misnamed) methods? */ | ||
1062 | result = -ENODEV; | ||
1063 | if (ACPI_SUCCESS(acpi_get_handle(device->handle, "SBI", &h_dummy)) && | ||
1064 | ACPI_SUCCESS(acpi_get_handle(device->handle, "SBR", &h_dummy)) && | ||
1065 | ACPI_SUCCESS(acpi_get_handle(device->handle, "SBW", &h_dummy))) | ||
1066 | result = 0; | ||
1067 | out: | ||
1068 | kfree(path.pointer); | ||
1069 | return result; | ||
1070 | } | ||
1071 | |||
1035 | static void acpi_device_set_id(struct acpi_device *device) | 1072 | static void acpi_device_set_id(struct acpi_device *device) |
1036 | { | 1073 | { |
1037 | acpi_status status; | 1074 | acpi_status status; |
@@ -1044,12 +1081,6 @@ static void acpi_device_set_id(struct acpi_device *device) | |||
1044 | if (ACPI_IS_ROOT_DEVICE(device)) { | 1081 | if (ACPI_IS_ROOT_DEVICE(device)) { |
1045 | acpi_add_id(device, ACPI_SYSTEM_HID); | 1082 | acpi_add_id(device, ACPI_SYSTEM_HID); |
1046 | break; | 1083 | break; |
1047 | } else if (ACPI_IS_ROOT_DEVICE(device->parent)) { | ||
1048 | /* \_SB_, the only root-level namespace device */ | ||
1049 | acpi_add_id(device, ACPI_BUS_HID); | ||
1050 | strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME); | ||
1051 | strcpy(device->pnp.device_class, ACPI_BUS_CLASS); | ||
1052 | break; | ||
1053 | } | 1084 | } |
1054 | 1085 | ||
1055 | status = acpi_get_object_info(device->handle, &info); | 1086 | status = acpi_get_object_info(device->handle, &info); |
@@ -1082,6 +1113,14 @@ static void acpi_device_set_id(struct acpi_device *device) | |||
1082 | acpi_add_id(device, ACPI_BAY_HID); | 1113 | acpi_add_id(device, ACPI_BAY_HID); |
1083 | else if (ACPI_SUCCESS(acpi_dock_match(device))) | 1114 | else if (ACPI_SUCCESS(acpi_dock_match(device))) |
1084 | acpi_add_id(device, ACPI_DOCK_HID); | 1115 | acpi_add_id(device, ACPI_DOCK_HID); |
1116 | else if (!acpi_ibm_smbus_match(device)) | ||
1117 | acpi_add_id(device, ACPI_SMBUS_IBM_HID); | ||
1118 | else if (!acpi_device_hid(device) && | ||
1119 | ACPI_IS_ROOT_DEVICE(device->parent)) { | ||
1120 | acpi_add_id(device, ACPI_BUS_HID); /* \_SB, LNXSYBUS */ | ||
1121 | strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME); | ||
1122 | strcpy(device->pnp.device_class, ACPI_BUS_CLASS); | ||
1123 | } | ||
1085 | 1124 | ||
1086 | break; | 1125 | break; |
1087 | case ACPI_BUS_TYPE_POWER: | 1126 | case ACPI_BUS_TYPE_POWER: |
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c index 743f2445e2a1..4aaf24976138 100644 --- a/drivers/acpi/system.c +++ b/drivers/acpi/system.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/proc_fs.h> | 26 | #include <linux/proc_fs.h> |
27 | #include <linux/seq_file.h> | 27 | #include <linux/seq_file.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/init.h> | 29 | #include <linux/init.h> |
29 | #include <linux/string.h> | 30 | #include <linux/string.h> |
30 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 5d3893558cf7..efad1f33aeb5 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/dmi.h> | 36 | #include <linux/dmi.h> |
37 | #include <linux/init.h> | 37 | #include <linux/init.h> |
38 | #include <linux/slab.h> | ||
38 | #include <linux/types.h> | 39 | #include <linux/types.h> |
39 | #include <linux/proc_fs.h> | 40 | #include <linux/proc_fs.h> |
40 | #include <linux/jiffies.h> | 41 | #include <linux/jiffies.h> |
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index c9a49f4747e6..b002a471c5d4 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/init.h> | 29 | #include <linux/init.h> |
29 | #include <linux/types.h> | 30 | #include <linux/types.h> |
30 | #include <acpi/acpi_bus.h> | 31 | #include <acpi/acpi_bus.h> |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index cbe6f3924a10..a0c93b321482 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -39,10 +39,12 @@ | |||
39 | #include <linux/sort.h> | 39 | #include <linux/sort.h> |
40 | #include <linux/pci.h> | 40 | #include <linux/pci.h> |
41 | #include <linux/pci_ids.h> | 41 | #include <linux/pci_ids.h> |
42 | #include <linux/slab.h> | ||
42 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
43 | #include <linux/dmi.h> | 44 | #include <linux/dmi.h> |
44 | #include <acpi/acpi_bus.h> | 45 | #include <acpi/acpi_bus.h> |
45 | #include <acpi/acpi_drivers.h> | 46 | #include <acpi/acpi_drivers.h> |
47 | #include <linux/suspend.h> | ||
46 | 48 | ||
47 | #define PREFIX "ACPI: " | 49 | #define PREFIX "ACPI: " |
48 | 50 | ||
@@ -88,7 +90,6 @@ module_param(allow_duplicates, bool, 0644); | |||
88 | static int register_count = 0; | 90 | static int register_count = 0; |
89 | static int acpi_video_bus_add(struct acpi_device *device); | 91 | static int acpi_video_bus_add(struct acpi_device *device); |
90 | static int acpi_video_bus_remove(struct acpi_device *device, int type); | 92 | static int acpi_video_bus_remove(struct acpi_device *device, int type); |
91 | static int acpi_video_resume(struct acpi_device *device); | ||
92 | static void acpi_video_bus_notify(struct acpi_device *device, u32 event); | 93 | static void acpi_video_bus_notify(struct acpi_device *device, u32 event); |
93 | 94 | ||
94 | static const struct acpi_device_id video_device_ids[] = { | 95 | static const struct acpi_device_id video_device_ids[] = { |
@@ -104,7 +105,6 @@ static struct acpi_driver acpi_video_bus = { | |||
104 | .ops = { | 105 | .ops = { |
105 | .add = acpi_video_bus_add, | 106 | .add = acpi_video_bus_add, |
106 | .remove = acpi_video_bus_remove, | 107 | .remove = acpi_video_bus_remove, |
107 | .resume = acpi_video_resume, | ||
108 | .notify = acpi_video_bus_notify, | 108 | .notify = acpi_video_bus_notify, |
109 | }, | 109 | }, |
110 | }; | 110 | }; |
@@ -159,6 +159,7 @@ struct acpi_video_bus { | |||
159 | struct proc_dir_entry *dir; | 159 | struct proc_dir_entry *dir; |
160 | struct input_dev *input; | 160 | struct input_dev *input; |
161 | char phys[32]; /* for input device */ | 161 | char phys[32]; /* for input device */ |
162 | struct notifier_block pm_nb; | ||
162 | }; | 163 | }; |
163 | 164 | ||
164 | struct acpi_video_device_flags { | 165 | struct acpi_video_device_flags { |
@@ -1020,6 +1021,13 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
1020 | if (IS_ERR(device->backlight)) | 1021 | if (IS_ERR(device->backlight)) |
1021 | return; | 1022 | return; |
1022 | 1023 | ||
1024 | /* | ||
1025 | * Save current brightness level in case we have to restore it | ||
1026 | * before acpi_video_device_lcd_set_level() is called next time. | ||
1027 | */ | ||
1028 | device->backlight->props.brightness = | ||
1029 | acpi_video_get_brightness(device->backlight); | ||
1030 | |||
1023 | result = sysfs_create_link(&device->backlight->dev.kobj, | 1031 | result = sysfs_create_link(&device->backlight->dev.kobj, |
1024 | &device->dev->dev.kobj, "device"); | 1032 | &device->dev->dev.kobj, "device"); |
1025 | if (result) | 1033 | if (result) |
@@ -2122,7 +2130,7 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event) | |||
2122 | { | 2130 | { |
2123 | struct acpi_video_bus *video = acpi_driver_data(device); | 2131 | struct acpi_video_bus *video = acpi_driver_data(device); |
2124 | struct input_dev *input; | 2132 | struct input_dev *input; |
2125 | int keycode; | 2133 | int keycode = 0; |
2126 | 2134 | ||
2127 | if (!video) | 2135 | if (!video) |
2128 | return; | 2136 | return; |
@@ -2158,17 +2166,19 @@ static void acpi_video_bus_notify(struct acpi_device *device, u32 event) | |||
2158 | break; | 2166 | break; |
2159 | 2167 | ||
2160 | default: | 2168 | default: |
2161 | keycode = KEY_UNKNOWN; | ||
2162 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 2169 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
2163 | "Unsupported event [0x%x]\n", event)); | 2170 | "Unsupported event [0x%x]\n", event)); |
2164 | break; | 2171 | break; |
2165 | } | 2172 | } |
2166 | 2173 | ||
2167 | acpi_notifier_call_chain(device, event, 0); | 2174 | acpi_notifier_call_chain(device, event, 0); |
2168 | input_report_key(input, keycode, 1); | 2175 | |
2169 | input_sync(input); | 2176 | if (keycode) { |
2170 | input_report_key(input, keycode, 0); | 2177 | input_report_key(input, keycode, 1); |
2171 | input_sync(input); | 2178 | input_sync(input); |
2179 | input_report_key(input, keycode, 0); | ||
2180 | input_sync(input); | ||
2181 | } | ||
2172 | 2182 | ||
2173 | return; | 2183 | return; |
2174 | } | 2184 | } |
@@ -2179,7 +2189,7 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) | |||
2179 | struct acpi_device *device = NULL; | 2189 | struct acpi_device *device = NULL; |
2180 | struct acpi_video_bus *bus; | 2190 | struct acpi_video_bus *bus; |
2181 | struct input_dev *input; | 2191 | struct input_dev *input; |
2182 | int keycode; | 2192 | int keycode = 0; |
2183 | 2193 | ||
2184 | if (!video_device) | 2194 | if (!video_device) |
2185 | return; | 2195 | return; |
@@ -2220,39 +2230,48 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) | |||
2220 | keycode = KEY_DISPLAY_OFF; | 2230 | keycode = KEY_DISPLAY_OFF; |
2221 | break; | 2231 | break; |
2222 | default: | 2232 | default: |
2223 | keycode = KEY_UNKNOWN; | ||
2224 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 2233 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
2225 | "Unsupported event [0x%x]\n", event)); | 2234 | "Unsupported event [0x%x]\n", event)); |
2226 | break; | 2235 | break; |
2227 | } | 2236 | } |
2228 | 2237 | ||
2229 | acpi_notifier_call_chain(device, event, 0); | 2238 | acpi_notifier_call_chain(device, event, 0); |
2230 | input_report_key(input, keycode, 1); | 2239 | |
2231 | input_sync(input); | 2240 | if (keycode) { |
2232 | input_report_key(input, keycode, 0); | 2241 | input_report_key(input, keycode, 1); |
2233 | input_sync(input); | 2242 | input_sync(input); |
2243 | input_report_key(input, keycode, 0); | ||
2244 | input_sync(input); | ||
2245 | } | ||
2234 | 2246 | ||
2235 | return; | 2247 | return; |
2236 | } | 2248 | } |
2237 | 2249 | ||
2238 | static int instance; | 2250 | static int acpi_video_resume(struct notifier_block *nb, |
2239 | static int acpi_video_resume(struct acpi_device *device) | 2251 | unsigned long val, void *ign) |
2240 | { | 2252 | { |
2241 | struct acpi_video_bus *video; | 2253 | struct acpi_video_bus *video; |
2242 | struct acpi_video_device *video_device; | 2254 | struct acpi_video_device *video_device; |
2243 | int i; | 2255 | int i; |
2244 | 2256 | ||
2245 | if (!device || !acpi_driver_data(device)) | 2257 | switch (val) { |
2246 | return -EINVAL; | 2258 | case PM_HIBERNATION_PREPARE: |
2259 | case PM_SUSPEND_PREPARE: | ||
2260 | case PM_RESTORE_PREPARE: | ||
2261 | return NOTIFY_DONE; | ||
2262 | } | ||
2247 | 2263 | ||
2248 | video = acpi_driver_data(device); | 2264 | video = container_of(nb, struct acpi_video_bus, pm_nb); |
2265 | |||
2266 | dev_info(&video->device->dev, "Restoring backlight state\n"); | ||
2249 | 2267 | ||
2250 | for (i = 0; i < video->attached_count; i++) { | 2268 | for (i = 0; i < video->attached_count; i++) { |
2251 | video_device = video->attached_array[i].bind_info; | 2269 | video_device = video->attached_array[i].bind_info; |
2252 | if (video_device && video_device->backlight) | 2270 | if (video_device && video_device->backlight) |
2253 | acpi_video_set_brightness(video_device->backlight); | 2271 | acpi_video_set_brightness(video_device->backlight); |
2254 | } | 2272 | } |
2255 | return AE_OK; | 2273 | |
2274 | return NOTIFY_OK; | ||
2256 | } | 2275 | } |
2257 | 2276 | ||
2258 | static acpi_status | 2277 | static acpi_status |
@@ -2276,6 +2295,8 @@ acpi_video_bus_match(acpi_handle handle, u32 level, void *context, | |||
2276 | return AE_OK; | 2295 | return AE_OK; |
2277 | } | 2296 | } |
2278 | 2297 | ||
2298 | static int instance; | ||
2299 | |||
2279 | static int acpi_video_bus_add(struct acpi_device *device) | 2300 | static int acpi_video_bus_add(struct acpi_device *device) |
2280 | { | 2301 | { |
2281 | struct acpi_video_bus *video; | 2302 | struct acpi_video_bus *video; |
@@ -2357,7 +2378,6 @@ static int acpi_video_bus_add(struct acpi_device *device) | |||
2357 | set_bit(KEY_BRIGHTNESSDOWN, input->keybit); | 2378 | set_bit(KEY_BRIGHTNESSDOWN, input->keybit); |
2358 | set_bit(KEY_BRIGHTNESS_ZERO, input->keybit); | 2379 | set_bit(KEY_BRIGHTNESS_ZERO, input->keybit); |
2359 | set_bit(KEY_DISPLAY_OFF, input->keybit); | 2380 | set_bit(KEY_DISPLAY_OFF, input->keybit); |
2360 | set_bit(KEY_UNKNOWN, input->keybit); | ||
2361 | 2381 | ||
2362 | error = input_register_device(input); | 2382 | error = input_register_device(input); |
2363 | if (error) | 2383 | if (error) |
@@ -2369,6 +2389,10 @@ static int acpi_video_bus_add(struct acpi_device *device) | |||
2369 | video->flags.rom ? "yes" : "no", | 2389 | video->flags.rom ? "yes" : "no", |
2370 | video->flags.post ? "yes" : "no"); | 2390 | video->flags.post ? "yes" : "no"); |
2371 | 2391 | ||
2392 | video->pm_nb.notifier_call = acpi_video_resume; | ||
2393 | video->pm_nb.priority = 0; | ||
2394 | register_pm_notifier(&video->pm_nb); | ||
2395 | |||
2372 | return 0; | 2396 | return 0; |
2373 | 2397 | ||
2374 | err_free_input_dev: | 2398 | err_free_input_dev: |
@@ -2395,6 +2419,8 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type) | |||
2395 | 2419 | ||
2396 | video = acpi_driver_data(device); | 2420 | video = acpi_driver_data(device); |
2397 | 2421 | ||
2422 | unregister_pm_notifier(&video->pm_nb); | ||
2423 | |||
2398 | acpi_video_bus_stop_devices(video); | 2424 | acpi_video_bus_stop_devices(video); |
2399 | acpi_video_bus_put_devices(video); | 2425 | acpi_video_bus_put_devices(video); |
2400 | acpi_video_bus_remove_fs(device); | 2426 | acpi_video_bus_remove_fs(device); |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index fdc9bcbe55a2..5326af28a410 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/dma-mapping.h> | 42 | #include <linux/dma-mapping.h> |
43 | #include <linux/device.h> | 43 | #include <linux/device.h> |
44 | #include <linux/dmi.h> | 44 | #include <linux/dmi.h> |
45 | #include <linux/gfp.h> | ||
45 | #include <scsi/scsi_host.h> | 46 | #include <scsi/scsi_host.h> |
46 | #include <scsi/scsi_cmnd.h> | 47 | #include <scsi/scsi_cmnd.h> |
47 | #include <linux/libata.h> | 48 | #include <linux/libata.h> |
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index c33806654e46..83bc49fac9bb 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -90,6 +90,7 @@ | |||
90 | #include <linux/blkdev.h> | 90 | #include <linux/blkdev.h> |
91 | #include <linux/delay.h> | 91 | #include <linux/delay.h> |
92 | #include <linux/device.h> | 92 | #include <linux/device.h> |
93 | #include <linux/gfp.h> | ||
93 | #include <scsi/scsi_host.h> | 94 | #include <scsi/scsi_host.h> |
94 | #include <linux/libata.h> | 95 | #include <linux/libata.h> |
95 | #include <linux/dmi.h> | 96 | #include <linux/dmi.h> |
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index 292fdbc0431a..7b5eea7e01dc 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/acpi.h> | 15 | #include <linux/acpi.h> |
16 | #include <linux/libata.h> | 16 | #include <linux/libata.h> |
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include <linux/slab.h> | ||
18 | #include <scsi/scsi_device.h> | 19 | #include <scsi/scsi_device.h> |
19 | #include "libata.h" | 20 | #include "libata.h" |
20 | 21 | ||
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 4a28420efff2..49cffb6094a3 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/io.h> | 58 | #include <linux/io.h> |
59 | #include <linux/async.h> | 59 | #include <linux/async.h> |
60 | #include <linux/log2.h> | 60 | #include <linux/log2.h> |
61 | #include <linux/slab.h> | ||
61 | #include <scsi/scsi.h> | 62 | #include <scsi/scsi.h> |
62 | #include <scsi/scsi_cmnd.h> | 63 | #include <scsi/scsi_cmnd.h> |
63 | #include <scsi/scsi_host.h> | 64 | #include <scsi/scsi_host.h> |
@@ -1493,6 +1494,7 @@ static int ata_hpa_resize(struct ata_device *dev) | |||
1493 | { | 1494 | { |
1494 | struct ata_eh_context *ehc = &dev->link->eh_context; | 1495 | struct ata_eh_context *ehc = &dev->link->eh_context; |
1495 | int print_info = ehc->i.flags & ATA_EHI_PRINTINFO; | 1496 | int print_info = ehc->i.flags & ATA_EHI_PRINTINFO; |
1497 | bool unlock_hpa = ata_ignore_hpa || dev->flags & ATA_DFLAG_UNLOCK_HPA; | ||
1496 | u64 sectors = ata_id_n_sectors(dev->id); | 1498 | u64 sectors = ata_id_n_sectors(dev->id); |
1497 | u64 native_sectors; | 1499 | u64 native_sectors; |
1498 | int rc; | 1500 | int rc; |
@@ -1509,7 +1511,7 @@ static int ata_hpa_resize(struct ata_device *dev) | |||
1509 | /* If device aborted the command or HPA isn't going to | 1511 | /* If device aborted the command or HPA isn't going to |
1510 | * be unlocked, skip HPA resizing. | 1512 | * be unlocked, skip HPA resizing. |
1511 | */ | 1513 | */ |
1512 | if (rc == -EACCES || !ata_ignore_hpa) { | 1514 | if (rc == -EACCES || !unlock_hpa) { |
1513 | ata_dev_printk(dev, KERN_WARNING, "HPA support seems " | 1515 | ata_dev_printk(dev, KERN_WARNING, "HPA support seems " |
1514 | "broken, skipping HPA handling\n"); | 1516 | "broken, skipping HPA handling\n"); |
1515 | dev->horkage |= ATA_HORKAGE_BROKEN_HPA; | 1517 | dev->horkage |= ATA_HORKAGE_BROKEN_HPA; |
@@ -1524,7 +1526,7 @@ static int ata_hpa_resize(struct ata_device *dev) | |||
1524 | dev->n_native_sectors = native_sectors; | 1526 | dev->n_native_sectors = native_sectors; |
1525 | 1527 | ||
1526 | /* nothing to do? */ | 1528 | /* nothing to do? */ |
1527 | if (native_sectors <= sectors || !ata_ignore_hpa) { | 1529 | if (native_sectors <= sectors || !unlock_hpa) { |
1528 | if (!print_info || native_sectors == sectors) | 1530 | if (!print_info || native_sectors == sectors) |
1529 | return 0; | 1531 | return 0; |
1530 | 1532 | ||
@@ -4185,36 +4187,51 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class, | |||
4185 | goto fail; | 4187 | goto fail; |
4186 | 4188 | ||
4187 | /* verify n_sectors hasn't changed */ | 4189 | /* verify n_sectors hasn't changed */ |
4188 | if (dev->class == ATA_DEV_ATA && n_sectors && | 4190 | if (dev->class != ATA_DEV_ATA || !n_sectors || |
4189 | dev->n_sectors != n_sectors) { | 4191 | dev->n_sectors == n_sectors) |
4190 | ata_dev_printk(dev, KERN_WARNING, "n_sectors mismatch " | 4192 | return 0; |
4191 | "%llu != %llu\n", | 4193 | |
4192 | (unsigned long long)n_sectors, | 4194 | /* n_sectors has changed */ |
4193 | (unsigned long long)dev->n_sectors); | 4195 | ata_dev_printk(dev, KERN_WARNING, "n_sectors mismatch %llu != %llu\n", |
4194 | /* | 4196 | (unsigned long long)n_sectors, |
4195 | * Something could have caused HPA to be unlocked | 4197 | (unsigned long long)dev->n_sectors); |
4196 | * involuntarily. If n_native_sectors hasn't changed | 4198 | |
4197 | * and the new size matches it, keep the device. | 4199 | /* |
4198 | */ | 4200 | * Something could have caused HPA to be unlocked |
4199 | if (dev->n_native_sectors == n_native_sectors && | 4201 | * involuntarily. If n_native_sectors hasn't changed and the |
4200 | dev->n_sectors > n_sectors && | 4202 | * new size matches it, keep the device. |
4201 | dev->n_sectors == n_native_sectors) { | 4203 | */ |
4202 | ata_dev_printk(dev, KERN_WARNING, | 4204 | if (dev->n_native_sectors == n_native_sectors && |
4203 | "new n_sectors matches native, probably " | 4205 | dev->n_sectors > n_sectors && dev->n_sectors == n_native_sectors) { |
4204 | "late HPA unlock, continuing\n"); | 4206 | ata_dev_printk(dev, KERN_WARNING, |
4205 | /* keep using the old n_sectors */ | 4207 | "new n_sectors matches native, probably " |
4206 | dev->n_sectors = n_sectors; | 4208 | "late HPA unlock, continuing\n"); |
4207 | } else { | 4209 | /* keep using the old n_sectors */ |
4208 | /* restore original n_[native]_sectors and fail */ | 4210 | dev->n_sectors = n_sectors; |
4209 | dev->n_native_sectors = n_native_sectors; | 4211 | return 0; |
4210 | dev->n_sectors = n_sectors; | ||
4211 | rc = -ENODEV; | ||
4212 | goto fail; | ||
4213 | } | ||
4214 | } | 4212 | } |
4215 | 4213 | ||
4216 | return 0; | 4214 | /* |
4215 | * Some BIOSes boot w/o HPA but resume w/ HPA locked. Try | ||
4216 | * unlocking HPA in those cases. | ||
4217 | * | ||
4218 | * https://bugzilla.kernel.org/show_bug.cgi?id=15396 | ||
4219 | */ | ||
4220 | if (dev->n_native_sectors == n_native_sectors && | ||
4221 | dev->n_sectors < n_sectors && n_sectors == n_native_sectors && | ||
4222 | !(dev->horkage & ATA_HORKAGE_BROKEN_HPA)) { | ||
4223 | ata_dev_printk(dev, KERN_WARNING, | ||
4224 | "old n_sectors matches native, probably " | ||
4225 | "late HPA lock, will try to unlock HPA\n"); | ||
4226 | /* try unlocking HPA */ | ||
4227 | dev->flags |= ATA_DFLAG_UNLOCK_HPA; | ||
4228 | rc = -EIO; | ||
4229 | } else | ||
4230 | rc = -ENODEV; | ||
4217 | 4231 | ||
4232 | /* restore original n_[native_]sectors and fail */ | ||
4233 | dev->n_native_sectors = n_native_sectors; | ||
4234 | dev->n_sectors = n_sectors; | ||
4218 | fail: | 4235 | fail: |
4219 | ata_dev_printk(dev, KERN_ERR, "revalidation failed (errno=%d)\n", rc); | 4236 | ata_dev_printk(dev, KERN_ERR, "revalidation failed (errno=%d)\n", rc); |
4220 | return rc; | 4237 | return rc; |
@@ -4353,6 +4370,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
4353 | { "HTS541080G9SA00", "MB4OC60D", ATA_HORKAGE_NONCQ, }, | 4370 | { "HTS541080G9SA00", "MB4OC60D", ATA_HORKAGE_NONCQ, }, |
4354 | { "HTS541010G9SA00", "MBZOC60D", ATA_HORKAGE_NONCQ, }, | 4371 | { "HTS541010G9SA00", "MBZOC60D", ATA_HORKAGE_NONCQ, }, |
4355 | 4372 | ||
4373 | /* https://bugzilla.kernel.org/show_bug.cgi?id=15573 */ | ||
4374 | { "C300-CTFDDAC128MAG", "0001", ATA_HORKAGE_NONCQ, }, | ||
4375 | |||
4356 | /* devices which puke on READ_NATIVE_MAX */ | 4376 | /* devices which puke on READ_NATIVE_MAX */ |
4357 | { "HDS724040KLSA80", "KFAOA20N", ATA_HORKAGE_BROKEN_HPA, }, | 4377 | { "HDS724040KLSA80", "KFAOA20N", ATA_HORKAGE_BROKEN_HPA, }, |
4358 | { "WDC WD3200JD-00KLB0", "WD-WCAMR1130137", ATA_HORKAGE_BROKEN_HPA }, | 4378 | { "WDC WD3200JD-00KLB0", "WD-WCAMR1130137", ATA_HORKAGE_BROKEN_HPA }, |
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c index 51f0ffb78cbd..00305f41ed86 100644 --- a/drivers/ata/libata-pmp.c +++ b/drivers/ata/libata-pmp.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/libata.h> | 11 | #include <linux/libata.h> |
12 | #include <linux/slab.h> | ||
12 | #include "libata.h" | 13 | #include "libata.h" |
13 | 14 | ||
14 | const struct ata_port_operations sata_pmp_port_ops = { | 15 | const struct ata_port_operations sata_pmp_port_ops = { |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index bea003a24d27..0088cdeb0b1e 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -33,6 +33,7 @@ | |||
33 | * | 33 | * |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/slab.h> | ||
36 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
37 | #include <linux/blkdev.h> | 38 | #include <linux/blkdev.h> |
38 | #include <linux/spinlock.h> | 39 | #include <linux/spinlock.h> |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 561dec2481cb..e3877b6843c9 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -33,6 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
36 | #include <linux/gfp.h> | ||
36 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
37 | #include <linux/libata.h> | 38 | #include <linux/libata.h> |
38 | #include <linux/highmem.h> | 39 | #include <linux/highmem.h> |
@@ -1667,6 +1668,7 @@ unsigned int ata_sff_host_intr(struct ata_port *ap, | |||
1667 | { | 1668 | { |
1668 | struct ata_eh_info *ehi = &ap->link.eh_info; | 1669 | struct ata_eh_info *ehi = &ap->link.eh_info; |
1669 | u8 status, host_stat = 0; | 1670 | u8 status, host_stat = 0; |
1671 | bool bmdma_stopped = false; | ||
1670 | 1672 | ||
1671 | VPRINTK("ata%u: protocol %d task_state %d\n", | 1673 | VPRINTK("ata%u: protocol %d task_state %d\n", |
1672 | ap->print_id, qc->tf.protocol, ap->hsm_task_state); | 1674 | ap->print_id, qc->tf.protocol, ap->hsm_task_state); |
@@ -1699,6 +1701,7 @@ unsigned int ata_sff_host_intr(struct ata_port *ap, | |||
1699 | 1701 | ||
1700 | /* before we do anything else, clear DMA-Start bit */ | 1702 | /* before we do anything else, clear DMA-Start bit */ |
1701 | ap->ops->bmdma_stop(qc); | 1703 | ap->ops->bmdma_stop(qc); |
1704 | bmdma_stopped = true; | ||
1702 | 1705 | ||
1703 | if (unlikely(host_stat & ATA_DMA_ERR)) { | 1706 | if (unlikely(host_stat & ATA_DMA_ERR)) { |
1704 | /* error when transfering data to/from memory */ | 1707 | /* error when transfering data to/from memory */ |
@@ -1716,8 +1719,14 @@ unsigned int ata_sff_host_intr(struct ata_port *ap, | |||
1716 | 1719 | ||
1717 | /* check main status, clearing INTRQ if needed */ | 1720 | /* check main status, clearing INTRQ if needed */ |
1718 | status = ata_sff_irq_status(ap); | 1721 | status = ata_sff_irq_status(ap); |
1719 | if (status & ATA_BUSY) | 1722 | if (status & ATA_BUSY) { |
1720 | goto idle_irq; | 1723 | if (bmdma_stopped) { |
1724 | /* BMDMA engine is already stopped, we're screwed */ | ||
1725 | qc->err_mask |= AC_ERR_HSM; | ||
1726 | ap->hsm_task_state = HSM_ST_ERR; | ||
1727 | } else | ||
1728 | goto idle_irq; | ||
1729 | } | ||
1721 | 1730 | ||
1722 | /* ack bmdma irq events */ | 1731 | /* ack bmdma irq events */ |
1723 | ap->ops->sff_irq_clear(ap); | 1732 | ap->ops->sff_irq_clear(ap); |
@@ -1762,13 +1771,16 @@ EXPORT_SYMBOL_GPL(ata_sff_host_intr); | |||
1762 | irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) | 1771 | irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) |
1763 | { | 1772 | { |
1764 | struct ata_host *host = dev_instance; | 1773 | struct ata_host *host = dev_instance; |
1774 | bool retried = false; | ||
1765 | unsigned int i; | 1775 | unsigned int i; |
1766 | unsigned int handled = 0, polling = 0; | 1776 | unsigned int handled, idle, polling; |
1767 | unsigned long flags; | 1777 | unsigned long flags; |
1768 | 1778 | ||
1769 | /* TODO: make _irqsave conditional on x86 PCI IDE legacy mode */ | 1779 | /* TODO: make _irqsave conditional on x86 PCI IDE legacy mode */ |
1770 | spin_lock_irqsave(&host->lock, flags); | 1780 | spin_lock_irqsave(&host->lock, flags); |
1771 | 1781 | ||
1782 | retry: | ||
1783 | handled = idle = polling = 0; | ||
1772 | for (i = 0; i < host->n_ports; i++) { | 1784 | for (i = 0; i < host->n_ports; i++) { |
1773 | struct ata_port *ap = host->ports[i]; | 1785 | struct ata_port *ap = host->ports[i]; |
1774 | struct ata_queued_cmd *qc; | 1786 | struct ata_queued_cmd *qc; |
@@ -1782,7 +1794,8 @@ irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) | |||
1782 | handled |= ata_sff_host_intr(ap, qc); | 1794 | handled |= ata_sff_host_intr(ap, qc); |
1783 | else | 1795 | else |
1784 | polling |= 1 << i; | 1796 | polling |= 1 << i; |
1785 | } | 1797 | } else |
1798 | idle |= 1 << i; | ||
1786 | } | 1799 | } |
1787 | 1800 | ||
1788 | /* | 1801 | /* |
@@ -1790,7 +1803,9 @@ irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) | |||
1790 | * asserting IRQ line, nobody cared will ensue. Check IRQ | 1803 | * asserting IRQ line, nobody cared will ensue. Check IRQ |
1791 | * pending status if available and clear spurious IRQ. | 1804 | * pending status if available and clear spurious IRQ. |
1792 | */ | 1805 | */ |
1793 | if (!handled) { | 1806 | if (!handled && !retried) { |
1807 | bool retry = false; | ||
1808 | |||
1794 | for (i = 0; i < host->n_ports; i++) { | 1809 | for (i = 0; i < host->n_ports; i++) { |
1795 | struct ata_port *ap = host->ports[i]; | 1810 | struct ata_port *ap = host->ports[i]; |
1796 | 1811 | ||
@@ -1801,12 +1816,23 @@ irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) | |||
1801 | !ap->ops->sff_irq_check(ap)) | 1816 | !ap->ops->sff_irq_check(ap)) |
1802 | continue; | 1817 | continue; |
1803 | 1818 | ||
1804 | if (printk_ratelimit()) | 1819 | if (idle & (1 << i)) { |
1805 | ata_port_printk(ap, KERN_INFO, | 1820 | ap->ops->sff_check_status(ap); |
1806 | "clearing spurious IRQ\n"); | 1821 | ap->ops->sff_irq_clear(ap); |
1822 | } else { | ||
1823 | /* clear INTRQ and check if BUSY cleared */ | ||
1824 | if (!(ap->ops->sff_check_status(ap) & ATA_BUSY)) | ||
1825 | retry |= true; | ||
1826 | /* | ||
1827 | * With command in flight, we can't do | ||
1828 | * sff_irq_clear() w/o racing with completion. | ||
1829 | */ | ||
1830 | } | ||
1831 | } | ||
1807 | 1832 | ||
1808 | ap->ops->sff_check_status(ap); | 1833 | if (retry) { |
1809 | ap->ops->sff_irq_clear(ap); | 1834 | retried = true; |
1835 | goto retry; | ||
1810 | } | 1836 | } |
1811 | } | 1837 | } |
1812 | 1838 | ||
diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c index 8e5e13210426..1ea2be0f4b94 100644 --- a/drivers/ata/pata_acpi.c +++ b/drivers/ata/pata_acpi.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/blkdev.h> | 11 | #include <linux/blkdev.h> |
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
14 | #include <linux/gfp.h> | ||
14 | #include <scsi/scsi_host.h> | 15 | #include <scsi/scsi_host.h> |
15 | #include <acpi/acpi_bus.h> | 16 | #include <acpi/acpi_bus.h> |
16 | 17 | ||
diff --git a/drivers/ata/pata_at32.c b/drivers/ata/pata_at32.c index 5c129f99a7e3..66ce6a526f27 100644 --- a/drivers/ata/pata_at32.c +++ b/drivers/ata/pata_at32.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
21 | #include <linux/slab.h> | ||
21 | #include <scsi/scsi_host.h> | 22 | #include <scsi/scsi_host.h> |
22 | #include <linux/ata.h> | 23 | #include <linux/ata.h> |
23 | #include <linux/libata.h> | 24 | #include <linux/libata.h> |
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c index 376dd380b43c..c6a946aa252c 100644 --- a/drivers/ata/pata_at91.c +++ b/drivers/ata/pata_at91.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/blkdev.h> | 21 | #include <linux/blkdev.h> |
22 | #include <linux/gfp.h> | ||
22 | #include <scsi/scsi_host.h> | 23 | #include <scsi/scsi_host.h> |
23 | #include <linux/ata.h> | 24 | #include <linux/ata.h> |
24 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
diff --git a/drivers/ata/pata_atp867x.c b/drivers/ata/pata_atp867x.c index 6fe7ded40c6a..bb6e0746e07d 100644 --- a/drivers/ata/pata_atp867x.c +++ b/drivers/ata/pata_atp867x.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/blkdev.h> | 33 | #include <linux/blkdev.h> |
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/device.h> | 35 | #include <linux/device.h> |
36 | #include <linux/gfp.h> | ||
36 | #include <scsi/scsi_host.h> | 37 | #include <scsi/scsi_host.h> |
37 | #include <linux/libata.h> | 38 | #include <linux/libata.h> |
38 | 39 | ||
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c index 6cd5d5dd9e3b..45896b3c6538 100644 --- a/drivers/ata/pata_cmd640.c +++ b/drivers/ata/pata_cmd640.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/blkdev.h> | 19 | #include <linux/blkdev.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/gfp.h> | ||
21 | #include <scsi/scsi_host.h> | 22 | #include <scsi/scsi_host.h> |
22 | #include <linux/libata.h> | 23 | #include <linux/libata.h> |
23 | 24 | ||
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c index b663b7ffae4b..fa812e206eeb 100644 --- a/drivers/ata/pata_icside.c +++ b/drivers/ata/pata_icside.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <linux/module.h> | 2 | #include <linux/module.h> |
3 | #include <linux/init.h> | 3 | #include <linux/init.h> |
4 | #include <linux/blkdev.h> | 4 | #include <linux/blkdev.h> |
5 | #include <linux/gfp.h> | ||
5 | #include <scsi/scsi_host.h> | 6 | #include <scsi/scsi_host.h> |
6 | #include <linux/ata.h> | 7 | #include <linux/ata.h> |
7 | #include <linux/libata.h> | 8 | #include <linux/libata.h> |
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c index 9bde1cb5f981..5cb286fd839e 100644 --- a/drivers/ata/pata_it821x.c +++ b/drivers/ata/pata_it821x.c | |||
@@ -75,6 +75,7 @@ | |||
75 | #include <linux/init.h> | 75 | #include <linux/init.h> |
76 | #include <linux/blkdev.h> | 76 | #include <linux/blkdev.h> |
77 | #include <linux/delay.h> | 77 | #include <linux/delay.h> |
78 | #include <linux/slab.h> | ||
78 | #include <scsi/scsi_host.h> | 79 | #include <scsi/scsi_host.h> |
79 | #include <linux/libata.h> | 80 | #include <linux/libata.h> |
80 | 81 | ||
diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c index 4cc7bbd10ec2..211b6438b3a0 100644 --- a/drivers/ata/pata_macio.c +++ b/drivers/ata/pata_macio.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/pmu.h> | 21 | #include <linux/pmu.h> |
22 | #include <linux/scatterlist.h> | 22 | #include <linux/scatterlist.h> |
23 | #include <linux/of.h> | 23 | #include <linux/of.h> |
24 | #include <linux/gfp.h> | ||
24 | 25 | ||
25 | #include <scsi/scsi.h> | 26 | #include <scsi/scsi.h> |
26 | #include <scsi/scsi_host.h> | 27 | #include <scsi/scsi_host.h> |
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c index 2bc2dbe30e8f..9f5b053611dd 100644 --- a/drivers/ata/pata_mpc52xx.c +++ b/drivers/ata/pata_mpc52xx.c | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/gfp.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/libata.h> | 21 | #include <linux/libata.h> |
22 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c index 37ef416c1242..005a44483a7b 100644 --- a/drivers/ata/pata_octeon_cf.c +++ b/drivers/ata/pata_octeon_cf.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/libata.h> | 14 | #include <linux/libata.h> |
15 | #include <linux/irq.h> | 15 | #include <linux/irq.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | #include <linux/workqueue.h> | 18 | #include <linux/workqueue.h> |
18 | #include <scsi/scsi_host.h> | 19 | #include <scsi/scsi_host.h> |
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index 147de2fd66d2..3c3172d3c34e 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/blkdev.h> | 30 | #include <linux/blkdev.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/slab.h> | ||
32 | #include <scsi/scsi_host.h> | 33 | #include <scsi/scsi_host.h> |
33 | #include <linux/ata.h> | 34 | #include <linux/ata.h> |
34 | #include <linux/libata.h> | 35 | #include <linux/libata.h> |
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c index 45f1e10f917b..0ffd631000b7 100644 --- a/drivers/ata/pata_rb532_cf.c +++ b/drivers/ata/pata_rb532_cf.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/gfp.h> | ||
22 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
23 | #include <linux/module.h> | 24 | #include <linux/module.h> |
24 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
diff --git a/drivers/ata/pata_rdc.c b/drivers/ata/pata_rdc.c index 237a24d41a2d..37092cfd7bc6 100644 --- a/drivers/ata/pata_rdc.c +++ b/drivers/ata/pata_rdc.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/blkdev.h> | 28 | #include <linux/blkdev.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
31 | #include <linux/gfp.h> | ||
31 | #include <scsi/scsi_host.h> | 32 | #include <scsi/scsi_host.h> |
32 | #include <linux/libata.h> | 33 | #include <linux/libata.h> |
33 | #include <linux/dmi.h> | 34 | #include <linux/dmi.h> |
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 3059ec017de3..741e7cb69d8c 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/init.h> | 58 | #include <linux/init.h> |
59 | #include <linux/blkdev.h> | 59 | #include <linux/blkdev.h> |
60 | #include <linux/delay.h> | 60 | #include <linux/delay.h> |
61 | #include <linux/gfp.h> | ||
61 | #include <scsi/scsi_host.h> | 62 | #include <scsi/scsi_host.h> |
62 | #include <linux/libata.h> | 63 | #include <linux/libata.h> |
63 | #include <linux/dmi.h> | 64 | #include <linux/dmi.h> |
@@ -576,6 +577,10 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
576 | u8 rev = isa->revision; | 577 | u8 rev = isa->revision; |
577 | pci_dev_put(isa); | 578 | pci_dev_put(isa); |
578 | 579 | ||
580 | if ((id->device == 0x0415 || id->device == 0x3164) && | ||
581 | (config->id != id->device)) | ||
582 | continue; | ||
583 | |||
579 | if (rev >= config->rev_min && rev <= config->rev_max) | 584 | if (rev >= config->rev_min && rev <= config->rev_max) |
580 | break; | 585 | break; |
581 | } | 586 | } |
@@ -677,6 +682,7 @@ static const struct pci_device_id via[] = { | |||
677 | { PCI_VDEVICE(VIA, 0x3164), }, | 682 | { PCI_VDEVICE(VIA, 0x3164), }, |
678 | { PCI_VDEVICE(VIA, 0x5324), }, | 683 | { PCI_VDEVICE(VIA, 0x5324), }, |
679 | { PCI_VDEVICE(VIA, 0xC409), VIA_IDFLAG_SINGLE }, | 684 | { PCI_VDEVICE(VIA, 0xC409), VIA_IDFLAG_SINGLE }, |
685 | { PCI_VDEVICE(VIA, 0x9001), VIA_IDFLAG_SINGLE }, | ||
680 | 686 | ||
681 | { }, | 687 | { }, |
682 | }; | 688 | }; |
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c index 6c65b0776a2c..5904cfdb8dbe 100644 --- a/drivers/ata/pdc_adma.c +++ b/drivers/ata/pdc_adma.c | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
36 | #include <linux/module.h> | 36 | #include <linux/module.h> |
37 | #include <linux/gfp.h> | ||
37 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
38 | #include <linux/init.h> | 39 | #include <linux/init.h> |
39 | #include <linux/blkdev.h> | 40 | #include <linux/blkdev.h> |
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index ce4136eea08f..a69192b38b43 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <scsi/scsi_host.h> | 23 | #include <scsi/scsi_host.h> |
23 | #include <scsi/scsi_cmnd.h> | 24 | #include <scsi/scsi_cmnd.h> |
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c index 4406902b4293..27dc6c86a4cd 100644 --- a/drivers/ata/sata_inic162x.c +++ b/drivers/ata/sata_inic162x.c | |||
@@ -39,6 +39,7 @@ | |||
39 | * happy to assist. | 39 | * happy to assist. |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include <linux/gfp.h> | ||
42 | #include <linux/kernel.h> | 43 | #include <linux/kernel.h> |
43 | #include <linux/module.h> | 44 | #include <linux/module.h> |
44 | #include <linux/pci.h> | 45 | #include <linux/pci.h> |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index df8ee325d3ca..71cc0d42f9e1 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -64,6 +64,7 @@ | |||
64 | #include <linux/ata_platform.h> | 64 | #include <linux/ata_platform.h> |
65 | #include <linux/mbus.h> | 65 | #include <linux/mbus.h> |
66 | #include <linux/bitops.h> | 66 | #include <linux/bitops.h> |
67 | #include <linux/gfp.h> | ||
67 | #include <scsi/scsi_host.h> | 68 | #include <scsi/scsi_host.h> |
68 | #include <scsi/scsi_cmnd.h> | 69 | #include <scsi/scsi_cmnd.h> |
69 | #include <scsi/scsi_device.h> | 70 | #include <scsi/scsi_device.h> |
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 684fe04dbbb7..2a98b09ab735 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
@@ -38,6 +38,7 @@ | |||
38 | 38 | ||
39 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
40 | #include <linux/module.h> | 40 | #include <linux/module.h> |
41 | #include <linux/gfp.h> | ||
41 | #include <linux/pci.h> | 42 | #include <linux/pci.h> |
42 | #include <linux/init.h> | 43 | #include <linux/init.h> |
43 | #include <linux/blkdev.h> | 44 | #include <linux/blkdev.h> |
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c index 63306285c843..5356ec00d2b4 100644 --- a/drivers/ata/sata_promise.c +++ b/drivers/ata/sata_promise.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/gfp.h> | ||
36 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
37 | #include <linux/init.h> | 38 | #include <linux/init.h> |
38 | #include <linux/blkdev.h> | 39 | #include <linux/blkdev.h> |
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c index 326c0cfc29b3..92ba45e6689b 100644 --- a/drivers/ata/sata_qstor.c +++ b/drivers/ata/sata_qstor.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/gfp.h> | ||
32 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
33 | #include <linux/init.h> | 34 | #include <linux/init.h> |
34 | #include <linux/blkdev.h> | 35 | #include <linux/blkdev.h> |
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index 1370df6c420c..433b6b89c795 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/gfp.h> | ||
22 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
23 | #include <linux/blkdev.h> | 24 | #include <linux/blkdev.h> |
24 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c index bbcf970068ad..232468f2ea90 100644 --- a/drivers/ata/sata_sx4.c +++ b/drivers/ata/sata_sx4.c | |||
@@ -81,6 +81,7 @@ | |||
81 | #include <linux/kernel.h> | 81 | #include <linux/kernel.h> |
82 | #include <linux/module.h> | 82 | #include <linux/module.h> |
83 | #include <linux/pci.h> | 83 | #include <linux/pci.h> |
84 | #include <linux/slab.h> | ||
84 | #include <linux/init.h> | 85 | #include <linux/init.h> |
85 | #include <linux/blkdev.h> | 86 | #include <linux/blkdev.h> |
86 | #include <linux/delay.h> | 87 | #include <linux/delay.h> |
diff --git a/drivers/ata/sata_uli.c b/drivers/ata/sata_uli.c index e5bff47e8aa1..011e098590d1 100644 --- a/drivers/ata/sata_uli.c +++ b/drivers/ata/sata_uli.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/gfp.h> | ||
29 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
30 | #include <linux/init.h> | 31 | #include <linux/init.h> |
31 | #include <linux/blkdev.h> | 32 | #include <linux/blkdev.h> |
diff --git a/drivers/atm/adummy.c b/drivers/atm/adummy.c index 5effec6f5458..6d44f07b69f8 100644 --- a/drivers/atm/adummy.c +++ b/drivers/atm/adummy.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/timer.h> | 14 | #include <linux/timer.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/slab.h> | ||
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | #include <asm/byteorder.h> | 18 | #include <asm/byteorder.h> |
18 | #include <asm/uaccess.h> | 19 | #include <asm/uaccess.h> |
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 8af23411743c..9d18644c897e 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/mutex.h> | 36 | #include <linux/mutex.h> |
37 | #include <linux/firmware.h> | 37 | #include <linux/firmware.h> |
38 | #include <linux/ihex.h> | 38 | #include <linux/ihex.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | #include <asm/atomic.h> | 41 | #include <asm/atomic.h> |
41 | #include <asm/io.h> | 42 | #include <asm/io.h> |
diff --git a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c index 02ad83d6b562..b86712167eb8 100644 --- a/drivers/atm/atmtcp.c +++ b/drivers/atm/atmtcp.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/atm_tcp.h> | 9 | #include <linux/atm_tcp.h> |
10 | #include <linux/bitops.h> | 10 | #include <linux/bitops.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/slab.h> | ||
12 | #include <asm/uaccess.h> | 13 | #include <asm/uaccess.h> |
13 | #include <asm/atomic.h> | 14 | #include <asm/atomic.h> |
14 | 15 | ||
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c index 0c3026145443..719ec5a0dca5 100644 --- a/drivers/atm/eni.c +++ b/drivers/atm/eni.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/atm_eni.h> | 19 | #include <linux/atm_eni.h> |
20 | #include <linux/bitops.h> | 20 | #include <linux/bitops.h> |
21 | #include <linux/slab.h> | ||
21 | #include <asm/system.h> | 22 | #include <asm/system.h> |
22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
23 | #include <asm/atomic.h> | 24 | #include <asm/atomic.h> |
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index cd5049af47a9..6e600afd06ae 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/init.h> | 46 | #include <linux/init.h> |
47 | #include <linux/capability.h> | 47 | #include <linux/capability.h> |
48 | #include <linux/bitops.h> | 48 | #include <linux/bitops.h> |
49 | #include <linux/slab.h> | ||
49 | #include <asm/byteorder.h> | 50 | #include <asm/byteorder.h> |
50 | #include <asm/system.h> | 51 | #include <asm/system.h> |
51 | #include <asm/string.h> | 52 | #include <asm/string.h> |
diff --git a/drivers/atm/he.c b/drivers/atm/he.c index e8c6529dc366..c213e0da0343 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c | |||
@@ -67,6 +67,7 @@ | |||
67 | #include <linux/timer.h> | 67 | #include <linux/timer.h> |
68 | #include <linux/interrupt.h> | 68 | #include <linux/interrupt.h> |
69 | #include <linux/dma-mapping.h> | 69 | #include <linux/dma-mapping.h> |
70 | #include <linux/slab.h> | ||
70 | #include <asm/io.h> | 71 | #include <asm/io.h> |
71 | #include <asm/byteorder.h> | 72 | #include <asm/byteorder.h> |
72 | #include <asm/uaccess.h> | 73 | #include <asm/uaccess.h> |
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 4e49021e67ee..54720baa7363 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/init.h> | 40 | #include <linux/init.h> |
41 | #include <linux/ioport.h> | 41 | #include <linux/ioport.h> |
42 | #include <linux/wait.h> | 42 | #include <linux/wait.h> |
43 | #include <linux/slab.h> | ||
43 | 44 | ||
44 | #include <asm/system.h> | 45 | #include <asm/system.h> |
45 | #include <asm/io.h> | 46 | #include <asm/io.h> |
diff --git a/drivers/atm/idt77105.c b/drivers/atm/idt77105.c index 84672dc57f7a..dab5cf5274fb 100644 --- a/drivers/atm/idt77105.c +++ b/drivers/atm/idt77105.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/capability.h> | 15 | #include <linux/capability.h> |
16 | #include <linux/atm_idt77105.h> | 16 | #include <linux/atm_idt77105.h> |
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <linux/slab.h> | ||
18 | #include <asm/system.h> | 19 | #include <asm/system.h> |
19 | #include <asm/param.h> | 20 | #include <asm/param.h> |
20 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index 01f36c08cb52..98657a6a330d 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/wait.h> | 41 | #include <linux/wait.h> |
42 | #include <linux/jiffies.h> | 42 | #include <linux/jiffies.h> |
43 | #include <linux/mutex.h> | 43 | #include <linux/mutex.h> |
44 | #include <linux/slab.h> | ||
44 | 45 | ||
45 | #include <asm/io.h> | 46 | #include <asm/io.h> |
46 | #include <asm/uaccess.h> | 47 | #include <asm/uaccess.h> |
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index 25a4c86f839b..ee9ddeb53417 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c | |||
@@ -54,6 +54,7 @@ | |||
54 | #include <linux/uio.h> | 54 | #include <linux/uio.h> |
55 | #include <linux/init.h> | 55 | #include <linux/init.h> |
56 | #include <linux/wait.h> | 56 | #include <linux/wait.h> |
57 | #include <linux/slab.h> | ||
57 | #include <asm/system.h> | 58 | #include <asm/system.h> |
58 | #include <asm/io.h> | 59 | #include <asm/io.h> |
59 | #include <asm/atomic.h> | 60 | #include <asm/atomic.h> |
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index 23d95054705b..cbe15a86c669 100644 --- a/drivers/atm/lanai.c +++ b/drivers/atm/lanai.c | |||
@@ -55,6 +55,7 @@ | |||
55 | */ | 55 | */ |
56 | 56 | ||
57 | #include <linux/module.h> | 57 | #include <linux/module.h> |
58 | #include <linux/slab.h> | ||
58 | #include <linux/mm.h> | 59 | #include <linux/mm.h> |
59 | #include <linux/atmdev.h> | 60 | #include <linux/atmdev.h> |
60 | #include <asm/io.h> | 61 | #include <asm/io.h> |
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index 50838407b117..b7473a6110a7 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/timer.h> | 49 | #include <linux/timer.h> |
50 | #include <linux/interrupt.h> | 50 | #include <linux/interrupt.h> |
51 | #include <linux/bitops.h> | 51 | #include <linux/bitops.h> |
52 | #include <linux/slab.h> | ||
52 | #include <asm/io.h> | 53 | #include <asm/io.h> |
53 | #include <asm/uaccess.h> | 54 | #include <asm/uaccess.h> |
54 | #include <asm/atomic.h> | 55 | #include <asm/atomic.h> |
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c index 51eed679a059..ded76c4c9f4f 100644 --- a/drivers/atm/solos-pci.c +++ b/drivers/atm/solos-pci.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/firmware.h> | 40 | #include <linux/firmware.h> |
41 | #include <linux/ctype.h> | 41 | #include <linux/ctype.h> |
42 | #include <linux/swab.h> | 42 | #include <linux/swab.h> |
43 | #include <linux/slab.h> | ||
43 | 44 | ||
44 | #define VERSION "0.07" | 45 | #define VERSION "0.07" |
45 | #define PTAG "solos-pci" | 46 | #define PTAG "solos-pci" |
diff --git a/drivers/atm/suni.c b/drivers/atm/suni.c index 6dd3f5919968..da4b91ffa53e 100644 --- a/drivers/atm/suni.c +++ b/drivers/atm/suni.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/capability.h> | 22 | #include <linux/capability.h> |
23 | #include <linux/atm_suni.h> | 23 | #include <linux/atm_suni.h> |
24 | #include <linux/slab.h> | ||
24 | #include <asm/system.h> | 25 | #include <asm/system.h> |
25 | #include <asm/param.h> | 26 | #include <asm/param.h> |
26 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
diff --git a/drivers/atm/uPD98402.c b/drivers/atm/uPD98402.c index fc8cb07c2477..c45ae0573bbd 100644 --- a/drivers/atm/uPD98402.c +++ b/drivers/atm/uPD98402.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/atmdev.h> | 9 | #include <linux/atmdev.h> |
10 | #include <linux/sonet.h> | 10 | #include <linux/sonet.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/slab.h> | ||
12 | #include <asm/uaccess.h> | 13 | #include <asm/uaccess.h> |
13 | #include <asm/atomic.h> | 14 | #include <asm/atomic.h> |
14 | 15 | ||
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c index 2e9635be048c..702accec89e9 100644 --- a/drivers/atm/zatm.c +++ b/drivers/atm/zatm.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/capability.h> | 21 | #include <linux/capability.h> |
22 | #include <linux/bitops.h> | 22 | #include <linux/bitops.h> |
23 | #include <linux/wait.h> | 23 | #include <linux/wait.h> |
24 | #include <linux/slab.h> | ||
24 | #include <asm/byteorder.h> | 25 | #include <asm/byteorder.h> |
25 | #include <asm/system.h> | 26 | #include <asm/system.h> |
26 | #include <asm/string.h> | 27 | #include <asm/string.h> |
diff --git a/drivers/auxdisplay/cfag12864b.c b/drivers/auxdisplay/cfag12864b.c index eacb175f6bd3..49758593a5ba 100644 --- a/drivers/auxdisplay/cfag12864b.c +++ b/drivers/auxdisplay/cfag12864b.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/cdev.h> | 31 | #include <linux/cdev.h> |
31 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
32 | #include <linux/device.h> | 33 | #include <linux/device.h> |
diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c index b0ca5a47f47d..3fecfb446d90 100644 --- a/drivers/auxdisplay/cfag12864bfb.c +++ b/drivers/auxdisplay/cfag12864bfb.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/fb.h> | 31 | #include <linux/fb.h> |
32 | #include <linux/mm.h> | 32 | #include <linux/mm.h> |
33 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
34 | #include <linux/slab.h> | ||
35 | #include <linux/string.h> | 34 | #include <linux/string.h> |
36 | #include <linux/uaccess.h> | 35 | #include <linux/uaccess.h> |
37 | #include <linux/cfag12864b.h> | 36 | #include <linux/cfag12864b.h> |
diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c index b9cda053d3c0..8fc200b2e2c0 100644 --- a/drivers/base/attribute_container.c +++ b/drivers/base/attribute_container.c | |||
@@ -328,6 +328,7 @@ attribute_container_add_attrs(struct device *classdev) | |||
328 | return sysfs_create_group(&classdev->kobj, cont->grp); | 328 | return sysfs_create_group(&classdev->kobj, cont->grp); |
329 | 329 | ||
330 | for (i = 0; attrs[i]; i++) { | 330 | for (i = 0; attrs[i]; i++) { |
331 | sysfs_attr_init(&attrs[i]->attr); | ||
331 | error = device_create_file(classdev, attrs[i]); | 332 | error = device_create_file(classdev, attrs[i]); |
332 | if (error) | 333 | if (error) |
333 | return error; | 334 | return error; |
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 71f6af5c8b0b..12eec3f633b1 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
17 | #include <linux/string.h> | 18 | #include <linux/string.h> |
18 | #include "base.h" | 19 | #include "base.h" |
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index b5242e1e8bc4..f35719aab3c1 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/topology.h> | 10 | #include <linux/topology.h> |
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/node.h> | 12 | #include <linux/node.h> |
13 | #include <linux/gfp.h> | ||
13 | 14 | ||
14 | #include "base.h" | 15 | #include "base.h" |
15 | 16 | ||
diff --git a/drivers/base/devres.c b/drivers/base/devres.c index 05dd307e8f02..cf7a0c788052 100644 --- a/drivers/base/devres.c +++ b/drivers/base/devres.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | #include "base.h" | 14 | #include "base.h" |
14 | 15 | ||
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index dac478c6e460..057cf11326bf 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/base/devtmpfs.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/cred.h> | 23 | #include <linux/cred.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/init_task.h> | 25 | #include <linux/init_task.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | static struct vfsmount *dev_mnt; | 28 | static struct vfsmount *dev_mnt; |
28 | 29 | ||
diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c index 962a3b574f21..d4d8ce53886a 100644 --- a/drivers/base/dma-coherent.c +++ b/drivers/base/dma-coherent.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * Coherent per-device memory handling. | 2 | * Coherent per-device memory handling. |
3 | * Borrowed from i386 | 3 | * Borrowed from i386 |
4 | */ | 4 | */ |
5 | #include <linux/slab.h> | ||
5 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
6 | #include <linux/dma-mapping.h> | 7 | #include <linux/dma-mapping.h> |
7 | 8 | ||
diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c index ca9186f70a69..763d59c1eb65 100644 --- a/drivers/base/dma-mapping.c +++ b/drivers/base/dma-mapping.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/dma-mapping.h> | 10 | #include <linux/dma-mapping.h> |
11 | #include <linux/gfp.h> | ||
11 | 12 | ||
12 | /* | 13 | /* |
13 | * Managed DMA API | 14 | * Managed DMA API |
diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 90c9fff09ead..b631f7c59453 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/string.h> | 17 | #include <linux/string.h> |
17 | #include "base.h" | 18 | #include "base.h" |
18 | 19 | ||
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 18518ba13c81..985da11174e7 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kthread.h> | 19 | #include <linux/kthread.h> |
20 | #include <linux/highmem.h> | 20 | #include <linux/highmem.h> |
21 | #include <linux/firmware.h> | 21 | #include <linux/firmware.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #define to_dev(obj) container_of(obj, struct device, kobj) | 24 | #define to_dev(obj) container_of(obj, struct device, kobj) |
24 | 25 | ||
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index db0848e54cc6..933442f40321 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/stat.h> | 24 | #include <linux/stat.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <asm/atomic.h> | 27 | #include <asm/atomic.h> |
27 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
@@ -312,7 +313,7 @@ static ssize_t | |||
312 | print_block_size(struct sysdev_class *class, struct sysdev_class_attribute *attr, | 313 | print_block_size(struct sysdev_class *class, struct sysdev_class_attribute *attr, |
313 | char *buf) | 314 | char *buf) |
314 | { | 315 | { |
315 | return sprintf(buf, "%#lx\n", (unsigned long)PAGES_PER_SECTION * PAGE_SIZE); | 316 | return sprintf(buf, "%lx\n", (unsigned long)PAGES_PER_SECTION * PAGE_SIZE); |
316 | } | 317 | } |
317 | 318 | ||
318 | static SYSDEV_CLASS_ATTR(block_size_bytes, 0444, print_block_size, NULL); | 319 | static SYSDEV_CLASS_ATTR(block_size_bytes, 0444, print_block_size, NULL); |
diff --git a/drivers/base/module.c b/drivers/base/module.c index 103be9cacb05..f32f2f9b7be5 100644 --- a/drivers/base/module.c +++ b/drivers/base/module.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/device.h> | 7 | #include <linux/device.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/string.h> | 11 | #include <linux/string.h> |
11 | #include "base.h" | 12 | #include "base.h" |
12 | 13 | ||
diff --git a/drivers/base/node.c b/drivers/base/node.c index 93b3ac65c2d4..057979a19eea 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/cpu.h> | 15 | #include <linux/cpu.h> |
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/swap.h> | 17 | #include <linux/swap.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | static struct sysdev_class_attribute *node_state_attrs[]; | 20 | static struct sysdev_class_attribute *node_state_attrs[]; |
20 | 21 | ||
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index d477f4dc5e51..941fcb87e52a 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -439,8 +439,23 @@ static int device_resume_noirq(struct device *dev, pm_message_t state) | |||
439 | if (dev->bus && dev->bus->pm) { | 439 | if (dev->bus && dev->bus->pm) { |
440 | pm_dev_dbg(dev, state, "EARLY "); | 440 | pm_dev_dbg(dev, state, "EARLY "); |
441 | error = pm_noirq_op(dev, dev->bus->pm, state); | 441 | error = pm_noirq_op(dev, dev->bus->pm, state); |
442 | if (error) | ||
443 | goto End; | ||
442 | } | 444 | } |
443 | 445 | ||
446 | if (dev->type && dev->type->pm) { | ||
447 | pm_dev_dbg(dev, state, "EARLY type "); | ||
448 | error = pm_noirq_op(dev, dev->type->pm, state); | ||
449 | if (error) | ||
450 | goto End; | ||
451 | } | ||
452 | |||
453 | if (dev->class && dev->class->pm) { | ||
454 | pm_dev_dbg(dev, state, "EARLY class "); | ||
455 | error = pm_noirq_op(dev, dev->class->pm, state); | ||
456 | } | ||
457 | |||
458 | End: | ||
444 | TRACE_RESUME(error); | 459 | TRACE_RESUME(error); |
445 | return error; | 460 | return error; |
446 | } | 461 | } |
@@ -735,10 +750,26 @@ static int device_suspend_noirq(struct device *dev, pm_message_t state) | |||
735 | { | 750 | { |
736 | int error = 0; | 751 | int error = 0; |
737 | 752 | ||
753 | if (dev->class && dev->class->pm) { | ||
754 | pm_dev_dbg(dev, state, "LATE class "); | ||
755 | error = pm_noirq_op(dev, dev->class->pm, state); | ||
756 | if (error) | ||
757 | goto End; | ||
758 | } | ||
759 | |||
760 | if (dev->type && dev->type->pm) { | ||
761 | pm_dev_dbg(dev, state, "LATE type "); | ||
762 | error = pm_noirq_op(dev, dev->type->pm, state); | ||
763 | if (error) | ||
764 | goto End; | ||
765 | } | ||
766 | |||
738 | if (dev->bus && dev->bus->pm) { | 767 | if (dev->bus && dev->bus->pm) { |
739 | pm_dev_dbg(dev, state, "LATE "); | 768 | pm_dev_dbg(dev, state, "LATE "); |
740 | error = pm_noirq_op(dev, dev->bus->pm, state); | 769 | error = pm_noirq_op(dev, dev->bus->pm, state); |
741 | } | 770 | } |
771 | |||
772 | End: | ||
742 | return error; | 773 | return error; |
743 | } | 774 | } |
744 | 775 | ||
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 8980feec5d14..9354dc10a363 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/string.h> | 20 | #include <linux/string.h> |
22 | #include <linux/pm.h> | 21 | #include <linux/pm.h> |
23 | #include <linux/device.h> | 22 | #include <linux/device.h> |
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 459f1bc25a7b..c5f22bb0a48e 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
@@ -2533,7 +2533,6 @@ static bool DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller) | |||
2533 | Controller->RequestQueue[n] = RequestQueue; | 2533 | Controller->RequestQueue[n] = RequestQueue; |
2534 | blk_queue_bounce_limit(RequestQueue, Controller->BounceBufferLimit); | 2534 | blk_queue_bounce_limit(RequestQueue, Controller->BounceBufferLimit); |
2535 | RequestQueue->queuedata = Controller; | 2535 | RequestQueue->queuedata = Controller; |
2536 | blk_queue_max_hw_segments(RequestQueue, Controller->DriverScatterGatherLimit); | ||
2537 | blk_queue_max_segments(RequestQueue, Controller->DriverScatterGatherLimit); | 2536 | blk_queue_max_segments(RequestQueue, Controller->DriverScatterGatherLimit); |
2538 | blk_queue_max_hw_sectors(RequestQueue, Controller->MaxBlocksPerCommand); | 2537 | blk_queue_max_hw_sectors(RequestQueue, Controller->MaxBlocksPerCommand); |
2539 | disk->queue = RequestQueue; | 2538 | disk->queue = RequestQueue; |
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c index 055225839024..0182a22c423a 100644 --- a/drivers/block/amiflop.c +++ b/drivers/block/amiflop.c | |||
@@ -54,6 +54,7 @@ | |||
54 | */ | 54 | */ |
55 | 55 | ||
56 | #include <linux/module.h> | 56 | #include <linux/module.h> |
57 | #include <linux/slab.h> | ||
57 | 58 | ||
58 | #include <linux/fd.h> | 59 | #include <linux/fd.h> |
59 | #include <linux/hdreg.h> | 60 | #include <linux/hdreg.h> |
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index 3af97d4da2db..035cefe4045a 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/backing-dev.h> | 9 | #include <linux/backing-dev.h> |
10 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
11 | #include <linux/ioctl.h> | 11 | #include <linux/ioctl.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/genhd.h> | 13 | #include <linux/genhd.h> |
13 | #include <linux/netdevice.h> | 14 | #include <linux/netdevice.h> |
14 | #include "aoe.h" | 15 | #include "aoe.h" |
diff --git a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c index 62141ec09a22..4a1b9e7464aa 100644 --- a/drivers/block/aoe/aoechr.c +++ b/drivers/block/aoe/aoechr.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
9 | #include <linux/completion.h> | 9 | #include <linux/completion.h> |
10 | #include <linux/delay.h> | 10 | #include <linux/delay.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/smp_lock.h> | 12 | #include <linux/smp_lock.h> |
12 | #include <linux/skbuff.h> | 13 | #include <linux/skbuff.h> |
13 | #include "aoe.h" | 14 | #include "aoe.h" |
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 64a223b0cc22..5674bd01d96d 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c | |||
@@ -5,6 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/ata.h> | 7 | #include <linux/ata.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/hdreg.h> | 9 | #include <linux/hdreg.h> |
9 | #include <linux/blkdev.h> | 10 | #include <linux/blkdev.h> |
10 | #include <linux/skbuff.h> | 11 | #include <linux/skbuff.h> |
diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c index fa67027789aa..0849280bfc1c 100644 --- a/drivers/block/aoe/aoedev.c +++ b/drivers/block/aoe/aoedev.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
9 | #include <linux/netdevice.h> | 9 | #include <linux/netdevice.h> |
10 | #include <linux/delay.h> | 10 | #include <linux/delay.h> |
11 | #include <linux/slab.h> | ||
11 | #include "aoe.h" | 12 | #include "aoe.h" |
12 | 13 | ||
13 | static void dummy_timer(ulong); | 14 | static void dummy_timer(ulong); |
diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c index ce0d62cd71b2..4d3bc0d49df5 100644 --- a/drivers/block/aoe/aoenet.c +++ b/drivers/block/aoe/aoenet.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Ethernet portion of AoE driver | 4 | * Ethernet portion of AoE driver |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/gfp.h> | ||
7 | #include <linux/hdreg.h> | 8 | #include <linux/hdreg.h> |
8 | #include <linux/blkdev.h> | 9 | #include <linux/blkdev.h> |
9 | #include <linux/netdevice.h> | 10 | #include <linux/netdevice.h> |
diff --git a/drivers/block/brd.c b/drivers/block/brd.c index c6ddeacb77fd..6081e81d5738 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c | |||
@@ -15,9 +15,9 @@ | |||
15 | #include <linux/blkdev.h> | 15 | #include <linux/blkdev.h> |
16 | #include <linux/bio.h> | 16 | #include <linux/bio.h> |
17 | #include <linux/highmem.h> | 17 | #include <linux/highmem.h> |
18 | #include <linux/gfp.h> | ||
19 | #include <linux/radix-tree.h> | 18 | #include <linux/radix-tree.h> |
20 | #include <linux/buffer_head.h> /* invalidate_bh_lrus() */ | 19 | #include <linux/buffer_head.h> /* invalidate_bh_lrus() */ |
20 | #include <linux/slab.h> | ||
21 | 21 | ||
22 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
23 | 23 | ||
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 9e3af307aae1..eb5ff0531cfb 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -3341,6 +3341,7 @@ static irqreturn_t do_cciss_intr(int irq, void *dev_id) | |||
3341 | printk(KERN_WARNING | 3341 | printk(KERN_WARNING |
3342 | "cciss: controller cciss%d failed, stopping.\n", | 3342 | "cciss: controller cciss%d failed, stopping.\n", |
3343 | h->ctlr); | 3343 | h->ctlr); |
3344 | spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); | ||
3344 | fail_all_cmds(h->ctlr); | 3345 | fail_all_cmds(h->ctlr); |
3345 | return IRQ_HANDLED; | 3346 | return IRQ_HANDLED; |
3346 | } | 3347 | } |
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index 17956ff6a08d..df018990c422 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c | |||
@@ -536,7 +536,9 @@ static void atodb_endio(struct bio *bio, int error) | |||
536 | put_ldev(mdev); | 536 | put_ldev(mdev); |
537 | } | 537 | } |
538 | 538 | ||
539 | /* sector to word */ | ||
539 | #define S2W(s) ((s)<<(BM_EXT_SHIFT-BM_BLOCK_SHIFT-LN2_BPL)) | 540 | #define S2W(s) ((s)<<(BM_EXT_SHIFT-BM_BLOCK_SHIFT-LN2_BPL)) |
541 | |||
540 | /* activity log to on disk bitmap -- prepare bio unless that sector | 542 | /* activity log to on disk bitmap -- prepare bio unless that sector |
541 | * is already covered by previously prepared bios */ | 543 | * is already covered by previously prepared bios */ |
542 | static int atodb_prepare_unless_covered(struct drbd_conf *mdev, | 544 | static int atodb_prepare_unless_covered(struct drbd_conf *mdev, |
@@ -546,13 +548,20 @@ static int atodb_prepare_unless_covered(struct drbd_conf *mdev, | |||
546 | { | 548 | { |
547 | struct bio *bio; | 549 | struct bio *bio; |
548 | struct page *page; | 550 | struct page *page; |
549 | sector_t on_disk_sector = enr + mdev->ldev->md.md_offset | 551 | sector_t on_disk_sector; |
550 | + mdev->ldev->md.bm_offset; | ||
551 | unsigned int page_offset = PAGE_SIZE; | 552 | unsigned int page_offset = PAGE_SIZE; |
552 | int offset; | 553 | int offset; |
553 | int i = 0; | 554 | int i = 0; |
554 | int err = -ENOMEM; | 555 | int err = -ENOMEM; |
555 | 556 | ||
557 | /* We always write aligned, full 4k blocks, | ||
558 | * so we can ignore the logical_block_size (for now) */ | ||
559 | enr &= ~7U; | ||
560 | on_disk_sector = enr + mdev->ldev->md.md_offset | ||
561 | + mdev->ldev->md.bm_offset; | ||
562 | |||
563 | D_ASSERT(!(on_disk_sector & 7U)); | ||
564 | |||
556 | /* Check if that enr is already covered by an already created bio. | 565 | /* Check if that enr is already covered by an already created bio. |
557 | * Caution, bios[] is not NULL terminated, | 566 | * Caution, bios[] is not NULL terminated, |
558 | * but only initialized to all NULL. | 567 | * but only initialized to all NULL. |
@@ -588,7 +597,7 @@ static int atodb_prepare_unless_covered(struct drbd_conf *mdev, | |||
588 | 597 | ||
589 | offset = S2W(enr); | 598 | offset = S2W(enr); |
590 | drbd_bm_get_lel(mdev, offset, | 599 | drbd_bm_get_lel(mdev, offset, |
591 | min_t(size_t, S2W(1), drbd_bm_words(mdev) - offset), | 600 | min_t(size_t, S2W(8), drbd_bm_words(mdev) - offset), |
592 | kmap(page) + page_offset); | 601 | kmap(page) + page_offset); |
593 | kunmap(page); | 602 | kunmap(page); |
594 | 603 | ||
@@ -597,7 +606,7 @@ static int atodb_prepare_unless_covered(struct drbd_conf *mdev, | |||
597 | bio->bi_bdev = mdev->ldev->md_bdev; | 606 | bio->bi_bdev = mdev->ldev->md_bdev; |
598 | bio->bi_sector = on_disk_sector; | 607 | bio->bi_sector = on_disk_sector; |
599 | 608 | ||
600 | if (bio_add_page(bio, page, MD_SECTOR_SIZE, page_offset) != MD_SECTOR_SIZE) | 609 | if (bio_add_page(bio, page, 4096, page_offset) != 4096) |
601 | goto out_put_page; | 610 | goto out_put_page; |
602 | 611 | ||
603 | atomic_inc(&wc->count); | 612 | atomic_inc(&wc->count); |
@@ -1327,7 +1336,7 @@ int drbd_rs_del_all(struct drbd_conf *mdev) | |||
1327 | /* ok, ->resync is there. */ | 1336 | /* ok, ->resync is there. */ |
1328 | for (i = 0; i < mdev->resync->nr_elements; i++) { | 1337 | for (i = 0; i < mdev->resync->nr_elements; i++) { |
1329 | e = lc_element_by_index(mdev->resync, i); | 1338 | e = lc_element_by_index(mdev->resync, i); |
1330 | bm_ext = e ? lc_entry(e, struct bm_extent, lce) : NULL; | 1339 | bm_ext = lc_entry(e, struct bm_extent, lce); |
1331 | if (bm_ext->lce.lc_number == LC_FREE) | 1340 | if (bm_ext->lce.lc_number == LC_FREE) |
1332 | continue; | 1341 | continue; |
1333 | if (bm_ext->lce.lc_number == mdev->resync_wenr) { | 1342 | if (bm_ext->lce.lc_number == mdev->resync_wenr) { |
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c index b61057e77882..3390716898d5 100644 --- a/drivers/block/drbd/drbd_bitmap.c +++ b/drivers/block/drbd/drbd_bitmap.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
27 | #include <linux/string.h> | 27 | #include <linux/string.h> |
28 | #include <linux/drbd.h> | 28 | #include <linux/drbd.h> |
29 | #include <linux/slab.h> | ||
29 | #include <asm/kmap_types.h> | 30 | #include <asm/kmap_types.h> |
30 | #include "drbd_int.h" | 31 | #include "drbd_int.h" |
31 | 32 | ||
@@ -66,7 +67,7 @@ struct drbd_bitmap { | |||
66 | size_t bm_words; | 67 | size_t bm_words; |
67 | size_t bm_number_of_pages; | 68 | size_t bm_number_of_pages; |
68 | sector_t bm_dev_capacity; | 69 | sector_t bm_dev_capacity; |
69 | struct semaphore bm_change; /* serializes resize operations */ | 70 | struct mutex bm_change; /* serializes resize operations */ |
70 | 71 | ||
71 | atomic_t bm_async_io; | 72 | atomic_t bm_async_io; |
72 | wait_queue_head_t bm_io_wait; | 73 | wait_queue_head_t bm_io_wait; |
@@ -114,7 +115,7 @@ void drbd_bm_lock(struct drbd_conf *mdev, char *why) | |||
114 | return; | 115 | return; |
115 | } | 116 | } |
116 | 117 | ||
117 | trylock_failed = down_trylock(&b->bm_change); | 118 | trylock_failed = !mutex_trylock(&b->bm_change); |
118 | 119 | ||
119 | if (trylock_failed) { | 120 | if (trylock_failed) { |
120 | dev_warn(DEV, "%s going to '%s' but bitmap already locked for '%s' by %s\n", | 121 | dev_warn(DEV, "%s going to '%s' but bitmap already locked for '%s' by %s\n", |
@@ -125,7 +126,7 @@ void drbd_bm_lock(struct drbd_conf *mdev, char *why) | |||
125 | b->bm_task == mdev->receiver.task ? "receiver" : | 126 | b->bm_task == mdev->receiver.task ? "receiver" : |
126 | b->bm_task == mdev->asender.task ? "asender" : | 127 | b->bm_task == mdev->asender.task ? "asender" : |
127 | b->bm_task == mdev->worker.task ? "worker" : "?"); | 128 | b->bm_task == mdev->worker.task ? "worker" : "?"); |
128 | down(&b->bm_change); | 129 | mutex_lock(&b->bm_change); |
129 | } | 130 | } |
130 | if (__test_and_set_bit(BM_LOCKED, &b->bm_flags)) | 131 | if (__test_and_set_bit(BM_LOCKED, &b->bm_flags)) |
131 | dev_err(DEV, "FIXME bitmap already locked in bm_lock\n"); | 132 | dev_err(DEV, "FIXME bitmap already locked in bm_lock\n"); |
@@ -147,7 +148,7 @@ void drbd_bm_unlock(struct drbd_conf *mdev) | |||
147 | 148 | ||
148 | b->bm_why = NULL; | 149 | b->bm_why = NULL; |
149 | b->bm_task = NULL; | 150 | b->bm_task = NULL; |
150 | up(&b->bm_change); | 151 | mutex_unlock(&b->bm_change); |
151 | } | 152 | } |
152 | 153 | ||
153 | /* word offset to long pointer */ | 154 | /* word offset to long pointer */ |
@@ -295,7 +296,7 @@ int drbd_bm_init(struct drbd_conf *mdev) | |||
295 | if (!b) | 296 | if (!b) |
296 | return -ENOMEM; | 297 | return -ENOMEM; |
297 | spin_lock_init(&b->bm_lock); | 298 | spin_lock_init(&b->bm_lock); |
298 | init_MUTEX(&b->bm_change); | 299 | mutex_init(&b->bm_change); |
299 | init_waitqueue_head(&b->bm_io_wait); | 300 | init_waitqueue_head(&b->bm_io_wait); |
300 | 301 | ||
301 | mdev->bitmap = b; | 302 | mdev->bitmap = b; |
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index d9301e861d9f..e5e86a781820 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -261,6 +261,9 @@ static inline const char *cmdname(enum drbd_packets cmd) | |||
261 | [P_OV_REQUEST] = "OVRequest", | 261 | [P_OV_REQUEST] = "OVRequest", |
262 | [P_OV_REPLY] = "OVReply", | 262 | [P_OV_REPLY] = "OVReply", |
263 | [P_OV_RESULT] = "OVResult", | 263 | [P_OV_RESULT] = "OVResult", |
264 | [P_CSUM_RS_REQUEST] = "CsumRSRequest", | ||
265 | [P_RS_IS_IN_SYNC] = "CsumRSIsInSync", | ||
266 | [P_COMPRESSED_BITMAP] = "CBitmap", | ||
264 | [P_MAX_CMD] = NULL, | 267 | [P_MAX_CMD] = NULL, |
265 | }; | 268 | }; |
266 | 269 | ||
@@ -443,13 +446,18 @@ struct p_rs_param_89 { | |||
443 | char csums_alg[SHARED_SECRET_MAX]; | 446 | char csums_alg[SHARED_SECRET_MAX]; |
444 | } __packed; | 447 | } __packed; |
445 | 448 | ||
449 | enum drbd_conn_flags { | ||
450 | CF_WANT_LOSE = 1, | ||
451 | CF_DRY_RUN = 2, | ||
452 | }; | ||
453 | |||
446 | struct p_protocol { | 454 | struct p_protocol { |
447 | struct p_header head; | 455 | struct p_header head; |
448 | u32 protocol; | 456 | u32 protocol; |
449 | u32 after_sb_0p; | 457 | u32 after_sb_0p; |
450 | u32 after_sb_1p; | 458 | u32 after_sb_1p; |
451 | u32 after_sb_2p; | 459 | u32 after_sb_2p; |
452 | u32 want_lose; | 460 | u32 conn_flags; |
453 | u32 two_primaries; | 461 | u32 two_primaries; |
454 | 462 | ||
455 | /* Since protocol version 87 and higher. */ | 463 | /* Since protocol version 87 and higher. */ |
@@ -791,6 +799,8 @@ enum { | |||
791 | * while this is set. */ | 799 | * while this is set. */ |
792 | RESIZE_PENDING, /* Size change detected locally, waiting for the response from | 800 | RESIZE_PENDING, /* Size change detected locally, waiting for the response from |
793 | * the peer, if it changed there as well. */ | 801 | * the peer, if it changed there as well. */ |
802 | CONN_DRY_RUN, /* Expect disconnect after resync handshake. */ | ||
803 | GOT_PING_ACK, /* set when we receive a ping_ack packet, misc wait gets woken */ | ||
794 | }; | 804 | }; |
795 | 805 | ||
796 | struct drbd_bitmap; /* opaque for drbd_conf */ | 806 | struct drbd_bitmap; /* opaque for drbd_conf */ |
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index ab871e00ffc5..67e0fc542249 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -1668,7 +1668,7 @@ int drbd_send_sync_param(struct drbd_conf *mdev, struct syncer_conf *sc) | |||
1668 | int drbd_send_protocol(struct drbd_conf *mdev) | 1668 | int drbd_send_protocol(struct drbd_conf *mdev) |
1669 | { | 1669 | { |
1670 | struct p_protocol *p; | 1670 | struct p_protocol *p; |
1671 | int size, rv; | 1671 | int size, cf, rv; |
1672 | 1672 | ||
1673 | size = sizeof(struct p_protocol); | 1673 | size = sizeof(struct p_protocol); |
1674 | 1674 | ||
@@ -1685,9 +1685,21 @@ int drbd_send_protocol(struct drbd_conf *mdev) | |||
1685 | p->after_sb_0p = cpu_to_be32(mdev->net_conf->after_sb_0p); | 1685 | p->after_sb_0p = cpu_to_be32(mdev->net_conf->after_sb_0p); |
1686 | p->after_sb_1p = cpu_to_be32(mdev->net_conf->after_sb_1p); | 1686 | p->after_sb_1p = cpu_to_be32(mdev->net_conf->after_sb_1p); |
1687 | p->after_sb_2p = cpu_to_be32(mdev->net_conf->after_sb_2p); | 1687 | p->after_sb_2p = cpu_to_be32(mdev->net_conf->after_sb_2p); |
1688 | p->want_lose = cpu_to_be32(mdev->net_conf->want_lose); | ||
1689 | p->two_primaries = cpu_to_be32(mdev->net_conf->two_primaries); | 1688 | p->two_primaries = cpu_to_be32(mdev->net_conf->two_primaries); |
1690 | 1689 | ||
1690 | cf = 0; | ||
1691 | if (mdev->net_conf->want_lose) | ||
1692 | cf |= CF_WANT_LOSE; | ||
1693 | if (mdev->net_conf->dry_run) { | ||
1694 | if (mdev->agreed_pro_version >= 92) | ||
1695 | cf |= CF_DRY_RUN; | ||
1696 | else { | ||
1697 | dev_err(DEV, "--dry-run is not supported by peer"); | ||
1698 | return 0; | ||
1699 | } | ||
1700 | } | ||
1701 | p->conn_flags = cpu_to_be32(cf); | ||
1702 | |||
1691 | if (mdev->agreed_pro_version >= 87) | 1703 | if (mdev->agreed_pro_version >= 87) |
1692 | strcpy(p->integrity_alg, mdev->net_conf->integrity_alg); | 1704 | strcpy(p->integrity_alg, mdev->net_conf->integrity_alg); |
1693 | 1705 | ||
@@ -3161,14 +3173,18 @@ void drbd_free_bc(struct drbd_backing_dev *ldev) | |||
3161 | void drbd_free_sock(struct drbd_conf *mdev) | 3173 | void drbd_free_sock(struct drbd_conf *mdev) |
3162 | { | 3174 | { |
3163 | if (mdev->data.socket) { | 3175 | if (mdev->data.socket) { |
3176 | mutex_lock(&mdev->data.mutex); | ||
3164 | kernel_sock_shutdown(mdev->data.socket, SHUT_RDWR); | 3177 | kernel_sock_shutdown(mdev->data.socket, SHUT_RDWR); |
3165 | sock_release(mdev->data.socket); | 3178 | sock_release(mdev->data.socket); |
3166 | mdev->data.socket = NULL; | 3179 | mdev->data.socket = NULL; |
3180 | mutex_unlock(&mdev->data.mutex); | ||
3167 | } | 3181 | } |
3168 | if (mdev->meta.socket) { | 3182 | if (mdev->meta.socket) { |
3183 | mutex_lock(&mdev->meta.mutex); | ||
3169 | kernel_sock_shutdown(mdev->meta.socket, SHUT_RDWR); | 3184 | kernel_sock_shutdown(mdev->meta.socket, SHUT_RDWR); |
3170 | sock_release(mdev->meta.socket); | 3185 | sock_release(mdev->meta.socket); |
3171 | mdev->meta.socket = NULL; | 3186 | mdev->meta.socket = NULL; |
3187 | mutex_unlock(&mdev->meta.mutex); | ||
3172 | } | 3188 | } |
3173 | } | 3189 | } |
3174 | 3190 | ||
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 4df3b40b1057..6429d2b19e06 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c | |||
@@ -285,8 +285,8 @@ int drbd_set_role(struct drbd_conf *mdev, enum drbd_role new_role, int force) | |||
285 | } | 285 | } |
286 | 286 | ||
287 | if (r == SS_NO_UP_TO_DATE_DISK && force && | 287 | if (r == SS_NO_UP_TO_DATE_DISK && force && |
288 | (mdev->state.disk == D_INCONSISTENT || | 288 | (mdev->state.disk < D_UP_TO_DATE && |
289 | mdev->state.disk == D_OUTDATED)) { | 289 | mdev->state.disk >= D_INCONSISTENT)) { |
290 | mask.disk = D_MASK; | 290 | mask.disk = D_MASK; |
291 | val.disk = D_UP_TO_DATE; | 291 | val.disk = D_UP_TO_DATE; |
292 | forced = 1; | 292 | forced = 1; |
@@ -407,7 +407,7 @@ static int drbd_nl_primary(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp, | |||
407 | } | 407 | } |
408 | 408 | ||
409 | reply->ret_code = | 409 | reply->ret_code = |
410 | drbd_set_role(mdev, R_PRIMARY, primary_args.overwrite_peer); | 410 | drbd_set_role(mdev, R_PRIMARY, primary_args.primary_force); |
411 | 411 | ||
412 | return 0; | 412 | return 0; |
413 | } | 413 | } |
@@ -941,6 +941,25 @@ static int drbd_nl_disk_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp | |||
941 | 941 | ||
942 | drbd_md_set_sector_offsets(mdev, nbc); | 942 | drbd_md_set_sector_offsets(mdev, nbc); |
943 | 943 | ||
944 | /* allocate a second IO page if logical_block_size != 512 */ | ||
945 | logical_block_size = bdev_logical_block_size(nbc->md_bdev); | ||
946 | if (logical_block_size == 0) | ||
947 | logical_block_size = MD_SECTOR_SIZE; | ||
948 | |||
949 | if (logical_block_size != MD_SECTOR_SIZE) { | ||
950 | if (!mdev->md_io_tmpp) { | ||
951 | struct page *page = alloc_page(GFP_NOIO); | ||
952 | if (!page) | ||
953 | goto force_diskless_dec; | ||
954 | |||
955 | dev_warn(DEV, "Meta data's bdev logical_block_size = %d != %d\n", | ||
956 | logical_block_size, MD_SECTOR_SIZE); | ||
957 | dev_warn(DEV, "Workaround engaged (has performance impact).\n"); | ||
958 | |||
959 | mdev->md_io_tmpp = page; | ||
960 | } | ||
961 | } | ||
962 | |||
944 | if (!mdev->bitmap) { | 963 | if (!mdev->bitmap) { |
945 | if (drbd_bm_init(mdev)) { | 964 | if (drbd_bm_init(mdev)) { |
946 | retcode = ERR_NOMEM; | 965 | retcode = ERR_NOMEM; |
@@ -980,25 +999,6 @@ static int drbd_nl_disk_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp | |||
980 | goto force_diskless_dec; | 999 | goto force_diskless_dec; |
981 | } | 1000 | } |
982 | 1001 | ||
983 | /* allocate a second IO page if logical_block_size != 512 */ | ||
984 | logical_block_size = bdev_logical_block_size(nbc->md_bdev); | ||
985 | if (logical_block_size == 0) | ||
986 | logical_block_size = MD_SECTOR_SIZE; | ||
987 | |||
988 | if (logical_block_size != MD_SECTOR_SIZE) { | ||
989 | if (!mdev->md_io_tmpp) { | ||
990 | struct page *page = alloc_page(GFP_NOIO); | ||
991 | if (!page) | ||
992 | goto force_diskless_dec; | ||
993 | |||
994 | dev_warn(DEV, "Meta data's bdev logical_block_size = %d != %d\n", | ||
995 | logical_block_size, MD_SECTOR_SIZE); | ||
996 | dev_warn(DEV, "Workaround engaged (has performance impact).\n"); | ||
997 | |||
998 | mdev->md_io_tmpp = page; | ||
999 | } | ||
1000 | } | ||
1001 | |||
1002 | /* Reset the "barriers don't work" bits here, then force meta data to | 1002 | /* Reset the "barriers don't work" bits here, then force meta data to |
1003 | * be written, to ensure we determine if barriers are supported. */ | 1003 | * be written, to ensure we determine if barriers are supported. */ |
1004 | if (nbc->dc.no_md_flush) | 1004 | if (nbc->dc.no_md_flush) |
diff --git a/drivers/block/drbd/drbd_proc.c b/drivers/block/drbd/drbd_proc.c index df8ad9660d8f..be3374b68460 100644 --- a/drivers/block/drbd/drbd_proc.c +++ b/drivers/block/drbd/drbd_proc.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/file.h> | 30 | #include <linux/file.h> |
31 | #include <linux/slab.h> | ||
32 | #include <linux/proc_fs.h> | 31 | #include <linux/proc_fs.h> |
33 | #include <linux/seq_file.h> | 32 | #include <linux/seq_file.h> |
34 | #include <linux/drbd.h> | 33 | #include <linux/drbd.h> |
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index d065c646b35a..ed9f1de24a71 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -2513,6 +2513,10 @@ static enum drbd_conns drbd_sync_handshake(struct drbd_conf *mdev, enum drbd_rol | |||
2513 | } | 2513 | } |
2514 | 2514 | ||
2515 | if (hg == -100) { | 2515 | if (hg == -100) { |
2516 | /* FIXME this log message is not correct if we end up here | ||
2517 | * after an attempted attach on a diskless node. | ||
2518 | * We just refuse to attach -- well, we drop the "connection" | ||
2519 | * to that disk, in a way... */ | ||
2516 | dev_alert(DEV, "Split-Brain detected, dropping connection!\n"); | 2520 | dev_alert(DEV, "Split-Brain detected, dropping connection!\n"); |
2517 | drbd_khelper(mdev, "split-brain"); | 2521 | drbd_khelper(mdev, "split-brain"); |
2518 | return C_MASK; | 2522 | return C_MASK; |
@@ -2538,6 +2542,16 @@ static enum drbd_conns drbd_sync_handshake(struct drbd_conf *mdev, enum drbd_rol | |||
2538 | } | 2542 | } |
2539 | } | 2543 | } |
2540 | 2544 | ||
2545 | if (mdev->net_conf->dry_run || test_bit(CONN_DRY_RUN, &mdev->flags)) { | ||
2546 | if (hg == 0) | ||
2547 | dev_info(DEV, "dry-run connect: No resync, would become Connected immediately.\n"); | ||
2548 | else | ||
2549 | dev_info(DEV, "dry-run connect: Would become %s, doing a %s resync.", | ||
2550 | drbd_conn_str(hg > 0 ? C_SYNC_SOURCE : C_SYNC_TARGET), | ||
2551 | abs(hg) >= 2 ? "full" : "bit-map based"); | ||
2552 | return C_MASK; | ||
2553 | } | ||
2554 | |||
2541 | if (abs(hg) >= 2) { | 2555 | if (abs(hg) >= 2) { |
2542 | dev_info(DEV, "Writing the whole bitmap, full sync required after drbd_sync_handshake.\n"); | 2556 | dev_info(DEV, "Writing the whole bitmap, full sync required after drbd_sync_handshake.\n"); |
2543 | if (drbd_bitmap_io(mdev, &drbd_bmio_set_n_write, "set_n_write from sync_handshake")) | 2557 | if (drbd_bitmap_io(mdev, &drbd_bmio_set_n_write, "set_n_write from sync_handshake")) |
@@ -2585,7 +2599,7 @@ static int receive_protocol(struct drbd_conf *mdev, struct p_header *h) | |||
2585 | struct p_protocol *p = (struct p_protocol *)h; | 2599 | struct p_protocol *p = (struct p_protocol *)h; |
2586 | int header_size, data_size; | 2600 | int header_size, data_size; |
2587 | int p_proto, p_after_sb_0p, p_after_sb_1p, p_after_sb_2p; | 2601 | int p_proto, p_after_sb_0p, p_after_sb_1p, p_after_sb_2p; |
2588 | int p_want_lose, p_two_primaries; | 2602 | int p_want_lose, p_two_primaries, cf; |
2589 | char p_integrity_alg[SHARED_SECRET_MAX] = ""; | 2603 | char p_integrity_alg[SHARED_SECRET_MAX] = ""; |
2590 | 2604 | ||
2591 | header_size = sizeof(*p) - sizeof(*h); | 2605 | header_size = sizeof(*p) - sizeof(*h); |
@@ -2598,8 +2612,14 @@ static int receive_protocol(struct drbd_conf *mdev, struct p_header *h) | |||
2598 | p_after_sb_0p = be32_to_cpu(p->after_sb_0p); | 2612 | p_after_sb_0p = be32_to_cpu(p->after_sb_0p); |
2599 | p_after_sb_1p = be32_to_cpu(p->after_sb_1p); | 2613 | p_after_sb_1p = be32_to_cpu(p->after_sb_1p); |
2600 | p_after_sb_2p = be32_to_cpu(p->after_sb_2p); | 2614 | p_after_sb_2p = be32_to_cpu(p->after_sb_2p); |
2601 | p_want_lose = be32_to_cpu(p->want_lose); | ||
2602 | p_two_primaries = be32_to_cpu(p->two_primaries); | 2615 | p_two_primaries = be32_to_cpu(p->two_primaries); |
2616 | cf = be32_to_cpu(p->conn_flags); | ||
2617 | p_want_lose = cf & CF_WANT_LOSE; | ||
2618 | |||
2619 | clear_bit(CONN_DRY_RUN, &mdev->flags); | ||
2620 | |||
2621 | if (cf & CF_DRY_RUN) | ||
2622 | set_bit(CONN_DRY_RUN, &mdev->flags); | ||
2603 | 2623 | ||
2604 | if (p_proto != mdev->net_conf->wire_protocol) { | 2624 | if (p_proto != mdev->net_conf->wire_protocol) { |
2605 | dev_err(DEV, "incompatible communication protocols\n"); | 2625 | dev_err(DEV, "incompatible communication protocols\n"); |
@@ -3118,13 +3138,16 @@ static int receive_state(struct drbd_conf *mdev, struct p_header *h) | |||
3118 | 3138 | ||
3119 | put_ldev(mdev); | 3139 | put_ldev(mdev); |
3120 | if (nconn == C_MASK) { | 3140 | if (nconn == C_MASK) { |
3141 | nconn = C_CONNECTED; | ||
3121 | if (mdev->state.disk == D_NEGOTIATING) { | 3142 | if (mdev->state.disk == D_NEGOTIATING) { |
3122 | drbd_force_state(mdev, NS(disk, D_DISKLESS)); | 3143 | drbd_force_state(mdev, NS(disk, D_DISKLESS)); |
3123 | nconn = C_CONNECTED; | ||
3124 | } else if (peer_state.disk == D_NEGOTIATING) { | 3144 | } else if (peer_state.disk == D_NEGOTIATING) { |
3125 | dev_err(DEV, "Disk attach process on the peer node was aborted.\n"); | 3145 | dev_err(DEV, "Disk attach process on the peer node was aborted.\n"); |
3126 | peer_state.disk = D_DISKLESS; | 3146 | peer_state.disk = D_DISKLESS; |
3147 | real_peer_disk = D_DISKLESS; | ||
3127 | } else { | 3148 | } else { |
3149 | if (test_and_clear_bit(CONN_DRY_RUN, &mdev->flags)) | ||
3150 | return FALSE; | ||
3128 | D_ASSERT(oconn == C_WF_REPORT_PARAMS); | 3151 | D_ASSERT(oconn == C_WF_REPORT_PARAMS); |
3129 | drbd_force_state(mdev, NS(conn, C_DISCONNECTING)); | 3152 | drbd_force_state(mdev, NS(conn, C_DISCONNECTING)); |
3130 | return FALSE; | 3153 | return FALSE; |
@@ -3594,10 +3617,7 @@ static void drbd_disconnect(struct drbd_conf *mdev) | |||
3594 | 3617 | ||
3595 | /* asender does not clean up anything. it must not interfere, either */ | 3618 | /* asender does not clean up anything. it must not interfere, either */ |
3596 | drbd_thread_stop(&mdev->asender); | 3619 | drbd_thread_stop(&mdev->asender); |
3597 | |||
3598 | mutex_lock(&mdev->data.mutex); | ||
3599 | drbd_free_sock(mdev); | 3620 | drbd_free_sock(mdev); |
3600 | mutex_unlock(&mdev->data.mutex); | ||
3601 | 3621 | ||
3602 | spin_lock_irq(&mdev->req_lock); | 3622 | spin_lock_irq(&mdev->req_lock); |
3603 | _drbd_wait_ee_list_empty(mdev, &mdev->active_ee); | 3623 | _drbd_wait_ee_list_empty(mdev, &mdev->active_ee); |
@@ -4054,6 +4074,8 @@ static int got_PingAck(struct drbd_conf *mdev, struct p_header *h) | |||
4054 | { | 4074 | { |
4055 | /* restore idle timeout */ | 4075 | /* restore idle timeout */ |
4056 | mdev->meta.socket->sk->sk_rcvtimeo = mdev->net_conf->ping_int*HZ; | 4076 | mdev->meta.socket->sk->sk_rcvtimeo = mdev->net_conf->ping_int*HZ; |
4077 | if (!test_and_set_bit(GOT_PING_ACK, &mdev->flags)) | ||
4078 | wake_up(&mdev->misc_wait); | ||
4057 | 4079 | ||
4058 | return TRUE; | 4080 | return TRUE; |
4059 | } | 4081 | } |
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index b453c2bca3be..44bf6d11197e 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c | |||
@@ -938,7 +938,8 @@ int w_e_end_csum_rs_req(struct drbd_conf *mdev, struct drbd_work *w, int cancel) | |||
938 | 938 | ||
939 | if (eq) { | 939 | if (eq) { |
940 | drbd_set_in_sync(mdev, e->sector, e->size); | 940 | drbd_set_in_sync(mdev, e->sector, e->size); |
941 | mdev->rs_same_csum++; | 941 | /* rs_same_csums unit is BM_BLOCK_SIZE */ |
942 | mdev->rs_same_csum += e->size >> BM_BLOCK_SHIFT; | ||
942 | ok = drbd_send_ack(mdev, P_RS_IS_IN_SYNC, e); | 943 | ok = drbd_send_ack(mdev, P_RS_IS_IN_SYNC, e); |
943 | } else { | 944 | } else { |
944 | inc_rs_pending(mdev); | 945 | inc_rs_pending(mdev); |
@@ -1288,6 +1289,14 @@ int drbd_alter_sa(struct drbd_conf *mdev, int na) | |||
1288 | return retcode; | 1289 | return retcode; |
1289 | } | 1290 | } |
1290 | 1291 | ||
1292 | static void ping_peer(struct drbd_conf *mdev) | ||
1293 | { | ||
1294 | clear_bit(GOT_PING_ACK, &mdev->flags); | ||
1295 | request_ping(mdev); | ||
1296 | wait_event(mdev->misc_wait, | ||
1297 | test_bit(GOT_PING_ACK, &mdev->flags) || mdev->state.conn < C_CONNECTED); | ||
1298 | } | ||
1299 | |||
1291 | /** | 1300 | /** |
1292 | * drbd_start_resync() - Start the resync process | 1301 | * drbd_start_resync() - Start the resync process |
1293 | * @mdev: DRBD device. | 1302 | * @mdev: DRBD device. |
@@ -1371,7 +1380,6 @@ void drbd_start_resync(struct drbd_conf *mdev, enum drbd_conns side) | |||
1371 | _drbd_pause_after(mdev); | 1380 | _drbd_pause_after(mdev); |
1372 | } | 1381 | } |
1373 | write_unlock_irq(&global_state_lock); | 1382 | write_unlock_irq(&global_state_lock); |
1374 | drbd_state_unlock(mdev); | ||
1375 | put_ldev(mdev); | 1383 | put_ldev(mdev); |
1376 | 1384 | ||
1377 | if (r == SS_SUCCESS) { | 1385 | if (r == SS_SUCCESS) { |
@@ -1382,11 +1390,8 @@ void drbd_start_resync(struct drbd_conf *mdev, enum drbd_conns side) | |||
1382 | 1390 | ||
1383 | if (mdev->rs_total == 0) { | 1391 | if (mdev->rs_total == 0) { |
1384 | /* Peer still reachable? Beware of failing before-resync-target handlers! */ | 1392 | /* Peer still reachable? Beware of failing before-resync-target handlers! */ |
1385 | request_ping(mdev); | 1393 | ping_peer(mdev); |
1386 | __set_current_state(TASK_INTERRUPTIBLE); | ||
1387 | schedule_timeout(mdev->net_conf->ping_timeo*HZ/9); /* 9 instead 10 */ | ||
1388 | drbd_resync_finished(mdev); | 1394 | drbd_resync_finished(mdev); |
1389 | return; | ||
1390 | } | 1395 | } |
1391 | 1396 | ||
1392 | /* ns.conn may already be != mdev->state.conn, | 1397 | /* ns.conn may already be != mdev->state.conn, |
@@ -1398,6 +1403,7 @@ void drbd_start_resync(struct drbd_conf *mdev, enum drbd_conns side) | |||
1398 | 1403 | ||
1399 | drbd_md_sync(mdev); | 1404 | drbd_md_sync(mdev); |
1400 | } | 1405 | } |
1406 | drbd_state_unlock(mdev); | ||
1401 | } | 1407 | } |
1402 | 1408 | ||
1403 | int drbd_worker(struct drbd_thread *thi) | 1409 | int drbd_worker(struct drbd_thread *thi) |
diff --git a/drivers/block/hd.c b/drivers/block/hd.c index 5116c65c07cb..034e6dfc878c 100644 --- a/drivers/block/hd.c +++ b/drivers/block/hd.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/fs.h> | 34 | #include <linux/fs.h> |
35 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
36 | #include <linux/genhd.h> | 36 | #include <linux/genhd.h> |
37 | #include <linux/slab.h> | ||
38 | #include <linux/string.h> | 37 | #include <linux/string.h> |
39 | #include <linux/ioport.h> | 38 | #include <linux/ioport.h> |
40 | #include <linux/init.h> | 39 | #include <linux/init.h> |
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index bd112c8c7bcd..8546d123b9a7 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -71,7 +71,6 @@ | |||
71 | #include <linux/buffer_head.h> /* for invalidate_bdev() */ | 71 | #include <linux/buffer_head.h> /* for invalidate_bdev() */ |
72 | #include <linux/completion.h> | 72 | #include <linux/completion.h> |
73 | #include <linux/highmem.h> | 73 | #include <linux/highmem.h> |
74 | #include <linux/gfp.h> | ||
75 | #include <linux/kthread.h> | 74 | #include <linux/kthread.h> |
76 | #include <linux/splice.h> | 75 | #include <linux/splice.h> |
77 | 76 | ||
@@ -238,6 +237,8 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec, | |||
238 | if (ret) | 237 | if (ret) |
239 | goto fail; | 238 | goto fail; |
240 | 239 | ||
240 | file_update_time(file); | ||
241 | |||
241 | transfer_result = lo_do_transfer(lo, WRITE, page, offset, | 242 | transfer_result = lo_do_transfer(lo, WRITE, page, offset, |
242 | bvec->bv_page, bv_offs, size, IV); | 243 | bvec->bv_page, bv_offs, size, IV); |
243 | copied = size; | 244 | copied = size; |
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c index 5416c9a606e4..28db925dbdad 100644 --- a/drivers/block/mg_disk.c +++ b/drivers/block/mg_disk.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/mg_disk.h> | 25 | #include <linux/mg_disk.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #define MG_RES_SEC (CONFIG_MG_DISK_RES << 1) | 28 | #define MG_RES_SEC (CONFIG_MG_DISK_RES << 1) |
28 | 29 | ||
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index cc923a5b430c..218d091f3c52 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/compiler.h> | 27 | #include <linux/compiler.h> |
28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/slab.h> | ||
30 | #include <net/sock.h> | 31 | #include <net/sock.h> |
31 | #include <linux/net.h> | 32 | #include <linux/net.h> |
32 | #include <linux/kthread.h> | 33 | #include <linux/kthread.h> |
diff --git a/drivers/block/osdblk.c b/drivers/block/osdblk.c index eb2091aa1c19..6cd8b705b11b 100644 --- a/drivers/block/osdblk.c +++ b/drivers/block/osdblk.c | |||
@@ -63,6 +63,7 @@ | |||
63 | #include <linux/device.h> | 63 | #include <linux/device.h> |
64 | #include <linux/module.h> | 64 | #include <linux/module.h> |
65 | #include <linux/fs.h> | 65 | #include <linux/fs.h> |
66 | #include <linux/slab.h> | ||
66 | #include <scsi/osd_initiator.h> | 67 | #include <scsi/osd_initiator.h> |
67 | #include <scsi/osd_attributes.h> | 68 | #include <scsi/osd_attributes.h> |
68 | #include <scsi/osd_sec.h> | 69 | #include <scsi/osd_sec.h> |
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c index 8866ca369d5e..71acf4e53356 100644 --- a/drivers/block/paride/pcd.c +++ b/drivers/block/paride/pcd.c | |||
@@ -341,11 +341,11 @@ static int pcd_wait(struct pcd_unit *cd, int go, int stop, char *fun, char *msg) | |||
341 | && (j++ < PCD_SPIN)) | 341 | && (j++ < PCD_SPIN)) |
342 | udelay(PCD_DELAY); | 342 | udelay(PCD_DELAY); |
343 | 343 | ||
344 | if ((r & (IDE_ERR & stop)) || (j >= PCD_SPIN)) { | 344 | if ((r & (IDE_ERR & stop)) || (j > PCD_SPIN)) { |
345 | s = read_reg(cd, 7); | 345 | s = read_reg(cd, 7); |
346 | e = read_reg(cd, 1); | 346 | e = read_reg(cd, 1); |
347 | p = read_reg(cd, 2); | 347 | p = read_reg(cd, 2); |
348 | if (j >= PCD_SPIN) | 348 | if (j > PCD_SPIN) |
349 | e |= 0x100; | 349 | e |= 0x100; |
350 | if (fun) | 350 | if (fun) |
351 | printk("%s: %s %s: alt=0x%x stat=0x%x err=0x%x" | 351 | printk("%s: %s %s: alt=0x%x stat=0x%x err=0x%x" |
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index e712cd51af15..c1e5cd029b23 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride/pd.c | |||
@@ -145,6 +145,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_GEO, D_SBY, D_DLY, D_SLV}; | |||
145 | 145 | ||
146 | #include <linux/init.h> | 146 | #include <linux/init.h> |
147 | #include <linux/module.h> | 147 | #include <linux/module.h> |
148 | #include <linux/gfp.h> | ||
148 | #include <linux/fs.h> | 149 | #include <linux/fs.h> |
149 | #include <linux/delay.h> | 150 | #include <linux/delay.h> |
150 | #include <linux/hdreg.h> | 151 | #include <linux/hdreg.h> |
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index ddb4f9abd480..c059aab3006b 100644 --- a/drivers/block/paride/pf.c +++ b/drivers/block/paride/pf.c | |||
@@ -391,11 +391,11 @@ static int pf_wait(struct pf_unit *pf, int go, int stop, char *fun, char *msg) | |||
391 | && (j++ < PF_SPIN)) | 391 | && (j++ < PF_SPIN)) |
392 | udelay(PF_SPIN_DEL); | 392 | udelay(PF_SPIN_DEL); |
393 | 393 | ||
394 | if ((r & (STAT_ERR & stop)) || (j >= PF_SPIN)) { | 394 | if ((r & (STAT_ERR & stop)) || (j > PF_SPIN)) { |
395 | s = read_reg(pf, 7); | 395 | s = read_reg(pf, 7); |
396 | e = read_reg(pf, 1); | 396 | e = read_reg(pf, 1); |
397 | p = read_reg(pf, 2); | 397 | p = read_reg(pf, 2); |
398 | if (j >= PF_SPIN) | 398 | if (j > PF_SPIN) |
399 | e |= 0x100; | 399 | e |= 0x100; |
400 | if (fun) | 400 | if (fun) |
401 | printk("%s: %s %s: alt=0x%x stat=0x%x err=0x%x" | 401 | printk("%s: %s %s: alt=0x%x stat=0x%x err=0x%x" |
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c index 1e4006e18f03..bc5825fdeaab 100644 --- a/drivers/block/paride/pt.c +++ b/drivers/block/paride/pt.c | |||
@@ -274,11 +274,11 @@ static int pt_wait(struct pt_unit *tape, int go, int stop, char *fun, char *msg) | |||
274 | && (j++ < PT_SPIN)) | 274 | && (j++ < PT_SPIN)) |
275 | udelay(PT_SPIN_DEL); | 275 | udelay(PT_SPIN_DEL); |
276 | 276 | ||
277 | if ((r & (STAT_ERR & stop)) || (j >= PT_SPIN)) { | 277 | if ((r & (STAT_ERR & stop)) || (j > PT_SPIN)) { |
278 | s = read_reg(pi, 7); | 278 | s = read_reg(pi, 7); |
279 | e = read_reg(pi, 1); | 279 | e = read_reg(pi, 1); |
280 | p = read_reg(pi, 2); | 280 | p = read_reg(pi, 2); |
281 | if (j >= PT_SPIN) | 281 | if (j > PT_SPIN) |
282 | e |= 0x100; | 282 | e |= 0x100; |
283 | if (fun) | 283 | if (fun) |
284 | printk("%s: %s %s: alt=0x%x stat=0x%x err=0x%x" | 284 | printk("%s: %s %s: alt=0x%x stat=0x%x err=0x%x" |
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 39c8514442eb..ddf19425245d 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <linux/miscdevice.h> | 57 | #include <linux/miscdevice.h> |
58 | #include <linux/freezer.h> | 58 | #include <linux/freezer.h> |
59 | #include <linux/mutex.h> | 59 | #include <linux/mutex.h> |
60 | #include <linux/slab.h> | ||
60 | #include <scsi/scsi_cmnd.h> | 61 | #include <scsi/scsi_cmnd.h> |
61 | #include <scsi/scsi_ioctl.h> | 62 | #include <scsi/scsi_ioctl.h> |
62 | #include <scsi/scsi.h> | 63 | #include <scsi/scsi.h> |
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c index bc95469d33c1..3b419e3fffa1 100644 --- a/drivers/block/ps3disk.c +++ b/drivers/block/ps3disk.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/ata.h> | 21 | #include <linux/ata.h> |
22 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <asm/lv1call.h> | 25 | #include <asm/lv1call.h> |
25 | #include <asm/ps3stor.h> | 26 | #include <asm/ps3stor.h> |
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index e44608229972..b3bdb8af89cf 100644 --- a/drivers/block/ps3vram.c +++ b/drivers/block/ps3vram.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
14 | #include <linux/seq_file.h> | 14 | #include <linux/seq_file.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include <asm/cell-regs.h> | 17 | #include <asm/cell-regs.h> |
17 | #include <asm/firmware.h> | 18 | #include <asm/firmware.h> |
diff --git a/drivers/block/swim.c b/drivers/block/swim.c index 821c2833f9cf..e463657569ff 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/fd.h> | 20 | #include <linux/fd.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
22 | #include <linux/hdreg.h> | 23 | #include <linux/hdreg.h> |
23 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
diff --git a/drivers/block/ub.c b/drivers/block/ub.c index 2e889838e819..0536b5b29adc 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/blkdev.h> | 27 | #include <linux/blkdev.h> |
28 | #include <linux/timer.h> | 28 | #include <linux/timer.h> |
29 | #include <linux/scatterlist.h> | 29 | #include <linux/scatterlist.h> |
30 | #include <linux/slab.h> | ||
30 | #include <scsi/scsi.h> | 31 | #include <scsi/scsi.h> |
31 | 32 | ||
32 | #define DRV_NAME "ub" | 33 | #define DRV_NAME "ub" |
diff --git a/drivers/block/umem.c b/drivers/block/umem.c index ad1ba393801a..2f9470ff8f7c 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c | |||
@@ -40,13 +40,13 @@ | |||
40 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
41 | #include <linux/mm.h> | 41 | #include <linux/mm.h> |
42 | #include <linux/mman.h> | 42 | #include <linux/mman.h> |
43 | #include <linux/gfp.h> | ||
43 | #include <linux/ioctl.h> | 44 | #include <linux/ioctl.h> |
44 | #include <linux/module.h> | 45 | #include <linux/module.h> |
45 | #include <linux/init.h> | 46 | #include <linux/init.h> |
46 | #include <linux/interrupt.h> | 47 | #include <linux/interrupt.h> |
47 | #include <linux/timer.h> | 48 | #include <linux/timer.h> |
48 | #include <linux/pci.h> | 49 | #include <linux/pci.h> |
49 | #include <linux/slab.h> | ||
50 | #include <linux/dma-mapping.h> | 50 | #include <linux/dma-mapping.h> |
51 | 51 | ||
52 | #include <linux/fcntl.h> /* O_ACCMODE */ | 52 | #include <linux/fcntl.h> /* O_ACCMODE */ |
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 3c64af05fa82..2138a7ae050c 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -1,5 +1,6 @@ | |||
1 | //#define DEBUG | 1 | //#define DEBUG |
2 | #include <linux/spinlock.h> | 2 | #include <linux/spinlock.h> |
3 | #include <linux/slab.h> | ||
3 | #include <linux/blkdev.h> | 4 | #include <linux/blkdev.h> |
4 | #include <linux/hdreg.h> | 5 | #include <linux/hdreg.h> |
5 | #include <linux/virtio.h> | 6 | #include <linux/virtio.h> |
@@ -347,14 +348,13 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) | |||
347 | set_capacity(vblk->disk, cap); | 348 | set_capacity(vblk->disk, cap); |
348 | 349 | ||
349 | /* We can handle whatever the host told us to handle. */ | 350 | /* We can handle whatever the host told us to handle. */ |
350 | blk_queue_max_phys_segments(q, vblk->sg_elems-2); | 351 | blk_queue_max_segments(q, vblk->sg_elems-2); |
351 | blk_queue_max_hw_segments(q, vblk->sg_elems-2); | ||
352 | 352 | ||
353 | /* No need to bounce any requests */ | 353 | /* No need to bounce any requests */ |
354 | blk_queue_bounce_limit(q, BLK_BOUNCE_ANY); | 354 | blk_queue_bounce_limit(q, BLK_BOUNCE_ANY); |
355 | 355 | ||
356 | /* No real sector limit. */ | 356 | /* No real sector limit. */ |
357 | blk_queue_max_sectors(q, -1U); | 357 | blk_queue_max_hw_sectors(q, -1U); |
358 | 358 | ||
359 | /* Host can optionally specify maximum segment size and number of | 359 | /* Host can optionally specify maximum segment size and number of |
360 | * segments. */ | 360 | * segments. */ |
diff --git a/drivers/block/xd.c b/drivers/block/xd.c index 1a325fb05c92..18a80ff57ce8 100644 --- a/drivers/block/xd.c +++ b/drivers/block/xd.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/blkpg.h> | 49 | #include <linux/blkpg.h> |
50 | #include <linux/delay.h> | 50 | #include <linux/delay.h> |
51 | #include <linux/io.h> | 51 | #include <linux/io.h> |
52 | #include <linux/gfp.h> | ||
52 | 53 | ||
53 | #include <asm/system.h> | 54 | #include <asm/system.h> |
54 | #include <asm/uaccess.h> | 55 | #include <asm/uaccess.h> |
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 9c09694b2520..82ed403147c0 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/hdreg.h> | 40 | #include <linux/hdreg.h> |
41 | #include <linux/cdrom.h> | 41 | #include <linux/cdrom.h> |
42 | #include <linux/module.h> | 42 | #include <linux/module.h> |
43 | #include <linux/slab.h> | ||
43 | #include <linux/scatterlist.h> | 44 | #include <linux/scatterlist.h> |
44 | 45 | ||
45 | #include <xen/xen.h> | 46 | #include <xen/xen.h> |
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c index 64f941e0f14b..9114654b54d9 100644 --- a/drivers/block/z2ram.c +++ b/drivers/block/z2ram.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/blkdev.h> | 34 | #include <linux/blkdev.h> |
35 | #include <linux/bitops.h> | 35 | #include <linux/bitops.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <asm/setup.h> | 38 | #include <asm/setup.h> |
38 | #include <asm/amigahw.h> | 39 | #include <asm/amigahw.h> |
diff --git a/drivers/bluetooth/btmrvl_debugfs.c b/drivers/bluetooth/btmrvl_debugfs.c index 3126a3d0c45c..b50b41d97a7f 100644 --- a/drivers/bluetooth/btmrvl_debugfs.c +++ b/drivers/bluetooth/btmrvl_debugfs.c | |||
@@ -19,6 +19,7 @@ | |||
19 | **/ | 19 | **/ |
20 | 20 | ||
21 | #include <linux/debugfs.h> | 21 | #include <linux/debugfs.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <net/bluetooth/bluetooth.h> | 24 | #include <net/bluetooth/bluetooth.h> |
24 | #include <net/bluetooth/hci_core.h> | 25 | #include <net/bluetooth/hci_core.h> |
diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h index 523d197b9824..204727586ee9 100644 --- a/drivers/bluetooth/btmrvl_drv.h +++ b/drivers/bluetooth/btmrvl_drv.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/kthread.h> | 22 | #include <linux/kthread.h> |
23 | #include <linux/bitops.h> | 23 | #include <linux/bitops.h> |
24 | #include <linux/slab.h> | ||
24 | #include <net/bluetooth/bluetooth.h> | 25 | #include <net/bluetooth/bluetooth.h> |
25 | 26 | ||
26 | #define BTM_HEADER_LEN 4 | 27 | #define BTM_HEADER_LEN 4 |
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index 94f1f55f81f0..0dba76aa2232 100644 --- a/drivers/bluetooth/btmrvl_sdio.c +++ b/drivers/bluetooth/btmrvl_sdio.c | |||
@@ -19,6 +19,7 @@ | |||
19 | **/ | 19 | **/ |
20 | 20 | ||
21 | #include <linux/firmware.h> | 21 | #include <linux/firmware.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <linux/mmc/sdio_ids.h> | 24 | #include <linux/mmc/sdio_ids.h> |
24 | #include <linux/mmc/sdio_func.h> | 25 | #include <linux/mmc/sdio_func.h> |
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index 73dbf40c874d..a7637d72cef6 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c | |||
@@ -6,9 +6,9 @@ | |||
6 | #include <linux/pci.h> | 6 | #include <linux/pci.h> |
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/agp_backend.h> | 8 | #include <linux/agp_backend.h> |
9 | #include <linux/gfp.h> | ||
10 | #include <linux/page-flags.h> | 9 | #include <linux/page-flags.h> |
11 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/slab.h> | ||
12 | #include "agp.h" | 12 | #include "agp.h" |
13 | 13 | ||
14 | #define AMD_MMBASE 0x14 | 14 | #define AMD_MMBASE 0x14 |
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c index c3ab46da51a3..ee4f855611b6 100644 --- a/drivers/char/agp/backend.c +++ b/drivers/char/agp/backend.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/pagemap.h> | 34 | #include <linux/pagemap.h> |
34 | #include <linux/miscdevice.h> | 35 | #include <linux/miscdevice.h> |
35 | #include <linux/pm.h> | 36 | #include <linux/pm.h> |
diff --git a/drivers/char/agp/compat_ioctl.c b/drivers/char/agp/compat_ioctl.c index 58c57cb2518c..9d2c97a69cdd 100644 --- a/drivers/char/agp/compat_ioctl.c +++ b/drivers/char/agp/compat_ioctl.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
31 | #include <linux/fs.h> | 31 | #include <linux/fs.h> |
32 | #include <linux/agpgart.h> | 32 | #include <linux/agpgart.h> |
33 | #include <linux/slab.h> | ||
33 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
34 | #include "agp.h" | 35 | #include "agp.h" |
35 | #include "compat_ioctl.h" | 36 | #include "compat_ioctl.h" |
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index c50543966eb2..fb86708e47ed 100644 --- a/drivers/char/agp/generic.c +++ b/drivers/char/agp/generic.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/dma-mapping.h> | 38 | #include <linux/dma-mapping.h> |
39 | #include <linux/mm.h> | 39 | #include <linux/mm.h> |
40 | #include <linux/sched.h> | 40 | #include <linux/sched.h> |
41 | #include <linux/slab.h> | ||
41 | #include <asm/io.h> | 42 | #include <asm/io.h> |
42 | #include <asm/cacheflush.h> | 43 | #include <asm/cacheflush.h> |
43 | #include <asm/pgtable.h> | 44 | #include <asm/pgtable.h> |
diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c index 58752b70efea..056b289a1e89 100644 --- a/drivers/char/agp/hp-agp.c +++ b/drivers/char/agp/hp-agp.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/agp_backend.h> | 16 | #include <linux/agp_backend.h> |
17 | #include <linux/log2.h> | 17 | #include <linux/log2.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include <asm/acpi-ext.h> | 20 | #include <asm/acpi-ext.h> |
20 | 21 | ||
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index a3e10dc7cc25..d41331bc2aa7 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/pci.h> | 6 | #include <linux/pci.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/init.h> | 8 | #include <linux/init.h> |
8 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
9 | #include <linux/pagemap.h> | 10 | #include <linux/pagemap.h> |
@@ -97,6 +98,9 @@ EXPORT_SYMBOL(intel_agp_enabled); | |||
97 | #define IS_PINEVIEW (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_M_HB || \ | 98 | #define IS_PINEVIEW (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_M_HB || \ |
98 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_HB) | 99 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_HB) |
99 | 100 | ||
101 | #define IS_SNB (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB || \ | ||
102 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB) | ||
103 | |||
100 | #define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_EAGLELAKE_HB || \ | 104 | #define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_EAGLELAKE_HB || \ |
101 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \ | 105 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \ |
102 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB || \ | 106 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB || \ |
@@ -107,8 +111,7 @@ EXPORT_SYMBOL(intel_agp_enabled); | |||
107 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB || \ | 111 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB || \ |
108 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB || \ | 112 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB || \ |
109 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB || \ | 113 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB || \ |
110 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB || \ | 114 | IS_SNB) |
111 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB) | ||
112 | 115 | ||
113 | extern int agp_memory_reserved; | 116 | extern int agp_memory_reserved; |
114 | 117 | ||
@@ -175,6 +178,10 @@ extern int agp_memory_reserved; | |||
175 | #define SNB_GMCH_GMS_STOLEN_448M (0xe << 3) | 178 | #define SNB_GMCH_GMS_STOLEN_448M (0xe << 3) |
176 | #define SNB_GMCH_GMS_STOLEN_480M (0xf << 3) | 179 | #define SNB_GMCH_GMS_STOLEN_480M (0xf << 3) |
177 | #define SNB_GMCH_GMS_STOLEN_512M (0x10 << 3) | 180 | #define SNB_GMCH_GMS_STOLEN_512M (0x10 << 3) |
181 | #define SNB_GTT_SIZE_0M (0 << 8) | ||
182 | #define SNB_GTT_SIZE_1M (1 << 8) | ||
183 | #define SNB_GTT_SIZE_2M (2 << 8) | ||
184 | #define SNB_GTT_SIZE_MASK (3 << 8) | ||
178 | 185 | ||
179 | static const struct aper_size_info_fixed intel_i810_sizes[] = | 186 | static const struct aper_size_info_fixed intel_i810_sizes[] = |
180 | { | 187 | { |
@@ -1200,6 +1207,9 @@ static void intel_i9xx_setup_flush(void) | |||
1200 | if (intel_private.ifp_resource.start) | 1207 | if (intel_private.ifp_resource.start) |
1201 | return; | 1208 | return; |
1202 | 1209 | ||
1210 | if (IS_SNB) | ||
1211 | return; | ||
1212 | |||
1203 | /* setup a resource for this object */ | 1213 | /* setup a resource for this object */ |
1204 | intel_private.ifp_resource.name = "Intel Flush Page"; | 1214 | intel_private.ifp_resource.name = "Intel Flush Page"; |
1205 | intel_private.ifp_resource.flags = IORESOURCE_MEM; | 1215 | intel_private.ifp_resource.flags = IORESOURCE_MEM; |
@@ -1438,6 +1448,8 @@ static unsigned long intel_i965_mask_memory(struct agp_bridge_data *bridge, | |||
1438 | 1448 | ||
1439 | static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size) | 1449 | static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size) |
1440 | { | 1450 | { |
1451 | u16 snb_gmch_ctl; | ||
1452 | |||
1441 | switch (agp_bridge->dev->device) { | 1453 | switch (agp_bridge->dev->device) { |
1442 | case PCI_DEVICE_ID_INTEL_GM45_HB: | 1454 | case PCI_DEVICE_ID_INTEL_GM45_HB: |
1443 | case PCI_DEVICE_ID_INTEL_EAGLELAKE_HB: | 1455 | case PCI_DEVICE_ID_INTEL_EAGLELAKE_HB: |
@@ -1449,9 +1461,26 @@ static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size) | |||
1449 | case PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB: | 1461 | case PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB: |
1450 | case PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB: | 1462 | case PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB: |
1451 | case PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB: | 1463 | case PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB: |
1464 | *gtt_offset = *gtt_size = MB(2); | ||
1465 | break; | ||
1452 | case PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB: | 1466 | case PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB: |
1453 | case PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB: | 1467 | case PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB: |
1454 | *gtt_offset = *gtt_size = MB(2); | 1468 | *gtt_offset = MB(2); |
1469 | |||
1470 | pci_read_config_word(intel_private.pcidev, SNB_GMCH_CTRL, &snb_gmch_ctl); | ||
1471 | switch (snb_gmch_ctl & SNB_GTT_SIZE_MASK) { | ||
1472 | default: | ||
1473 | case SNB_GTT_SIZE_0M: | ||
1474 | printk(KERN_ERR "Bad GTT size mask: 0x%04x.\n", snb_gmch_ctl); | ||
1475 | *gtt_size = MB(0); | ||
1476 | break; | ||
1477 | case SNB_GTT_SIZE_1M: | ||
1478 | *gtt_size = MB(1); | ||
1479 | break; | ||
1480 | case SNB_GTT_SIZE_2M: | ||
1481 | *gtt_size = MB(2); | ||
1482 | break; | ||
1483 | } | ||
1455 | break; | 1484 | break; |
1456 | default: | 1485 | default: |
1457 | *gtt_offset = *gtt_size = KB(512); | 1486 | *gtt_offset = *gtt_size = KB(512); |
diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c index 7e36d2b4f9d4..10f24e349a26 100644 --- a/drivers/char/agp/nvidia-agp.c +++ b/drivers/char/agp/nvidia-agp.c | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <linux/pci.h> | 8 | #include <linux/pci.h> |
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/agp_backend.h> | 10 | #include <linux/agp_backend.h> |
11 | #include <linux/gfp.h> | ||
12 | #include <linux/page-flags.h> | 11 | #include <linux/page-flags.h> |
13 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
14 | #include <linux/jiffies.h> | 13 | #include <linux/jiffies.h> |
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index 0d426ae39c85..ffa888cd1c88 100644 --- a/drivers/char/agp/sgi-agp.c +++ b/drivers/char/agp/sgi-agp.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/acpi.h> | 14 | #include <linux/acpi.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/pci.h> | 16 | #include <linux/pci.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/agp_backend.h> | 19 | #include <linux/agp_backend.h> |
19 | #include <asm/sn/addrs.h> | 20 | #include <asm/sn/addrs.h> |
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c index d89da4ac061f..6f48931ac1ce 100644 --- a/drivers/char/agp/uninorth-agp.c +++ b/drivers/char/agp/uninorth-agp.c | |||
@@ -3,6 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | #include <linux/module.h> | 4 | #include <linux/module.h> |
5 | #include <linux/pci.h> | 5 | #include <linux/pci.h> |
6 | #include <linux/slab.h> | ||
6 | #include <linux/init.h> | 7 | #include <linux/init.h> |
7 | #include <linux/pagemap.h> | 8 | #include <linux/pagemap.h> |
8 | #include <linux/agp_backend.h> | 9 | #include <linux/agp_backend.h> |
diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c index 6c32fbf07164..56b27671adc4 100644 --- a/drivers/char/amiserial.c +++ b/drivers/char/amiserial.c | |||
@@ -2021,8 +2021,6 @@ static int __init rs_init(void) | |||
2021 | state->baud_base = amiga_colorclock; | 2021 | state->baud_base = amiga_colorclock; |
2022 | state->xmit_fifo_size = 1; | 2022 | state->xmit_fifo_size = 1; |
2023 | 2023 | ||
2024 | local_irq_save(flags); | ||
2025 | |||
2026 | /* set ISRs, and then disable the rx interrupts */ | 2024 | /* set ISRs, and then disable the rx interrupts */ |
2027 | error = request_irq(IRQ_AMIGA_TBE, ser_tx_int, 0, "serial TX", state); | 2025 | error = request_irq(IRQ_AMIGA_TBE, ser_tx_int, 0, "serial TX", state); |
2028 | if (error) | 2026 | if (error) |
@@ -2033,6 +2031,8 @@ static int __init rs_init(void) | |||
2033 | if (error) | 2031 | if (error) |
2034 | goto fail_free_irq; | 2032 | goto fail_free_irq; |
2035 | 2033 | ||
2034 | local_irq_save(flags); | ||
2035 | |||
2036 | /* turn off Rx and Tx interrupts */ | 2036 | /* turn off Rx and Tx interrupts */ |
2037 | custom.intena = IF_RBF | IF_TBE; | 2037 | custom.intena = IF_RBF | IF_TBE; |
2038 | mb(); | 2038 | mb(); |
diff --git a/drivers/char/bfin_jtag_comm.c b/drivers/char/bfin_jtag_comm.c index 2628c7415ea8..e397df3ad98e 100644 --- a/drivers/char/bfin_jtag_comm.c +++ b/drivers/char/bfin_jtag_comm.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/tty.h> | 25 | #include <linux/tty.h> |
25 | #include <linux/tty_driver.h> | 26 | #include <linux/tty_driver.h> |
26 | #include <linux/tty_flip.h> | 27 | #include <linux/tty_flip.h> |
diff --git a/drivers/char/briq_panel.c b/drivers/char/briq_panel.c index d8cff909001c..555cd93c2ee5 100644 --- a/drivers/char/briq_panel.c +++ b/drivers/char/briq_panel.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/wait.h> | 15 | #include <linux/wait.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/ioport.h> | 17 | #include <linux/ioport.h> |
19 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
20 | #include <linux/miscdevice.h> | 19 | #include <linux/miscdevice.h> |
diff --git a/drivers/char/bsr.c b/drivers/char/bsr.c index c02db01f736e..7fef305774de 100644 --- a/drivers/char/bsr.c +++ b/drivers/char/bsr.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/cdev.h> | 27 | #include <linux/cdev.h> |
28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
29 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
30 | #include <linux/slab.h> | ||
30 | #include <asm/pgtable.h> | 31 | #include <asm/pgtable.h> |
31 | #include <asm/io.h> | 32 | #include <asm/io.h> |
32 | 33 | ||
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index b861c08263a4..9824b4162904 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c | |||
@@ -79,6 +79,7 @@ | |||
79 | #include <linux/bitops.h> | 79 | #include <linux/bitops.h> |
80 | #include <linux/firmware.h> | 80 | #include <linux/firmware.h> |
81 | #include <linux/device.h> | 81 | #include <linux/device.h> |
82 | #include <linux/slab.h> | ||
82 | 83 | ||
83 | #include <linux/io.h> | 84 | #include <linux/io.h> |
84 | #include <linux/uaccess.h> | 85 | #include <linux/uaccess.h> |
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c index 85832ab924e6..8a1b28a10ef0 100644 --- a/drivers/char/dsp56k.c +++ b/drivers/char/dsp56k.c | |||
@@ -24,7 +24,6 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/slab.h> /* for kmalloc() and kfree() */ | ||
28 | #include <linux/major.h> | 27 | #include <linux/major.h> |
29 | #include <linux/types.h> | 28 | #include <linux/types.h> |
30 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
diff --git a/drivers/char/epca.c b/drivers/char/epca.c index 17b044a71e02..6f5ffe1320f7 100644 --- a/drivers/char/epca.c +++ b/drivers/char/epca.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/ctype.h> | 36 | #include <linux/ctype.h> |
37 | #include <linux/tty.h> | 37 | #include <linux/tty.h> |
38 | #include <linux/tty_flip.h> | 38 | #include <linux/tty_flip.h> |
39 | #include <linux/slab.h> | ||
40 | #include <linux/smp_lock.h> | 39 | #include <linux/smp_lock.h> |
41 | #include <linux/ioport.h> | 40 | #include <linux/ioport.h> |
42 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
diff --git a/drivers/char/generic_serial.c b/drivers/char/generic_serial.c index d400cbd280f2..5954ee1dc953 100644 --- a/drivers/char/generic_serial.c +++ b/drivers/char/generic_serial.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
30 | #include <linux/tty_flip.h> | 30 | #include <linux/tty_flip.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/gfp.h> | ||
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
33 | 34 | ||
34 | #define DEBUG | 35 | #define DEBUG |
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 9c5eea3ea4de..9ded667625ac 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/seq_file.h> | 31 | #include <linux/seq_file.h> |
32 | #include <linux/bitops.h> | 32 | #include <linux/bitops.h> |
33 | #include <linux/clocksource.h> | 33 | #include <linux/clocksource.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include <asm/current.h> | 36 | #include <asm/current.h> |
36 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index ba55bba151b9..35cca4c7fb18 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/spinlock.h> | 38 | #include <linux/spinlock.h> |
39 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
40 | #include <linux/freezer.h> | 40 | #include <linux/freezer.h> |
41 | #include <linux/slab.h> | ||
41 | 42 | ||
42 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
43 | 44 | ||
@@ -367,16 +368,12 @@ static void hvc_close(struct tty_struct *tty, struct file * filp) | |||
367 | hp = tty->driver_data; | 368 | hp = tty->driver_data; |
368 | 369 | ||
369 | spin_lock_irqsave(&hp->lock, flags); | 370 | spin_lock_irqsave(&hp->lock, flags); |
370 | tty_kref_get(tty); | ||
371 | 371 | ||
372 | if (--hp->count == 0) { | 372 | if (--hp->count == 0) { |
373 | /* We are done with the tty pointer now. */ | 373 | /* We are done with the tty pointer now. */ |
374 | hp->tty = NULL; | 374 | hp->tty = NULL; |
375 | spin_unlock_irqrestore(&hp->lock, flags); | 375 | spin_unlock_irqrestore(&hp->lock, flags); |
376 | 376 | ||
377 | /* Put the ref obtained in hvc_open() */ | ||
378 | tty_kref_put(tty); | ||
379 | |||
380 | if (hp->ops->notifier_del) | 377 | if (hp->ops->notifier_del) |
381 | hp->ops->notifier_del(hp, hp->data); | 378 | hp->ops->notifier_del(hp, hp->data); |
382 | 379 | ||
diff --git a/drivers/char/hvc_iucv.c b/drivers/char/hvc_iucv.c index 37b0542a4eeb..5a80ad68ef22 100644 --- a/drivers/char/hvc_iucv.c +++ b/drivers/char/hvc_iucv.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/slab.h> | ||
15 | #include <asm/ebcdic.h> | 16 | #include <asm/ebcdic.h> |
16 | #include <linux/ctype.h> | 17 | #include <linux/ctype.h> |
17 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c index 266b858b8f85..bedc6c1b6fa5 100644 --- a/drivers/char/hvcs.c +++ b/drivers/char/hvcs.c | |||
@@ -74,6 +74,7 @@ | |||
74 | #include <linux/module.h> | 74 | #include <linux/module.h> |
75 | #include <linux/moduleparam.h> | 75 | #include <linux/moduleparam.h> |
76 | #include <linux/sched.h> | 76 | #include <linux/sched.h> |
77 | #include <linux/slab.h> | ||
77 | #include <linux/spinlock.h> | 78 | #include <linux/spinlock.h> |
78 | #include <linux/stat.h> | 79 | #include <linux/stat.h> |
79 | #include <linux/tty.h> | 80 | #include <linux/tty.h> |
diff --git a/drivers/char/hw_random/intel-rng.c b/drivers/char/hw_random/intel-rng.c index 91b53eb1c053..86fe45c19968 100644 --- a/drivers/char/hw_random/intel-rng.c +++ b/drivers/char/hw_random/intel-rng.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
31 | #include <linux/stop_machine.h> | 31 | #include <linux/stop_machine.h> |
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <linux/slab.h> | ||
33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
34 | 35 | ||
35 | 36 | ||
diff --git a/drivers/char/hw_random/octeon-rng.c b/drivers/char/hw_random/octeon-rng.c index 54b0d9ba65cf..9cd0feca318c 100644 --- a/drivers/char/hw_random/octeon-rng.c +++ b/drivers/char/hw_random/octeon-rng.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/hw_random.h> | 16 | #include <linux/hw_random.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/gfp.h> | ||
18 | 19 | ||
19 | #include <asm/octeon/octeon.h> | 20 | #include <asm/octeon/octeon.h> |
20 | #include <asm/octeon/cvmx-rnm-defs.h> | 21 | #include <asm/octeon/cvmx-rnm-defs.h> |
diff --git a/drivers/char/hw_random/tx4939-rng.c b/drivers/char/hw_random/tx4939-rng.c index 544d9085a8e8..0bc0cb70210b 100644 --- a/drivers/char/hw_random/tx4939-rng.c +++ b/drivers/char/hw_random/tx4939-rng.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/hw_random.h> | 16 | #include <linux/hw_random.h> |
17 | #include <linux/gfp.h> | ||
17 | 18 | ||
18 | #define TX4939_RNG_RCSR 0x00000000 | 19 | #define TX4939_RNG_RCSR 0x00000000 |
19 | #define TX4939_RNG_ROR(n) (0x00000018 + (n) * 8) | 20 | #define TX4939_RNG_ROR(n) (0x00000018 + (n) * 8) |
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index be2e8f9a27c3..0fa2e4a0835d 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c | |||
@@ -130,6 +130,7 @@ | |||
130 | #include <linux/timer.h> | 130 | #include <linux/timer.h> |
131 | #include <linux/delay.h> | 131 | #include <linux/delay.h> |
132 | #include <linux/ioport.h> | 132 | #include <linux/ioport.h> |
133 | #include <linux/slab.h> | ||
133 | 134 | ||
134 | #include <linux/uaccess.h> | 135 | #include <linux/uaccess.h> |
135 | #include <linux/io.h> | 136 | #include <linux/io.h> |
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c index 87c67b42bc08..83bef4efe376 100644 --- a/drivers/char/mbcs.c +++ b/drivers/char/mbcs.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/uio.h> | 26 | #include <linux/uio.h> |
27 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
28 | #include <linux/smp_lock.h> | 28 | #include <linux/smp_lock.h> |
29 | #include <linux/slab.h> | ||
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
30 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
31 | #include <asm/system.h> | 32 | #include <asm/system.h> |
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 1f3215ac085b..f54dab8acdcd 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
@@ -225,6 +225,7 @@ int __weak phys_mem_access_prot_allowed(struct file *file, | |||
225 | * outside of main memory. | 225 | * outside of main memory. |
226 | * | 226 | * |
227 | */ | 227 | */ |
228 | #ifdef pgprot_noncached | ||
228 | static int uncached_access(struct file *file, unsigned long addr) | 229 | static int uncached_access(struct file *file, unsigned long addr) |
229 | { | 230 | { |
230 | #if defined(CONFIG_IA64) | 231 | #if defined(CONFIG_IA64) |
@@ -251,6 +252,7 @@ static int uncached_access(struct file *file, unsigned long addr) | |||
251 | return addr >= __pa(high_memory); | 252 | return addr >= __pa(high_memory); |
252 | #endif | 253 | #endif |
253 | } | 254 | } |
255 | #endif | ||
254 | 256 | ||
255 | static pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | 257 | static pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, |
256 | unsigned long size, pgprot_t vma_prot) | 258 | unsigned long size, pgprot_t vma_prot) |
@@ -710,11 +712,6 @@ static loff_t memory_lseek(struct file *file, loff_t offset, int orig) | |||
710 | switch (orig) { | 712 | switch (orig) { |
711 | case SEEK_CUR: | 713 | case SEEK_CUR: |
712 | offset += file->f_pos; | 714 | offset += file->f_pos; |
713 | if ((unsigned long long)offset < | ||
714 | (unsigned long long)file->f_pos) { | ||
715 | ret = -EOVERFLOW; | ||
716 | break; | ||
717 | } | ||
718 | case SEEK_SET: | 715 | case SEEK_SET: |
719 | /* to avoid userland mistaking f_pos=-9 as -EBADF=-9 */ | 716 | /* to avoid userland mistaking f_pos=-9 as -EBADF=-9 */ |
720 | if ((unsigned long long)offset >= ~0xFFFULL) { | 717 | if ((unsigned long long)offset >= ~0xFFFULL) { |
@@ -908,6 +905,9 @@ static int __init chr_dev_init(void) | |||
908 | printk("unable to get major %d for memory devs\n", MEM_MAJOR); | 905 | printk("unable to get major %d for memory devs\n", MEM_MAJOR); |
909 | 906 | ||
910 | mem_class = class_create(THIS_MODULE, "mem"); | 907 | mem_class = class_create(THIS_MODULE, "mem"); |
908 | if (IS_ERR(mem_class)) | ||
909 | return PTR_ERR(mem_class); | ||
910 | |||
911 | mem_class->devnode = mem_devnode; | 911 | mem_class->devnode = mem_devnode; |
912 | for (minor = 1; minor < ARRAY_SIZE(devlist); minor++) { | 912 | for (minor = 1; minor < ARRAY_SIZE(devlist); minor++) { |
913 | if (!devlist[minor].name) | 913 | if (!devlist[minor].name) |
diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 94a136e96c06..92ab03d28294 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <linux/miscdevice.h> | 40 | #include <linux/miscdevice.h> |
41 | #include <linux/kernel.h> | 41 | #include <linux/kernel.h> |
42 | #include <linux/major.h> | 42 | #include <linux/major.h> |
43 | #include <linux/slab.h> | ||
44 | #include <linux/mutex.h> | 43 | #include <linux/mutex.h> |
45 | #include <linux/proc_fs.h> | 44 | #include <linux/proc_fs.h> |
46 | #include <linux/seq_file.h> | 45 | #include <linux/seq_file.h> |
@@ -49,6 +48,7 @@ | |||
49 | #include <linux/device.h> | 48 | #include <linux/device.h> |
50 | #include <linux/tty.h> | 49 | #include <linux/tty.h> |
51 | #include <linux/kmod.h> | 50 | #include <linux/kmod.h> |
51 | #include <linux/gfp.h> | ||
52 | 52 | ||
53 | /* | 53 | /* |
54 | * Head entry for the doubly linked miscdevice list | 54 | * Head entry for the doubly linked miscdevice list |
diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c index 04fd0d843b3b..ea7c99fa978f 100644 --- a/drivers/char/mmtimer.c +++ b/drivers/char/mmtimer.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/time.h> | 33 | #include <linux/time.h> |
34 | #include <linux/math64.h> | 34 | #include <linux/math64.h> |
35 | #include <linux/smp_lock.h> | 35 | #include <linux/smp_lock.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <asm/uaccess.h> | 38 | #include <asm/uaccess.h> |
38 | #include <asm/sn/addrs.h> | 39 | #include <asm/sn/addrs.h> |
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index 166495d6a1d7..107b0bd58d19 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/pci.h> | 43 | #include <linux/pci.h> |
44 | #include <linux/init.h> | 44 | #include <linux/init.h> |
45 | #include <linux/bitops.h> | 45 | #include <linux/bitops.h> |
46 | #include <linux/slab.h> | ||
46 | 47 | ||
47 | #include <asm/system.h> | 48 | #include <asm/system.h> |
48 | #include <asm/io.h> | 49 | #include <asm/io.h> |
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index e0c5d2a69046..47023053ee85 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -33,12 +33,12 @@ | |||
33 | #include <linux/string.h> | 33 | #include <linux/string.h> |
34 | #include <linux/fcntl.h> | 34 | #include <linux/fcntl.h> |
35 | #include <linux/ptrace.h> | 35 | #include <linux/ptrace.h> |
36 | #include <linux/gfp.h> | ||
37 | #include <linux/ioport.h> | 36 | #include <linux/ioport.h> |
38 | #include <linux/mm.h> | 37 | #include <linux/mm.h> |
39 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
40 | #include <linux/pci.h> | 39 | #include <linux/pci.h> |
41 | #include <linux/bitops.h> | 40 | #include <linux/bitops.h> |
41 | #include <linux/slab.h> | ||
42 | 42 | ||
43 | #include <asm/system.h> | 43 | #include <asm/system.h> |
44 | #include <asm/io.h> | 44 | #include <asm/io.h> |
@@ -1768,7 +1768,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, | |||
1768 | int len, lsr; | 1768 | int len, lsr; |
1769 | 1769 | ||
1770 | len = mxser_chars_in_buffer(tty); | 1770 | len = mxser_chars_in_buffer(tty); |
1771 | spin_lock(&info->slock); | 1771 | spin_lock_irq(&info->slock); |
1772 | lsr = inb(info->ioaddr + UART_LSR) & UART_LSR_THRE; | 1772 | lsr = inb(info->ioaddr + UART_LSR) & UART_LSR_THRE; |
1773 | spin_unlock_irq(&info->slock); | 1773 | spin_unlock_irq(&info->slock); |
1774 | len += (lsr ? 0 : 1); | 1774 | len += (lsr ? 0 : 1); |
@@ -1778,12 +1778,12 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file, | |||
1778 | case MOXA_ASPP_MON: { | 1778 | case MOXA_ASPP_MON: { |
1779 | int mcr, status; | 1779 | int mcr, status; |
1780 | 1780 | ||
1781 | spin_lock(&info->slock); | 1781 | spin_lock_irq(&info->slock); |
1782 | status = mxser_get_msr(info->ioaddr, 1, tty->index); | 1782 | status = mxser_get_msr(info->ioaddr, 1, tty->index); |
1783 | mxser_check_modem_status(tty, info, status); | 1783 | mxser_check_modem_status(tty, info, status); |
1784 | 1784 | ||
1785 | mcr = inb(info->ioaddr + UART_MCR); | 1785 | mcr = inb(info->ioaddr + UART_MCR); |
1786 | spin_unlock(&info->slock); | 1786 | spin_unlock_irq(&info->slock); |
1787 | 1787 | ||
1788 | if (mcr & MOXA_MUST_MCR_XON_FLAG) | 1788 | if (mcr & MOXA_MUST_MCR_XON_FLAG) |
1789 | info->mon_data.hold_reason &= ~NPPI_NOTIFY_XOFFHOLD; | 1789 | info->mon_data.hold_reason &= ~NPPI_NOTIFY_XOFFHOLD; |
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c index a3f32a15fde4..a6638003f530 100644 --- a/drivers/char/nozomi.c +++ b/drivers/char/nozomi.c | |||
@@ -55,6 +55,7 @@ | |||
55 | #include <linux/init.h> | 55 | #include <linux/init.h> |
56 | #include <linux/kfifo.h> | 56 | #include <linux/kfifo.h> |
57 | #include <linux/uaccess.h> | 57 | #include <linux/uaccess.h> |
58 | #include <linux/slab.h> | ||
58 | #include <asm/byteorder.h> | 59 | #include <asm/byteorder.h> |
59 | 60 | ||
60 | #include <linux/delay.h> | 61 | #include <linux/delay.h> |
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index 5eb83c3ca20d..47e8f7b0e4c1 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c | |||
@@ -100,7 +100,6 @@ | |||
100 | #include <linux/types.h> | 100 | #include <linux/types.h> |
101 | #include <linux/errno.h> | 101 | #include <linux/errno.h> |
102 | #include <linux/miscdevice.h> | 102 | #include <linux/miscdevice.h> |
103 | #include <linux/slab.h> | ||
104 | #include <linux/ioport.h> | 103 | #include <linux/ioport.h> |
105 | #include <linux/fcntl.h> | 104 | #include <linux/fcntl.h> |
106 | #include <linux/mc146818rtc.h> | 105 | #include <linux/mc146818rtc.h> |
diff --git a/drivers/char/pcmcia/ipwireless/network.c b/drivers/char/pcmcia/ipwireless/network.c index 590762a7f217..65920163f53d 100644 --- a/drivers/char/pcmcia/ipwireless/network.c +++ b/drivers/char/pcmcia/ipwireless/network.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/netdevice.h> | 21 | #include <linux/netdevice.h> |
22 | #include <linux/ppp_channel.h> | 22 | #include <linux/ppp_channel.h> |
23 | #include <linux/ppp_defs.h> | 23 | #include <linux/ppp_defs.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/if_ppp.h> | 25 | #include <linux/if_ppp.h> |
25 | #include <linux/skbuff.h> | 26 | #include <linux/skbuff.h> |
26 | 27 | ||
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c index 432655bcb04c..fdd37543aa79 100644 --- a/drivers/char/ppdev.c +++ b/drivers/char/ppdev.c | |||
@@ -64,6 +64,7 @@ | |||
64 | #include <linux/parport.h> | 64 | #include <linux/parport.h> |
65 | #include <linux/ctype.h> | 65 | #include <linux/ctype.h> |
66 | #include <linux/poll.h> | 66 | #include <linux/poll.h> |
67 | #include <linux/slab.h> | ||
67 | #include <linux/major.h> | 68 | #include <linux/major.h> |
68 | #include <linux/ppdev.h> | 69 | #include <linux/ppdev.h> |
69 | #include <linux/smp_lock.h> | 70 | #include <linux/smp_lock.h> |
diff --git a/drivers/char/ps3flash.c b/drivers/char/ps3flash.c index f424d394a286..606048b72bcf 100644 --- a/drivers/char/ps3flash.c +++ b/drivers/char/ps3flash.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
22 | #include <linux/miscdevice.h> | 22 | #include <linux/miscdevice.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/uaccess.h> | 24 | #include <linux/uaccess.h> |
24 | 25 | ||
25 | #include <asm/lv1call.h> | 26 | #include <asm/lv1call.h> |
diff --git a/drivers/char/pty.c b/drivers/char/pty.c index 5ee424817263..d83a43130df4 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/uaccess.h> | 29 | #include <linux/uaccess.h> |
30 | #include <linux/bitops.h> | 30 | #include <linux/bitops.h> |
31 | #include <linux/devpts_fs.h> | 31 | #include <linux/devpts_fs.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <asm/system.h> | 34 | #include <asm/system.h> |
34 | 35 | ||
diff --git a/drivers/char/raw.c b/drivers/char/raw.c index 64acd05f71c8..8756ab0daa8b 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
22 | #include <linux/smp_lock.h> | 22 | #include <linux/smp_lock.h> |
23 | #include <linux/gfp.h> | ||
23 | 24 | ||
24 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
25 | 26 | ||
@@ -247,6 +248,7 @@ static const struct file_operations raw_fops = { | |||
247 | .aio_read = generic_file_aio_read, | 248 | .aio_read = generic_file_aio_read, |
248 | .write = do_sync_write, | 249 | .write = do_sync_write, |
249 | .aio_write = blkdev_aio_write, | 250 | .aio_write = blkdev_aio_write, |
251 | .fsync = blkdev_fsync, | ||
250 | .open = raw_open, | 252 | .open = raw_open, |
251 | .release= raw_release, | 253 | .release= raw_release, |
252 | .ioctl = raw_ioctl, | 254 | .ioctl = raw_ioctl, |
diff --git a/drivers/char/rio/rioinit.c b/drivers/char/rio/rioinit.c index be0ba401966e..24a282bb89d4 100644 --- a/drivers/char/rio/rioinit.c +++ b/drivers/char/rio/rioinit.c | |||
@@ -31,7 +31,6 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/slab.h> | ||
35 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
36 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
37 | #include <asm/io.h> | 36 | #include <asm/io.h> |
diff --git a/drivers/char/rio/riointr.c b/drivers/char/rio/riointr.c index 71f87600907c..2e71aecae206 100644 --- a/drivers/char/rio/riointr.c +++ b/drivers/char/rio/riointr.c | |||
@@ -31,7 +31,6 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/slab.h> | ||
35 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
36 | #include <linux/tty.h> | 35 | #include <linux/tty.h> |
37 | #include <linux/tty_flip.h> | 36 | #include <linux/tty_flip.h> |
diff --git a/drivers/char/rio/rioparam.c b/drivers/char/rio/rioparam.c index d687c17be152..6415f3f32a72 100644 --- a/drivers/char/rio/rioparam.c +++ b/drivers/char/rio/rioparam.c | |||
@@ -31,7 +31,6 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/slab.h> | ||
35 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
36 | #include <linux/tty.h> | 35 | #include <linux/tty.h> |
37 | #include <asm/io.h> | 36 | #include <asm/io.h> |
diff --git a/drivers/char/rio/rioroute.c b/drivers/char/rio/rioroute.c index 706c2a25f7aa..f9b936ac3394 100644 --- a/drivers/char/rio/rioroute.c +++ b/drivers/char/rio/rioroute.c | |||
@@ -31,7 +31,6 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/slab.h> | ||
35 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
36 | #include <asm/io.h> | 35 | #include <asm/io.h> |
37 | #include <asm/system.h> | 36 | #include <asm/system.h> |
diff --git a/drivers/char/rio/riotty.c b/drivers/char/rio/riotty.c index 47fab7c33073..8a90393faf3c 100644 --- a/drivers/char/rio/riotty.c +++ b/drivers/char/rio/riotty.c | |||
@@ -34,7 +34,6 @@ | |||
34 | 34 | ||
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/sched.h> | 36 | #include <linux/sched.h> |
37 | #include <linux/slab.h> | ||
38 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
39 | #include <linux/tty.h> | 38 | #include <linux/tty.h> |
40 | #include <linux/string.h> | 39 | #include <linux/string.h> |
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c index 1ec3d5cd748f..8dfd24721a82 100644 --- a/drivers/char/serial167.c +++ b/drivers/char/serial167.c | |||
@@ -64,6 +64,7 @@ | |||
64 | #include <linux/module.h> | 64 | #include <linux/module.h> |
65 | #include <linux/bitops.h> | 65 | #include <linux/bitops.h> |
66 | #include <linux/tty_flip.h> | 66 | #include <linux/tty_flip.h> |
67 | #include <linux/gfp.h> | ||
67 | 68 | ||
68 | #include <asm/system.h> | 69 | #include <asm/system.h> |
69 | #include <asm/io.h> | 70 | #include <asm/io.h> |
diff --git a/drivers/char/snsc_event.c b/drivers/char/snsc_event.c index 55a95892ccf9..ee156948b9f8 100644 --- a/drivers/char/snsc_event.c +++ b/drivers/char/snsc_event.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/slab.h> | ||
20 | #include <asm/byteorder.h> | 21 | #include <asm/byteorder.h> |
21 | #include <asm/sn/sn_sal.h> | 22 | #include <asm/sn/sn_sal.h> |
22 | #include <asm/unaligned.h> | 23 | #include <asm/unaligned.h> |
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index bba727c3807e..73f66d03624d 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/err.h> | 50 | #include <linux/err.h> |
51 | #include <linux/kfifo.h> | 51 | #include <linux/kfifo.h> |
52 | #include <linux/platform_device.h> | 52 | #include <linux/platform_device.h> |
53 | #include <linux/gfp.h> | ||
53 | 54 | ||
54 | #include <asm/uaccess.h> | 55 | #include <asm/uaccess.h> |
55 | #include <asm/io.h> | 56 | #include <asm/io.h> |
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c index 07ac14d949ce..2c24fcdc722a 100644 --- a/drivers/char/specialix.c +++ b/drivers/char/specialix.c | |||
@@ -94,6 +94,7 @@ | |||
94 | #include <linux/pci.h> | 94 | #include <linux/pci.h> |
95 | #include <linux/init.h> | 95 | #include <linux/init.h> |
96 | #include <linux/uaccess.h> | 96 | #include <linux/uaccess.h> |
97 | #include <linux/gfp.h> | ||
97 | 98 | ||
98 | #include "specialix_io8.h" | 99 | #include "specialix_io8.h" |
99 | #include "cd1865.h" | 100 | #include "cd1865.h" |
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 1ae2de7d8b4f..59de2525d303 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/workqueue.h> | 38 | #include <linux/workqueue.h> |
39 | #include <linux/hrtimer.h> | 39 | #include <linux/hrtimer.h> |
40 | #include <linux/oom.h> | 40 | #include <linux/oom.h> |
41 | #include <linux/slab.h> | ||
41 | 42 | ||
42 | #include <asm/ptrace.h> | 43 | #include <asm/ptrace.h> |
43 | #include <asm/irq_regs.h> | 44 | #include <asm/irq_regs.h> |
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index f06bb37defb1..068c816e6942 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c | |||
@@ -24,6 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/poll.h> | 26 | #include <linux/poll.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/mutex.h> | 28 | #include <linux/mutex.h> |
28 | #include <linux/spinlock.h> | 29 | #include <linux/spinlock.h> |
29 | 30 | ||
diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c index bf2170fb1cdd..0636520fa9bf 100644 --- a/drivers/char/tpm/tpm_bios.c +++ b/drivers/char/tpm/tpm_bios.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
23 | #include <linux/security.h> | 23 | #include <linux/security.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/slab.h> | ||
25 | #include <acpi/acpi.h> | 26 | #include <acpi/acpi.h> |
26 | #include "tpm.h" | 27 | #include "tpm.h" |
27 | 28 | ||
diff --git a/drivers/char/tpm/tpm_nsc.c b/drivers/char/tpm/tpm_nsc.c index 70efba2ee053..a605cb7dd898 100644 --- a/drivers/char/tpm/tpm_nsc.c +++ b/drivers/char/tpm/tpm_nsc.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/slab.h> | ||
23 | #include "tpm.h" | 24 | #include "tpm.h" |
24 | 25 | ||
25 | /* National definitions */ | 26 | /* National definitions */ |
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 2405f17b29dd..94345994f8a6 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/moduleparam.h> | 23 | #include <linux/moduleparam.h> |
24 | #include <linux/pnp.h> | 24 | #include <linux/pnp.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
26 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
27 | #include "tpm.h" | 28 | #include "tpm.h" |
diff --git a/drivers/char/tty_audit.c b/drivers/char/tty_audit.c index 283a15bc84e3..1b8ee590b4ca 100644 --- a/drivers/char/tty_audit.c +++ b/drivers/char/tty_audit.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/audit.h> | 12 | #include <linux/audit.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/tty.h> | 14 | #include <linux/tty.h> |
14 | 15 | ||
15 | struct tty_audit_buf { | 16 | struct tty_audit_buf { |
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index a42c466f7092..6da962c9b21c 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -1423,6 +1423,8 @@ static void release_one_tty(struct work_struct *work) | |||
1423 | list_del_init(&tty->tty_files); | 1423 | list_del_init(&tty->tty_files); |
1424 | file_list_unlock(); | 1424 | file_list_unlock(); |
1425 | 1425 | ||
1426 | put_pid(tty->pgrp); | ||
1427 | put_pid(tty->session); | ||
1426 | free_tty_struct(tty); | 1428 | free_tty_struct(tty); |
1427 | } | 1429 | } |
1428 | 1430 | ||
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 042c8149a6d1..1144a04cda6e 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/proc_fs.h> | 47 | #include <linux/proc_fs.h> |
48 | #include <linux/seq_file.h> | 48 | #include <linux/seq_file.h> |
49 | #include <linux/smp_lock.h> | 49 | #include <linux/smp_lock.h> |
50 | #include <linux/slab.h> | ||
50 | 51 | ||
51 | #include <asm/uaccess.h> | 52 | #include <asm/uaccess.h> |
52 | #include <asm/ioctls.h> | 53 | #include <asm/ioctls.h> |
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 44288ce0cb45..196428c2287a 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/list.h> | 25 | #include <linux/list.h> |
26 | #include <linux/poll.h> | 26 | #include <linux/poll.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/spinlock.h> | 29 | #include <linux/spinlock.h> |
29 | #include <linux/virtio.h> | 30 | #include <linux/virtio.h> |
30 | #include <linux/virtio_console.h> | 31 | #include <linux/virtio_console.h> |
@@ -32,6 +33,35 @@ | |||
32 | #include <linux/workqueue.h> | 33 | #include <linux/workqueue.h> |
33 | #include "hvc_console.h" | 34 | #include "hvc_console.h" |
34 | 35 | ||
36 | /* Moved here from .h file in order to disable MULTIPORT. */ | ||
37 | #define VIRTIO_CONSOLE_F_MULTIPORT 1 /* Does host provide multiple ports? */ | ||
38 | |||
39 | struct virtio_console_multiport_conf { | ||
40 | struct virtio_console_config config; | ||
41 | /* max. number of ports this device can hold */ | ||
42 | __u32 max_nr_ports; | ||
43 | /* number of ports added so far */ | ||
44 | __u32 nr_ports; | ||
45 | } __attribute__((packed)); | ||
46 | |||
47 | /* | ||
48 | * A message that's passed between the Host and the Guest for a | ||
49 | * particular port. | ||
50 | */ | ||
51 | struct virtio_console_control { | ||
52 | __u32 id; /* Port number */ | ||
53 | __u16 event; /* The kind of control event (see below) */ | ||
54 | __u16 value; /* Extra information for the key */ | ||
55 | }; | ||
56 | |||
57 | /* Some events for control messages */ | ||
58 | #define VIRTIO_CONSOLE_PORT_READY 0 | ||
59 | #define VIRTIO_CONSOLE_CONSOLE_PORT 1 | ||
60 | #define VIRTIO_CONSOLE_RESIZE 2 | ||
61 | #define VIRTIO_CONSOLE_PORT_OPEN 3 | ||
62 | #define VIRTIO_CONSOLE_PORT_NAME 4 | ||
63 | #define VIRTIO_CONSOLE_PORT_REMOVE 5 | ||
64 | |||
35 | /* | 65 | /* |
36 | * This is a global struct for storing common data for all the devices | 66 | * This is a global struct for storing common data for all the devices |
37 | * this driver handles. | 67 | * this driver handles. |
@@ -120,7 +150,7 @@ struct ports_device { | |||
120 | spinlock_t cvq_lock; | 150 | spinlock_t cvq_lock; |
121 | 151 | ||
122 | /* The current config space is stored here */ | 152 | /* The current config space is stored here */ |
123 | struct virtio_console_config config; | 153 | struct virtio_console_multiport_conf config; |
124 | 154 | ||
125 | /* The virtio device we're associated with */ | 155 | /* The virtio device we're associated with */ |
126 | struct virtio_device *vdev; | 156 | struct virtio_device *vdev; |
@@ -415,20 +445,16 @@ static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count) | |||
415 | out_vq->vq_ops->kick(out_vq); | 445 | out_vq->vq_ops->kick(out_vq); |
416 | 446 | ||
417 | if (ret < 0) { | 447 | if (ret < 0) { |
418 | len = 0; | 448 | in_count = 0; |
419 | goto fail; | 449 | goto fail; |
420 | } | 450 | } |
421 | 451 | ||
422 | /* | 452 | /* Wait till the host acknowledges it pushed out the data we sent. */ |
423 | * Wait till the host acknowledges it pushed out the data we | ||
424 | * sent. Also ensure we return to userspace the number of | ||
425 | * bytes that were successfully consumed by the host. | ||
426 | */ | ||
427 | while (!out_vq->vq_ops->get_buf(out_vq, &len)) | 453 | while (!out_vq->vq_ops->get_buf(out_vq, &len)) |
428 | cpu_relax(); | 454 | cpu_relax(); |
429 | fail: | 455 | fail: |
430 | /* We're expected to return the amount of data we wrote */ | 456 | /* We're expected to return the amount of data we wrote */ |
431 | return len; | 457 | return in_count; |
432 | } | 458 | } |
433 | 459 | ||
434 | /* | 460 | /* |
@@ -645,13 +671,13 @@ static int put_chars(u32 vtermno, const char *buf, int count) | |||
645 | { | 671 | { |
646 | struct port *port; | 672 | struct port *port; |
647 | 673 | ||
674 | if (unlikely(early_put_chars)) | ||
675 | return early_put_chars(vtermno, buf, count); | ||
676 | |||
648 | port = find_port_by_vtermno(vtermno); | 677 | port = find_port_by_vtermno(vtermno); |
649 | if (!port) | 678 | if (!port) |
650 | return 0; | 679 | return 0; |
651 | 680 | ||
652 | if (unlikely(early_put_chars)) | ||
653 | return early_put_chars(vtermno, buf, count); | ||
654 | |||
655 | return send_buf(port, (void *)buf, count); | 681 | return send_buf(port, (void *)buf, count); |
656 | } | 682 | } |
657 | 683 | ||
@@ -1217,7 +1243,7 @@ fail: | |||
1217 | */ | 1243 | */ |
1218 | static void config_work_handler(struct work_struct *work) | 1244 | static void config_work_handler(struct work_struct *work) |
1219 | { | 1245 | { |
1220 | struct virtio_console_config virtconconf; | 1246 | struct virtio_console_multiport_conf virtconconf; |
1221 | struct ports_device *portdev; | 1247 | struct ports_device *portdev; |
1222 | struct virtio_device *vdev; | 1248 | struct virtio_device *vdev; |
1223 | int err; | 1249 | int err; |
@@ -1226,7 +1252,8 @@ static void config_work_handler(struct work_struct *work) | |||
1226 | 1252 | ||
1227 | vdev = portdev->vdev; | 1253 | vdev = portdev->vdev; |
1228 | vdev->config->get(vdev, | 1254 | vdev->config->get(vdev, |
1229 | offsetof(struct virtio_console_config, nr_ports), | 1255 | offsetof(struct virtio_console_multiport_conf, |
1256 | nr_ports), | ||
1230 | &virtconconf.nr_ports, | 1257 | &virtconconf.nr_ports, |
1231 | sizeof(virtconconf.nr_ports)); | 1258 | sizeof(virtconconf.nr_ports)); |
1232 | 1259 | ||
@@ -1418,16 +1445,19 @@ static int __devinit virtcons_probe(struct virtio_device *vdev) | |||
1418 | multiport = false; | 1445 | multiport = false; |
1419 | portdev->config.nr_ports = 1; | 1446 | portdev->config.nr_ports = 1; |
1420 | portdev->config.max_nr_ports = 1; | 1447 | portdev->config.max_nr_ports = 1; |
1448 | #if 0 /* Multiport is not quite ready yet --RR */ | ||
1421 | if (virtio_has_feature(vdev, VIRTIO_CONSOLE_F_MULTIPORT)) { | 1449 | if (virtio_has_feature(vdev, VIRTIO_CONSOLE_F_MULTIPORT)) { |
1422 | multiport = true; | 1450 | multiport = true; |
1423 | vdev->features[0] |= 1 << VIRTIO_CONSOLE_F_MULTIPORT; | 1451 | vdev->features[0] |= 1 << VIRTIO_CONSOLE_F_MULTIPORT; |
1424 | 1452 | ||
1425 | vdev->config->get(vdev, offsetof(struct virtio_console_config, | 1453 | vdev->config->get(vdev, |
1426 | nr_ports), | 1454 | offsetof(struct virtio_console_multiport_conf, |
1455 | nr_ports), | ||
1427 | &portdev->config.nr_ports, | 1456 | &portdev->config.nr_ports, |
1428 | sizeof(portdev->config.nr_ports)); | 1457 | sizeof(portdev->config.nr_ports)); |
1429 | vdev->config->get(vdev, offsetof(struct virtio_console_config, | 1458 | vdev->config->get(vdev, |
1430 | max_nr_ports), | 1459 | offsetof(struct virtio_console_multiport_conf, |
1460 | max_nr_ports), | ||
1431 | &portdev->config.max_nr_ports, | 1461 | &portdev->config.max_nr_ports, |
1432 | sizeof(portdev->config.max_nr_ports)); | 1462 | sizeof(portdev->config.max_nr_ports)); |
1433 | if (portdev->config.nr_ports > portdev->config.max_nr_ports) { | 1463 | if (portdev->config.nr_ports > portdev->config.max_nr_ports) { |
@@ -1443,6 +1473,7 @@ static int __devinit virtcons_probe(struct virtio_device *vdev) | |||
1443 | 1473 | ||
1444 | /* Let the Host know we support multiple ports.*/ | 1474 | /* Let the Host know we support multiple ports.*/ |
1445 | vdev->config->finalize_features(vdev); | 1475 | vdev->config->finalize_features(vdev); |
1476 | #endif | ||
1446 | 1477 | ||
1447 | err = init_vqs(portdev); | 1478 | err = init_vqs(portdev); |
1448 | if (err < 0) { | 1479 | if (err < 0) { |
@@ -1525,7 +1556,6 @@ static struct virtio_device_id id_table[] = { | |||
1525 | 1556 | ||
1526 | static unsigned int features[] = { | 1557 | static unsigned int features[] = { |
1527 | VIRTIO_CONSOLE_F_SIZE, | 1558 | VIRTIO_CONSOLE_F_SIZE, |
1528 | VIRTIO_CONSOLE_F_MULTIPORT, | ||
1529 | }; | 1559 | }; |
1530 | 1560 | ||
1531 | static struct virtio_driver virtio_console = { | 1561 | static struct virtio_driver virtio_console = { |
diff --git a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c index 8b24729fec89..12de1202d22c 100644 --- a/drivers/char/vme_scc.c +++ b/drivers/char/vme_scc.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/fcntl.h> | 27 | #include <linux/fcntl.h> |
28 | #include <linux/major.h> | 28 | #include <linux/major.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/slab.h> | ||
31 | #include <linux/miscdevice.h> | 30 | #include <linux/miscdevice.h> |
32 | #include <linux/console.h> | 31 | #include <linux/console.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c index 4846d50199f3..7261b8d9087c 100644 --- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c | |||
@@ -86,6 +86,7 @@ | |||
86 | #include <linux/fs.h> | 86 | #include <linux/fs.h> |
87 | #include <linux/cdev.h> | 87 | #include <linux/cdev.h> |
88 | #include <linux/platform_device.h> | 88 | #include <linux/platform_device.h> |
89 | #include <linux/slab.h> | ||
89 | 90 | ||
90 | #include <asm/io.h> | 91 | #include <asm/io.h> |
91 | #include <asm/uaccess.h> | 92 | #include <asm/uaccess.h> |
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 578595c4425d..744f748cc84b 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/clocksource.h> | 29 | #include <linux/clocksource.h> |
30 | #include <linux/clockchips.h> | 30 | #include <linux/clockchips.h> |
31 | #include <linux/sh_timer.h> | 31 | #include <linux/sh_timer.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | struct sh_cmt_priv { | 34 | struct sh_cmt_priv { |
34 | void __iomem *mapbase; | 35 | void __iomem *mapbase; |
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c index 4c8a759e60cd..5fb78bfd73bb 100644 --- a/drivers/clocksource/sh_mtu2.c +++ b/drivers/clocksource/sh_mtu2.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/err.h> | 29 | #include <linux/err.h> |
30 | #include <linux/clockchips.h> | 30 | #include <linux/clockchips.h> |
31 | #include <linux/sh_timer.h> | 31 | #include <linux/sh_timer.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | struct sh_mtu2_priv { | 34 | struct sh_mtu2_priv { |
34 | void __iomem *mapbase; | 35 | void __iomem *mapbase; |
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c index 961f5b5ef6a3..fc9ff1e5b770 100644 --- a/drivers/clocksource/sh_tmu.c +++ b/drivers/clocksource/sh_tmu.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/clocksource.h> | 30 | #include <linux/clocksource.h> |
31 | #include <linux/clockchips.h> | 31 | #include <linux/clockchips.h> |
32 | #include <linux/sh_timer.h> | 32 | #include <linux/sh_timer.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | struct sh_tmu_priv { | 35 | struct sh_tmu_priv { |
35 | void __iomem *mapbase; | 36 | void __iomem *mapbase; |
diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c index 60697909ebdb..a7f046b0096c 100644 --- a/drivers/connector/cn_proc.c +++ b/drivers/connector/cn_proc.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/ktime.h> | 27 | #include <linux/ktime.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/connector.h> | 29 | #include <linux/connector.h> |
30 | #include <linux/gfp.h> | ||
30 | #include <asm/atomic.h> | 31 | #include <asm/atomic.h> |
31 | #include <asm/unaligned.h> | 32 | #include <asm/unaligned.h> |
32 | 33 | ||
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index 537c29ac4487..1d48f40342cb 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/netlink.h> | 26 | #include <linux/netlink.h> |
27 | #include <linux/moduleparam.h> | 27 | #include <linux/moduleparam.h> |
28 | #include <linux/connector.h> | 28 | #include <linux/connector.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/mutex.h> | 30 | #include <linux/mutex.h> |
30 | #include <linux/proc_fs.h> | 31 | #include <linux/proc_fs.h> |
31 | #include <linux/spinlock.h> | 32 | #include <linux/spinlock.h> |
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 5a62d678dd19..00d73fc8e4e2 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/sysdev.h> | 14 | #include <linux/sysdev.h> |
14 | #include <linux/cpu.h> | 15 | #include <linux/cpu.h> |
15 | #include <linux/sysfs.h> | 16 | #include <linux/sysfs.h> |
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index 8719b36e1a4d..0ba9c8b8ee74 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle/sysfs.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/cpuidle.h> | 10 | #include <linux/cpuidle.h> |
11 | #include <linux/sysfs.h> | 11 | #include <linux/sysfs.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/cpu.h> | 13 | #include <linux/cpu.h> |
13 | 14 | ||
14 | #include "cpuidle.h" | 15 | #include "cpuidle.h" |
diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c index 1c3849f6b7a2..6c4c8b7ce3aa 100644 --- a/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/of_platform.h> | 30 | #include <linux/of_platform.h> |
31 | #include <linux/slab.h> | ||
31 | #include <asm/dcr.h> | 32 | #include <asm/dcr.h> |
32 | #include <asm/dcr-regs.h> | 33 | #include <asm/dcr-regs.h> |
33 | #include <asm/cacheflush.h> | 34 | #include <asm/cacheflush.h> |
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 6c6656d3b1e2..f17ddf37a1ed 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/rtnetlink.h> | 17 | #include <linux/rtnetlink.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
20 | #include <linux/gfp.h> | ||
20 | 21 | ||
21 | #include <crypto/ctr.h> | 22 | #include <crypto/ctr.h> |
22 | #include <crypto/des.h> | 23 | #include <crypto/des.h> |
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c index b21ef635f352..6f29012bcc43 100644 --- a/drivers/crypto/mv_cesa.c +++ b/drivers/crypto/mv_cesa.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kthread.h> | 14 | #include <linux/kthread.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/scatterlist.h> | 16 | #include <linux/scatterlist.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include "mv_cesa.h" | 19 | #include "mv_cesa.h" |
19 | /* | 20 | /* |
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c index 8c2f3703ec85..2e992bc8015b 100644 --- a/drivers/crypto/padlock-aes.c +++ b/drivers/crypto/padlock-aes.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/percpu.h> | 18 | #include <linux/percpu.h> |
19 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
20 | #include <linux/slab.h> | ||
20 | #include <asm/byteorder.h> | 21 | #include <asm/byteorder.h> |
21 | #include <asm/processor.h> | 22 | #include <asm/processor.h> |
22 | #include <asm/i387.h> | 23 | #include <asm/i387.h> |
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index fd529d68c5ba..dc558a097311 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/io.h> | 37 | #include <linux/io.h> |
38 | #include <linux/spinlock.h> | 38 | #include <linux/spinlock.h> |
39 | #include <linux/rtnetlink.h> | 39 | #include <linux/rtnetlink.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | #include <crypto/algapi.h> | 42 | #include <crypto/algapi.h> |
42 | #include <crypto/aes.h> | 43 | #include <crypto/aes.h> |
diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c index 52e6bb70a490..8661c84a105d 100644 --- a/drivers/dca/dca-core.c +++ b/drivers/dca/dca-core.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/notifier.h> | 27 | #include <linux/notifier.h> |
28 | #include <linux/device.h> | 28 | #include <linux/device.h> |
29 | #include <linux/dca.h> | 29 | #include <linux/dca.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #define DCA_VERSION "1.12.1" | 32 | #define DCA_VERSION "1.12.1" |
32 | 33 | ||
diff --git a/drivers/dca/dca-sysfs.c b/drivers/dca/dca-sysfs.c index ee916c9857ee..5e8f335e6f6e 100644 --- a/drivers/dca/dca-sysfs.c +++ b/drivers/dca/dca-sysfs.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kdev_t.h> | 26 | #include <linux/kdev_t.h> |
27 | #include <linux/err.h> | 27 | #include <linux/err.h> |
28 | #include <linux/dca.h> | 28 | #include <linux/dca.h> |
29 | #include <linux/gfp.h> | ||
29 | 30 | ||
30 | static struct class *dca_class; | 31 | static struct class *dca_class; |
31 | static struct idr dca_idr; | 32 | static struct idr dca_idr; |
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index efc1a61ca231..278cf5bceef2 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "at_hdmac_regs.h" | 27 | #include "at_hdmac_regs.h" |
27 | 28 | ||
diff --git a/drivers/dma/coh901318_lli.c b/drivers/dma/coh901318_lli.c index 71d58c1a1e86..9f7e0e6a7eea 100644 --- a/drivers/dma/coh901318_lli.c +++ b/drivers/dma/coh901318_lli.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/spinlock.h> | 11 | #include <linux/spinlock.h> |
12 | #include <linux/dmapool.h> | 12 | #include <linux/dmapool.h> |
13 | #include <linux/memory.h> | 13 | #include <linux/memory.h> |
14 | #include <linux/gfp.h> | ||
14 | #include <mach/coh901318.h> | 15 | #include <mach/coh901318.h> |
15 | 16 | ||
16 | #include "coh901318_lli.h" | 17 | #include "coh901318_lli.h" |
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 87399cafce37..d18b5d069d7e 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/jiffies.h> | 58 | #include <linux/jiffies.h> |
59 | #include <linux/rculist.h> | 59 | #include <linux/rculist.h> |
60 | #include <linux/idr.h> | 60 | #include <linux/idr.h> |
61 | #include <linux/slab.h> | ||
61 | 62 | ||
62 | static DEFINE_MUTEX(dma_list_mutex); | 63 | static DEFINE_MUTEX(dma_list_mutex); |
63 | static LIST_HEAD(dma_device_list); | 64 | static LIST_HEAD(dma_device_list); |
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 6fa55fe3dd24..68d58c414cf0 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/moduleparam.h> | 15 | #include <linux/moduleparam.h> |
16 | #include <linux/random.h> | 16 | #include <linux/random.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/wait.h> | 18 | #include <linux/wait.h> |
18 | 19 | ||
19 | static unsigned int test_buf_size = 16384; | 20 | static unsigned int test_buf_size = 16384; |
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index bbb4be5a3ff4..88f470f0d820 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
31 | #include <linux/dmaengine.h> | 32 | #include <linux/dmaengine.h> |
32 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index 0099340b9616..3e5a8005c62b 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
31 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
32 | #include <linux/dmaengine.h> | 33 | #include <linux/dmaengine.h> |
diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c index 1ed5d66d7dca..b5ae56c211e6 100644 --- a/drivers/dma/ioat/dma_v2.c +++ b/drivers/dma/ioat/dma_v2.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
31 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
32 | #include <linux/dmaengine.h> | 33 | #include <linux/dmaengine.h> |
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c index 26febc56dab1..6740e319c9cf 100644 --- a/drivers/dma/ioat/dma_v3.c +++ b/drivers/dma/ioat/dma_v3.c | |||
@@ -57,6 +57,7 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <linux/pci.h> | 59 | #include <linux/pci.h> |
60 | #include <linux/gfp.h> | ||
60 | #include <linux/dmaengine.h> | 61 | #include <linux/dmaengine.h> |
61 | #include <linux/dma-mapping.h> | 62 | #include <linux/dma-mapping.h> |
62 | #include "registers.h" | 63 | #include "registers.h" |
diff --git a/drivers/dma/ioat/pci.c b/drivers/dma/ioat/pci.c index d545fae30f37..99ec26725bae 100644 --- a/drivers/dma/ioat/pci.c +++ b/drivers/dma/ioat/pci.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/dca.h> | 32 | #include <linux/dca.h> |
33 | #include <linux/slab.h> | ||
33 | #include "dma.h" | 34 | #include "dma.h" |
34 | #include "dma_v2.h" | 35 | #include "dma_v2.h" |
35 | #include "registers.h" | 36 | #include "registers.h" |
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index ca6e6a0cb793..1ebc801678b0 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/memory.h> | 32 | #include <linux/memory.h> |
33 | #include <linux/ioport.h> | 33 | #include <linux/ioport.h> |
34 | #include <linux/raid/pq.h> | 34 | #include <linux/raid/pq.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #include <mach/adma.h> | 37 | #include <mach/adma.h> |
37 | 38 | ||
diff --git a/drivers/dma/iovlock.c b/drivers/dma/iovlock.c index c0a272c73682..bb48a57c2fc1 100644 --- a/drivers/dma/iovlock.c +++ b/drivers/dma/iovlock.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/dmaengine.h> | 28 | #include <linux/dmaengine.h> |
29 | #include <linux/pagemap.h> | 29 | #include <linux/pagemap.h> |
30 | #include <linux/slab.h> | ||
30 | #include <net/tcp.h> /* for memcpy_toiovec */ | 31 | #include <net/tcp.h> /* for memcpy_toiovec */ |
31 | #include <asm/io.h> | 32 | #include <asm/io.h> |
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c index 3fdf1f46bd63..bbbd58566625 100644 --- a/drivers/dma/mpc512x_dma.c +++ b/drivers/dma/mpc512x_dma.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/dma-mapping.h> | 37 | #include <linux/dma-mapping.h> |
38 | #include <linux/interrupt.h> | 38 | #include <linux/interrupt.h> |
39 | #include <linux/io.h> | 39 | #include <linux/io.h> |
40 | #include <linux/slab.h> | ||
40 | #include <linux/of_device.h> | 41 | #include <linux/of_device.h> |
41 | #include <linux/of_platform.h> | 42 | #include <linux/of_platform.h> |
42 | 43 | ||
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index 466ab10c1ff1..e2fd34da64f2 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
22 | #include <linux/dma-mapping.h> | 23 | #include <linux/dma-mapping.h> |
23 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c index e69d87f24a25..d44626fa35ad 100644 --- a/drivers/dma/ppc4xx/adma.c +++ b/drivers/dma/ppc4xx/adma.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/dma-mapping.h> | 38 | #include <linux/dma-mapping.h> |
39 | #include <linux/spinlock.h> | 39 | #include <linux/spinlock.h> |
40 | #include <linux/interrupt.h> | 40 | #include <linux/interrupt.h> |
41 | #include <linux/slab.h> | ||
41 | #include <linux/uaccess.h> | 42 | #include <linux/uaccess.h> |
42 | #include <linux/proc_fs.h> | 43 | #include <linux/proc_fs.h> |
43 | #include <linux/of.h> | 44 | #include <linux/of.h> |
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 5d17e09cb625..7cc31b3f40d8 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
23 | #include <linux/dmaengine.h> | 24 | #include <linux/dmaengine.h> |
24 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c index 2b95f1a3edfc..f2330f81cb5e 100644 --- a/drivers/edac/amd76x_edac.c +++ b/drivers/edac/amd76x_edac.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include <linux/pci_ids.h> | 18 | #include <linux/pci_ids.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/edac.h> | 19 | #include <linux/edac.h> |
21 | #include "edac_core.h" | 20 | #include "edac_core.h" |
22 | 21 | ||
diff --git a/drivers/edac/cpc925_edac.c b/drivers/edac/cpc925_edac.c index 3d50274f1348..1609a19df495 100644 --- a/drivers/edac/cpc925_edac.c +++ b/drivers/edac/cpc925_edac.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/edac.h> | 25 | #include <linux/edac.h> |
26 | #include <linux/of.h> | 26 | #include <linux/of.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/gfp.h> | ||
28 | 29 | ||
29 | #include "edac_core.h" | 30 | #include "edac_core.h" |
30 | #include "edac_module.h" | 31 | #include "edac_module.h" |
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c index 243e9aacad69..ae3f80c54198 100644 --- a/drivers/edac/e752x_edac.c +++ b/drivers/edac/e752x_edac.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/pci_ids.h> | 23 | #include <linux/pci_ids.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/edac.h> | 24 | #include <linux/edac.h> |
26 | #include "edac_core.h" | 25 | #include "edac_core.h" |
27 | 26 | ||
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c index c7d11cc4e21a..1731d7245816 100644 --- a/drivers/edac/e7xxx_edac.c +++ b/drivers/edac/e7xxx_edac.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/pci_ids.h> | 28 | #include <linux/pci_ids.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/edac.h> | 29 | #include <linux/edac.h> |
31 | #include "edac_core.h" | 30 | #include "edac_core.h" |
32 | 31 | ||
diff --git a/drivers/edac/edac_device_sysfs.c b/drivers/edac/edac_device_sysfs.c index 5fdedbc0f545..070968178a24 100644 --- a/drivers/edac/edac_device_sysfs.c +++ b/drivers/edac/edac_device_sysfs.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/ctype.h> | 13 | #include <linux/ctype.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include "edac_core.h" | 17 | #include "edac_core.h" |
17 | #include "edac_module.h" | 18 | #include "edac_module.h" |
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index 88840e9fa3e0..418b65f1a1da 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/ctype.h> | 12 | #include <linux/ctype.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/bug.h> | 14 | #include <linux/bug.h> |
14 | 15 | ||
15 | #include "edac_core.h" | 16 | #include "edac_core.h" |
diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c index bef94e3d9944..c39697df9cb4 100644 --- a/drivers/edac/edac_pci_sysfs.c +++ b/drivers/edac/edac_pci_sysfs.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/sysdev.h> | 10 | #include <linux/sysdev.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/ctype.h> | 12 | #include <linux/ctype.h> |
12 | 13 | ||
13 | #include "edac_core.h" | 14 | #include "edac_core.h" |
diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c index 6c9a0f2a593c..c0510b3d7035 100644 --- a/drivers/edac/i3000_edac.c +++ b/drivers/edac/i3000_edac.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/pci_ids.h> | 15 | #include <linux/pci_ids.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/edac.h> | 16 | #include <linux/edac.h> |
18 | #include "edac_core.h" | 17 | #include "edac_core.h" |
19 | 18 | ||
diff --git a/drivers/edac/i3200_edac.c b/drivers/edac/i3200_edac.c index fde4db91c4d2..d41f9002da45 100644 --- a/drivers/edac/i3200_edac.c +++ b/drivers/edac/i3200_edac.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
13 | #include <linux/pci_ids.h> | 13 | #include <linux/pci_ids.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/edac.h> | 14 | #include <linux/edac.h> |
16 | #include <linux/io.h> | 15 | #include <linux/io.h> |
17 | #include "edac_core.h" | 16 | #include "edac_core.h" |
diff --git a/drivers/edac/i5100_edac.c b/drivers/edac/i5100_edac.c index 7785d8ffa404..ee9753cf362c 100644 --- a/drivers/edac/i5100_edac.c +++ b/drivers/edac/i5100_edac.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
21 | #include <linux/pci_ids.h> | 21 | #include <linux/pci_ids.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/edac.h> | 22 | #include <linux/edac.h> |
24 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
25 | #include <linux/mmzone.h> | 24 | #include <linux/mmzone.h> |
diff --git a/drivers/edac/i82443bxgx_edac.c b/drivers/edac/i82443bxgx_edac.c index 577760a82a0f..7f3884fcbd46 100644 --- a/drivers/edac/i82443bxgx_edac.c +++ b/drivers/edac/i82443bxgx_edac.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/pci_ids.h> | 28 | #include <linux/pci_ids.h> |
29 | 29 | ||
30 | #include <linux/slab.h> | ||
31 | 30 | ||
32 | #include <linux/edac.h> | 31 | #include <linux/edac.h> |
33 | #include "edac_core.h" | 32 | #include "edac_core.h" |
diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c index c0088ba9672b..b8a95cf50718 100644 --- a/drivers/edac/i82860_edac.c +++ b/drivers/edac/i82860_edac.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/pci_ids.h> | 15 | #include <linux/pci_ids.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/edac.h> | 16 | #include <linux/edac.h> |
18 | #include "edac_core.h" | 17 | #include "edac_core.h" |
19 | 18 | ||
diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c index b2d83b95033d..b2fd1e899142 100644 --- a/drivers/edac/i82875p_edac.c +++ b/drivers/edac/i82875p_edac.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/pci_ids.h> | 19 | #include <linux/pci_ids.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/edac.h> | 20 | #include <linux/edac.h> |
22 | #include "edac_core.h" | 21 | #include "edac_core.h" |
23 | 22 | ||
diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c index 2eed3ea2cf62..3218819b7286 100644 --- a/drivers/edac/i82975x_edac.c +++ b/drivers/edac/i82975x_edac.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/pci_ids.h> | 15 | #include <linux/pci_ids.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/edac.h> | 16 | #include <linux/edac.h> |
18 | #include "edac_core.h" | 17 | #include "edac_core.h" |
19 | 18 | ||
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index 94cac0aacea3..4471647b4807 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c | |||
@@ -11,13 +11,13 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
16 | #include <linux/ctype.h> | 15 | #include <linux/ctype.h> |
17 | #include <linux/io.h> | 16 | #include <linux/io.h> |
18 | #include <linux/mod_devicetable.h> | 17 | #include <linux/mod_devicetable.h> |
19 | #include <linux/edac.h> | 18 | #include <linux/edac.h> |
20 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
20 | #include <linux/gfp.h> | ||
21 | 21 | ||
22 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
23 | #include <linux/of_device.h> | 23 | #include <linux/of_device.h> |
diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c index a6b9fec13a74..7e5ff367705c 100644 --- a/drivers/edac/mv64x60_edac.c +++ b/drivers/edac/mv64x60_edac.c | |||
@@ -12,10 +12,10 @@ | |||
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
17 | #include <linux/io.h> | 16 | #include <linux/io.h> |
18 | #include <linux/edac.h> | 17 | #include <linux/edac.h> |
18 | #include <linux/gfp.h> | ||
19 | 19 | ||
20 | #include "edac_core.h" | 20 | #include "edac_core.h" |
21 | #include "edac_module.h" | 21 | #include "edac_module.h" |
diff --git a/drivers/edac/pasemi_edac.c b/drivers/edac/pasemi_edac.c index 8e6b91bd2e99..7f71ee436744 100644 --- a/drivers/edac/pasemi_edac.c +++ b/drivers/edac/pasemi_edac.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/pci.h> | 26 | #include <linux/pci.h> |
27 | #include <linux/pci_ids.h> | 27 | #include <linux/pci_ids.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/edac.h> | 28 | #include <linux/edac.h> |
30 | #include "edac_core.h" | 29 | #include "edac_core.h" |
31 | 30 | ||
diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c index 9900675e9598..d55f8e9de788 100644 --- a/drivers/edac/r82600_edac.c +++ b/drivers/edac/r82600_edac.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
21 | #include <linux/pci_ids.h> | 21 | #include <linux/pci_ids.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/edac.h> | 22 | #include <linux/edac.h> |
24 | #include "edac_core.h" | 23 | #include "edac_core.h" |
25 | 24 | ||
diff --git a/drivers/edac/x38_edac.c b/drivers/edac/x38_edac.c index d4ec60593176..b6f47de152f3 100644 --- a/drivers/edac/x38_edac.c +++ b/drivers/edac/x38_edac.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/pci_ids.h> | 15 | #include <linux/pci_ids.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/edac.h> | 16 | #include <linux/edac.h> |
18 | #include "edac_core.h" | 17 | #include "edac_core.h" |
19 | 18 | ||
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index 8be720b278b7..702dcc98c074 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/mutex.h> | 34 | #include <linux/mutex.h> |
35 | #include <linux/poll.h> | 35 | #include <linux/poll.h> |
36 | #include <linux/sched.h> | 36 | #include <linux/sched.h> |
37 | #include <linux/slab.h> | ||
37 | #include <linux/spinlock.h> | 38 | #include <linux/spinlock.h> |
38 | #include <linux/string.h> | 39 | #include <linux/string.h> |
39 | #include <linux/time.h> | 40 | #include <linux/time.h> |
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c index 5db0518c66da..4b8523f00dce 100644 --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/mutex.h> | 34 | #include <linux/mutex.h> |
35 | #include <linux/rwsem.h> | 35 | #include <linux/rwsem.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/spinlock.h> | 37 | #include <linux/spinlock.h> |
37 | #include <linux/string.h> | 38 | #include <linux/string.h> |
38 | #include <linux/workqueue.h> | 39 | #include <linux/workqueue.h> |
@@ -126,97 +127,74 @@ int fw_csr_string(const u32 *directory, int key, char *buf, size_t size) | |||
126 | } | 127 | } |
127 | EXPORT_SYMBOL(fw_csr_string); | 128 | EXPORT_SYMBOL(fw_csr_string); |
128 | 129 | ||
129 | static bool is_fw_unit(struct device *dev); | 130 | static void get_ids(const u32 *directory, int *id) |
130 | |||
131 | static int match_unit_directory(const u32 *directory, u32 match_flags, | ||
132 | const struct ieee1394_device_id *id) | ||
133 | { | 131 | { |
134 | struct fw_csr_iterator ci; | 132 | struct fw_csr_iterator ci; |
135 | int key, value, match; | 133 | int key, value; |
136 | 134 | ||
137 | match = 0; | ||
138 | fw_csr_iterator_init(&ci, directory); | 135 | fw_csr_iterator_init(&ci, directory); |
139 | while (fw_csr_iterator_next(&ci, &key, &value)) { | 136 | while (fw_csr_iterator_next(&ci, &key, &value)) { |
140 | if (key == CSR_VENDOR && value == id->vendor_id) | 137 | switch (key) { |
141 | match |= IEEE1394_MATCH_VENDOR_ID; | 138 | case CSR_VENDOR: id[0] = value; break; |
142 | if (key == CSR_MODEL && value == id->model_id) | 139 | case CSR_MODEL: id[1] = value; break; |
143 | match |= IEEE1394_MATCH_MODEL_ID; | 140 | case CSR_SPECIFIER_ID: id[2] = value; break; |
144 | if (key == CSR_SPECIFIER_ID && value == id->specifier_id) | 141 | case CSR_VERSION: id[3] = value; break; |
145 | match |= IEEE1394_MATCH_SPECIFIER_ID; | 142 | } |
146 | if (key == CSR_VERSION && value == id->version) | ||
147 | match |= IEEE1394_MATCH_VERSION; | ||
148 | } | 143 | } |
144 | } | ||
145 | |||
146 | static void get_modalias_ids(struct fw_unit *unit, int *id) | ||
147 | { | ||
148 | get_ids(&fw_parent_device(unit)->config_rom[5], id); | ||
149 | get_ids(unit->directory, id); | ||
150 | } | ||
151 | |||
152 | static bool match_ids(const struct ieee1394_device_id *id_table, int *id) | ||
153 | { | ||
154 | int match = 0; | ||
155 | |||
156 | if (id[0] == id_table->vendor_id) | ||
157 | match |= IEEE1394_MATCH_VENDOR_ID; | ||
158 | if (id[1] == id_table->model_id) | ||
159 | match |= IEEE1394_MATCH_MODEL_ID; | ||
160 | if (id[2] == id_table->specifier_id) | ||
161 | match |= IEEE1394_MATCH_SPECIFIER_ID; | ||
162 | if (id[3] == id_table->version) | ||
163 | match |= IEEE1394_MATCH_VERSION; | ||
149 | 164 | ||
150 | return (match & match_flags) == match_flags; | 165 | return (match & id_table->match_flags) == id_table->match_flags; |
151 | } | 166 | } |
152 | 167 | ||
168 | static bool is_fw_unit(struct device *dev); | ||
169 | |||
153 | static int fw_unit_match(struct device *dev, struct device_driver *drv) | 170 | static int fw_unit_match(struct device *dev, struct device_driver *drv) |
154 | { | 171 | { |
155 | struct fw_unit *unit = fw_unit(dev); | 172 | const struct ieee1394_device_id *id_table = |
156 | struct fw_device *device; | 173 | container_of(drv, struct fw_driver, driver)->id_table; |
157 | const struct ieee1394_device_id *id; | 174 | int id[] = {0, 0, 0, 0}; |
158 | 175 | ||
159 | /* We only allow binding to fw_units. */ | 176 | /* We only allow binding to fw_units. */ |
160 | if (!is_fw_unit(dev)) | 177 | if (!is_fw_unit(dev)) |
161 | return 0; | 178 | return 0; |
162 | 179 | ||
163 | device = fw_parent_device(unit); | 180 | get_modalias_ids(fw_unit(dev), id); |
164 | id = container_of(drv, struct fw_driver, driver)->id_table; | ||
165 | 181 | ||
166 | for (; id->match_flags != 0; id++) { | 182 | for (; id_table->match_flags != 0; id_table++) |
167 | if (match_unit_directory(unit->directory, id->match_flags, id)) | 183 | if (match_ids(id_table, id)) |
168 | return 1; | 184 | return 1; |
169 | 185 | ||
170 | /* Also check vendor ID in the root directory. */ | ||
171 | if ((id->match_flags & IEEE1394_MATCH_VENDOR_ID) && | ||
172 | match_unit_directory(&device->config_rom[5], | ||
173 | IEEE1394_MATCH_VENDOR_ID, id) && | ||
174 | match_unit_directory(unit->directory, id->match_flags | ||
175 | & ~IEEE1394_MATCH_VENDOR_ID, id)) | ||
176 | return 1; | ||
177 | } | ||
178 | |||
179 | return 0; | 186 | return 0; |
180 | } | 187 | } |
181 | 188 | ||
182 | static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size) | 189 | static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size) |
183 | { | 190 | { |
184 | struct fw_device *device = fw_parent_device(unit); | 191 | int id[] = {0, 0, 0, 0}; |
185 | struct fw_csr_iterator ci; | ||
186 | 192 | ||
187 | int key, value; | 193 | get_modalias_ids(unit, id); |
188 | int vendor = 0; | ||
189 | int model = 0; | ||
190 | int specifier_id = 0; | ||
191 | int version = 0; | ||
192 | |||
193 | fw_csr_iterator_init(&ci, &device->config_rom[5]); | ||
194 | while (fw_csr_iterator_next(&ci, &key, &value)) { | ||
195 | switch (key) { | ||
196 | case CSR_VENDOR: | ||
197 | vendor = value; | ||
198 | break; | ||
199 | case CSR_MODEL: | ||
200 | model = value; | ||
201 | break; | ||
202 | } | ||
203 | } | ||
204 | |||
205 | fw_csr_iterator_init(&ci, unit->directory); | ||
206 | while (fw_csr_iterator_next(&ci, &key, &value)) { | ||
207 | switch (key) { | ||
208 | case CSR_SPECIFIER_ID: | ||
209 | specifier_id = value; | ||
210 | break; | ||
211 | case CSR_VERSION: | ||
212 | version = value; | ||
213 | break; | ||
214 | } | ||
215 | } | ||
216 | 194 | ||
217 | return snprintf(buffer, buffer_size, | 195 | return snprintf(buffer, buffer_size, |
218 | "ieee1394:ven%08Xmo%08Xsp%08Xver%08X", | 196 | "ieee1394:ven%08Xmo%08Xsp%08Xver%08X", |
219 | vendor, model, specifier_id, version); | 197 | id[0], id[1], id[2], id[3]); |
220 | } | 198 | } |
221 | 199 | ||
222 | static int fw_unit_uevent(struct device *dev, struct kobj_uevent_env *env) | 200 | static int fw_unit_uevent(struct device *dev, struct kobj_uevent_env *env) |
diff --git a/drivers/firewire/core-iso.c b/drivers/firewire/core-iso.c index 1c0b504a42f3..3784a47865b7 100644 --- a/drivers/firewire/core-iso.c +++ b/drivers/firewire/core-iso.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/firewire-constants.h> | 26 | #include <linux/firewire-constants.h> |
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
30 | #include <linux/vmalloc.h> | 31 | #include <linux/vmalloc.h> |
31 | 32 | ||
@@ -331,8 +332,9 @@ void fw_iso_resource_manage(struct fw_card *card, int generation, | |||
331 | if (ret < 0) | 332 | if (ret < 0) |
332 | *bandwidth = 0; | 333 | *bandwidth = 0; |
333 | 334 | ||
334 | if (allocate && ret < 0 && c >= 0) { | 335 | if (allocate && ret < 0) { |
335 | deallocate_channel(card, irm_id, generation, c, buffer); | 336 | if (c >= 0) |
337 | deallocate_channel(card, irm_id, generation, c, buffer); | ||
336 | *channel = ret; | 338 | *channel = ret; |
337 | } | 339 | } |
338 | } | 340 | } |
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index 2d3dc7ded0a9..7142eeec8074 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
22 | #include <linux/netdevice.h> | 22 | #include <linux/netdevice.h> |
23 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
25 | 26 | ||
26 | #include <asm/unaligned.h> | 27 | #include <asm/unaligned.h> |
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 75dc6988cffd..0cf4d7f562c5 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
25 | #include <linux/firewire.h> | 25 | #include <linux/firewire.h> |
26 | #include <linux/firewire-constants.h> | 26 | #include <linux/firewire-constants.h> |
27 | #include <linux/gfp.h> | ||
28 | #include <linux/init.h> | 27 | #include <linux/init.h> |
29 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
30 | #include <linux/io.h> | 29 | #include <linux/io.h> |
@@ -35,6 +34,7 @@ | |||
35 | #include <linux/moduleparam.h> | 34 | #include <linux/moduleparam.h> |
36 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
37 | #include <linux/pci_ids.h> | 36 | #include <linux/pci_ids.h> |
37 | #include <linux/slab.h> | ||
38 | #include <linux/spinlock.h> | 38 | #include <linux/spinlock.h> |
39 | #include <linux/string.h> | 39 | #include <linux/string.h> |
40 | 40 | ||
@@ -231,6 +231,8 @@ static inline struct fw_ohci *fw_ohci(struct fw_card *card) | |||
231 | 231 | ||
232 | static char ohci_driver_name[] = KBUILD_MODNAME; | 232 | static char ohci_driver_name[] = KBUILD_MODNAME; |
233 | 233 | ||
234 | #define PCI_DEVICE_ID_TI_TSB12LV22 0x8009 | ||
235 | |||
234 | #define QUIRK_CYCLE_TIMER 1 | 236 | #define QUIRK_CYCLE_TIMER 1 |
235 | #define QUIRK_RESET_PACKET 2 | 237 | #define QUIRK_RESET_PACKET 2 |
236 | #define QUIRK_BE_HEADERS 4 | 238 | #define QUIRK_BE_HEADERS 4 |
@@ -239,6 +241,8 @@ static char ohci_driver_name[] = KBUILD_MODNAME; | |||
239 | static const struct { | 241 | static const struct { |
240 | unsigned short vendor, device, flags; | 242 | unsigned short vendor, device, flags; |
241 | } ohci_quirks[] = { | 243 | } ohci_quirks[] = { |
244 | {PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_TSB12LV22, QUIRK_CYCLE_TIMER | | ||
245 | QUIRK_RESET_PACKET}, | ||
242 | {PCI_VENDOR_ID_TI, PCI_ANY_ID, QUIRK_RESET_PACKET}, | 246 | {PCI_VENDOR_ID_TI, PCI_ANY_ID, QUIRK_RESET_PACKET}, |
243 | {PCI_VENDOR_ID_AL, PCI_ANY_ID, QUIRK_CYCLE_TIMER}, | 247 | {PCI_VENDOR_ID_AL, PCI_ANY_ID, QUIRK_CYCLE_TIMER}, |
244 | {PCI_VENDOR_ID_NEC, PCI_ANY_ID, QUIRK_CYCLE_TIMER}, | 248 | {PCI_VENDOR_ID_NEC, PCI_ANY_ID, QUIRK_CYCLE_TIMER}, |
diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c index 18d65fb42ee7..fb09bb3c0ad6 100644 --- a/drivers/firmware/dcdbas.c +++ b/drivers/firmware/dcdbas.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
26 | #include <linux/gfp.h> | ||
26 | #include <linux/init.h> | 27 | #include <linux/init.h> |
27 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
28 | #include <linux/mc146818rtc.h> | 29 | #include <linux/mc146818rtc.h> |
diff --git a/drivers/firmware/dell_rbu.c b/drivers/firmware/dell_rbu.c index b3a0cf57442e..3a4460265b10 100644 --- a/drivers/firmware/dell_rbu.c +++ b/drivers/firmware/dell_rbu.c | |||
@@ -36,6 +36,7 @@ | |||
36 | */ | 36 | */ |
37 | #include <linux/init.h> | 37 | #include <linux/init.h> |
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/slab.h> | ||
39 | #include <linux/string.h> | 40 | #include <linux/string.h> |
40 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
41 | #include <linux/blkdev.h> | 42 | #include <linux/blkdev.h> |
diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c index dbdf6fadfc79..a777a35381d2 100644 --- a/drivers/firmware/dmi-id.c +++ b/drivers/firmware/dmi-id.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/dmi.h> | 12 | #include <linux/dmi.h> |
13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
14 | #include <linux/slab.h> | ||
14 | 15 | ||
15 | struct dmi_device_attribute{ | 16 | struct dmi_device_attribute{ |
16 | struct device_attribute dev_attr; | 17 | struct device_attribute dev_attr; |
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c index 31b983d9462c..d46467271349 100644 --- a/drivers/firmware/dmi_scan.c +++ b/drivers/firmware/dmi_scan.c | |||
@@ -5,7 +5,6 @@ | |||
5 | #include <linux/dmi.h> | 5 | #include <linux/dmi.h> |
6 | #include <linux/efi.h> | 6 | #include <linux/efi.h> |
7 | #include <linux/bootmem.h> | 7 | #include <linux/bootmem.h> |
8 | #include <linux/slab.h> | ||
9 | #include <asm/dmi.h> | 8 | #include <asm/dmi.h> |
10 | 9 | ||
11 | /* | 10 | /* |
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index 082f06ecd327..81b70bd07586 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c | |||
@@ -77,6 +77,7 @@ | |||
77 | #include <linux/sysfs.h> | 77 | #include <linux/sysfs.h> |
78 | #include <linux/kobject.h> | 78 | #include <linux/kobject.h> |
79 | #include <linux/device.h> | 79 | #include <linux/device.h> |
80 | #include <linux/slab.h> | ||
80 | 81 | ||
81 | #include <asm/uaccess.h> | 82 | #include <asm/uaccess.h> |
82 | 83 | ||
diff --git a/drivers/firmware/iscsi_ibft_find.c b/drivers/firmware/iscsi_ibft_find.c index dfb15c06c88f..d6470ef36e4a 100644 --- a/drivers/firmware/iscsi_ibft_find.c +++ b/drivers/firmware/iscsi_ibft_find.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/limits.h> | 27 | #include <linux/limits.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/slab.h> | ||
31 | #include <linux/stat.h> | 30 | #include <linux/stat.h> |
32 | #include <linux/string.h> | 31 | #include <linux/string.h> |
33 | #include <linux/types.h> | 32 | #include <linux/types.h> |
@@ -52,7 +51,7 @@ EXPORT_SYMBOL_GPL(ibft_addr); | |||
52 | * Routine used to find the iSCSI Boot Format Table. The logical | 51 | * Routine used to find the iSCSI Boot Format Table. The logical |
53 | * kernel address is set in the ibft_addr global variable. | 52 | * kernel address is set in the ibft_addr global variable. |
54 | */ | 53 | */ |
55 | void __init reserve_ibft_region(void) | 54 | unsigned long __init find_ibft_region(unsigned long *sizep) |
56 | { | 55 | { |
57 | unsigned long pos; | 56 | unsigned long pos; |
58 | unsigned int len = 0; | 57 | unsigned int len = 0; |
@@ -78,6 +77,11 @@ void __init reserve_ibft_region(void) | |||
78 | } | 77 | } |
79 | } | 78 | } |
80 | } | 79 | } |
81 | if (ibft_addr) | 80 | if (ibft_addr) { |
82 | reserve_bootmem(pos, PAGE_ALIGN(len), BOOTMEM_DEFAULT); | 81 | *sizep = PAGE_ALIGN(len); |
82 | return pos; | ||
83 | } | ||
84 | |||
85 | *sizep = 0; | ||
86 | return 0; | ||
83 | } | 87 | } |
diff --git a/drivers/firmware/memmap.c b/drivers/firmware/memmap.c index d59f7cad2269..adc07102a20d 100644 --- a/drivers/firmware/memmap.c +++ b/drivers/firmware/memmap.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/bootmem.h> | 22 | #include <linux/bootmem.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | /* | 25 | /* |
25 | * Data types ------------------------------------------------------------------ | 26 | * Data types ------------------------------------------------------------------ |
diff --git a/drivers/gpio/adp5520-gpio.c b/drivers/gpio/adp5520-gpio.c index 0f93105873cd..9f2781537001 100644 --- a/drivers/gpio/adp5520-gpio.c +++ b/drivers/gpio/adp5520-gpio.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
diff --git a/drivers/gpio/adp5588-gpio.c b/drivers/gpio/adp5588-gpio.c index afc097a16b33..2e8e9e24f887 100644 --- a/drivers/gpio/adp5588-gpio.c +++ b/drivers/gpio/adp5588-gpio.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
13 | #include <linux/i2c.h> | 14 | #include <linux/i2c.h> |
14 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
diff --git a/drivers/gpio/bt8xxgpio.c b/drivers/gpio/bt8xxgpio.c index 2559f2289409..aa4f09ad3ced 100644 --- a/drivers/gpio/bt8xxgpio.c +++ b/drivers/gpio/bt8xxgpio.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/pci.h> | 47 | #include <linux/pci.h> |
48 | #include <linux/spinlock.h> | 48 | #include <linux/spinlock.h> |
49 | #include <linux/gpio.h> | 49 | #include <linux/gpio.h> |
50 | #include <linux/slab.h> | ||
50 | 51 | ||
51 | /* Steal the hardware definitions from the bttv driver. */ | 52 | /* Steal the hardware definitions from the bttv driver. */ |
52 | #include "../media/video/bt8xx/bt848.h" | 53 | #include "../media/video/bt8xx/bt848.h" |
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 6d1b86661e63..76be229c814d 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/seq_file.h> | 9 | #include <linux/seq_file.h> |
10 | #include <linux/gpio.h> | 10 | #include <linux/gpio.h> |
11 | #include <linux/idr.h> | 11 | #include <linux/idr.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | 14 | ||
14 | /* Optional implementation infrastructure for GPIO interfaces. | 15 | /* Optional implementation infrastructure for GPIO interfaces. |
diff --git a/drivers/gpio/langwell_gpio.c b/drivers/gpio/langwell_gpio.c index 6c0ebbdc659e..00c3a14127af 100644 --- a/drivers/gpio/langwell_gpio.c +++ b/drivers/gpio/langwell_gpio.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/irq.h> | 29 | #include <linux/irq.h> |
30 | #include <linux/io.h> | 30 | #include <linux/io.h> |
31 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | struct lnw_gpio_register { | 34 | struct lnw_gpio_register { |
34 | u32 GPLR[2]; | 35 | u32 GPLR[2]; |
diff --git a/drivers/gpio/max7300.c b/drivers/gpio/max7300.c index 9d74eef1157a..962f661c18c7 100644 --- a/drivers/gpio/max7300.c +++ b/drivers/gpio/max7300.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/spi/max7301.h> | 18 | #include <linux/spi/max7301.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | static int max7300_i2c_write(struct device *dev, unsigned int reg, | 21 | static int max7300_i2c_write(struct device *dev, unsigned int reg, |
21 | unsigned int val) | 22 | unsigned int val) |
diff --git a/drivers/gpio/max7301.c b/drivers/gpio/max7301.c index 965d9b1ea13e..92a100ddef6b 100644 --- a/drivers/gpio/max7301.c +++ b/drivers/gpio/max7301.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/mutex.h> | 18 | #include <linux/mutex.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
20 | #include <linux/spi/max7301.h> | 21 | #include <linux/spi/max7301.h> |
21 | 22 | ||
diff --git a/drivers/gpio/max730x.c b/drivers/gpio/max730x.c index c9bced55f82b..7696a5625d58 100644 --- a/drivers/gpio/max730x.c +++ b/drivers/gpio/max730x.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/mutex.h> | 38 | #include <linux/mutex.h> |
39 | #include <linux/spi/max7301.h> | 39 | #include <linux/spi/max7301.h> |
40 | #include <linux/gpio.h> | 40 | #include <linux/gpio.h> |
41 | #include <linux/slab.h> | ||
41 | 42 | ||
42 | /* | 43 | /* |
43 | * Pin configurations, see MAX7301 datasheet page 6 | 44 | * Pin configurations, see MAX7301 datasheet page 6 |
@@ -242,3 +243,7 @@ int __devexit __max730x_remove(struct device *dev) | |||
242 | return ret; | 243 | return ret; |
243 | } | 244 | } |
244 | EXPORT_SYMBOL_GPL(__max730x_remove); | 245 | EXPORT_SYMBOL_GPL(__max730x_remove); |
246 | |||
247 | MODULE_AUTHOR("Juergen Beisert, Wolfram Sang"); | ||
248 | MODULE_LICENSE("GPL v2"); | ||
249 | MODULE_DESCRIPTION("MAX730x GPIO-Expanders, generic parts"); | ||
diff --git a/drivers/gpio/mc33880.c b/drivers/gpio/mc33880.c index e7d01bd8fdb3..935479da6705 100644 --- a/drivers/gpio/mc33880.c +++ b/drivers/gpio/mc33880.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/spi/spi.h> | 25 | #include <linux/spi/spi.h> |
26 | #include <linux/spi/mc33880.h> | 26 | #include <linux/spi/mc33880.h> |
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #define DRIVER_NAME "mc33880" | 30 | #define DRIVER_NAME "mc33880" |
30 | 31 | ||
diff --git a/drivers/gpio/mcp23s08.c b/drivers/gpio/mcp23s08.c index cd651ec8d034..69f6f1955a31 100644 --- a/drivers/gpio/mcp23s08.c +++ b/drivers/gpio/mcp23s08.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/gpio.h> | 9 | #include <linux/gpio.h> |
10 | #include <linux/spi/spi.h> | 10 | #include <linux/spi/spi.h> |
11 | #include <linux/spi/mcp23s08.h> | 11 | #include <linux/spi/mcp23s08.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | 14 | ||
14 | /* Registers are all 8 bits wide. | 15 | /* Registers are all 8 bits wide. |
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index ab5daab14bc2..7d521e1d17e1 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/i2c/pca953x.h> | 20 | #include <linux/i2c/pca953x.h> |
21 | #include <linux/slab.h> | ||
21 | #ifdef CONFIG_OF_GPIO | 22 | #ifdef CONFIG_OF_GPIO |
22 | #include <linux/of_platform.h> | 23 | #include <linux/of_platform.h> |
23 | #include <linux/of_gpio.h> | 24 | #include <linux/of_gpio.h> |
diff --git a/drivers/gpio/pl061.c b/drivers/gpio/pl061.c index 3ad1eeb49609..5ad8f778ced4 100644 --- a/drivers/gpio/pl061.c +++ b/drivers/gpio/pl061.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/device.h> | 24 | #include <linux/device.h> |
25 | #include <linux/amba/bus.h> | 25 | #include <linux/amba/bus.h> |
26 | #include <linux/amba/pl061.h> | 26 | #include <linux/amba/pl061.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #define GPIODIR 0x400 | 29 | #define GPIODIR 0x400 |
29 | #define GPIOIS 0x404 | 30 | #define GPIOIS 0x404 |
diff --git a/drivers/gpio/timbgpio.c b/drivers/gpio/timbgpio.c index d4295fa5369e..ddd053108a13 100644 --- a/drivers/gpio/timbgpio.c +++ b/drivers/gpio/timbgpio.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/timb_gpio.h> | 28 | #include <linux/timb_gpio.h> |
29 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #define DRIVER_NAME "timb-gpio" | 32 | #define DRIVER_NAME "timb-gpio" |
32 | 33 | ||
@@ -130,6 +131,7 @@ static int timbgpio_irq_type(unsigned irq, unsigned trigger) | |||
130 | unsigned long flags; | 131 | unsigned long flags; |
131 | u32 lvr, flr, bflr = 0; | 132 | u32 lvr, flr, bflr = 0; |
132 | u32 ver; | 133 | u32 ver; |
134 | int ret = 0; | ||
133 | 135 | ||
134 | if (offset < 0 || offset > tgpio->gpio.ngpio) | 136 | if (offset < 0 || offset > tgpio->gpio.ngpio) |
135 | return -EINVAL; | 137 | return -EINVAL; |
@@ -153,8 +155,10 @@ static int timbgpio_irq_type(unsigned irq, unsigned trigger) | |||
153 | } | 155 | } |
154 | 156 | ||
155 | if ((trigger & IRQ_TYPE_EDGE_BOTH) == IRQ_TYPE_EDGE_BOTH) { | 157 | if ((trigger & IRQ_TYPE_EDGE_BOTH) == IRQ_TYPE_EDGE_BOTH) { |
156 | if (ver < 3) | 158 | if (ver < 3) { |
157 | return -EINVAL; | 159 | ret = -EINVAL; |
160 | goto out; | ||
161 | } | ||
158 | else { | 162 | else { |
159 | flr |= 1 << offset; | 163 | flr |= 1 << offset; |
160 | bflr |= 1 << offset; | 164 | bflr |= 1 << offset; |
@@ -174,9 +178,10 @@ static int timbgpio_irq_type(unsigned irq, unsigned trigger) | |||
174 | iowrite32(bflr, tgpio->membase + TGPIO_BFLR); | 178 | iowrite32(bflr, tgpio->membase + TGPIO_BFLR); |
175 | 179 | ||
176 | iowrite32(1 << offset, tgpio->membase + TGPIO_ICR); | 180 | iowrite32(1 << offset, tgpio->membase + TGPIO_ICR); |
177 | spin_unlock_irqrestore(&tgpio->lock, flags); | ||
178 | 181 | ||
179 | return 0; | 182 | out: |
183 | spin_unlock_irqrestore(&tgpio->lock, flags); | ||
184 | return ret; | ||
180 | } | 185 | } |
181 | 186 | ||
182 | static void timbgpio_irq(unsigned int irq, struct irq_desc *desc) | 187 | static void timbgpio_irq(unsigned int irq, struct irq_desc *desc) |
diff --git a/drivers/gpio/twl4030-gpio.c b/drivers/gpio/twl4030-gpio.c index 7fe881e2bdfb..57635ac35a73 100644 --- a/drivers/gpio/twl4030-gpio.c +++ b/drivers/gpio/twl4030-gpio.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/irq.h> | 32 | #include <linux/irq.h> |
33 | #include <linux/gpio.h> | 33 | #include <linux/gpio.h> |
34 | #include <linux/platform_device.h> | 34 | #include <linux/platform_device.h> |
35 | #include <linux/slab.h> | ||
36 | 35 | ||
37 | #include <linux/i2c/twl.h> | 36 | #include <linux/i2c/twl.h> |
38 | 37 | ||
diff --git a/drivers/gpio/wm831x-gpio.c b/drivers/gpio/wm831x-gpio.c index d09021f4a7d3..1fa449a1a4cb 100644 --- a/drivers/gpio/wm831x-gpio.c +++ b/drivers/gpio/wm831x-gpio.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
17 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
18 | #include <linux/mfd/core.h> | 19 | #include <linux/mfd/core.h> |
diff --git a/drivers/gpio/wm8350-gpiolib.c b/drivers/gpio/wm8350-gpiolib.c index 511840d1c7ba..359999290f55 100644 --- a/drivers/gpio/wm8350-gpiolib.c +++ b/drivers/gpio/wm8350-gpiolib.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
17 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
18 | #include <linux/mfd/core.h> | 19 | #include <linux/mfd/core.h> |
diff --git a/drivers/gpio/wm8994-gpio.c b/drivers/gpio/wm8994-gpio.c index de28b4a470ea..7607cc61e1dd 100644 --- a/drivers/gpio/wm8994-gpio.c +++ b/drivers/gpio/wm8994-gpio.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
17 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
18 | #include <linux/mfd/core.h> | 19 | #include <linux/mfd/core.h> |
diff --git a/drivers/gpio/xilinx_gpio.c b/drivers/gpio/xilinx_gpio.c index 3c1177abebd3..b8fa65b5bfca 100644 --- a/drivers/gpio/xilinx_gpio.c +++ b/drivers/gpio/xilinx_gpio.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/of_gpio.h> | 19 | #include <linux/of_gpio.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | /* Register Offset Definitions */ | 24 | /* Register Offset Definitions */ |
24 | #define XGPIO_DATA_OFFSET (0x0) /* Data register */ | 25 | #define XGPIO_DATA_OFFSET (0x0) /* Data register */ |
diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c index d68888fe3df9..ba38e0147220 100644 --- a/drivers/gpu/drm/drm_agpsupport.c +++ b/drivers/gpu/drm/drm_agpsupport.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include "drmP.h" | 34 | #include "drmP.h" |
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #if __OS_HAS_AGP | 38 | #if __OS_HAS_AGP |
38 | 39 | ||
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c index 8417cc4c43f1..f7ba82ebf65a 100644 --- a/drivers/gpu/drm/drm_bufs.c +++ b/drivers/gpu/drm/drm_bufs.c | |||
@@ -34,6 +34,7 @@ | |||
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/vmalloc.h> | 36 | #include <linux/vmalloc.h> |
37 | #include <linux/slab.h> | ||
37 | #include <linux/log2.h> | 38 | #include <linux/log2.h> |
38 | #include <asm/shmparam.h> | 39 | #include <asm/shmparam.h> |
39 | #include "drmP.h" | 40 | #include "drmP.h" |
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index d91fb8c0b7b3..61b9bcfdf040 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -30,6 +30,7 @@ | |||
30 | * Jesse Barnes <jesse.barnes@intel.com> | 30 | * Jesse Barnes <jesse.barnes@intel.com> |
31 | */ | 31 | */ |
32 | #include <linux/list.h> | 32 | #include <linux/list.h> |
33 | #include <linux/slab.h> | ||
33 | #include "drm.h" | 34 | #include "drm.h" |
34 | #include "drmP.h" | 35 | #include "drmP.h" |
35 | #include "drm_crtc.h" | 36 | #include "drm_crtc.h" |
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index f2aaf39be398..51103aa469f8 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
@@ -104,6 +104,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, | |||
104 | if (connector->status == connector_status_disconnected) { | 104 | if (connector->status == connector_status_disconnected) { |
105 | DRM_DEBUG_KMS("%s is disconnected\n", | 105 | DRM_DEBUG_KMS("%s is disconnected\n", |
106 | drm_get_connector_name(connector)); | 106 | drm_get_connector_name(connector)); |
107 | drm_mode_connector_update_edid_property(connector, NULL); | ||
107 | goto prune; | 108 | goto prune; |
108 | } | 109 | } |
109 | 110 | ||
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c index 9903f270e440..677b275fa721 100644 --- a/drivers/gpu/drm/drm_debugfs.c +++ b/drivers/gpu/drm/drm_debugfs.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include <linux/debugfs.h> | 33 | #include <linux/debugfs.h> |
34 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
35 | #include <linux/slab.h> | ||
35 | #include "drmP.h" | 36 | #include "drmP.h" |
36 | 37 | ||
37 | #if defined(CONFIG_DEBUG_FS) | 38 | #if defined(CONFIG_DEBUG_FS) |
diff --git a/drivers/gpu/drm/drm_dp_i2c_helper.c b/drivers/gpu/drm/drm_dp_i2c_helper.c index 548887c8506f..f7eba0a0973a 100644 --- a/drivers/gpu/drm/drm_dp_i2c_helper.c +++ b/drivers/gpu/drm/drm_dp_i2c_helper.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/init.h> | 26 | #include <linux/init.h> |
28 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
29 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index f3c58e2bd75c..4a66201edaec 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c | |||
@@ -47,6 +47,7 @@ | |||
47 | */ | 47 | */ |
48 | 48 | ||
49 | #include <linux/debugfs.h> | 49 | #include <linux/debugfs.h> |
50 | #include <linux/slab.h> | ||
50 | #include "drmP.h" | 51 | #include "drmP.h" |
51 | #include "drm_core.h" | 52 | #include "drm_core.h" |
52 | 53 | ||
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index f97e7c42ac8e..18f41d7061f0 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c | |||
@@ -27,6 +27,7 @@ | |||
27 | * DEALINGS IN THE SOFTWARE. | 27 | * DEALINGS IN THE SOFTWARE. |
28 | */ | 28 | */ |
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/i2c.h> | 31 | #include <linux/i2c.h> |
31 | #include <linux/i2c-algo-bit.h> | 32 | #include <linux/i2c-algo-bit.h> |
32 | #include "drmP.h" | 33 | #include "drmP.h" |
@@ -84,6 +85,8 @@ static struct edid_quirk { | |||
84 | 85 | ||
85 | /* Envision Peripherals, Inc. EN-7100e */ | 86 | /* Envision Peripherals, Inc. EN-7100e */ |
86 | { "EPI", 59264, EDID_QUIRK_135_CLOCK_TOO_HIGH }, | 87 | { "EPI", 59264, EDID_QUIRK_135_CLOCK_TOO_HIGH }, |
88 | /* Envision EN2028 */ | ||
89 | { "EPI", 8232, EDID_QUIRK_PREFER_LARGE_60 }, | ||
87 | 90 | ||
88 | /* Funai Electronics PM36B */ | 91 | /* Funai Electronics PM36B */ |
89 | { "FCM", 13600, EDID_QUIRK_PREFER_LARGE_75 | | 92 | { "FCM", 13600, EDID_QUIRK_PREFER_LARGE_75 | |
@@ -707,15 +710,6 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev, | |||
707 | mode->vsync_end = mode->vsync_start + vsync_pulse_width; | 710 | mode->vsync_end = mode->vsync_start + vsync_pulse_width; |
708 | mode->vtotal = mode->vdisplay + vblank; | 711 | mode->vtotal = mode->vdisplay + vblank; |
709 | 712 | ||
710 | /* perform the basic check for the detailed timing */ | ||
711 | if (mode->hsync_end > mode->htotal || | ||
712 | mode->vsync_end > mode->vtotal) { | ||
713 | drm_mode_destroy(dev, mode); | ||
714 | DRM_DEBUG_KMS("Incorrect detailed timing. " | ||
715 | "Sync is beyond the blank.\n"); | ||
716 | return NULL; | ||
717 | } | ||
718 | |||
719 | /* Some EDIDs have bogus h/vtotal values */ | 713 | /* Some EDIDs have bogus h/vtotal values */ |
720 | if (mode->hsync_end > mode->htotal) | 714 | if (mode->hsync_end > mode->htotal) |
721 | mode->htotal = mode->hsync_end + 1; | 715 | mode->htotal = mode->hsync_end + 1; |
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 50549703584f..288ea2f32772 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c | |||
@@ -29,6 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/sysrq.h> | 31 | #include <linux/sysrq.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/fb.h> | 33 | #include <linux/fb.h> |
33 | #include "drmP.h" | 34 | #include "drmP.h" |
34 | #include "drm_crtc.h" | 35 | #include "drm_crtc.h" |
@@ -283,6 +284,8 @@ static struct sysrq_key_op sysrq_drm_fb_helper_restore_op = { | |||
283 | .help_msg = "force-fb(V)", | 284 | .help_msg = "force-fb(V)", |
284 | .action_msg = "Restore framebuffer console", | 285 | .action_msg = "Restore framebuffer console", |
285 | }; | 286 | }; |
287 | #else | ||
288 | static struct sysrq_key_op sysrq_drm_fb_helper_restore_op = { }; | ||
286 | #endif | 289 | #endif |
287 | 290 | ||
288 | static void drm_fb_helper_on(struct fb_info *info) | 291 | static void drm_fb_helper_on(struct fb_info *info) |
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index 08d14df3bb42..9d532d7fdf59 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c | |||
@@ -36,6 +36,7 @@ | |||
36 | 36 | ||
37 | #include "drmP.h" | 37 | #include "drmP.h" |
38 | #include <linux/poll.h> | 38 | #include <linux/poll.h> |
39 | #include <linux/slab.h> | ||
39 | #include <linux/smp_lock.h> | 40 | #include <linux/smp_lock.h> |
40 | 41 | ||
41 | static int drm_open_helper(struct inode *inode, struct file *filp, | 42 | static int drm_open_helper(struct inode *inode, struct file *filp, |
@@ -140,14 +141,16 @@ int drm_open(struct inode *inode, struct file *filp) | |||
140 | spin_unlock(&dev->count_lock); | 141 | spin_unlock(&dev->count_lock); |
141 | } | 142 | } |
142 | out: | 143 | out: |
143 | mutex_lock(&dev->struct_mutex); | 144 | if (!retcode) { |
144 | if (minor->type == DRM_MINOR_LEGACY) { | 145 | mutex_lock(&dev->struct_mutex); |
145 | BUG_ON((dev->dev_mapping != NULL) && | 146 | if (minor->type == DRM_MINOR_LEGACY) { |
146 | (dev->dev_mapping != inode->i_mapping)); | 147 | if (dev->dev_mapping == NULL) |
147 | if (dev->dev_mapping == NULL) | 148 | dev->dev_mapping = inode->i_mapping; |
148 | dev->dev_mapping = inode->i_mapping; | 149 | else if (dev->dev_mapping != inode->i_mapping) |
150 | retcode = -ENODEV; | ||
151 | } | ||
152 | mutex_unlock(&dev->struct_mutex); | ||
149 | } | 153 | } |
150 | mutex_unlock(&dev->struct_mutex); | ||
151 | 154 | ||
152 | return retcode; | 155 | return retcode; |
153 | } | 156 | } |
diff --git a/drivers/gpu/drm/drm_hashtab.c b/drivers/gpu/drm/drm_hashtab.c index f36b21c5b2e1..a93d7b4ddaa6 100644 --- a/drivers/gpu/drm/drm_hashtab.c +++ b/drivers/gpu/drm/drm_hashtab.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "drmP.h" | 35 | #include "drmP.h" |
36 | #include "drm_hashtab.h" | 36 | #include "drm_hashtab.h" |
37 | #include <linux/hash.h> | 37 | #include <linux/hash.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | int drm_ht_create(struct drm_open_hash *ht, unsigned int order) | 40 | int drm_ht_create(struct drm_open_hash *ht, unsigned int order) |
40 | { | 41 | { |
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index b98384dbd9a7..3bd872761567 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "drmP.h" | 36 | #include "drmP.h" |
37 | 37 | ||
38 | #include <linux/interrupt.h> /* For task queue support */ | 38 | #include <linux/interrupt.h> /* For task queue support */ |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | #include <linux/vgaarb.h> | 41 | #include <linux/vgaarb.h> |
41 | /** | 42 | /** |
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index e68ebf92fa2a..2ea9ad4a8d69 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c | |||
@@ -37,6 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include <linux/pci.h> | 39 | #include <linux/pci.h> |
40 | #include <linux/slab.h> | ||
40 | #include <linux/dma-mapping.h> | 41 | #include <linux/dma-mapping.h> |
41 | #include "drmP.h" | 42 | #include "drmP.h" |
42 | 43 | ||
diff --git a/drivers/gpu/drm/drm_proc.c b/drivers/gpu/drm/drm_proc.c index d379c4f2892f..a9ba6b69ad35 100644 --- a/drivers/gpu/drm/drm_proc.c +++ b/drivers/gpu/drm/drm_proc.c | |||
@@ -38,6 +38,7 @@ | |||
38 | */ | 38 | */ |
39 | 39 | ||
40 | #include <linux/seq_file.h> | 40 | #include <linux/seq_file.h> |
41 | #include <linux/slab.h> | ||
41 | #include "drmP.h" | 42 | #include "drmP.h" |
42 | 43 | ||
43 | /*************************************************** | 44 | /*************************************************** |
diff --git a/drivers/gpu/drm/drm_scatter.c b/drivers/gpu/drm/drm_scatter.c index c7823c863d4f..9034c4c6100d 100644 --- a/drivers/gpu/drm/drm_scatter.c +++ b/drivers/gpu/drm/drm_scatter.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/vmalloc.h> | 34 | #include <linux/vmalloc.h> |
35 | #include <linux/slab.h> | ||
35 | #include "drmP.h" | 36 | #include "drmP.h" |
36 | 37 | ||
37 | #define DEBUG_SCATTER 0 | 38 | #define DEBUG_SCATTER 0 |
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index ad73e141afdb..b743411d8144 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/moduleparam.h> | 35 | #include <linux/moduleparam.h> |
36 | #include <linux/slab.h> | ||
36 | #include "drmP.h" | 37 | #include "drmP.h" |
37 | #include "drm_core.h" | 38 | #include "drm_core.h" |
38 | 39 | ||
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index 014ce24761b9..1a1825b29f5f 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/kdev_t.h> | 16 | #include <linux/kdev_t.h> |
17 | #include <linux/gfp.h> | ||
17 | #include <linux/err.h> | 18 | #include <linux/err.h> |
18 | 19 | ||
19 | #include "drm_sysfs.h" | 20 | #include "drm_sysfs.h" |
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index 4ac900f4647f..c3b13fb41d0c 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "drmP.h" | 36 | #include "drmP.h" |
37 | #if defined(__ia64__) | 37 | #if defined(__ia64__) |
38 | #include <linux/efi.h> | 38 | #include <linux/efi.h> |
39 | #include <linux/slab.h> | ||
39 | #endif | 40 | #endif |
40 | 41 | ||
41 | static void drm_vm_open(struct vm_area_struct *vma); | 42 | static void drm_vm_open(struct vm_area_struct *vma); |
diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c index de32d22a8c39..997d91707ad2 100644 --- a/drivers/gpu/drm/i810/i810_dma.c +++ b/drivers/gpu/drm/i810/i810_dma.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "i810_drv.h" | 36 | #include "i810_drv.h" |
37 | #include <linux/interrupt.h> /* For task queue support */ | 37 | #include <linux/interrupt.h> /* For task queue support */ |
38 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
39 | #include <linux/slab.h> | ||
39 | #include <linux/pagemap.h> | 40 | #include <linux/pagemap.h> |
40 | 41 | ||
41 | #define I810_BUF_FREE 2 | 42 | #define I810_BUF_FREE 2 |
diff --git a/drivers/gpu/drm/i830/i830_dma.c b/drivers/gpu/drm/i830/i830_dma.c index 06bd732e6463..65759a9a85c8 100644 --- a/drivers/gpu/drm/i830/i830_dma.c +++ b/drivers/gpu/drm/i830/i830_dma.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/interrupt.h> /* For task queue support */ | 38 | #include <linux/interrupt.h> /* For task queue support */ |
39 | #include <linux/pagemap.h> | 39 | #include <linux/pagemap.h> |
40 | #include <linux/delay.h> | 40 | #include <linux/delay.h> |
41 | #include <linux/slab.h> | ||
41 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
42 | 43 | ||
43 | #define I830_BUF_FREE 2 | 44 | #define I830_BUF_FREE 2 |
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 1376dfe44c95..b574503dddd0 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <linux/seq_file.h> | 29 | #include <linux/seq_file.h> |
30 | #include <linux/debugfs.h> | 30 | #include <linux/debugfs.h> |
31 | #include <linux/slab.h> | ||
31 | #include "drmP.h" | 32 | #include "drmP.h" |
32 | #include "drm.h" | 33 | #include "drm.h" |
33 | #include "i915_drm.h" | 34 | #include "i915_drm.h" |
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 8bfc0bbf13e6..2dc93939507d 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/acpi.h> | 38 | #include <linux/acpi.h> |
39 | #include <linux/pnp.h> | 39 | #include <linux/pnp.h> |
40 | #include <linux/vga_switcheroo.h> | 40 | #include <linux/vga_switcheroo.h> |
41 | #include <linux/slab.h> | ||
41 | 42 | ||
42 | /* Really want an OS-independent resettable timer. Would like to have | 43 | /* Really want an OS-independent resettable timer. Would like to have |
43 | * this loop run for (eg) 3 sec, but have the timer reset every time | 44 | * this loop run for (eg) 3 sec, but have the timer reset every time |
@@ -1881,29 +1882,29 @@ struct drm_ioctl_desc i915_ioctls[] = { | |||
1881 | DRM_IOCTL_DEF(DRM_I915_GET_VBLANK_PIPE, i915_vblank_pipe_get, DRM_AUTH ), | 1882 | DRM_IOCTL_DEF(DRM_I915_GET_VBLANK_PIPE, i915_vblank_pipe_get, DRM_AUTH ), |
1882 | DRM_IOCTL_DEF(DRM_I915_VBLANK_SWAP, i915_vblank_swap, DRM_AUTH), | 1883 | DRM_IOCTL_DEF(DRM_I915_VBLANK_SWAP, i915_vblank_swap, DRM_AUTH), |
1883 | DRM_IOCTL_DEF(DRM_I915_HWS_ADDR, i915_set_status_page, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), | 1884 | DRM_IOCTL_DEF(DRM_I915_HWS_ADDR, i915_set_status_page, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), |
1884 | DRM_IOCTL_DEF(DRM_I915_GEM_INIT, i915_gem_init_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), | 1885 | DRM_IOCTL_DEF(DRM_I915_GEM_INIT, i915_gem_init_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED), |
1885 | DRM_IOCTL_DEF(DRM_I915_GEM_EXECBUFFER, i915_gem_execbuffer, DRM_AUTH), | 1886 | DRM_IOCTL_DEF(DRM_I915_GEM_EXECBUFFER, i915_gem_execbuffer, DRM_AUTH|DRM_UNLOCKED), |
1886 | DRM_IOCTL_DEF(DRM_I915_GEM_EXECBUFFER2, i915_gem_execbuffer2, DRM_AUTH), | 1887 | DRM_IOCTL_DEF(DRM_I915_GEM_EXECBUFFER2, i915_gem_execbuffer2, DRM_AUTH|DRM_UNLOCKED), |
1887 | DRM_IOCTL_DEF(DRM_I915_GEM_PIN, i915_gem_pin_ioctl, DRM_AUTH|DRM_ROOT_ONLY), | 1888 | DRM_IOCTL_DEF(DRM_I915_GEM_PIN, i915_gem_pin_ioctl, DRM_AUTH|DRM_ROOT_ONLY|DRM_UNLOCKED), |
1888 | DRM_IOCTL_DEF(DRM_I915_GEM_UNPIN, i915_gem_unpin_ioctl, DRM_AUTH|DRM_ROOT_ONLY), | 1889 | DRM_IOCTL_DEF(DRM_I915_GEM_UNPIN, i915_gem_unpin_ioctl, DRM_AUTH|DRM_ROOT_ONLY|DRM_UNLOCKED), |
1889 | DRM_IOCTL_DEF(DRM_I915_GEM_BUSY, i915_gem_busy_ioctl, DRM_AUTH), | 1890 | DRM_IOCTL_DEF(DRM_I915_GEM_BUSY, i915_gem_busy_ioctl, DRM_AUTH|DRM_UNLOCKED), |
1890 | DRM_IOCTL_DEF(DRM_I915_GEM_THROTTLE, i915_gem_throttle_ioctl, DRM_AUTH), | 1891 | DRM_IOCTL_DEF(DRM_I915_GEM_THROTTLE, i915_gem_throttle_ioctl, DRM_AUTH|DRM_UNLOCKED), |
1891 | DRM_IOCTL_DEF(DRM_I915_GEM_ENTERVT, i915_gem_entervt_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), | 1892 | DRM_IOCTL_DEF(DRM_I915_GEM_ENTERVT, i915_gem_entervt_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED), |
1892 | DRM_IOCTL_DEF(DRM_I915_GEM_LEAVEVT, i915_gem_leavevt_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), | 1893 | DRM_IOCTL_DEF(DRM_I915_GEM_LEAVEVT, i915_gem_leavevt_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED), |
1893 | DRM_IOCTL_DEF(DRM_I915_GEM_CREATE, i915_gem_create_ioctl, 0), | 1894 | DRM_IOCTL_DEF(DRM_I915_GEM_CREATE, i915_gem_create_ioctl, DRM_UNLOCKED), |
1894 | DRM_IOCTL_DEF(DRM_I915_GEM_PREAD, i915_gem_pread_ioctl, 0), | 1895 | DRM_IOCTL_DEF(DRM_I915_GEM_PREAD, i915_gem_pread_ioctl, DRM_UNLOCKED), |
1895 | DRM_IOCTL_DEF(DRM_I915_GEM_PWRITE, i915_gem_pwrite_ioctl, 0), | 1896 | DRM_IOCTL_DEF(DRM_I915_GEM_PWRITE, i915_gem_pwrite_ioctl, DRM_UNLOCKED), |
1896 | DRM_IOCTL_DEF(DRM_I915_GEM_MMAP, i915_gem_mmap_ioctl, 0), | 1897 | DRM_IOCTL_DEF(DRM_I915_GEM_MMAP, i915_gem_mmap_ioctl, DRM_UNLOCKED), |
1897 | DRM_IOCTL_DEF(DRM_I915_GEM_MMAP_GTT, i915_gem_mmap_gtt_ioctl, 0), | 1898 | DRM_IOCTL_DEF(DRM_I915_GEM_MMAP_GTT, i915_gem_mmap_gtt_ioctl, DRM_UNLOCKED), |
1898 | DRM_IOCTL_DEF(DRM_I915_GEM_SET_DOMAIN, i915_gem_set_domain_ioctl, 0), | 1899 | DRM_IOCTL_DEF(DRM_I915_GEM_SET_DOMAIN, i915_gem_set_domain_ioctl, DRM_UNLOCKED), |
1899 | DRM_IOCTL_DEF(DRM_I915_GEM_SW_FINISH, i915_gem_sw_finish_ioctl, 0), | 1900 | DRM_IOCTL_DEF(DRM_I915_GEM_SW_FINISH, i915_gem_sw_finish_ioctl, DRM_UNLOCKED), |
1900 | DRM_IOCTL_DEF(DRM_I915_GEM_SET_TILING, i915_gem_set_tiling, 0), | 1901 | DRM_IOCTL_DEF(DRM_I915_GEM_SET_TILING, i915_gem_set_tiling, DRM_UNLOCKED), |
1901 | DRM_IOCTL_DEF(DRM_I915_GEM_GET_TILING, i915_gem_get_tiling, 0), | 1902 | DRM_IOCTL_DEF(DRM_I915_GEM_GET_TILING, i915_gem_get_tiling, DRM_UNLOCKED), |
1902 | DRM_IOCTL_DEF(DRM_I915_GEM_GET_APERTURE, i915_gem_get_aperture_ioctl, 0), | 1903 | DRM_IOCTL_DEF(DRM_I915_GEM_GET_APERTURE, i915_gem_get_aperture_ioctl, DRM_UNLOCKED), |
1903 | DRM_IOCTL_DEF(DRM_I915_GET_PIPE_FROM_CRTC_ID, intel_get_pipe_from_crtc_id, 0), | 1904 | DRM_IOCTL_DEF(DRM_I915_GET_PIPE_FROM_CRTC_ID, intel_get_pipe_from_crtc_id, DRM_UNLOCKED), |
1904 | DRM_IOCTL_DEF(DRM_I915_GEM_MADVISE, i915_gem_madvise_ioctl, 0), | 1905 | DRM_IOCTL_DEF(DRM_I915_GEM_MADVISE, i915_gem_madvise_ioctl, DRM_UNLOCKED), |
1905 | DRM_IOCTL_DEF(DRM_I915_OVERLAY_PUT_IMAGE, intel_overlay_put_image, DRM_MASTER|DRM_CONTROL_ALLOW), | 1906 | DRM_IOCTL_DEF(DRM_I915_OVERLAY_PUT_IMAGE, intel_overlay_put_image, DRM_MASTER|DRM_CONTROL_ALLOW|DRM_UNLOCKED), |
1906 | DRM_IOCTL_DEF(DRM_I915_OVERLAY_ATTRS, intel_overlay_attrs, DRM_MASTER|DRM_CONTROL_ALLOW), | 1907 | DRM_IOCTL_DEF(DRM_I915_OVERLAY_ATTRS, intel_overlay_attrs, DRM_MASTER|DRM_CONTROL_ALLOW|DRM_UNLOCKED), |
1907 | }; | 1908 | }; |
1908 | 1909 | ||
1909 | int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls); | 1910 | int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls); |
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 1b2e95455c05..4b26919abdb2 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c | |||
@@ -139,12 +139,12 @@ const static struct intel_device_info intel_ironlake_m_info = { | |||
139 | 139 | ||
140 | const static struct intel_device_info intel_sandybridge_d_info = { | 140 | const static struct intel_device_info intel_sandybridge_d_info = { |
141 | .is_i965g = 1, .is_i9xx = 1, .need_gfx_hws = 1, | 141 | .is_i965g = 1, .is_i9xx = 1, .need_gfx_hws = 1, |
142 | .has_hotplug = 1, | 142 | .has_hotplug = 1, .is_gen6 = 1, |
143 | }; | 143 | }; |
144 | 144 | ||
145 | const static struct intel_device_info intel_sandybridge_m_info = { | 145 | const static struct intel_device_info intel_sandybridge_m_info = { |
146 | .is_i965g = 1, .is_mobile = 1, .is_i9xx = 1, .need_gfx_hws = 1, | 146 | .is_i965g = 1, .is_mobile = 1, .is_i9xx = 1, .need_gfx_hws = 1, |
147 | .has_hotplug = 1, | 147 | .has_hotplug = 1, .is_gen6 = 1, |
148 | }; | 148 | }; |
149 | 149 | ||
150 | const static struct pci_device_id pciidlist[] = { | 150 | const static struct pci_device_id pciidlist[] = { |
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 979439cfb827..aba8260fbc5e 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -205,6 +205,7 @@ struct intel_device_info { | |||
205 | u8 is_g4x : 1; | 205 | u8 is_g4x : 1; |
206 | u8 is_pineview : 1; | 206 | u8 is_pineview : 1; |
207 | u8 is_ironlake : 1; | 207 | u8 is_ironlake : 1; |
208 | u8 is_gen6 : 1; | ||
208 | u8 has_fbc : 1; | 209 | u8 has_fbc : 1; |
209 | u8 has_rc6 : 1; | 210 | u8 has_rc6 : 1; |
210 | u8 has_pipe_cxsr : 1; | 211 | u8 has_pipe_cxsr : 1; |
@@ -1084,6 +1085,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
1084 | #define IS_IRONLAKE_M(dev) ((dev)->pci_device == 0x0046) | 1085 | #define IS_IRONLAKE_M(dev) ((dev)->pci_device == 0x0046) |
1085 | #define IS_IRONLAKE(dev) (INTEL_INFO(dev)->is_ironlake) | 1086 | #define IS_IRONLAKE(dev) (INTEL_INFO(dev)->is_ironlake) |
1086 | #define IS_I9XX(dev) (INTEL_INFO(dev)->is_i9xx) | 1087 | #define IS_I9XX(dev) (INTEL_INFO(dev)->is_i9xx) |
1088 | #define IS_GEN6(dev) (INTEL_INFO(dev)->is_gen6) | ||
1087 | #define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) | 1089 | #define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) |
1088 | 1090 | ||
1089 | #define IS_GEN3(dev) (IS_I915G(dev) || \ | 1091 | #define IS_GEN3(dev) (IS_I915G(dev) || \ |
@@ -1107,8 +1109,6 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
1107 | 1109 | ||
1108 | #define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws) | 1110 | #define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws) |
1109 | 1111 | ||
1110 | #define IS_GEN6(dev) ((dev)->pci_device == 0x0102) | ||
1111 | |||
1112 | /* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte | 1112 | /* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte |
1113 | * rows, which changed the alignment requirements and fence programming. | 1113 | * rows, which changed the alignment requirements and fence programming. |
1114 | */ | 1114 | */ |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index fba37e9f775d..368d726853d1 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "i915_drv.h" | 31 | #include "i915_drv.h" |
32 | #include "i915_trace.h" | 32 | #include "i915_trace.h" |
33 | #include "intel_drv.h" | 33 | #include "intel_drv.h" |
34 | #include <linux/slab.h> | ||
34 | #include <linux/swap.h> | 35 | #include <linux/swap.h> |
35 | #include <linux/pci.h> | 36 | #include <linux/pci.h> |
36 | 37 | ||
@@ -1466,9 +1467,6 @@ i915_gem_object_put_pages(struct drm_gem_object *obj) | |||
1466 | obj_priv->dirty = 0; | 1467 | obj_priv->dirty = 0; |
1467 | 1468 | ||
1468 | for (i = 0; i < page_count; i++) { | 1469 | for (i = 0; i < page_count; i++) { |
1469 | if (obj_priv->pages[i] == NULL) | ||
1470 | break; | ||
1471 | |||
1472 | if (obj_priv->dirty) | 1470 | if (obj_priv->dirty) |
1473 | set_page_dirty(obj_priv->pages[i]); | 1471 | set_page_dirty(obj_priv->pages[i]); |
1474 | 1472 | ||
@@ -2227,11 +2225,6 @@ i915_gem_evict_something(struct drm_device *dev, int min_size) | |||
2227 | seqno = i915_add_request(dev, NULL, obj->write_domain); | 2225 | seqno = i915_add_request(dev, NULL, obj->write_domain); |
2228 | if (seqno == 0) | 2226 | if (seqno == 0) |
2229 | return -ENOMEM; | 2227 | return -ENOMEM; |
2230 | |||
2231 | ret = i915_wait_request(dev, seqno); | ||
2232 | if (ret) | ||
2233 | return ret; | ||
2234 | |||
2235 | continue; | 2228 | continue; |
2236 | } | 2229 | } |
2237 | } | 2230 | } |
@@ -2256,7 +2249,6 @@ i915_gem_object_get_pages(struct drm_gem_object *obj, | |||
2256 | struct address_space *mapping; | 2249 | struct address_space *mapping; |
2257 | struct inode *inode; | 2250 | struct inode *inode; |
2258 | struct page *page; | 2251 | struct page *page; |
2259 | int ret; | ||
2260 | 2252 | ||
2261 | if (obj_priv->pages_refcount++ != 0) | 2253 | if (obj_priv->pages_refcount++ != 0) |
2262 | return 0; | 2254 | return 0; |
@@ -2279,11 +2271,9 @@ i915_gem_object_get_pages(struct drm_gem_object *obj, | |||
2279 | mapping_gfp_mask (mapping) | | 2271 | mapping_gfp_mask (mapping) | |
2280 | __GFP_COLD | | 2272 | __GFP_COLD | |
2281 | gfpmask); | 2273 | gfpmask); |
2282 | if (IS_ERR(page)) { | 2274 | if (IS_ERR(page)) |
2283 | ret = PTR_ERR(page); | 2275 | goto err_pages; |
2284 | i915_gem_object_put_pages(obj); | 2276 | |
2285 | return ret; | ||
2286 | } | ||
2287 | obj_priv->pages[i] = page; | 2277 | obj_priv->pages[i] = page; |
2288 | } | 2278 | } |
2289 | 2279 | ||
@@ -2291,6 +2281,15 @@ i915_gem_object_get_pages(struct drm_gem_object *obj, | |||
2291 | i915_gem_object_do_bit_17_swizzle(obj); | 2281 | i915_gem_object_do_bit_17_swizzle(obj); |
2292 | 2282 | ||
2293 | return 0; | 2283 | return 0; |
2284 | |||
2285 | err_pages: | ||
2286 | while (i--) | ||
2287 | page_cache_release(obj_priv->pages[i]); | ||
2288 | |||
2289 | drm_free_large(obj_priv->pages); | ||
2290 | obj_priv->pages = NULL; | ||
2291 | obj_priv->pages_refcount--; | ||
2292 | return PTR_ERR(page); | ||
2294 | } | 2293 | } |
2295 | 2294 | ||
2296 | static void sandybridge_write_fence_reg(struct drm_i915_fence_reg *reg) | 2295 | static void sandybridge_write_fence_reg(struct drm_i915_fence_reg *reg) |
@@ -4730,6 +4729,11 @@ i915_gem_init_ringbuffer(struct drm_device *dev) | |||
4730 | ring->space += ring->Size; | 4729 | ring->space += ring->Size; |
4731 | } | 4730 | } |
4732 | 4731 | ||
4732 | if (IS_I9XX(dev) && !IS_GEN3(dev)) { | ||
4733 | I915_WRITE(MI_MODE, | ||
4734 | (VS_TIMER_DISPATCH) << 16 | VS_TIMER_DISPATCH); | ||
4735 | } | ||
4736 | |||
4733 | return 0; | 4737 | return 0; |
4734 | } | 4738 | } |
4735 | 4739 | ||
diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c index b5c55d88ff76..c01c878e51ba 100644 --- a/drivers/gpu/drm/i915/i915_gem_tiling.c +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c | |||
@@ -325,9 +325,12 @@ i915_gem_set_tiling(struct drm_device *dev, void *data, | |||
325 | * need to ensure that any fence register is cleared. | 325 | * need to ensure that any fence register is cleared. |
326 | */ | 326 | */ |
327 | if (!i915_gem_object_fence_offset_ok(obj, args->tiling_mode)) | 327 | if (!i915_gem_object_fence_offset_ok(obj, args->tiling_mode)) |
328 | ret = i915_gem_object_unbind(obj); | 328 | ret = i915_gem_object_unbind(obj); |
329 | else if (obj_priv->fence_reg != I915_FENCE_REG_NONE) | ||
330 | ret = i915_gem_object_put_fence_reg(obj); | ||
329 | else | 331 | else |
330 | ret = i915_gem_object_put_fence_reg(obj); | 332 | i915_gem_release_mmap(obj); |
333 | |||
331 | if (ret != 0) { | 334 | if (ret != 0) { |
332 | WARN(ret != -ERESTARTSYS, | 335 | WARN(ret != -ERESTARTSYS, |
333 | "failed to reset object for tiling switch"); | 336 | "failed to reset object for tiling switch"); |
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 5388354da0d1..49c458bc6502 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/sysrq.h> | 29 | #include <linux/sysrq.h> |
30 | #include <linux/slab.h> | ||
30 | #include "drmP.h" | 31 | #include "drmP.h" |
31 | #include "drm.h" | 32 | #include "drm.h" |
32 | #include "i915_drm.h" | 33 | #include "i915_drm.h" |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 3d59862c7ccd..cbbf59f56dfa 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -298,6 +298,10 @@ | |||
298 | #define INSTDONE 0x02090 | 298 | #define INSTDONE 0x02090 |
299 | #define NOPID 0x02094 | 299 | #define NOPID 0x02094 |
300 | #define HWSTAM 0x02098 | 300 | #define HWSTAM 0x02098 |
301 | |||
302 | #define MI_MODE 0x0209c | ||
303 | # define VS_TIMER_DISPATCH (1 << 6) | ||
304 | |||
301 | #define SCPD0 0x0209c /* 915+ only */ | 305 | #define SCPD0 0x0209c /* 915+ only */ |
302 | #define IER 0x020a0 | 306 | #define IER 0x020a0 |
303 | #define IIR 0x020a4 | 307 | #define IIR 0x020a4 |
@@ -366,7 +370,7 @@ | |||
366 | #define FBC_CTL_PERIODIC (1<<30) | 370 | #define FBC_CTL_PERIODIC (1<<30) |
367 | #define FBC_CTL_INTERVAL_SHIFT (16) | 371 | #define FBC_CTL_INTERVAL_SHIFT (16) |
368 | #define FBC_CTL_UNCOMPRESSIBLE (1<<14) | 372 | #define FBC_CTL_UNCOMPRESSIBLE (1<<14) |
369 | #define FBC_C3_IDLE (1<<13) | 373 | #define FBC_CTL_C3_IDLE (1<<13) |
370 | #define FBC_CTL_STRIDE_SHIFT (5) | 374 | #define FBC_CTL_STRIDE_SHIFT (5) |
371 | #define FBC_CTL_FENCENO (1<<0) | 375 | #define FBC_CTL_FENCENO (1<<0) |
372 | #define FBC_COMMAND 0x0320c | 376 | #define FBC_COMMAND 0x0320c |
@@ -2172,6 +2176,14 @@ | |||
2172 | #define DISPLAY_PORT_PLL_BIOS_1 0x46010 | 2176 | #define DISPLAY_PORT_PLL_BIOS_1 0x46010 |
2173 | #define DISPLAY_PORT_PLL_BIOS_2 0x46014 | 2177 | #define DISPLAY_PORT_PLL_BIOS_2 0x46014 |
2174 | 2178 | ||
2179 | #define PCH_DSPCLK_GATE_D 0x42020 | ||
2180 | # define DPFDUNIT_CLOCK_GATE_DISABLE (1 << 7) | ||
2181 | # define DPARBUNIT_CLOCK_GATE_DISABLE (1 << 5) | ||
2182 | |||
2183 | #define PCH_3DCGDIS0 0x46020 | ||
2184 | # define MARIUNIT_CLOCK_GATE_DISABLE (1 << 18) | ||
2185 | # define SVSMUNIT_CLOCK_GATE_DISABLE (1 << 1) | ||
2186 | |||
2175 | #define FDI_PLL_FREQ_CTL 0x46030 | 2187 | #define FDI_PLL_FREQ_CTL 0x46030 |
2176 | #define FDI_PLL_FREQ_CHANGE_REQUEST (1<<24) | 2188 | #define FDI_PLL_FREQ_CHANGE_REQUEST (1<<24) |
2177 | #define FDI_PLL_FREQ_LOCK_LIMIT_MASK 0xfff00 | 2189 | #define FDI_PLL_FREQ_LOCK_LIMIT_MASK 0xfff00 |
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 70c9d4ba7042..f9ba452f0cbf 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c | |||
@@ -417,8 +417,9 @@ parse_edp(struct drm_i915_private *dev_priv, struct bdb_header *bdb) | |||
417 | edp = find_section(bdb, BDB_EDP); | 417 | edp = find_section(bdb, BDB_EDP); |
418 | if (!edp) { | 418 | if (!edp) { |
419 | if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->edp_support) { | 419 | if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->edp_support) { |
420 | DRM_DEBUG_KMS("No eDP BDB found but eDP panel supported,\ | 420 | DRM_DEBUG_KMS("No eDP BDB found but eDP panel " |
421 | assume 18bpp panel color depth.\n"); | 421 | "supported, assume 18bpp panel color " |
422 | "depth.\n"); | ||
422 | dev_priv->edp_bpp = 18; | 423 | dev_priv->edp_bpp = 18; |
423 | } | 424 | } |
424 | return; | 425 | return; |
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index fccf07470c8f..38110ce742a5 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
28 | #include <linux/slab.h> | ||
28 | #include "drmP.h" | 29 | #include "drmP.h" |
29 | #include "drm.h" | 30 | #include "drm.h" |
30 | #include "drm_crtc.h" | 31 | #include "drm_crtc.h" |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 9cd6de5f9906..e7e753b2845f 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/input.h> | 28 | #include <linux/input.h> |
29 | #include <linux/i2c.h> | 29 | #include <linux/i2c.h> |
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/slab.h> | ||
31 | #include "drmP.h" | 32 | #include "drmP.h" |
32 | #include "intel_drv.h" | 33 | #include "intel_drv.h" |
33 | #include "i915_drm.h" | 34 | #include "i915_drm.h" |
@@ -1032,7 +1033,7 @@ static void i8xx_enable_fbc(struct drm_crtc *crtc, unsigned long interval) | |||
1032 | /* enable it... */ | 1033 | /* enable it... */ |
1033 | fbc_ctl = FBC_CTL_EN | FBC_CTL_PERIODIC; | 1034 | fbc_ctl = FBC_CTL_EN | FBC_CTL_PERIODIC; |
1034 | if (IS_I945GM(dev)) | 1035 | if (IS_I945GM(dev)) |
1035 | fbc_ctl |= FBC_C3_IDLE; /* 945 needs special SR handling */ | 1036 | fbc_ctl |= FBC_CTL_C3_IDLE; /* 945 needs special SR handling */ |
1036 | fbc_ctl |= (dev_priv->cfb_pitch & 0xff) << FBC_CTL_STRIDE_SHIFT; | 1037 | fbc_ctl |= (dev_priv->cfb_pitch & 0xff) << FBC_CTL_STRIDE_SHIFT; |
1037 | fbc_ctl |= (interval & 0x2fff) << FBC_CTL_INTERVAL_SHIFT; | 1038 | fbc_ctl |= (interval & 0x2fff) << FBC_CTL_INTERVAL_SHIFT; |
1038 | if (obj_priv->tiling_mode != I915_TILING_NONE) | 1039 | if (obj_priv->tiling_mode != I915_TILING_NONE) |
@@ -4717,6 +4718,20 @@ void intel_init_clock_gating(struct drm_device *dev) | |||
4717 | * specs, but enable as much else as we can. | 4718 | * specs, but enable as much else as we can. |
4718 | */ | 4719 | */ |
4719 | if (HAS_PCH_SPLIT(dev)) { | 4720 | if (HAS_PCH_SPLIT(dev)) { |
4721 | uint32_t dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE; | ||
4722 | |||
4723 | if (IS_IRONLAKE(dev)) { | ||
4724 | /* Required for FBC */ | ||
4725 | dspclk_gate |= DPFDUNIT_CLOCK_GATE_DISABLE; | ||
4726 | /* Required for CxSR */ | ||
4727 | dspclk_gate |= DPARBUNIT_CLOCK_GATE_DISABLE; | ||
4728 | |||
4729 | I915_WRITE(PCH_3DCGDIS0, | ||
4730 | MARIUNIT_CLOCK_GATE_DISABLE | | ||
4731 | SVSMUNIT_CLOCK_GATE_DISABLE); | ||
4732 | } | ||
4733 | |||
4734 | I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate); | ||
4720 | return; | 4735 | return; |
4721 | } else if (IS_G4X(dev)) { | 4736 | } else if (IS_G4X(dev)) { |
4722 | uint32_t dspclk_gate; | 4737 | uint32_t dspclk_gate; |
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 3ef3a0d0edd0..8e283f75941d 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
29 | #include <linux/slab.h> | ||
29 | #include "drmP.h" | 30 | #include "drmP.h" |
30 | #include "drm.h" | 31 | #include "drm.h" |
31 | #include "drm_crtc.h" | 32 | #include "drm_crtc.h" |
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c index a4d2606de778..0427ca5a2514 100644 --- a/drivers/gpu/drm/i915/intel_dvo.c +++ b/drivers/gpu/drm/i915/intel_dvo.c | |||
@@ -25,6 +25,7 @@ | |||
25 | * Eric Anholt <eric@anholt.net> | 25 | * Eric Anholt <eric@anholt.net> |
26 | */ | 26 | */ |
27 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
28 | #include <linux/slab.h> | ||
28 | #include "drmP.h" | 29 | #include "drmP.h" |
29 | #include "drm.h" | 30 | #include "drm.h" |
30 | #include "drm_crtc.h" | 31 | #include "drm_crtc.h" |
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index 8cd791dc5b29..69bbef92f130 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/string.h> | 30 | #include <linux/string.h> |
31 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
32 | #include <linux/tty.h> | 32 | #include <linux/tty.h> |
33 | #include <linux/slab.h> | ||
34 | #include <linux/sysrq.h> | 33 | #include <linux/sysrq.h> |
35 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
36 | #include <linux/fb.h> | 35 | #include <linux/fb.h> |
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index a30f8bfc1985..1ed02f641258 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/i2c.h> | 29 | #include <linux/i2c.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
31 | #include "drmP.h" | 32 | #include "drmP.h" |
32 | #include "drm.h" | 33 | #include "drm.h" |
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c index fcc753ca5d94..c2649c7df14c 100644 --- a/drivers/gpu/drm/i915/intel_i2c.c +++ b/drivers/gpu/drm/i915/intel_i2c.c | |||
@@ -26,6 +26,7 @@ | |||
26 | * Eric Anholt <eric@anholt.net> | 26 | * Eric Anholt <eric@anholt.net> |
27 | */ | 27 | */ |
28 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/i2c-id.h> | 30 | #include <linux/i2c-id.h> |
30 | #include <linux/i2c-algo-bit.h> | 31 | #include <linux/i2c-algo-bit.h> |
31 | #include "drmP.h" | 32 | #include "drmP.h" |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 14e516fdc2dd..216e9f52b6e0 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <acpi/button.h> | 30 | #include <acpi/button.h> |
31 | #include <linux/dmi.h> | 31 | #include <linux/dmi.h> |
32 | #include <linux/i2c.h> | 32 | #include <linux/i2c.h> |
33 | #include <linux/slab.h> | ||
33 | #include "drmP.h" | 34 | #include "drmP.h" |
34 | #include "drm.h" | 35 | #include "drm.h" |
35 | #include "drm_crtc.h" | 36 | #include "drm_crtc.h" |
@@ -607,53 +608,6 @@ static void intel_lvds_mode_set(struct drm_encoder *encoder, | |||
607 | I915_WRITE(PFIT_CONTROL, lvds_priv->pfit_control); | 608 | I915_WRITE(PFIT_CONTROL, lvds_priv->pfit_control); |
608 | } | 609 | } |
609 | 610 | ||
610 | /* Some lid devices report incorrect lid status, assume they're connected */ | ||
611 | static const struct dmi_system_id bad_lid_status[] = { | ||
612 | { | ||
613 | .ident = "Compaq nx9020", | ||
614 | .matches = { | ||
615 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
616 | DMI_MATCH(DMI_BOARD_NAME, "3084"), | ||
617 | }, | ||
618 | }, | ||
619 | { | ||
620 | .ident = "Samsung SX20S", | ||
621 | .matches = { | ||
622 | DMI_MATCH(DMI_SYS_VENDOR, "Samsung Electronics"), | ||
623 | DMI_MATCH(DMI_BOARD_NAME, "SX20S"), | ||
624 | }, | ||
625 | }, | ||
626 | { | ||
627 | .ident = "Aspire One", | ||
628 | .matches = { | ||
629 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
630 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire one"), | ||
631 | }, | ||
632 | }, | ||
633 | { | ||
634 | .ident = "Aspire 1810T", | ||
635 | .matches = { | ||
636 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
637 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1810T"), | ||
638 | }, | ||
639 | }, | ||
640 | { | ||
641 | .ident = "PC-81005", | ||
642 | .matches = { | ||
643 | DMI_MATCH(DMI_SYS_VENDOR, "MALATA"), | ||
644 | DMI_MATCH(DMI_PRODUCT_NAME, "PC-81005"), | ||
645 | }, | ||
646 | }, | ||
647 | { | ||
648 | .ident = "Clevo M5x0N", | ||
649 | .matches = { | ||
650 | DMI_MATCH(DMI_SYS_VENDOR, "CLEVO Co."), | ||
651 | DMI_MATCH(DMI_BOARD_NAME, "M5x0N"), | ||
652 | }, | ||
653 | }, | ||
654 | { } | ||
655 | }; | ||
656 | |||
657 | /** | 611 | /** |
658 | * Detect the LVDS connection. | 612 | * Detect the LVDS connection. |
659 | * | 613 | * |
@@ -669,12 +623,9 @@ static enum drm_connector_status intel_lvds_detect(struct drm_connector *connect | |||
669 | /* ACPI lid methods were generally unreliable in this generation, so | 623 | /* ACPI lid methods were generally unreliable in this generation, so |
670 | * don't even bother. | 624 | * don't even bother. |
671 | */ | 625 | */ |
672 | if (IS_GEN2(dev)) | 626 | if (IS_GEN2(dev) || IS_GEN3(dev)) |
673 | return connector_status_connected; | 627 | return connector_status_connected; |
674 | 628 | ||
675 | if (!dmi_check_system(bad_lid_status) && !acpi_lid_open()) | ||
676 | status = connector_status_disconnected; | ||
677 | |||
678 | return status; | 629 | return status; |
679 | } | 630 | } |
680 | 631 | ||
diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c index 67e2f4632a24..89d303d1d3fb 100644 --- a/drivers/gpu/drm/i915/intel_modes.c +++ b/drivers/gpu/drm/i915/intel_modes.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * DEALINGS IN THE SOFTWARE. | 23 | * DEALINGS IN THE SOFTWARE. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/slab.h> | ||
26 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
27 | #include <linux/fb.h> | 28 | #include <linux/fb.h> |
28 | #include "drmP.h" | 29 | #include "drmP.h" |
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index d355d1d527e7..60595fc26fdd 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c | |||
@@ -1068,14 +1068,18 @@ int intel_overlay_put_image(struct drm_device *dev, void *data, | |||
1068 | 1068 | ||
1069 | drmmode_obj = drm_mode_object_find(dev, put_image_rec->crtc_id, | 1069 | drmmode_obj = drm_mode_object_find(dev, put_image_rec->crtc_id, |
1070 | DRM_MODE_OBJECT_CRTC); | 1070 | DRM_MODE_OBJECT_CRTC); |
1071 | if (!drmmode_obj) | 1071 | if (!drmmode_obj) { |
1072 | return -ENOENT; | 1072 | ret = -ENOENT; |
1073 | goto out_free; | ||
1074 | } | ||
1073 | crtc = to_intel_crtc(obj_to_crtc(drmmode_obj)); | 1075 | crtc = to_intel_crtc(obj_to_crtc(drmmode_obj)); |
1074 | 1076 | ||
1075 | new_bo = drm_gem_object_lookup(dev, file_priv, | 1077 | new_bo = drm_gem_object_lookup(dev, file_priv, |
1076 | put_image_rec->bo_handle); | 1078 | put_image_rec->bo_handle); |
1077 | if (!new_bo) | 1079 | if (!new_bo) { |
1078 | return -ENOENT; | 1080 | ret = -ENOENT; |
1081 | goto out_free; | ||
1082 | } | ||
1079 | 1083 | ||
1080 | mutex_lock(&dev->mode_config.mutex); | 1084 | mutex_lock(&dev->mode_config.mutex); |
1081 | mutex_lock(&dev->struct_mutex); | 1085 | mutex_lock(&dev->struct_mutex); |
@@ -1165,6 +1169,7 @@ out_unlock: | |||
1165 | mutex_unlock(&dev->struct_mutex); | 1169 | mutex_unlock(&dev->struct_mutex); |
1166 | mutex_unlock(&dev->mode_config.mutex); | 1170 | mutex_unlock(&dev->mode_config.mutex); |
1167 | drm_gem_object_unreference_unlocked(new_bo); | 1171 | drm_gem_object_unreference_unlocked(new_bo); |
1172 | out_free: | ||
1168 | kfree(params); | 1173 | kfree(params); |
1169 | 1174 | ||
1170 | return ret; | 1175 | return ret; |
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 48daee5c9c63..26e13a0bf30b 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
@@ -26,6 +26,7 @@ | |||
26 | * Eric Anholt <eric@anholt.net> | 26 | * Eric Anholt <eric@anholt.net> |
27 | */ | 27 | */ |
28 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
30 | #include "drmP.h" | 31 | #include "drmP.h" |
31 | #include "drm.h" | 32 | #include "drm.h" |
diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile index 32db806f3b5a..453df3f6053f 100644 --- a/drivers/gpu/drm/nouveau/Makefile +++ b/drivers/gpu/drm/nouveau/Makefile | |||
@@ -12,7 +12,7 @@ nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ | |||
12 | nouveau_dp.o nouveau_grctx.o \ | 12 | nouveau_dp.o nouveau_grctx.o \ |
13 | nv04_timer.o \ | 13 | nv04_timer.o \ |
14 | nv04_mc.o nv40_mc.o nv50_mc.o \ | 14 | nv04_mc.o nv40_mc.o nv50_mc.o \ |
15 | nv04_fb.o nv10_fb.o nv40_fb.o \ | 15 | nv04_fb.o nv10_fb.o nv40_fb.o nv50_fb.o \ |
16 | nv04_fifo.o nv10_fifo.o nv40_fifo.o nv50_fifo.o \ | 16 | nv04_fifo.o nv10_fifo.o nv40_fifo.o nv50_fifo.o \ |
17 | nv04_graph.o nv10_graph.o nv20_graph.o \ | 17 | nv04_graph.o nv10_graph.o nv20_graph.o \ |
18 | nv40_graph.o nv50_graph.o \ | 18 | nv40_graph.o nv50_graph.o \ |
@@ -22,7 +22,7 @@ nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ | |||
22 | nv50_cursor.o nv50_display.o nv50_fbcon.o \ | 22 | nv50_cursor.o nv50_display.o nv50_fbcon.o \ |
23 | nv04_dac.o nv04_dfp.o nv04_tv.o nv17_tv.o nv17_tv_modes.o \ | 23 | nv04_dac.o nv04_dfp.o nv04_tv.o nv17_tv.o nv17_tv_modes.o \ |
24 | nv04_crtc.o nv04_display.o nv04_cursor.o nv04_fbcon.o \ | 24 | nv04_crtc.o nv04_display.o nv04_cursor.o nv04_fbcon.o \ |
25 | nv17_gpio.o | 25 | nv17_gpio.o nv50_gpio.o |
26 | 26 | ||
27 | nouveau-$(CONFIG_DRM_NOUVEAU_DEBUG) += nouveau_debugfs.o | 27 | nouveau-$(CONFIG_DRM_NOUVEAU_DEBUG) += nouveau_debugfs.o |
28 | nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o | 28 | nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o |
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index 0e0730a53137..e13f6af0037a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/pci.h> | 1 | #include <linux/pci.h> |
2 | #include <linux/acpi.h> | 2 | #include <linux/acpi.h> |
3 | #include <linux/slab.h> | ||
3 | #include <acpi/acpi_drivers.h> | 4 | #include <acpi/acpi_drivers.h> |
4 | #include <acpi/acpi_bus.h> | 5 | #include <acpi/acpi_bus.h> |
5 | 6 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 75bceee76044..abc382a9918b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c | |||
@@ -2573,48 +2573,34 @@ init_gpio(struct nvbios *bios, uint16_t offset, struct init_exec *iexec) | |||
2573 | * each GPIO according to various values listed in each entry | 2573 | * each GPIO according to various values listed in each entry |
2574 | */ | 2574 | */ |
2575 | 2575 | ||
2576 | const uint32_t nv50_gpio_reg[4] = { 0xe104, 0xe108, 0xe280, 0xe284 }; | 2576 | struct drm_nouveau_private *dev_priv = bios->dev->dev_private; |
2577 | const uint32_t nv50_gpio_ctl[2] = { 0xe100, 0xe28c }; | 2577 | const uint32_t nv50_gpio_ctl[2] = { 0xe100, 0xe28c }; |
2578 | const uint8_t *gpio_table = &bios->data[bios->dcb.gpio_table_ptr]; | ||
2579 | const uint8_t *gpio_entry; | ||
2580 | int i; | 2578 | int i; |
2581 | 2579 | ||
2582 | if (!iexec->execute) | 2580 | if (dev_priv->card_type != NV_50) { |
2583 | return 1; | 2581 | NV_ERROR(bios->dev, "INIT_GPIO on unsupported chipset\n"); |
2584 | 2582 | return -ENODEV; | |
2585 | if (bios->dcb.version != 0x40) { | ||
2586 | NV_ERROR(bios->dev, "DCB table not version 4.0\n"); | ||
2587 | return 0; | ||
2588 | } | 2583 | } |
2589 | 2584 | ||
2590 | if (!bios->dcb.gpio_table_ptr) { | 2585 | if (!iexec->execute) |
2591 | NV_WARN(bios->dev, "Invalid pointer to INIT_8E table\n"); | 2586 | return 1; |
2592 | return 0; | ||
2593 | } | ||
2594 | 2587 | ||
2595 | gpio_entry = gpio_table + gpio_table[1]; | 2588 | for (i = 0; i < bios->dcb.gpio.entries; i++) { |
2596 | for (i = 0; i < gpio_table[2]; i++, gpio_entry += gpio_table[3]) { | 2589 | struct dcb_gpio_entry *gpio = &bios->dcb.gpio.entry[i]; |
2597 | uint32_t entry = ROM32(gpio_entry[0]), r, s, v; | 2590 | uint32_t r, s, v; |
2598 | int line = (entry & 0x0000001f); | ||
2599 | 2591 | ||
2600 | BIOSLOG(bios, "0x%04X: Entry: 0x%08X\n", offset, entry); | 2592 | BIOSLOG(bios, "0x%04X: Entry: 0x%08X\n", offset, gpio->entry); |
2601 | 2593 | ||
2602 | if ((entry & 0x0000ff00) == 0x0000ff00) | 2594 | nv50_gpio_set(bios->dev, gpio->tag, gpio->state_default); |
2603 | continue; | ||
2604 | 2595 | ||
2605 | r = nv50_gpio_reg[line >> 3]; | 2596 | /* The NVIDIA binary driver doesn't appear to actually do |
2606 | s = (line & 0x07) << 2; | 2597 | * any of this, my VBIOS does however. |
2607 | v = bios_rd32(bios, r) & ~(0x00000003 << s); | 2598 | */ |
2608 | if (entry & 0x01000000) | 2599 | /* Not a clue, needs de-magicing */ |
2609 | v |= (((entry & 0x60000000) >> 29) ^ 2) << s; | 2600 | r = nv50_gpio_ctl[gpio->line >> 4]; |
2610 | else | 2601 | s = (gpio->line & 0x0f); |
2611 | v |= (((entry & 0x18000000) >> 27) ^ 2) << s; | ||
2612 | bios_wr32(bios, r, v); | ||
2613 | |||
2614 | r = nv50_gpio_ctl[line >> 4]; | ||
2615 | s = (line & 0x0f); | ||
2616 | v = bios_rd32(bios, r) & ~(0x00010001 << s); | 2602 | v = bios_rd32(bios, r) & ~(0x00010001 << s); |
2617 | switch ((entry & 0x06000000) >> 25) { | 2603 | switch ((gpio->entry & 0x06000000) >> 25) { |
2618 | case 1: | 2604 | case 1: |
2619 | v |= (0x00000001 << s); | 2605 | v |= (0x00000001 << s); |
2620 | break; | 2606 | break; |
@@ -3198,7 +3184,6 @@ static int run_lvds_table(struct drm_device *dev, struct dcb_entry *dcbent, int | |||
3198 | struct nvbios *bios = &dev_priv->vbios; | 3184 | struct nvbios *bios = &dev_priv->vbios; |
3199 | unsigned int outputset = (dcbent->or == 4) ? 1 : 0; | 3185 | unsigned int outputset = (dcbent->or == 4) ? 1 : 0; |
3200 | uint16_t scriptptr = 0, clktable; | 3186 | uint16_t scriptptr = 0, clktable; |
3201 | uint8_t clktableptr = 0; | ||
3202 | 3187 | ||
3203 | /* | 3188 | /* |
3204 | * For now we assume version 3.0 table - g80 support will need some | 3189 | * For now we assume version 3.0 table - g80 support will need some |
@@ -3217,26 +3202,29 @@ static int run_lvds_table(struct drm_device *dev, struct dcb_entry *dcbent, int | |||
3217 | scriptptr = ROM16(bios->data[bios->fp.lvdsmanufacturerpointer + 11 + outputset * 2]); | 3202 | scriptptr = ROM16(bios->data[bios->fp.lvdsmanufacturerpointer + 11 + outputset * 2]); |
3218 | break; | 3203 | break; |
3219 | case LVDS_RESET: | 3204 | case LVDS_RESET: |
3205 | clktable = bios->fp.lvdsmanufacturerpointer + 15; | ||
3206 | if (dcbent->or == 4) | ||
3207 | clktable += 8; | ||
3208 | |||
3220 | if (dcbent->lvdsconf.use_straps_for_mode) { | 3209 | if (dcbent->lvdsconf.use_straps_for_mode) { |
3221 | if (bios->fp.dual_link) | 3210 | if (bios->fp.dual_link) |
3222 | clktableptr += 2; | 3211 | clktable += 4; |
3223 | if (bios->fp.BITbit1) | 3212 | if (bios->fp.if_is_24bit) |
3224 | clktableptr++; | 3213 | clktable += 2; |
3225 | } else { | 3214 | } else { |
3226 | /* using EDID */ | 3215 | /* using EDID */ |
3227 | uint8_t fallback = bios->data[bios->fp.lvdsmanufacturerpointer + 4]; | 3216 | int cmpval_24bit = (dcbent->or == 4) ? 4 : 1; |
3228 | int fallbackcmpval = (dcbent->or == 4) ? 4 : 1; | ||
3229 | 3217 | ||
3230 | if (bios->fp.dual_link) { | 3218 | if (bios->fp.dual_link) { |
3231 | clktableptr += 2; | 3219 | clktable += 4; |
3232 | fallbackcmpval *= 2; | 3220 | cmpval_24bit <<= 1; |
3233 | } | 3221 | } |
3234 | if (fallbackcmpval & fallback) | 3222 | |
3235 | clktableptr++; | 3223 | if (bios->fp.strapless_is_24bit & cmpval_24bit) |
3224 | clktable += 2; | ||
3236 | } | 3225 | } |
3237 | 3226 | ||
3238 | /* adding outputset * 8 may not be correct */ | 3227 | clktable = ROM16(bios->data[clktable]); |
3239 | clktable = ROM16(bios->data[bios->fp.lvdsmanufacturerpointer + 15 + clktableptr * 2 + outputset * 8]); | ||
3240 | if (!clktable) { | 3228 | if (!clktable) { |
3241 | NV_ERROR(dev, "Pixel clock comparison table not found\n"); | 3229 | NV_ERROR(dev, "Pixel clock comparison table not found\n"); |
3242 | return -ENOENT; | 3230 | return -ENOENT; |
@@ -3638,37 +3626,40 @@ int nouveau_bios_parse_lvds_table(struct drm_device *dev, int pxclk, bool *dl, b | |||
3638 | *if_is_24bit = bios->data[lvdsofs] & 16; | 3626 | *if_is_24bit = bios->data[lvdsofs] & 16; |
3639 | break; | 3627 | break; |
3640 | case 0x30: | 3628 | case 0x30: |
3641 | /* | 3629 | case 0x40: |
3642 | * My money would be on there being a 24 bit interface bit in | ||
3643 | * this table, but I have no example of a laptop bios with a | ||
3644 | * 24 bit panel to confirm that. Hence we shout loudly if any | ||
3645 | * bit other than bit 0 is set (I've not even seen bit 1) | ||
3646 | */ | ||
3647 | if (bios->data[lvdsofs] > 1) | ||
3648 | NV_ERROR(dev, | ||
3649 | "You have a very unusual laptop display; please report it\n"); | ||
3650 | /* | 3630 | /* |
3651 | * No sign of the "power off for reset" or "reset for panel | 3631 | * No sign of the "power off for reset" or "reset for panel |
3652 | * on" bits, but it's safer to assume we should | 3632 | * on" bits, but it's safer to assume we should |
3653 | */ | 3633 | */ |
3654 | bios->fp.power_off_for_reset = true; | 3634 | bios->fp.power_off_for_reset = true; |
3655 | bios->fp.reset_after_pclk_change = true; | 3635 | bios->fp.reset_after_pclk_change = true; |
3636 | |||
3656 | /* | 3637 | /* |
3657 | * It's ok lvdsofs is wrong for nv4x edid case; dual_link is | 3638 | * It's ok lvdsofs is wrong for nv4x edid case; dual_link is |
3658 | * over-written, and BITbit1 isn't used | 3639 | * over-written, and if_is_24bit isn't used |
3659 | */ | 3640 | */ |
3660 | bios->fp.dual_link = bios->data[lvdsofs] & 1; | 3641 | bios->fp.dual_link = bios->data[lvdsofs] & 1; |
3661 | bios->fp.BITbit1 = bios->data[lvdsofs] & 2; | ||
3662 | bios->fp.duallink_transition_clk = ROM16(bios->data[bios->fp.lvdsmanufacturerpointer + 5]) * 10; | ||
3663 | break; | ||
3664 | case 0x40: | ||
3665 | bios->fp.dual_link = bios->data[lvdsofs] & 1; | ||
3666 | bios->fp.if_is_24bit = bios->data[lvdsofs] & 2; | 3642 | bios->fp.if_is_24bit = bios->data[lvdsofs] & 2; |
3667 | bios->fp.strapless_is_24bit = bios->data[bios->fp.lvdsmanufacturerpointer + 4]; | 3643 | bios->fp.strapless_is_24bit = bios->data[bios->fp.lvdsmanufacturerpointer + 4]; |
3668 | bios->fp.duallink_transition_clk = ROM16(bios->data[bios->fp.lvdsmanufacturerpointer + 5]) * 10; | 3644 | bios->fp.duallink_transition_clk = ROM16(bios->data[bios->fp.lvdsmanufacturerpointer + 5]) * 10; |
3669 | break; | 3645 | break; |
3670 | } | 3646 | } |
3671 | 3647 | ||
3648 | /* Dell Latitude D620 reports a too-high value for the dual-link | ||
3649 | * transition freq, causing us to program the panel incorrectly. | ||
3650 | * | ||
3651 | * It doesn't appear the VBIOS actually uses its transition freq | ||
3652 | * (90000kHz), instead it uses the "Number of LVDS channels" field | ||
3653 | * out of the panel ID structure (http://www.spwg.org/). | ||
3654 | * | ||
3655 | * For the moment, a quirk will do :) | ||
3656 | */ | ||
3657 | if ((dev->pdev->device == 0x01d7) && | ||
3658 | (dev->pdev->subsystem_vendor == 0x1028) && | ||
3659 | (dev->pdev->subsystem_device == 0x01c2)) { | ||
3660 | bios->fp.duallink_transition_clk = 80000; | ||
3661 | } | ||
3662 | |||
3672 | /* set dual_link flag for EDID case */ | 3663 | /* set dual_link flag for EDID case */ |
3673 | if (pxclk && (chip_version < 0x25 || chip_version > 0x28)) | 3664 | if (pxclk && (chip_version < 0x25 || chip_version > 0x28)) |
3674 | bios->fp.dual_link = (pxclk >= bios->fp.duallink_transition_clk); | 3665 | bios->fp.dual_link = (pxclk >= bios->fp.duallink_transition_clk); |
@@ -5077,25 +5068,25 @@ parse_dcb30_gpio_entry(struct nvbios *bios, uint16_t offset) | |||
5077 | gpio->tag = tag; | 5068 | gpio->tag = tag; |
5078 | gpio->line = line; | 5069 | gpio->line = line; |
5079 | gpio->invert = flags != 4; | 5070 | gpio->invert = flags != 4; |
5071 | gpio->entry = ent; | ||
5080 | } | 5072 | } |
5081 | 5073 | ||
5082 | static void | 5074 | static void |
5083 | parse_dcb40_gpio_entry(struct nvbios *bios, uint16_t offset) | 5075 | parse_dcb40_gpio_entry(struct nvbios *bios, uint16_t offset) |
5084 | { | 5076 | { |
5077 | uint32_t entry = ROM32(bios->data[offset]); | ||
5085 | struct dcb_gpio_entry *gpio; | 5078 | struct dcb_gpio_entry *gpio; |
5086 | uint32_t ent = ROM32(bios->data[offset]); | ||
5087 | uint8_t line = ent & 0x1f, | ||
5088 | tag = ent >> 8 & 0xff; | ||
5089 | 5079 | ||
5090 | if (tag == 0xff) | 5080 | if ((entry & 0x0000ff00) == 0x0000ff00) |
5091 | return; | 5081 | return; |
5092 | 5082 | ||
5093 | gpio = new_gpio_entry(bios); | 5083 | gpio = new_gpio_entry(bios); |
5094 | 5084 | gpio->tag = (entry & 0x0000ff00) >> 8; | |
5095 | /* Currently unused, we may need more fields parsed at some | 5085 | gpio->line = (entry & 0x0000001f) >> 0; |
5096 | * point. */ | 5086 | gpio->state_default = (entry & 0x01000000) >> 24; |
5097 | gpio->tag = tag; | 5087 | gpio->state[0] = (entry & 0x18000000) >> 27; |
5098 | gpio->line = line; | 5088 | gpio->state[1] = (entry & 0x60000000) >> 29; |
5089 | gpio->entry = entry; | ||
5099 | } | 5090 | } |
5100 | 5091 | ||
5101 | static void | 5092 | static void |
@@ -5211,6 +5202,21 @@ divine_connector_type(struct nvbios *bios, int index) | |||
5211 | } | 5202 | } |
5212 | 5203 | ||
5213 | static void | 5204 | static void |
5205 | apply_dcb_connector_quirks(struct nvbios *bios, int idx) | ||
5206 | { | ||
5207 | struct dcb_connector_table_entry *cte = &bios->dcb.connector.entry[idx]; | ||
5208 | struct drm_device *dev = bios->dev; | ||
5209 | |||
5210 | /* Gigabyte NX85T */ | ||
5211 | if ((dev->pdev->device == 0x0421) && | ||
5212 | (dev->pdev->subsystem_vendor == 0x1458) && | ||
5213 | (dev->pdev->subsystem_device == 0x344c)) { | ||
5214 | if (cte->type == DCB_CONNECTOR_HDMI_1) | ||
5215 | cte->type = DCB_CONNECTOR_DVI_I; | ||
5216 | } | ||
5217 | } | ||
5218 | |||
5219 | static void | ||
5214 | parse_dcb_connector_table(struct nvbios *bios) | 5220 | parse_dcb_connector_table(struct nvbios *bios) |
5215 | { | 5221 | { |
5216 | struct drm_device *dev = bios->dev; | 5222 | struct drm_device *dev = bios->dev; |
@@ -5238,13 +5244,14 @@ parse_dcb_connector_table(struct nvbios *bios) | |||
5238 | entry = conntab + conntab[1]; | 5244 | entry = conntab + conntab[1]; |
5239 | cte = &ct->entry[0]; | 5245 | cte = &ct->entry[0]; |
5240 | for (i = 0; i < conntab[2]; i++, entry += conntab[3], cte++) { | 5246 | for (i = 0; i < conntab[2]; i++, entry += conntab[3], cte++) { |
5247 | cte->index = i; | ||
5241 | if (conntab[3] == 2) | 5248 | if (conntab[3] == 2) |
5242 | cte->entry = ROM16(entry[0]); | 5249 | cte->entry = ROM16(entry[0]); |
5243 | else | 5250 | else |
5244 | cte->entry = ROM32(entry[0]); | 5251 | cte->entry = ROM32(entry[0]); |
5245 | 5252 | ||
5246 | cte->type = (cte->entry & 0x000000ff) >> 0; | 5253 | cte->type = (cte->entry & 0x000000ff) >> 0; |
5247 | cte->index = (cte->entry & 0x00000f00) >> 8; | 5254 | cte->index2 = (cte->entry & 0x00000f00) >> 8; |
5248 | switch (cte->entry & 0x00033000) { | 5255 | switch (cte->entry & 0x00033000) { |
5249 | case 0x00001000: | 5256 | case 0x00001000: |
5250 | cte->gpio_tag = 0x07; | 5257 | cte->gpio_tag = 0x07; |
@@ -5266,6 +5273,8 @@ parse_dcb_connector_table(struct nvbios *bios) | |||
5266 | if (cte->type == 0xff) | 5273 | if (cte->type == 0xff) |
5267 | continue; | 5274 | continue; |
5268 | 5275 | ||
5276 | apply_dcb_connector_quirks(bios, i); | ||
5277 | |||
5269 | NV_INFO(dev, " %d: 0x%08x: type 0x%02x idx %d tag 0x%02x\n", | 5278 | NV_INFO(dev, " %d: 0x%08x: type 0x%02x idx %d tag 0x%02x\n", |
5270 | i, cte->entry, cte->type, cte->index, cte->gpio_tag); | 5279 | i, cte->entry, cte->type, cte->index, cte->gpio_tag); |
5271 | 5280 | ||
@@ -5287,10 +5296,16 @@ parse_dcb_connector_table(struct nvbios *bios) | |||
5287 | break; | 5296 | break; |
5288 | default: | 5297 | default: |
5289 | cte->type = divine_connector_type(bios, cte->index); | 5298 | cte->type = divine_connector_type(bios, cte->index); |
5290 | NV_WARN(dev, "unknown type, using 0x%02x", cte->type); | 5299 | NV_WARN(dev, "unknown type, using 0x%02x\n", cte->type); |
5291 | break; | 5300 | break; |
5292 | } | 5301 | } |
5293 | 5302 | ||
5303 | if (nouveau_override_conntype) { | ||
5304 | int type = divine_connector_type(bios, cte->index); | ||
5305 | if (type != cte->type) | ||
5306 | NV_WARN(dev, " -> type 0x%02x\n", cte->type); | ||
5307 | } | ||
5308 | |||
5294 | } | 5309 | } |
5295 | } | 5310 | } |
5296 | 5311 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.h b/drivers/gpu/drm/nouveau/nouveau_bios.h index 9f688aa9a655..c0d7b0a3ece0 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.h +++ b/drivers/gpu/drm/nouveau/nouveau_bios.h | |||
@@ -49,6 +49,9 @@ struct dcb_gpio_entry { | |||
49 | enum dcb_gpio_tag tag; | 49 | enum dcb_gpio_tag tag; |
50 | int line; | 50 | int line; |
51 | bool invert; | 51 | bool invert; |
52 | uint32_t entry; | ||
53 | uint8_t state_default; | ||
54 | uint8_t state[2]; | ||
52 | }; | 55 | }; |
53 | 56 | ||
54 | struct dcb_gpio_table { | 57 | struct dcb_gpio_table { |
@@ -72,9 +75,10 @@ enum dcb_connector_type { | |||
72 | }; | 75 | }; |
73 | 76 | ||
74 | struct dcb_connector_table_entry { | 77 | struct dcb_connector_table_entry { |
78 | uint8_t index; | ||
75 | uint32_t entry; | 79 | uint32_t entry; |
76 | enum dcb_connector_type type; | 80 | enum dcb_connector_type type; |
77 | uint8_t index; | 81 | uint8_t index2; |
78 | uint8_t gpio_tag; | 82 | uint8_t gpio_tag; |
79 | }; | 83 | }; |
80 | 84 | ||
@@ -266,7 +270,6 @@ struct nvbios { | |||
266 | bool reset_after_pclk_change; | 270 | bool reset_after_pclk_change; |
267 | bool dual_link; | 271 | bool dual_link; |
268 | bool link_c_increment; | 272 | bool link_c_increment; |
269 | bool BITbit1; | ||
270 | bool if_is_24bit; | 273 | bool if_is_24bit; |
271 | int duallink_transition_clk; | 274 | int duallink_transition_clk; |
272 | uint8_t strapless_is_24bit; | 275 | uint8_t strapless_is_24bit; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 028719fddf76..957d17629840 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "nouveau_dma.h" | 34 | #include "nouveau_dma.h" |
35 | 35 | ||
36 | #include <linux/log2.h> | 36 | #include <linux/log2.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | static void | 39 | static void |
39 | nouveau_bo_del_ttm(struct ttm_buffer_object *bo) | 40 | nouveau_bo_del_ttm(struct ttm_buffer_object *bo) |
@@ -71,7 +72,7 @@ nouveau_bo_fixup_align(struct drm_device *dev, | |||
71 | * many small buffers. | 72 | * many small buffers. |
72 | */ | 73 | */ |
73 | if (dev_priv->card_type == NV_50) { | 74 | if (dev_priv->card_type == NV_50) { |
74 | uint32_t block_size = nouveau_mem_fb_amount(dev) >> 15; | 75 | uint32_t block_size = dev_priv->vram_size >> 15; |
75 | int i; | 76 | int i; |
76 | 77 | ||
77 | switch (tile_flags) { | 78 | switch (tile_flags) { |
@@ -153,7 +154,7 @@ nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan, | |||
153 | 154 | ||
154 | nvbo->placement.fpfn = 0; | 155 | nvbo->placement.fpfn = 0; |
155 | nvbo->placement.lpfn = mappable ? dev_priv->fb_mappable_pages : 0; | 156 | nvbo->placement.lpfn = mappable ? dev_priv->fb_mappable_pages : 0; |
156 | nouveau_bo_placement_set(nvbo, flags); | 157 | nouveau_bo_placement_set(nvbo, flags, 0); |
157 | 158 | ||
158 | nvbo->channel = chan; | 159 | nvbo->channel = chan; |
159 | ret = ttm_bo_init(&dev_priv->ttm.bdev, &nvbo->bo, size, | 160 | ret = ttm_bo_init(&dev_priv->ttm.bdev, &nvbo->bo, size, |
@@ -172,26 +173,33 @@ nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan, | |||
172 | return 0; | 173 | return 0; |
173 | } | 174 | } |
174 | 175 | ||
176 | static void | ||
177 | set_placement_list(uint32_t *pl, unsigned *n, uint32_t type, uint32_t flags) | ||
178 | { | ||
179 | *n = 0; | ||
180 | |||
181 | if (type & TTM_PL_FLAG_VRAM) | ||
182 | pl[(*n)++] = TTM_PL_FLAG_VRAM | flags; | ||
183 | if (type & TTM_PL_FLAG_TT) | ||
184 | pl[(*n)++] = TTM_PL_FLAG_TT | flags; | ||
185 | if (type & TTM_PL_FLAG_SYSTEM) | ||
186 | pl[(*n)++] = TTM_PL_FLAG_SYSTEM | flags; | ||
187 | } | ||
188 | |||
175 | void | 189 | void |
176 | nouveau_bo_placement_set(struct nouveau_bo *nvbo, uint32_t memtype) | 190 | nouveau_bo_placement_set(struct nouveau_bo *nvbo, uint32_t type, uint32_t busy) |
177 | { | 191 | { |
178 | int n = 0; | 192 | struct ttm_placement *pl = &nvbo->placement; |
179 | 193 | uint32_t flags = TTM_PL_MASK_CACHING | | |
180 | if (memtype & TTM_PL_FLAG_VRAM) | 194 | (nvbo->pin_refcnt ? TTM_PL_FLAG_NO_EVICT : 0); |
181 | nvbo->placements[n++] = TTM_PL_FLAG_VRAM | TTM_PL_MASK_CACHING; | 195 | |
182 | if (memtype & TTM_PL_FLAG_TT) | 196 | pl->placement = nvbo->placements; |
183 | nvbo->placements[n++] = TTM_PL_FLAG_TT | TTM_PL_MASK_CACHING; | 197 | set_placement_list(nvbo->placements, &pl->num_placement, |
184 | if (memtype & TTM_PL_FLAG_SYSTEM) | 198 | type, flags); |
185 | nvbo->placements[n++] = TTM_PL_FLAG_SYSTEM | TTM_PL_MASK_CACHING; | 199 | |
186 | nvbo->placement.placement = nvbo->placements; | 200 | pl->busy_placement = nvbo->busy_placements; |
187 | nvbo->placement.busy_placement = nvbo->placements; | 201 | set_placement_list(nvbo->busy_placements, &pl->num_busy_placement, |
188 | nvbo->placement.num_placement = n; | 202 | type | busy, flags); |
189 | nvbo->placement.num_busy_placement = n; | ||
190 | |||
191 | if (nvbo->pin_refcnt) { | ||
192 | while (n--) | ||
193 | nvbo->placements[n] |= TTM_PL_FLAG_NO_EVICT; | ||
194 | } | ||
195 | } | 203 | } |
196 | 204 | ||
197 | int | 205 | int |
@@ -199,7 +207,7 @@ nouveau_bo_pin(struct nouveau_bo *nvbo, uint32_t memtype) | |||
199 | { | 207 | { |
200 | struct drm_nouveau_private *dev_priv = nouveau_bdev(nvbo->bo.bdev); | 208 | struct drm_nouveau_private *dev_priv = nouveau_bdev(nvbo->bo.bdev); |
201 | struct ttm_buffer_object *bo = &nvbo->bo; | 209 | struct ttm_buffer_object *bo = &nvbo->bo; |
202 | int ret, i; | 210 | int ret; |
203 | 211 | ||
204 | if (nvbo->pin_refcnt && !(memtype & (1 << bo->mem.mem_type))) { | 212 | if (nvbo->pin_refcnt && !(memtype & (1 << bo->mem.mem_type))) { |
205 | NV_ERROR(nouveau_bdev(bo->bdev)->dev, | 213 | NV_ERROR(nouveau_bdev(bo->bdev)->dev, |
@@ -215,9 +223,7 @@ nouveau_bo_pin(struct nouveau_bo *nvbo, uint32_t memtype) | |||
215 | if (ret) | 223 | if (ret) |
216 | goto out; | 224 | goto out; |
217 | 225 | ||
218 | nouveau_bo_placement_set(nvbo, memtype); | 226 | nouveau_bo_placement_set(nvbo, memtype, 0); |
219 | for (i = 0; i < nvbo->placement.num_placement; i++) | ||
220 | nvbo->placements[i] |= TTM_PL_FLAG_NO_EVICT; | ||
221 | 227 | ||
222 | ret = ttm_bo_validate(bo, &nvbo->placement, false, false); | 228 | ret = ttm_bo_validate(bo, &nvbo->placement, false, false); |
223 | if (ret == 0) { | 229 | if (ret == 0) { |
@@ -244,7 +250,7 @@ nouveau_bo_unpin(struct nouveau_bo *nvbo) | |||
244 | { | 250 | { |
245 | struct drm_nouveau_private *dev_priv = nouveau_bdev(nvbo->bo.bdev); | 251 | struct drm_nouveau_private *dev_priv = nouveau_bdev(nvbo->bo.bdev); |
246 | struct ttm_buffer_object *bo = &nvbo->bo; | 252 | struct ttm_buffer_object *bo = &nvbo->bo; |
247 | int ret, i; | 253 | int ret; |
248 | 254 | ||
249 | if (--nvbo->pin_refcnt) | 255 | if (--nvbo->pin_refcnt) |
250 | return 0; | 256 | return 0; |
@@ -253,8 +259,7 @@ nouveau_bo_unpin(struct nouveau_bo *nvbo) | |||
253 | if (ret) | 259 | if (ret) |
254 | return ret; | 260 | return ret; |
255 | 261 | ||
256 | for (i = 0; i < nvbo->placement.num_placement; i++) | 262 | nouveau_bo_placement_set(nvbo, bo->mem.placement, 0); |
257 | nvbo->placements[i] &= ~TTM_PL_FLAG_NO_EVICT; | ||
258 | 263 | ||
259 | ret = ttm_bo_validate(bo, &nvbo->placement, false, false); | 264 | ret = ttm_bo_validate(bo, &nvbo->placement, false, false); |
260 | if (ret == 0) { | 265 | if (ret == 0) { |
@@ -395,8 +400,8 @@ nouveau_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, | |||
395 | man->io_addr = NULL; | 400 | man->io_addr = NULL; |
396 | man->io_offset = drm_get_resource_start(dev, 1); | 401 | man->io_offset = drm_get_resource_start(dev, 1); |
397 | man->io_size = drm_get_resource_len(dev, 1); | 402 | man->io_size = drm_get_resource_len(dev, 1); |
398 | if (man->io_size > nouveau_mem_fb_amount(dev)) | 403 | if (man->io_size > dev_priv->vram_size) |
399 | man->io_size = nouveau_mem_fb_amount(dev); | 404 | man->io_size = dev_priv->vram_size; |
400 | 405 | ||
401 | man->gpu_offset = dev_priv->vm_vram_base; | 406 | man->gpu_offset = dev_priv->vm_vram_base; |
402 | break; | 407 | break; |
@@ -439,11 +444,11 @@ nouveau_bo_evict_flags(struct ttm_buffer_object *bo, struct ttm_placement *pl) | |||
439 | 444 | ||
440 | switch (bo->mem.mem_type) { | 445 | switch (bo->mem.mem_type) { |
441 | case TTM_PL_VRAM: | 446 | case TTM_PL_VRAM: |
442 | nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_TT | | 447 | nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_TT, |
443 | TTM_PL_FLAG_SYSTEM); | 448 | TTM_PL_FLAG_SYSTEM); |
444 | break; | 449 | break; |
445 | default: | 450 | default: |
446 | nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_SYSTEM); | 451 | nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_SYSTEM, 0); |
447 | break; | 452 | break; |
448 | } | 453 | } |
449 | 454 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c index 6dfb425cbae9..1fc57ef58295 100644 --- a/drivers/gpu/drm/nouveau/nouveau_channel.c +++ b/drivers/gpu/drm/nouveau/nouveau_channel.c | |||
@@ -142,7 +142,6 @@ nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret, | |||
142 | GFP_KERNEL); | 142 | GFP_KERNEL); |
143 | if (!dev_priv->fifos[channel]) | 143 | if (!dev_priv->fifos[channel]) |
144 | return -ENOMEM; | 144 | return -ENOMEM; |
145 | dev_priv->fifo_alloc_count++; | ||
146 | chan = dev_priv->fifos[channel]; | 145 | chan = dev_priv->fifos[channel]; |
147 | INIT_LIST_HEAD(&chan->nvsw.vbl_wait); | 146 | INIT_LIST_HEAD(&chan->nvsw.vbl_wait); |
148 | INIT_LIST_HEAD(&chan->fence.pending); | 147 | INIT_LIST_HEAD(&chan->fence.pending); |
@@ -321,7 +320,6 @@ nouveau_channel_free(struct nouveau_channel *chan) | |||
321 | iounmap(chan->user); | 320 | iounmap(chan->user); |
322 | 321 | ||
323 | dev_priv->fifos[chan->id] = NULL; | 322 | dev_priv->fifos[chan->id] = NULL; |
324 | dev_priv->fifo_alloc_count--; | ||
325 | kfree(chan); | 323 | kfree(chan); |
326 | } | 324 | } |
327 | 325 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 24327f468c4b..14afe1e47e57 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c | |||
@@ -302,7 +302,7 @@ nouveau_connector_detect(struct drm_connector *connector) | |||
302 | 302 | ||
303 | detect_analog: | 303 | detect_analog: |
304 | nv_encoder = find_encoder_by_type(connector, OUTPUT_ANALOG); | 304 | nv_encoder = find_encoder_by_type(connector, OUTPUT_ANALOG); |
305 | if (!nv_encoder) | 305 | if (!nv_encoder && !nouveau_tv_disable) |
306 | nv_encoder = find_encoder_by_type(connector, OUTPUT_TV); | 306 | nv_encoder = find_encoder_by_type(connector, OUTPUT_TV); |
307 | if (nv_encoder) { | 307 | if (nv_encoder) { |
308 | struct drm_encoder *encoder = to_drm_encoder(nv_encoder); | 308 | struct drm_encoder *encoder = to_drm_encoder(nv_encoder); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 8ff9ef5d4b47..a251886a0ce6 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c | |||
@@ -137,10 +137,9 @@ nouveau_debugfs_memory_info(struct seq_file *m, void *data) | |||
137 | { | 137 | { |
138 | struct drm_info_node *node = (struct drm_info_node *) m->private; | 138 | struct drm_info_node *node = (struct drm_info_node *) m->private; |
139 | struct drm_minor *minor = node->minor; | 139 | struct drm_minor *minor = node->minor; |
140 | struct drm_device *dev = minor->dev; | 140 | struct drm_nouveau_private *dev_priv = minor->dev->dev_private; |
141 | 141 | ||
142 | seq_printf(m, "VRAM total: %dKiB\n", | 142 | seq_printf(m, "VRAM total: %dKiB\n", (int)(dev_priv->vram_size >> 10)); |
143 | (int)(nouveau_mem_fb_amount(dev) >> 10)); | ||
144 | return 0; | 143 | return 0; |
145 | } | 144 | } |
146 | 145 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.c b/drivers/gpu/drm/nouveau/nouveau_dma.c index c8482a108a78..65c441a1999f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dma.c +++ b/drivers/gpu/drm/nouveau/nouveau_dma.c | |||
@@ -190,6 +190,11 @@ nv50_dma_push(struct nouveau_channel *chan, struct nouveau_bo *bo, | |||
190 | nouveau_bo_wr32(pb, ip++, upper_32_bits(offset) | length << 8); | 190 | nouveau_bo_wr32(pb, ip++, upper_32_bits(offset) | length << 8); |
191 | 191 | ||
192 | chan->dma.ib_put = (chan->dma.ib_put + 1) & chan->dma.ib_max; | 192 | chan->dma.ib_put = (chan->dma.ib_put + 1) & chan->dma.ib_max; |
193 | |||
194 | DRM_MEMORYBARRIER(); | ||
195 | /* Flush writes. */ | ||
196 | nouveau_bo_rd32(pb, 0); | ||
197 | |||
193 | nvchan_wr32(chan, 0x8c, chan->dma.ib_put); | 198 | nvchan_wr32(chan, 0x8c, chan->dma.ib_put); |
194 | chan->dma.ib_free--; | 199 | chan->dma.ib_free--; |
195 | } | 200 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c index f954ad93e81f..deeb21c6865c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dp.c +++ b/drivers/gpu/drm/nouveau/nouveau_dp.c | |||
@@ -483,7 +483,7 @@ nouveau_dp_auxch(struct nouveau_i2c_chan *auxch, int cmd, int addr, | |||
483 | ctrl |= (cmd << NV50_AUXCH_CTRL_CMD_SHIFT); | 483 | ctrl |= (cmd << NV50_AUXCH_CTRL_CMD_SHIFT); |
484 | ctrl |= ((data_nr - 1) << NV50_AUXCH_CTRL_LEN_SHIFT); | 484 | ctrl |= ((data_nr - 1) << NV50_AUXCH_CTRL_LEN_SHIFT); |
485 | 485 | ||
486 | for (;;) { | 486 | for (i = 0; i < 16; i++) { |
487 | nv_wr32(dev, NV50_AUXCH_CTRL(index), ctrl | 0x80000000); | 487 | nv_wr32(dev, NV50_AUXCH_CTRL(index), ctrl | 0x80000000); |
488 | nv_wr32(dev, NV50_AUXCH_CTRL(index), ctrl); | 488 | nv_wr32(dev, NV50_AUXCH_CTRL(index), ctrl); |
489 | nv_wr32(dev, NV50_AUXCH_CTRL(index), ctrl | 0x00010000); | 489 | nv_wr32(dev, NV50_AUXCH_CTRL(index), ctrl | 0x00010000); |
@@ -502,6 +502,12 @@ nouveau_dp_auxch(struct nouveau_i2c_chan *auxch, int cmd, int addr, | |||
502 | break; | 502 | break; |
503 | } | 503 | } |
504 | 504 | ||
505 | if (i == 16) { | ||
506 | NV_ERROR(dev, "auxch DEFER too many times, bailing\n"); | ||
507 | ret = -EREMOTEIO; | ||
508 | goto out; | ||
509 | } | ||
510 | |||
505 | if (cmd & 1) { | 511 | if (cmd & 1) { |
506 | if ((stat & NV50_AUXCH_STAT_COUNT) != data_nr) { | 512 | if ((stat & NV50_AUXCH_STAT_COUNT) != data_nr) { |
507 | ret = -EREMOTEIO; | 513 | ret = -EREMOTEIO; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index 30cc09e8a709..1de974acbc65 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/drivers/gpu/drm/nouveau/nouveau_drv.c | |||
@@ -83,6 +83,14 @@ MODULE_PARM_DESC(nofbaccel, "Disable fbcon acceleration"); | |||
83 | int nouveau_nofbaccel = 0; | 83 | int nouveau_nofbaccel = 0; |
84 | module_param_named(nofbaccel, nouveau_nofbaccel, int, 0400); | 84 | module_param_named(nofbaccel, nouveau_nofbaccel, int, 0400); |
85 | 85 | ||
86 | MODULE_PARM_DESC(override_conntype, "Ignore DCB connector type"); | ||
87 | int nouveau_override_conntype = 0; | ||
88 | module_param_named(override_conntype, nouveau_override_conntype, int, 0400); | ||
89 | |||
90 | MODULE_PARM_DESC(tv_disable, "Disable TV-out detection\n"); | ||
91 | int nouveau_tv_disable = 0; | ||
92 | module_param_named(tv_disable, nouveau_tv_disable, int, 0400); | ||
93 | |||
86 | MODULE_PARM_DESC(tv_norm, "Default TV norm.\n" | 94 | MODULE_PARM_DESC(tv_norm, "Default TV norm.\n" |
87 | "\t\tSupported: PAL, PAL-M, PAL-N, PAL-Nc, NTSC-M, NTSC-J,\n" | 95 | "\t\tSupported: PAL, PAL-M, PAL-N, PAL-Nc, NTSC-M, NTSC-J,\n" |
88 | "\t\t\thd480i, hd480p, hd576i, hd576p, hd720p, hd1080i.\n" | 96 | "\t\t\thd480i, hd480p, hd576i, hd576p, hd720p, hd1080i.\n" |
@@ -154,9 +162,11 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state) | |||
154 | if (pm_state.event == PM_EVENT_PRETHAW) | 162 | if (pm_state.event == PM_EVENT_PRETHAW) |
155 | return 0; | 163 | return 0; |
156 | 164 | ||
165 | NV_INFO(dev, "Disabling fbcon acceleration...\n"); | ||
157 | fbdev_flags = dev_priv->fbdev_info->flags; | 166 | fbdev_flags = dev_priv->fbdev_info->flags; |
158 | dev_priv->fbdev_info->flags |= FBINFO_HWACCEL_DISABLED; | 167 | dev_priv->fbdev_info->flags |= FBINFO_HWACCEL_DISABLED; |
159 | 168 | ||
169 | NV_INFO(dev, "Unpinning framebuffer(s)...\n"); | ||
160 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { | 170 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { |
161 | struct nouveau_framebuffer *nouveau_fb; | 171 | struct nouveau_framebuffer *nouveau_fb; |
162 | 172 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 4b9aaf2a8d0f..ace630aa89e1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h | |||
@@ -76,6 +76,7 @@ struct nouveau_bo { | |||
76 | struct ttm_buffer_object bo; | 76 | struct ttm_buffer_object bo; |
77 | struct ttm_placement placement; | 77 | struct ttm_placement placement; |
78 | u32 placements[3]; | 78 | u32 placements[3]; |
79 | u32 busy_placements[3]; | ||
79 | struct ttm_bo_kmap_obj kmap; | 80 | struct ttm_bo_kmap_obj kmap; |
80 | struct list_head head; | 81 | struct list_head head; |
81 | 82 | ||
@@ -519,6 +520,7 @@ struct drm_nouveau_private { | |||
519 | 520 | ||
520 | struct workqueue_struct *wq; | 521 | struct workqueue_struct *wq; |
521 | struct work_struct irq_work; | 522 | struct work_struct irq_work; |
523 | struct work_struct hpd_work; | ||
522 | 524 | ||
523 | struct list_head vbl_waiting; | 525 | struct list_head vbl_waiting; |
524 | 526 | ||
@@ -533,7 +535,6 @@ struct drm_nouveau_private { | |||
533 | 535 | ||
534 | struct fb_info *fbdev_info; | 536 | struct fb_info *fbdev_info; |
535 | 537 | ||
536 | int fifo_alloc_count; | ||
537 | struct nouveau_channel *fifos[NOUVEAU_MAX_CHANNEL_NR]; | 538 | struct nouveau_channel *fifos[NOUVEAU_MAX_CHANNEL_NR]; |
538 | 539 | ||
539 | struct nouveau_engine engine; | 540 | struct nouveau_engine engine; |
@@ -553,12 +554,6 @@ struct drm_nouveau_private { | |||
553 | uint32_t ramro_offset; | 554 | uint32_t ramro_offset; |
554 | uint32_t ramro_size; | 555 | uint32_t ramro_size; |
555 | 556 | ||
556 | /* base physical addresses */ | ||
557 | uint64_t fb_phys; | ||
558 | uint64_t fb_available_size; | ||
559 | uint64_t fb_mappable_pages; | ||
560 | uint64_t fb_aper_free; | ||
561 | |||
562 | struct { | 557 | struct { |
563 | enum { | 558 | enum { |
564 | NOUVEAU_GART_NONE = 0, | 559 | NOUVEAU_GART_NONE = 0, |
@@ -572,10 +567,6 @@ struct drm_nouveau_private { | |||
572 | struct nouveau_gpuobj *sg_ctxdma; | 567 | struct nouveau_gpuobj *sg_ctxdma; |
573 | struct page *sg_dummy_page; | 568 | struct page *sg_dummy_page; |
574 | dma_addr_t sg_dummy_bus; | 569 | dma_addr_t sg_dummy_bus; |
575 | |||
576 | /* nottm hack */ | ||
577 | struct drm_ttm_backend *sg_be; | ||
578 | unsigned long sg_handle; | ||
579 | } gart_info; | 570 | } gart_info; |
580 | 571 | ||
581 | /* nv10-nv40 tiling regions */ | 572 | /* nv10-nv40 tiling regions */ |
@@ -584,6 +575,16 @@ struct drm_nouveau_private { | |||
584 | spinlock_t lock; | 575 | spinlock_t lock; |
585 | } tile; | 576 | } tile; |
586 | 577 | ||
578 | /* VRAM/fb configuration */ | ||
579 | uint64_t vram_size; | ||
580 | uint64_t vram_sys_base; | ||
581 | |||
582 | uint64_t fb_phys; | ||
583 | uint64_t fb_available_size; | ||
584 | uint64_t fb_mappable_pages; | ||
585 | uint64_t fb_aper_free; | ||
586 | int fb_mtrr; | ||
587 | |||
587 | /* G8x/G9x virtual address space */ | 588 | /* G8x/G9x virtual address space */ |
588 | uint64_t vm_gart_base; | 589 | uint64_t vm_gart_base; |
589 | uint64_t vm_gart_size; | 590 | uint64_t vm_gart_size; |
@@ -592,10 +593,6 @@ struct drm_nouveau_private { | |||
592 | uint64_t vm_end; | 593 | uint64_t vm_end; |
593 | struct nouveau_gpuobj *vm_vram_pt[NV50_VM_VRAM_NR]; | 594 | struct nouveau_gpuobj *vm_vram_pt[NV50_VM_VRAM_NR]; |
594 | int vm_vram_pt_nr; | 595 | int vm_vram_pt_nr; |
595 | uint64_t vram_sys_base; | ||
596 | |||
597 | /* the mtrr covering the FB */ | ||
598 | int fb_mtrr; | ||
599 | 596 | ||
600 | struct mem_block *ramin_heap; | 597 | struct mem_block *ramin_heap; |
601 | 598 | ||
@@ -614,11 +611,7 @@ struct drm_nouveau_private { | |||
614 | uint32_t dac_users[4]; | 611 | uint32_t dac_users[4]; |
615 | 612 | ||
616 | struct nouveau_suspend_resume { | 613 | struct nouveau_suspend_resume { |
617 | uint32_t fifo_mode; | ||
618 | uint32_t graph_ctx_control; | ||
619 | uint32_t graph_state; | ||
620 | uint32_t *ramin_copy; | 614 | uint32_t *ramin_copy; |
621 | uint64_t ramin_size; | ||
622 | } susres; | 615 | } susres; |
623 | 616 | ||
624 | struct backlight_device *backlight; | 617 | struct backlight_device *backlight; |
@@ -681,6 +674,7 @@ extern int nouveau_uscript_tmds; | |||
681 | extern int nouveau_vram_pushbuf; | 674 | extern int nouveau_vram_pushbuf; |
682 | extern int nouveau_vram_notify; | 675 | extern int nouveau_vram_notify; |
683 | extern int nouveau_fbpercrtc; | 676 | extern int nouveau_fbpercrtc; |
677 | extern int nouveau_tv_disable; | ||
684 | extern char *nouveau_tv_norm; | 678 | extern char *nouveau_tv_norm; |
685 | extern int nouveau_reg_debug; | 679 | extern int nouveau_reg_debug; |
686 | extern char *nouveau_vbios; | 680 | extern char *nouveau_vbios; |
@@ -688,6 +682,7 @@ extern int nouveau_ctxfw; | |||
688 | extern int nouveau_ignorelid; | 682 | extern int nouveau_ignorelid; |
689 | extern int nouveau_nofbaccel; | 683 | extern int nouveau_nofbaccel; |
690 | extern int nouveau_noaccel; | 684 | extern int nouveau_noaccel; |
685 | extern int nouveau_override_conntype; | ||
691 | 686 | ||
692 | extern int nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state); | 687 | extern int nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state); |
693 | extern int nouveau_pci_resume(struct pci_dev *pdev); | 688 | extern int nouveau_pci_resume(struct pci_dev *pdev); |
@@ -715,7 +710,7 @@ extern struct mem_block *nouveau_mem_alloc_block(struct mem_block *, | |||
715 | struct drm_file *, int tail); | 710 | struct drm_file *, int tail); |
716 | extern void nouveau_mem_takedown(struct mem_block **heap); | 711 | extern void nouveau_mem_takedown(struct mem_block **heap); |
717 | extern void nouveau_mem_free_block(struct mem_block *); | 712 | extern void nouveau_mem_free_block(struct mem_block *); |
718 | extern uint64_t nouveau_mem_fb_amount(struct drm_device *); | 713 | extern int nouveau_mem_detect(struct drm_device *dev); |
719 | extern void nouveau_mem_release(struct drm_file *, struct mem_block *heap); | 714 | extern void nouveau_mem_release(struct drm_file *, struct mem_block *heap); |
720 | extern int nouveau_mem_init(struct drm_device *); | 715 | extern int nouveau_mem_init(struct drm_device *); |
721 | extern int nouveau_mem_init_agp(struct drm_device *); | 716 | extern int nouveau_mem_init_agp(struct drm_device *); |
@@ -926,6 +921,10 @@ extern void nv40_fb_takedown(struct drm_device *); | |||
926 | extern void nv40_fb_set_region_tiling(struct drm_device *, int, uint32_t, | 921 | extern void nv40_fb_set_region_tiling(struct drm_device *, int, uint32_t, |
927 | uint32_t, uint32_t); | 922 | uint32_t, uint32_t); |
928 | 923 | ||
924 | /* nv50_fb.c */ | ||
925 | extern int nv50_fb_init(struct drm_device *); | ||
926 | extern void nv50_fb_takedown(struct drm_device *); | ||
927 | |||
929 | /* nv04_fifo.c */ | 928 | /* nv04_fifo.c */ |
930 | extern int nv04_fifo_init(struct drm_device *); | 929 | extern int nv04_fifo_init(struct drm_device *); |
931 | extern void nv04_fifo_disable(struct drm_device *); | 930 | extern void nv04_fifo_disable(struct drm_device *); |
@@ -1118,7 +1117,8 @@ extern int nouveau_bo_pin(struct nouveau_bo *, uint32_t flags); | |||
1118 | extern int nouveau_bo_unpin(struct nouveau_bo *); | 1117 | extern int nouveau_bo_unpin(struct nouveau_bo *); |
1119 | extern int nouveau_bo_map(struct nouveau_bo *); | 1118 | extern int nouveau_bo_map(struct nouveau_bo *); |
1120 | extern void nouveau_bo_unmap(struct nouveau_bo *); | 1119 | extern void nouveau_bo_unmap(struct nouveau_bo *); |
1121 | extern void nouveau_bo_placement_set(struct nouveau_bo *, uint32_t memtype); | 1120 | extern void nouveau_bo_placement_set(struct nouveau_bo *, uint32_t type, |
1121 | uint32_t busy); | ||
1122 | extern u16 nouveau_bo_rd16(struct nouveau_bo *nvbo, unsigned index); | 1122 | extern u16 nouveau_bo_rd16(struct nouveau_bo *nvbo, unsigned index); |
1123 | extern void nouveau_bo_wr16(struct nouveau_bo *nvbo, unsigned index, u16 val); | 1123 | extern void nouveau_bo_wr16(struct nouveau_bo *nvbo, unsigned index, u16 val); |
1124 | extern u32 nouveau_bo_rd32(struct nouveau_bo *nvbo, unsigned index); | 1124 | extern u32 nouveau_bo_rd32(struct nouveau_bo *nvbo, unsigned index); |
@@ -1162,6 +1162,10 @@ extern int nouveau_gem_ioctl_info(struct drm_device *, void *, | |||
1162 | int nv17_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag); | 1162 | int nv17_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag); |
1163 | int nv17_gpio_set(struct drm_device *dev, enum dcb_gpio_tag tag, int state); | 1163 | int nv17_gpio_set(struct drm_device *dev, enum dcb_gpio_tag tag, int state); |
1164 | 1164 | ||
1165 | /* nv50_gpio.c */ | ||
1166 | int nv50_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag); | ||
1167 | int nv50_gpio_set(struct drm_device *dev, enum dcb_gpio_tag tag, int state); | ||
1168 | |||
1165 | #ifndef ioread32_native | 1169 | #ifndef ioread32_native |
1166 | #ifdef __BIG_ENDIAN | 1170 | #ifdef __BIG_ENDIAN |
1167 | #define ioread16_native ioread16be | 1171 | #define ioread16_native ioread16be |
diff --git a/drivers/gpu/drm/nouveau/nouveau_encoder.h b/drivers/gpu/drm/nouveau/nouveau_encoder.h index bc4a24029ed1..9f28b94e479b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_encoder.h +++ b/drivers/gpu/drm/nouveau/nouveau_encoder.h | |||
@@ -47,6 +47,7 @@ struct nouveau_encoder { | |||
47 | 47 | ||
48 | union { | 48 | union { |
49 | struct { | 49 | struct { |
50 | int mc_unknown; | ||
50 | int dpcd_version; | 51 | int dpcd_version; |
51 | int link_nr; | 52 | int link_nr; |
52 | int link_bw; | 53 | int link_bw; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 68cedd9194fe..8e7dc1d4912a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/string.h> | 30 | #include <linux/string.h> |
31 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
32 | #include <linux/tty.h> | 32 | #include <linux/tty.h> |
33 | #include <linux/slab.h> | ||
34 | #include <linux/sysrq.h> | 33 | #include <linux/sysrq.h> |
35 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
36 | #include <linux/fb.h> | 35 | #include <linux/fb.h> |
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 0d22f66f1c79..1bc0b38a5167 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c | |||
@@ -180,40 +180,35 @@ nouveau_gem_set_domain(struct drm_gem_object *gem, uint32_t read_domains, | |||
180 | { | 180 | { |
181 | struct nouveau_bo *nvbo = gem->driver_private; | 181 | struct nouveau_bo *nvbo = gem->driver_private; |
182 | struct ttm_buffer_object *bo = &nvbo->bo; | 182 | struct ttm_buffer_object *bo = &nvbo->bo; |
183 | uint64_t flags; | 183 | uint32_t domains = valid_domains & |
184 | (write_domains ? write_domains : read_domains); | ||
185 | uint32_t pref_flags = 0, valid_flags = 0; | ||
184 | 186 | ||
185 | if (!valid_domains || (!read_domains && !write_domains)) | 187 | if (!domains) |
186 | return -EINVAL; | 188 | return -EINVAL; |
187 | 189 | ||
188 | if (write_domains) { | 190 | if (valid_domains & NOUVEAU_GEM_DOMAIN_VRAM) |
189 | if ((valid_domains & NOUVEAU_GEM_DOMAIN_VRAM) && | 191 | valid_flags |= TTM_PL_FLAG_VRAM; |
190 | (write_domains & NOUVEAU_GEM_DOMAIN_VRAM)) | 192 | |
191 | flags = TTM_PL_FLAG_VRAM; | 193 | if (valid_domains & NOUVEAU_GEM_DOMAIN_GART) |
192 | else | 194 | valid_flags |= TTM_PL_FLAG_TT; |
193 | if ((valid_domains & NOUVEAU_GEM_DOMAIN_GART) && | 195 | |
194 | (write_domains & NOUVEAU_GEM_DOMAIN_GART)) | 196 | if ((domains & NOUVEAU_GEM_DOMAIN_VRAM) && |
195 | flags = TTM_PL_FLAG_TT; | 197 | bo->mem.mem_type == TTM_PL_VRAM) |
196 | else | 198 | pref_flags |= TTM_PL_FLAG_VRAM; |
197 | return -EINVAL; | 199 | |
198 | } else { | 200 | else if ((domains & NOUVEAU_GEM_DOMAIN_GART) && |
199 | if ((valid_domains & NOUVEAU_GEM_DOMAIN_VRAM) && | 201 | bo->mem.mem_type == TTM_PL_TT) |
200 | (read_domains & NOUVEAU_GEM_DOMAIN_VRAM) && | 202 | pref_flags |= TTM_PL_FLAG_TT; |
201 | bo->mem.mem_type == TTM_PL_VRAM) | 203 | |
202 | flags = TTM_PL_FLAG_VRAM; | 204 | else if (domains & NOUVEAU_GEM_DOMAIN_VRAM) |
203 | else | 205 | pref_flags |= TTM_PL_FLAG_VRAM; |
204 | if ((valid_domains & NOUVEAU_GEM_DOMAIN_GART) && | 206 | |
205 | (read_domains & NOUVEAU_GEM_DOMAIN_GART) && | 207 | else |
206 | bo->mem.mem_type == TTM_PL_TT) | 208 | pref_flags |= TTM_PL_FLAG_TT; |
207 | flags = TTM_PL_FLAG_TT; | 209 | |
208 | else | 210 | nouveau_bo_placement_set(nvbo, pref_flags, valid_flags); |
209 | if ((valid_domains & NOUVEAU_GEM_DOMAIN_VRAM) && | ||
210 | (read_domains & NOUVEAU_GEM_DOMAIN_VRAM)) | ||
211 | flags = TTM_PL_FLAG_VRAM; | ||
212 | else | ||
213 | flags = TTM_PL_FLAG_TT; | ||
214 | } | ||
215 | 211 | ||
216 | nouveau_bo_placement_set(nvbo, flags); | ||
217 | return 0; | 212 | return 0; |
218 | } | 213 | } |
219 | 214 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_grctx.c b/drivers/gpu/drm/nouveau/nouveau_grctx.c index c7ebec696747..32f0e495464c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_grctx.c +++ b/drivers/gpu/drm/nouveau/nouveau_grctx.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/firmware.h> | 25 | #include <linux/firmware.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "drmP.h" | 28 | #include "drmP.h" |
28 | #include "nouveau_drv.h" | 29 | #include "nouveau_drv.h" |
diff --git a/drivers/gpu/drm/nouveau/nouveau_irq.c b/drivers/gpu/drm/nouveau/nouveau_irq.c index 95220ddebb45..13e73cee4c44 100644 --- a/drivers/gpu/drm/nouveau/nouveau_irq.c +++ b/drivers/gpu/drm/nouveau/nouveau_irq.c | |||
@@ -51,6 +51,7 @@ nouveau_irq_preinstall(struct drm_device *dev) | |||
51 | 51 | ||
52 | if (dev_priv->card_type == NV_50) { | 52 | if (dev_priv->card_type == NV_50) { |
53 | INIT_WORK(&dev_priv->irq_work, nv50_display_irq_handler_bh); | 53 | INIT_WORK(&dev_priv->irq_work, nv50_display_irq_handler_bh); |
54 | INIT_WORK(&dev_priv->hpd_work, nv50_display_irq_hotplug_bh); | ||
54 | INIT_LIST_HEAD(&dev_priv->vbl_waiting); | 55 | INIT_LIST_HEAD(&dev_priv->vbl_waiting); |
55 | } | 56 | } |
56 | } | 57 | } |
@@ -311,6 +312,31 @@ nouveau_print_bitfield_names_(uint32_t value, | |||
311 | #define nouveau_print_bitfield_names(val, namelist) \ | 312 | #define nouveau_print_bitfield_names(val, namelist) \ |
312 | nouveau_print_bitfield_names_((val), (namelist), ARRAY_SIZE(namelist)) | 313 | nouveau_print_bitfield_names_((val), (namelist), ARRAY_SIZE(namelist)) |
313 | 314 | ||
315 | struct nouveau_enum_names { | ||
316 | uint32_t value; | ||
317 | const char *name; | ||
318 | }; | ||
319 | |||
320 | static void | ||
321 | nouveau_print_enum_names_(uint32_t value, | ||
322 | const struct nouveau_enum_names *namelist, | ||
323 | const int namelist_len) | ||
324 | { | ||
325 | /* | ||
326 | * Caller must have already printed the KERN_* log level for us. | ||
327 | * Also the caller is responsible for adding the newline. | ||
328 | */ | ||
329 | int i; | ||
330 | for (i = 0; i < namelist_len; ++i) { | ||
331 | if (value == namelist[i].value) { | ||
332 | printk("%s", namelist[i].name); | ||
333 | return; | ||
334 | } | ||
335 | } | ||
336 | printk("unknown value 0x%08x", value); | ||
337 | } | ||
338 | #define nouveau_print_enum_names(val, namelist) \ | ||
339 | nouveau_print_enum_names_((val), (namelist), ARRAY_SIZE(namelist)) | ||
314 | 340 | ||
315 | static int | 341 | static int |
316 | nouveau_graph_chid_from_grctx(struct drm_device *dev) | 342 | nouveau_graph_chid_from_grctx(struct drm_device *dev) |
@@ -427,14 +453,16 @@ nouveau_graph_dump_trap_info(struct drm_device *dev, const char *id, | |||
427 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 453 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
428 | uint32_t nsource = trap->nsource, nstatus = trap->nstatus; | 454 | uint32_t nsource = trap->nsource, nstatus = trap->nstatus; |
429 | 455 | ||
430 | NV_INFO(dev, "%s - nSource:", id); | 456 | if (dev_priv->card_type < NV_50) { |
431 | nouveau_print_bitfield_names(nsource, nsource_names); | 457 | NV_INFO(dev, "%s - nSource:", id); |
432 | printk(", nStatus:"); | 458 | nouveau_print_bitfield_names(nsource, nsource_names); |
433 | if (dev_priv->card_type < NV_10) | 459 | printk(", nStatus:"); |
434 | nouveau_print_bitfield_names(nstatus, nstatus_names); | 460 | if (dev_priv->card_type < NV_10) |
435 | else | 461 | nouveau_print_bitfield_names(nstatus, nstatus_names); |
436 | nouveau_print_bitfield_names(nstatus, nstatus_names_nv10); | 462 | else |
437 | printk("\n"); | 463 | nouveau_print_bitfield_names(nstatus, nstatus_names_nv10); |
464 | printk("\n"); | ||
465 | } | ||
438 | 466 | ||
439 | NV_INFO(dev, "%s - Ch %d/%d Class 0x%04x Mthd 0x%04x " | 467 | NV_INFO(dev, "%s - Ch %d/%d Class 0x%04x Mthd 0x%04x " |
440 | "Data 0x%08x:0x%08x\n", | 468 | "Data 0x%08x:0x%08x\n", |
@@ -578,27 +606,502 @@ nouveau_pgraph_irq_handler(struct drm_device *dev) | |||
578 | } | 606 | } |
579 | 607 | ||
580 | static void | 608 | static void |
609 | nv50_pfb_vm_trap(struct drm_device *dev, int display, const char *name) | ||
610 | { | ||
611 | struct drm_nouveau_private *dev_priv = dev->dev_private; | ||
612 | uint32_t trap[6]; | ||
613 | int i, ch; | ||
614 | uint32_t idx = nv_rd32(dev, 0x100c90); | ||
615 | if (idx & 0x80000000) { | ||
616 | idx &= 0xffffff; | ||
617 | if (display) { | ||
618 | for (i = 0; i < 6; i++) { | ||
619 | nv_wr32(dev, 0x100c90, idx | i << 24); | ||
620 | trap[i] = nv_rd32(dev, 0x100c94); | ||
621 | } | ||
622 | for (ch = 0; ch < dev_priv->engine.fifo.channels; ch++) { | ||
623 | struct nouveau_channel *chan = dev_priv->fifos[ch]; | ||
624 | |||
625 | if (!chan || !chan->ramin) | ||
626 | continue; | ||
627 | |||
628 | if (trap[1] == chan->ramin->instance >> 12) | ||
629 | break; | ||
630 | } | ||
631 | NV_INFO(dev, "%s - VM: Trapped %s at %02x%04x%04x status %08x %08x channel %d\n", | ||
632 | name, (trap[5]&0x100?"read":"write"), | ||
633 | trap[5]&0xff, trap[4]&0xffff, | ||
634 | trap[3]&0xffff, trap[0], trap[2], ch); | ||
635 | } | ||
636 | nv_wr32(dev, 0x100c90, idx | 0x80000000); | ||
637 | } else if (display) { | ||
638 | NV_INFO(dev, "%s - no VM fault?\n", name); | ||
639 | } | ||
640 | } | ||
641 | |||
642 | static struct nouveau_enum_names nv50_mp_exec_error_names[] = | ||
643 | { | ||
644 | { 3, "STACK_UNDERFLOW" }, | ||
645 | { 4, "QUADON_ACTIVE" }, | ||
646 | { 8, "TIMEOUT" }, | ||
647 | { 0x10, "INVALID_OPCODE" }, | ||
648 | { 0x40, "BREAKPOINT" }, | ||
649 | }; | ||
650 | |||
651 | static void | ||
652 | nv50_pgraph_mp_trap(struct drm_device *dev, int tpid, int display) | ||
653 | { | ||
654 | struct drm_nouveau_private *dev_priv = dev->dev_private; | ||
655 | uint32_t units = nv_rd32(dev, 0x1540); | ||
656 | uint32_t addr, mp10, status, pc, oplow, ophigh; | ||
657 | int i; | ||
658 | int mps = 0; | ||
659 | for (i = 0; i < 4; i++) { | ||
660 | if (!(units & 1 << (i+24))) | ||
661 | continue; | ||
662 | if (dev_priv->chipset < 0xa0) | ||
663 | addr = 0x408200 + (tpid << 12) + (i << 7); | ||
664 | else | ||
665 | addr = 0x408100 + (tpid << 11) + (i << 7); | ||
666 | mp10 = nv_rd32(dev, addr + 0x10); | ||
667 | status = nv_rd32(dev, addr + 0x14); | ||
668 | if (!status) | ||
669 | continue; | ||
670 | if (display) { | ||
671 | nv_rd32(dev, addr + 0x20); | ||
672 | pc = nv_rd32(dev, addr + 0x24); | ||
673 | oplow = nv_rd32(dev, addr + 0x70); | ||
674 | ophigh= nv_rd32(dev, addr + 0x74); | ||
675 | NV_INFO(dev, "PGRAPH_TRAP_MP_EXEC - " | ||
676 | "TP %d MP %d: ", tpid, i); | ||
677 | nouveau_print_enum_names(status, | ||
678 | nv50_mp_exec_error_names); | ||
679 | printk(" at %06x warp %d, opcode %08x %08x\n", | ||
680 | pc&0xffffff, pc >> 24, | ||
681 | oplow, ophigh); | ||
682 | } | ||
683 | nv_wr32(dev, addr + 0x10, mp10); | ||
684 | nv_wr32(dev, addr + 0x14, 0); | ||
685 | mps++; | ||
686 | } | ||
687 | if (!mps && display) | ||
688 | NV_INFO(dev, "PGRAPH_TRAP_MP_EXEC - TP %d: " | ||
689 | "No MPs claiming errors?\n", tpid); | ||
690 | } | ||
691 | |||
692 | static void | ||
693 | nv50_pgraph_tp_trap(struct drm_device *dev, int type, uint32_t ustatus_old, | ||
694 | uint32_t ustatus_new, int display, const char *name) | ||
695 | { | ||
696 | struct drm_nouveau_private *dev_priv = dev->dev_private; | ||
697 | int tps = 0; | ||
698 | uint32_t units = nv_rd32(dev, 0x1540); | ||
699 | int i, r; | ||
700 | uint32_t ustatus_addr, ustatus; | ||
701 | for (i = 0; i < 16; i++) { | ||
702 | if (!(units & (1 << i))) | ||
703 | continue; | ||
704 | if (dev_priv->chipset < 0xa0) | ||
705 | ustatus_addr = ustatus_old + (i << 12); | ||
706 | else | ||
707 | ustatus_addr = ustatus_new + (i << 11); | ||
708 | ustatus = nv_rd32(dev, ustatus_addr) & 0x7fffffff; | ||
709 | if (!ustatus) | ||
710 | continue; | ||
711 | tps++; | ||
712 | switch (type) { | ||
713 | case 6: /* texture error... unknown for now */ | ||
714 | nv50_pfb_vm_trap(dev, display, name); | ||
715 | if (display) { | ||
716 | NV_ERROR(dev, "magic set %d:\n", i); | ||
717 | for (r = ustatus_addr + 4; r <= ustatus_addr + 0x10; r += 4) | ||
718 | NV_ERROR(dev, "\t0x%08x: 0x%08x\n", r, | ||
719 | nv_rd32(dev, r)); | ||
720 | } | ||
721 | break; | ||
722 | case 7: /* MP error */ | ||
723 | if (ustatus & 0x00010000) { | ||
724 | nv50_pgraph_mp_trap(dev, i, display); | ||
725 | ustatus &= ~0x00010000; | ||
726 | } | ||
727 | break; | ||
728 | case 8: /* TPDMA error */ | ||
729 | { | ||
730 | uint32_t e0c = nv_rd32(dev, ustatus_addr + 4); | ||
731 | uint32_t e10 = nv_rd32(dev, ustatus_addr + 8); | ||
732 | uint32_t e14 = nv_rd32(dev, ustatus_addr + 0xc); | ||
733 | uint32_t e18 = nv_rd32(dev, ustatus_addr + 0x10); | ||
734 | uint32_t e1c = nv_rd32(dev, ustatus_addr + 0x14); | ||
735 | uint32_t e20 = nv_rd32(dev, ustatus_addr + 0x18); | ||
736 | uint32_t e24 = nv_rd32(dev, ustatus_addr + 0x1c); | ||
737 | nv50_pfb_vm_trap(dev, display, name); | ||
738 | /* 2d engine destination */ | ||
739 | if (ustatus & 0x00000010) { | ||
740 | if (display) { | ||
741 | NV_INFO(dev, "PGRAPH_TRAP_TPDMA_2D - TP %d - Unknown fault at address %02x%08x\n", | ||
742 | i, e14, e10); | ||
743 | NV_INFO(dev, "PGRAPH_TRAP_TPDMA_2D - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", | ||
744 | i, e0c, e18, e1c, e20, e24); | ||
745 | } | ||
746 | ustatus &= ~0x00000010; | ||
747 | } | ||
748 | /* Render target */ | ||
749 | if (ustatus & 0x00000040) { | ||
750 | if (display) { | ||
751 | NV_INFO(dev, "PGRAPH_TRAP_TPDMA_RT - TP %d - Unknown fault at address %02x%08x\n", | ||
752 | i, e14, e10); | ||
753 | NV_INFO(dev, "PGRAPH_TRAP_TPDMA_RT - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", | ||
754 | i, e0c, e18, e1c, e20, e24); | ||
755 | } | ||
756 | ustatus &= ~0x00000040; | ||
757 | } | ||
758 | /* CUDA memory: l[], g[] or stack. */ | ||
759 | if (ustatus & 0x00000080) { | ||
760 | if (display) { | ||
761 | if (e18 & 0x80000000) { | ||
762 | /* g[] read fault? */ | ||
763 | NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - Global read fault at address %02x%08x\n", | ||
764 | i, e14, e10 | ((e18 >> 24) & 0x1f)); | ||
765 | e18 &= ~0x1f000000; | ||
766 | } else if (e18 & 0xc) { | ||
767 | /* g[] write fault? */ | ||
768 | NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - Global write fault at address %02x%08x\n", | ||
769 | i, e14, e10 | ((e18 >> 7) & 0x1f)); | ||
770 | e18 &= ~0x00000f80; | ||
771 | } else { | ||
772 | NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - Unknown CUDA fault at address %02x%08x\n", | ||
773 | i, e14, e10); | ||
774 | } | ||
775 | NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", | ||
776 | i, e0c, e18, e1c, e20, e24); | ||
777 | } | ||
778 | ustatus &= ~0x00000080; | ||
779 | } | ||
780 | } | ||
781 | break; | ||
782 | } | ||
783 | if (ustatus) { | ||
784 | if (display) | ||
785 | NV_INFO(dev, "%s - TP%d: Unhandled ustatus 0x%08x\n", name, i, ustatus); | ||
786 | } | ||
787 | nv_wr32(dev, ustatus_addr, 0xc0000000); | ||
788 | } | ||
789 | |||
790 | if (!tps && display) | ||
791 | NV_INFO(dev, "%s - No TPs claiming errors?\n", name); | ||
792 | } | ||
793 | |||
794 | static void | ||
795 | nv50_pgraph_trap_handler(struct drm_device *dev) | ||
796 | { | ||
797 | struct nouveau_pgraph_trap trap; | ||
798 | uint32_t status = nv_rd32(dev, 0x400108); | ||
799 | uint32_t ustatus; | ||
800 | int display = nouveau_ratelimit(); | ||
801 | |||
802 | |||
803 | if (!status && display) { | ||
804 | nouveau_graph_trap_info(dev, &trap); | ||
805 | nouveau_graph_dump_trap_info(dev, "PGRAPH_TRAP", &trap); | ||
806 | NV_INFO(dev, "PGRAPH_TRAP - no units reporting traps?\n"); | ||
807 | } | ||
808 | |||
809 | /* DISPATCH: Relays commands to other units and handles NOTIFY, | ||
810 | * COND, QUERY. If you get a trap from it, the command is still stuck | ||
811 | * in DISPATCH and you need to do something about it. */ | ||
812 | if (status & 0x001) { | ||
813 | ustatus = nv_rd32(dev, 0x400804) & 0x7fffffff; | ||
814 | if (!ustatus && display) { | ||
815 | NV_INFO(dev, "PGRAPH_TRAP_DISPATCH - no ustatus?\n"); | ||
816 | } | ||
817 | |||
818 | /* Known to be triggered by screwed up NOTIFY and COND... */ | ||
819 | if (ustatus & 0x00000001) { | ||
820 | nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_DISPATCH_FAULT"); | ||
821 | nv_wr32(dev, 0x400500, 0); | ||
822 | if (nv_rd32(dev, 0x400808) & 0x80000000) { | ||
823 | if (display) { | ||
824 | if (nouveau_graph_trapped_channel(dev, &trap.channel)) | ||
825 | trap.channel = -1; | ||
826 | trap.class = nv_rd32(dev, 0x400814); | ||
827 | trap.mthd = nv_rd32(dev, 0x400808) & 0x1ffc; | ||
828 | trap.subc = (nv_rd32(dev, 0x400808) >> 16) & 0x7; | ||
829 | trap.data = nv_rd32(dev, 0x40080c); | ||
830 | trap.data2 = nv_rd32(dev, 0x400810); | ||
831 | nouveau_graph_dump_trap_info(dev, | ||
832 | "PGRAPH_TRAP_DISPATCH_FAULT", &trap); | ||
833 | NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_FAULT - 400808: %08x\n", nv_rd32(dev, 0x400808)); | ||
834 | NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_FAULT - 400848: %08x\n", nv_rd32(dev, 0x400848)); | ||
835 | } | ||
836 | nv_wr32(dev, 0x400808, 0); | ||
837 | } else if (display) { | ||
838 | NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_FAULT - No stuck command?\n"); | ||
839 | } | ||
840 | nv_wr32(dev, 0x4008e8, nv_rd32(dev, 0x4008e8) & 3); | ||
841 | nv_wr32(dev, 0x400848, 0); | ||
842 | ustatus &= ~0x00000001; | ||
843 | } | ||
844 | if (ustatus & 0x00000002) { | ||
845 | nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_DISPATCH_QUERY"); | ||
846 | nv_wr32(dev, 0x400500, 0); | ||
847 | if (nv_rd32(dev, 0x40084c) & 0x80000000) { | ||
848 | if (display) { | ||
849 | if (nouveau_graph_trapped_channel(dev, &trap.channel)) | ||
850 | trap.channel = -1; | ||
851 | trap.class = nv_rd32(dev, 0x400814); | ||
852 | trap.mthd = nv_rd32(dev, 0x40084c) & 0x1ffc; | ||
853 | trap.subc = (nv_rd32(dev, 0x40084c) >> 16) & 0x7; | ||
854 | trap.data = nv_rd32(dev, 0x40085c); | ||
855 | trap.data2 = 0; | ||
856 | nouveau_graph_dump_trap_info(dev, | ||
857 | "PGRAPH_TRAP_DISPATCH_QUERY", &trap); | ||
858 | NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_QUERY - 40084c: %08x\n", nv_rd32(dev, 0x40084c)); | ||
859 | } | ||
860 | nv_wr32(dev, 0x40084c, 0); | ||
861 | } else if (display) { | ||
862 | NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_QUERY - No stuck command?\n"); | ||
863 | } | ||
864 | ustatus &= ~0x00000002; | ||
865 | } | ||
866 | if (ustatus && display) | ||
867 | NV_INFO(dev, "PGRAPH_TRAP_DISPATCH - Unhandled ustatus 0x%08x\n", ustatus); | ||
868 | nv_wr32(dev, 0x400804, 0xc0000000); | ||
869 | nv_wr32(dev, 0x400108, 0x001); | ||
870 | status &= ~0x001; | ||
871 | } | ||
872 | |||
873 | /* TRAPs other than dispatch use the "normal" trap regs. */ | ||
874 | if (status && display) { | ||
875 | nouveau_graph_trap_info(dev, &trap); | ||
876 | nouveau_graph_dump_trap_info(dev, | ||
877 | "PGRAPH_TRAP", &trap); | ||
878 | } | ||
879 | |||
880 | /* M2MF: Memory to memory copy engine. */ | ||
881 | if (status & 0x002) { | ||
882 | ustatus = nv_rd32(dev, 0x406800) & 0x7fffffff; | ||
883 | if (!ustatus && display) { | ||
884 | NV_INFO(dev, "PGRAPH_TRAP_M2MF - no ustatus?\n"); | ||
885 | } | ||
886 | if (ustatus & 0x00000001) { | ||
887 | nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_NOTIFY"); | ||
888 | ustatus &= ~0x00000001; | ||
889 | } | ||
890 | if (ustatus & 0x00000002) { | ||
891 | nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_IN"); | ||
892 | ustatus &= ~0x00000002; | ||
893 | } | ||
894 | if (ustatus & 0x00000004) { | ||
895 | nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_OUT"); | ||
896 | ustatus &= ~0x00000004; | ||
897 | } | ||
898 | NV_INFO (dev, "PGRAPH_TRAP_M2MF - %08x %08x %08x %08x\n", | ||
899 | nv_rd32(dev, 0x406804), | ||
900 | nv_rd32(dev, 0x406808), | ||
901 | nv_rd32(dev, 0x40680c), | ||
902 | nv_rd32(dev, 0x406810)); | ||
903 | if (ustatus && display) | ||
904 | NV_INFO(dev, "PGRAPH_TRAP_M2MF - Unhandled ustatus 0x%08x\n", ustatus); | ||
905 | /* No sane way found yet -- just reset the bugger. */ | ||
906 | nv_wr32(dev, 0x400040, 2); | ||
907 | nv_wr32(dev, 0x400040, 0); | ||
908 | nv_wr32(dev, 0x406800, 0xc0000000); | ||
909 | nv_wr32(dev, 0x400108, 0x002); | ||
910 | status &= ~0x002; | ||
911 | } | ||
912 | |||
913 | /* VFETCH: Fetches data from vertex buffers. */ | ||
914 | if (status & 0x004) { | ||
915 | ustatus = nv_rd32(dev, 0x400c04) & 0x7fffffff; | ||
916 | if (!ustatus && display) { | ||
917 | NV_INFO(dev, "PGRAPH_TRAP_VFETCH - no ustatus?\n"); | ||
918 | } | ||
919 | if (ustatus & 0x00000001) { | ||
920 | nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_VFETCH_FAULT"); | ||
921 | NV_INFO (dev, "PGRAPH_TRAP_VFETCH_FAULT - %08x %08x %08x %08x\n", | ||
922 | nv_rd32(dev, 0x400c00), | ||
923 | nv_rd32(dev, 0x400c08), | ||
924 | nv_rd32(dev, 0x400c0c), | ||
925 | nv_rd32(dev, 0x400c10)); | ||
926 | ustatus &= ~0x00000001; | ||
927 | } | ||
928 | if (ustatus && display) | ||
929 | NV_INFO(dev, "PGRAPH_TRAP_VFETCH - Unhandled ustatus 0x%08x\n", ustatus); | ||
930 | nv_wr32(dev, 0x400c04, 0xc0000000); | ||
931 | nv_wr32(dev, 0x400108, 0x004); | ||
932 | status &= ~0x004; | ||
933 | } | ||
934 | |||
935 | /* STRMOUT: DirectX streamout / OpenGL transform feedback. */ | ||
936 | if (status & 0x008) { | ||
937 | ustatus = nv_rd32(dev, 0x401800) & 0x7fffffff; | ||
938 | if (!ustatus && display) { | ||
939 | NV_INFO(dev, "PGRAPH_TRAP_STRMOUT - no ustatus?\n"); | ||
940 | } | ||
941 | if (ustatus & 0x00000001) { | ||
942 | nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_STRMOUT_FAULT"); | ||
943 | NV_INFO (dev, "PGRAPH_TRAP_STRMOUT_FAULT - %08x %08x %08x %08x\n", | ||
944 | nv_rd32(dev, 0x401804), | ||
945 | nv_rd32(dev, 0x401808), | ||
946 | nv_rd32(dev, 0x40180c), | ||
947 | nv_rd32(dev, 0x401810)); | ||
948 | ustatus &= ~0x00000001; | ||
949 | } | ||
950 | if (ustatus && display) | ||
951 | NV_INFO(dev, "PGRAPH_TRAP_STRMOUT - Unhandled ustatus 0x%08x\n", ustatus); | ||
952 | /* No sane way found yet -- just reset the bugger. */ | ||
953 | nv_wr32(dev, 0x400040, 0x80); | ||
954 | nv_wr32(dev, 0x400040, 0); | ||
955 | nv_wr32(dev, 0x401800, 0xc0000000); | ||
956 | nv_wr32(dev, 0x400108, 0x008); | ||
957 | status &= ~0x008; | ||
958 | } | ||
959 | |||
960 | /* CCACHE: Handles code and c[] caches and fills them. */ | ||
961 | if (status & 0x010) { | ||
962 | ustatus = nv_rd32(dev, 0x405018) & 0x7fffffff; | ||
963 | if (!ustatus && display) { | ||
964 | NV_INFO(dev, "PGRAPH_TRAP_CCACHE - no ustatus?\n"); | ||
965 | } | ||
966 | if (ustatus & 0x00000001) { | ||
967 | nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_CCACHE_FAULT"); | ||
968 | NV_INFO (dev, "PGRAPH_TRAP_CCACHE_FAULT - %08x %08x %08x %08x %08x %08x %08x\n", | ||
969 | nv_rd32(dev, 0x405800), | ||
970 | nv_rd32(dev, 0x405804), | ||
971 | nv_rd32(dev, 0x405808), | ||
972 | nv_rd32(dev, 0x40580c), | ||
973 | nv_rd32(dev, 0x405810), | ||
974 | nv_rd32(dev, 0x405814), | ||
975 | nv_rd32(dev, 0x40581c)); | ||
976 | ustatus &= ~0x00000001; | ||
977 | } | ||
978 | if (ustatus && display) | ||
979 | NV_INFO(dev, "PGRAPH_TRAP_CCACHE - Unhandled ustatus 0x%08x\n", ustatus); | ||
980 | nv_wr32(dev, 0x405018, 0xc0000000); | ||
981 | nv_wr32(dev, 0x400108, 0x010); | ||
982 | status &= ~0x010; | ||
983 | } | ||
984 | |||
985 | /* Unknown, not seen yet... 0x402000 is the only trap status reg | ||
986 | * remaining, so try to handle it anyway. Perhaps related to that | ||
987 | * unknown DMA slot on tesla? */ | ||
988 | if (status & 0x20) { | ||
989 | nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_UNKC04"); | ||
990 | ustatus = nv_rd32(dev, 0x402000) & 0x7fffffff; | ||
991 | if (display) | ||
992 | NV_INFO(dev, "PGRAPH_TRAP_UNKC04 - Unhandled ustatus 0x%08x\n", ustatus); | ||
993 | nv_wr32(dev, 0x402000, 0xc0000000); | ||
994 | /* no status modifiction on purpose */ | ||
995 | } | ||
996 | |||
997 | /* TEXTURE: CUDA texturing units */ | ||
998 | if (status & 0x040) { | ||
999 | nv50_pgraph_tp_trap (dev, 6, 0x408900, 0x408600, display, | ||
1000 | "PGRAPH_TRAP_TEXTURE"); | ||
1001 | nv_wr32(dev, 0x400108, 0x040); | ||
1002 | status &= ~0x040; | ||
1003 | } | ||
1004 | |||
1005 | /* MP: CUDA execution engines. */ | ||
1006 | if (status & 0x080) { | ||
1007 | nv50_pgraph_tp_trap (dev, 7, 0x408314, 0x40831c, display, | ||
1008 | "PGRAPH_TRAP_MP"); | ||
1009 | nv_wr32(dev, 0x400108, 0x080); | ||
1010 | status &= ~0x080; | ||
1011 | } | ||
1012 | |||
1013 | /* TPDMA: Handles TP-initiated uncached memory accesses: | ||
1014 | * l[], g[], stack, 2d surfaces, render targets. */ | ||
1015 | if (status & 0x100) { | ||
1016 | nv50_pgraph_tp_trap (dev, 8, 0x408e08, 0x408708, display, | ||
1017 | "PGRAPH_TRAP_TPDMA"); | ||
1018 | nv_wr32(dev, 0x400108, 0x100); | ||
1019 | status &= ~0x100; | ||
1020 | } | ||
1021 | |||
1022 | if (status) { | ||
1023 | if (display) | ||
1024 | NV_INFO(dev, "PGRAPH_TRAP - Unknown trap 0x%08x\n", | ||
1025 | status); | ||
1026 | nv_wr32(dev, 0x400108, status); | ||
1027 | } | ||
1028 | } | ||
1029 | |||
1030 | /* There must be a *lot* of these. Will take some time to gather them up. */ | ||
1031 | static struct nouveau_enum_names nv50_data_error_names[] = | ||
1032 | { | ||
1033 | { 4, "INVALID_VALUE" }, | ||
1034 | { 5, "INVALID_ENUM" }, | ||
1035 | { 8, "INVALID_OBJECT" }, | ||
1036 | { 0xc, "INVALID_BITFIELD" }, | ||
1037 | { 0x28, "MP_NO_REG_SPACE" }, | ||
1038 | { 0x2b, "MP_BLOCK_SIZE_MISMATCH" }, | ||
1039 | }; | ||
1040 | |||
1041 | static void | ||
581 | nv50_pgraph_irq_handler(struct drm_device *dev) | 1042 | nv50_pgraph_irq_handler(struct drm_device *dev) |
582 | { | 1043 | { |
1044 | struct nouveau_pgraph_trap trap; | ||
1045 | int unhandled = 0; | ||
583 | uint32_t status; | 1046 | uint32_t status; |
584 | 1047 | ||
585 | while ((status = nv_rd32(dev, NV03_PGRAPH_INTR))) { | 1048 | while ((status = nv_rd32(dev, NV03_PGRAPH_INTR))) { |
586 | uint32_t nsource = nv_rd32(dev, NV03_PGRAPH_NSOURCE); | 1049 | /* NOTIFY: You've set a NOTIFY an a command and it's done. */ |
587 | |||
588 | if (status & 0x00000001) { | 1050 | if (status & 0x00000001) { |
589 | nouveau_pgraph_intr_notify(dev, nsource); | 1051 | nouveau_graph_trap_info(dev, &trap); |
1052 | if (nouveau_ratelimit()) | ||
1053 | nouveau_graph_dump_trap_info(dev, | ||
1054 | "PGRAPH_NOTIFY", &trap); | ||
590 | status &= ~0x00000001; | 1055 | status &= ~0x00000001; |
591 | nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000001); | 1056 | nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000001); |
592 | } | 1057 | } |
593 | 1058 | ||
594 | if (status & 0x00000010) { | 1059 | /* COMPUTE_QUERY: Purpose and exact cause unknown, happens |
595 | nouveau_pgraph_intr_error(dev, nsource | | 1060 | * when you write 0x200 to 0x50c0 method 0x31c. */ |
596 | NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD); | 1061 | if (status & 0x00000002) { |
1062 | nouveau_graph_trap_info(dev, &trap); | ||
1063 | if (nouveau_ratelimit()) | ||
1064 | nouveau_graph_dump_trap_info(dev, | ||
1065 | "PGRAPH_COMPUTE_QUERY", &trap); | ||
1066 | status &= ~0x00000002; | ||
1067 | nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000002); | ||
1068 | } | ||
597 | 1069 | ||
1070 | /* Unknown, never seen: 0x4 */ | ||
1071 | |||
1072 | /* ILLEGAL_MTHD: You used a wrong method for this class. */ | ||
1073 | if (status & 0x00000010) { | ||
1074 | nouveau_graph_trap_info(dev, &trap); | ||
1075 | if (nouveau_pgraph_intr_swmthd(dev, &trap)) | ||
1076 | unhandled = 1; | ||
1077 | if (unhandled && nouveau_ratelimit()) | ||
1078 | nouveau_graph_dump_trap_info(dev, | ||
1079 | "PGRAPH_ILLEGAL_MTHD", &trap); | ||
598 | status &= ~0x00000010; | 1080 | status &= ~0x00000010; |
599 | nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000010); | 1081 | nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000010); |
600 | } | 1082 | } |
601 | 1083 | ||
1084 | /* ILLEGAL_CLASS: You used a wrong class. */ | ||
1085 | if (status & 0x00000020) { | ||
1086 | nouveau_graph_trap_info(dev, &trap); | ||
1087 | if (nouveau_ratelimit()) | ||
1088 | nouveau_graph_dump_trap_info(dev, | ||
1089 | "PGRAPH_ILLEGAL_CLASS", &trap); | ||
1090 | status &= ~0x00000020; | ||
1091 | nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000020); | ||
1092 | } | ||
1093 | |||
1094 | /* DOUBLE_NOTIFY: You tried to set a NOTIFY on another NOTIFY. */ | ||
1095 | if (status & 0x00000040) { | ||
1096 | nouveau_graph_trap_info(dev, &trap); | ||
1097 | if (nouveau_ratelimit()) | ||
1098 | nouveau_graph_dump_trap_info(dev, | ||
1099 | "PGRAPH_DOUBLE_NOTIFY", &trap); | ||
1100 | status &= ~0x00000040; | ||
1101 | nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000040); | ||
1102 | } | ||
1103 | |||
1104 | /* CONTEXT_SWITCH: PGRAPH needs us to load a new context */ | ||
602 | if (status & 0x00001000) { | 1105 | if (status & 0x00001000) { |
603 | nv_wr32(dev, 0x400500, 0x00000000); | 1106 | nv_wr32(dev, 0x400500, 0x00000000); |
604 | nv_wr32(dev, NV03_PGRAPH_INTR, | 1107 | nv_wr32(dev, NV03_PGRAPH_INTR, |
@@ -613,49 +1116,59 @@ nv50_pgraph_irq_handler(struct drm_device *dev) | |||
613 | status &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; | 1116 | status &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; |
614 | } | 1117 | } |
615 | 1118 | ||
616 | if (status & 0x00100000) { | 1119 | /* BUFFER_NOTIFY: Your m2mf transfer finished */ |
617 | nouveau_pgraph_intr_error(dev, nsource | | 1120 | if (status & 0x00010000) { |
618 | NV03_PGRAPH_NSOURCE_DATA_ERROR); | 1121 | nouveau_graph_trap_info(dev, &trap); |
1122 | if (nouveau_ratelimit()) | ||
1123 | nouveau_graph_dump_trap_info(dev, | ||
1124 | "PGRAPH_BUFFER_NOTIFY", &trap); | ||
1125 | status &= ~0x00010000; | ||
1126 | nv_wr32(dev, NV03_PGRAPH_INTR, 0x00010000); | ||
1127 | } | ||
619 | 1128 | ||
1129 | /* DATA_ERROR: Invalid value for this method, or invalid | ||
1130 | * state in current PGRAPH context for this operation */ | ||
1131 | if (status & 0x00100000) { | ||
1132 | nouveau_graph_trap_info(dev, &trap); | ||
1133 | if (nouveau_ratelimit()) { | ||
1134 | nouveau_graph_dump_trap_info(dev, | ||
1135 | "PGRAPH_DATA_ERROR", &trap); | ||
1136 | NV_INFO (dev, "PGRAPH_DATA_ERROR - "); | ||
1137 | nouveau_print_enum_names(nv_rd32(dev, 0x400110), | ||
1138 | nv50_data_error_names); | ||
1139 | printk("\n"); | ||
1140 | } | ||
620 | status &= ~0x00100000; | 1141 | status &= ~0x00100000; |
621 | nv_wr32(dev, NV03_PGRAPH_INTR, 0x00100000); | 1142 | nv_wr32(dev, NV03_PGRAPH_INTR, 0x00100000); |
622 | } | 1143 | } |
623 | 1144 | ||
1145 | /* TRAP: Something bad happened in the middle of command | ||
1146 | * execution. Has a billion types, subtypes, and even | ||
1147 | * subsubtypes. */ | ||
624 | if (status & 0x00200000) { | 1148 | if (status & 0x00200000) { |
625 | int r; | 1149 | nv50_pgraph_trap_handler(dev); |
626 | |||
627 | nouveau_pgraph_intr_error(dev, nsource | | ||
628 | NV03_PGRAPH_NSOURCE_PROTECTION_ERROR); | ||
629 | |||
630 | NV_ERROR(dev, "magic set 1:\n"); | ||
631 | for (r = 0x408900; r <= 0x408910; r += 4) | ||
632 | NV_ERROR(dev, "\t0x%08x: 0x%08x\n", r, | ||
633 | nv_rd32(dev, r)); | ||
634 | nv_wr32(dev, 0x408900, | ||
635 | nv_rd32(dev, 0x408904) | 0xc0000000); | ||
636 | for (r = 0x408e08; r <= 0x408e24; r += 4) | ||
637 | NV_ERROR(dev, "\t0x%08x: 0x%08x\n", r, | ||
638 | nv_rd32(dev, r)); | ||
639 | nv_wr32(dev, 0x408e08, | ||
640 | nv_rd32(dev, 0x408e08) | 0xc0000000); | ||
641 | |||
642 | NV_ERROR(dev, "magic set 2:\n"); | ||
643 | for (r = 0x409900; r <= 0x409910; r += 4) | ||
644 | NV_ERROR(dev, "\t0x%08x: 0x%08x\n", r, | ||
645 | nv_rd32(dev, r)); | ||
646 | nv_wr32(dev, 0x409900, | ||
647 | nv_rd32(dev, 0x409904) | 0xc0000000); | ||
648 | for (r = 0x409e08; r <= 0x409e24; r += 4) | ||
649 | NV_ERROR(dev, "\t0x%08x: 0x%08x\n", r, | ||
650 | nv_rd32(dev, r)); | ||
651 | nv_wr32(dev, 0x409e08, | ||
652 | nv_rd32(dev, 0x409e08) | 0xc0000000); | ||
653 | |||
654 | status &= ~0x00200000; | 1150 | status &= ~0x00200000; |
655 | nv_wr32(dev, NV03_PGRAPH_NSOURCE, nsource); | ||
656 | nv_wr32(dev, NV03_PGRAPH_INTR, 0x00200000); | 1151 | nv_wr32(dev, NV03_PGRAPH_INTR, 0x00200000); |
657 | } | 1152 | } |
658 | 1153 | ||
1154 | /* Unknown, never seen: 0x00400000 */ | ||
1155 | |||
1156 | /* SINGLE_STEP: Happens on every method if you turned on | ||
1157 | * single stepping in 40008c */ | ||
1158 | if (status & 0x01000000) { | ||
1159 | nouveau_graph_trap_info(dev, &trap); | ||
1160 | if (nouveau_ratelimit()) | ||
1161 | nouveau_graph_dump_trap_info(dev, | ||
1162 | "PGRAPH_SINGLE_STEP", &trap); | ||
1163 | status &= ~0x01000000; | ||
1164 | nv_wr32(dev, NV03_PGRAPH_INTR, 0x01000000); | ||
1165 | } | ||
1166 | |||
1167 | /* 0x02000000 happens when you pause a ctxprog... | ||
1168 | * but the only way this can happen that I know is by | ||
1169 | * poking the relevant MMIO register, and we don't | ||
1170 | * do that. */ | ||
1171 | |||
659 | if (status) { | 1172 | if (status) { |
660 | NV_INFO(dev, "Unhandled PGRAPH_INTR - 0x%08x\n", | 1173 | NV_INFO(dev, "Unhandled PGRAPH_INTR - 0x%08x\n", |
661 | status); | 1174 | status); |
@@ -672,7 +1185,8 @@ nv50_pgraph_irq_handler(struct drm_device *dev) | |||
672 | } | 1185 | } |
673 | 1186 | ||
674 | nv_wr32(dev, NV03_PMC_INTR_0, NV_PMC_INTR_0_PGRAPH_PENDING); | 1187 | nv_wr32(dev, NV03_PMC_INTR_0, NV_PMC_INTR_0_PGRAPH_PENDING); |
675 | nv_wr32(dev, 0x400824, nv_rd32(dev, 0x400824) & ~(1 << 31)); | 1188 | if (nv_rd32(dev, 0x400824) & (1 << 31)) |
1189 | nv_wr32(dev, 0x400824, nv_rd32(dev, 0x400824) & ~(1 << 31)); | ||
676 | } | 1190 | } |
677 | 1191 | ||
678 | static void | 1192 | static void |
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c index 2dc09dbd817d..775a7017af64 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c | |||
@@ -347,6 +347,20 @@ nv50_mem_vm_bind_linear(struct drm_device *dev, uint64_t virt, uint32_t size, | |||
347 | return -EBUSY; | 347 | return -EBUSY; |
348 | } | 348 | } |
349 | 349 | ||
350 | nv_wr32(dev, 0x100c80, 0x00040001); | ||
351 | if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) { | ||
352 | NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n"); | ||
353 | NV_ERROR(dev, "0x100c80 = 0x%08x\n", nv_rd32(dev, 0x100c80)); | ||
354 | return -EBUSY; | ||
355 | } | ||
356 | |||
357 | nv_wr32(dev, 0x100c80, 0x00060001); | ||
358 | if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) { | ||
359 | NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n"); | ||
360 | NV_ERROR(dev, "0x100c80 = 0x%08x\n", nv_rd32(dev, 0x100c80)); | ||
361 | return -EBUSY; | ||
362 | } | ||
363 | |||
350 | return 0; | 364 | return 0; |
351 | } | 365 | } |
352 | 366 | ||
@@ -387,6 +401,20 @@ nv50_mem_vm_unbind(struct drm_device *dev, uint64_t virt, uint32_t size) | |||
387 | if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) { | 401 | if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) { |
388 | NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n"); | 402 | NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n"); |
389 | NV_ERROR(dev, "0x100c80 = 0x%08x\n", nv_rd32(dev, 0x100c80)); | 403 | NV_ERROR(dev, "0x100c80 = 0x%08x\n", nv_rd32(dev, 0x100c80)); |
404 | return; | ||
405 | } | ||
406 | |||
407 | nv_wr32(dev, 0x100c80, 0x00040001); | ||
408 | if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) { | ||
409 | NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n"); | ||
410 | NV_ERROR(dev, "0x100c80 = 0x%08x\n", nv_rd32(dev, 0x100c80)); | ||
411 | return; | ||
412 | } | ||
413 | |||
414 | nv_wr32(dev, 0x100c80, 0x00060001); | ||
415 | if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) { | ||
416 | NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n"); | ||
417 | NV_ERROR(dev, "0x100c80 = 0x%08x\n", nv_rd32(dev, 0x100c80)); | ||
390 | } | 418 | } |
391 | } | 419 | } |
392 | 420 | ||
@@ -449,9 +477,30 @@ void nouveau_mem_close(struct drm_device *dev) | |||
449 | } | 477 | } |
450 | } | 478 | } |
451 | 479 | ||
452 | /*XXX won't work on BSD because of pci_read_config_dword */ | ||
453 | static uint32_t | 480 | static uint32_t |
454 | nouveau_mem_fb_amount_igp(struct drm_device *dev) | 481 | nouveau_mem_detect_nv04(struct drm_device *dev) |
482 | { | ||
483 | uint32_t boot0 = nv_rd32(dev, NV03_BOOT_0); | ||
484 | |||
485 | if (boot0 & 0x00000100) | ||
486 | return (((boot0 >> 12) & 0xf) * 2 + 2) * 1024 * 1024; | ||
487 | |||
488 | switch (boot0 & NV03_BOOT_0_RAM_AMOUNT) { | ||
489 | case NV04_BOOT_0_RAM_AMOUNT_32MB: | ||
490 | return 32 * 1024 * 1024; | ||
491 | case NV04_BOOT_0_RAM_AMOUNT_16MB: | ||
492 | return 16 * 1024 * 1024; | ||
493 | case NV04_BOOT_0_RAM_AMOUNT_8MB: | ||
494 | return 8 * 1024 * 1024; | ||
495 | case NV04_BOOT_0_RAM_AMOUNT_4MB: | ||
496 | return 4 * 1024 * 1024; | ||
497 | } | ||
498 | |||
499 | return 0; | ||
500 | } | ||
501 | |||
502 | static uint32_t | ||
503 | nouveau_mem_detect_nforce(struct drm_device *dev) | ||
455 | { | 504 | { |
456 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 505 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
457 | struct pci_dev *bridge; | 506 | struct pci_dev *bridge; |
@@ -463,11 +512,11 @@ nouveau_mem_fb_amount_igp(struct drm_device *dev) | |||
463 | return 0; | 512 | return 0; |
464 | } | 513 | } |
465 | 514 | ||
466 | if (dev_priv->flags&NV_NFORCE) { | 515 | if (dev_priv->flags & NV_NFORCE) { |
467 | pci_read_config_dword(bridge, 0x7C, &mem); | 516 | pci_read_config_dword(bridge, 0x7C, &mem); |
468 | return (uint64_t)(((mem >> 6) & 31) + 1)*1024*1024; | 517 | return (uint64_t)(((mem >> 6) & 31) + 1)*1024*1024; |
469 | } else | 518 | } else |
470 | if (dev_priv->flags&NV_NFORCE2) { | 519 | if (dev_priv->flags & NV_NFORCE2) { |
471 | pci_read_config_dword(bridge, 0x84, &mem); | 520 | pci_read_config_dword(bridge, 0x84, &mem); |
472 | return (uint64_t)(((mem >> 4) & 127) + 1)*1024*1024; | 521 | return (uint64_t)(((mem >> 4) & 127) + 1)*1024*1024; |
473 | } | 522 | } |
@@ -477,50 +526,32 @@ nouveau_mem_fb_amount_igp(struct drm_device *dev) | |||
477 | } | 526 | } |
478 | 527 | ||
479 | /* returns the amount of FB ram in bytes */ | 528 | /* returns the amount of FB ram in bytes */ |
480 | uint64_t nouveau_mem_fb_amount(struct drm_device *dev) | 529 | int |
530 | nouveau_mem_detect(struct drm_device *dev) | ||
481 | { | 531 | { |
482 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 532 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
483 | uint32_t boot0; | 533 | |
484 | 534 | if (dev_priv->card_type == NV_04) { | |
485 | switch (dev_priv->card_type) { | 535 | dev_priv->vram_size = nouveau_mem_detect_nv04(dev); |
486 | case NV_04: | 536 | } else |
487 | boot0 = nv_rd32(dev, NV03_BOOT_0); | 537 | if (dev_priv->flags & (NV_NFORCE | NV_NFORCE2)) { |
488 | if (boot0 & 0x00000100) | 538 | dev_priv->vram_size = nouveau_mem_detect_nforce(dev); |
489 | return (((boot0 >> 12) & 0xf) * 2 + 2) * 1024 * 1024; | 539 | } else { |
490 | 540 | dev_priv->vram_size = nv_rd32(dev, NV04_FIFO_DATA); | |
491 | switch (boot0 & NV03_BOOT_0_RAM_AMOUNT) { | 541 | dev_priv->vram_size &= NV10_FIFO_DATA_RAM_AMOUNT_MB_MASK; |
492 | case NV04_BOOT_0_RAM_AMOUNT_32MB: | 542 | if (dev_priv->chipset == 0xaa || dev_priv->chipset == 0xac) |
493 | return 32 * 1024 * 1024; | 543 | dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10) << 12; |
494 | case NV04_BOOT_0_RAM_AMOUNT_16MB: | ||
495 | return 16 * 1024 * 1024; | ||
496 | case NV04_BOOT_0_RAM_AMOUNT_8MB: | ||
497 | return 8 * 1024 * 1024; | ||
498 | case NV04_BOOT_0_RAM_AMOUNT_4MB: | ||
499 | return 4 * 1024 * 1024; | ||
500 | } | ||
501 | break; | ||
502 | case NV_10: | ||
503 | case NV_20: | ||
504 | case NV_30: | ||
505 | case NV_40: | ||
506 | case NV_50: | ||
507 | default: | ||
508 | if (dev_priv->flags & (NV_NFORCE | NV_NFORCE2)) { | ||
509 | return nouveau_mem_fb_amount_igp(dev); | ||
510 | } else { | ||
511 | uint64_t mem; | ||
512 | mem = (nv_rd32(dev, NV04_FIFO_DATA) & | ||
513 | NV10_FIFO_DATA_RAM_AMOUNT_MB_MASK) >> | ||
514 | NV10_FIFO_DATA_RAM_AMOUNT_MB_SHIFT; | ||
515 | return mem * 1024 * 1024; | ||
516 | } | ||
517 | break; | ||
518 | } | 544 | } |
519 | 545 | ||
520 | NV_ERROR(dev, | 546 | NV_INFO(dev, "Detected %dMiB VRAM\n", (int)(dev_priv->vram_size >> 20)); |
521 | "Unable to detect video ram size. Please report your setup to " | 547 | if (dev_priv->vram_sys_base) { |
522 | DRIVER_EMAIL "\n"); | 548 | NV_INFO(dev, "Stolen system memory at: 0x%010llx\n", |
523 | return 0; | 549 | dev_priv->vram_sys_base); |
550 | } | ||
551 | |||
552 | if (dev_priv->vram_size) | ||
553 | return 0; | ||
554 | return -ENOMEM; | ||
524 | } | 555 | } |
525 | 556 | ||
526 | #if __OS_HAS_AGP | 557 | #if __OS_HAS_AGP |
@@ -631,15 +662,12 @@ nouveau_mem_init(struct drm_device *dev) | |||
631 | spin_lock_init(&dev_priv->ttm.bo_list_lock); | 662 | spin_lock_init(&dev_priv->ttm.bo_list_lock); |
632 | spin_lock_init(&dev_priv->tile.lock); | 663 | spin_lock_init(&dev_priv->tile.lock); |
633 | 664 | ||
634 | dev_priv->fb_available_size = nouveau_mem_fb_amount(dev); | 665 | dev_priv->fb_available_size = dev_priv->vram_size; |
635 | |||
636 | dev_priv->fb_mappable_pages = dev_priv->fb_available_size; | 666 | dev_priv->fb_mappable_pages = dev_priv->fb_available_size; |
637 | if (dev_priv->fb_mappable_pages > drm_get_resource_len(dev, 1)) | 667 | if (dev_priv->fb_mappable_pages > drm_get_resource_len(dev, 1)) |
638 | dev_priv->fb_mappable_pages = drm_get_resource_len(dev, 1); | 668 | dev_priv->fb_mappable_pages = drm_get_resource_len(dev, 1); |
639 | dev_priv->fb_mappable_pages >>= PAGE_SHIFT; | 669 | dev_priv->fb_mappable_pages >>= PAGE_SHIFT; |
640 | 670 | ||
641 | NV_INFO(dev, "%d MiB VRAM\n", (int)(dev_priv->fb_available_size >> 20)); | ||
642 | |||
643 | /* remove reserved space at end of vram from available amount */ | 671 | /* remove reserved space at end of vram from available amount */ |
644 | dev_priv->fb_available_size -= dev_priv->ramin_rsvd_vram; | 672 | dev_priv->fb_available_size -= dev_priv->ramin_rsvd_vram; |
645 | dev_priv->fb_aper_free = dev_priv->fb_available_size; | 673 | dev_priv->fb_aper_free = dev_priv->fb_available_size; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c index ed1590577b6c..1d6ee8b55154 100644 --- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c +++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "drmP.h" | 1 | #include "drmP.h" |
2 | #include "nouveau_drv.h" | 2 | #include "nouveau_drv.h" |
3 | #include <linux/pagemap.h> | 3 | #include <linux/pagemap.h> |
4 | #include <linux/slab.h> | ||
4 | 5 | ||
5 | #define NV_CTXDMA_PAGE_SHIFT 12 | 6 | #define NV_CTXDMA_PAGE_SHIFT 12 |
6 | #define NV_CTXDMA_PAGE_SIZE (1 << NV_CTXDMA_PAGE_SHIFT) | 7 | #define NV_CTXDMA_PAGE_SIZE (1 << NV_CTXDMA_PAGE_SHIFT) |
@@ -171,6 +172,24 @@ nouveau_sgdma_unbind(struct ttm_backend *be) | |||
171 | } | 172 | } |
172 | dev_priv->engine.instmem.finish_access(nvbe->dev); | 173 | dev_priv->engine.instmem.finish_access(nvbe->dev); |
173 | 174 | ||
175 | if (dev_priv->card_type == NV_50) { | ||
176 | nv_wr32(dev, 0x100c80, 0x00050001); | ||
177 | if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) { | ||
178 | NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n"); | ||
179 | NV_ERROR(dev, "0x100c80 = 0x%08x\n", | ||
180 | nv_rd32(dev, 0x100c80)); | ||
181 | return -EBUSY; | ||
182 | } | ||
183 | |||
184 | nv_wr32(dev, 0x100c80, 0x00000001); | ||
185 | if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) { | ||
186 | NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n"); | ||
187 | NV_ERROR(dev, "0x100c80 = 0x%08x\n", | ||
188 | nv_rd32(dev, 0x100c80)); | ||
189 | return -EBUSY; | ||
190 | } | ||
191 | } | ||
192 | |||
174 | nvbe->bound = false; | 193 | nvbe->bound = false; |
175 | return 0; | 194 | return 0; |
176 | } | 195 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index eb8f084d5f53..e1710640a278 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c | |||
@@ -24,6 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/swab.h> | 26 | #include <linux/swab.h> |
27 | #include <linux/slab.h> | ||
27 | #include "drmP.h" | 28 | #include "drmP.h" |
28 | #include "drm.h" | 29 | #include "drm.h" |
29 | #include "drm_sarea.h" | 30 | #include "drm_sarea.h" |
@@ -35,7 +36,6 @@ | |||
35 | #include "nouveau_drm.h" | 36 | #include "nouveau_drm.h" |
36 | #include "nv50_display.h" | 37 | #include "nv50_display.h" |
37 | 38 | ||
38 | static int nouveau_stub_init(struct drm_device *dev) { return 0; } | ||
39 | static void nouveau_stub_takedown(struct drm_device *dev) {} | 39 | static void nouveau_stub_takedown(struct drm_device *dev) {} |
40 | 40 | ||
41 | static int nouveau_init_engine_ptrs(struct drm_device *dev) | 41 | static int nouveau_init_engine_ptrs(struct drm_device *dev) |
@@ -277,8 +277,8 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
277 | engine->timer.init = nv04_timer_init; | 277 | engine->timer.init = nv04_timer_init; |
278 | engine->timer.read = nv04_timer_read; | 278 | engine->timer.read = nv04_timer_read; |
279 | engine->timer.takedown = nv04_timer_takedown; | 279 | engine->timer.takedown = nv04_timer_takedown; |
280 | engine->fb.init = nouveau_stub_init; | 280 | engine->fb.init = nv50_fb_init; |
281 | engine->fb.takedown = nouveau_stub_takedown; | 281 | engine->fb.takedown = nv50_fb_takedown; |
282 | engine->graph.grclass = nv50_graph_grclass; | 282 | engine->graph.grclass = nv50_graph_grclass; |
283 | engine->graph.init = nv50_graph_init; | 283 | engine->graph.init = nv50_graph_init; |
284 | engine->graph.takedown = nv50_graph_takedown; | 284 | engine->graph.takedown = nv50_graph_takedown; |
@@ -341,7 +341,7 @@ nouveau_card_init_channel(struct drm_device *dev) | |||
341 | 341 | ||
342 | gpuobj = NULL; | 342 | gpuobj = NULL; |
343 | ret = nouveau_gpuobj_dma_new(dev_priv->channel, NV_CLASS_DMA_IN_MEMORY, | 343 | ret = nouveau_gpuobj_dma_new(dev_priv->channel, NV_CLASS_DMA_IN_MEMORY, |
344 | 0, nouveau_mem_fb_amount(dev), | 344 | 0, dev_priv->vram_size, |
345 | NV_DMA_ACCESS_RW, NV_DMA_TARGET_VIDMEM, | 345 | NV_DMA_ACCESS_RW, NV_DMA_TARGET_VIDMEM, |
346 | &gpuobj); | 346 | &gpuobj); |
347 | if (ret) | 347 | if (ret) |
@@ -427,6 +427,10 @@ nouveau_card_init(struct drm_device *dev) | |||
427 | goto out; | 427 | goto out; |
428 | } | 428 | } |
429 | 429 | ||
430 | ret = nouveau_mem_detect(dev); | ||
431 | if (ret) | ||
432 | goto out_bios; | ||
433 | |||
430 | ret = nouveau_gpuobj_early_init(dev); | 434 | ret = nouveau_gpuobj_early_init(dev); |
431 | if (ret) | 435 | if (ret) |
432 | goto out_bios; | 436 | goto out_bios; |
@@ -502,7 +506,7 @@ nouveau_card_init(struct drm_device *dev) | |||
502 | else | 506 | else |
503 | ret = nv04_display_create(dev); | 507 | ret = nv04_display_create(dev); |
504 | if (ret) | 508 | if (ret) |
505 | goto out_irq; | 509 | goto out_channel; |
506 | } | 510 | } |
507 | 511 | ||
508 | ret = nouveau_backlight_init(dev); | 512 | ret = nouveau_backlight_init(dev); |
@@ -516,6 +520,11 @@ nouveau_card_init(struct drm_device *dev) | |||
516 | 520 | ||
517 | return 0; | 521 | return 0; |
518 | 522 | ||
523 | out_channel: | ||
524 | if (dev_priv->channel) { | ||
525 | nouveau_channel_free(dev_priv->channel); | ||
526 | dev_priv->channel = NULL; | ||
527 | } | ||
519 | out_irq: | 528 | out_irq: |
520 | drm_irq_uninstall(dev); | 529 | drm_irq_uninstall(dev); |
521 | out_fifo: | 530 | out_fifo: |
@@ -533,6 +542,7 @@ out_mc: | |||
533 | out_gpuobj: | 542 | out_gpuobj: |
534 | nouveau_gpuobj_takedown(dev); | 543 | nouveau_gpuobj_takedown(dev); |
535 | out_mem: | 544 | out_mem: |
545 | nouveau_sgdma_takedown(dev); | ||
536 | nouveau_mem_close(dev); | 546 | nouveau_mem_close(dev); |
537 | out_instmem: | 547 | out_instmem: |
538 | engine->instmem.takedown(dev); | 548 | engine->instmem.takedown(dev); |
diff --git a/drivers/gpu/drm/nouveau/nv04_crtc.c b/drivers/gpu/drm/nouveau/nv04_crtc.c index a1d1ebb073d9..eba687f1099e 100644 --- a/drivers/gpu/drm/nouveau/nv04_crtc.c +++ b/drivers/gpu/drm/nouveau/nv04_crtc.c | |||
@@ -230,9 +230,9 @@ nv_crtc_mode_set_vga(struct drm_crtc *crtc, struct drm_display_mode *mode) | |||
230 | struct drm_framebuffer *fb = crtc->fb; | 230 | struct drm_framebuffer *fb = crtc->fb; |
231 | 231 | ||
232 | /* Calculate our timings */ | 232 | /* Calculate our timings */ |
233 | int horizDisplay = (mode->crtc_hdisplay >> 3) - 1; | 233 | int horizDisplay = (mode->crtc_hdisplay >> 3) - 1; |
234 | int horizStart = (mode->crtc_hsync_start >> 3) - 1; | 234 | int horizStart = (mode->crtc_hsync_start >> 3) + 1; |
235 | int horizEnd = (mode->crtc_hsync_end >> 3) - 1; | 235 | int horizEnd = (mode->crtc_hsync_end >> 3) + 1; |
236 | int horizTotal = (mode->crtc_htotal >> 3) - 5; | 236 | int horizTotal = (mode->crtc_htotal >> 3) - 5; |
237 | int horizBlankStart = (mode->crtc_hdisplay >> 3) - 1; | 237 | int horizBlankStart = (mode->crtc_hdisplay >> 3) - 1; |
238 | int horizBlankEnd = (mode->crtc_htotal >> 3) - 1; | 238 | int horizBlankEnd = (mode->crtc_htotal >> 3) - 1; |
diff --git a/drivers/gpu/drm/nouveau/nv04_fbcon.c b/drivers/gpu/drm/nouveau/nv04_fbcon.c index 3da90c2c4e63..813b25cec726 100644 --- a/drivers/gpu/drm/nouveau/nv04_fbcon.c +++ b/drivers/gpu/drm/nouveau/nv04_fbcon.c | |||
@@ -118,8 +118,8 @@ nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) | |||
118 | return; | 118 | return; |
119 | } | 119 | } |
120 | 120 | ||
121 | width = ALIGN(image->width, 32); | 121 | width = ALIGN(image->width, 8); |
122 | dsize = (width * image->height) >> 5; | 122 | dsize = ALIGN(width * image->height, 32) >> 5; |
123 | 123 | ||
124 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || | 124 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || |
125 | info->fix.visual == FB_VISUAL_DIRECTCOLOR) { | 125 | info->fix.visual == FB_VISUAL_DIRECTCOLOR) { |
@@ -136,8 +136,8 @@ nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) | |||
136 | ((image->dx + image->width) & 0xffff)); | 136 | ((image->dx + image->width) & 0xffff)); |
137 | OUT_RING(chan, bg); | 137 | OUT_RING(chan, bg); |
138 | OUT_RING(chan, fg); | 138 | OUT_RING(chan, fg); |
139 | OUT_RING(chan, (image->height << 16) | image->width); | ||
140 | OUT_RING(chan, (image->height << 16) | width); | 139 | OUT_RING(chan, (image->height << 16) | width); |
140 | OUT_RING(chan, (image->height << 16) | image->width); | ||
141 | OUT_RING(chan, (image->dy << 16) | (image->dx & 0xffff)); | 141 | OUT_RING(chan, (image->dy << 16) | (image->dx & 0xffff)); |
142 | 142 | ||
143 | while (dsize) { | 143 | while (dsize) { |
diff --git a/drivers/gpu/drm/nouveau/nv40_fifo.c b/drivers/gpu/drm/nouveau/nv40_fifo.c index 6b2ef4a9fce1..500ccfd3a0b8 100644 --- a/drivers/gpu/drm/nouveau/nv40_fifo.c +++ b/drivers/gpu/drm/nouveau/nv40_fifo.c | |||
@@ -278,7 +278,7 @@ nv40_fifo_init_ramxx(struct drm_device *dev) | |||
278 | default: | 278 | default: |
279 | nv_wr32(dev, 0x2230, 0); | 279 | nv_wr32(dev, 0x2230, 0); |
280 | nv_wr32(dev, NV40_PFIFO_RAMFC, | 280 | nv_wr32(dev, NV40_PFIFO_RAMFC, |
281 | ((nouveau_mem_fb_amount(dev) - 512 * 1024 + | 281 | ((dev_priv->vram_size - 512 * 1024 + |
282 | dev_priv->ramfc_offset) >> 16) | (3 << 16)); | 282 | dev_priv->ramfc_offset) >> 16) | (3 << 16)); |
283 | break; | 283 | break; |
284 | } | 284 | } |
diff --git a/drivers/gpu/drm/nouveau/nv40_graph.c b/drivers/gpu/drm/nouveau/nv40_graph.c index 53e8afe1dcd1..0616c96e4b67 100644 --- a/drivers/gpu/drm/nouveau/nv40_graph.c +++ b/drivers/gpu/drm/nouveau/nv40_graph.c | |||
@@ -335,6 +335,27 @@ nv40_graph_init(struct drm_device *dev) | |||
335 | nv_wr32(dev, 0x400b38, 0x2ffff800); | 335 | nv_wr32(dev, 0x400b38, 0x2ffff800); |
336 | nv_wr32(dev, 0x400b3c, 0x00006000); | 336 | nv_wr32(dev, 0x400b3c, 0x00006000); |
337 | 337 | ||
338 | /* Tiling related stuff. */ | ||
339 | switch (dev_priv->chipset) { | ||
340 | case 0x44: | ||
341 | case 0x4a: | ||
342 | nv_wr32(dev, 0x400bc4, 0x1003d888); | ||
343 | nv_wr32(dev, 0x400bbc, 0xb7a7b500); | ||
344 | break; | ||
345 | case 0x46: | ||
346 | nv_wr32(dev, 0x400bc4, 0x0000e024); | ||
347 | nv_wr32(dev, 0x400bbc, 0xb7a7b520); | ||
348 | break; | ||
349 | case 0x4c: | ||
350 | case 0x4e: | ||
351 | case 0x67: | ||
352 | nv_wr32(dev, 0x400bc4, 0x1003d888); | ||
353 | nv_wr32(dev, 0x400bbc, 0xb7a7b540); | ||
354 | break; | ||
355 | default: | ||
356 | break; | ||
357 | } | ||
358 | |||
338 | /* Turn all the tiling regions off. */ | 359 | /* Turn all the tiling regions off. */ |
339 | for (i = 0; i < pfb->num_tiles; i++) | 360 | for (i = 0; i < pfb->num_tiles; i++) |
340 | nv40_graph_set_region_tiling(dev, i, 0, 0, 0); | 361 | nv40_graph_set_region_tiling(dev, i, 0, 0, 0); |
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index 61a89f2dc553..649db4c1b690 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c | |||
@@ -143,7 +143,7 @@ nv50_evo_channel_new(struct drm_device *dev, struct nouveau_channel **pchan) | |||
143 | } | 143 | } |
144 | 144 | ||
145 | ret = nv50_evo_dmaobj_new(chan, 0x3d, NvEvoVRAM, 0, 0x19, | 145 | ret = nv50_evo_dmaobj_new(chan, 0x3d, NvEvoVRAM, 0, 0x19, |
146 | 0, nouveau_mem_fb_amount(dev)); | 146 | 0, dev_priv->vram_size); |
147 | if (ret) { | 147 | if (ret) { |
148 | nv50_evo_channel_del(pchan); | 148 | nv50_evo_channel_del(pchan); |
149 | return ret; | 149 | return ret; |
@@ -231,7 +231,7 @@ nv50_display_init(struct drm_device *dev) | |||
231 | /* This used to be in crtc unblank, but seems out of place there. */ | 231 | /* This used to be in crtc unblank, but seems out of place there. */ |
232 | nv_wr32(dev, NV50_PDISPLAY_UNK_380, 0); | 232 | nv_wr32(dev, NV50_PDISPLAY_UNK_380, 0); |
233 | /* RAM is clamped to 256 MiB. */ | 233 | /* RAM is clamped to 256 MiB. */ |
234 | ram_amount = nouveau_mem_fb_amount(dev); | 234 | ram_amount = dev_priv->vram_size; |
235 | NV_DEBUG_KMS(dev, "ram_amount %d\n", ram_amount); | 235 | NV_DEBUG_KMS(dev, "ram_amount %d\n", ram_amount); |
236 | if (ram_amount > 256*1024*1024) | 236 | if (ram_amount > 256*1024*1024) |
237 | ram_amount = 256*1024*1024; | 237 | ram_amount = 256*1024*1024; |
@@ -522,15 +522,17 @@ int nv50_display_create(struct drm_device *dev) | |||
522 | } | 522 | } |
523 | 523 | ||
524 | for (i = 0 ; i < dcb->connector.entries; i++) { | 524 | for (i = 0 ; i < dcb->connector.entries; i++) { |
525 | if (i != 0 && dcb->connector.entry[i].index == | 525 | if (i != 0 && dcb->connector.entry[i].index2 == |
526 | dcb->connector.entry[i - 1].index) | 526 | dcb->connector.entry[i - 1].index2) |
527 | continue; | 527 | continue; |
528 | nouveau_connector_create(dev, &dcb->connector.entry[i]); | 528 | nouveau_connector_create(dev, &dcb->connector.entry[i]); |
529 | } | 529 | } |
530 | 530 | ||
531 | ret = nv50_display_init(dev); | 531 | ret = nv50_display_init(dev); |
532 | if (ret) | 532 | if (ret) { |
533 | nv50_display_destroy(dev); | ||
533 | return ret; | 534 | return ret; |
535 | } | ||
534 | 536 | ||
535 | return 0; | 537 | return 0; |
536 | } | 538 | } |
@@ -885,10 +887,12 @@ nv50_display_error_handler(struct drm_device *dev) | |||
885 | nv_wr32(dev, NV50_PDISPLAY_TRAPPED_ADDR, 0x90000000); | 887 | nv_wr32(dev, NV50_PDISPLAY_TRAPPED_ADDR, 0x90000000); |
886 | } | 888 | } |
887 | 889 | ||
888 | static void | 890 | void |
889 | nv50_display_irq_hotplug(struct drm_device *dev) | 891 | nv50_display_irq_hotplug_bh(struct work_struct *work) |
890 | { | 892 | { |
891 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 893 | struct drm_nouveau_private *dev_priv = |
894 | container_of(work, struct drm_nouveau_private, hpd_work); | ||
895 | struct drm_device *dev = dev_priv->dev; | ||
892 | struct drm_connector *connector; | 896 | struct drm_connector *connector; |
893 | const uint32_t gpio_reg[4] = { 0xe104, 0xe108, 0xe280, 0xe284 }; | 897 | const uint32_t gpio_reg[4] = { 0xe104, 0xe108, 0xe280, 0xe284 }; |
894 | uint32_t unplug_mask, plug_mask, change_mask; | 898 | uint32_t unplug_mask, plug_mask, change_mask; |
@@ -949,8 +953,10 @@ nv50_display_irq_handler(struct drm_device *dev) | |||
949 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 953 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
950 | uint32_t delayed = 0; | 954 | uint32_t delayed = 0; |
951 | 955 | ||
952 | while (nv_rd32(dev, NV50_PMC_INTR_0) & NV50_PMC_INTR_0_HOTPLUG) | 956 | if (nv_rd32(dev, NV50_PMC_INTR_0) & NV50_PMC_INTR_0_HOTPLUG) { |
953 | nv50_display_irq_hotplug(dev); | 957 | if (!work_pending(&dev_priv->hpd_work)) |
958 | queue_work(dev_priv->wq, &dev_priv->hpd_work); | ||
959 | } | ||
954 | 960 | ||
955 | while (nv_rd32(dev, NV50_PMC_INTR_0) & NV50_PMC_INTR_0_DISPLAY) { | 961 | while (nv_rd32(dev, NV50_PMC_INTR_0) & NV50_PMC_INTR_0_DISPLAY) { |
956 | uint32_t intr0 = nv_rd32(dev, NV50_PDISPLAY_INTR_0); | 962 | uint32_t intr0 = nv_rd32(dev, NV50_PDISPLAY_INTR_0); |
diff --git a/drivers/gpu/drm/nouveau/nv50_display.h b/drivers/gpu/drm/nouveau/nv50_display.h index 3ae8d0725f63..581d405ac014 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.h +++ b/drivers/gpu/drm/nouveau/nv50_display.h | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | void nv50_display_irq_handler(struct drm_device *dev); | 38 | void nv50_display_irq_handler(struct drm_device *dev); |
39 | void nv50_display_irq_handler_bh(struct work_struct *work); | 39 | void nv50_display_irq_handler_bh(struct work_struct *work); |
40 | void nv50_display_irq_hotplug_bh(struct work_struct *work); | ||
40 | int nv50_display_init(struct drm_device *dev); | 41 | int nv50_display_init(struct drm_device *dev); |
41 | int nv50_display_create(struct drm_device *dev); | 42 | int nv50_display_create(struct drm_device *dev); |
42 | int nv50_display_destroy(struct drm_device *dev); | 43 | int nv50_display_destroy(struct drm_device *dev); |
diff --git a/drivers/gpu/drm/nouveau/nv50_fb.c b/drivers/gpu/drm/nouveau/nv50_fb.c new file mode 100644 index 000000000000..a95e6941ba88 --- /dev/null +++ b/drivers/gpu/drm/nouveau/nv50_fb.c | |||
@@ -0,0 +1,32 @@ | |||
1 | #include "drmP.h" | ||
2 | #include "drm.h" | ||
3 | #include "nouveau_drv.h" | ||
4 | #include "nouveau_drm.h" | ||
5 | |||
6 | int | ||
7 | nv50_fb_init(struct drm_device *dev) | ||
8 | { | ||
9 | /* This is needed to get meaningful information from 100c90 | ||
10 | * on traps. No idea what these values mean exactly. */ | ||
11 | struct drm_nouveau_private *dev_priv = dev->dev_private; | ||
12 | |||
13 | switch (dev_priv->chipset) { | ||
14 | case 0x50: | ||
15 | nv_wr32(dev, 0x100c90, 0x0707ff); | ||
16 | break; | ||
17 | case 0xa5: | ||
18 | case 0xa8: | ||
19 | nv_wr32(dev, 0x100c90, 0x0d0fff); | ||
20 | break; | ||
21 | default: | ||
22 | nv_wr32(dev, 0x100c90, 0x1d07ff); | ||
23 | break; | ||
24 | } | ||
25 | |||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | void | ||
30 | nv50_fb_takedown(struct drm_device *dev) | ||
31 | { | ||
32 | } | ||
diff --git a/drivers/gpu/drm/nouveau/nv50_fbcon.c b/drivers/gpu/drm/nouveau/nv50_fbcon.c index 993c7126fbde..a8c70e7e9184 100644 --- a/drivers/gpu/drm/nouveau/nv50_fbcon.c +++ b/drivers/gpu/drm/nouveau/nv50_fbcon.c | |||
@@ -157,8 +157,11 @@ nv50_fbcon_accel_init(struct fb_info *info) | |||
157 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 157 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
158 | struct nouveau_channel *chan = dev_priv->channel; | 158 | struct nouveau_channel *chan = dev_priv->channel; |
159 | struct nouveau_gpuobj *eng2d = NULL; | 159 | struct nouveau_gpuobj *eng2d = NULL; |
160 | uint64_t fb; | ||
160 | int ret, format; | 161 | int ret, format; |
161 | 162 | ||
163 | fb = info->fix.smem_start - dev_priv->fb_phys + dev_priv->vm_vram_base; | ||
164 | |||
162 | switch (info->var.bits_per_pixel) { | 165 | switch (info->var.bits_per_pixel) { |
163 | case 8: | 166 | case 8: |
164 | format = 0xf3; | 167 | format = 0xf3; |
@@ -233,7 +236,7 @@ nv50_fbcon_accel_init(struct fb_info *info) | |||
233 | BEGIN_RING(chan, NvSub2D, 0x0808, 3); | 236 | BEGIN_RING(chan, NvSub2D, 0x0808, 3); |
234 | OUT_RING(chan, 0); | 237 | OUT_RING(chan, 0); |
235 | OUT_RING(chan, 0); | 238 | OUT_RING(chan, 0); |
236 | OUT_RING(chan, 0); | 239 | OUT_RING(chan, 1); |
237 | BEGIN_RING(chan, NvSub2D, 0x081c, 1); | 240 | BEGIN_RING(chan, NvSub2D, 0x081c, 1); |
238 | OUT_RING(chan, 1); | 241 | OUT_RING(chan, 1); |
239 | BEGIN_RING(chan, NvSub2D, 0x0840, 4); | 242 | BEGIN_RING(chan, NvSub2D, 0x0840, 4); |
@@ -248,9 +251,8 @@ nv50_fbcon_accel_init(struct fb_info *info) | |||
248 | OUT_RING(chan, info->fix.line_length); | 251 | OUT_RING(chan, info->fix.line_length); |
249 | OUT_RING(chan, info->var.xres_virtual); | 252 | OUT_RING(chan, info->var.xres_virtual); |
250 | OUT_RING(chan, info->var.yres_virtual); | 253 | OUT_RING(chan, info->var.yres_virtual); |
251 | OUT_RING(chan, 0); | 254 | OUT_RING(chan, upper_32_bits(fb)); |
252 | OUT_RING(chan, info->fix.smem_start - dev_priv->fb_phys + | 255 | OUT_RING(chan, lower_32_bits(fb)); |
253 | dev_priv->vm_vram_base); | ||
254 | BEGIN_RING(chan, NvSub2D, 0x0230, 2); | 256 | BEGIN_RING(chan, NvSub2D, 0x0230, 2); |
255 | OUT_RING(chan, format); | 257 | OUT_RING(chan, format); |
256 | OUT_RING(chan, 1); | 258 | OUT_RING(chan, 1); |
@@ -258,9 +260,8 @@ nv50_fbcon_accel_init(struct fb_info *info) | |||
258 | OUT_RING(chan, info->fix.line_length); | 260 | OUT_RING(chan, info->fix.line_length); |
259 | OUT_RING(chan, info->var.xres_virtual); | 261 | OUT_RING(chan, info->var.xres_virtual); |
260 | OUT_RING(chan, info->var.yres_virtual); | 262 | OUT_RING(chan, info->var.yres_virtual); |
261 | OUT_RING(chan, 0); | 263 | OUT_RING(chan, upper_32_bits(fb)); |
262 | OUT_RING(chan, info->fix.smem_start - dev_priv->fb_phys + | 264 | OUT_RING(chan, lower_32_bits(fb)); |
263 | dev_priv->vm_vram_base); | ||
264 | 265 | ||
265 | return 0; | 266 | return 0; |
266 | } | 267 | } |
diff --git a/drivers/gpu/drm/nouveau/nv50_gpio.c b/drivers/gpu/drm/nouveau/nv50_gpio.c new file mode 100644 index 000000000000..c61782b314e7 --- /dev/null +++ b/drivers/gpu/drm/nouveau/nv50_gpio.c | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Red Hat Inc. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
21 | * | ||
22 | * Authors: Ben Skeggs | ||
23 | */ | ||
24 | |||
25 | #include "drmP.h" | ||
26 | #include "nouveau_drv.h" | ||
27 | #include "nouveau_hw.h" | ||
28 | |||
29 | static int | ||
30 | nv50_gpio_location(struct dcb_gpio_entry *gpio, uint32_t *reg, uint32_t *shift) | ||
31 | { | ||
32 | const uint32_t nv50_gpio_reg[4] = { 0xe104, 0xe108, 0xe280, 0xe284 }; | ||
33 | |||
34 | if (gpio->line > 32) | ||
35 | return -EINVAL; | ||
36 | |||
37 | *reg = nv50_gpio_reg[gpio->line >> 3]; | ||
38 | *shift = (gpio->line & 7) << 2; | ||
39 | return 0; | ||
40 | } | ||
41 | |||
42 | int | ||
43 | nv50_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag) | ||
44 | { | ||
45 | struct dcb_gpio_entry *gpio; | ||
46 | uint32_t r, s, v; | ||
47 | |||
48 | gpio = nouveau_bios_gpio_entry(dev, tag); | ||
49 | if (!gpio) | ||
50 | return -ENOENT; | ||
51 | |||
52 | if (nv50_gpio_location(gpio, &r, &s)) | ||
53 | return -EINVAL; | ||
54 | |||
55 | v = nv_rd32(dev, r) >> (s + 2); | ||
56 | return ((v & 1) == (gpio->state[1] & 1)); | ||
57 | } | ||
58 | |||
59 | int | ||
60 | nv50_gpio_set(struct drm_device *dev, enum dcb_gpio_tag tag, int state) | ||
61 | { | ||
62 | struct dcb_gpio_entry *gpio; | ||
63 | uint32_t r, s, v; | ||
64 | |||
65 | gpio = nouveau_bios_gpio_entry(dev, tag); | ||
66 | if (!gpio) | ||
67 | return -ENOENT; | ||
68 | |||
69 | if (nv50_gpio_location(gpio, &r, &s)) | ||
70 | return -EINVAL; | ||
71 | |||
72 | v = nv_rd32(dev, r) & ~(0x3 << s); | ||
73 | v |= (gpio->state[state] ^ 2) << s; | ||
74 | nv_wr32(dev, r, v); | ||
75 | return 0; | ||
76 | } | ||
diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/nv50_graph.c index 857a09671a39..b203d06f601f 100644 --- a/drivers/gpu/drm/nouveau/nv50_graph.c +++ b/drivers/gpu/drm/nouveau/nv50_graph.c | |||
@@ -56,6 +56,10 @@ nv50_graph_init_intr(struct drm_device *dev) | |||
56 | static void | 56 | static void |
57 | nv50_graph_init_regs__nv(struct drm_device *dev) | 57 | nv50_graph_init_regs__nv(struct drm_device *dev) |
58 | { | 58 | { |
59 | struct drm_nouveau_private *dev_priv = dev->dev_private; | ||
60 | uint32_t units = nv_rd32(dev, 0x1540); | ||
61 | int i; | ||
62 | |||
59 | NV_DEBUG(dev, "\n"); | 63 | NV_DEBUG(dev, "\n"); |
60 | 64 | ||
61 | nv_wr32(dev, 0x400804, 0xc0000000); | 65 | nv_wr32(dev, 0x400804, 0xc0000000); |
@@ -65,6 +69,20 @@ nv50_graph_init_regs__nv(struct drm_device *dev) | |||
65 | nv_wr32(dev, 0x405018, 0xc0000000); | 69 | nv_wr32(dev, 0x405018, 0xc0000000); |
66 | nv_wr32(dev, 0x402000, 0xc0000000); | 70 | nv_wr32(dev, 0x402000, 0xc0000000); |
67 | 71 | ||
72 | for (i = 0; i < 16; i++) { | ||
73 | if (units & 1 << i) { | ||
74 | if (dev_priv->chipset < 0xa0) { | ||
75 | nv_wr32(dev, 0x408900 + (i << 12), 0xc0000000); | ||
76 | nv_wr32(dev, 0x408e08 + (i << 12), 0xc0000000); | ||
77 | nv_wr32(dev, 0x408314 + (i << 12), 0xc0000000); | ||
78 | } else { | ||
79 | nv_wr32(dev, 0x408600 + (i << 11), 0xc0000000); | ||
80 | nv_wr32(dev, 0x408708 + (i << 11), 0xc0000000); | ||
81 | nv_wr32(dev, 0x40831c + (i << 11), 0xc0000000); | ||
82 | } | ||
83 | } | ||
84 | } | ||
85 | |||
68 | nv_wr32(dev, 0x400108, 0xffffffff); | 86 | nv_wr32(dev, 0x400108, 0xffffffff); |
69 | 87 | ||
70 | nv_wr32(dev, 0x400824, 0x00004000); | 88 | nv_wr32(dev, 0x400824, 0x00004000); |
@@ -229,10 +247,6 @@ nv50_graph_create_context(struct nouveau_channel *chan) | |||
229 | nouveau_grctx_vals_load(dev, ctx); | 247 | nouveau_grctx_vals_load(dev, ctx); |
230 | } | 248 | } |
231 | nv_wo32(dev, ctx, 0x00000/4, chan->ramin->instance >> 12); | 249 | nv_wo32(dev, ctx, 0x00000/4, chan->ramin->instance >> 12); |
232 | if ((dev_priv->chipset & 0xf0) == 0xa0) | ||
233 | nv_wo32(dev, ctx, 0x00004/4, 0x00000000); | ||
234 | else | ||
235 | nv_wo32(dev, ctx, 0x0011c/4, 0x00000000); | ||
236 | dev_priv->engine.instmem.finish_access(dev); | 250 | dev_priv->engine.instmem.finish_access(dev); |
237 | 251 | ||
238 | return 0; | 252 | return 0; |
@@ -396,9 +410,10 @@ struct nouveau_pgraph_object_class nv50_graph_grclass[] = { | |||
396 | { 0x5039, false, NULL }, /* m2mf */ | 410 | { 0x5039, false, NULL }, /* m2mf */ |
397 | { 0x502d, false, NULL }, /* 2d */ | 411 | { 0x502d, false, NULL }, /* 2d */ |
398 | { 0x50c0, false, NULL }, /* compute */ | 412 | { 0x50c0, false, NULL }, /* compute */ |
413 | { 0x85c0, false, NULL }, /* compute (nva3, nva5, nva8) */ | ||
399 | { 0x5097, false, NULL }, /* tesla (nv50) */ | 414 | { 0x5097, false, NULL }, /* tesla (nv50) */ |
400 | { 0x8297, false, NULL }, /* tesla (nv80/nv90) */ | 415 | { 0x8297, false, NULL }, /* tesla (nv8x/nv9x) */ |
401 | { 0x8397, false, NULL }, /* tesla (nva0) */ | 416 | { 0x8397, false, NULL }, /* tesla (nva0, nvaa, nvac) */ |
402 | { 0x8597, false, NULL }, /* tesla (nva8) */ | 417 | { 0x8597, false, NULL }, /* tesla (nva3, nva5, nva8) */ |
403 | {} | 418 | {} |
404 | }; | 419 | }; |
diff --git a/drivers/gpu/drm/nouveau/nv50_grctx.c b/drivers/gpu/drm/nouveau/nv50_grctx.c index d105fcd42ca0..42a8fb20c1e6 100644 --- a/drivers/gpu/drm/nouveau/nv50_grctx.c +++ b/drivers/gpu/drm/nouveau/nv50_grctx.c | |||
@@ -55,15 +55,18 @@ | |||
55 | #define CP_FLAG_AUTO_LOAD ((2 * 32) + 5) | 55 | #define CP_FLAG_AUTO_LOAD ((2 * 32) + 5) |
56 | #define CP_FLAG_AUTO_LOAD_NOT_PENDING 0 | 56 | #define CP_FLAG_AUTO_LOAD_NOT_PENDING 0 |
57 | #define CP_FLAG_AUTO_LOAD_PENDING 1 | 57 | #define CP_FLAG_AUTO_LOAD_PENDING 1 |
58 | #define CP_FLAG_NEWCTX ((2 * 32) + 10) | ||
59 | #define CP_FLAG_NEWCTX_BUSY 0 | ||
60 | #define CP_FLAG_NEWCTX_DONE 1 | ||
58 | #define CP_FLAG_XFER ((2 * 32) + 11) | 61 | #define CP_FLAG_XFER ((2 * 32) + 11) |
59 | #define CP_FLAG_XFER_IDLE 0 | 62 | #define CP_FLAG_XFER_IDLE 0 |
60 | #define CP_FLAG_XFER_BUSY 1 | 63 | #define CP_FLAG_XFER_BUSY 1 |
61 | #define CP_FLAG_NEWCTX ((2 * 32) + 12) | ||
62 | #define CP_FLAG_NEWCTX_BUSY 0 | ||
63 | #define CP_FLAG_NEWCTX_DONE 1 | ||
64 | #define CP_FLAG_ALWAYS ((2 * 32) + 13) | 64 | #define CP_FLAG_ALWAYS ((2 * 32) + 13) |
65 | #define CP_FLAG_ALWAYS_FALSE 0 | 65 | #define CP_FLAG_ALWAYS_FALSE 0 |
66 | #define CP_FLAG_ALWAYS_TRUE 1 | 66 | #define CP_FLAG_ALWAYS_TRUE 1 |
67 | #define CP_FLAG_INTR ((2 * 32) + 15) | ||
68 | #define CP_FLAG_INTR_NOT_PENDING 0 | ||
69 | #define CP_FLAG_INTR_PENDING 1 | ||
67 | 70 | ||
68 | #define CP_CTX 0x00100000 | 71 | #define CP_CTX 0x00100000 |
69 | #define CP_CTX_COUNT 0x000f0000 | 72 | #define CP_CTX_COUNT 0x000f0000 |
@@ -174,6 +177,7 @@ nv50_grctx_init(struct nouveau_grctx *ctx) | |||
174 | case 0x96: | 177 | case 0x96: |
175 | case 0x98: | 178 | case 0x98: |
176 | case 0xa0: | 179 | case 0xa0: |
180 | case 0xa3: | ||
177 | case 0xa5: | 181 | case 0xa5: |
178 | case 0xa8: | 182 | case 0xa8: |
179 | case 0xaa: | 183 | case 0xaa: |
@@ -214,6 +218,8 @@ nv50_grctx_init(struct nouveau_grctx *ctx) | |||
214 | cp_name(ctx, cp_setup_save); | 218 | cp_name(ctx, cp_setup_save); |
215 | cp_set (ctx, UNK1D, SET); | 219 | cp_set (ctx, UNK1D, SET); |
216 | cp_wait(ctx, STATUS, BUSY); | 220 | cp_wait(ctx, STATUS, BUSY); |
221 | cp_wait(ctx, INTR, PENDING); | ||
222 | cp_bra (ctx, STATUS, BUSY, cp_setup_save); | ||
217 | cp_set (ctx, UNK01, SET); | 223 | cp_set (ctx, UNK01, SET); |
218 | cp_set (ctx, SWAP_DIRECTION, SAVE); | 224 | cp_set (ctx, SWAP_DIRECTION, SAVE); |
219 | 225 | ||
@@ -269,7 +275,7 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx) | |||
269 | int offset, base; | 275 | int offset, base; |
270 | uint32_t units = nv_rd32 (ctx->dev, 0x1540); | 276 | uint32_t units = nv_rd32 (ctx->dev, 0x1540); |
271 | 277 | ||
272 | /* 0800 */ | 278 | /* 0800: DISPATCH */ |
273 | cp_ctx(ctx, 0x400808, 7); | 279 | cp_ctx(ctx, 0x400808, 7); |
274 | gr_def(ctx, 0x400814, 0x00000030); | 280 | gr_def(ctx, 0x400814, 0x00000030); |
275 | cp_ctx(ctx, 0x400834, 0x32); | 281 | cp_ctx(ctx, 0x400834, 0x32); |
@@ -300,7 +306,7 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx) | |||
300 | gr_def(ctx, 0x400b20, 0x0001629d); | 306 | gr_def(ctx, 0x400b20, 0x0001629d); |
301 | } | 307 | } |
302 | 308 | ||
303 | /* 0C00 */ | 309 | /* 0C00: VFETCH */ |
304 | cp_ctx(ctx, 0x400c08, 0x2); | 310 | cp_ctx(ctx, 0x400c08, 0x2); |
305 | gr_def(ctx, 0x400c08, 0x0000fe0c); | 311 | gr_def(ctx, 0x400c08, 0x0000fe0c); |
306 | 312 | ||
@@ -326,7 +332,7 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx) | |||
326 | cp_ctx(ctx, 0x401540, 0x5); | 332 | cp_ctx(ctx, 0x401540, 0x5); |
327 | gr_def(ctx, 0x401550, 0x00001018); | 333 | gr_def(ctx, 0x401550, 0x00001018); |
328 | 334 | ||
329 | /* 1800 */ | 335 | /* 1800: STREAMOUT */ |
330 | cp_ctx(ctx, 0x401814, 0x1); | 336 | cp_ctx(ctx, 0x401814, 0x1); |
331 | gr_def(ctx, 0x401814, 0x000000ff); | 337 | gr_def(ctx, 0x401814, 0x000000ff); |
332 | if (dev_priv->chipset == 0x50) { | 338 | if (dev_priv->chipset == 0x50) { |
@@ -359,6 +365,7 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx) | |||
359 | case 0xac: | 365 | case 0xac: |
360 | gr_def(ctx, 0x401c00, 0x042500df); | 366 | gr_def(ctx, 0x401c00, 0x042500df); |
361 | break; | 367 | break; |
368 | case 0xa3: | ||
362 | case 0xa5: | 369 | case 0xa5: |
363 | case 0xa8: | 370 | case 0xa8: |
364 | gr_def(ctx, 0x401c00, 0x142500df); | 371 | gr_def(ctx, 0x401c00, 0x142500df); |
@@ -413,6 +420,7 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx) | |||
413 | break; | 420 | break; |
414 | case 0x84: | 421 | case 0x84: |
415 | case 0xa0: | 422 | case 0xa0: |
423 | case 0xa3: | ||
416 | case 0xa5: | 424 | case 0xa5: |
417 | case 0xa8: | 425 | case 0xa8: |
418 | case 0xaa: | 426 | case 0xaa: |
@@ -641,7 +649,7 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx) | |||
641 | if (dev_priv->chipset == 0x50) | 649 | if (dev_priv->chipset == 0x50) |
642 | cp_ctx(ctx, 0x4063e0, 0x1); | 650 | cp_ctx(ctx, 0x4063e0, 0x1); |
643 | 651 | ||
644 | /* 6800 */ | 652 | /* 6800: M2MF */ |
645 | if (dev_priv->chipset < 0x90) { | 653 | if (dev_priv->chipset < 0x90) { |
646 | cp_ctx(ctx, 0x406814, 0x2b); | 654 | cp_ctx(ctx, 0x406814, 0x2b); |
647 | gr_def(ctx, 0x406818, 0x00000f80); | 655 | gr_def(ctx, 0x406818, 0x00000f80); |
@@ -787,6 +795,7 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx) | |||
787 | case 0xa5: | 795 | case 0xa5: |
788 | gr_def(ctx, offset + 0x1c, 0x310c0000); | 796 | gr_def(ctx, offset + 0x1c, 0x310c0000); |
789 | break; | 797 | break; |
798 | case 0xa3: | ||
790 | case 0xa8: | 799 | case 0xa8: |
791 | case 0xaa: | 800 | case 0xaa: |
792 | case 0xac: | 801 | case 0xac: |
@@ -854,6 +863,8 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx) | |||
854 | else | 863 | else |
855 | gr_def(ctx, offset + 0x8, 0x05010202); | 864 | gr_def(ctx, offset + 0x8, 0x05010202); |
856 | gr_def(ctx, offset + 0xc, 0x00030201); | 865 | gr_def(ctx, offset + 0xc, 0x00030201); |
866 | if (dev_priv->chipset == 0xa3) | ||
867 | cp_ctx(ctx, base + 0x36c, 1); | ||
857 | 868 | ||
858 | cp_ctx(ctx, base + 0x400, 2); | 869 | cp_ctx(ctx, base + 0x400, 2); |
859 | gr_def(ctx, base + 0x404, 0x00000040); | 870 | gr_def(ctx, base + 0x404, 0x00000040); |
@@ -1154,7 +1165,9 @@ nv50_graph_construct_xfer1(struct nouveau_grctx *ctx) | |||
1154 | nv50_graph_construct_gene_unk8(ctx); | 1165 | nv50_graph_construct_gene_unk8(ctx); |
1155 | if (dev_priv->chipset == 0xa0) | 1166 | if (dev_priv->chipset == 0xa0) |
1156 | xf_emit(ctx, 0x189, 0); | 1167 | xf_emit(ctx, 0x189, 0); |
1157 | else if (dev_priv->chipset < 0xa8) | 1168 | else if (dev_priv->chipset == 0xa3) |
1169 | xf_emit(ctx, 0xd5, 0); | ||
1170 | else if (dev_priv->chipset == 0xa5) | ||
1158 | xf_emit(ctx, 0x99, 0); | 1171 | xf_emit(ctx, 0x99, 0); |
1159 | else if (dev_priv->chipset == 0xaa) | 1172 | else if (dev_priv->chipset == 0xaa) |
1160 | xf_emit(ctx, 0x65, 0); | 1173 | xf_emit(ctx, 0x65, 0); |
@@ -1192,6 +1205,8 @@ nv50_graph_construct_xfer1(struct nouveau_grctx *ctx) | |||
1192 | ctx->ctxvals_pos = offset + 4; | 1205 | ctx->ctxvals_pos = offset + 4; |
1193 | if (dev_priv->chipset == 0xa0) | 1206 | if (dev_priv->chipset == 0xa0) |
1194 | xf_emit(ctx, 0xa80, 0); | 1207 | xf_emit(ctx, 0xa80, 0); |
1208 | else if (dev_priv->chipset == 0xa3) | ||
1209 | xf_emit(ctx, 0xa7c, 0); | ||
1195 | else | 1210 | else |
1196 | xf_emit(ctx, 0xa7a, 0); | 1211 | xf_emit(ctx, 0xa7a, 0); |
1197 | xf_emit(ctx, 1, 0x3fffff); | 1212 | xf_emit(ctx, 1, 0x3fffff); |
@@ -1336,6 +1351,7 @@ nv50_graph_construct_gene_unk1(struct nouveau_grctx *ctx) | |||
1336 | xf_emit(ctx, 0x942, 0); | 1351 | xf_emit(ctx, 0x942, 0); |
1337 | break; | 1352 | break; |
1338 | case 0xa0: | 1353 | case 0xa0: |
1354 | case 0xa3: | ||
1339 | xf_emit(ctx, 0x2042, 0); | 1355 | xf_emit(ctx, 0x2042, 0); |
1340 | break; | 1356 | break; |
1341 | case 0xa5: | 1357 | case 0xa5: |
diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c index de1f5b0062c5..5f21df31f3aa 100644 --- a/drivers/gpu/drm/nouveau/nv50_instmem.c +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c | |||
@@ -63,9 +63,10 @@ nv50_instmem_init(struct drm_device *dev) | |||
63 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 63 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
64 | struct nouveau_channel *chan; | 64 | struct nouveau_channel *chan; |
65 | uint32_t c_offset, c_size, c_ramfc, c_vmpd, c_base, pt_size; | 65 | uint32_t c_offset, c_size, c_ramfc, c_vmpd, c_base, pt_size; |
66 | uint32_t save_nv001700; | ||
67 | uint64_t v; | ||
66 | struct nv50_instmem_priv *priv; | 68 | struct nv50_instmem_priv *priv; |
67 | int ret, i; | 69 | int ret, i; |
68 | uint32_t v, save_nv001700; | ||
69 | 70 | ||
70 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | 71 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
71 | if (!priv) | 72 | if (!priv) |
@@ -76,17 +77,12 @@ nv50_instmem_init(struct drm_device *dev) | |||
76 | for (i = 0x1700; i <= 0x1710; i += 4) | 77 | for (i = 0x1700; i <= 0x1710; i += 4) |
77 | priv->save1700[(i-0x1700)/4] = nv_rd32(dev, i); | 78 | priv->save1700[(i-0x1700)/4] = nv_rd32(dev, i); |
78 | 79 | ||
79 | if (dev_priv->chipset == 0xaa || dev_priv->chipset == 0xac) | ||
80 | dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10) << 12; | ||
81 | else | ||
82 | dev_priv->vram_sys_base = 0; | ||
83 | |||
84 | /* Reserve the last MiB of VRAM, we should probably try to avoid | 80 | /* Reserve the last MiB of VRAM, we should probably try to avoid |
85 | * setting up the below tables over the top of the VBIOS image at | 81 | * setting up the below tables over the top of the VBIOS image at |
86 | * some point. | 82 | * some point. |
87 | */ | 83 | */ |
88 | dev_priv->ramin_rsvd_vram = 1 << 20; | 84 | dev_priv->ramin_rsvd_vram = 1 << 20; |
89 | c_offset = nouveau_mem_fb_amount(dev) - dev_priv->ramin_rsvd_vram; | 85 | c_offset = dev_priv->vram_size - dev_priv->ramin_rsvd_vram; |
90 | c_size = 128 << 10; | 86 | c_size = 128 << 10; |
91 | c_vmpd = ((dev_priv->chipset & 0xf0) == 0x50) ? 0x1400 : 0x200; | 87 | c_vmpd = ((dev_priv->chipset & 0xf0) == 0x50) ? 0x1400 : 0x200; |
92 | c_ramfc = ((dev_priv->chipset & 0xf0) == 0x50) ? 0x0 : 0x20; | 88 | c_ramfc = ((dev_priv->chipset & 0xf0) == 0x50) ? 0x0 : 0x20; |
@@ -106,7 +102,7 @@ nv50_instmem_init(struct drm_device *dev) | |||
106 | dev_priv->vm_gart_size = NV50_VM_BLOCK; | 102 | dev_priv->vm_gart_size = NV50_VM_BLOCK; |
107 | 103 | ||
108 | dev_priv->vm_vram_base = dev_priv->vm_gart_base + dev_priv->vm_gart_size; | 104 | dev_priv->vm_vram_base = dev_priv->vm_gart_base + dev_priv->vm_gart_size; |
109 | dev_priv->vm_vram_size = nouveau_mem_fb_amount(dev); | 105 | dev_priv->vm_vram_size = dev_priv->vram_size; |
110 | if (dev_priv->vm_vram_size > NV50_VM_MAX_VRAM) | 106 | if (dev_priv->vm_vram_size > NV50_VM_MAX_VRAM) |
111 | dev_priv->vm_vram_size = NV50_VM_MAX_VRAM; | 107 | dev_priv->vm_vram_size = NV50_VM_MAX_VRAM; |
112 | dev_priv->vm_vram_size = roundup(dev_priv->vm_vram_size, NV50_VM_BLOCK); | 108 | dev_priv->vm_vram_size = roundup(dev_priv->vm_vram_size, NV50_VM_BLOCK); |
@@ -189,8 +185,8 @@ nv50_instmem_init(struct drm_device *dev) | |||
189 | 185 | ||
190 | i = 0; | 186 | i = 0; |
191 | while (v < dev_priv->vram_sys_base + c_offset + c_size) { | 187 | while (v < dev_priv->vram_sys_base + c_offset + c_size) { |
192 | BAR0_WI32(priv->pramin_pt->gpuobj, i + 0, v); | 188 | BAR0_WI32(priv->pramin_pt->gpuobj, i + 0, lower_32_bits(v)); |
193 | BAR0_WI32(priv->pramin_pt->gpuobj, i + 4, 0x00000000); | 189 | BAR0_WI32(priv->pramin_pt->gpuobj, i + 4, upper_32_bits(v)); |
194 | v += 0x1000; | 190 | v += 0x1000; |
195 | i += 8; | 191 | i += 8; |
196 | } | 192 | } |
diff --git a/drivers/gpu/drm/nouveau/nv50_sor.c b/drivers/gpu/drm/nouveau/nv50_sor.c index c2fff543b06f..0c68698f23df 100644 --- a/drivers/gpu/drm/nouveau/nv50_sor.c +++ b/drivers/gpu/drm/nouveau/nv50_sor.c | |||
@@ -211,7 +211,7 @@ nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, | |||
211 | mode_ctl = 0x0200; | 211 | mode_ctl = 0x0200; |
212 | break; | 212 | break; |
213 | case OUTPUT_DP: | 213 | case OUTPUT_DP: |
214 | mode_ctl |= 0x00050000; | 214 | mode_ctl |= (nv_encoder->dp.mc_unknown << 16); |
215 | if (nv_encoder->dcb->sorconf.link & 1) | 215 | if (nv_encoder->dcb->sorconf.link & 1) |
216 | mode_ctl |= 0x00000800; | 216 | mode_ctl |= 0x00000800; |
217 | else | 217 | else |
@@ -274,6 +274,7 @@ static const struct drm_encoder_funcs nv50_sor_encoder_funcs = { | |||
274 | int | 274 | int |
275 | nv50_sor_create(struct drm_device *dev, struct dcb_entry *entry) | 275 | nv50_sor_create(struct drm_device *dev, struct dcb_entry *entry) |
276 | { | 276 | { |
277 | struct drm_nouveau_private *dev_priv = dev->dev_private; | ||
277 | struct nouveau_encoder *nv_encoder = NULL; | 278 | struct nouveau_encoder *nv_encoder = NULL; |
278 | struct drm_encoder *encoder; | 279 | struct drm_encoder *encoder; |
279 | bool dum; | 280 | bool dum; |
@@ -319,5 +320,27 @@ nv50_sor_create(struct drm_device *dev, struct dcb_entry *entry) | |||
319 | encoder->possible_crtcs = entry->heads; | 320 | encoder->possible_crtcs = entry->heads; |
320 | encoder->possible_clones = 0; | 321 | encoder->possible_clones = 0; |
321 | 322 | ||
323 | if (nv_encoder->dcb->type == OUTPUT_DP) { | ||
324 | uint32_t mc, or = nv_encoder->or; | ||
325 | |||
326 | if (dev_priv->chipset < 0x90 || | ||
327 | dev_priv->chipset == 0x92 || dev_priv->chipset == 0xa0) | ||
328 | mc = nv_rd32(dev, NV50_PDISPLAY_SOR_MODE_CTRL_C(or)); | ||
329 | else | ||
330 | mc = nv_rd32(dev, NV90_PDISPLAY_SOR_MODE_CTRL_C(or)); | ||
331 | |||
332 | switch ((mc & 0x00000f00) >> 8) { | ||
333 | case 8: | ||
334 | case 9: | ||
335 | nv_encoder->dp.mc_unknown = (mc & 0x000f0000) >> 16; | ||
336 | break; | ||
337 | default: | ||
338 | break; | ||
339 | } | ||
340 | |||
341 | if (!nv_encoder->dp.mc_unknown) | ||
342 | nv_encoder->dp.mc_unknown = 5; | ||
343 | } | ||
344 | |||
322 | return 0; | 345 | return 0; |
323 | } | 346 | } |
diff --git a/drivers/gpu/drm/r128/r128_cce.c b/drivers/gpu/drm/r128/r128_cce.c index 4c39a407aa4a..e671d0e74d4c 100644 --- a/drivers/gpu/drm/r128/r128_cce.c +++ b/drivers/gpu/drm/r128/r128_cce.c | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | #include <linux/firmware.h> | 32 | #include <linux/firmware.h> |
33 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include "drmP.h" | 36 | #include "drmP.h" |
36 | #include "drm.h" | 37 | #include "drm.h" |
diff --git a/drivers/gpu/drm/radeon/Makefile b/drivers/gpu/drm/radeon/Makefile index ed38262d9985..3c91312dea9a 100644 --- a/drivers/gpu/drm/radeon/Makefile +++ b/drivers/gpu/drm/radeon/Makefile | |||
@@ -50,7 +50,7 @@ $(obj)/r600_cs.o: $(obj)/r600_reg_safe.h | |||
50 | radeon-y := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o \ | 50 | radeon-y := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o \ |
51 | radeon_irq.o r300_cmdbuf.o r600_cp.o | 51 | radeon_irq.o r300_cmdbuf.o r600_cp.o |
52 | # add KMS driver | 52 | # add KMS driver |
53 | radeon-y += radeon_device.o radeon_kms.o \ | 53 | radeon-y += radeon_device.o radeon_asic.o radeon_kms.o \ |
54 | radeon_atombios.o radeon_agp.o atombios_crtc.o radeon_combios.o \ | 54 | radeon_atombios.o radeon_agp.o atombios_crtc.o radeon_combios.o \ |
55 | atom.o radeon_fence.o radeon_ttm.o radeon_object.o radeon_gart.o \ | 55 | atom.o radeon_fence.o radeon_ttm.o radeon_object.o radeon_gart.o \ |
56 | radeon_legacy_crtc.o radeon_legacy_encoders.o radeon_connectors.o \ | 56 | radeon_legacy_crtc.o radeon_legacy_encoders.o radeon_connectors.o \ |
diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index d75788feac6c..bcec2d79636e 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/slab.h> | ||
27 | #include <asm/unaligned.h> | 28 | #include <asm/unaligned.h> |
28 | 29 | ||
29 | #define ATOM_DEBUG | 30 | #define ATOM_DEBUG |
@@ -52,15 +53,17 @@ | |||
52 | 53 | ||
53 | typedef struct { | 54 | typedef struct { |
54 | struct atom_context *ctx; | 55 | struct atom_context *ctx; |
55 | |||
56 | uint32_t *ps, *ws; | 56 | uint32_t *ps, *ws; |
57 | int ps_shift; | 57 | int ps_shift; |
58 | uint16_t start; | 58 | uint16_t start; |
59 | unsigned last_jump; | ||
60 | unsigned long last_jump_jiffies; | ||
61 | bool abort; | ||
59 | } atom_exec_context; | 62 | } atom_exec_context; |
60 | 63 | ||
61 | int atom_debug = 0; | 64 | int atom_debug = 0; |
62 | static void atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t * params); | 65 | static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t * params); |
63 | void atom_execute_table(struct atom_context *ctx, int index, uint32_t * params); | 66 | int atom_execute_table(struct atom_context *ctx, int index, uint32_t * params); |
64 | 67 | ||
65 | static uint32_t atom_arg_mask[8] = | 68 | static uint32_t atom_arg_mask[8] = |
66 | { 0xFFFFFFFF, 0xFFFF, 0xFFFF00, 0xFFFF0000, 0xFF, 0xFF00, 0xFF0000, | 69 | { 0xFFFFFFFF, 0xFFFF, 0xFFFF00, 0xFFFF0000, 0xFF, 0xFF00, 0xFF0000, |
@@ -604,12 +607,17 @@ static void atom_op_beep(atom_exec_context *ctx, int *ptr, int arg) | |||
604 | static void atom_op_calltable(atom_exec_context *ctx, int *ptr, int arg) | 607 | static void atom_op_calltable(atom_exec_context *ctx, int *ptr, int arg) |
605 | { | 608 | { |
606 | int idx = U8((*ptr)++); | 609 | int idx = U8((*ptr)++); |
610 | int r = 0; | ||
611 | |||
607 | if (idx < ATOM_TABLE_NAMES_CNT) | 612 | if (idx < ATOM_TABLE_NAMES_CNT) |
608 | SDEBUG(" table: %d (%s)\n", idx, atom_table_names[idx]); | 613 | SDEBUG(" table: %d (%s)\n", idx, atom_table_names[idx]); |
609 | else | 614 | else |
610 | SDEBUG(" table: %d\n", idx); | 615 | SDEBUG(" table: %d\n", idx); |
611 | if (U16(ctx->ctx->cmd_table + 4 + 2 * idx)) | 616 | if (U16(ctx->ctx->cmd_table + 4 + 2 * idx)) |
612 | atom_execute_table_locked(ctx->ctx, idx, ctx->ps + ctx->ps_shift); | 617 | r = atom_execute_table_locked(ctx->ctx, idx, ctx->ps + ctx->ps_shift); |
618 | if (r) { | ||
619 | ctx->abort = true; | ||
620 | } | ||
613 | } | 621 | } |
614 | 622 | ||
615 | static void atom_op_clear(atom_exec_context *ctx, int *ptr, int arg) | 623 | static void atom_op_clear(atom_exec_context *ctx, int *ptr, int arg) |
@@ -673,6 +681,8 @@ static void atom_op_eot(atom_exec_context *ctx, int *ptr, int arg) | |||
673 | static void atom_op_jump(atom_exec_context *ctx, int *ptr, int arg) | 681 | static void atom_op_jump(atom_exec_context *ctx, int *ptr, int arg) |
674 | { | 682 | { |
675 | int execute = 0, target = U16(*ptr); | 683 | int execute = 0, target = U16(*ptr); |
684 | unsigned long cjiffies; | ||
685 | |||
676 | (*ptr) += 2; | 686 | (*ptr) += 2; |
677 | switch (arg) { | 687 | switch (arg) { |
678 | case ATOM_COND_ABOVE: | 688 | case ATOM_COND_ABOVE: |
@@ -700,8 +710,25 @@ static void atom_op_jump(atom_exec_context *ctx, int *ptr, int arg) | |||
700 | if (arg != ATOM_COND_ALWAYS) | 710 | if (arg != ATOM_COND_ALWAYS) |
701 | SDEBUG(" taken: %s\n", execute ? "yes" : "no"); | 711 | SDEBUG(" taken: %s\n", execute ? "yes" : "no"); |
702 | SDEBUG(" target: 0x%04X\n", target); | 712 | SDEBUG(" target: 0x%04X\n", target); |
703 | if (execute) | 713 | if (execute) { |
714 | if (ctx->last_jump == (ctx->start + target)) { | ||
715 | cjiffies = jiffies; | ||
716 | if (time_after(cjiffies, ctx->last_jump_jiffies)) { | ||
717 | cjiffies -= ctx->last_jump_jiffies; | ||
718 | if ((jiffies_to_msecs(cjiffies) > 1000)) { | ||
719 | DRM_ERROR("atombios stuck in loop for more than 1sec aborting\n"); | ||
720 | ctx->abort = true; | ||
721 | } | ||
722 | } else { | ||
723 | /* jiffies wrap around we will just wait a little longer */ | ||
724 | ctx->last_jump_jiffies = jiffies; | ||
725 | } | ||
726 | } else { | ||
727 | ctx->last_jump = ctx->start + target; | ||
728 | ctx->last_jump_jiffies = jiffies; | ||
729 | } | ||
704 | *ptr = ctx->start + target; | 730 | *ptr = ctx->start + target; |
731 | } | ||
705 | } | 732 | } |
706 | 733 | ||
707 | static void atom_op_mask(atom_exec_context *ctx, int *ptr, int arg) | 734 | static void atom_op_mask(atom_exec_context *ctx, int *ptr, int arg) |
@@ -1104,15 +1131,16 @@ static struct { | |||
1104 | atom_op_shr, ATOM_ARG_MC}, { | 1131 | atom_op_shr, ATOM_ARG_MC}, { |
1105 | atom_op_debug, 0},}; | 1132 | atom_op_debug, 0},}; |
1106 | 1133 | ||
1107 | static void atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t * params) | 1134 | static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t * params) |
1108 | { | 1135 | { |
1109 | int base = CU16(ctx->cmd_table + 4 + 2 * index); | 1136 | int base = CU16(ctx->cmd_table + 4 + 2 * index); |
1110 | int len, ws, ps, ptr; | 1137 | int len, ws, ps, ptr; |
1111 | unsigned char op; | 1138 | unsigned char op; |
1112 | atom_exec_context ectx; | 1139 | atom_exec_context ectx; |
1140 | int ret = 0; | ||
1113 | 1141 | ||
1114 | if (!base) | 1142 | if (!base) |
1115 | return; | 1143 | return -EINVAL; |
1116 | 1144 | ||
1117 | len = CU16(base + ATOM_CT_SIZE_PTR); | 1145 | len = CU16(base + ATOM_CT_SIZE_PTR); |
1118 | ws = CU8(base + ATOM_CT_WS_PTR); | 1146 | ws = CU8(base + ATOM_CT_WS_PTR); |
@@ -1125,6 +1153,8 @@ static void atom_execute_table_locked(struct atom_context *ctx, int index, uint3 | |||
1125 | ectx.ps_shift = ps / 4; | 1153 | ectx.ps_shift = ps / 4; |
1126 | ectx.start = base; | 1154 | ectx.start = base; |
1127 | ectx.ps = params; | 1155 | ectx.ps = params; |
1156 | ectx.abort = false; | ||
1157 | ectx.last_jump = 0; | ||
1128 | if (ws) | 1158 | if (ws) |
1129 | ectx.ws = kzalloc(4 * ws, GFP_KERNEL); | 1159 | ectx.ws = kzalloc(4 * ws, GFP_KERNEL); |
1130 | else | 1160 | else |
@@ -1137,6 +1167,12 @@ static void atom_execute_table_locked(struct atom_context *ctx, int index, uint3 | |||
1137 | SDEBUG("%s @ 0x%04X\n", atom_op_names[op], ptr - 1); | 1167 | SDEBUG("%s @ 0x%04X\n", atom_op_names[op], ptr - 1); |
1138 | else | 1168 | else |
1139 | SDEBUG("[%d] @ 0x%04X\n", op, ptr - 1); | 1169 | SDEBUG("[%d] @ 0x%04X\n", op, ptr - 1); |
1170 | if (ectx.abort) { | ||
1171 | DRM_ERROR("atombios stuck executing %04X (len %d, WS %d, PS %d) @ 0x%04X\n", | ||
1172 | base, len, ws, ps, ptr - 1); | ||
1173 | ret = -EINVAL; | ||
1174 | goto free; | ||
1175 | } | ||
1140 | 1176 | ||
1141 | if (op < ATOM_OP_CNT && op > 0) | 1177 | if (op < ATOM_OP_CNT && op > 0) |
1142 | opcode_table[op].func(&ectx, &ptr, | 1178 | opcode_table[op].func(&ectx, &ptr, |
@@ -1150,12 +1186,16 @@ static void atom_execute_table_locked(struct atom_context *ctx, int index, uint3 | |||
1150 | debug_depth--; | 1186 | debug_depth--; |
1151 | SDEBUG("<<\n"); | 1187 | SDEBUG("<<\n"); |
1152 | 1188 | ||
1189 | free: | ||
1153 | if (ws) | 1190 | if (ws) |
1154 | kfree(ectx.ws); | 1191 | kfree(ectx.ws); |
1192 | return ret; | ||
1155 | } | 1193 | } |
1156 | 1194 | ||
1157 | void atom_execute_table(struct atom_context *ctx, int index, uint32_t * params) | 1195 | int atom_execute_table(struct atom_context *ctx, int index, uint32_t * params) |
1158 | { | 1196 | { |
1197 | int r; | ||
1198 | |||
1159 | mutex_lock(&ctx->mutex); | 1199 | mutex_lock(&ctx->mutex); |
1160 | /* reset reg block */ | 1200 | /* reset reg block */ |
1161 | ctx->reg_block = 0; | 1201 | ctx->reg_block = 0; |
@@ -1163,8 +1203,9 @@ void atom_execute_table(struct atom_context *ctx, int index, uint32_t * params) | |||
1163 | ctx->fb_base = 0; | 1203 | ctx->fb_base = 0; |
1164 | /* reset io mode */ | 1204 | /* reset io mode */ |
1165 | ctx->io_mode = ATOM_IO_MM; | 1205 | ctx->io_mode = ATOM_IO_MM; |
1166 | atom_execute_table_locked(ctx, index, params); | 1206 | r = atom_execute_table_locked(ctx, index, params); |
1167 | mutex_unlock(&ctx->mutex); | 1207 | mutex_unlock(&ctx->mutex); |
1208 | return r; | ||
1168 | } | 1209 | } |
1169 | 1210 | ||
1170 | static int atom_iio_len[] = { 1, 2, 3, 3, 3, 3, 4, 4, 4, 3 }; | 1211 | static int atom_iio_len[] = { 1, 2, 3, 3, 3, 3, 4, 4, 4, 3 }; |
@@ -1248,9 +1289,7 @@ int atom_asic_init(struct atom_context *ctx) | |||
1248 | 1289 | ||
1249 | if (!CU16(ctx->cmd_table + 4 + 2 * ATOM_CMD_INIT)) | 1290 | if (!CU16(ctx->cmd_table + 4 + 2 * ATOM_CMD_INIT)) |
1250 | return 1; | 1291 | return 1; |
1251 | atom_execute_table(ctx, ATOM_CMD_INIT, ps); | 1292 | return atom_execute_table(ctx, ATOM_CMD_INIT, ps); |
1252 | |||
1253 | return 0; | ||
1254 | } | 1293 | } |
1255 | 1294 | ||
1256 | void atom_destroy(struct atom_context *ctx) | 1295 | void atom_destroy(struct atom_context *ctx) |
@@ -1260,12 +1299,16 @@ void atom_destroy(struct atom_context *ctx) | |||
1260 | kfree(ctx); | 1299 | kfree(ctx); |
1261 | } | 1300 | } |
1262 | 1301 | ||
1263 | void atom_parse_data_header(struct atom_context *ctx, int index, | 1302 | bool atom_parse_data_header(struct atom_context *ctx, int index, |
1264 | uint16_t * size, uint8_t * frev, uint8_t * crev, | 1303 | uint16_t * size, uint8_t * frev, uint8_t * crev, |
1265 | uint16_t * data_start) | 1304 | uint16_t * data_start) |
1266 | { | 1305 | { |
1267 | int offset = index * 2 + 4; | 1306 | int offset = index * 2 + 4; |
1268 | int idx = CU16(ctx->data_table + offset); | 1307 | int idx = CU16(ctx->data_table + offset); |
1308 | u16 *mdt = (u16 *)(ctx->bios + ctx->data_table + 4); | ||
1309 | |||
1310 | if (!mdt[index]) | ||
1311 | return false; | ||
1269 | 1312 | ||
1270 | if (size) | 1313 | if (size) |
1271 | *size = CU16(idx); | 1314 | *size = CU16(idx); |
@@ -1274,38 +1317,42 @@ void atom_parse_data_header(struct atom_context *ctx, int index, | |||
1274 | if (crev) | 1317 | if (crev) |
1275 | *crev = CU8(idx + 3); | 1318 | *crev = CU8(idx + 3); |
1276 | *data_start = idx; | 1319 | *data_start = idx; |
1277 | return; | 1320 | return true; |
1278 | } | 1321 | } |
1279 | 1322 | ||
1280 | void atom_parse_cmd_header(struct atom_context *ctx, int index, uint8_t * frev, | 1323 | bool atom_parse_cmd_header(struct atom_context *ctx, int index, uint8_t * frev, |
1281 | uint8_t * crev) | 1324 | uint8_t * crev) |
1282 | { | 1325 | { |
1283 | int offset = index * 2 + 4; | 1326 | int offset = index * 2 + 4; |
1284 | int idx = CU16(ctx->cmd_table + offset); | 1327 | int idx = CU16(ctx->cmd_table + offset); |
1328 | u16 *mct = (u16 *)(ctx->bios + ctx->cmd_table + 4); | ||
1329 | |||
1330 | if (!mct[index]) | ||
1331 | return false; | ||
1285 | 1332 | ||
1286 | if (frev) | 1333 | if (frev) |
1287 | *frev = CU8(idx + 2); | 1334 | *frev = CU8(idx + 2); |
1288 | if (crev) | 1335 | if (crev) |
1289 | *crev = CU8(idx + 3); | 1336 | *crev = CU8(idx + 3); |
1290 | return; | 1337 | return true; |
1291 | } | 1338 | } |
1292 | 1339 | ||
1293 | int atom_allocate_fb_scratch(struct atom_context *ctx) | 1340 | int atom_allocate_fb_scratch(struct atom_context *ctx) |
1294 | { | 1341 | { |
1295 | int index = GetIndexIntoMasterTable(DATA, VRAM_UsageByFirmware); | 1342 | int index = GetIndexIntoMasterTable(DATA, VRAM_UsageByFirmware); |
1296 | uint16_t data_offset; | 1343 | uint16_t data_offset; |
1297 | int usage_bytes; | 1344 | int usage_bytes = 0; |
1298 | struct _ATOM_VRAM_USAGE_BY_FIRMWARE *firmware_usage; | 1345 | struct _ATOM_VRAM_USAGE_BY_FIRMWARE *firmware_usage; |
1299 | 1346 | ||
1300 | atom_parse_data_header(ctx, index, NULL, NULL, NULL, &data_offset); | 1347 | if (atom_parse_data_header(ctx, index, NULL, NULL, NULL, &data_offset)) { |
1348 | firmware_usage = (struct _ATOM_VRAM_USAGE_BY_FIRMWARE *)(ctx->bios + data_offset); | ||
1301 | 1349 | ||
1302 | firmware_usage = (struct _ATOM_VRAM_USAGE_BY_FIRMWARE *)(ctx->bios + data_offset); | 1350 | DRM_DEBUG("atom firmware requested %08x %dkb\n", |
1351 | firmware_usage->asFirmwareVramReserveInfo[0].ulStartAddrUsedByFirmware, | ||
1352 | firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb); | ||
1303 | 1353 | ||
1304 | DRM_DEBUG("atom firmware requested %08x %dkb\n", | 1354 | usage_bytes = firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb * 1024; |
1305 | firmware_usage->asFirmwareVramReserveInfo[0].ulStartAddrUsedByFirmware, | 1355 | } |
1306 | firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb); | ||
1307 | |||
1308 | usage_bytes = firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb * 1024; | ||
1309 | if (usage_bytes == 0) | 1356 | if (usage_bytes == 0) |
1310 | usage_bytes = 20 * 1024; | 1357 | usage_bytes = 20 * 1024; |
1311 | /* allocate some scratch memory */ | 1358 | /* allocate some scratch memory */ |
diff --git a/drivers/gpu/drm/radeon/atom.h b/drivers/gpu/drm/radeon/atom.h index bc73781423a1..cd1b64ab5ca7 100644 --- a/drivers/gpu/drm/radeon/atom.h +++ b/drivers/gpu/drm/radeon/atom.h | |||
@@ -140,11 +140,13 @@ struct atom_context { | |||
140 | extern int atom_debug; | 140 | extern int atom_debug; |
141 | 141 | ||
142 | struct atom_context *atom_parse(struct card_info *, void *); | 142 | struct atom_context *atom_parse(struct card_info *, void *); |
143 | void atom_execute_table(struct atom_context *, int, uint32_t *); | 143 | int atom_execute_table(struct atom_context *, int, uint32_t *); |
144 | int atom_asic_init(struct atom_context *); | 144 | int atom_asic_init(struct atom_context *); |
145 | void atom_destroy(struct atom_context *); | 145 | void atom_destroy(struct atom_context *); |
146 | void atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size, uint8_t *frev, uint8_t *crev, uint16_t *data_start); | 146 | bool atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size, |
147 | void atom_parse_cmd_header(struct atom_context *ctx, int index, uint8_t *frev, uint8_t *crev); | 147 | uint8_t *frev, uint8_t *crev, uint16_t *data_start); |
148 | bool atom_parse_cmd_header(struct atom_context *ctx, int index, | ||
149 | uint8_t *frev, uint8_t *crev); | ||
148 | int atom_allocate_fb_scratch(struct atom_context *ctx); | 150 | int atom_allocate_fb_scratch(struct atom_context *ctx); |
149 | #include "atom-types.h" | 151 | #include "atom-types.h" |
150 | #include "atombios.h" | 152 | #include "atombios.h" |
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index dd9fdf560611..fd4ef6d18849 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c | |||
@@ -353,12 +353,55 @@ static void atombios_crtc_set_timing(struct drm_crtc *crtc, | |||
353 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); | 353 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); |
354 | } | 354 | } |
355 | 355 | ||
356 | static void atombios_disable_ss(struct drm_crtc *crtc) | ||
357 | { | ||
358 | struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); | ||
359 | struct drm_device *dev = crtc->dev; | ||
360 | struct radeon_device *rdev = dev->dev_private; | ||
361 | u32 ss_cntl; | ||
362 | |||
363 | if (ASIC_IS_DCE4(rdev)) { | ||
364 | switch (radeon_crtc->pll_id) { | ||
365 | case ATOM_PPLL1: | ||
366 | ss_cntl = RREG32(EVERGREEN_P1PLL_SS_CNTL); | ||
367 | ss_cntl &= ~EVERGREEN_PxPLL_SS_EN; | ||
368 | WREG32(EVERGREEN_P1PLL_SS_CNTL, ss_cntl); | ||
369 | break; | ||
370 | case ATOM_PPLL2: | ||
371 | ss_cntl = RREG32(EVERGREEN_P2PLL_SS_CNTL); | ||
372 | ss_cntl &= ~EVERGREEN_PxPLL_SS_EN; | ||
373 | WREG32(EVERGREEN_P2PLL_SS_CNTL, ss_cntl); | ||
374 | break; | ||
375 | case ATOM_DCPLL: | ||
376 | case ATOM_PPLL_INVALID: | ||
377 | return; | ||
378 | } | ||
379 | } else if (ASIC_IS_AVIVO(rdev)) { | ||
380 | switch (radeon_crtc->pll_id) { | ||
381 | case ATOM_PPLL1: | ||
382 | ss_cntl = RREG32(AVIVO_P1PLL_INT_SS_CNTL); | ||
383 | ss_cntl &= ~1; | ||
384 | WREG32(AVIVO_P1PLL_INT_SS_CNTL, ss_cntl); | ||
385 | break; | ||
386 | case ATOM_PPLL2: | ||
387 | ss_cntl = RREG32(AVIVO_P2PLL_INT_SS_CNTL); | ||
388 | ss_cntl &= ~1; | ||
389 | WREG32(AVIVO_P2PLL_INT_SS_CNTL, ss_cntl); | ||
390 | break; | ||
391 | case ATOM_DCPLL: | ||
392 | case ATOM_PPLL_INVALID: | ||
393 | return; | ||
394 | } | ||
395 | } | ||
396 | } | ||
397 | |||
398 | |||
356 | union atom_enable_ss { | 399 | union atom_enable_ss { |
357 | ENABLE_LVDS_SS_PARAMETERS legacy; | 400 | ENABLE_LVDS_SS_PARAMETERS legacy; |
358 | ENABLE_SPREAD_SPECTRUM_ON_PPLL_PS_ALLOCATION v1; | 401 | ENABLE_SPREAD_SPECTRUM_ON_PPLL_PS_ALLOCATION v1; |
359 | }; | 402 | }; |
360 | 403 | ||
361 | static void atombios_set_ss(struct drm_crtc *crtc, int enable) | 404 | static void atombios_enable_ss(struct drm_crtc *crtc) |
362 | { | 405 | { |
363 | struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); | 406 | struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
364 | struct drm_device *dev = crtc->dev; | 407 | struct drm_device *dev = crtc->dev; |
@@ -387,9 +430,9 @@ static void atombios_set_ss(struct drm_crtc *crtc, int enable) | |||
387 | step = dig->ss->step; | 430 | step = dig->ss->step; |
388 | delay = dig->ss->delay; | 431 | delay = dig->ss->delay; |
389 | range = dig->ss->range; | 432 | range = dig->ss->range; |
390 | } else if (enable) | 433 | } else |
391 | return; | 434 | return; |
392 | } else if (enable) | 435 | } else |
393 | return; | 436 | return; |
394 | break; | 437 | break; |
395 | } | 438 | } |
@@ -406,13 +449,13 @@ static void atombios_set_ss(struct drm_crtc *crtc, int enable) | |||
406 | args.v1.ucSpreadSpectrumDelay = delay; | 449 | args.v1.ucSpreadSpectrumDelay = delay; |
407 | args.v1.ucSpreadSpectrumRange = range; | 450 | args.v1.ucSpreadSpectrumRange = range; |
408 | args.v1.ucPpll = radeon_crtc->crtc_id ? ATOM_PPLL2 : ATOM_PPLL1; | 451 | args.v1.ucPpll = radeon_crtc->crtc_id ? ATOM_PPLL2 : ATOM_PPLL1; |
409 | args.v1.ucEnable = enable; | 452 | args.v1.ucEnable = ATOM_ENABLE; |
410 | } else { | 453 | } else { |
411 | args.legacy.usSpreadSpectrumPercentage = cpu_to_le16(percentage); | 454 | args.legacy.usSpreadSpectrumPercentage = cpu_to_le16(percentage); |
412 | args.legacy.ucSpreadSpectrumType = type; | 455 | args.legacy.ucSpreadSpectrumType = type; |
413 | args.legacy.ucSpreadSpectrumStepSize_Delay = (step & 3) << 2; | 456 | args.legacy.ucSpreadSpectrumStepSize_Delay = (step & 3) << 2; |
414 | args.legacy.ucSpreadSpectrumStepSize_Delay |= (delay & 7) << 4; | 457 | args.legacy.ucSpreadSpectrumStepSize_Delay |= (delay & 7) << 4; |
415 | args.legacy.ucEnable = enable; | 458 | args.legacy.ucEnable = ATOM_ENABLE; |
416 | } | 459 | } |
417 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); | 460 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); |
418 | } | 461 | } |
@@ -478,11 +521,6 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc, | |||
478 | /* DVO wants 2x pixel clock if the DVO chip is in 12 bit mode */ | 521 | /* DVO wants 2x pixel clock if the DVO chip is in 12 bit mode */ |
479 | if (radeon_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1) | 522 | if (radeon_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1) |
480 | adjusted_clock = mode->clock * 2; | 523 | adjusted_clock = mode->clock * 2; |
481 | /* LVDS PLL quirks */ | ||
482 | if (encoder->encoder_type == DRM_MODE_ENCODER_LVDS) { | ||
483 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; | ||
484 | pll->algo = dig->pll_algo; | ||
485 | } | ||
486 | } else { | 524 | } else { |
487 | if (encoder->encoder_type != DRM_MODE_ENCODER_DAC) | 525 | if (encoder->encoder_type != DRM_MODE_ENCODER_DAC) |
488 | pll->flags |= RADEON_PLL_NO_ODD_POST_DIV; | 526 | pll->flags |= RADEON_PLL_NO_ODD_POST_DIV; |
@@ -503,8 +541,9 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc, | |||
503 | int index; | 541 | int index; |
504 | 542 | ||
505 | index = GetIndexIntoMasterTable(COMMAND, AdjustDisplayPll); | 543 | index = GetIndexIntoMasterTable(COMMAND, AdjustDisplayPll); |
506 | atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, | 544 | if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, |
507 | &crev); | 545 | &crev)) |
546 | return adjusted_clock; | ||
508 | 547 | ||
509 | memset(&args, 0, sizeof(args)); | 548 | memset(&args, 0, sizeof(args)); |
510 | 549 | ||
@@ -542,11 +581,16 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc, | |||
542 | } | 581 | } |
543 | } else if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) { | 582 | } else if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) { |
544 | /* may want to enable SS on DP/eDP eventually */ | 583 | /* may want to enable SS on DP/eDP eventually */ |
545 | args.v3.sInput.ucDispPllConfig |= | 584 | /*args.v3.sInput.ucDispPllConfig |= |
546 | DISPPLL_CONFIG_SS_ENABLE; | 585 | DISPPLL_CONFIG_SS_ENABLE;*/ |
547 | if (mode->clock > 165000) | 586 | if (encoder_mode == ATOM_ENCODER_MODE_DP) |
548 | args.v3.sInput.ucDispPllConfig |= | 587 | args.v3.sInput.ucDispPllConfig |= |
549 | DISPPLL_CONFIG_DUAL_LINK; | 588 | DISPPLL_CONFIG_COHERENT_MODE; |
589 | else { | ||
590 | if (mode->clock > 165000) | ||
591 | args.v3.sInput.ucDispPllConfig |= | ||
592 | DISPPLL_CONFIG_DUAL_LINK; | ||
593 | } | ||
550 | } | 594 | } |
551 | atom_execute_table(rdev->mode_info.atom_context, | 595 | atom_execute_table(rdev->mode_info.atom_context, |
552 | index, (uint32_t *)&args); | 596 | index, (uint32_t *)&args); |
@@ -592,8 +636,9 @@ static void atombios_crtc_set_dcpll(struct drm_crtc *crtc) | |||
592 | memset(&args, 0, sizeof(args)); | 636 | memset(&args, 0, sizeof(args)); |
593 | 637 | ||
594 | index = GetIndexIntoMasterTable(COMMAND, SetPixelClock); | 638 | index = GetIndexIntoMasterTable(COMMAND, SetPixelClock); |
595 | atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, | 639 | if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, |
596 | &crev); | 640 | &crev)) |
641 | return; | ||
597 | 642 | ||
598 | switch (frev) { | 643 | switch (frev) { |
599 | case 1: | 644 | case 1: |
@@ -667,8 +712,9 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode | |||
667 | &ref_div, &post_div); | 712 | &ref_div, &post_div); |
668 | 713 | ||
669 | index = GetIndexIntoMasterTable(COMMAND, SetPixelClock); | 714 | index = GetIndexIntoMasterTable(COMMAND, SetPixelClock); |
670 | atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, | 715 | if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, |
671 | &crev); | 716 | &crev)) |
717 | return; | ||
672 | 718 | ||
673 | switch (frev) { | 719 | switch (frev) { |
674 | case 1: | 720 | case 1: |
@@ -1083,15 +1129,12 @@ int atombios_crtc_mode_set(struct drm_crtc *crtc, | |||
1083 | 1129 | ||
1084 | /* TODO color tiling */ | 1130 | /* TODO color tiling */ |
1085 | 1131 | ||
1086 | /* pick pll */ | 1132 | atombios_disable_ss(crtc); |
1087 | radeon_crtc->pll_id = radeon_atom_pick_pll(crtc); | ||
1088 | |||
1089 | atombios_set_ss(crtc, 0); | ||
1090 | /* always set DCPLL */ | 1133 | /* always set DCPLL */ |
1091 | if (ASIC_IS_DCE4(rdev)) | 1134 | if (ASIC_IS_DCE4(rdev)) |
1092 | atombios_crtc_set_dcpll(crtc); | 1135 | atombios_crtc_set_dcpll(crtc); |
1093 | atombios_crtc_set_pll(crtc, adjusted_mode); | 1136 | atombios_crtc_set_pll(crtc, adjusted_mode); |
1094 | atombios_set_ss(crtc, 1); | 1137 | atombios_enable_ss(crtc); |
1095 | 1138 | ||
1096 | if (ASIC_IS_DCE4(rdev)) | 1139 | if (ASIC_IS_DCE4(rdev)) |
1097 | atombios_set_crtc_dtd_timing(crtc, adjusted_mode); | 1140 | atombios_set_crtc_dtd_timing(crtc, adjusted_mode); |
@@ -1120,6 +1163,11 @@ static bool atombios_crtc_mode_fixup(struct drm_crtc *crtc, | |||
1120 | 1163 | ||
1121 | static void atombios_crtc_prepare(struct drm_crtc *crtc) | 1164 | static void atombios_crtc_prepare(struct drm_crtc *crtc) |
1122 | { | 1165 | { |
1166 | struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); | ||
1167 | |||
1168 | /* pick pll */ | ||
1169 | radeon_crtc->pll_id = radeon_atom_pick_pll(crtc); | ||
1170 | |||
1123 | atombios_lock_crtc(crtc, ATOM_ENABLE); | 1171 | atombios_lock_crtc(crtc, ATOM_ENABLE); |
1124 | atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); | 1172 | atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); |
1125 | } | 1173 | } |
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index 8a133bda00a2..28b31c64f48d 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c | |||
@@ -745,14 +745,14 @@ void dp_link_train(struct drm_encoder *encoder, | |||
745 | >> DP_TRAIN_PRE_EMPHASIS_SHIFT); | 745 | >> DP_TRAIN_PRE_EMPHASIS_SHIFT); |
746 | 746 | ||
747 | /* disable the training pattern on the sink */ | 747 | /* disable the training pattern on the sink */ |
748 | dp_set_training(radeon_connector, DP_TRAINING_PATTERN_DISABLE); | ||
749 | |||
750 | /* disable the training pattern on the source */ | ||
748 | if (ASIC_IS_DCE4(rdev)) | 751 | if (ASIC_IS_DCE4(rdev)) |
749 | atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_LINK_TRAINING_COMPLETE); | 752 | atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_LINK_TRAINING_COMPLETE); |
750 | else | 753 | else |
751 | radeon_dp_encoder_service(rdev, ATOM_DP_ACTION_TRAINING_COMPLETE, | 754 | radeon_dp_encoder_service(rdev, ATOM_DP_ACTION_TRAINING_COMPLETE, |
752 | dig_connector->dp_clock, enc_id, 0); | 755 | dig_connector->dp_clock, enc_id, 0); |
753 | |||
754 | radeon_dp_encoder_service(rdev, ATOM_DP_ACTION_TRAINING_COMPLETE, | ||
755 | dig_connector->dp_clock, enc_id, 0); | ||
756 | } | 756 | } |
757 | 757 | ||
758 | int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, | 758 | int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, |
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index bd2e7aa85c1d..e8f447e20507 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -23,8 +23,10 @@ | |||
23 | */ | 23 | */ |
24 | #include <linux/firmware.h> | 24 | #include <linux/firmware.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/slab.h> | ||
26 | #include "drmP.h" | 27 | #include "drmP.h" |
27 | #include "radeon.h" | 28 | #include "radeon.h" |
29 | #include "radeon_asic.h" | ||
28 | #include "radeon_drm.h" | 30 | #include "radeon_drm.h" |
29 | #include "rv770d.h" | 31 | #include "rv770d.h" |
30 | #include "atom.h" | 32 | #include "atom.h" |
@@ -436,7 +438,6 @@ static void evergreen_gpu_init(struct radeon_device *rdev) | |||
436 | 438 | ||
437 | int evergreen_mc_init(struct radeon_device *rdev) | 439 | int evergreen_mc_init(struct radeon_device *rdev) |
438 | { | 440 | { |
439 | fixed20_12 a; | ||
440 | u32 tmp; | 441 | u32 tmp; |
441 | int chansize, numchan; | 442 | int chansize, numchan; |
442 | 443 | ||
@@ -481,12 +482,8 @@ int evergreen_mc_init(struct radeon_device *rdev) | |||
481 | rdev->mc.real_vram_size = rdev->mc.aper_size; | 482 | rdev->mc.real_vram_size = rdev->mc.aper_size; |
482 | } | 483 | } |
483 | r600_vram_gtt_location(rdev, &rdev->mc); | 484 | r600_vram_gtt_location(rdev, &rdev->mc); |
484 | /* FIXME: we should enforce default clock in case GPU is not in | 485 | radeon_update_bandwidth_info(rdev); |
485 | * default setup | 486 | |
486 | */ | ||
487 | a.full = rfixed_const(100); | ||
488 | rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk); | ||
489 | rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); | ||
490 | return 0; | 487 | return 0; |
491 | } | 488 | } |
492 | 489 | ||
@@ -746,6 +743,7 @@ int evergreen_init(struct radeon_device *rdev) | |||
746 | 743 | ||
747 | void evergreen_fini(struct radeon_device *rdev) | 744 | void evergreen_fini(struct radeon_device *rdev) |
748 | { | 745 | { |
746 | radeon_pm_fini(rdev); | ||
749 | evergreen_suspend(rdev); | 747 | evergreen_suspend(rdev); |
750 | #if 0 | 748 | #if 0 |
751 | r600_blit_fini(rdev); | 749 | r600_blit_fini(rdev); |
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 91eb762eb3f9..c9580497ede4 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c | |||
@@ -26,11 +26,13 @@ | |||
26 | * Jerome Glisse | 26 | * Jerome Glisse |
27 | */ | 27 | */ |
28 | #include <linux/seq_file.h> | 28 | #include <linux/seq_file.h> |
29 | #include <linux/slab.h> | ||
29 | #include "drmP.h" | 30 | #include "drmP.h" |
30 | #include "drm.h" | 31 | #include "drm.h" |
31 | #include "radeon_drm.h" | 32 | #include "radeon_drm.h" |
32 | #include "radeon_reg.h" | 33 | #include "radeon_reg.h" |
33 | #include "radeon.h" | 34 | #include "radeon.h" |
35 | #include "radeon_asic.h" | ||
34 | #include "r100d.h" | 36 | #include "r100d.h" |
35 | #include "rs100d.h" | 37 | #include "rs100d.h" |
36 | #include "rv200d.h" | 38 | #include "rv200d.h" |
@@ -235,9 +237,9 @@ int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr) | |||
235 | 237 | ||
236 | void r100_pci_gart_fini(struct radeon_device *rdev) | 238 | void r100_pci_gart_fini(struct radeon_device *rdev) |
237 | { | 239 | { |
240 | radeon_gart_fini(rdev); | ||
238 | r100_pci_gart_disable(rdev); | 241 | r100_pci_gart_disable(rdev); |
239 | radeon_gart_table_ram_free(rdev); | 242 | radeon_gart_table_ram_free(rdev); |
240 | radeon_gart_fini(rdev); | ||
241 | } | 243 | } |
242 | 244 | ||
243 | int r100_irq_set(struct radeon_device *rdev) | 245 | int r100_irq_set(struct radeon_device *rdev) |
@@ -312,10 +314,12 @@ int r100_irq_process(struct radeon_device *rdev) | |||
312 | /* Vertical blank interrupts */ | 314 | /* Vertical blank interrupts */ |
313 | if (status & RADEON_CRTC_VBLANK_STAT) { | 315 | if (status & RADEON_CRTC_VBLANK_STAT) { |
314 | drm_handle_vblank(rdev->ddev, 0); | 316 | drm_handle_vblank(rdev->ddev, 0); |
317 | rdev->pm.vblank_sync = true; | ||
315 | wake_up(&rdev->irq.vblank_queue); | 318 | wake_up(&rdev->irq.vblank_queue); |
316 | } | 319 | } |
317 | if (status & RADEON_CRTC2_VBLANK_STAT) { | 320 | if (status & RADEON_CRTC2_VBLANK_STAT) { |
318 | drm_handle_vblank(rdev->ddev, 1); | 321 | drm_handle_vblank(rdev->ddev, 1); |
322 | rdev->pm.vblank_sync = true; | ||
319 | wake_up(&rdev->irq.vblank_queue); | 323 | wake_up(&rdev->irq.vblank_queue); |
320 | } | 324 | } |
321 | if (status & RADEON_FP_DETECT_STAT) { | 325 | if (status & RADEON_FP_DETECT_STAT) { |
@@ -741,6 +745,8 @@ int r100_cp_init(struct radeon_device *rdev, unsigned ring_size) | |||
741 | udelay(10); | 745 | udelay(10); |
742 | rdev->cp.rptr = RREG32(RADEON_CP_RB_RPTR); | 746 | rdev->cp.rptr = RREG32(RADEON_CP_RB_RPTR); |
743 | rdev->cp.wptr = RREG32(RADEON_CP_RB_WPTR); | 747 | rdev->cp.wptr = RREG32(RADEON_CP_RB_WPTR); |
748 | /* protect against crazy HW on resume */ | ||
749 | rdev->cp.wptr &= rdev->cp.ptr_mask; | ||
744 | /* Set cp mode to bus mastering & enable cp*/ | 750 | /* Set cp mode to bus mastering & enable cp*/ |
745 | WREG32(RADEON_CP_CSQ_MODE, | 751 | WREG32(RADEON_CP_CSQ_MODE, |
746 | REG_SET(RADEON_INDIRECT2_START, indirect2_start) | | 752 | REG_SET(RADEON_INDIRECT2_START, indirect2_start) | |
@@ -1804,6 +1810,7 @@ void r100_set_common_regs(struct radeon_device *rdev) | |||
1804 | { | 1810 | { |
1805 | struct drm_device *dev = rdev->ddev; | 1811 | struct drm_device *dev = rdev->ddev; |
1806 | bool force_dac2 = false; | 1812 | bool force_dac2 = false; |
1813 | u32 tmp; | ||
1807 | 1814 | ||
1808 | /* set these so they don't interfere with anything */ | 1815 | /* set these so they don't interfere with anything */ |
1809 | WREG32(RADEON_OV0_SCALE_CNTL, 0); | 1816 | WREG32(RADEON_OV0_SCALE_CNTL, 0); |
@@ -1875,6 +1882,12 @@ void r100_set_common_regs(struct radeon_device *rdev) | |||
1875 | WREG32(RADEON_DISP_HW_DEBUG, disp_hw_debug); | 1882 | WREG32(RADEON_DISP_HW_DEBUG, disp_hw_debug); |
1876 | WREG32(RADEON_DAC_CNTL2, dac2_cntl); | 1883 | WREG32(RADEON_DAC_CNTL2, dac2_cntl); |
1877 | } | 1884 | } |
1885 | |||
1886 | /* switch PM block to ACPI mode */ | ||
1887 | tmp = RREG32_PLL(RADEON_PLL_PWRMGT_CNTL); | ||
1888 | tmp &= ~RADEON_PM_MODE_SEL; | ||
1889 | WREG32_PLL(RADEON_PLL_PWRMGT_CNTL, tmp); | ||
1890 | |||
1878 | } | 1891 | } |
1879 | 1892 | ||
1880 | /* | 1893 | /* |
@@ -2022,6 +2035,7 @@ void r100_mc_init(struct radeon_device *rdev) | |||
2022 | radeon_vram_location(rdev, &rdev->mc, base); | 2035 | radeon_vram_location(rdev, &rdev->mc, base); |
2023 | if (!(rdev->flags & RADEON_IS_AGP)) | 2036 | if (!(rdev->flags & RADEON_IS_AGP)) |
2024 | radeon_gtt_location(rdev, &rdev->mc); | 2037 | radeon_gtt_location(rdev, &rdev->mc); |
2038 | radeon_update_bandwidth_info(rdev); | ||
2025 | } | 2039 | } |
2026 | 2040 | ||
2027 | 2041 | ||
@@ -2385,6 +2399,8 @@ void r100_bandwidth_update(struct radeon_device *rdev) | |||
2385 | uint32_t pixel_bytes1 = 0; | 2399 | uint32_t pixel_bytes1 = 0; |
2386 | uint32_t pixel_bytes2 = 0; | 2400 | uint32_t pixel_bytes2 = 0; |
2387 | 2401 | ||
2402 | radeon_update_display_priority(rdev); | ||
2403 | |||
2388 | if (rdev->mode_info.crtcs[0]->base.enabled) { | 2404 | if (rdev->mode_info.crtcs[0]->base.enabled) { |
2389 | mode1 = &rdev->mode_info.crtcs[0]->base.mode; | 2405 | mode1 = &rdev->mode_info.crtcs[0]->base.mode; |
2390 | pixel_bytes1 = rdev->mode_info.crtcs[0]->base.fb->bits_per_pixel / 8; | 2406 | pixel_bytes1 = rdev->mode_info.crtcs[0]->base.fb->bits_per_pixel / 8; |
@@ -2413,11 +2429,8 @@ void r100_bandwidth_update(struct radeon_device *rdev) | |||
2413 | /* | 2429 | /* |
2414 | * determine is there is enough bw for current mode | 2430 | * determine is there is enough bw for current mode |
2415 | */ | 2431 | */ |
2416 | mclk_ff.full = rfixed_const(rdev->clock.default_mclk); | 2432 | sclk_ff = rdev->pm.sclk; |
2417 | temp_ff.full = rfixed_const(100); | 2433 | mclk_ff = rdev->pm.mclk; |
2418 | mclk_ff.full = rfixed_div(mclk_ff, temp_ff); | ||
2419 | sclk_ff.full = rfixed_const(rdev->clock.default_sclk); | ||
2420 | sclk_ff.full = rfixed_div(sclk_ff, temp_ff); | ||
2421 | 2434 | ||
2422 | temp = (rdev->mc.vram_width / 8) * (rdev->mc.vram_is_ddr ? 2 : 1); | 2435 | temp = (rdev->mc.vram_width / 8) * (rdev->mc.vram_is_ddr ? 2 : 1); |
2423 | temp_ff.full = rfixed_const(temp); | 2436 | temp_ff.full = rfixed_const(temp); |
@@ -3440,6 +3453,7 @@ int r100_suspend(struct radeon_device *rdev) | |||
3440 | 3453 | ||
3441 | void r100_fini(struct radeon_device *rdev) | 3454 | void r100_fini(struct radeon_device *rdev) |
3442 | { | 3455 | { |
3456 | radeon_pm_fini(rdev); | ||
3443 | r100_cp_fini(rdev); | 3457 | r100_cp_fini(rdev); |
3444 | r100_wb_fini(rdev); | 3458 | r100_wb_fini(rdev); |
3445 | r100_ib_fini(rdev); | 3459 | r100_ib_fini(rdev); |
diff --git a/drivers/gpu/drm/radeon/r200.c b/drivers/gpu/drm/radeon/r200.c index 1146c9909c2c..85617c311212 100644 --- a/drivers/gpu/drm/radeon/r200.c +++ b/drivers/gpu/drm/radeon/r200.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include "radeon_drm.h" | 30 | #include "radeon_drm.h" |
31 | #include "radeon_reg.h" | 31 | #include "radeon_reg.h" |
32 | #include "radeon.h" | 32 | #include "radeon.h" |
33 | #include "radeon_asic.h" | ||
33 | 34 | ||
34 | #include "r100d.h" | 35 | #include "r100d.h" |
35 | #include "r200_reg_safe.h" | 36 | #include "r200_reg_safe.h" |
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index 4cef90cd74e5..2b9affe754ce 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c | |||
@@ -26,10 +26,12 @@ | |||
26 | * Jerome Glisse | 26 | * Jerome Glisse |
27 | */ | 27 | */ |
28 | #include <linux/seq_file.h> | 28 | #include <linux/seq_file.h> |
29 | #include <linux/slab.h> | ||
29 | #include "drmP.h" | 30 | #include "drmP.h" |
30 | #include "drm.h" | 31 | #include "drm.h" |
31 | #include "radeon_reg.h" | 32 | #include "radeon_reg.h" |
32 | #include "radeon.h" | 33 | #include "radeon.h" |
34 | #include "radeon_asic.h" | ||
33 | #include "radeon_drm.h" | 35 | #include "radeon_drm.h" |
34 | #include "r100_track.h" | 36 | #include "r100_track.h" |
35 | #include "r300d.h" | 37 | #include "r300d.h" |
@@ -164,9 +166,9 @@ void rv370_pcie_gart_disable(struct radeon_device *rdev) | |||
164 | 166 | ||
165 | void rv370_pcie_gart_fini(struct radeon_device *rdev) | 167 | void rv370_pcie_gart_fini(struct radeon_device *rdev) |
166 | { | 168 | { |
169 | radeon_gart_fini(rdev); | ||
167 | rv370_pcie_gart_disable(rdev); | 170 | rv370_pcie_gart_disable(rdev); |
168 | radeon_gart_table_vram_free(rdev); | 171 | radeon_gart_table_vram_free(rdev); |
169 | radeon_gart_fini(rdev); | ||
170 | } | 172 | } |
171 | 173 | ||
172 | void r300_fence_ring_emit(struct radeon_device *rdev, | 174 | void r300_fence_ring_emit(struct radeon_device *rdev, |
@@ -323,11 +325,12 @@ void r300_gpu_init(struct radeon_device *rdev) | |||
323 | 325 | ||
324 | r100_hdp_reset(rdev); | 326 | r100_hdp_reset(rdev); |
325 | /* FIXME: rv380 one pipes ? */ | 327 | /* FIXME: rv380 one pipes ? */ |
326 | if ((rdev->family == CHIP_R300) || (rdev->family == CHIP_R350)) { | 328 | if ((rdev->family == CHIP_R300 && rdev->pdev->device != 0x4144) || |
329 | (rdev->family == CHIP_R350)) { | ||
327 | /* r300,r350 */ | 330 | /* r300,r350 */ |
328 | rdev->num_gb_pipes = 2; | 331 | rdev->num_gb_pipes = 2; |
329 | } else { | 332 | } else { |
330 | /* rv350,rv370,rv380 */ | 333 | /* rv350,rv370,rv380,r300 AD */ |
331 | rdev->num_gb_pipes = 1; | 334 | rdev->num_gb_pipes = 1; |
332 | } | 335 | } |
333 | rdev->num_z_pipes = 1; | 336 | rdev->num_z_pipes = 1; |
@@ -481,6 +484,7 @@ void r300_mc_init(struct radeon_device *rdev) | |||
481 | radeon_vram_location(rdev, &rdev->mc, base); | 484 | radeon_vram_location(rdev, &rdev->mc, base); |
482 | if (!(rdev->flags & RADEON_IS_AGP)) | 485 | if (!(rdev->flags & RADEON_IS_AGP)) |
483 | radeon_gtt_location(rdev, &rdev->mc); | 486 | radeon_gtt_location(rdev, &rdev->mc); |
487 | radeon_update_bandwidth_info(rdev); | ||
484 | } | 488 | } |
485 | 489 | ||
486 | void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes) | 490 | void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes) |
@@ -1334,6 +1338,7 @@ int r300_suspend(struct radeon_device *rdev) | |||
1334 | 1338 | ||
1335 | void r300_fini(struct radeon_device *rdev) | 1339 | void r300_fini(struct radeon_device *rdev) |
1336 | { | 1340 | { |
1341 | radeon_pm_fini(rdev); | ||
1337 | r100_cp_fini(rdev); | 1342 | r100_cp_fini(rdev); |
1338 | r100_wb_fini(rdev); | 1343 | r100_wb_fini(rdev); |
1339 | r100_ib_fini(rdev); | 1344 | r100_ib_fini(rdev); |
diff --git a/drivers/gpu/drm/radeon/r420.c b/drivers/gpu/drm/radeon/r420.c index c7593b8f58ee..3dc968c9f5a4 100644 --- a/drivers/gpu/drm/radeon/r420.c +++ b/drivers/gpu/drm/radeon/r420.c | |||
@@ -26,9 +26,11 @@ | |||
26 | * Jerome Glisse | 26 | * Jerome Glisse |
27 | */ | 27 | */ |
28 | #include <linux/seq_file.h> | 28 | #include <linux/seq_file.h> |
29 | #include <linux/slab.h> | ||
29 | #include "drmP.h" | 30 | #include "drmP.h" |
30 | #include "radeon_reg.h" | 31 | #include "radeon_reg.h" |
31 | #include "radeon.h" | 32 | #include "radeon.h" |
33 | #include "radeon_asic.h" | ||
32 | #include "atom.h" | 34 | #include "atom.h" |
33 | #include "r100d.h" | 35 | #include "r100d.h" |
34 | #include "r420d.h" | 36 | #include "r420d.h" |
@@ -266,6 +268,7 @@ int r420_suspend(struct radeon_device *rdev) | |||
266 | 268 | ||
267 | void r420_fini(struct radeon_device *rdev) | 269 | void r420_fini(struct radeon_device *rdev) |
268 | { | 270 | { |
271 | radeon_pm_fini(rdev); | ||
269 | r100_cp_fini(rdev); | 272 | r100_cp_fini(rdev); |
270 | r100_wb_fini(rdev); | 273 | r100_wb_fini(rdev); |
271 | r100_ib_fini(rdev); | 274 | r100_ib_fini(rdev); |
diff --git a/drivers/gpu/drm/radeon/r520.c b/drivers/gpu/drm/radeon/r520.c index 2b8a5dd13516..3c44b8d39318 100644 --- a/drivers/gpu/drm/radeon/r520.c +++ b/drivers/gpu/drm/radeon/r520.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | #include "drmP.h" | 28 | #include "drmP.h" |
29 | #include "radeon.h" | 29 | #include "radeon.h" |
30 | #include "radeon_asic.h" | ||
30 | #include "atom.h" | 31 | #include "atom.h" |
31 | #include "r520d.h" | 32 | #include "r520d.h" |
32 | 33 | ||
@@ -121,19 +122,13 @@ static void r520_vram_get_type(struct radeon_device *rdev) | |||
121 | 122 | ||
122 | void r520_mc_init(struct radeon_device *rdev) | 123 | void r520_mc_init(struct radeon_device *rdev) |
123 | { | 124 | { |
124 | fixed20_12 a; | ||
125 | 125 | ||
126 | r520_vram_get_type(rdev); | 126 | r520_vram_get_type(rdev); |
127 | r100_vram_init_sizes(rdev); | 127 | r100_vram_init_sizes(rdev); |
128 | radeon_vram_location(rdev, &rdev->mc, 0); | 128 | radeon_vram_location(rdev, &rdev->mc, 0); |
129 | if (!(rdev->flags & RADEON_IS_AGP)) | 129 | if (!(rdev->flags & RADEON_IS_AGP)) |
130 | radeon_gtt_location(rdev, &rdev->mc); | 130 | radeon_gtt_location(rdev, &rdev->mc); |
131 | /* FIXME: we should enforce default clock in case GPU is not in | 131 | radeon_update_bandwidth_info(rdev); |
132 | * default setup | ||
133 | */ | ||
134 | a.full = rfixed_const(100); | ||
135 | rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk); | ||
136 | rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); | ||
137 | } | 132 | } |
138 | 133 | ||
139 | void r520_mc_program(struct radeon_device *rdev) | 134 | void r520_mc_program(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index c52290197292..8f3454e2056a 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -25,12 +25,14 @@ | |||
25 | * Alex Deucher | 25 | * Alex Deucher |
26 | * Jerome Glisse | 26 | * Jerome Glisse |
27 | */ | 27 | */ |
28 | #include <linux/slab.h> | ||
28 | #include <linux/seq_file.h> | 29 | #include <linux/seq_file.h> |
29 | #include <linux/firmware.h> | 30 | #include <linux/firmware.h> |
30 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
31 | #include "drmP.h" | 32 | #include "drmP.h" |
32 | #include "radeon_drm.h" | 33 | #include "radeon_drm.h" |
33 | #include "radeon.h" | 34 | #include "radeon.h" |
35 | #include "radeon_asic.h" | ||
34 | #include "radeon_mode.h" | 36 | #include "radeon_mode.h" |
35 | #include "r600d.h" | 37 | #include "r600d.h" |
36 | #include "atom.h" | 38 | #include "atom.h" |
@@ -491,9 +493,9 @@ void r600_pcie_gart_disable(struct radeon_device *rdev) | |||
491 | 493 | ||
492 | void r600_pcie_gart_fini(struct radeon_device *rdev) | 494 | void r600_pcie_gart_fini(struct radeon_device *rdev) |
493 | { | 495 | { |
496 | radeon_gart_fini(rdev); | ||
494 | r600_pcie_gart_disable(rdev); | 497 | r600_pcie_gart_disable(rdev); |
495 | radeon_gart_table_vram_free(rdev); | 498 | radeon_gart_table_vram_free(rdev); |
496 | radeon_gart_fini(rdev); | ||
497 | } | 499 | } |
498 | 500 | ||
499 | void r600_agp_enable(struct radeon_device *rdev) | 501 | void r600_agp_enable(struct radeon_device *rdev) |
@@ -675,7 +677,6 @@ void r600_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc) | |||
675 | 677 | ||
676 | int r600_mc_init(struct radeon_device *rdev) | 678 | int r600_mc_init(struct radeon_device *rdev) |
677 | { | 679 | { |
678 | fixed20_12 a; | ||
679 | u32 tmp; | 680 | u32 tmp; |
680 | int chansize, numchan; | 681 | int chansize, numchan; |
681 | 682 | ||
@@ -719,14 +720,10 @@ int r600_mc_init(struct radeon_device *rdev) | |||
719 | rdev->mc.real_vram_size = rdev->mc.aper_size; | 720 | rdev->mc.real_vram_size = rdev->mc.aper_size; |
720 | } | 721 | } |
721 | r600_vram_gtt_location(rdev, &rdev->mc); | 722 | r600_vram_gtt_location(rdev, &rdev->mc); |
722 | /* FIXME: we should enforce default clock in case GPU is not in | 723 | |
723 | * default setup | ||
724 | */ | ||
725 | a.full = rfixed_const(100); | ||
726 | rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk); | ||
727 | rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); | ||
728 | if (rdev->flags & RADEON_IS_IGP) | 724 | if (rdev->flags & RADEON_IS_IGP) |
729 | rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); | 725 | rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); |
726 | radeon_update_bandwidth_info(rdev); | ||
730 | return 0; | 727 | return 0; |
731 | } | 728 | } |
732 | 729 | ||
@@ -1132,6 +1129,7 @@ void r600_gpu_init(struct radeon_device *rdev) | |||
1132 | /* Setup pipes */ | 1129 | /* Setup pipes */ |
1133 | WREG32(CC_RB_BACKEND_DISABLE, cc_rb_backend_disable); | 1130 | WREG32(CC_RB_BACKEND_DISABLE, cc_rb_backend_disable); |
1134 | WREG32(CC_GC_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); | 1131 | WREG32(CC_GC_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); |
1132 | WREG32(GC_USER_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); | ||
1135 | 1133 | ||
1136 | tmp = R6XX_MAX_PIPES - r600_count_pipe_bits((cc_gc_shader_pipe_config & INACTIVE_QD_PIPES_MASK) >> 8); | 1134 | tmp = R6XX_MAX_PIPES - r600_count_pipe_bits((cc_gc_shader_pipe_config & INACTIVE_QD_PIPES_MASK) >> 8); |
1137 | WREG32(VGT_OUT_DEALLOC_CNTL, (tmp * 4) & DEALLOC_DIST_MASK); | 1135 | WREG32(VGT_OUT_DEALLOC_CNTL, (tmp * 4) & DEALLOC_DIST_MASK); |
@@ -2119,6 +2117,7 @@ int r600_init(struct radeon_device *rdev) | |||
2119 | 2117 | ||
2120 | void r600_fini(struct radeon_device *rdev) | 2118 | void r600_fini(struct radeon_device *rdev) |
2121 | { | 2119 | { |
2120 | radeon_pm_fini(rdev); | ||
2122 | r600_audio_fini(rdev); | 2121 | r600_audio_fini(rdev); |
2123 | r600_blit_fini(rdev); | 2122 | r600_blit_fini(rdev); |
2124 | r600_cp_fini(rdev); | 2123 | r600_cp_fini(rdev); |
@@ -2398,19 +2397,19 @@ static void r600_disable_interrupt_state(struct radeon_device *rdev) | |||
2398 | WREG32(DC_HPD4_INT_CONTROL, tmp); | 2397 | WREG32(DC_HPD4_INT_CONTROL, tmp); |
2399 | if (ASIC_IS_DCE32(rdev)) { | 2398 | if (ASIC_IS_DCE32(rdev)) { |
2400 | tmp = RREG32(DC_HPD5_INT_CONTROL) & DC_HPDx_INT_POLARITY; | 2399 | tmp = RREG32(DC_HPD5_INT_CONTROL) & DC_HPDx_INT_POLARITY; |
2401 | WREG32(DC_HPD5_INT_CONTROL, 0); | 2400 | WREG32(DC_HPD5_INT_CONTROL, tmp); |
2402 | tmp = RREG32(DC_HPD6_INT_CONTROL) & DC_HPDx_INT_POLARITY; | 2401 | tmp = RREG32(DC_HPD6_INT_CONTROL) & DC_HPDx_INT_POLARITY; |
2403 | WREG32(DC_HPD6_INT_CONTROL, 0); | 2402 | WREG32(DC_HPD6_INT_CONTROL, tmp); |
2404 | } | 2403 | } |
2405 | } else { | 2404 | } else { |
2406 | WREG32(DACA_AUTODETECT_INT_CONTROL, 0); | 2405 | WREG32(DACA_AUTODETECT_INT_CONTROL, 0); |
2407 | WREG32(DACB_AUTODETECT_INT_CONTROL, 0); | 2406 | WREG32(DACB_AUTODETECT_INT_CONTROL, 0); |
2408 | tmp = RREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; | 2407 | tmp = RREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; |
2409 | WREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL, 0); | 2408 | WREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL, tmp); |
2410 | tmp = RREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; | 2409 | tmp = RREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; |
2411 | WREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL, 0); | 2410 | WREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL, tmp); |
2412 | tmp = RREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; | 2411 | tmp = RREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL) & DC_HOT_PLUG_DETECTx_INT_POLARITY; |
2413 | WREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL, 0); | 2412 | WREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL, tmp); |
2414 | } | 2413 | } |
2415 | } | 2414 | } |
2416 | 2415 | ||
@@ -2765,6 +2764,7 @@ restart_ih: | |||
2765 | case 0: /* D1 vblank */ | 2764 | case 0: /* D1 vblank */ |
2766 | if (disp_int & LB_D1_VBLANK_INTERRUPT) { | 2765 | if (disp_int & LB_D1_VBLANK_INTERRUPT) { |
2767 | drm_handle_vblank(rdev->ddev, 0); | 2766 | drm_handle_vblank(rdev->ddev, 0); |
2767 | rdev->pm.vblank_sync = true; | ||
2768 | wake_up(&rdev->irq.vblank_queue); | 2768 | wake_up(&rdev->irq.vblank_queue); |
2769 | disp_int &= ~LB_D1_VBLANK_INTERRUPT; | 2769 | disp_int &= ~LB_D1_VBLANK_INTERRUPT; |
2770 | DRM_DEBUG("IH: D1 vblank\n"); | 2770 | DRM_DEBUG("IH: D1 vblank\n"); |
@@ -2786,6 +2786,7 @@ restart_ih: | |||
2786 | case 0: /* D2 vblank */ | 2786 | case 0: /* D2 vblank */ |
2787 | if (disp_int & LB_D2_VBLANK_INTERRUPT) { | 2787 | if (disp_int & LB_D2_VBLANK_INTERRUPT) { |
2788 | drm_handle_vblank(rdev->ddev, 1); | 2788 | drm_handle_vblank(rdev->ddev, 1); |
2789 | rdev->pm.vblank_sync = true; | ||
2789 | wake_up(&rdev->irq.vblank_queue); | 2790 | wake_up(&rdev->irq.vblank_queue); |
2790 | disp_int &= ~LB_D2_VBLANK_INTERRUPT; | 2791 | disp_int &= ~LB_D2_VBLANK_INTERRUPT; |
2791 | DRM_DEBUG("IH: D2 vblank\n"); | 2792 | DRM_DEBUG("IH: D2 vblank\n"); |
@@ -2834,14 +2835,14 @@ restart_ih: | |||
2834 | break; | 2835 | break; |
2835 | case 10: | 2836 | case 10: |
2836 | if (disp_int_cont2 & DC_HPD5_INTERRUPT) { | 2837 | if (disp_int_cont2 & DC_HPD5_INTERRUPT) { |
2837 | disp_int_cont &= ~DC_HPD5_INTERRUPT; | 2838 | disp_int_cont2 &= ~DC_HPD5_INTERRUPT; |
2838 | queue_hotplug = true; | 2839 | queue_hotplug = true; |
2839 | DRM_DEBUG("IH: HPD5\n"); | 2840 | DRM_DEBUG("IH: HPD5\n"); |
2840 | } | 2841 | } |
2841 | break; | 2842 | break; |
2842 | case 12: | 2843 | case 12: |
2843 | if (disp_int_cont2 & DC_HPD6_INTERRUPT) { | 2844 | if (disp_int_cont2 & DC_HPD6_INTERRUPT) { |
2844 | disp_int_cont &= ~DC_HPD6_INTERRUPT; | 2845 | disp_int_cont2 &= ~DC_HPD6_INTERRUPT; |
2845 | queue_hotplug = true; | 2846 | queue_hotplug = true; |
2846 | DRM_DEBUG("IH: HPD6\n"); | 2847 | DRM_DEBUG("IH: HPD6\n"); |
2847 | } | 2848 | } |
diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c index db928016d034..dac7042b797e 100644 --- a/drivers/gpu/drm/radeon/r600_audio.c +++ b/drivers/gpu/drm/radeon/r600_audio.c | |||
@@ -182,41 +182,6 @@ int r600_audio_init(struct radeon_device *rdev) | |||
182 | } | 182 | } |
183 | 183 | ||
184 | /* | 184 | /* |
185 | * determin how the encoders and audio interface is wired together | ||
186 | */ | ||
187 | int r600_audio_tmds_index(struct drm_encoder *encoder) | ||
188 | { | ||
189 | struct drm_device *dev = encoder->dev; | ||
190 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | ||
191 | struct drm_encoder *other; | ||
192 | |||
193 | switch (radeon_encoder->encoder_id) { | ||
194 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: | ||
195 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: | ||
196 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: | ||
197 | return 0; | ||
198 | |||
199 | case ENCODER_OBJECT_ID_INTERNAL_LVTM1: | ||
200 | /* special case check if an TMDS1 is present */ | ||
201 | list_for_each_entry(other, &dev->mode_config.encoder_list, head) { | ||
202 | if (to_radeon_encoder(other)->encoder_id == | ||
203 | ENCODER_OBJECT_ID_INTERNAL_TMDS1) | ||
204 | return 1; | ||
205 | } | ||
206 | return 0; | ||
207 | |||
208 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: | ||
209 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: | ||
210 | return 1; | ||
211 | |||
212 | default: | ||
213 | DRM_ERROR("Unsupported encoder type 0x%02X\n", | ||
214 | radeon_encoder->encoder_id); | ||
215 | return -1; | ||
216 | } | ||
217 | } | ||
218 | |||
219 | /* | ||
220 | * atach the audio codec to the clock source of the encoder | 185 | * atach the audio codec to the clock source of the encoder |
221 | */ | 186 | */ |
222 | void r600_audio_set_clock(struct drm_encoder *encoder, int clock) | 187 | void r600_audio_set_clock(struct drm_encoder *encoder, int clock) |
@@ -224,6 +189,7 @@ void r600_audio_set_clock(struct drm_encoder *encoder, int clock) | |||
224 | struct drm_device *dev = encoder->dev; | 189 | struct drm_device *dev = encoder->dev; |
225 | struct radeon_device *rdev = dev->dev_private; | 190 | struct radeon_device *rdev = dev->dev_private; |
226 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | 191 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
192 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; | ||
227 | int base_rate = 48000; | 193 | int base_rate = 48000; |
228 | 194 | ||
229 | switch (radeon_encoder->encoder_id) { | 195 | switch (radeon_encoder->encoder_id) { |
@@ -231,32 +197,34 @@ void r600_audio_set_clock(struct drm_encoder *encoder, int clock) | |||
231 | case ENCODER_OBJECT_ID_INTERNAL_LVTM1: | 197 | case ENCODER_OBJECT_ID_INTERNAL_LVTM1: |
232 | WREG32_P(R600_AUDIO_TIMING, 0, ~0x301); | 198 | WREG32_P(R600_AUDIO_TIMING, 0, ~0x301); |
233 | break; | 199 | break; |
234 | |||
235 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: | 200 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: |
236 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: | 201 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: |
237 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: | 202 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: |
238 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: | 203 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: |
239 | WREG32_P(R600_AUDIO_TIMING, 0x100, ~0x301); | 204 | WREG32_P(R600_AUDIO_TIMING, 0x100, ~0x301); |
240 | break; | 205 | break; |
241 | |||
242 | default: | 206 | default: |
243 | DRM_ERROR("Unsupported encoder type 0x%02X\n", | 207 | DRM_ERROR("Unsupported encoder type 0x%02X\n", |
244 | radeon_encoder->encoder_id); | 208 | radeon_encoder->encoder_id); |
245 | return; | 209 | return; |
246 | } | 210 | } |
247 | 211 | ||
248 | switch (r600_audio_tmds_index(encoder)) { | 212 | switch (dig->dig_encoder) { |
249 | case 0: | 213 | case 0: |
250 | WREG32(R600_AUDIO_PLL1_MUL, base_rate*50); | 214 | WREG32(R600_AUDIO_PLL1_MUL, base_rate * 50); |
251 | WREG32(R600_AUDIO_PLL1_DIV, clock*100); | 215 | WREG32(R600_AUDIO_PLL1_DIV, clock * 100); |
252 | WREG32(R600_AUDIO_CLK_SRCSEL, 0); | 216 | WREG32(R600_AUDIO_CLK_SRCSEL, 0); |
253 | break; | 217 | break; |
254 | 218 | ||
255 | case 1: | 219 | case 1: |
256 | WREG32(R600_AUDIO_PLL2_MUL, base_rate*50); | 220 | WREG32(R600_AUDIO_PLL2_MUL, base_rate * 50); |
257 | WREG32(R600_AUDIO_PLL2_DIV, clock*100); | 221 | WREG32(R600_AUDIO_PLL2_DIV, clock * 100); |
258 | WREG32(R600_AUDIO_CLK_SRCSEL, 1); | 222 | WREG32(R600_AUDIO_CLK_SRCSEL, 1); |
259 | break; | 223 | break; |
224 | default: | ||
225 | dev_err(rdev->dev, "Unsupported DIG on encoder 0x%02X\n", | ||
226 | radeon_encoder->encoder_id); | ||
227 | return; | ||
260 | } | 228 | } |
261 | } | 229 | } |
262 | 230 | ||
diff --git a/drivers/gpu/drm/radeon/r600_blit_shaders.c b/drivers/gpu/drm/radeon/r600_blit_shaders.c index a112c59f9d82..0271b53fa2dd 100644 --- a/drivers/gpu/drm/radeon/r600_blit_shaders.c +++ b/drivers/gpu/drm/radeon/r600_blit_shaders.c | |||
@@ -1,7 +1,42 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Advanced Micro Devices, Inc. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice (including the next | ||
12 | * paragraph) shall be included in all copies or substantial portions of the | ||
13 | * Software. | ||
14 | * | ||
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
18 | * THE COPYRIGHT HOLDER(S) AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
19 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
20 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
21 | * DEALINGS IN THE SOFTWARE. | ||
22 | * | ||
23 | * Authors: | ||
24 | * Alex Deucher <alexander.deucher@amd.com> | ||
25 | */ | ||
1 | 26 | ||
2 | #include <linux/types.h> | 27 | #include <linux/types.h> |
3 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
4 | 29 | ||
30 | /* | ||
31 | * R6xx+ cards need to use the 3D engine to blit data which requires | ||
32 | * quite a bit of hw state setup. Rather than pull the whole 3D driver | ||
33 | * (which normally generates the 3D state) into the DRM, we opt to use | ||
34 | * statically generated state tables. The regsiter state and shaders | ||
35 | * were hand generated to support blitting functionality. See the 3D | ||
36 | * driver or documentation for descriptions of the registers and | ||
37 | * shader instructions. | ||
38 | */ | ||
39 | |||
5 | const u32 r6xx_default_state[] = | 40 | const u32 r6xx_default_state[] = |
6 | { | 41 | { |
7 | 0xc0002400, | 42 | 0xc0002400, |
diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index 40416c068d9f..68e6f4349309 100644 --- a/drivers/gpu/drm/radeon/r600_cp.c +++ b/drivers/gpu/drm/radeon/r600_cp.c | |||
@@ -1548,10 +1548,13 @@ static void r700_gfx_init(struct drm_device *dev, | |||
1548 | 1548 | ||
1549 | RADEON_WRITE(R600_CC_RB_BACKEND_DISABLE, cc_rb_backend_disable); | 1549 | RADEON_WRITE(R600_CC_RB_BACKEND_DISABLE, cc_rb_backend_disable); |
1550 | RADEON_WRITE(R600_CC_GC_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); | 1550 | RADEON_WRITE(R600_CC_GC_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); |
1551 | RADEON_WRITE(R600_GC_USER_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); | ||
1551 | 1552 | ||
1552 | RADEON_WRITE(R700_CC_SYS_RB_BACKEND_DISABLE, cc_rb_backend_disable); | 1553 | RADEON_WRITE(R700_CC_SYS_RB_BACKEND_DISABLE, cc_rb_backend_disable); |
1553 | RADEON_WRITE(R700_CGTS_SYS_TCC_DISABLE, 0); | 1554 | RADEON_WRITE(R700_CGTS_SYS_TCC_DISABLE, 0); |
1554 | RADEON_WRITE(R700_CGTS_TCC_DISABLE, 0); | 1555 | RADEON_WRITE(R700_CGTS_TCC_DISABLE, 0); |
1556 | RADEON_WRITE(R700_CGTS_USER_SYS_TCC_DISABLE, 0); | ||
1557 | RADEON_WRITE(R700_CGTS_USER_TCC_DISABLE, 0); | ||
1555 | 1558 | ||
1556 | num_qd_pipes = | 1559 | num_qd_pipes = |
1557 | R7XX_MAX_PIPES - r600_count_pipe_bits((cc_gc_shader_pipe_config & R600_INACTIVE_QD_PIPES_MASK) >> 8); | 1560 | R7XX_MAX_PIPES - r600_count_pipe_bits((cc_gc_shader_pipe_config & R600_INACTIVE_QD_PIPES_MASK) >> 8); |
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index cd2c63bce501..c39c1bc13016 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c | |||
@@ -45,6 +45,7 @@ struct r600_cs_track { | |||
45 | u32 nbanks; | 45 | u32 nbanks; |
46 | u32 npipes; | 46 | u32 npipes; |
47 | /* value we track */ | 47 | /* value we track */ |
48 | u32 sq_config; | ||
48 | u32 nsamples; | 49 | u32 nsamples; |
49 | u32 cb_color_base_last[8]; | 50 | u32 cb_color_base_last[8]; |
50 | struct radeon_bo *cb_color_bo[8]; | 51 | struct radeon_bo *cb_color_bo[8]; |
@@ -141,6 +142,8 @@ static void r600_cs_track_init(struct r600_cs_track *track) | |||
141 | { | 142 | { |
142 | int i; | 143 | int i; |
143 | 144 | ||
145 | /* assume DX9 mode */ | ||
146 | track->sq_config = DX9_CONSTS; | ||
144 | for (i = 0; i < 8; i++) { | 147 | for (i = 0; i < 8; i++) { |
145 | track->cb_color_base_last[i] = 0; | 148 | track->cb_color_base_last[i] = 0; |
146 | track->cb_color_size[i] = 0; | 149 | track->cb_color_size[i] = 0; |
@@ -715,6 +718,9 @@ static inline int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx | |||
715 | tmp =radeon_get_ib_value(p, idx); | 718 | tmp =radeon_get_ib_value(p, idx); |
716 | ib[idx] = 0; | 719 | ib[idx] = 0; |
717 | break; | 720 | break; |
721 | case SQ_CONFIG: | ||
722 | track->sq_config = radeon_get_ib_value(p, idx); | ||
723 | break; | ||
718 | case R_028800_DB_DEPTH_CONTROL: | 724 | case R_028800_DB_DEPTH_CONTROL: |
719 | track->db_depth_control = radeon_get_ib_value(p, idx); | 725 | track->db_depth_control = radeon_get_ib_value(p, idx); |
720 | break; | 726 | break; |
@@ -869,6 +875,54 @@ static inline int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx | |||
869 | case SQ_PGM_START_VS: | 875 | case SQ_PGM_START_VS: |
870 | case SQ_PGM_START_GS: | 876 | case SQ_PGM_START_GS: |
871 | case SQ_PGM_START_PS: | 877 | case SQ_PGM_START_PS: |
878 | case SQ_ALU_CONST_CACHE_GS_0: | ||
879 | case SQ_ALU_CONST_CACHE_GS_1: | ||
880 | case SQ_ALU_CONST_CACHE_GS_2: | ||
881 | case SQ_ALU_CONST_CACHE_GS_3: | ||
882 | case SQ_ALU_CONST_CACHE_GS_4: | ||
883 | case SQ_ALU_CONST_CACHE_GS_5: | ||
884 | case SQ_ALU_CONST_CACHE_GS_6: | ||
885 | case SQ_ALU_CONST_CACHE_GS_7: | ||
886 | case SQ_ALU_CONST_CACHE_GS_8: | ||
887 | case SQ_ALU_CONST_CACHE_GS_9: | ||
888 | case SQ_ALU_CONST_CACHE_GS_10: | ||
889 | case SQ_ALU_CONST_CACHE_GS_11: | ||
890 | case SQ_ALU_CONST_CACHE_GS_12: | ||
891 | case SQ_ALU_CONST_CACHE_GS_13: | ||
892 | case SQ_ALU_CONST_CACHE_GS_14: | ||
893 | case SQ_ALU_CONST_CACHE_GS_15: | ||
894 | case SQ_ALU_CONST_CACHE_PS_0: | ||
895 | case SQ_ALU_CONST_CACHE_PS_1: | ||
896 | case SQ_ALU_CONST_CACHE_PS_2: | ||
897 | case SQ_ALU_CONST_CACHE_PS_3: | ||
898 | case SQ_ALU_CONST_CACHE_PS_4: | ||
899 | case SQ_ALU_CONST_CACHE_PS_5: | ||
900 | case SQ_ALU_CONST_CACHE_PS_6: | ||
901 | case SQ_ALU_CONST_CACHE_PS_7: | ||
902 | case SQ_ALU_CONST_CACHE_PS_8: | ||
903 | case SQ_ALU_CONST_CACHE_PS_9: | ||
904 | case SQ_ALU_CONST_CACHE_PS_10: | ||
905 | case SQ_ALU_CONST_CACHE_PS_11: | ||
906 | case SQ_ALU_CONST_CACHE_PS_12: | ||
907 | case SQ_ALU_CONST_CACHE_PS_13: | ||
908 | case SQ_ALU_CONST_CACHE_PS_14: | ||
909 | case SQ_ALU_CONST_CACHE_PS_15: | ||
910 | case SQ_ALU_CONST_CACHE_VS_0: | ||
911 | case SQ_ALU_CONST_CACHE_VS_1: | ||
912 | case SQ_ALU_CONST_CACHE_VS_2: | ||
913 | case SQ_ALU_CONST_CACHE_VS_3: | ||
914 | case SQ_ALU_CONST_CACHE_VS_4: | ||
915 | case SQ_ALU_CONST_CACHE_VS_5: | ||
916 | case SQ_ALU_CONST_CACHE_VS_6: | ||
917 | case SQ_ALU_CONST_CACHE_VS_7: | ||
918 | case SQ_ALU_CONST_CACHE_VS_8: | ||
919 | case SQ_ALU_CONST_CACHE_VS_9: | ||
920 | case SQ_ALU_CONST_CACHE_VS_10: | ||
921 | case SQ_ALU_CONST_CACHE_VS_11: | ||
922 | case SQ_ALU_CONST_CACHE_VS_12: | ||
923 | case SQ_ALU_CONST_CACHE_VS_13: | ||
924 | case SQ_ALU_CONST_CACHE_VS_14: | ||
925 | case SQ_ALU_CONST_CACHE_VS_15: | ||
872 | r = r600_cs_packet_next_reloc(p, &reloc); | 926 | r = r600_cs_packet_next_reloc(p, &reloc); |
873 | if (r) { | 927 | if (r) { |
874 | dev_warn(p->dev, "bad SET_CONTEXT_REG " | 928 | dev_warn(p->dev, "bad SET_CONTEXT_REG " |
@@ -1226,13 +1280,15 @@ static int r600_packet3_check(struct radeon_cs_parser *p, | |||
1226 | } | 1280 | } |
1227 | break; | 1281 | break; |
1228 | case PACKET3_SET_ALU_CONST: | 1282 | case PACKET3_SET_ALU_CONST: |
1229 | start_reg = (idx_value << 2) + PACKET3_SET_ALU_CONST_OFFSET; | 1283 | if (track->sq_config & DX9_CONSTS) { |
1230 | end_reg = 4 * pkt->count + start_reg - 4; | 1284 | start_reg = (idx_value << 2) + PACKET3_SET_ALU_CONST_OFFSET; |
1231 | if ((start_reg < PACKET3_SET_ALU_CONST_OFFSET) || | 1285 | end_reg = 4 * pkt->count + start_reg - 4; |
1232 | (start_reg >= PACKET3_SET_ALU_CONST_END) || | 1286 | if ((start_reg < PACKET3_SET_ALU_CONST_OFFSET) || |
1233 | (end_reg >= PACKET3_SET_ALU_CONST_END)) { | 1287 | (start_reg >= PACKET3_SET_ALU_CONST_END) || |
1234 | DRM_ERROR("bad SET_ALU_CONST\n"); | 1288 | (end_reg >= PACKET3_SET_ALU_CONST_END)) { |
1235 | return -EINVAL; | 1289 | DRM_ERROR("bad SET_ALU_CONST\n"); |
1290 | return -EINVAL; | ||
1291 | } | ||
1236 | } | 1292 | } |
1237 | break; | 1293 | break; |
1238 | case PACKET3_SET_BOOL_CONST: | 1294 | case PACKET3_SET_BOOL_CONST: |
diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index fcc949df0e5d..029fa1406d1d 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c | |||
@@ -42,13 +42,13 @@ enum r600_hdmi_color_format { | |||
42 | */ | 42 | */ |
43 | enum r600_hdmi_iec_status_bits { | 43 | enum r600_hdmi_iec_status_bits { |
44 | AUDIO_STATUS_DIG_ENABLE = 0x01, | 44 | AUDIO_STATUS_DIG_ENABLE = 0x01, |
45 | AUDIO_STATUS_V = 0x02, | 45 | AUDIO_STATUS_V = 0x02, |
46 | AUDIO_STATUS_VCFG = 0x04, | 46 | AUDIO_STATUS_VCFG = 0x04, |
47 | AUDIO_STATUS_EMPHASIS = 0x08, | 47 | AUDIO_STATUS_EMPHASIS = 0x08, |
48 | AUDIO_STATUS_COPYRIGHT = 0x10, | 48 | AUDIO_STATUS_COPYRIGHT = 0x10, |
49 | AUDIO_STATUS_NONAUDIO = 0x20, | 49 | AUDIO_STATUS_NONAUDIO = 0x20, |
50 | AUDIO_STATUS_PROFESSIONAL = 0x40, | 50 | AUDIO_STATUS_PROFESSIONAL = 0x40, |
51 | AUDIO_STATUS_LEVEL = 0x80 | 51 | AUDIO_STATUS_LEVEL = 0x80 |
52 | }; | 52 | }; |
53 | 53 | ||
54 | struct { | 54 | struct { |
@@ -85,7 +85,7 @@ struct { | |||
85 | static void r600_hdmi_calc_CTS(uint32_t clock, int *CTS, int N, int freq) | 85 | static void r600_hdmi_calc_CTS(uint32_t clock, int *CTS, int N, int freq) |
86 | { | 86 | { |
87 | if (*CTS == 0) | 87 | if (*CTS == 0) |
88 | *CTS = clock*N/(128*freq)*1000; | 88 | *CTS = clock * N / (128 * freq) * 1000; |
89 | DRM_DEBUG("Using ACR timing N=%d CTS=%d for frequency %d\n", | 89 | DRM_DEBUG("Using ACR timing N=%d CTS=%d for frequency %d\n", |
90 | N, *CTS, freq); | 90 | N, *CTS, freq); |
91 | } | 91 | } |
@@ -131,11 +131,11 @@ static void r600_hdmi_infoframe_checksum(uint8_t packetType, | |||
131 | uint8_t length, | 131 | uint8_t length, |
132 | uint8_t *frame) | 132 | uint8_t *frame) |
133 | { | 133 | { |
134 | int i; | 134 | int i; |
135 | frame[0] = packetType + versionNumber + length; | 135 | frame[0] = packetType + versionNumber + length; |
136 | for (i = 1; i <= length; i++) | 136 | for (i = 1; i <= length; i++) |
137 | frame[0] += frame[i]; | 137 | frame[0] += frame[i]; |
138 | frame[0] = 0x100 - frame[0]; | 138 | frame[0] = 0x100 - frame[0]; |
139 | } | 139 | } |
140 | 140 | ||
141 | /* | 141 | /* |
@@ -417,90 +417,141 @@ void r600_hdmi_update_audio_settings(struct drm_encoder *encoder, | |||
417 | WREG32_P(offset+R600_HDMI_CNTL, 0x04000000, ~0x04000000); | 417 | WREG32_P(offset+R600_HDMI_CNTL, 0x04000000, ~0x04000000); |
418 | } | 418 | } |
419 | 419 | ||
420 | /* | 420 | static int r600_hdmi_find_free_block(struct drm_device *dev) |
421 | * enable/disable the HDMI engine | 421 | { |
422 | */ | 422 | struct radeon_device *rdev = dev->dev_private; |
423 | void r600_hdmi_enable(struct drm_encoder *encoder, int enable) | 423 | struct drm_encoder *encoder; |
424 | struct radeon_encoder *radeon_encoder; | ||
425 | bool free_blocks[3] = { true, true, true }; | ||
426 | |||
427 | list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { | ||
428 | radeon_encoder = to_radeon_encoder(encoder); | ||
429 | switch (radeon_encoder->hdmi_offset) { | ||
430 | case R600_HDMI_BLOCK1: | ||
431 | free_blocks[0] = false; | ||
432 | break; | ||
433 | case R600_HDMI_BLOCK2: | ||
434 | free_blocks[1] = false; | ||
435 | break; | ||
436 | case R600_HDMI_BLOCK3: | ||
437 | free_blocks[2] = false; | ||
438 | break; | ||
439 | } | ||
440 | } | ||
441 | |||
442 | if (rdev->family == CHIP_RS600 || rdev->family == CHIP_RS690) { | ||
443 | return free_blocks[0] ? R600_HDMI_BLOCK1 : 0; | ||
444 | } else if (rdev->family >= CHIP_R600) { | ||
445 | if (free_blocks[0]) | ||
446 | return R600_HDMI_BLOCK1; | ||
447 | else if (free_blocks[1]) | ||
448 | return R600_HDMI_BLOCK2; | ||
449 | } | ||
450 | return 0; | ||
451 | } | ||
452 | |||
453 | static void r600_hdmi_assign_block(struct drm_encoder *encoder) | ||
424 | { | 454 | { |
425 | struct drm_device *dev = encoder->dev; | 455 | struct drm_device *dev = encoder->dev; |
426 | struct radeon_device *rdev = dev->dev_private; | 456 | struct radeon_device *rdev = dev->dev_private; |
427 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | 457 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
428 | uint32_t offset = to_radeon_encoder(encoder)->hdmi_offset; | 458 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; |
429 | 459 | ||
430 | if (!offset) | 460 | if (!dig) { |
461 | dev_err(rdev->dev, "Enabling HDMI on non-dig encoder\n"); | ||
431 | return; | 462 | return; |
463 | } | ||
432 | 464 | ||
433 | DRM_DEBUG("%s HDMI interface @ 0x%04X\n", enable ? "Enabling" : "Disabling", offset); | 465 | if (ASIC_IS_DCE4(rdev)) { |
434 | 466 | /* TODO */ | |
435 | /* some version of atombios ignore the enable HDMI flag | 467 | } else if (ASIC_IS_DCE3(rdev)) { |
436 | * so enabling/disabling HDMI was moved here for TMDS1+2 */ | 468 | radeon_encoder->hdmi_offset = dig->dig_encoder ? |
437 | switch (radeon_encoder->encoder_id) { | 469 | R600_HDMI_BLOCK3 : R600_HDMI_BLOCK1; |
438 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: | 470 | if (ASIC_IS_DCE32(rdev)) |
439 | WREG32_P(AVIVO_TMDSA_CNTL, enable ? 0x4 : 0x0, ~0x4); | 471 | radeon_encoder->hdmi_config_offset = dig->dig_encoder ? |
440 | WREG32(offset+R600_HDMI_ENABLE, enable ? 0x101 : 0x0); | 472 | R600_HDMI_CONFIG2 : R600_HDMI_CONFIG1; |
441 | break; | 473 | } else if (rdev->family >= CHIP_R600) { |
442 | 474 | radeon_encoder->hdmi_offset = r600_hdmi_find_free_block(dev); | |
443 | case ENCODER_OBJECT_ID_INTERNAL_LVTM1: | ||
444 | WREG32_P(AVIVO_LVTMA_CNTL, enable ? 0x4 : 0x0, ~0x4); | ||
445 | WREG32(offset+R600_HDMI_ENABLE, enable ? 0x105 : 0x0); | ||
446 | break; | ||
447 | |||
448 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: | ||
449 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: | ||
450 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: | ||
451 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: | ||
452 | /* This part is doubtfull in my opinion */ | ||
453 | WREG32(offset+R600_HDMI_ENABLE, enable ? 0x110 : 0x0); | ||
454 | break; | ||
455 | |||
456 | default: | ||
457 | DRM_ERROR("unknown HDMI output type\n"); | ||
458 | break; | ||
459 | } | 475 | } |
460 | } | 476 | } |
461 | 477 | ||
462 | /* | 478 | /* |
463 | * determin at which register offset the HDMI encoder is | 479 | * enable the HDMI engine |
464 | */ | 480 | */ |
465 | void r600_hdmi_init(struct drm_encoder *encoder) | 481 | void r600_hdmi_enable(struct drm_encoder *encoder) |
466 | { | 482 | { |
483 | struct drm_device *dev = encoder->dev; | ||
484 | struct radeon_device *rdev = dev->dev_private; | ||
467 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | 485 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
468 | 486 | ||
469 | switch (radeon_encoder->encoder_id) { | 487 | if (!radeon_encoder->hdmi_offset) { |
470 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: | 488 | r600_hdmi_assign_block(encoder); |
471 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: | 489 | if (!radeon_encoder->hdmi_offset) { |
472 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: | 490 | dev_warn(rdev->dev, "Could not find HDMI block for " |
473 | radeon_encoder->hdmi_offset = R600_HDMI_TMDS1; | 491 | "0x%x encoder\n", radeon_encoder->encoder_id); |
474 | break; | 492 | return; |
475 | 493 | } | |
476 | case ENCODER_OBJECT_ID_INTERNAL_LVTM1: | 494 | } |
477 | switch (r600_audio_tmds_index(encoder)) { | 495 | |
478 | case 0: | 496 | if (ASIC_IS_DCE32(rdev) && !ASIC_IS_DCE4(rdev)) { |
479 | radeon_encoder->hdmi_offset = R600_HDMI_TMDS1; | 497 | WREG32_P(radeon_encoder->hdmi_config_offset + 0x4, 0x1, ~0x1); |
498 | } else if (rdev->family >= CHIP_R600 && !ASIC_IS_DCE3(rdev)) { | ||
499 | int offset = radeon_encoder->hdmi_offset; | ||
500 | switch (radeon_encoder->encoder_id) { | ||
501 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: | ||
502 | WREG32_P(AVIVO_TMDSA_CNTL, 0x4, ~0x4); | ||
503 | WREG32(offset + R600_HDMI_ENABLE, 0x101); | ||
480 | break; | 504 | break; |
481 | case 1: | 505 | case ENCODER_OBJECT_ID_INTERNAL_LVTM1: |
482 | radeon_encoder->hdmi_offset = R600_HDMI_TMDS2; | 506 | WREG32_P(AVIVO_LVTMA_CNTL, 0x4, ~0x4); |
507 | WREG32(offset + R600_HDMI_ENABLE, 0x105); | ||
483 | break; | 508 | break; |
484 | default: | 509 | default: |
485 | radeon_encoder->hdmi_offset = 0; | 510 | dev_err(rdev->dev, "Unknown HDMI output type\n"); |
486 | break; | 511 | break; |
487 | } | 512 | } |
488 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: | 513 | } |
489 | radeon_encoder->hdmi_offset = R600_HDMI_TMDS2; | ||
490 | break; | ||
491 | 514 | ||
492 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: | 515 | DRM_DEBUG("Enabling HDMI interface @ 0x%04X for encoder 0x%x\n", |
493 | radeon_encoder->hdmi_offset = R600_HDMI_DIG; | 516 | radeon_encoder->hdmi_offset, radeon_encoder->encoder_id); |
494 | break; | 517 | } |
495 | 518 | ||
496 | default: | 519 | /* |
497 | radeon_encoder->hdmi_offset = 0; | 520 | * disable the HDMI engine |
498 | break; | 521 | */ |
522 | void r600_hdmi_disable(struct drm_encoder *encoder) | ||
523 | { | ||
524 | struct drm_device *dev = encoder->dev; | ||
525 | struct radeon_device *rdev = dev->dev_private; | ||
526 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | ||
527 | |||
528 | if (!radeon_encoder->hdmi_offset) { | ||
529 | dev_err(rdev->dev, "Disabling not enabled HDMI\n"); | ||
530 | return; | ||
499 | } | 531 | } |
500 | 532 | ||
501 | DRM_DEBUG("using HDMI engine at offset 0x%04X for encoder 0x%x\n", | 533 | DRM_DEBUG("Disabling HDMI interface @ 0x%04X for encoder 0x%x\n", |
502 | radeon_encoder->hdmi_offset, radeon_encoder->encoder_id); | 534 | radeon_encoder->hdmi_offset, radeon_encoder->encoder_id); |
535 | |||
536 | if (ASIC_IS_DCE32(rdev) && !ASIC_IS_DCE4(rdev)) { | ||
537 | WREG32_P(radeon_encoder->hdmi_config_offset + 0x4, 0, ~0x1); | ||
538 | } else if (rdev->family >= CHIP_R600 && !ASIC_IS_DCE3(rdev)) { | ||
539 | int offset = radeon_encoder->hdmi_offset; | ||
540 | switch (radeon_encoder->encoder_id) { | ||
541 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: | ||
542 | WREG32_P(AVIVO_TMDSA_CNTL, 0, ~0x4); | ||
543 | WREG32(offset + R600_HDMI_ENABLE, 0); | ||
544 | break; | ||
545 | case ENCODER_OBJECT_ID_INTERNAL_LVTM1: | ||
546 | WREG32_P(AVIVO_LVTMA_CNTL, 0, ~0x4); | ||
547 | WREG32(offset + R600_HDMI_ENABLE, 0); | ||
548 | break; | ||
549 | default: | ||
550 | dev_err(rdev->dev, "Unknown HDMI output type\n"); | ||
551 | break; | ||
552 | } | ||
553 | } | ||
503 | 554 | ||
504 | /* TODO: make this configureable */ | 555 | radeon_encoder->hdmi_offset = 0; |
505 | radeon_encoder->hdmi_audio_workaround = 0; | 556 | radeon_encoder->hdmi_config_offset = 0; |
506 | } | 557 | } |
diff --git a/drivers/gpu/drm/radeon/r600_reg.h b/drivers/gpu/drm/radeon/r600_reg.h index d0e28ffdeda9..7b1d22370f6e 100644 --- a/drivers/gpu/drm/radeon/r600_reg.h +++ b/drivers/gpu/drm/radeon/r600_reg.h | |||
@@ -152,9 +152,9 @@ | |||
152 | #define R600_AUDIO_STATUS_BITS 0x73d8 | 152 | #define R600_AUDIO_STATUS_BITS 0x73d8 |
153 | 153 | ||
154 | /* HDMI base register addresses */ | 154 | /* HDMI base register addresses */ |
155 | #define R600_HDMI_TMDS1 0x7400 | 155 | #define R600_HDMI_BLOCK1 0x7400 |
156 | #define R600_HDMI_TMDS2 0x7700 | 156 | #define R600_HDMI_BLOCK2 0x7700 |
157 | #define R600_HDMI_DIG 0x7800 | 157 | #define R600_HDMI_BLOCK3 0x7800 |
158 | 158 | ||
159 | /* HDMI registers */ | 159 | /* HDMI registers */ |
160 | #define R600_HDMI_ENABLE 0x00 | 160 | #define R600_HDMI_ENABLE 0x00 |
@@ -185,4 +185,8 @@ | |||
185 | #define R600_HDMI_AUDIO_DEBUG_2 0xe8 | 185 | #define R600_HDMI_AUDIO_DEBUG_2 0xe8 |
186 | #define R600_HDMI_AUDIO_DEBUG_3 0xec | 186 | #define R600_HDMI_AUDIO_DEBUG_3 0xec |
187 | 187 | ||
188 | /* HDMI additional config base register addresses */ | ||
189 | #define R600_HDMI_CONFIG1 0x7600 | ||
190 | #define R600_HDMI_CONFIG2 0x7a00 | ||
191 | |||
188 | #endif | 192 | #endif |
diff --git a/drivers/gpu/drm/radeon/r600d.h b/drivers/gpu/drm/radeon/r600d.h index 5b2e4d442823..59c1f8793e60 100644 --- a/drivers/gpu/drm/radeon/r600d.h +++ b/drivers/gpu/drm/radeon/r600d.h | |||
@@ -77,6 +77,55 @@ | |||
77 | #define CB_COLOR0_FRAG 0x280e0 | 77 | #define CB_COLOR0_FRAG 0x280e0 |
78 | #define CB_COLOR0_MASK 0x28100 | 78 | #define CB_COLOR0_MASK 0x28100 |
79 | 79 | ||
80 | #define SQ_ALU_CONST_CACHE_PS_0 0x28940 | ||
81 | #define SQ_ALU_CONST_CACHE_PS_1 0x28944 | ||
82 | #define SQ_ALU_CONST_CACHE_PS_2 0x28948 | ||
83 | #define SQ_ALU_CONST_CACHE_PS_3 0x2894c | ||
84 | #define SQ_ALU_CONST_CACHE_PS_4 0x28950 | ||
85 | #define SQ_ALU_CONST_CACHE_PS_5 0x28954 | ||
86 | #define SQ_ALU_CONST_CACHE_PS_6 0x28958 | ||
87 | #define SQ_ALU_CONST_CACHE_PS_7 0x2895c | ||
88 | #define SQ_ALU_CONST_CACHE_PS_8 0x28960 | ||
89 | #define SQ_ALU_CONST_CACHE_PS_9 0x28964 | ||
90 | #define SQ_ALU_CONST_CACHE_PS_10 0x28968 | ||
91 | #define SQ_ALU_CONST_CACHE_PS_11 0x2896c | ||
92 | #define SQ_ALU_CONST_CACHE_PS_12 0x28970 | ||
93 | #define SQ_ALU_CONST_CACHE_PS_13 0x28974 | ||
94 | #define SQ_ALU_CONST_CACHE_PS_14 0x28978 | ||
95 | #define SQ_ALU_CONST_CACHE_PS_15 0x2897c | ||
96 | #define SQ_ALU_CONST_CACHE_VS_0 0x28980 | ||
97 | #define SQ_ALU_CONST_CACHE_VS_1 0x28984 | ||
98 | #define SQ_ALU_CONST_CACHE_VS_2 0x28988 | ||
99 | #define SQ_ALU_CONST_CACHE_VS_3 0x2898c | ||
100 | #define SQ_ALU_CONST_CACHE_VS_4 0x28990 | ||
101 | #define SQ_ALU_CONST_CACHE_VS_5 0x28994 | ||
102 | #define SQ_ALU_CONST_CACHE_VS_6 0x28998 | ||
103 | #define SQ_ALU_CONST_CACHE_VS_7 0x2899c | ||
104 | #define SQ_ALU_CONST_CACHE_VS_8 0x289a0 | ||
105 | #define SQ_ALU_CONST_CACHE_VS_9 0x289a4 | ||
106 | #define SQ_ALU_CONST_CACHE_VS_10 0x289a8 | ||
107 | #define SQ_ALU_CONST_CACHE_VS_11 0x289ac | ||
108 | #define SQ_ALU_CONST_CACHE_VS_12 0x289b0 | ||
109 | #define SQ_ALU_CONST_CACHE_VS_13 0x289b4 | ||
110 | #define SQ_ALU_CONST_CACHE_VS_14 0x289b8 | ||
111 | #define SQ_ALU_CONST_CACHE_VS_15 0x289bc | ||
112 | #define SQ_ALU_CONST_CACHE_GS_0 0x289c0 | ||
113 | #define SQ_ALU_CONST_CACHE_GS_1 0x289c4 | ||
114 | #define SQ_ALU_CONST_CACHE_GS_2 0x289c8 | ||
115 | #define SQ_ALU_CONST_CACHE_GS_3 0x289cc | ||
116 | #define SQ_ALU_CONST_CACHE_GS_4 0x289d0 | ||
117 | #define SQ_ALU_CONST_CACHE_GS_5 0x289d4 | ||
118 | #define SQ_ALU_CONST_CACHE_GS_6 0x289d8 | ||
119 | #define SQ_ALU_CONST_CACHE_GS_7 0x289dc | ||
120 | #define SQ_ALU_CONST_CACHE_GS_8 0x289e0 | ||
121 | #define SQ_ALU_CONST_CACHE_GS_9 0x289e4 | ||
122 | #define SQ_ALU_CONST_CACHE_GS_10 0x289e8 | ||
123 | #define SQ_ALU_CONST_CACHE_GS_11 0x289ec | ||
124 | #define SQ_ALU_CONST_CACHE_GS_12 0x289f0 | ||
125 | #define SQ_ALU_CONST_CACHE_GS_13 0x289f4 | ||
126 | #define SQ_ALU_CONST_CACHE_GS_14 0x289f8 | ||
127 | #define SQ_ALU_CONST_CACHE_GS_15 0x289fc | ||
128 | |||
80 | #define CONFIG_MEMSIZE 0x5428 | 129 | #define CONFIG_MEMSIZE 0x5428 |
81 | #define CONFIG_CNTL 0x5424 | 130 | #define CONFIG_CNTL 0x5424 |
82 | #define CP_STAT 0x8680 | 131 | #define CP_STAT 0x8680 |
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 829e26e8a4bb..034218c3dbbb 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -91,6 +91,8 @@ extern int radeon_tv; | |||
91 | extern int radeon_new_pll; | 91 | extern int radeon_new_pll; |
92 | extern int radeon_dynpm; | 92 | extern int radeon_dynpm; |
93 | extern int radeon_audio; | 93 | extern int radeon_audio; |
94 | extern int radeon_disp_priority; | ||
95 | extern int radeon_hw_i2c; | ||
94 | 96 | ||
95 | /* | 97 | /* |
96 | * Copy from radeon_drv.h so we don't have to include both and have conflicting | 98 | * Copy from radeon_drv.h so we don't have to include both and have conflicting |
@@ -168,6 +170,7 @@ struct radeon_clock { | |||
168 | * Power management | 170 | * Power management |
169 | */ | 171 | */ |
170 | int radeon_pm_init(struct radeon_device *rdev); | 172 | int radeon_pm_init(struct radeon_device *rdev); |
173 | void radeon_pm_fini(struct radeon_device *rdev); | ||
171 | void radeon_pm_compute_clocks(struct radeon_device *rdev); | 174 | void radeon_pm_compute_clocks(struct radeon_device *rdev); |
172 | void radeon_combios_get_power_modes(struct radeon_device *rdev); | 175 | void radeon_combios_get_power_modes(struct radeon_device *rdev); |
173 | void radeon_atombios_get_power_modes(struct radeon_device *rdev); | 176 | void radeon_atombios_get_power_modes(struct radeon_device *rdev); |
@@ -687,6 +690,7 @@ struct radeon_pm { | |||
687 | bool downclocked; | 690 | bool downclocked; |
688 | int active_crtcs; | 691 | int active_crtcs; |
689 | int req_vblank; | 692 | int req_vblank; |
693 | bool vblank_sync; | ||
690 | fixed20_12 max_bandwidth; | 694 | fixed20_12 max_bandwidth; |
691 | fixed20_12 igp_sideport_mclk; | 695 | fixed20_12 igp_sideport_mclk; |
692 | fixed20_12 igp_system_mclk; | 696 | fixed20_12 igp_system_mclk; |
@@ -697,6 +701,7 @@ struct radeon_pm { | |||
697 | fixed20_12 ht_bandwidth; | 701 | fixed20_12 ht_bandwidth; |
698 | fixed20_12 core_bandwidth; | 702 | fixed20_12 core_bandwidth; |
699 | fixed20_12 sclk; | 703 | fixed20_12 sclk; |
704 | fixed20_12 mclk; | ||
700 | fixed20_12 needed_bandwidth; | 705 | fixed20_12 needed_bandwidth; |
701 | /* XXX: use a define for num power modes */ | 706 | /* XXX: use a define for num power modes */ |
702 | struct radeon_power_state power_state[8]; | 707 | struct radeon_power_state power_state[8]; |
@@ -707,6 +712,7 @@ struct radeon_pm { | |||
707 | struct radeon_power_state *requested_power_state; | 712 | struct radeon_power_state *requested_power_state; |
708 | struct radeon_pm_clock_info *requested_clock_mode; | 713 | struct radeon_pm_clock_info *requested_clock_mode; |
709 | struct radeon_power_state *default_power_state; | 714 | struct radeon_power_state *default_power_state; |
715 | struct radeon_i2c_chan *i2c_bus; | ||
710 | }; | 716 | }; |
711 | 717 | ||
712 | 718 | ||
@@ -729,8 +735,6 @@ int radeon_debugfs_add_files(struct radeon_device *rdev, | |||
729 | struct drm_info_list *files, | 735 | struct drm_info_list *files, |
730 | unsigned nfiles); | 736 | unsigned nfiles); |
731 | int radeon_debugfs_fence_init(struct radeon_device *rdev); | 737 | int radeon_debugfs_fence_init(struct radeon_device *rdev); |
732 | int r100_debugfs_rbbm_init(struct radeon_device *rdev); | ||
733 | int r100_debugfs_cp_init(struct radeon_device *rdev); | ||
734 | 738 | ||
735 | 739 | ||
736 | /* | 740 | /* |
@@ -782,7 +786,7 @@ struct radeon_asic { | |||
782 | int (*set_surface_reg)(struct radeon_device *rdev, int reg, | 786 | int (*set_surface_reg)(struct radeon_device *rdev, int reg, |
783 | uint32_t tiling_flags, uint32_t pitch, | 787 | uint32_t tiling_flags, uint32_t pitch, |
784 | uint32_t offset, uint32_t obj_size); | 788 | uint32_t offset, uint32_t obj_size); |
785 | int (*clear_surface_reg)(struct radeon_device *rdev, int reg); | 789 | void (*clear_surface_reg)(struct radeon_device *rdev, int reg); |
786 | void (*bandwidth_update)(struct radeon_device *rdev); | 790 | void (*bandwidth_update)(struct radeon_device *rdev); |
787 | void (*hpd_init)(struct radeon_device *rdev); | 791 | void (*hpd_init)(struct radeon_device *rdev); |
788 | void (*hpd_fini)(struct radeon_device *rdev); | 792 | void (*hpd_fini)(struct radeon_device *rdev); |
@@ -862,6 +866,12 @@ union radeon_asic_config { | |||
862 | struct rv770_asic rv770; | 866 | struct rv770_asic rv770; |
863 | }; | 867 | }; |
864 | 868 | ||
869 | /* | ||
870 | * asic initizalization from radeon_asic.c | ||
871 | */ | ||
872 | void radeon_agp_disable(struct radeon_device *rdev); | ||
873 | int radeon_asic_init(struct radeon_device *rdev); | ||
874 | |||
865 | 875 | ||
866 | /* | 876 | /* |
867 | * IOCTL. | 877 | * IOCTL. |
@@ -1172,6 +1182,8 @@ extern void radeon_gart_restore(struct radeon_device *rdev); | |||
1172 | extern int radeon_modeset_init(struct radeon_device *rdev); | 1182 | extern int radeon_modeset_init(struct radeon_device *rdev); |
1173 | extern void radeon_modeset_fini(struct radeon_device *rdev); | 1183 | extern void radeon_modeset_fini(struct radeon_device *rdev); |
1174 | extern bool radeon_card_posted(struct radeon_device *rdev); | 1184 | extern bool radeon_card_posted(struct radeon_device *rdev); |
1185 | extern void radeon_update_bandwidth_info(struct radeon_device *rdev); | ||
1186 | extern void radeon_update_display_priority(struct radeon_device *rdev); | ||
1175 | extern bool radeon_boot_test_post_card(struct radeon_device *rdev); | 1187 | extern bool radeon_boot_test_post_card(struct radeon_device *rdev); |
1176 | extern int radeon_clocks_init(struct radeon_device *rdev); | 1188 | extern int radeon_clocks_init(struct radeon_device *rdev); |
1177 | extern void radeon_clocks_fini(struct radeon_device *rdev); | 1189 | extern void radeon_clocks_fini(struct radeon_device *rdev); |
@@ -1188,51 +1200,6 @@ extern int radeon_resume_kms(struct drm_device *dev); | |||
1188 | extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state); | 1200 | extern int radeon_suspend_kms(struct drm_device *dev, pm_message_t state); |
1189 | 1201 | ||
1190 | /* r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 */ | 1202 | /* r100,rv100,rs100,rv200,rs200,r200,rv250,rs300,rv280 */ |
1191 | struct r100_mc_save { | ||
1192 | u32 GENMO_WT; | ||
1193 | u32 CRTC_EXT_CNTL; | ||
1194 | u32 CRTC_GEN_CNTL; | ||
1195 | u32 CRTC2_GEN_CNTL; | ||
1196 | u32 CUR_OFFSET; | ||
1197 | u32 CUR2_OFFSET; | ||
1198 | }; | ||
1199 | extern void r100_cp_disable(struct radeon_device *rdev); | ||
1200 | extern int r100_cp_init(struct radeon_device *rdev, unsigned ring_size); | ||
1201 | extern void r100_cp_fini(struct radeon_device *rdev); | ||
1202 | extern void r100_pci_gart_tlb_flush(struct radeon_device *rdev); | ||
1203 | extern int r100_pci_gart_init(struct radeon_device *rdev); | ||
1204 | extern void r100_pci_gart_fini(struct radeon_device *rdev); | ||
1205 | extern int r100_pci_gart_enable(struct radeon_device *rdev); | ||
1206 | extern void r100_pci_gart_disable(struct radeon_device *rdev); | ||
1207 | extern int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); | ||
1208 | extern int r100_debugfs_mc_info_init(struct radeon_device *rdev); | ||
1209 | extern int r100_gui_wait_for_idle(struct radeon_device *rdev); | ||
1210 | extern void r100_ib_fini(struct radeon_device *rdev); | ||
1211 | extern int r100_ib_init(struct radeon_device *rdev); | ||
1212 | extern void r100_irq_disable(struct radeon_device *rdev); | ||
1213 | extern int r100_irq_set(struct radeon_device *rdev); | ||
1214 | extern void r100_mc_stop(struct radeon_device *rdev, struct r100_mc_save *save); | ||
1215 | extern void r100_mc_resume(struct radeon_device *rdev, struct r100_mc_save *save); | ||
1216 | extern void r100_vram_init_sizes(struct radeon_device *rdev); | ||
1217 | extern void r100_wb_disable(struct radeon_device *rdev); | ||
1218 | extern void r100_wb_fini(struct radeon_device *rdev); | ||
1219 | extern int r100_wb_init(struct radeon_device *rdev); | ||
1220 | extern void r100_hdp_reset(struct radeon_device *rdev); | ||
1221 | extern int r100_rb2d_reset(struct radeon_device *rdev); | ||
1222 | extern int r100_cp_reset(struct radeon_device *rdev); | ||
1223 | extern void r100_vga_render_disable(struct radeon_device *rdev); | ||
1224 | extern int r100_cs_track_check_pkt3_indx_buffer(struct radeon_cs_parser *p, | ||
1225 | struct radeon_cs_packet *pkt, | ||
1226 | struct radeon_bo *robj); | ||
1227 | extern int r100_cs_parse_packet0(struct radeon_cs_parser *p, | ||
1228 | struct radeon_cs_packet *pkt, | ||
1229 | const unsigned *auth, unsigned n, | ||
1230 | radeon_packet0_check_t check); | ||
1231 | extern int r100_cs_packet_parse(struct radeon_cs_parser *p, | ||
1232 | struct radeon_cs_packet *pkt, | ||
1233 | unsigned idx); | ||
1234 | extern void r100_enable_bm(struct radeon_device *rdev); | ||
1235 | extern void r100_set_common_regs(struct radeon_device *rdev); | ||
1236 | 1203 | ||
1237 | /* rv200,rv250,rv280 */ | 1204 | /* rv200,rv250,rv280 */ |
1238 | extern void r200_set_safe_registers(struct radeon_device *rdev); | 1205 | extern void r200_set_safe_registers(struct radeon_device *rdev); |
@@ -1322,7 +1289,8 @@ extern int r600_audio_tmds_index(struct drm_encoder *encoder); | |||
1322 | extern void r600_audio_set_clock(struct drm_encoder *encoder, int clock); | 1289 | extern void r600_audio_set_clock(struct drm_encoder *encoder, int clock); |
1323 | extern void r600_audio_fini(struct radeon_device *rdev); | 1290 | extern void r600_audio_fini(struct radeon_device *rdev); |
1324 | extern void r600_hdmi_init(struct drm_encoder *encoder); | 1291 | extern void r600_hdmi_init(struct drm_encoder *encoder); |
1325 | extern void r600_hdmi_enable(struct drm_encoder *encoder, int enable); | 1292 | extern void r600_hdmi_enable(struct drm_encoder *encoder); |
1293 | extern void r600_hdmi_disable(struct drm_encoder *encoder); | ||
1326 | extern void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode); | 1294 | extern void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode); |
1327 | extern int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder); | 1295 | extern int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder); |
1328 | extern void r600_hdmi_update_audio_settings(struct drm_encoder *encoder, | 1296 | extern void r600_hdmi_update_audio_settings(struct drm_encoder *encoder, |
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c new file mode 100644 index 000000000000..a4b4bc9fa322 --- /dev/null +++ b/drivers/gpu/drm/radeon/radeon_asic.c | |||
@@ -0,0 +1,772 @@ | |||
1 | /* | ||
2 | * Copyright 2008 Advanced Micro Devices, Inc. | ||
3 | * Copyright 2008 Red Hat Inc. | ||
4 | * Copyright 2009 Jerome Glisse. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the "Software"), | ||
8 | * to deal in the Software without restriction, including without limitation | ||
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
11 | * Software is furnished to do so, subject to the following conditions: | ||
12 | * | ||
13 | * The above copyright notice and this permission notice shall be included in | ||
14 | * all copies or substantial portions of the Software. | ||
15 | * | ||
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
19 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
20 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
22 | * OTHER DEALINGS IN THE SOFTWARE. | ||
23 | * | ||
24 | * Authors: Dave Airlie | ||
25 | * Alex Deucher | ||
26 | * Jerome Glisse | ||
27 | */ | ||
28 | |||
29 | #include <linux/console.h> | ||
30 | #include <drm/drmP.h> | ||
31 | #include <drm/drm_crtc_helper.h> | ||
32 | #include <drm/radeon_drm.h> | ||
33 | #include <linux/vgaarb.h> | ||
34 | #include <linux/vga_switcheroo.h> | ||
35 | #include "radeon_reg.h" | ||
36 | #include "radeon.h" | ||
37 | #include "radeon_asic.h" | ||
38 | #include "atom.h" | ||
39 | |||
40 | /* | ||
41 | * Registers accessors functions. | ||
42 | */ | ||
43 | static uint32_t radeon_invalid_rreg(struct radeon_device *rdev, uint32_t reg) | ||
44 | { | ||
45 | DRM_ERROR("Invalid callback to read register 0x%04X\n", reg); | ||
46 | BUG_ON(1); | ||
47 | return 0; | ||
48 | } | ||
49 | |||
50 | static void radeon_invalid_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v) | ||
51 | { | ||
52 | DRM_ERROR("Invalid callback to write register 0x%04X with 0x%08X\n", | ||
53 | reg, v); | ||
54 | BUG_ON(1); | ||
55 | } | ||
56 | |||
57 | static void radeon_register_accessor_init(struct radeon_device *rdev) | ||
58 | { | ||
59 | rdev->mc_rreg = &radeon_invalid_rreg; | ||
60 | rdev->mc_wreg = &radeon_invalid_wreg; | ||
61 | rdev->pll_rreg = &radeon_invalid_rreg; | ||
62 | rdev->pll_wreg = &radeon_invalid_wreg; | ||
63 | rdev->pciep_rreg = &radeon_invalid_rreg; | ||
64 | rdev->pciep_wreg = &radeon_invalid_wreg; | ||
65 | |||
66 | /* Don't change order as we are overridding accessor. */ | ||
67 | if (rdev->family < CHIP_RV515) { | ||
68 | rdev->pcie_reg_mask = 0xff; | ||
69 | } else { | ||
70 | rdev->pcie_reg_mask = 0x7ff; | ||
71 | } | ||
72 | /* FIXME: not sure here */ | ||
73 | if (rdev->family <= CHIP_R580) { | ||
74 | rdev->pll_rreg = &r100_pll_rreg; | ||
75 | rdev->pll_wreg = &r100_pll_wreg; | ||
76 | } | ||
77 | if (rdev->family >= CHIP_R420) { | ||
78 | rdev->mc_rreg = &r420_mc_rreg; | ||
79 | rdev->mc_wreg = &r420_mc_wreg; | ||
80 | } | ||
81 | if (rdev->family >= CHIP_RV515) { | ||
82 | rdev->mc_rreg = &rv515_mc_rreg; | ||
83 | rdev->mc_wreg = &rv515_mc_wreg; | ||
84 | } | ||
85 | if (rdev->family == CHIP_RS400 || rdev->family == CHIP_RS480) { | ||
86 | rdev->mc_rreg = &rs400_mc_rreg; | ||
87 | rdev->mc_wreg = &rs400_mc_wreg; | ||
88 | } | ||
89 | if (rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740) { | ||
90 | rdev->mc_rreg = &rs690_mc_rreg; | ||
91 | rdev->mc_wreg = &rs690_mc_wreg; | ||
92 | } | ||
93 | if (rdev->family == CHIP_RS600) { | ||
94 | rdev->mc_rreg = &rs600_mc_rreg; | ||
95 | rdev->mc_wreg = &rs600_mc_wreg; | ||
96 | } | ||
97 | if ((rdev->family >= CHIP_R600) && (rdev->family <= CHIP_RV740)) { | ||
98 | rdev->pciep_rreg = &r600_pciep_rreg; | ||
99 | rdev->pciep_wreg = &r600_pciep_wreg; | ||
100 | } | ||
101 | } | ||
102 | |||
103 | |||
104 | /* helper to disable agp */ | ||
105 | void radeon_agp_disable(struct radeon_device *rdev) | ||
106 | { | ||
107 | rdev->flags &= ~RADEON_IS_AGP; | ||
108 | if (rdev->family >= CHIP_R600) { | ||
109 | DRM_INFO("Forcing AGP to PCIE mode\n"); | ||
110 | rdev->flags |= RADEON_IS_PCIE; | ||
111 | } else if (rdev->family >= CHIP_RV515 || | ||
112 | rdev->family == CHIP_RV380 || | ||
113 | rdev->family == CHIP_RV410 || | ||
114 | rdev->family == CHIP_R423) { | ||
115 | DRM_INFO("Forcing AGP to PCIE mode\n"); | ||
116 | rdev->flags |= RADEON_IS_PCIE; | ||
117 | rdev->asic->gart_tlb_flush = &rv370_pcie_gart_tlb_flush; | ||
118 | rdev->asic->gart_set_page = &rv370_pcie_gart_set_page; | ||
119 | } else { | ||
120 | DRM_INFO("Forcing AGP to PCI mode\n"); | ||
121 | rdev->flags |= RADEON_IS_PCI; | ||
122 | rdev->asic->gart_tlb_flush = &r100_pci_gart_tlb_flush; | ||
123 | rdev->asic->gart_set_page = &r100_pci_gart_set_page; | ||
124 | } | ||
125 | rdev->mc.gtt_size = radeon_gart_size * 1024 * 1024; | ||
126 | } | ||
127 | |||
128 | /* | ||
129 | * ASIC | ||
130 | */ | ||
131 | static struct radeon_asic r100_asic = { | ||
132 | .init = &r100_init, | ||
133 | .fini = &r100_fini, | ||
134 | .suspend = &r100_suspend, | ||
135 | .resume = &r100_resume, | ||
136 | .vga_set_state = &r100_vga_set_state, | ||
137 | .gpu_reset = &r100_gpu_reset, | ||
138 | .gart_tlb_flush = &r100_pci_gart_tlb_flush, | ||
139 | .gart_set_page = &r100_pci_gart_set_page, | ||
140 | .cp_commit = &r100_cp_commit, | ||
141 | .ring_start = &r100_ring_start, | ||
142 | .ring_test = &r100_ring_test, | ||
143 | .ring_ib_execute = &r100_ring_ib_execute, | ||
144 | .irq_set = &r100_irq_set, | ||
145 | .irq_process = &r100_irq_process, | ||
146 | .get_vblank_counter = &r100_get_vblank_counter, | ||
147 | .fence_ring_emit = &r100_fence_ring_emit, | ||
148 | .cs_parse = &r100_cs_parse, | ||
149 | .copy_blit = &r100_copy_blit, | ||
150 | .copy_dma = NULL, | ||
151 | .copy = &r100_copy_blit, | ||
152 | .get_engine_clock = &radeon_legacy_get_engine_clock, | ||
153 | .set_engine_clock = &radeon_legacy_set_engine_clock, | ||
154 | .get_memory_clock = &radeon_legacy_get_memory_clock, | ||
155 | .set_memory_clock = NULL, | ||
156 | .get_pcie_lanes = NULL, | ||
157 | .set_pcie_lanes = NULL, | ||
158 | .set_clock_gating = &radeon_legacy_set_clock_gating, | ||
159 | .set_surface_reg = r100_set_surface_reg, | ||
160 | .clear_surface_reg = r100_clear_surface_reg, | ||
161 | .bandwidth_update = &r100_bandwidth_update, | ||
162 | .hpd_init = &r100_hpd_init, | ||
163 | .hpd_fini = &r100_hpd_fini, | ||
164 | .hpd_sense = &r100_hpd_sense, | ||
165 | .hpd_set_polarity = &r100_hpd_set_polarity, | ||
166 | .ioctl_wait_idle = NULL, | ||
167 | }; | ||
168 | |||
169 | static struct radeon_asic r200_asic = { | ||
170 | .init = &r100_init, | ||
171 | .fini = &r100_fini, | ||
172 | .suspend = &r100_suspend, | ||
173 | .resume = &r100_resume, | ||
174 | .vga_set_state = &r100_vga_set_state, | ||
175 | .gpu_reset = &r100_gpu_reset, | ||
176 | .gart_tlb_flush = &r100_pci_gart_tlb_flush, | ||
177 | .gart_set_page = &r100_pci_gart_set_page, | ||
178 | .cp_commit = &r100_cp_commit, | ||
179 | .ring_start = &r100_ring_start, | ||
180 | .ring_test = &r100_ring_test, | ||
181 | .ring_ib_execute = &r100_ring_ib_execute, | ||
182 | .irq_set = &r100_irq_set, | ||
183 | .irq_process = &r100_irq_process, | ||
184 | .get_vblank_counter = &r100_get_vblank_counter, | ||
185 | .fence_ring_emit = &r100_fence_ring_emit, | ||
186 | .cs_parse = &r100_cs_parse, | ||
187 | .copy_blit = &r100_copy_blit, | ||
188 | .copy_dma = &r200_copy_dma, | ||
189 | .copy = &r100_copy_blit, | ||
190 | .get_engine_clock = &radeon_legacy_get_engine_clock, | ||
191 | .set_engine_clock = &radeon_legacy_set_engine_clock, | ||
192 | .get_memory_clock = &radeon_legacy_get_memory_clock, | ||
193 | .set_memory_clock = NULL, | ||
194 | .set_pcie_lanes = NULL, | ||
195 | .set_clock_gating = &radeon_legacy_set_clock_gating, | ||
196 | .set_surface_reg = r100_set_surface_reg, | ||
197 | .clear_surface_reg = r100_clear_surface_reg, | ||
198 | .bandwidth_update = &r100_bandwidth_update, | ||
199 | .hpd_init = &r100_hpd_init, | ||
200 | .hpd_fini = &r100_hpd_fini, | ||
201 | .hpd_sense = &r100_hpd_sense, | ||
202 | .hpd_set_polarity = &r100_hpd_set_polarity, | ||
203 | .ioctl_wait_idle = NULL, | ||
204 | }; | ||
205 | |||
206 | static struct radeon_asic r300_asic = { | ||
207 | .init = &r300_init, | ||
208 | .fini = &r300_fini, | ||
209 | .suspend = &r300_suspend, | ||
210 | .resume = &r300_resume, | ||
211 | .vga_set_state = &r100_vga_set_state, | ||
212 | .gpu_reset = &r300_gpu_reset, | ||
213 | .gart_tlb_flush = &r100_pci_gart_tlb_flush, | ||
214 | .gart_set_page = &r100_pci_gart_set_page, | ||
215 | .cp_commit = &r100_cp_commit, | ||
216 | .ring_start = &r300_ring_start, | ||
217 | .ring_test = &r100_ring_test, | ||
218 | .ring_ib_execute = &r100_ring_ib_execute, | ||
219 | .irq_set = &r100_irq_set, | ||
220 | .irq_process = &r100_irq_process, | ||
221 | .get_vblank_counter = &r100_get_vblank_counter, | ||
222 | .fence_ring_emit = &r300_fence_ring_emit, | ||
223 | .cs_parse = &r300_cs_parse, | ||
224 | .copy_blit = &r100_copy_blit, | ||
225 | .copy_dma = &r200_copy_dma, | ||
226 | .copy = &r100_copy_blit, | ||
227 | .get_engine_clock = &radeon_legacy_get_engine_clock, | ||
228 | .set_engine_clock = &radeon_legacy_set_engine_clock, | ||
229 | .get_memory_clock = &radeon_legacy_get_memory_clock, | ||
230 | .set_memory_clock = NULL, | ||
231 | .get_pcie_lanes = &rv370_get_pcie_lanes, | ||
232 | .set_pcie_lanes = &rv370_set_pcie_lanes, | ||
233 | .set_clock_gating = &radeon_legacy_set_clock_gating, | ||
234 | .set_surface_reg = r100_set_surface_reg, | ||
235 | .clear_surface_reg = r100_clear_surface_reg, | ||
236 | .bandwidth_update = &r100_bandwidth_update, | ||
237 | .hpd_init = &r100_hpd_init, | ||
238 | .hpd_fini = &r100_hpd_fini, | ||
239 | .hpd_sense = &r100_hpd_sense, | ||
240 | .hpd_set_polarity = &r100_hpd_set_polarity, | ||
241 | .ioctl_wait_idle = NULL, | ||
242 | }; | ||
243 | |||
244 | static struct radeon_asic r300_asic_pcie = { | ||
245 | .init = &r300_init, | ||
246 | .fini = &r300_fini, | ||
247 | .suspend = &r300_suspend, | ||
248 | .resume = &r300_resume, | ||
249 | .vga_set_state = &r100_vga_set_state, | ||
250 | .gpu_reset = &r300_gpu_reset, | ||
251 | .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, | ||
252 | .gart_set_page = &rv370_pcie_gart_set_page, | ||
253 | .cp_commit = &r100_cp_commit, | ||
254 | .ring_start = &r300_ring_start, | ||
255 | .ring_test = &r100_ring_test, | ||
256 | .ring_ib_execute = &r100_ring_ib_execute, | ||
257 | .irq_set = &r100_irq_set, | ||
258 | .irq_process = &r100_irq_process, | ||
259 | .get_vblank_counter = &r100_get_vblank_counter, | ||
260 | .fence_ring_emit = &r300_fence_ring_emit, | ||
261 | .cs_parse = &r300_cs_parse, | ||
262 | .copy_blit = &r100_copy_blit, | ||
263 | .copy_dma = &r200_copy_dma, | ||
264 | .copy = &r100_copy_blit, | ||
265 | .get_engine_clock = &radeon_legacy_get_engine_clock, | ||
266 | .set_engine_clock = &radeon_legacy_set_engine_clock, | ||
267 | .get_memory_clock = &radeon_legacy_get_memory_clock, | ||
268 | .set_memory_clock = NULL, | ||
269 | .set_pcie_lanes = &rv370_set_pcie_lanes, | ||
270 | .set_clock_gating = &radeon_legacy_set_clock_gating, | ||
271 | .set_surface_reg = r100_set_surface_reg, | ||
272 | .clear_surface_reg = r100_clear_surface_reg, | ||
273 | .bandwidth_update = &r100_bandwidth_update, | ||
274 | .hpd_init = &r100_hpd_init, | ||
275 | .hpd_fini = &r100_hpd_fini, | ||
276 | .hpd_sense = &r100_hpd_sense, | ||
277 | .hpd_set_polarity = &r100_hpd_set_polarity, | ||
278 | .ioctl_wait_idle = NULL, | ||
279 | }; | ||
280 | |||
281 | static struct radeon_asic r420_asic = { | ||
282 | .init = &r420_init, | ||
283 | .fini = &r420_fini, | ||
284 | .suspend = &r420_suspend, | ||
285 | .resume = &r420_resume, | ||
286 | .vga_set_state = &r100_vga_set_state, | ||
287 | .gpu_reset = &r300_gpu_reset, | ||
288 | .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, | ||
289 | .gart_set_page = &rv370_pcie_gart_set_page, | ||
290 | .cp_commit = &r100_cp_commit, | ||
291 | .ring_start = &r300_ring_start, | ||
292 | .ring_test = &r100_ring_test, | ||
293 | .ring_ib_execute = &r100_ring_ib_execute, | ||
294 | .irq_set = &r100_irq_set, | ||
295 | .irq_process = &r100_irq_process, | ||
296 | .get_vblank_counter = &r100_get_vblank_counter, | ||
297 | .fence_ring_emit = &r300_fence_ring_emit, | ||
298 | .cs_parse = &r300_cs_parse, | ||
299 | .copy_blit = &r100_copy_blit, | ||
300 | .copy_dma = &r200_copy_dma, | ||
301 | .copy = &r100_copy_blit, | ||
302 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
303 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
304 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
305 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
306 | .get_pcie_lanes = &rv370_get_pcie_lanes, | ||
307 | .set_pcie_lanes = &rv370_set_pcie_lanes, | ||
308 | .set_clock_gating = &radeon_atom_set_clock_gating, | ||
309 | .set_surface_reg = r100_set_surface_reg, | ||
310 | .clear_surface_reg = r100_clear_surface_reg, | ||
311 | .bandwidth_update = &r100_bandwidth_update, | ||
312 | .hpd_init = &r100_hpd_init, | ||
313 | .hpd_fini = &r100_hpd_fini, | ||
314 | .hpd_sense = &r100_hpd_sense, | ||
315 | .hpd_set_polarity = &r100_hpd_set_polarity, | ||
316 | .ioctl_wait_idle = NULL, | ||
317 | }; | ||
318 | |||
319 | static struct radeon_asic rs400_asic = { | ||
320 | .init = &rs400_init, | ||
321 | .fini = &rs400_fini, | ||
322 | .suspend = &rs400_suspend, | ||
323 | .resume = &rs400_resume, | ||
324 | .vga_set_state = &r100_vga_set_state, | ||
325 | .gpu_reset = &r300_gpu_reset, | ||
326 | .gart_tlb_flush = &rs400_gart_tlb_flush, | ||
327 | .gart_set_page = &rs400_gart_set_page, | ||
328 | .cp_commit = &r100_cp_commit, | ||
329 | .ring_start = &r300_ring_start, | ||
330 | .ring_test = &r100_ring_test, | ||
331 | .ring_ib_execute = &r100_ring_ib_execute, | ||
332 | .irq_set = &r100_irq_set, | ||
333 | .irq_process = &r100_irq_process, | ||
334 | .get_vblank_counter = &r100_get_vblank_counter, | ||
335 | .fence_ring_emit = &r300_fence_ring_emit, | ||
336 | .cs_parse = &r300_cs_parse, | ||
337 | .copy_blit = &r100_copy_blit, | ||
338 | .copy_dma = &r200_copy_dma, | ||
339 | .copy = &r100_copy_blit, | ||
340 | .get_engine_clock = &radeon_legacy_get_engine_clock, | ||
341 | .set_engine_clock = &radeon_legacy_set_engine_clock, | ||
342 | .get_memory_clock = &radeon_legacy_get_memory_clock, | ||
343 | .set_memory_clock = NULL, | ||
344 | .get_pcie_lanes = NULL, | ||
345 | .set_pcie_lanes = NULL, | ||
346 | .set_clock_gating = &radeon_legacy_set_clock_gating, | ||
347 | .set_surface_reg = r100_set_surface_reg, | ||
348 | .clear_surface_reg = r100_clear_surface_reg, | ||
349 | .bandwidth_update = &r100_bandwidth_update, | ||
350 | .hpd_init = &r100_hpd_init, | ||
351 | .hpd_fini = &r100_hpd_fini, | ||
352 | .hpd_sense = &r100_hpd_sense, | ||
353 | .hpd_set_polarity = &r100_hpd_set_polarity, | ||
354 | .ioctl_wait_idle = NULL, | ||
355 | }; | ||
356 | |||
357 | static struct radeon_asic rs600_asic = { | ||
358 | .init = &rs600_init, | ||
359 | .fini = &rs600_fini, | ||
360 | .suspend = &rs600_suspend, | ||
361 | .resume = &rs600_resume, | ||
362 | .vga_set_state = &r100_vga_set_state, | ||
363 | .gpu_reset = &r300_gpu_reset, | ||
364 | .gart_tlb_flush = &rs600_gart_tlb_flush, | ||
365 | .gart_set_page = &rs600_gart_set_page, | ||
366 | .cp_commit = &r100_cp_commit, | ||
367 | .ring_start = &r300_ring_start, | ||
368 | .ring_test = &r100_ring_test, | ||
369 | .ring_ib_execute = &r100_ring_ib_execute, | ||
370 | .irq_set = &rs600_irq_set, | ||
371 | .irq_process = &rs600_irq_process, | ||
372 | .get_vblank_counter = &rs600_get_vblank_counter, | ||
373 | .fence_ring_emit = &r300_fence_ring_emit, | ||
374 | .cs_parse = &r300_cs_parse, | ||
375 | .copy_blit = &r100_copy_blit, | ||
376 | .copy_dma = &r200_copy_dma, | ||
377 | .copy = &r100_copy_blit, | ||
378 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
379 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
380 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
381 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
382 | .get_pcie_lanes = NULL, | ||
383 | .set_pcie_lanes = NULL, | ||
384 | .set_clock_gating = &radeon_atom_set_clock_gating, | ||
385 | .set_surface_reg = r100_set_surface_reg, | ||
386 | .clear_surface_reg = r100_clear_surface_reg, | ||
387 | .bandwidth_update = &rs600_bandwidth_update, | ||
388 | .hpd_init = &rs600_hpd_init, | ||
389 | .hpd_fini = &rs600_hpd_fini, | ||
390 | .hpd_sense = &rs600_hpd_sense, | ||
391 | .hpd_set_polarity = &rs600_hpd_set_polarity, | ||
392 | .ioctl_wait_idle = NULL, | ||
393 | }; | ||
394 | |||
395 | static struct radeon_asic rs690_asic = { | ||
396 | .init = &rs690_init, | ||
397 | .fini = &rs690_fini, | ||
398 | .suspend = &rs690_suspend, | ||
399 | .resume = &rs690_resume, | ||
400 | .vga_set_state = &r100_vga_set_state, | ||
401 | .gpu_reset = &r300_gpu_reset, | ||
402 | .gart_tlb_flush = &rs400_gart_tlb_flush, | ||
403 | .gart_set_page = &rs400_gart_set_page, | ||
404 | .cp_commit = &r100_cp_commit, | ||
405 | .ring_start = &r300_ring_start, | ||
406 | .ring_test = &r100_ring_test, | ||
407 | .ring_ib_execute = &r100_ring_ib_execute, | ||
408 | .irq_set = &rs600_irq_set, | ||
409 | .irq_process = &rs600_irq_process, | ||
410 | .get_vblank_counter = &rs600_get_vblank_counter, | ||
411 | .fence_ring_emit = &r300_fence_ring_emit, | ||
412 | .cs_parse = &r300_cs_parse, | ||
413 | .copy_blit = &r100_copy_blit, | ||
414 | .copy_dma = &r200_copy_dma, | ||
415 | .copy = &r200_copy_dma, | ||
416 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
417 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
418 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
419 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
420 | .get_pcie_lanes = NULL, | ||
421 | .set_pcie_lanes = NULL, | ||
422 | .set_clock_gating = &radeon_atom_set_clock_gating, | ||
423 | .set_surface_reg = r100_set_surface_reg, | ||
424 | .clear_surface_reg = r100_clear_surface_reg, | ||
425 | .bandwidth_update = &rs690_bandwidth_update, | ||
426 | .hpd_init = &rs600_hpd_init, | ||
427 | .hpd_fini = &rs600_hpd_fini, | ||
428 | .hpd_sense = &rs600_hpd_sense, | ||
429 | .hpd_set_polarity = &rs600_hpd_set_polarity, | ||
430 | .ioctl_wait_idle = NULL, | ||
431 | }; | ||
432 | |||
433 | static struct radeon_asic rv515_asic = { | ||
434 | .init = &rv515_init, | ||
435 | .fini = &rv515_fini, | ||
436 | .suspend = &rv515_suspend, | ||
437 | .resume = &rv515_resume, | ||
438 | .vga_set_state = &r100_vga_set_state, | ||
439 | .gpu_reset = &rv515_gpu_reset, | ||
440 | .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, | ||
441 | .gart_set_page = &rv370_pcie_gart_set_page, | ||
442 | .cp_commit = &r100_cp_commit, | ||
443 | .ring_start = &rv515_ring_start, | ||
444 | .ring_test = &r100_ring_test, | ||
445 | .ring_ib_execute = &r100_ring_ib_execute, | ||
446 | .irq_set = &rs600_irq_set, | ||
447 | .irq_process = &rs600_irq_process, | ||
448 | .get_vblank_counter = &rs600_get_vblank_counter, | ||
449 | .fence_ring_emit = &r300_fence_ring_emit, | ||
450 | .cs_parse = &r300_cs_parse, | ||
451 | .copy_blit = &r100_copy_blit, | ||
452 | .copy_dma = &r200_copy_dma, | ||
453 | .copy = &r100_copy_blit, | ||
454 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
455 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
456 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
457 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
458 | .get_pcie_lanes = &rv370_get_pcie_lanes, | ||
459 | .set_pcie_lanes = &rv370_set_pcie_lanes, | ||
460 | .set_clock_gating = &radeon_atom_set_clock_gating, | ||
461 | .set_surface_reg = r100_set_surface_reg, | ||
462 | .clear_surface_reg = r100_clear_surface_reg, | ||
463 | .bandwidth_update = &rv515_bandwidth_update, | ||
464 | .hpd_init = &rs600_hpd_init, | ||
465 | .hpd_fini = &rs600_hpd_fini, | ||
466 | .hpd_sense = &rs600_hpd_sense, | ||
467 | .hpd_set_polarity = &rs600_hpd_set_polarity, | ||
468 | .ioctl_wait_idle = NULL, | ||
469 | }; | ||
470 | |||
471 | static struct radeon_asic r520_asic = { | ||
472 | .init = &r520_init, | ||
473 | .fini = &rv515_fini, | ||
474 | .suspend = &rv515_suspend, | ||
475 | .resume = &r520_resume, | ||
476 | .vga_set_state = &r100_vga_set_state, | ||
477 | .gpu_reset = &rv515_gpu_reset, | ||
478 | .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, | ||
479 | .gart_set_page = &rv370_pcie_gart_set_page, | ||
480 | .cp_commit = &r100_cp_commit, | ||
481 | .ring_start = &rv515_ring_start, | ||
482 | .ring_test = &r100_ring_test, | ||
483 | .ring_ib_execute = &r100_ring_ib_execute, | ||
484 | .irq_set = &rs600_irq_set, | ||
485 | .irq_process = &rs600_irq_process, | ||
486 | .get_vblank_counter = &rs600_get_vblank_counter, | ||
487 | .fence_ring_emit = &r300_fence_ring_emit, | ||
488 | .cs_parse = &r300_cs_parse, | ||
489 | .copy_blit = &r100_copy_blit, | ||
490 | .copy_dma = &r200_copy_dma, | ||
491 | .copy = &r100_copy_blit, | ||
492 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
493 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
494 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
495 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
496 | .get_pcie_lanes = &rv370_get_pcie_lanes, | ||
497 | .set_pcie_lanes = &rv370_set_pcie_lanes, | ||
498 | .set_clock_gating = &radeon_atom_set_clock_gating, | ||
499 | .set_surface_reg = r100_set_surface_reg, | ||
500 | .clear_surface_reg = r100_clear_surface_reg, | ||
501 | .bandwidth_update = &rv515_bandwidth_update, | ||
502 | .hpd_init = &rs600_hpd_init, | ||
503 | .hpd_fini = &rs600_hpd_fini, | ||
504 | .hpd_sense = &rs600_hpd_sense, | ||
505 | .hpd_set_polarity = &rs600_hpd_set_polarity, | ||
506 | .ioctl_wait_idle = NULL, | ||
507 | }; | ||
508 | |||
509 | static struct radeon_asic r600_asic = { | ||
510 | .init = &r600_init, | ||
511 | .fini = &r600_fini, | ||
512 | .suspend = &r600_suspend, | ||
513 | .resume = &r600_resume, | ||
514 | .cp_commit = &r600_cp_commit, | ||
515 | .vga_set_state = &r600_vga_set_state, | ||
516 | .gpu_reset = &r600_gpu_reset, | ||
517 | .gart_tlb_flush = &r600_pcie_gart_tlb_flush, | ||
518 | .gart_set_page = &rs600_gart_set_page, | ||
519 | .ring_test = &r600_ring_test, | ||
520 | .ring_ib_execute = &r600_ring_ib_execute, | ||
521 | .irq_set = &r600_irq_set, | ||
522 | .irq_process = &r600_irq_process, | ||
523 | .get_vblank_counter = &rs600_get_vblank_counter, | ||
524 | .fence_ring_emit = &r600_fence_ring_emit, | ||
525 | .cs_parse = &r600_cs_parse, | ||
526 | .copy_blit = &r600_copy_blit, | ||
527 | .copy_dma = &r600_copy_blit, | ||
528 | .copy = &r600_copy_blit, | ||
529 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
530 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
531 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
532 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
533 | .get_pcie_lanes = &rv370_get_pcie_lanes, | ||
534 | .set_pcie_lanes = NULL, | ||
535 | .set_clock_gating = NULL, | ||
536 | .set_surface_reg = r600_set_surface_reg, | ||
537 | .clear_surface_reg = r600_clear_surface_reg, | ||
538 | .bandwidth_update = &rv515_bandwidth_update, | ||
539 | .hpd_init = &r600_hpd_init, | ||
540 | .hpd_fini = &r600_hpd_fini, | ||
541 | .hpd_sense = &r600_hpd_sense, | ||
542 | .hpd_set_polarity = &r600_hpd_set_polarity, | ||
543 | .ioctl_wait_idle = r600_ioctl_wait_idle, | ||
544 | }; | ||
545 | |||
546 | static struct radeon_asic rs780_asic = { | ||
547 | .init = &r600_init, | ||
548 | .fini = &r600_fini, | ||
549 | .suspend = &r600_suspend, | ||
550 | .resume = &r600_resume, | ||
551 | .cp_commit = &r600_cp_commit, | ||
552 | .vga_set_state = &r600_vga_set_state, | ||
553 | .gpu_reset = &r600_gpu_reset, | ||
554 | .gart_tlb_flush = &r600_pcie_gart_tlb_flush, | ||
555 | .gart_set_page = &rs600_gart_set_page, | ||
556 | .ring_test = &r600_ring_test, | ||
557 | .ring_ib_execute = &r600_ring_ib_execute, | ||
558 | .irq_set = &r600_irq_set, | ||
559 | .irq_process = &r600_irq_process, | ||
560 | .get_vblank_counter = &rs600_get_vblank_counter, | ||
561 | .fence_ring_emit = &r600_fence_ring_emit, | ||
562 | .cs_parse = &r600_cs_parse, | ||
563 | .copy_blit = &r600_copy_blit, | ||
564 | .copy_dma = &r600_copy_blit, | ||
565 | .copy = &r600_copy_blit, | ||
566 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
567 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
568 | .get_memory_clock = NULL, | ||
569 | .set_memory_clock = NULL, | ||
570 | .get_pcie_lanes = NULL, | ||
571 | .set_pcie_lanes = NULL, | ||
572 | .set_clock_gating = NULL, | ||
573 | .set_surface_reg = r600_set_surface_reg, | ||
574 | .clear_surface_reg = r600_clear_surface_reg, | ||
575 | .bandwidth_update = &rs690_bandwidth_update, | ||
576 | .hpd_init = &r600_hpd_init, | ||
577 | .hpd_fini = &r600_hpd_fini, | ||
578 | .hpd_sense = &r600_hpd_sense, | ||
579 | .hpd_set_polarity = &r600_hpd_set_polarity, | ||
580 | .ioctl_wait_idle = r600_ioctl_wait_idle, | ||
581 | }; | ||
582 | |||
583 | static struct radeon_asic rv770_asic = { | ||
584 | .init = &rv770_init, | ||
585 | .fini = &rv770_fini, | ||
586 | .suspend = &rv770_suspend, | ||
587 | .resume = &rv770_resume, | ||
588 | .cp_commit = &r600_cp_commit, | ||
589 | .gpu_reset = &rv770_gpu_reset, | ||
590 | .vga_set_state = &r600_vga_set_state, | ||
591 | .gart_tlb_flush = &r600_pcie_gart_tlb_flush, | ||
592 | .gart_set_page = &rs600_gart_set_page, | ||
593 | .ring_test = &r600_ring_test, | ||
594 | .ring_ib_execute = &r600_ring_ib_execute, | ||
595 | .irq_set = &r600_irq_set, | ||
596 | .irq_process = &r600_irq_process, | ||
597 | .get_vblank_counter = &rs600_get_vblank_counter, | ||
598 | .fence_ring_emit = &r600_fence_ring_emit, | ||
599 | .cs_parse = &r600_cs_parse, | ||
600 | .copy_blit = &r600_copy_blit, | ||
601 | .copy_dma = &r600_copy_blit, | ||
602 | .copy = &r600_copy_blit, | ||
603 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
604 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
605 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
606 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
607 | .get_pcie_lanes = &rv370_get_pcie_lanes, | ||
608 | .set_pcie_lanes = NULL, | ||
609 | .set_clock_gating = &radeon_atom_set_clock_gating, | ||
610 | .set_surface_reg = r600_set_surface_reg, | ||
611 | .clear_surface_reg = r600_clear_surface_reg, | ||
612 | .bandwidth_update = &rv515_bandwidth_update, | ||
613 | .hpd_init = &r600_hpd_init, | ||
614 | .hpd_fini = &r600_hpd_fini, | ||
615 | .hpd_sense = &r600_hpd_sense, | ||
616 | .hpd_set_polarity = &r600_hpd_set_polarity, | ||
617 | .ioctl_wait_idle = r600_ioctl_wait_idle, | ||
618 | }; | ||
619 | |||
620 | static struct radeon_asic evergreen_asic = { | ||
621 | .init = &evergreen_init, | ||
622 | .fini = &evergreen_fini, | ||
623 | .suspend = &evergreen_suspend, | ||
624 | .resume = &evergreen_resume, | ||
625 | .cp_commit = NULL, | ||
626 | .gpu_reset = &evergreen_gpu_reset, | ||
627 | .vga_set_state = &r600_vga_set_state, | ||
628 | .gart_tlb_flush = &r600_pcie_gart_tlb_flush, | ||
629 | .gart_set_page = &rs600_gart_set_page, | ||
630 | .ring_test = NULL, | ||
631 | .ring_ib_execute = NULL, | ||
632 | .irq_set = NULL, | ||
633 | .irq_process = NULL, | ||
634 | .get_vblank_counter = NULL, | ||
635 | .fence_ring_emit = NULL, | ||
636 | .cs_parse = NULL, | ||
637 | .copy_blit = NULL, | ||
638 | .copy_dma = NULL, | ||
639 | .copy = NULL, | ||
640 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
641 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
642 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
643 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
644 | .set_pcie_lanes = NULL, | ||
645 | .set_clock_gating = NULL, | ||
646 | .set_surface_reg = r600_set_surface_reg, | ||
647 | .clear_surface_reg = r600_clear_surface_reg, | ||
648 | .bandwidth_update = &evergreen_bandwidth_update, | ||
649 | .hpd_init = &evergreen_hpd_init, | ||
650 | .hpd_fini = &evergreen_hpd_fini, | ||
651 | .hpd_sense = &evergreen_hpd_sense, | ||
652 | .hpd_set_polarity = &evergreen_hpd_set_polarity, | ||
653 | }; | ||
654 | |||
655 | int radeon_asic_init(struct radeon_device *rdev) | ||
656 | { | ||
657 | radeon_register_accessor_init(rdev); | ||
658 | switch (rdev->family) { | ||
659 | case CHIP_R100: | ||
660 | case CHIP_RV100: | ||
661 | case CHIP_RS100: | ||
662 | case CHIP_RV200: | ||
663 | case CHIP_RS200: | ||
664 | rdev->asic = &r100_asic; | ||
665 | break; | ||
666 | case CHIP_R200: | ||
667 | case CHIP_RV250: | ||
668 | case CHIP_RS300: | ||
669 | case CHIP_RV280: | ||
670 | rdev->asic = &r200_asic; | ||
671 | break; | ||
672 | case CHIP_R300: | ||
673 | case CHIP_R350: | ||
674 | case CHIP_RV350: | ||
675 | case CHIP_RV380: | ||
676 | if (rdev->flags & RADEON_IS_PCIE) | ||
677 | rdev->asic = &r300_asic_pcie; | ||
678 | else | ||
679 | rdev->asic = &r300_asic; | ||
680 | break; | ||
681 | case CHIP_R420: | ||
682 | case CHIP_R423: | ||
683 | case CHIP_RV410: | ||
684 | rdev->asic = &r420_asic; | ||
685 | break; | ||
686 | case CHIP_RS400: | ||
687 | case CHIP_RS480: | ||
688 | rdev->asic = &rs400_asic; | ||
689 | break; | ||
690 | case CHIP_RS600: | ||
691 | rdev->asic = &rs600_asic; | ||
692 | break; | ||
693 | case CHIP_RS690: | ||
694 | case CHIP_RS740: | ||
695 | rdev->asic = &rs690_asic; | ||
696 | break; | ||
697 | case CHIP_RV515: | ||
698 | rdev->asic = &rv515_asic; | ||
699 | break; | ||
700 | case CHIP_R520: | ||
701 | case CHIP_RV530: | ||
702 | case CHIP_RV560: | ||
703 | case CHIP_RV570: | ||
704 | case CHIP_R580: | ||
705 | rdev->asic = &r520_asic; | ||
706 | break; | ||
707 | case CHIP_R600: | ||
708 | case CHIP_RV610: | ||
709 | case CHIP_RV630: | ||
710 | case CHIP_RV620: | ||
711 | case CHIP_RV635: | ||
712 | case CHIP_RV670: | ||
713 | rdev->asic = &r600_asic; | ||
714 | break; | ||
715 | case CHIP_RS780: | ||
716 | case CHIP_RS880: | ||
717 | rdev->asic = &rs780_asic; | ||
718 | break; | ||
719 | case CHIP_RV770: | ||
720 | case CHIP_RV730: | ||
721 | case CHIP_RV710: | ||
722 | case CHIP_RV740: | ||
723 | rdev->asic = &rv770_asic; | ||
724 | break; | ||
725 | case CHIP_CEDAR: | ||
726 | case CHIP_REDWOOD: | ||
727 | case CHIP_JUNIPER: | ||
728 | case CHIP_CYPRESS: | ||
729 | case CHIP_HEMLOCK: | ||
730 | rdev->asic = &evergreen_asic; | ||
731 | break; | ||
732 | default: | ||
733 | /* FIXME: not supported yet */ | ||
734 | return -EINVAL; | ||
735 | } | ||
736 | |||
737 | if (rdev->flags & RADEON_IS_IGP) { | ||
738 | rdev->asic->get_memory_clock = NULL; | ||
739 | rdev->asic->set_memory_clock = NULL; | ||
740 | } | ||
741 | |||
742 | /* set the number of crtcs */ | ||
743 | if (rdev->flags & RADEON_SINGLE_CRTC) | ||
744 | rdev->num_crtc = 1; | ||
745 | else { | ||
746 | if (ASIC_IS_DCE4(rdev)) | ||
747 | rdev->num_crtc = 6; | ||
748 | else | ||
749 | rdev->num_crtc = 2; | ||
750 | } | ||
751 | |||
752 | return 0; | ||
753 | } | ||
754 | |||
755 | /* | ||
756 | * Wrapper around modesetting bits. Move to radeon_clocks.c? | ||
757 | */ | ||
758 | int radeon_clocks_init(struct radeon_device *rdev) | ||
759 | { | ||
760 | int r; | ||
761 | |||
762 | r = radeon_static_clocks_init(rdev->ddev); | ||
763 | if (r) { | ||
764 | return r; | ||
765 | } | ||
766 | DRM_INFO("Clocks initialized !\n"); | ||
767 | return 0; | ||
768 | } | ||
769 | |||
770 | void radeon_clocks_fini(struct radeon_device *rdev) | ||
771 | { | ||
772 | } | ||
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index d3a157b2bcb7..a0b8280663d1 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h | |||
@@ -45,10 +45,18 @@ void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable); | |||
45 | /* | 45 | /* |
46 | * r100,rv100,rs100,rv200,rs200 | 46 | * r100,rv100,rs100,rv200,rs200 |
47 | */ | 47 | */ |
48 | extern int r100_init(struct radeon_device *rdev); | 48 | struct r100_mc_save { |
49 | extern void r100_fini(struct radeon_device *rdev); | 49 | u32 GENMO_WT; |
50 | extern int r100_suspend(struct radeon_device *rdev); | 50 | u32 CRTC_EXT_CNTL; |
51 | extern int r100_resume(struct radeon_device *rdev); | 51 | u32 CRTC_GEN_CNTL; |
52 | u32 CRTC2_GEN_CNTL; | ||
53 | u32 CUR_OFFSET; | ||
54 | u32 CUR2_OFFSET; | ||
55 | }; | ||
56 | int r100_init(struct radeon_device *rdev); | ||
57 | void r100_fini(struct radeon_device *rdev); | ||
58 | int r100_suspend(struct radeon_device *rdev); | ||
59 | int r100_resume(struct radeon_device *rdev); | ||
52 | uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg); | 60 | uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg); |
53 | void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); | 61 | void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
54 | void r100_vga_set_state(struct radeon_device *rdev, bool state); | 62 | void r100_vga_set_state(struct radeon_device *rdev, bool state); |
@@ -73,7 +81,7 @@ int r100_copy_blit(struct radeon_device *rdev, | |||
73 | int r100_set_surface_reg(struct radeon_device *rdev, int reg, | 81 | int r100_set_surface_reg(struct radeon_device *rdev, int reg, |
74 | uint32_t tiling_flags, uint32_t pitch, | 82 | uint32_t tiling_flags, uint32_t pitch, |
75 | uint32_t offset, uint32_t obj_size); | 83 | uint32_t offset, uint32_t obj_size); |
76 | int r100_clear_surface_reg(struct radeon_device *rdev, int reg); | 84 | void r100_clear_surface_reg(struct radeon_device *rdev, int reg); |
77 | void r100_bandwidth_update(struct radeon_device *rdev); | 85 | void r100_bandwidth_update(struct radeon_device *rdev); |
78 | void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); | 86 | void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); |
79 | int r100_ring_test(struct radeon_device *rdev); | 87 | int r100_ring_test(struct radeon_device *rdev); |
@@ -82,44 +90,42 @@ void r100_hpd_fini(struct radeon_device *rdev); | |||
82 | bool r100_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); | 90 | bool r100_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); |
83 | void r100_hpd_set_polarity(struct radeon_device *rdev, | 91 | void r100_hpd_set_polarity(struct radeon_device *rdev, |
84 | enum radeon_hpd_id hpd); | 92 | enum radeon_hpd_id hpd); |
85 | 93 | int r100_debugfs_rbbm_init(struct radeon_device *rdev); | |
86 | static struct radeon_asic r100_asic = { | 94 | int r100_debugfs_cp_init(struct radeon_device *rdev); |
87 | .init = &r100_init, | 95 | void r100_cp_disable(struct radeon_device *rdev); |
88 | .fini = &r100_fini, | 96 | int r100_cp_init(struct radeon_device *rdev, unsigned ring_size); |
89 | .suspend = &r100_suspend, | 97 | void r100_cp_fini(struct radeon_device *rdev); |
90 | .resume = &r100_resume, | 98 | int r100_pci_gart_init(struct radeon_device *rdev); |
91 | .vga_set_state = &r100_vga_set_state, | 99 | void r100_pci_gart_fini(struct radeon_device *rdev); |
92 | .gpu_reset = &r100_gpu_reset, | 100 | int r100_pci_gart_enable(struct radeon_device *rdev); |
93 | .gart_tlb_flush = &r100_pci_gart_tlb_flush, | 101 | void r100_pci_gart_disable(struct radeon_device *rdev); |
94 | .gart_set_page = &r100_pci_gart_set_page, | 102 | int r100_debugfs_mc_info_init(struct radeon_device *rdev); |
95 | .cp_commit = &r100_cp_commit, | 103 | int r100_gui_wait_for_idle(struct radeon_device *rdev); |
96 | .ring_start = &r100_ring_start, | 104 | void r100_ib_fini(struct radeon_device *rdev); |
97 | .ring_test = &r100_ring_test, | 105 | int r100_ib_init(struct radeon_device *rdev); |
98 | .ring_ib_execute = &r100_ring_ib_execute, | 106 | void r100_irq_disable(struct radeon_device *rdev); |
99 | .irq_set = &r100_irq_set, | 107 | void r100_mc_stop(struct radeon_device *rdev, struct r100_mc_save *save); |
100 | .irq_process = &r100_irq_process, | 108 | void r100_mc_resume(struct radeon_device *rdev, struct r100_mc_save *save); |
101 | .get_vblank_counter = &r100_get_vblank_counter, | 109 | void r100_vram_init_sizes(struct radeon_device *rdev); |
102 | .fence_ring_emit = &r100_fence_ring_emit, | 110 | void r100_wb_disable(struct radeon_device *rdev); |
103 | .cs_parse = &r100_cs_parse, | 111 | void r100_wb_fini(struct radeon_device *rdev); |
104 | .copy_blit = &r100_copy_blit, | 112 | int r100_wb_init(struct radeon_device *rdev); |
105 | .copy_dma = NULL, | 113 | void r100_hdp_reset(struct radeon_device *rdev); |
106 | .copy = &r100_copy_blit, | 114 | int r100_rb2d_reset(struct radeon_device *rdev); |
107 | .get_engine_clock = &radeon_legacy_get_engine_clock, | 115 | int r100_cp_reset(struct radeon_device *rdev); |
108 | .set_engine_clock = &radeon_legacy_set_engine_clock, | 116 | void r100_vga_render_disable(struct radeon_device *rdev); |
109 | .get_memory_clock = &radeon_legacy_get_memory_clock, | 117 | int r100_cs_track_check_pkt3_indx_buffer(struct radeon_cs_parser *p, |
110 | .set_memory_clock = NULL, | 118 | struct radeon_cs_packet *pkt, |
111 | .get_pcie_lanes = NULL, | 119 | struct radeon_bo *robj); |
112 | .set_pcie_lanes = NULL, | 120 | int r100_cs_parse_packet0(struct radeon_cs_parser *p, |
113 | .set_clock_gating = &radeon_legacy_set_clock_gating, | 121 | struct radeon_cs_packet *pkt, |
114 | .set_surface_reg = r100_set_surface_reg, | 122 | const unsigned *auth, unsigned n, |
115 | .clear_surface_reg = r100_clear_surface_reg, | 123 | radeon_packet0_check_t check); |
116 | .bandwidth_update = &r100_bandwidth_update, | 124 | int r100_cs_packet_parse(struct radeon_cs_parser *p, |
117 | .hpd_init = &r100_hpd_init, | 125 | struct radeon_cs_packet *pkt, |
118 | .hpd_fini = &r100_hpd_fini, | 126 | unsigned idx); |
119 | .hpd_sense = &r100_hpd_sense, | 127 | void r100_enable_bm(struct radeon_device *rdev); |
120 | .hpd_set_polarity = &r100_hpd_set_polarity, | 128 | void r100_set_common_regs(struct radeon_device *rdev); |
121 | .ioctl_wait_idle = NULL, | ||
122 | }; | ||
123 | 129 | ||
124 | /* | 130 | /* |
125 | * r200,rv250,rs300,rv280 | 131 | * r200,rv250,rs300,rv280 |
@@ -129,43 +135,6 @@ extern int r200_copy_dma(struct radeon_device *rdev, | |||
129 | uint64_t dst_offset, | 135 | uint64_t dst_offset, |
130 | unsigned num_pages, | 136 | unsigned num_pages, |
131 | struct radeon_fence *fence); | 137 | struct radeon_fence *fence); |
132 | static struct radeon_asic r200_asic = { | ||
133 | .init = &r100_init, | ||
134 | .fini = &r100_fini, | ||
135 | .suspend = &r100_suspend, | ||
136 | .resume = &r100_resume, | ||
137 | .vga_set_state = &r100_vga_set_state, | ||
138 | .gpu_reset = &r100_gpu_reset, | ||
139 | .gart_tlb_flush = &r100_pci_gart_tlb_flush, | ||
140 | .gart_set_page = &r100_pci_gart_set_page, | ||
141 | .cp_commit = &r100_cp_commit, | ||
142 | .ring_start = &r100_ring_start, | ||
143 | .ring_test = &r100_ring_test, | ||
144 | .ring_ib_execute = &r100_ring_ib_execute, | ||
145 | .irq_set = &r100_irq_set, | ||
146 | .irq_process = &r100_irq_process, | ||
147 | .get_vblank_counter = &r100_get_vblank_counter, | ||
148 | .fence_ring_emit = &r100_fence_ring_emit, | ||
149 | .cs_parse = &r100_cs_parse, | ||
150 | .copy_blit = &r100_copy_blit, | ||
151 | .copy_dma = &r200_copy_dma, | ||
152 | .copy = &r100_copy_blit, | ||
153 | .get_engine_clock = &radeon_legacy_get_engine_clock, | ||
154 | .set_engine_clock = &radeon_legacy_set_engine_clock, | ||
155 | .get_memory_clock = &radeon_legacy_get_memory_clock, | ||
156 | .set_memory_clock = NULL, | ||
157 | .set_pcie_lanes = NULL, | ||
158 | .set_clock_gating = &radeon_legacy_set_clock_gating, | ||
159 | .set_surface_reg = r100_set_surface_reg, | ||
160 | .clear_surface_reg = r100_clear_surface_reg, | ||
161 | .bandwidth_update = &r100_bandwidth_update, | ||
162 | .hpd_init = &r100_hpd_init, | ||
163 | .hpd_fini = &r100_hpd_fini, | ||
164 | .hpd_sense = &r100_hpd_sense, | ||
165 | .hpd_set_polarity = &r100_hpd_set_polarity, | ||
166 | .ioctl_wait_idle = NULL, | ||
167 | }; | ||
168 | |||
169 | 138 | ||
170 | /* | 139 | /* |
171 | * r300,r350,rv350,rv380 | 140 | * r300,r350,rv350,rv380 |
@@ -186,82 +155,6 @@ extern void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v | |||
186 | extern void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes); | 155 | extern void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes); |
187 | extern int rv370_get_pcie_lanes(struct radeon_device *rdev); | 156 | extern int rv370_get_pcie_lanes(struct radeon_device *rdev); |
188 | 157 | ||
189 | static struct radeon_asic r300_asic = { | ||
190 | .init = &r300_init, | ||
191 | .fini = &r300_fini, | ||
192 | .suspend = &r300_suspend, | ||
193 | .resume = &r300_resume, | ||
194 | .vga_set_state = &r100_vga_set_state, | ||
195 | .gpu_reset = &r300_gpu_reset, | ||
196 | .gart_tlb_flush = &r100_pci_gart_tlb_flush, | ||
197 | .gart_set_page = &r100_pci_gart_set_page, | ||
198 | .cp_commit = &r100_cp_commit, | ||
199 | .ring_start = &r300_ring_start, | ||
200 | .ring_test = &r100_ring_test, | ||
201 | .ring_ib_execute = &r100_ring_ib_execute, | ||
202 | .irq_set = &r100_irq_set, | ||
203 | .irq_process = &r100_irq_process, | ||
204 | .get_vblank_counter = &r100_get_vblank_counter, | ||
205 | .fence_ring_emit = &r300_fence_ring_emit, | ||
206 | .cs_parse = &r300_cs_parse, | ||
207 | .copy_blit = &r100_copy_blit, | ||
208 | .copy_dma = &r200_copy_dma, | ||
209 | .copy = &r100_copy_blit, | ||
210 | .get_engine_clock = &radeon_legacy_get_engine_clock, | ||
211 | .set_engine_clock = &radeon_legacy_set_engine_clock, | ||
212 | .get_memory_clock = &radeon_legacy_get_memory_clock, | ||
213 | .set_memory_clock = NULL, | ||
214 | .get_pcie_lanes = &rv370_get_pcie_lanes, | ||
215 | .set_pcie_lanes = &rv370_set_pcie_lanes, | ||
216 | .set_clock_gating = &radeon_legacy_set_clock_gating, | ||
217 | .set_surface_reg = r100_set_surface_reg, | ||
218 | .clear_surface_reg = r100_clear_surface_reg, | ||
219 | .bandwidth_update = &r100_bandwidth_update, | ||
220 | .hpd_init = &r100_hpd_init, | ||
221 | .hpd_fini = &r100_hpd_fini, | ||
222 | .hpd_sense = &r100_hpd_sense, | ||
223 | .hpd_set_polarity = &r100_hpd_set_polarity, | ||
224 | .ioctl_wait_idle = NULL, | ||
225 | }; | ||
226 | |||
227 | |||
228 | static struct radeon_asic r300_asic_pcie = { | ||
229 | .init = &r300_init, | ||
230 | .fini = &r300_fini, | ||
231 | .suspend = &r300_suspend, | ||
232 | .resume = &r300_resume, | ||
233 | .vga_set_state = &r100_vga_set_state, | ||
234 | .gpu_reset = &r300_gpu_reset, | ||
235 | .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, | ||
236 | .gart_set_page = &rv370_pcie_gart_set_page, | ||
237 | .cp_commit = &r100_cp_commit, | ||
238 | .ring_start = &r300_ring_start, | ||
239 | .ring_test = &r100_ring_test, | ||
240 | .ring_ib_execute = &r100_ring_ib_execute, | ||
241 | .irq_set = &r100_irq_set, | ||
242 | .irq_process = &r100_irq_process, | ||
243 | .get_vblank_counter = &r100_get_vblank_counter, | ||
244 | .fence_ring_emit = &r300_fence_ring_emit, | ||
245 | .cs_parse = &r300_cs_parse, | ||
246 | .copy_blit = &r100_copy_blit, | ||
247 | .copy_dma = &r200_copy_dma, | ||
248 | .copy = &r100_copy_blit, | ||
249 | .get_engine_clock = &radeon_legacy_get_engine_clock, | ||
250 | .set_engine_clock = &radeon_legacy_set_engine_clock, | ||
251 | .get_memory_clock = &radeon_legacy_get_memory_clock, | ||
252 | .set_memory_clock = NULL, | ||
253 | .set_pcie_lanes = &rv370_set_pcie_lanes, | ||
254 | .set_clock_gating = &radeon_legacy_set_clock_gating, | ||
255 | .set_surface_reg = r100_set_surface_reg, | ||
256 | .clear_surface_reg = r100_clear_surface_reg, | ||
257 | .bandwidth_update = &r100_bandwidth_update, | ||
258 | .hpd_init = &r100_hpd_init, | ||
259 | .hpd_fini = &r100_hpd_fini, | ||
260 | .hpd_sense = &r100_hpd_sense, | ||
261 | .hpd_set_polarity = &r100_hpd_set_polarity, | ||
262 | .ioctl_wait_idle = NULL, | ||
263 | }; | ||
264 | |||
265 | /* | 158 | /* |
266 | * r420,r423,rv410 | 159 | * r420,r423,rv410 |
267 | */ | 160 | */ |
@@ -269,44 +162,6 @@ extern int r420_init(struct radeon_device *rdev); | |||
269 | extern void r420_fini(struct radeon_device *rdev); | 162 | extern void r420_fini(struct radeon_device *rdev); |
270 | extern int r420_suspend(struct radeon_device *rdev); | 163 | extern int r420_suspend(struct radeon_device *rdev); |
271 | extern int r420_resume(struct radeon_device *rdev); | 164 | extern int r420_resume(struct radeon_device *rdev); |
272 | static struct radeon_asic r420_asic = { | ||
273 | .init = &r420_init, | ||
274 | .fini = &r420_fini, | ||
275 | .suspend = &r420_suspend, | ||
276 | .resume = &r420_resume, | ||
277 | .vga_set_state = &r100_vga_set_state, | ||
278 | .gpu_reset = &r300_gpu_reset, | ||
279 | .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, | ||
280 | .gart_set_page = &rv370_pcie_gart_set_page, | ||
281 | .cp_commit = &r100_cp_commit, | ||
282 | .ring_start = &r300_ring_start, | ||
283 | .ring_test = &r100_ring_test, | ||
284 | .ring_ib_execute = &r100_ring_ib_execute, | ||
285 | .irq_set = &r100_irq_set, | ||
286 | .irq_process = &r100_irq_process, | ||
287 | .get_vblank_counter = &r100_get_vblank_counter, | ||
288 | .fence_ring_emit = &r300_fence_ring_emit, | ||
289 | .cs_parse = &r300_cs_parse, | ||
290 | .copy_blit = &r100_copy_blit, | ||
291 | .copy_dma = &r200_copy_dma, | ||
292 | .copy = &r100_copy_blit, | ||
293 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
294 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
295 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
296 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
297 | .get_pcie_lanes = &rv370_get_pcie_lanes, | ||
298 | .set_pcie_lanes = &rv370_set_pcie_lanes, | ||
299 | .set_clock_gating = &radeon_atom_set_clock_gating, | ||
300 | .set_surface_reg = r100_set_surface_reg, | ||
301 | .clear_surface_reg = r100_clear_surface_reg, | ||
302 | .bandwidth_update = &r100_bandwidth_update, | ||
303 | .hpd_init = &r100_hpd_init, | ||
304 | .hpd_fini = &r100_hpd_fini, | ||
305 | .hpd_sense = &r100_hpd_sense, | ||
306 | .hpd_set_polarity = &r100_hpd_set_polarity, | ||
307 | .ioctl_wait_idle = NULL, | ||
308 | }; | ||
309 | |||
310 | 165 | ||
311 | /* | 166 | /* |
312 | * rs400,rs480 | 167 | * rs400,rs480 |
@@ -319,44 +174,6 @@ void rs400_gart_tlb_flush(struct radeon_device *rdev); | |||
319 | int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); | 174 | int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); |
320 | uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg); | 175 | uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg); |
321 | void rs400_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); | 176 | void rs400_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
322 | static struct radeon_asic rs400_asic = { | ||
323 | .init = &rs400_init, | ||
324 | .fini = &rs400_fini, | ||
325 | .suspend = &rs400_suspend, | ||
326 | .resume = &rs400_resume, | ||
327 | .vga_set_state = &r100_vga_set_state, | ||
328 | .gpu_reset = &r300_gpu_reset, | ||
329 | .gart_tlb_flush = &rs400_gart_tlb_flush, | ||
330 | .gart_set_page = &rs400_gart_set_page, | ||
331 | .cp_commit = &r100_cp_commit, | ||
332 | .ring_start = &r300_ring_start, | ||
333 | .ring_test = &r100_ring_test, | ||
334 | .ring_ib_execute = &r100_ring_ib_execute, | ||
335 | .irq_set = &r100_irq_set, | ||
336 | .irq_process = &r100_irq_process, | ||
337 | .get_vblank_counter = &r100_get_vblank_counter, | ||
338 | .fence_ring_emit = &r300_fence_ring_emit, | ||
339 | .cs_parse = &r300_cs_parse, | ||
340 | .copy_blit = &r100_copy_blit, | ||
341 | .copy_dma = &r200_copy_dma, | ||
342 | .copy = &r100_copy_blit, | ||
343 | .get_engine_clock = &radeon_legacy_get_engine_clock, | ||
344 | .set_engine_clock = &radeon_legacy_set_engine_clock, | ||
345 | .get_memory_clock = &radeon_legacy_get_memory_clock, | ||
346 | .set_memory_clock = NULL, | ||
347 | .get_pcie_lanes = NULL, | ||
348 | .set_pcie_lanes = NULL, | ||
349 | .set_clock_gating = &radeon_legacy_set_clock_gating, | ||
350 | .set_surface_reg = r100_set_surface_reg, | ||
351 | .clear_surface_reg = r100_clear_surface_reg, | ||
352 | .bandwidth_update = &r100_bandwidth_update, | ||
353 | .hpd_init = &r100_hpd_init, | ||
354 | .hpd_fini = &r100_hpd_fini, | ||
355 | .hpd_sense = &r100_hpd_sense, | ||
356 | .hpd_set_polarity = &r100_hpd_set_polarity, | ||
357 | .ioctl_wait_idle = NULL, | ||
358 | }; | ||
359 | |||
360 | 177 | ||
361 | /* | 178 | /* |
362 | * rs600. | 179 | * rs600. |
@@ -379,45 +196,6 @@ bool rs600_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); | |||
379 | void rs600_hpd_set_polarity(struct radeon_device *rdev, | 196 | void rs600_hpd_set_polarity(struct radeon_device *rdev, |
380 | enum radeon_hpd_id hpd); | 197 | enum radeon_hpd_id hpd); |
381 | 198 | ||
382 | static struct radeon_asic rs600_asic = { | ||
383 | .init = &rs600_init, | ||
384 | .fini = &rs600_fini, | ||
385 | .suspend = &rs600_suspend, | ||
386 | .resume = &rs600_resume, | ||
387 | .vga_set_state = &r100_vga_set_state, | ||
388 | .gpu_reset = &r300_gpu_reset, | ||
389 | .gart_tlb_flush = &rs600_gart_tlb_flush, | ||
390 | .gart_set_page = &rs600_gart_set_page, | ||
391 | .cp_commit = &r100_cp_commit, | ||
392 | .ring_start = &r300_ring_start, | ||
393 | .ring_test = &r100_ring_test, | ||
394 | .ring_ib_execute = &r100_ring_ib_execute, | ||
395 | .irq_set = &rs600_irq_set, | ||
396 | .irq_process = &rs600_irq_process, | ||
397 | .get_vblank_counter = &rs600_get_vblank_counter, | ||
398 | .fence_ring_emit = &r300_fence_ring_emit, | ||
399 | .cs_parse = &r300_cs_parse, | ||
400 | .copy_blit = &r100_copy_blit, | ||
401 | .copy_dma = &r200_copy_dma, | ||
402 | .copy = &r100_copy_blit, | ||
403 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
404 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
405 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
406 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
407 | .get_pcie_lanes = NULL, | ||
408 | .set_pcie_lanes = NULL, | ||
409 | .set_clock_gating = &radeon_atom_set_clock_gating, | ||
410 | .set_surface_reg = r100_set_surface_reg, | ||
411 | .clear_surface_reg = r100_clear_surface_reg, | ||
412 | .bandwidth_update = &rs600_bandwidth_update, | ||
413 | .hpd_init = &rs600_hpd_init, | ||
414 | .hpd_fini = &rs600_hpd_fini, | ||
415 | .hpd_sense = &rs600_hpd_sense, | ||
416 | .hpd_set_polarity = &rs600_hpd_set_polarity, | ||
417 | .ioctl_wait_idle = NULL, | ||
418 | }; | ||
419 | |||
420 | |||
421 | /* | 199 | /* |
422 | * rs690,rs740 | 200 | * rs690,rs740 |
423 | */ | 201 | */ |
@@ -428,44 +206,6 @@ int rs690_suspend(struct radeon_device *rdev); | |||
428 | uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg); | 206 | uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg); |
429 | void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); | 207 | void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
430 | void rs690_bandwidth_update(struct radeon_device *rdev); | 208 | void rs690_bandwidth_update(struct radeon_device *rdev); |
431 | static struct radeon_asic rs690_asic = { | ||
432 | .init = &rs690_init, | ||
433 | .fini = &rs690_fini, | ||
434 | .suspend = &rs690_suspend, | ||
435 | .resume = &rs690_resume, | ||
436 | .vga_set_state = &r100_vga_set_state, | ||
437 | .gpu_reset = &r300_gpu_reset, | ||
438 | .gart_tlb_flush = &rs400_gart_tlb_flush, | ||
439 | .gart_set_page = &rs400_gart_set_page, | ||
440 | .cp_commit = &r100_cp_commit, | ||
441 | .ring_start = &r300_ring_start, | ||
442 | .ring_test = &r100_ring_test, | ||
443 | .ring_ib_execute = &r100_ring_ib_execute, | ||
444 | .irq_set = &rs600_irq_set, | ||
445 | .irq_process = &rs600_irq_process, | ||
446 | .get_vblank_counter = &rs600_get_vblank_counter, | ||
447 | .fence_ring_emit = &r300_fence_ring_emit, | ||
448 | .cs_parse = &r300_cs_parse, | ||
449 | .copy_blit = &r100_copy_blit, | ||
450 | .copy_dma = &r200_copy_dma, | ||
451 | .copy = &r200_copy_dma, | ||
452 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
453 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
454 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
455 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
456 | .get_pcie_lanes = NULL, | ||
457 | .set_pcie_lanes = NULL, | ||
458 | .set_clock_gating = &radeon_atom_set_clock_gating, | ||
459 | .set_surface_reg = r100_set_surface_reg, | ||
460 | .clear_surface_reg = r100_clear_surface_reg, | ||
461 | .bandwidth_update = &rs690_bandwidth_update, | ||
462 | .hpd_init = &rs600_hpd_init, | ||
463 | .hpd_fini = &rs600_hpd_fini, | ||
464 | .hpd_sense = &rs600_hpd_sense, | ||
465 | .hpd_set_polarity = &rs600_hpd_set_polarity, | ||
466 | .ioctl_wait_idle = NULL, | ||
467 | }; | ||
468 | |||
469 | 209 | ||
470 | /* | 210 | /* |
471 | * rv515 | 211 | * rv515 |
@@ -481,87 +221,12 @@ void rv515_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); | |||
481 | void rv515_bandwidth_update(struct radeon_device *rdev); | 221 | void rv515_bandwidth_update(struct radeon_device *rdev); |
482 | int rv515_resume(struct radeon_device *rdev); | 222 | int rv515_resume(struct radeon_device *rdev); |
483 | int rv515_suspend(struct radeon_device *rdev); | 223 | int rv515_suspend(struct radeon_device *rdev); |
484 | static struct radeon_asic rv515_asic = { | ||
485 | .init = &rv515_init, | ||
486 | .fini = &rv515_fini, | ||
487 | .suspend = &rv515_suspend, | ||
488 | .resume = &rv515_resume, | ||
489 | .vga_set_state = &r100_vga_set_state, | ||
490 | .gpu_reset = &rv515_gpu_reset, | ||
491 | .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, | ||
492 | .gart_set_page = &rv370_pcie_gart_set_page, | ||
493 | .cp_commit = &r100_cp_commit, | ||
494 | .ring_start = &rv515_ring_start, | ||
495 | .ring_test = &r100_ring_test, | ||
496 | .ring_ib_execute = &r100_ring_ib_execute, | ||
497 | .irq_set = &rs600_irq_set, | ||
498 | .irq_process = &rs600_irq_process, | ||
499 | .get_vblank_counter = &rs600_get_vblank_counter, | ||
500 | .fence_ring_emit = &r300_fence_ring_emit, | ||
501 | .cs_parse = &r300_cs_parse, | ||
502 | .copy_blit = &r100_copy_blit, | ||
503 | .copy_dma = &r200_copy_dma, | ||
504 | .copy = &r100_copy_blit, | ||
505 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
506 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
507 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
508 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
509 | .get_pcie_lanes = &rv370_get_pcie_lanes, | ||
510 | .set_pcie_lanes = &rv370_set_pcie_lanes, | ||
511 | .set_clock_gating = &radeon_atom_set_clock_gating, | ||
512 | .set_surface_reg = r100_set_surface_reg, | ||
513 | .clear_surface_reg = r100_clear_surface_reg, | ||
514 | .bandwidth_update = &rv515_bandwidth_update, | ||
515 | .hpd_init = &rs600_hpd_init, | ||
516 | .hpd_fini = &rs600_hpd_fini, | ||
517 | .hpd_sense = &rs600_hpd_sense, | ||
518 | .hpd_set_polarity = &rs600_hpd_set_polarity, | ||
519 | .ioctl_wait_idle = NULL, | ||
520 | }; | ||
521 | |||
522 | 224 | ||
523 | /* | 225 | /* |
524 | * r520,rv530,rv560,rv570,r580 | 226 | * r520,rv530,rv560,rv570,r580 |
525 | */ | 227 | */ |
526 | int r520_init(struct radeon_device *rdev); | 228 | int r520_init(struct radeon_device *rdev); |
527 | int r520_resume(struct radeon_device *rdev); | 229 | int r520_resume(struct radeon_device *rdev); |
528 | static struct radeon_asic r520_asic = { | ||
529 | .init = &r520_init, | ||
530 | .fini = &rv515_fini, | ||
531 | .suspend = &rv515_suspend, | ||
532 | .resume = &r520_resume, | ||
533 | .vga_set_state = &r100_vga_set_state, | ||
534 | .gpu_reset = &rv515_gpu_reset, | ||
535 | .gart_tlb_flush = &rv370_pcie_gart_tlb_flush, | ||
536 | .gart_set_page = &rv370_pcie_gart_set_page, | ||
537 | .cp_commit = &r100_cp_commit, | ||
538 | .ring_start = &rv515_ring_start, | ||
539 | .ring_test = &r100_ring_test, | ||
540 | .ring_ib_execute = &r100_ring_ib_execute, | ||
541 | .irq_set = &rs600_irq_set, | ||
542 | .irq_process = &rs600_irq_process, | ||
543 | .get_vblank_counter = &rs600_get_vblank_counter, | ||
544 | .fence_ring_emit = &r300_fence_ring_emit, | ||
545 | .cs_parse = &r300_cs_parse, | ||
546 | .copy_blit = &r100_copy_blit, | ||
547 | .copy_dma = &r200_copy_dma, | ||
548 | .copy = &r100_copy_blit, | ||
549 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
550 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
551 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
552 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
553 | .get_pcie_lanes = &rv370_get_pcie_lanes, | ||
554 | .set_pcie_lanes = &rv370_set_pcie_lanes, | ||
555 | .set_clock_gating = &radeon_atom_set_clock_gating, | ||
556 | .set_surface_reg = r100_set_surface_reg, | ||
557 | .clear_surface_reg = r100_clear_surface_reg, | ||
558 | .bandwidth_update = &rv515_bandwidth_update, | ||
559 | .hpd_init = &rs600_hpd_init, | ||
560 | .hpd_fini = &rs600_hpd_fini, | ||
561 | .hpd_sense = &rs600_hpd_sense, | ||
562 | .hpd_set_polarity = &rs600_hpd_set_polarity, | ||
563 | .ioctl_wait_idle = NULL, | ||
564 | }; | ||
565 | 230 | ||
566 | /* | 231 | /* |
567 | * r600,rv610,rv630,rv620,rv635,rv670,rs780,rs880 | 232 | * r600,rv610,rv630,rv620,rv635,rv670,rs780,rs880 |
@@ -591,7 +256,7 @@ int r600_gpu_reset(struct radeon_device *rdev); | |||
591 | int r600_set_surface_reg(struct radeon_device *rdev, int reg, | 256 | int r600_set_surface_reg(struct radeon_device *rdev, int reg, |
592 | uint32_t tiling_flags, uint32_t pitch, | 257 | uint32_t tiling_flags, uint32_t pitch, |
593 | uint32_t offset, uint32_t obj_size); | 258 | uint32_t offset, uint32_t obj_size); |
594 | int r600_clear_surface_reg(struct radeon_device *rdev, int reg); | 259 | void r600_clear_surface_reg(struct radeon_device *rdev, int reg); |
595 | void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); | 260 | void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); |
596 | int r600_ring_test(struct radeon_device *rdev); | 261 | int r600_ring_test(struct radeon_device *rdev); |
597 | int r600_copy_blit(struct radeon_device *rdev, | 262 | int r600_copy_blit(struct radeon_device *rdev, |
@@ -604,43 +269,6 @@ void r600_hpd_set_polarity(struct radeon_device *rdev, | |||
604 | enum radeon_hpd_id hpd); | 269 | enum radeon_hpd_id hpd); |
605 | extern void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo); | 270 | extern void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo); |
606 | 271 | ||
607 | static struct radeon_asic r600_asic = { | ||
608 | .init = &r600_init, | ||
609 | .fini = &r600_fini, | ||
610 | .suspend = &r600_suspend, | ||
611 | .resume = &r600_resume, | ||
612 | .cp_commit = &r600_cp_commit, | ||
613 | .vga_set_state = &r600_vga_set_state, | ||
614 | .gpu_reset = &r600_gpu_reset, | ||
615 | .gart_tlb_flush = &r600_pcie_gart_tlb_flush, | ||
616 | .gart_set_page = &rs600_gart_set_page, | ||
617 | .ring_test = &r600_ring_test, | ||
618 | .ring_ib_execute = &r600_ring_ib_execute, | ||
619 | .irq_set = &r600_irq_set, | ||
620 | .irq_process = &r600_irq_process, | ||
621 | .get_vblank_counter = &rs600_get_vblank_counter, | ||
622 | .fence_ring_emit = &r600_fence_ring_emit, | ||
623 | .cs_parse = &r600_cs_parse, | ||
624 | .copy_blit = &r600_copy_blit, | ||
625 | .copy_dma = &r600_copy_blit, | ||
626 | .copy = &r600_copy_blit, | ||
627 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
628 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
629 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
630 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
631 | .get_pcie_lanes = &rv370_get_pcie_lanes, | ||
632 | .set_pcie_lanes = NULL, | ||
633 | .set_clock_gating = NULL, | ||
634 | .set_surface_reg = r600_set_surface_reg, | ||
635 | .clear_surface_reg = r600_clear_surface_reg, | ||
636 | .bandwidth_update = &rv515_bandwidth_update, | ||
637 | .hpd_init = &r600_hpd_init, | ||
638 | .hpd_fini = &r600_hpd_fini, | ||
639 | .hpd_sense = &r600_hpd_sense, | ||
640 | .hpd_set_polarity = &r600_hpd_set_polarity, | ||
641 | .ioctl_wait_idle = r600_ioctl_wait_idle, | ||
642 | }; | ||
643 | |||
644 | /* | 272 | /* |
645 | * rv770,rv730,rv710,rv740 | 273 | * rv770,rv730,rv710,rv740 |
646 | */ | 274 | */ |
@@ -650,43 +278,6 @@ int rv770_suspend(struct radeon_device *rdev); | |||
650 | int rv770_resume(struct radeon_device *rdev); | 278 | int rv770_resume(struct radeon_device *rdev); |
651 | int rv770_gpu_reset(struct radeon_device *rdev); | 279 | int rv770_gpu_reset(struct radeon_device *rdev); |
652 | 280 | ||
653 | static struct radeon_asic rv770_asic = { | ||
654 | .init = &rv770_init, | ||
655 | .fini = &rv770_fini, | ||
656 | .suspend = &rv770_suspend, | ||
657 | .resume = &rv770_resume, | ||
658 | .cp_commit = &r600_cp_commit, | ||
659 | .gpu_reset = &rv770_gpu_reset, | ||
660 | .vga_set_state = &r600_vga_set_state, | ||
661 | .gart_tlb_flush = &r600_pcie_gart_tlb_flush, | ||
662 | .gart_set_page = &rs600_gart_set_page, | ||
663 | .ring_test = &r600_ring_test, | ||
664 | .ring_ib_execute = &r600_ring_ib_execute, | ||
665 | .irq_set = &r600_irq_set, | ||
666 | .irq_process = &r600_irq_process, | ||
667 | .get_vblank_counter = &rs600_get_vblank_counter, | ||
668 | .fence_ring_emit = &r600_fence_ring_emit, | ||
669 | .cs_parse = &r600_cs_parse, | ||
670 | .copy_blit = &r600_copy_blit, | ||
671 | .copy_dma = &r600_copy_blit, | ||
672 | .copy = &r600_copy_blit, | ||
673 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
674 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
675 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
676 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
677 | .get_pcie_lanes = &rv370_get_pcie_lanes, | ||
678 | .set_pcie_lanes = NULL, | ||
679 | .set_clock_gating = &radeon_atom_set_clock_gating, | ||
680 | .set_surface_reg = r600_set_surface_reg, | ||
681 | .clear_surface_reg = r600_clear_surface_reg, | ||
682 | .bandwidth_update = &rv515_bandwidth_update, | ||
683 | .hpd_init = &r600_hpd_init, | ||
684 | .hpd_fini = &r600_hpd_fini, | ||
685 | .hpd_sense = &r600_hpd_sense, | ||
686 | .hpd_set_polarity = &r600_hpd_set_polarity, | ||
687 | .ioctl_wait_idle = r600_ioctl_wait_idle, | ||
688 | }; | ||
689 | |||
690 | /* | 281 | /* |
691 | * evergreen | 282 | * evergreen |
692 | */ | 283 | */ |
@@ -701,40 +292,4 @@ void evergreen_hpd_fini(struct radeon_device *rdev); | |||
701 | bool evergreen_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); | 292 | bool evergreen_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); |
702 | void evergreen_hpd_set_polarity(struct radeon_device *rdev, | 293 | void evergreen_hpd_set_polarity(struct radeon_device *rdev, |
703 | enum radeon_hpd_id hpd); | 294 | enum radeon_hpd_id hpd); |
704 | |||
705 | static struct radeon_asic evergreen_asic = { | ||
706 | .init = &evergreen_init, | ||
707 | .fini = &evergreen_fini, | ||
708 | .suspend = &evergreen_suspend, | ||
709 | .resume = &evergreen_resume, | ||
710 | .cp_commit = NULL, | ||
711 | .gpu_reset = &evergreen_gpu_reset, | ||
712 | .vga_set_state = &r600_vga_set_state, | ||
713 | .gart_tlb_flush = &r600_pcie_gart_tlb_flush, | ||
714 | .gart_set_page = &rs600_gart_set_page, | ||
715 | .ring_test = NULL, | ||
716 | .ring_ib_execute = NULL, | ||
717 | .irq_set = NULL, | ||
718 | .irq_process = NULL, | ||
719 | .get_vblank_counter = NULL, | ||
720 | .fence_ring_emit = NULL, | ||
721 | .cs_parse = NULL, | ||
722 | .copy_blit = NULL, | ||
723 | .copy_dma = NULL, | ||
724 | .copy = NULL, | ||
725 | .get_engine_clock = &radeon_atom_get_engine_clock, | ||
726 | .set_engine_clock = &radeon_atom_set_engine_clock, | ||
727 | .get_memory_clock = &radeon_atom_get_memory_clock, | ||
728 | .set_memory_clock = &radeon_atom_set_memory_clock, | ||
729 | .set_pcie_lanes = NULL, | ||
730 | .set_clock_gating = NULL, | ||
731 | .set_surface_reg = r600_set_surface_reg, | ||
732 | .clear_surface_reg = r600_clear_surface_reg, | ||
733 | .bandwidth_update = &evergreen_bandwidth_update, | ||
734 | .hpd_init = &evergreen_hpd_init, | ||
735 | .hpd_fini = &evergreen_hpd_fini, | ||
736 | .hpd_sense = &evergreen_hpd_sense, | ||
737 | .hpd_set_polarity = &evergreen_hpd_set_polarity, | ||
738 | }; | ||
739 | |||
740 | #endif | 295 | #endif |
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 93783b15c81d..5673665ff216 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
@@ -69,52 +69,54 @@ static inline struct radeon_i2c_bus_rec radeon_lookup_i2c_gpio(struct radeon_dev | |||
69 | struct radeon_i2c_bus_rec i2c; | 69 | struct radeon_i2c_bus_rec i2c; |
70 | int index = GetIndexIntoMasterTable(DATA, GPIO_I2C_Info); | 70 | int index = GetIndexIntoMasterTable(DATA, GPIO_I2C_Info); |
71 | struct _ATOM_GPIO_I2C_INFO *i2c_info; | 71 | struct _ATOM_GPIO_I2C_INFO *i2c_info; |
72 | uint16_t data_offset; | 72 | uint16_t data_offset, size; |
73 | int i; | 73 | int i, num_indices; |
74 | 74 | ||
75 | memset(&i2c, 0, sizeof(struct radeon_i2c_bus_rec)); | 75 | memset(&i2c, 0, sizeof(struct radeon_i2c_bus_rec)); |
76 | i2c.valid = false; | 76 | i2c.valid = false; |
77 | 77 | ||
78 | atom_parse_data_header(ctx, index, NULL, NULL, NULL, &data_offset); | 78 | if (atom_parse_data_header(ctx, index, &size, NULL, NULL, &data_offset)) { |
79 | 79 | i2c_info = (struct _ATOM_GPIO_I2C_INFO *)(ctx->bios + data_offset); | |
80 | i2c_info = (struct _ATOM_GPIO_I2C_INFO *)(ctx->bios + data_offset); | 80 | |
81 | 81 | num_indices = (size - sizeof(ATOM_COMMON_TABLE_HEADER)) / | |
82 | 82 | sizeof(ATOM_GPIO_I2C_ASSIGMENT); | |
83 | for (i = 0; i < ATOM_MAX_SUPPORTED_DEVICE; i++) { | 83 | |
84 | gpio = &i2c_info->asGPIO_Info[i]; | 84 | for (i = 0; i < num_indices; i++) { |
85 | 85 | gpio = &i2c_info->asGPIO_Info[i]; | |
86 | if (gpio->sucI2cId.ucAccess == id) { | 86 | |
87 | i2c.mask_clk_reg = le16_to_cpu(gpio->usClkMaskRegisterIndex) * 4; | 87 | if (gpio->sucI2cId.ucAccess == id) { |
88 | i2c.mask_data_reg = le16_to_cpu(gpio->usDataMaskRegisterIndex) * 4; | 88 | i2c.mask_clk_reg = le16_to_cpu(gpio->usClkMaskRegisterIndex) * 4; |
89 | i2c.en_clk_reg = le16_to_cpu(gpio->usClkEnRegisterIndex) * 4; | 89 | i2c.mask_data_reg = le16_to_cpu(gpio->usDataMaskRegisterIndex) * 4; |
90 | i2c.en_data_reg = le16_to_cpu(gpio->usDataEnRegisterIndex) * 4; | 90 | i2c.en_clk_reg = le16_to_cpu(gpio->usClkEnRegisterIndex) * 4; |
91 | i2c.y_clk_reg = le16_to_cpu(gpio->usClkY_RegisterIndex) * 4; | 91 | i2c.en_data_reg = le16_to_cpu(gpio->usDataEnRegisterIndex) * 4; |
92 | i2c.y_data_reg = le16_to_cpu(gpio->usDataY_RegisterIndex) * 4; | 92 | i2c.y_clk_reg = le16_to_cpu(gpio->usClkY_RegisterIndex) * 4; |
93 | i2c.a_clk_reg = le16_to_cpu(gpio->usClkA_RegisterIndex) * 4; | 93 | i2c.y_data_reg = le16_to_cpu(gpio->usDataY_RegisterIndex) * 4; |
94 | i2c.a_data_reg = le16_to_cpu(gpio->usDataA_RegisterIndex) * 4; | 94 | i2c.a_clk_reg = le16_to_cpu(gpio->usClkA_RegisterIndex) * 4; |
95 | i2c.mask_clk_mask = (1 << gpio->ucClkMaskShift); | 95 | i2c.a_data_reg = le16_to_cpu(gpio->usDataA_RegisterIndex) * 4; |
96 | i2c.mask_data_mask = (1 << gpio->ucDataMaskShift); | 96 | i2c.mask_clk_mask = (1 << gpio->ucClkMaskShift); |
97 | i2c.en_clk_mask = (1 << gpio->ucClkEnShift); | 97 | i2c.mask_data_mask = (1 << gpio->ucDataMaskShift); |
98 | i2c.en_data_mask = (1 << gpio->ucDataEnShift); | 98 | i2c.en_clk_mask = (1 << gpio->ucClkEnShift); |
99 | i2c.y_clk_mask = (1 << gpio->ucClkY_Shift); | 99 | i2c.en_data_mask = (1 << gpio->ucDataEnShift); |
100 | i2c.y_data_mask = (1 << gpio->ucDataY_Shift); | 100 | i2c.y_clk_mask = (1 << gpio->ucClkY_Shift); |
101 | i2c.a_clk_mask = (1 << gpio->ucClkA_Shift); | 101 | i2c.y_data_mask = (1 << gpio->ucDataY_Shift); |
102 | i2c.a_data_mask = (1 << gpio->ucDataA_Shift); | 102 | i2c.a_clk_mask = (1 << gpio->ucClkA_Shift); |
103 | 103 | i2c.a_data_mask = (1 << gpio->ucDataA_Shift); | |
104 | if (gpio->sucI2cId.sbfAccess.bfHW_Capable) | 104 | |
105 | i2c.hw_capable = true; | 105 | if (gpio->sucI2cId.sbfAccess.bfHW_Capable) |
106 | else | 106 | i2c.hw_capable = true; |
107 | i2c.hw_capable = false; | 107 | else |
108 | 108 | i2c.hw_capable = false; | |
109 | if (gpio->sucI2cId.ucAccess == 0xa0) | 109 | |
110 | i2c.mm_i2c = true; | 110 | if (gpio->sucI2cId.ucAccess == 0xa0) |
111 | else | 111 | i2c.mm_i2c = true; |
112 | i2c.mm_i2c = false; | 112 | else |
113 | 113 | i2c.mm_i2c = false; | |
114 | i2c.i2c_id = gpio->sucI2cId.ucAccess; | 114 | |
115 | 115 | i2c.i2c_id = gpio->sucI2cId.ucAccess; | |
116 | i2c.valid = true; | 116 | |
117 | break; | 117 | i2c.valid = true; |
118 | break; | ||
119 | } | ||
118 | } | 120 | } |
119 | } | 121 | } |
120 | 122 | ||
@@ -135,20 +137,21 @@ static inline struct radeon_gpio_rec radeon_lookup_gpio(struct radeon_device *rd | |||
135 | memset(&gpio, 0, sizeof(struct radeon_gpio_rec)); | 137 | memset(&gpio, 0, sizeof(struct radeon_gpio_rec)); |
136 | gpio.valid = false; | 138 | gpio.valid = false; |
137 | 139 | ||
138 | atom_parse_data_header(ctx, index, &size, NULL, NULL, &data_offset); | 140 | if (atom_parse_data_header(ctx, index, &size, NULL, NULL, &data_offset)) { |
141 | gpio_info = (struct _ATOM_GPIO_PIN_LUT *)(ctx->bios + data_offset); | ||
139 | 142 | ||
140 | gpio_info = (struct _ATOM_GPIO_PIN_LUT *)(ctx->bios + data_offset); | 143 | num_indices = (size - sizeof(ATOM_COMMON_TABLE_HEADER)) / |
144 | sizeof(ATOM_GPIO_PIN_ASSIGNMENT); | ||
141 | 145 | ||
142 | num_indices = (size - sizeof(ATOM_COMMON_TABLE_HEADER)) / sizeof(ATOM_GPIO_PIN_ASSIGNMENT); | 146 | for (i = 0; i < num_indices; i++) { |
143 | 147 | pin = &gpio_info->asGPIO_Pin[i]; | |
144 | for (i = 0; i < num_indices; i++) { | 148 | if (id == pin->ucGPIO_ID) { |
145 | pin = &gpio_info->asGPIO_Pin[i]; | 149 | gpio.id = pin->ucGPIO_ID; |
146 | if (id == pin->ucGPIO_ID) { | 150 | gpio.reg = pin->usGpioPin_AIndex * 4; |
147 | gpio.id = pin->ucGPIO_ID; | 151 | gpio.mask = (1 << pin->ucGpioPinBitShift); |
148 | gpio.reg = pin->usGpioPin_AIndex * 4; | 152 | gpio.valid = true; |
149 | gpio.mask = (1 << pin->ucGpioPinBitShift); | 153 | break; |
150 | gpio.valid = true; | 154 | } |
151 | break; | ||
152 | } | 155 | } |
153 | } | 156 | } |
154 | 157 | ||
@@ -264,6 +267,8 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev, | |||
264 | if ((supported_device == ATOM_DEVICE_CRT1_SUPPORT) || | 267 | if ((supported_device == ATOM_DEVICE_CRT1_SUPPORT) || |
265 | (supported_device == ATOM_DEVICE_DFP2_SUPPORT)) | 268 | (supported_device == ATOM_DEVICE_DFP2_SUPPORT)) |
266 | return false; | 269 | return false; |
270 | if (supported_device == ATOM_DEVICE_CRT2_SUPPORT) | ||
271 | *line_mux = 0x90; | ||
267 | } | 272 | } |
268 | 273 | ||
269 | /* ASUS HD 3600 XT board lists the DVI port as HDMI */ | 274 | /* ASUS HD 3600 XT board lists the DVI port as HDMI */ |
@@ -395,9 +400,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) | |||
395 | struct radeon_gpio_rec gpio; | 400 | struct radeon_gpio_rec gpio; |
396 | struct radeon_hpd hpd; | 401 | struct radeon_hpd hpd; |
397 | 402 | ||
398 | atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset); | 403 | if (!atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset)) |
399 | |||
400 | if (data_offset == 0) | ||
401 | return false; | 404 | return false; |
402 | 405 | ||
403 | if (crev < 2) | 406 | if (crev < 2) |
@@ -449,37 +452,43 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) | |||
449 | GetIndexIntoMasterTable(DATA, | 452 | GetIndexIntoMasterTable(DATA, |
450 | IntegratedSystemInfo); | 453 | IntegratedSystemInfo); |
451 | 454 | ||
452 | atom_parse_data_header(ctx, index, &size, &frev, | 455 | if (atom_parse_data_header(ctx, index, &size, &frev, |
453 | &crev, &igp_offset); | 456 | &crev, &igp_offset)) { |
454 | 457 | ||
455 | if (crev >= 2) { | 458 | if (crev >= 2) { |
456 | igp_obj = | 459 | igp_obj = |
457 | (ATOM_INTEGRATED_SYSTEM_INFO_V2 | 460 | (ATOM_INTEGRATED_SYSTEM_INFO_V2 |
458 | *) (ctx->bios + igp_offset); | 461 | *) (ctx->bios + igp_offset); |
459 | 462 | ||
460 | if (igp_obj) { | 463 | if (igp_obj) { |
461 | uint32_t slot_config, ct; | 464 | uint32_t slot_config, ct; |
462 | 465 | ||
463 | if (con_obj_num == 1) | 466 | if (con_obj_num == 1) |
464 | slot_config = | 467 | slot_config = |
465 | igp_obj-> | 468 | igp_obj-> |
466 | ulDDISlot1Config; | 469 | ulDDISlot1Config; |
467 | else | 470 | else |
468 | slot_config = | 471 | slot_config = |
469 | igp_obj-> | 472 | igp_obj-> |
470 | ulDDISlot2Config; | 473 | ulDDISlot2Config; |
471 | 474 | ||
472 | ct = (slot_config >> 16) & 0xff; | 475 | ct = (slot_config >> 16) & 0xff; |
473 | connector_type = | 476 | connector_type = |
474 | object_connector_convert | 477 | object_connector_convert |
475 | [ct]; | 478 | [ct]; |
476 | connector_object_id = ct; | 479 | connector_object_id = ct; |
477 | igp_lane_info = | 480 | igp_lane_info = |
478 | slot_config & 0xffff; | 481 | slot_config & 0xffff; |
482 | } else | ||
483 | continue; | ||
479 | } else | 484 | } else |
480 | continue; | 485 | continue; |
481 | } else | 486 | } else { |
482 | continue; | 487 | igp_lane_info = 0; |
488 | connector_type = | ||
489 | object_connector_convert[con_obj_id]; | ||
490 | connector_object_id = con_obj_id; | ||
491 | } | ||
483 | } else { | 492 | } else { |
484 | igp_lane_info = 0; | 493 | igp_lane_info = 0; |
485 | connector_type = | 494 | connector_type = |
@@ -627,20 +636,23 @@ static uint16_t atombios_get_connector_object_id(struct drm_device *dev, | |||
627 | uint8_t frev, crev; | 636 | uint8_t frev, crev; |
628 | ATOM_XTMDS_INFO *xtmds; | 637 | ATOM_XTMDS_INFO *xtmds; |
629 | 638 | ||
630 | atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset); | 639 | if (atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset)) { |
631 | xtmds = (ATOM_XTMDS_INFO *)(ctx->bios + data_offset); | 640 | xtmds = (ATOM_XTMDS_INFO *)(ctx->bios + data_offset); |
632 | 641 | ||
633 | if (xtmds->ucSupportedLink & ATOM_XTMDS_SUPPORTED_DUALLINK) { | 642 | if (xtmds->ucSupportedLink & ATOM_XTMDS_SUPPORTED_DUALLINK) { |
634 | if (connector_type == DRM_MODE_CONNECTOR_DVII) | 643 | if (connector_type == DRM_MODE_CONNECTOR_DVII) |
635 | return CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I; | 644 | return CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I; |
636 | else | 645 | else |
637 | return CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D; | 646 | return CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D; |
638 | } else { | 647 | } else { |
639 | if (connector_type == DRM_MODE_CONNECTOR_DVII) | 648 | if (connector_type == DRM_MODE_CONNECTOR_DVII) |
640 | return CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I; | 649 | return CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I; |
641 | else | 650 | else |
642 | return CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D; | 651 | return CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D; |
643 | } | 652 | } |
653 | } else | ||
654 | return supported_devices_connector_object_id_convert | ||
655 | [connector_type]; | ||
644 | } else { | 656 | } else { |
645 | return supported_devices_connector_object_id_convert | 657 | return supported_devices_connector_object_id_convert |
646 | [connector_type]; | 658 | [connector_type]; |
@@ -672,7 +684,8 @@ bool radeon_get_atom_connector_info_from_supported_devices_table(struct | |||
672 | int i, j, max_device; | 684 | int i, j, max_device; |
673 | struct bios_connector bios_connectors[ATOM_MAX_SUPPORTED_DEVICE]; | 685 | struct bios_connector bios_connectors[ATOM_MAX_SUPPORTED_DEVICE]; |
674 | 686 | ||
675 | atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset); | 687 | if (!atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset)) |
688 | return false; | ||
676 | 689 | ||
677 | supported_devices = | 690 | supported_devices = |
678 | (union atom_supported_devices *)(ctx->bios + data_offset); | 691 | (union atom_supported_devices *)(ctx->bios + data_offset); |
@@ -865,14 +878,11 @@ bool radeon_atom_get_clock_info(struct drm_device *dev) | |||
865 | struct radeon_pll *mpll = &rdev->clock.mpll; | 878 | struct radeon_pll *mpll = &rdev->clock.mpll; |
866 | uint16_t data_offset; | 879 | uint16_t data_offset; |
867 | 880 | ||
868 | atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, | 881 | if (atom_parse_data_header(mode_info->atom_context, index, NULL, |
869 | &crev, &data_offset); | 882 | &frev, &crev, &data_offset)) { |
870 | 883 | firmware_info = | |
871 | firmware_info = | 884 | (union firmware_info *)(mode_info->atom_context->bios + |
872 | (union firmware_info *)(mode_info->atom_context->bios + | 885 | data_offset); |
873 | data_offset); | ||
874 | |||
875 | if (firmware_info) { | ||
876 | /* pixel clocks */ | 886 | /* pixel clocks */ |
877 | p1pll->reference_freq = | 887 | p1pll->reference_freq = |
878 | le16_to_cpu(firmware_info->info.usReferenceClock); | 888 | le16_to_cpu(firmware_info->info.usReferenceClock); |
@@ -887,6 +897,20 @@ bool radeon_atom_get_clock_info(struct drm_device *dev) | |||
887 | p1pll->pll_out_max = | 897 | p1pll->pll_out_max = |
888 | le32_to_cpu(firmware_info->info.ulMaxPixelClockPLL_Output); | 898 | le32_to_cpu(firmware_info->info.ulMaxPixelClockPLL_Output); |
889 | 899 | ||
900 | if (crev >= 4) { | ||
901 | p1pll->lcd_pll_out_min = | ||
902 | le16_to_cpu(firmware_info->info_14.usLcdMinPixelClockPLL_Output) * 100; | ||
903 | if (p1pll->lcd_pll_out_min == 0) | ||
904 | p1pll->lcd_pll_out_min = p1pll->pll_out_min; | ||
905 | p1pll->lcd_pll_out_max = | ||
906 | le16_to_cpu(firmware_info->info_14.usLcdMaxPixelClockPLL_Output) * 100; | ||
907 | if (p1pll->lcd_pll_out_max == 0) | ||
908 | p1pll->lcd_pll_out_max = p1pll->pll_out_max; | ||
909 | } else { | ||
910 | p1pll->lcd_pll_out_min = p1pll->pll_out_min; | ||
911 | p1pll->lcd_pll_out_max = p1pll->pll_out_max; | ||
912 | } | ||
913 | |||
890 | if (p1pll->pll_out_min == 0) { | 914 | if (p1pll->pll_out_min == 0) { |
891 | if (ASIC_IS_AVIVO(rdev)) | 915 | if (ASIC_IS_AVIVO(rdev)) |
892 | p1pll->pll_out_min = 64800; | 916 | p1pll->pll_out_min = 64800; |
@@ -992,13 +1016,10 @@ bool radeon_atombios_sideport_present(struct radeon_device *rdev) | |||
992 | u8 frev, crev; | 1016 | u8 frev, crev; |
993 | u16 data_offset; | 1017 | u16 data_offset; |
994 | 1018 | ||
995 | atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, | 1019 | if (atom_parse_data_header(mode_info->atom_context, index, NULL, |
996 | &crev, &data_offset); | 1020 | &frev, &crev, &data_offset)) { |
997 | 1021 | igp_info = (union igp_info *)(mode_info->atom_context->bios + | |
998 | igp_info = (union igp_info *)(mode_info->atom_context->bios + | ||
999 | data_offset); | 1022 | data_offset); |
1000 | |||
1001 | if (igp_info) { | ||
1002 | switch (crev) { | 1023 | switch (crev) { |
1003 | case 1: | 1024 | case 1: |
1004 | if (igp_info->info.ucMemoryType & 0xf0) | 1025 | if (igp_info->info.ucMemoryType & 0xf0) |
@@ -1029,14 +1050,12 @@ bool radeon_atombios_get_tmds_info(struct radeon_encoder *encoder, | |||
1029 | uint16_t maxfreq; | 1050 | uint16_t maxfreq; |
1030 | int i; | 1051 | int i; |
1031 | 1052 | ||
1032 | atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, | 1053 | if (atom_parse_data_header(mode_info->atom_context, index, NULL, |
1033 | &crev, &data_offset); | 1054 | &frev, &crev, &data_offset)) { |
1055 | tmds_info = | ||
1056 | (struct _ATOM_TMDS_INFO *)(mode_info->atom_context->bios + | ||
1057 | data_offset); | ||
1034 | 1058 | ||
1035 | tmds_info = | ||
1036 | (struct _ATOM_TMDS_INFO *)(mode_info->atom_context->bios + | ||
1037 | data_offset); | ||
1038 | |||
1039 | if (tmds_info) { | ||
1040 | maxfreq = le16_to_cpu(tmds_info->usMaxFrequency); | 1059 | maxfreq = le16_to_cpu(tmds_info->usMaxFrequency); |
1041 | for (i = 0; i < 4; i++) { | 1060 | for (i = 0; i < 4; i++) { |
1042 | tmds->tmds_pll[i].freq = | 1061 | tmds->tmds_pll[i].freq = |
@@ -1085,13 +1104,11 @@ static struct radeon_atom_ss *radeon_atombios_get_ss_info(struct | |||
1085 | if (id > ATOM_MAX_SS_ENTRY) | 1104 | if (id > ATOM_MAX_SS_ENTRY) |
1086 | return NULL; | 1105 | return NULL; |
1087 | 1106 | ||
1088 | atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, | 1107 | if (atom_parse_data_header(mode_info->atom_context, index, NULL, |
1089 | &crev, &data_offset); | 1108 | &frev, &crev, &data_offset)) { |
1090 | 1109 | ss_info = | |
1091 | ss_info = | 1110 | (struct _ATOM_SPREAD_SPECTRUM_INFO *)(mode_info->atom_context->bios + data_offset); |
1092 | (struct _ATOM_SPREAD_SPECTRUM_INFO *)(mode_info->atom_context->bios + data_offset); | ||
1093 | 1111 | ||
1094 | if (ss_info) { | ||
1095 | ss = | 1112 | ss = |
1096 | kzalloc(sizeof(struct radeon_atom_ss), GFP_KERNEL); | 1113 | kzalloc(sizeof(struct radeon_atom_ss), GFP_KERNEL); |
1097 | 1114 | ||
@@ -1114,30 +1131,6 @@ static struct radeon_atom_ss *radeon_atombios_get_ss_info(struct | |||
1114 | return ss; | 1131 | return ss; |
1115 | } | 1132 | } |
1116 | 1133 | ||
1117 | static void radeon_atom_apply_lvds_quirks(struct drm_device *dev, | ||
1118 | struct radeon_encoder_atom_dig *lvds) | ||
1119 | { | ||
1120 | |||
1121 | /* Toshiba A300-1BU laptop panel doesn't like new pll divider algo */ | ||
1122 | if ((dev->pdev->device == 0x95c4) && | ||
1123 | (dev->pdev->subsystem_vendor == 0x1179) && | ||
1124 | (dev->pdev->subsystem_device == 0xff50)) { | ||
1125 | if ((lvds->native_mode.hdisplay == 1280) && | ||
1126 | (lvds->native_mode.vdisplay == 800)) | ||
1127 | lvds->pll_algo = PLL_ALGO_LEGACY; | ||
1128 | } | ||
1129 | |||
1130 | /* Dell Studio 15 laptop panel doesn't like new pll divider algo */ | ||
1131 | if ((dev->pdev->device == 0x95c4) && | ||
1132 | (dev->pdev->subsystem_vendor == 0x1028) && | ||
1133 | (dev->pdev->subsystem_device == 0x029f)) { | ||
1134 | if ((lvds->native_mode.hdisplay == 1280) && | ||
1135 | (lvds->native_mode.vdisplay == 800)) | ||
1136 | lvds->pll_algo = PLL_ALGO_LEGACY; | ||
1137 | } | ||
1138 | |||
1139 | } | ||
1140 | |||
1141 | union lvds_info { | 1134 | union lvds_info { |
1142 | struct _ATOM_LVDS_INFO info; | 1135 | struct _ATOM_LVDS_INFO info; |
1143 | struct _ATOM_LVDS_INFO_V12 info_12; | 1136 | struct _ATOM_LVDS_INFO_V12 info_12; |
@@ -1156,13 +1149,10 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct | |||
1156 | uint8_t frev, crev; | 1149 | uint8_t frev, crev; |
1157 | struct radeon_encoder_atom_dig *lvds = NULL; | 1150 | struct radeon_encoder_atom_dig *lvds = NULL; |
1158 | 1151 | ||
1159 | atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, | 1152 | if (atom_parse_data_header(mode_info->atom_context, index, NULL, |
1160 | &crev, &data_offset); | 1153 | &frev, &crev, &data_offset)) { |
1161 | 1154 | lvds_info = | |
1162 | lvds_info = | 1155 | (union lvds_info *)(mode_info->atom_context->bios + data_offset); |
1163 | (union lvds_info *)(mode_info->atom_context->bios + data_offset); | ||
1164 | |||
1165 | if (lvds_info) { | ||
1166 | lvds = | 1156 | lvds = |
1167 | kzalloc(sizeof(struct radeon_encoder_atom_dig), GFP_KERNEL); | 1157 | kzalloc(sizeof(struct radeon_encoder_atom_dig), GFP_KERNEL); |
1168 | 1158 | ||
@@ -1220,9 +1210,6 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct | |||
1220 | lvds->pll_algo = PLL_ALGO_LEGACY; | 1210 | lvds->pll_algo = PLL_ALGO_LEGACY; |
1221 | } | 1211 | } |
1222 | 1212 | ||
1223 | /* LVDS quirks */ | ||
1224 | radeon_atom_apply_lvds_quirks(dev, lvds); | ||
1225 | |||
1226 | encoder->native_mode = lvds->native_mode; | 1213 | encoder->native_mode = lvds->native_mode; |
1227 | } | 1214 | } |
1228 | return lvds; | 1215 | return lvds; |
@@ -1241,11 +1228,11 @@ radeon_atombios_get_primary_dac_info(struct radeon_encoder *encoder) | |||
1241 | uint8_t bg, dac; | 1228 | uint8_t bg, dac; |
1242 | struct radeon_encoder_primary_dac *p_dac = NULL; | 1229 | struct radeon_encoder_primary_dac *p_dac = NULL; |
1243 | 1230 | ||
1244 | atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, &crev, &data_offset); | 1231 | if (atom_parse_data_header(mode_info->atom_context, index, NULL, |
1245 | 1232 | &frev, &crev, &data_offset)) { | |
1246 | dac_info = (struct _COMPASSIONATE_DATA *)(mode_info->atom_context->bios + data_offset); | 1233 | dac_info = (struct _COMPASSIONATE_DATA *) |
1234 | (mode_info->atom_context->bios + data_offset); | ||
1247 | 1235 | ||
1248 | if (dac_info) { | ||
1249 | p_dac = kzalloc(sizeof(struct radeon_encoder_primary_dac), GFP_KERNEL); | 1236 | p_dac = kzalloc(sizeof(struct radeon_encoder_primary_dac), GFP_KERNEL); |
1250 | 1237 | ||
1251 | if (!p_dac) | 1238 | if (!p_dac) |
@@ -1270,7 +1257,9 @@ bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, | |||
1270 | u8 frev, crev; | 1257 | u8 frev, crev; |
1271 | u16 data_offset, misc; | 1258 | u16 data_offset, misc; |
1272 | 1259 | ||
1273 | atom_parse_data_header(mode_info->atom_context, data_index, NULL, &frev, &crev, &data_offset); | 1260 | if (!atom_parse_data_header(mode_info->atom_context, data_index, NULL, |
1261 | &frev, &crev, &data_offset)) | ||
1262 | return false; | ||
1274 | 1263 | ||
1275 | switch (crev) { | 1264 | switch (crev) { |
1276 | case 1: | 1265 | case 1: |
@@ -1362,47 +1351,50 @@ radeon_atombios_get_tv_info(struct radeon_device *rdev) | |||
1362 | struct _ATOM_ANALOG_TV_INFO *tv_info; | 1351 | struct _ATOM_ANALOG_TV_INFO *tv_info; |
1363 | enum radeon_tv_std tv_std = TV_STD_NTSC; | 1352 | enum radeon_tv_std tv_std = TV_STD_NTSC; |
1364 | 1353 | ||
1365 | atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, &crev, &data_offset); | 1354 | if (atom_parse_data_header(mode_info->atom_context, index, NULL, |
1355 | &frev, &crev, &data_offset)) { | ||
1366 | 1356 | ||
1367 | tv_info = (struct _ATOM_ANALOG_TV_INFO *)(mode_info->atom_context->bios + data_offset); | 1357 | tv_info = (struct _ATOM_ANALOG_TV_INFO *) |
1358 | (mode_info->atom_context->bios + data_offset); | ||
1368 | 1359 | ||
1369 | switch (tv_info->ucTV_BootUpDefaultStandard) { | 1360 | switch (tv_info->ucTV_BootUpDefaultStandard) { |
1370 | case ATOM_TV_NTSC: | 1361 | case ATOM_TV_NTSC: |
1371 | tv_std = TV_STD_NTSC; | 1362 | tv_std = TV_STD_NTSC; |
1372 | DRM_INFO("Default TV standard: NTSC\n"); | 1363 | DRM_INFO("Default TV standard: NTSC\n"); |
1373 | break; | 1364 | break; |
1374 | case ATOM_TV_NTSCJ: | 1365 | case ATOM_TV_NTSCJ: |
1375 | tv_std = TV_STD_NTSC_J; | 1366 | tv_std = TV_STD_NTSC_J; |
1376 | DRM_INFO("Default TV standard: NTSC-J\n"); | 1367 | DRM_INFO("Default TV standard: NTSC-J\n"); |
1377 | break; | 1368 | break; |
1378 | case ATOM_TV_PAL: | 1369 | case ATOM_TV_PAL: |
1379 | tv_std = TV_STD_PAL; | 1370 | tv_std = TV_STD_PAL; |
1380 | DRM_INFO("Default TV standard: PAL\n"); | 1371 | DRM_INFO("Default TV standard: PAL\n"); |
1381 | break; | 1372 | break; |
1382 | case ATOM_TV_PALM: | 1373 | case ATOM_TV_PALM: |
1383 | tv_std = TV_STD_PAL_M; | 1374 | tv_std = TV_STD_PAL_M; |
1384 | DRM_INFO("Default TV standard: PAL-M\n"); | 1375 | DRM_INFO("Default TV standard: PAL-M\n"); |
1385 | break; | 1376 | break; |
1386 | case ATOM_TV_PALN: | 1377 | case ATOM_TV_PALN: |
1387 | tv_std = TV_STD_PAL_N; | 1378 | tv_std = TV_STD_PAL_N; |
1388 | DRM_INFO("Default TV standard: PAL-N\n"); | 1379 | DRM_INFO("Default TV standard: PAL-N\n"); |
1389 | break; | 1380 | break; |
1390 | case ATOM_TV_PALCN: | 1381 | case ATOM_TV_PALCN: |
1391 | tv_std = TV_STD_PAL_CN; | 1382 | tv_std = TV_STD_PAL_CN; |
1392 | DRM_INFO("Default TV standard: PAL-CN\n"); | 1383 | DRM_INFO("Default TV standard: PAL-CN\n"); |
1393 | break; | 1384 | break; |
1394 | case ATOM_TV_PAL60: | 1385 | case ATOM_TV_PAL60: |
1395 | tv_std = TV_STD_PAL_60; | 1386 | tv_std = TV_STD_PAL_60; |
1396 | DRM_INFO("Default TV standard: PAL-60\n"); | 1387 | DRM_INFO("Default TV standard: PAL-60\n"); |
1397 | break; | 1388 | break; |
1398 | case ATOM_TV_SECAM: | 1389 | case ATOM_TV_SECAM: |
1399 | tv_std = TV_STD_SECAM; | 1390 | tv_std = TV_STD_SECAM; |
1400 | DRM_INFO("Default TV standard: SECAM\n"); | 1391 | DRM_INFO("Default TV standard: SECAM\n"); |
1401 | break; | 1392 | break; |
1402 | default: | 1393 | default: |
1403 | tv_std = TV_STD_NTSC; | 1394 | tv_std = TV_STD_NTSC; |
1404 | DRM_INFO("Unknown TV standard; defaulting to NTSC\n"); | 1395 | DRM_INFO("Unknown TV standard; defaulting to NTSC\n"); |
1405 | break; | 1396 | break; |
1397 | } | ||
1406 | } | 1398 | } |
1407 | return tv_std; | 1399 | return tv_std; |
1408 | } | 1400 | } |
@@ -1420,11 +1412,12 @@ radeon_atombios_get_tv_dac_info(struct radeon_encoder *encoder) | |||
1420 | uint8_t bg, dac; | 1412 | uint8_t bg, dac; |
1421 | struct radeon_encoder_tv_dac *tv_dac = NULL; | 1413 | struct radeon_encoder_tv_dac *tv_dac = NULL; |
1422 | 1414 | ||
1423 | atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, &crev, &data_offset); | 1415 | if (atom_parse_data_header(mode_info->atom_context, index, NULL, |
1416 | &frev, &crev, &data_offset)) { | ||
1424 | 1417 | ||
1425 | dac_info = (struct _COMPASSIONATE_DATA *)(mode_info->atom_context->bios + data_offset); | 1418 | dac_info = (struct _COMPASSIONATE_DATA *) |
1419 | (mode_info->atom_context->bios + data_offset); | ||
1426 | 1420 | ||
1427 | if (dac_info) { | ||
1428 | tv_dac = kzalloc(sizeof(struct radeon_encoder_tv_dac), GFP_KERNEL); | 1421 | tv_dac = kzalloc(sizeof(struct radeon_encoder_tv_dac), GFP_KERNEL); |
1429 | 1422 | ||
1430 | if (!tv_dac) | 1423 | if (!tv_dac) |
@@ -1447,6 +1440,30 @@ radeon_atombios_get_tv_dac_info(struct radeon_encoder *encoder) | |||
1447 | return tv_dac; | 1440 | return tv_dac; |
1448 | } | 1441 | } |
1449 | 1442 | ||
1443 | static const char *thermal_controller_names[] = { | ||
1444 | "NONE", | ||
1445 | "LM63", | ||
1446 | "ADM1032", | ||
1447 | "ADM1030", | ||
1448 | "MUA6649", | ||
1449 | "LM64", | ||
1450 | "F75375", | ||
1451 | "ASC7512", | ||
1452 | }; | ||
1453 | |||
1454 | static const char *pp_lib_thermal_controller_names[] = { | ||
1455 | "NONE", | ||
1456 | "LM63", | ||
1457 | "ADM1032", | ||
1458 | "ADM1030", | ||
1459 | "MUA6649", | ||
1460 | "LM64", | ||
1461 | "F75375", | ||
1462 | "RV6xx", | ||
1463 | "RV770", | ||
1464 | "ADT7473", | ||
1465 | }; | ||
1466 | |||
1450 | union power_info { | 1467 | union power_info { |
1451 | struct _ATOM_POWERPLAY_INFO info; | 1468 | struct _ATOM_POWERPLAY_INFO info; |
1452 | struct _ATOM_POWERPLAY_INFO_V2 info_2; | 1469 | struct _ATOM_POWERPLAY_INFO_V2 info_2; |
@@ -1466,15 +1483,22 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev) | |||
1466 | struct _ATOM_PPLIB_STATE *power_state; | 1483 | struct _ATOM_PPLIB_STATE *power_state; |
1467 | int num_modes = 0, i, j; | 1484 | int num_modes = 0, i, j; |
1468 | int state_index = 0, mode_index = 0; | 1485 | int state_index = 0, mode_index = 0; |
1469 | 1486 | struct radeon_i2c_bus_rec i2c_bus; | |
1470 | atom_parse_data_header(mode_info->atom_context, index, NULL, &frev, &crev, &data_offset); | ||
1471 | |||
1472 | power_info = (union power_info *)(mode_info->atom_context->bios + data_offset); | ||
1473 | 1487 | ||
1474 | rdev->pm.default_power_state = NULL; | 1488 | rdev->pm.default_power_state = NULL; |
1475 | 1489 | ||
1476 | if (power_info) { | 1490 | if (atom_parse_data_header(mode_info->atom_context, index, NULL, |
1491 | &frev, &crev, &data_offset)) { | ||
1492 | power_info = (union power_info *)(mode_info->atom_context->bios + data_offset); | ||
1477 | if (frev < 4) { | 1493 | if (frev < 4) { |
1494 | /* add the i2c bus for thermal/fan chip */ | ||
1495 | if (power_info->info.ucOverdriveThermalController > 0) { | ||
1496 | DRM_INFO("Possible %s thermal controller at 0x%02x\n", | ||
1497 | thermal_controller_names[power_info->info.ucOverdriveThermalController], | ||
1498 | power_info->info.ucOverdriveControllerAddress >> 1); | ||
1499 | i2c_bus = radeon_lookup_i2c_gpio(rdev, power_info->info.ucOverdriveI2cLine); | ||
1500 | rdev->pm.i2c_bus = radeon_i2c_create(rdev->ddev, &i2c_bus, "Thermal"); | ||
1501 | } | ||
1478 | num_modes = power_info->info.ucNumOfPowerModeEntries; | 1502 | num_modes = power_info->info.ucNumOfPowerModeEntries; |
1479 | if (num_modes > ATOM_MAX_NUMBEROF_POWER_BLOCK) | 1503 | if (num_modes > ATOM_MAX_NUMBEROF_POWER_BLOCK) |
1480 | num_modes = ATOM_MAX_NUMBEROF_POWER_BLOCK; | 1504 | num_modes = ATOM_MAX_NUMBEROF_POWER_BLOCK; |
@@ -1684,6 +1708,24 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev) | |||
1684 | } | 1708 | } |
1685 | } | 1709 | } |
1686 | } else if (frev == 4) { | 1710 | } else if (frev == 4) { |
1711 | /* add the i2c bus for thermal/fan chip */ | ||
1712 | /* no support for internal controller yet */ | ||
1713 | if (power_info->info_4.sThermalController.ucType > 0) { | ||
1714 | if ((power_info->info_4.sThermalController.ucType == ATOM_PP_THERMALCONTROLLER_RV6xx) || | ||
1715 | (power_info->info_4.sThermalController.ucType == ATOM_PP_THERMALCONTROLLER_RV770)) { | ||
1716 | DRM_INFO("Internal thermal controller %s fan control\n", | ||
1717 | (power_info->info_4.sThermalController.ucFanParameters & | ||
1718 | ATOM_PP_FANPARAMETERS_NOFAN) ? "without" : "with"); | ||
1719 | } else { | ||
1720 | DRM_INFO("Possible %s thermal controller at 0x%02x %s fan control\n", | ||
1721 | pp_lib_thermal_controller_names[power_info->info_4.sThermalController.ucType], | ||
1722 | power_info->info_4.sThermalController.ucI2cAddress >> 1, | ||
1723 | (power_info->info_4.sThermalController.ucFanParameters & | ||
1724 | ATOM_PP_FANPARAMETERS_NOFAN) ? "without" : "with"); | ||
1725 | i2c_bus = radeon_lookup_i2c_gpio(rdev, power_info->info_4.sThermalController.ucI2cLine); | ||
1726 | rdev->pm.i2c_bus = radeon_i2c_create(rdev->ddev, &i2c_bus, "Thermal"); | ||
1727 | } | ||
1728 | } | ||
1687 | for (i = 0; i < power_info->info_4.ucNumStates; i++) { | 1729 | for (i = 0; i < power_info->info_4.ucNumStates; i++) { |
1688 | mode_index = 0; | 1730 | mode_index = 0; |
1689 | power_state = (struct _ATOM_PPLIB_STATE *) | 1731 | power_state = (struct _ATOM_PPLIB_STATE *) |
diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c index 3f557c4151e0..ed5dfe58f29c 100644 --- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c +++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * ATPX support for both Intel/ATI | 7 | * ATPX support for both Intel/ATI |
8 | */ | 8 | */ |
9 | #include <linux/vga_switcheroo.h> | 9 | #include <linux/vga_switcheroo.h> |
10 | #include <linux/slab.h> | ||
10 | #include <acpi/acpi.h> | 11 | #include <acpi/acpi.h> |
11 | #include <acpi/acpi_bus.h> | 12 | #include <acpi/acpi_bus.h> |
12 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
diff --git a/drivers/gpu/drm/radeon/radeon_bios.c b/drivers/gpu/drm/radeon/radeon_bios.c index 557240460526..8ad71f701316 100644 --- a/drivers/gpu/drm/radeon/radeon_bios.c +++ b/drivers/gpu/drm/radeon/radeon_bios.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "atom.h" | 31 | #include "atom.h" |
32 | 32 | ||
33 | #include <linux/vga_switcheroo.h> | 33 | #include <linux/vga_switcheroo.h> |
34 | #include <linux/slab.h> | ||
34 | /* | 35 | /* |
35 | * BIOS. | 36 | * BIOS. |
36 | */ | 37 | */ |
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index e9ea38ece375..37db8adb2748 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c | |||
@@ -531,10 +531,7 @@ static struct radeon_i2c_bus_rec combios_setup_i2c_bus(struct radeon_device *rde | |||
531 | case CHIP_RS300: | 531 | case CHIP_RS300: |
532 | switch (ddc_line) { | 532 | switch (ddc_line) { |
533 | case RADEON_GPIO_DVI_DDC: | 533 | case RADEON_GPIO_DVI_DDC: |
534 | /* in theory this should be hw capable, | 534 | i2c.hw_capable = true; |
535 | * but it doesn't seem to work | ||
536 | */ | ||
537 | i2c.hw_capable = false; | ||
538 | break; | 535 | break; |
539 | default: | 536 | default: |
540 | i2c.hw_capable = false; | 537 | i2c.hw_capable = false; |
@@ -633,6 +630,8 @@ bool radeon_combios_get_clock_info(struct drm_device *dev) | |||
633 | p1pll->reference_div = RBIOS16(pll_info + 0x10); | 630 | p1pll->reference_div = RBIOS16(pll_info + 0x10); |
634 | p1pll->pll_out_min = RBIOS32(pll_info + 0x12); | 631 | p1pll->pll_out_min = RBIOS32(pll_info + 0x12); |
635 | p1pll->pll_out_max = RBIOS32(pll_info + 0x16); | 632 | p1pll->pll_out_max = RBIOS32(pll_info + 0x16); |
633 | p1pll->lcd_pll_out_min = p1pll->pll_out_min; | ||
634 | p1pll->lcd_pll_out_max = p1pll->pll_out_max; | ||
636 | 635 | ||
637 | if (rev > 9) { | 636 | if (rev > 9) { |
638 | p1pll->pll_in_min = RBIOS32(pll_info + 0x36); | 637 | p1pll->pll_in_min = RBIOS32(pll_info + 0x36); |
@@ -761,7 +760,9 @@ struct radeon_encoder_primary_dac *radeon_combios_get_primary_dac_info(struct | |||
761 | dac = RBIOS8(dac_info + 0x3) & 0xf; | 760 | dac = RBIOS8(dac_info + 0x3) & 0xf; |
762 | p_dac->ps2_pdac_adj = (bg << 8) | (dac); | 761 | p_dac->ps2_pdac_adj = (bg << 8) | (dac); |
763 | } | 762 | } |
764 | found = 1; | 763 | /* if the values are all zeros, use the table */ |
764 | if (p_dac->ps2_pdac_adj) | ||
765 | found = 1; | ||
765 | } | 766 | } |
766 | 767 | ||
767 | if (!found) /* fallback to defaults */ | 768 | if (!found) /* fallback to defaults */ |
@@ -896,7 +897,9 @@ struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct | |||
896 | bg = RBIOS8(dac_info + 0x10) & 0xf; | 897 | bg = RBIOS8(dac_info + 0x10) & 0xf; |
897 | dac = RBIOS8(dac_info + 0x11) & 0xf; | 898 | dac = RBIOS8(dac_info + 0x11) & 0xf; |
898 | tv_dac->ntsc_tvdac_adj = (bg << 16) | (dac << 20); | 899 | tv_dac->ntsc_tvdac_adj = (bg << 16) | (dac << 20); |
899 | found = 1; | 900 | /* if the values are all zeros, use the table */ |
901 | if (tv_dac->ps2_tvdac_adj) | ||
902 | found = 1; | ||
900 | } else if (rev > 1) { | 903 | } else if (rev > 1) { |
901 | bg = RBIOS8(dac_info + 0xc) & 0xf; | 904 | bg = RBIOS8(dac_info + 0xc) & 0xf; |
902 | dac = (RBIOS8(dac_info + 0xc) >> 4) & 0xf; | 905 | dac = (RBIOS8(dac_info + 0xc) >> 4) & 0xf; |
@@ -909,7 +912,9 @@ struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct | |||
909 | bg = RBIOS8(dac_info + 0xe) & 0xf; | 912 | bg = RBIOS8(dac_info + 0xe) & 0xf; |
910 | dac = (RBIOS8(dac_info + 0xe) >> 4) & 0xf; | 913 | dac = (RBIOS8(dac_info + 0xe) >> 4) & 0xf; |
911 | tv_dac->ntsc_tvdac_adj = (bg << 16) | (dac << 20); | 914 | tv_dac->ntsc_tvdac_adj = (bg << 16) | (dac << 20); |
912 | found = 1; | 915 | /* if the values are all zeros, use the table */ |
916 | if (tv_dac->ps2_tvdac_adj) | ||
917 | found = 1; | ||
913 | } | 918 | } |
914 | tv_dac->tv_std = radeon_combios_get_tv_info(rdev); | 919 | tv_dac->tv_std = radeon_combios_get_tv_info(rdev); |
915 | } | 920 | } |
@@ -926,7 +931,9 @@ struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct | |||
926 | (bg << 16) | (dac << 20); | 931 | (bg << 16) | (dac << 20); |
927 | tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; | 932 | tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; |
928 | tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; | 933 | tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; |
929 | found = 1; | 934 | /* if the values are all zeros, use the table */ |
935 | if (tv_dac->ps2_tvdac_adj) | ||
936 | found = 1; | ||
930 | } else { | 937 | } else { |
931 | bg = RBIOS8(dac_info + 0x4) & 0xf; | 938 | bg = RBIOS8(dac_info + 0x4) & 0xf; |
932 | dac = RBIOS8(dac_info + 0x5) & 0xf; | 939 | dac = RBIOS8(dac_info + 0x5) & 0xf; |
@@ -934,7 +941,9 @@ struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct | |||
934 | (bg << 16) | (dac << 20); | 941 | (bg << 16) | (dac << 20); |
935 | tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; | 942 | tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj; |
936 | tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; | 943 | tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj; |
937 | found = 1; | 944 | /* if the values are all zeros, use the table */ |
945 | if (tv_dac->ps2_tvdac_adj) | ||
946 | found = 1; | ||
938 | } | 947 | } |
939 | } else { | 948 | } else { |
940 | DRM_INFO("No TV DAC info found in BIOS\n"); | 949 | DRM_INFO("No TV DAC info found in BIOS\n"); |
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index ee0083f982d8..3fba50540f72 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
@@ -315,7 +315,7 @@ int radeon_connector_set_property(struct drm_connector *connector, struct drm_pr | |||
315 | radeon_encoder = to_radeon_encoder(encoder); | 315 | radeon_encoder = to_radeon_encoder(encoder); |
316 | if (!radeon_encoder->enc_priv) | 316 | if (!radeon_encoder->enc_priv) |
317 | return 0; | 317 | return 0; |
318 | if (rdev->is_atom_bios) { | 318 | if (ASIC_IS_AVIVO(rdev) || radeon_r4xx_atom) { |
319 | struct radeon_encoder_atom_dac *dac_int; | 319 | struct radeon_encoder_atom_dac *dac_int; |
320 | dac_int = radeon_encoder->enc_priv; | 320 | dac_int = radeon_encoder->enc_priv; |
321 | dac_int->tv_std = val; | 321 | dac_int->tv_std = val; |
@@ -940,7 +940,7 @@ static void radeon_dp_connector_destroy(struct drm_connector *connector) | |||
940 | if (radeon_connector->edid) | 940 | if (radeon_connector->edid) |
941 | kfree(radeon_connector->edid); | 941 | kfree(radeon_connector->edid); |
942 | if (radeon_dig_connector->dp_i2c_bus) | 942 | if (radeon_dig_connector->dp_i2c_bus) |
943 | radeon_i2c_destroy_dp(radeon_dig_connector->dp_i2c_bus); | 943 | radeon_i2c_destroy(radeon_dig_connector->dp_i2c_bus); |
944 | kfree(radeon_connector->con_priv); | 944 | kfree(radeon_connector->con_priv); |
945 | drm_sysfs_connector_remove(connector); | 945 | drm_sysfs_connector_remove(connector); |
946 | drm_connector_cleanup(connector); | 946 | drm_connector_cleanup(connector); |
diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c index dc6eba6b96dd..419630dd2075 100644 --- a/drivers/gpu/drm/radeon/radeon_cp.c +++ b/drivers/gpu/drm/radeon/radeon_cp.c | |||
@@ -417,8 +417,9 @@ static int radeon_do_wait_for_idle(drm_radeon_private_t * dev_priv) | |||
417 | return -EBUSY; | 417 | return -EBUSY; |
418 | } | 418 | } |
419 | 419 | ||
420 | static void radeon_init_pipes(drm_radeon_private_t *dev_priv) | 420 | static void radeon_init_pipes(struct drm_device *dev) |
421 | { | 421 | { |
422 | drm_radeon_private_t *dev_priv = dev->dev_private; | ||
422 | uint32_t gb_tile_config, gb_pipe_sel = 0; | 423 | uint32_t gb_tile_config, gb_pipe_sel = 0; |
423 | 424 | ||
424 | if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV530) { | 425 | if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV530) { |
@@ -436,11 +437,12 @@ static void radeon_init_pipes(drm_radeon_private_t *dev_priv) | |||
436 | dev_priv->num_gb_pipes = ((gb_pipe_sel >> 12) & 0x3) + 1; | 437 | dev_priv->num_gb_pipes = ((gb_pipe_sel >> 12) & 0x3) + 1; |
437 | } else { | 438 | } else { |
438 | /* R3xx */ | 439 | /* R3xx */ |
439 | if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R300) || | 440 | if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R300 && |
441 | dev->pdev->device != 0x4144) || | ||
440 | ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R350)) { | 442 | ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R350)) { |
441 | dev_priv->num_gb_pipes = 2; | 443 | dev_priv->num_gb_pipes = 2; |
442 | } else { | 444 | } else { |
443 | /* R3Vxx */ | 445 | /* RV3xx/R300 AD */ |
444 | dev_priv->num_gb_pipes = 1; | 446 | dev_priv->num_gb_pipes = 1; |
445 | } | 447 | } |
446 | } | 448 | } |
@@ -736,7 +738,7 @@ static int radeon_do_engine_reset(struct drm_device * dev) | |||
736 | 738 | ||
737 | /* setup the raster pipes */ | 739 | /* setup the raster pipes */ |
738 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R300) | 740 | if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R300) |
739 | radeon_init_pipes(dev_priv); | 741 | radeon_init_pipes(dev); |
740 | 742 | ||
741 | /* Reset the CP ring */ | 743 | /* Reset the CP ring */ |
742 | radeon_do_cp_reset(dev_priv); | 744 | radeon_do_cp_reset(dev_priv); |
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c index 70ba02ed7723..f9b0fe002c0a 100644 --- a/drivers/gpu/drm/radeon/radeon_cs.c +++ b/drivers/gpu/drm/radeon/radeon_cs.c | |||
@@ -193,9 +193,11 @@ static void radeon_cs_parser_fini(struct radeon_cs_parser *parser, int error) | |||
193 | radeon_bo_list_fence(&parser->validated, parser->ib->fence); | 193 | radeon_bo_list_fence(&parser->validated, parser->ib->fence); |
194 | } | 194 | } |
195 | radeon_bo_list_unreserve(&parser->validated); | 195 | radeon_bo_list_unreserve(&parser->validated); |
196 | for (i = 0; i < parser->nrelocs; i++) { | 196 | if (parser->relocs != NULL) { |
197 | if (parser->relocs[i].gobj) | 197 | for (i = 0; i < parser->nrelocs; i++) { |
198 | drm_gem_object_unreference_unlocked(parser->relocs[i].gobj); | 198 | if (parser->relocs[i].gobj) |
199 | drm_gem_object_unreference_unlocked(parser->relocs[i].gobj); | ||
200 | } | ||
199 | } | 201 | } |
200 | kfree(parser->track); | 202 | kfree(parser->track); |
201 | kfree(parser->relocs); | 203 | kfree(parser->relocs); |
@@ -243,7 +245,8 @@ int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) | |||
243 | } | 245 | } |
244 | r = radeon_cs_parser_relocs(&parser); | 246 | r = radeon_cs_parser_relocs(&parser); |
245 | if (r) { | 247 | if (r) { |
246 | DRM_ERROR("Failed to parse relocation !\n"); | 248 | if (r != -ERESTARTSYS) |
249 | DRM_ERROR("Failed to parse relocation %d!\n", r); | ||
247 | radeon_cs_parser_fini(&parser, r); | 250 | radeon_cs_parser_fini(&parser, r); |
248 | mutex_unlock(&rdev->cs_mutex); | 251 | mutex_unlock(&rdev->cs_mutex); |
249 | return r; | 252 | return r; |
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index e28e4ed5f720..bddf17f97da8 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c | |||
@@ -26,6 +26,7 @@ | |||
26 | * Jerome Glisse | 26 | * Jerome Glisse |
27 | */ | 27 | */ |
28 | #include <linux/console.h> | 28 | #include <linux/console.h> |
29 | #include <linux/slab.h> | ||
29 | #include <drm/drmP.h> | 30 | #include <drm/drmP.h> |
30 | #include <drm/drm_crtc_helper.h> | 31 | #include <drm/drm_crtc_helper.h> |
31 | #include <drm/radeon_drm.h> | 32 | #include <drm/radeon_drm.h> |
@@ -33,7 +34,6 @@ | |||
33 | #include <linux/vga_switcheroo.h> | 34 | #include <linux/vga_switcheroo.h> |
34 | #include "radeon_reg.h" | 35 | #include "radeon_reg.h" |
35 | #include "radeon.h" | 36 | #include "radeon.h" |
36 | #include "radeon_asic.h" | ||
37 | #include "atom.h" | 37 | #include "atom.h" |
38 | 38 | ||
39 | /* | 39 | /* |
@@ -242,6 +242,36 @@ bool radeon_card_posted(struct radeon_device *rdev) | |||
242 | 242 | ||
243 | } | 243 | } |
244 | 244 | ||
245 | void radeon_update_bandwidth_info(struct radeon_device *rdev) | ||
246 | { | ||
247 | fixed20_12 a; | ||
248 | u32 sclk, mclk; | ||
249 | |||
250 | if (rdev->flags & RADEON_IS_IGP) { | ||
251 | sclk = radeon_get_engine_clock(rdev); | ||
252 | mclk = rdev->clock.default_mclk; | ||
253 | |||
254 | a.full = rfixed_const(100); | ||
255 | rdev->pm.sclk.full = rfixed_const(sclk); | ||
256 | rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); | ||
257 | rdev->pm.mclk.full = rfixed_const(mclk); | ||
258 | rdev->pm.mclk.full = rfixed_div(rdev->pm.mclk, a); | ||
259 | |||
260 | a.full = rfixed_const(16); | ||
261 | /* core_bandwidth = sclk(Mhz) * 16 */ | ||
262 | rdev->pm.core_bandwidth.full = rfixed_div(rdev->pm.sclk, a); | ||
263 | } else { | ||
264 | sclk = radeon_get_engine_clock(rdev); | ||
265 | mclk = radeon_get_memory_clock(rdev); | ||
266 | |||
267 | a.full = rfixed_const(100); | ||
268 | rdev->pm.sclk.full = rfixed_const(sclk); | ||
269 | rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); | ||
270 | rdev->pm.mclk.full = rfixed_const(mclk); | ||
271 | rdev->pm.mclk.full = rfixed_div(rdev->pm.mclk, a); | ||
272 | } | ||
273 | } | ||
274 | |||
245 | bool radeon_boot_test_post_card(struct radeon_device *rdev) | 275 | bool radeon_boot_test_post_card(struct radeon_device *rdev) |
246 | { | 276 | { |
247 | if (radeon_card_posted(rdev)) | 277 | if (radeon_card_posted(rdev)) |
@@ -288,181 +318,6 @@ void radeon_dummy_page_fini(struct radeon_device *rdev) | |||
288 | } | 318 | } |
289 | 319 | ||
290 | 320 | ||
291 | /* | ||
292 | * Registers accessors functions. | ||
293 | */ | ||
294 | uint32_t radeon_invalid_rreg(struct radeon_device *rdev, uint32_t reg) | ||
295 | { | ||
296 | DRM_ERROR("Invalid callback to read register 0x%04X\n", reg); | ||
297 | BUG_ON(1); | ||
298 | return 0; | ||
299 | } | ||
300 | |||
301 | void radeon_invalid_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v) | ||
302 | { | ||
303 | DRM_ERROR("Invalid callback to write register 0x%04X with 0x%08X\n", | ||
304 | reg, v); | ||
305 | BUG_ON(1); | ||
306 | } | ||
307 | |||
308 | void radeon_register_accessor_init(struct radeon_device *rdev) | ||
309 | { | ||
310 | rdev->mc_rreg = &radeon_invalid_rreg; | ||
311 | rdev->mc_wreg = &radeon_invalid_wreg; | ||
312 | rdev->pll_rreg = &radeon_invalid_rreg; | ||
313 | rdev->pll_wreg = &radeon_invalid_wreg; | ||
314 | rdev->pciep_rreg = &radeon_invalid_rreg; | ||
315 | rdev->pciep_wreg = &radeon_invalid_wreg; | ||
316 | |||
317 | /* Don't change order as we are overridding accessor. */ | ||
318 | if (rdev->family < CHIP_RV515) { | ||
319 | rdev->pcie_reg_mask = 0xff; | ||
320 | } else { | ||
321 | rdev->pcie_reg_mask = 0x7ff; | ||
322 | } | ||
323 | /* FIXME: not sure here */ | ||
324 | if (rdev->family <= CHIP_R580) { | ||
325 | rdev->pll_rreg = &r100_pll_rreg; | ||
326 | rdev->pll_wreg = &r100_pll_wreg; | ||
327 | } | ||
328 | if (rdev->family >= CHIP_R420) { | ||
329 | rdev->mc_rreg = &r420_mc_rreg; | ||
330 | rdev->mc_wreg = &r420_mc_wreg; | ||
331 | } | ||
332 | if (rdev->family >= CHIP_RV515) { | ||
333 | rdev->mc_rreg = &rv515_mc_rreg; | ||
334 | rdev->mc_wreg = &rv515_mc_wreg; | ||
335 | } | ||
336 | if (rdev->family == CHIP_RS400 || rdev->family == CHIP_RS480) { | ||
337 | rdev->mc_rreg = &rs400_mc_rreg; | ||
338 | rdev->mc_wreg = &rs400_mc_wreg; | ||
339 | } | ||
340 | if (rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740) { | ||
341 | rdev->mc_rreg = &rs690_mc_rreg; | ||
342 | rdev->mc_wreg = &rs690_mc_wreg; | ||
343 | } | ||
344 | if (rdev->family == CHIP_RS600) { | ||
345 | rdev->mc_rreg = &rs600_mc_rreg; | ||
346 | rdev->mc_wreg = &rs600_mc_wreg; | ||
347 | } | ||
348 | if ((rdev->family >= CHIP_R600) && (rdev->family <= CHIP_RV740)) { | ||
349 | rdev->pciep_rreg = &r600_pciep_rreg; | ||
350 | rdev->pciep_wreg = &r600_pciep_wreg; | ||
351 | } | ||
352 | } | ||
353 | |||
354 | |||
355 | /* | ||
356 | * ASIC | ||
357 | */ | ||
358 | int radeon_asic_init(struct radeon_device *rdev) | ||
359 | { | ||
360 | radeon_register_accessor_init(rdev); | ||
361 | switch (rdev->family) { | ||
362 | case CHIP_R100: | ||
363 | case CHIP_RV100: | ||
364 | case CHIP_RS100: | ||
365 | case CHIP_RV200: | ||
366 | case CHIP_RS200: | ||
367 | rdev->asic = &r100_asic; | ||
368 | break; | ||
369 | case CHIP_R200: | ||
370 | case CHIP_RV250: | ||
371 | case CHIP_RS300: | ||
372 | case CHIP_RV280: | ||
373 | rdev->asic = &r200_asic; | ||
374 | break; | ||
375 | case CHIP_R300: | ||
376 | case CHIP_R350: | ||
377 | case CHIP_RV350: | ||
378 | case CHIP_RV380: | ||
379 | if (rdev->flags & RADEON_IS_PCIE) | ||
380 | rdev->asic = &r300_asic_pcie; | ||
381 | else | ||
382 | rdev->asic = &r300_asic; | ||
383 | break; | ||
384 | case CHIP_R420: | ||
385 | case CHIP_R423: | ||
386 | case CHIP_RV410: | ||
387 | rdev->asic = &r420_asic; | ||
388 | break; | ||
389 | case CHIP_RS400: | ||
390 | case CHIP_RS480: | ||
391 | rdev->asic = &rs400_asic; | ||
392 | break; | ||
393 | case CHIP_RS600: | ||
394 | rdev->asic = &rs600_asic; | ||
395 | break; | ||
396 | case CHIP_RS690: | ||
397 | case CHIP_RS740: | ||
398 | rdev->asic = &rs690_asic; | ||
399 | break; | ||
400 | case CHIP_RV515: | ||
401 | rdev->asic = &rv515_asic; | ||
402 | break; | ||
403 | case CHIP_R520: | ||
404 | case CHIP_RV530: | ||
405 | case CHIP_RV560: | ||
406 | case CHIP_RV570: | ||
407 | case CHIP_R580: | ||
408 | rdev->asic = &r520_asic; | ||
409 | break; | ||
410 | case CHIP_R600: | ||
411 | case CHIP_RV610: | ||
412 | case CHIP_RV630: | ||
413 | case CHIP_RV620: | ||
414 | case CHIP_RV635: | ||
415 | case CHIP_RV670: | ||
416 | case CHIP_RS780: | ||
417 | case CHIP_RS880: | ||
418 | rdev->asic = &r600_asic; | ||
419 | break; | ||
420 | case CHIP_RV770: | ||
421 | case CHIP_RV730: | ||
422 | case CHIP_RV710: | ||
423 | case CHIP_RV740: | ||
424 | rdev->asic = &rv770_asic; | ||
425 | break; | ||
426 | case CHIP_CEDAR: | ||
427 | case CHIP_REDWOOD: | ||
428 | case CHIP_JUNIPER: | ||
429 | case CHIP_CYPRESS: | ||
430 | case CHIP_HEMLOCK: | ||
431 | rdev->asic = &evergreen_asic; | ||
432 | break; | ||
433 | default: | ||
434 | /* FIXME: not supported yet */ | ||
435 | return -EINVAL; | ||
436 | } | ||
437 | |||
438 | if (rdev->flags & RADEON_IS_IGP) { | ||
439 | rdev->asic->get_memory_clock = NULL; | ||
440 | rdev->asic->set_memory_clock = NULL; | ||
441 | } | ||
442 | |||
443 | return 0; | ||
444 | } | ||
445 | |||
446 | |||
447 | /* | ||
448 | * Wrapper around modesetting bits. | ||
449 | */ | ||
450 | int radeon_clocks_init(struct radeon_device *rdev) | ||
451 | { | ||
452 | int r; | ||
453 | |||
454 | r = radeon_static_clocks_init(rdev->ddev); | ||
455 | if (r) { | ||
456 | return r; | ||
457 | } | ||
458 | DRM_INFO("Clocks initialized !\n"); | ||
459 | return 0; | ||
460 | } | ||
461 | |||
462 | void radeon_clocks_fini(struct radeon_device *rdev) | ||
463 | { | ||
464 | } | ||
465 | |||
466 | /* ATOM accessor methods */ | 321 | /* ATOM accessor methods */ |
467 | static uint32_t cail_pll_read(struct card_info *info, uint32_t reg) | 322 | static uint32_t cail_pll_read(struct card_info *info, uint32_t reg) |
468 | { | 323 | { |
@@ -567,29 +422,6 @@ static unsigned int radeon_vga_set_decode(void *cookie, bool state) | |||
567 | return VGA_RSRC_NORMAL_IO | VGA_RSRC_NORMAL_MEM; | 422 | return VGA_RSRC_NORMAL_IO | VGA_RSRC_NORMAL_MEM; |
568 | } | 423 | } |
569 | 424 | ||
570 | void radeon_agp_disable(struct radeon_device *rdev) | ||
571 | { | ||
572 | rdev->flags &= ~RADEON_IS_AGP; | ||
573 | if (rdev->family >= CHIP_R600) { | ||
574 | DRM_INFO("Forcing AGP to PCIE mode\n"); | ||
575 | rdev->flags |= RADEON_IS_PCIE; | ||
576 | } else if (rdev->family >= CHIP_RV515 || | ||
577 | rdev->family == CHIP_RV380 || | ||
578 | rdev->family == CHIP_RV410 || | ||
579 | rdev->family == CHIP_R423) { | ||
580 | DRM_INFO("Forcing AGP to PCIE mode\n"); | ||
581 | rdev->flags |= RADEON_IS_PCIE; | ||
582 | rdev->asic->gart_tlb_flush = &rv370_pcie_gart_tlb_flush; | ||
583 | rdev->asic->gart_set_page = &rv370_pcie_gart_set_page; | ||
584 | } else { | ||
585 | DRM_INFO("Forcing AGP to PCI mode\n"); | ||
586 | rdev->flags |= RADEON_IS_PCI; | ||
587 | rdev->asic->gart_tlb_flush = &r100_pci_gart_tlb_flush; | ||
588 | rdev->asic->gart_set_page = &r100_pci_gart_set_page; | ||
589 | } | ||
590 | rdev->mc.gtt_size = radeon_gart_size * 1024 * 1024; | ||
591 | } | ||
592 | |||
593 | void radeon_check_arguments(struct radeon_device *rdev) | 425 | void radeon_check_arguments(struct radeon_device *rdev) |
594 | { | 426 | { |
595 | /* vramlimit must be a power of two */ | 427 | /* vramlimit must be a power of two */ |
@@ -731,6 +563,14 @@ int radeon_device_init(struct radeon_device *rdev, | |||
731 | return r; | 563 | return r; |
732 | radeon_check_arguments(rdev); | 564 | radeon_check_arguments(rdev); |
733 | 565 | ||
566 | /* all of the newer IGP chips have an internal gart | ||
567 | * However some rs4xx report as AGP, so remove that here. | ||
568 | */ | ||
569 | if ((rdev->family >= CHIP_RS400) && | ||
570 | (rdev->flags & RADEON_IS_IGP)) { | ||
571 | rdev->flags &= ~RADEON_IS_AGP; | ||
572 | } | ||
573 | |||
734 | if (rdev->flags & RADEON_IS_AGP && radeon_agpmode == -1) { | 574 | if (rdev->flags & RADEON_IS_AGP && radeon_agpmode == -1) { |
735 | radeon_agp_disable(rdev); | 575 | radeon_agp_disable(rdev); |
736 | } | 576 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index ba8d806dcf39..b8d672828246 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c | |||
@@ -368,10 +368,9 @@ static bool radeon_setup_enc_conn(struct drm_device *dev) | |||
368 | 368 | ||
369 | if (rdev->bios) { | 369 | if (rdev->bios) { |
370 | if (rdev->is_atom_bios) { | 370 | if (rdev->is_atom_bios) { |
371 | if (rdev->family >= CHIP_R600) | 371 | ret = radeon_get_atom_connector_info_from_supported_devices_table(dev); |
372 | if (ret == false) | ||
372 | ret = radeon_get_atom_connector_info_from_object_table(dev); | 373 | ret = radeon_get_atom_connector_info_from_object_table(dev); |
373 | else | ||
374 | ret = radeon_get_atom_connector_info_from_supported_devices_table(dev); | ||
375 | } else { | 374 | } else { |
376 | ret = radeon_get_legacy_connector_info_from_bios(dev); | 375 | ret = radeon_get_legacy_connector_info_from_bios(dev); |
377 | if (ret == false) | 376 | if (ret == false) |
@@ -469,10 +468,19 @@ static void radeon_compute_pll_legacy(struct radeon_pll *pll, | |||
469 | uint32_t best_error = 0xffffffff; | 468 | uint32_t best_error = 0xffffffff; |
470 | uint32_t best_vco_diff = 1; | 469 | uint32_t best_vco_diff = 1; |
471 | uint32_t post_div; | 470 | uint32_t post_div; |
471 | u32 pll_out_min, pll_out_max; | ||
472 | 472 | ||
473 | DRM_DEBUG("PLL freq %llu %u %u\n", freq, pll->min_ref_div, pll->max_ref_div); | 473 | DRM_DEBUG("PLL freq %llu %u %u\n", freq, pll->min_ref_div, pll->max_ref_div); |
474 | freq = freq * 1000; | 474 | freq = freq * 1000; |
475 | 475 | ||
476 | if (pll->flags & RADEON_PLL_IS_LCD) { | ||
477 | pll_out_min = pll->lcd_pll_out_min; | ||
478 | pll_out_max = pll->lcd_pll_out_max; | ||
479 | } else { | ||
480 | pll_out_min = pll->pll_out_min; | ||
481 | pll_out_max = pll->pll_out_max; | ||
482 | } | ||
483 | |||
476 | if (pll->flags & RADEON_PLL_USE_REF_DIV) | 484 | if (pll->flags & RADEON_PLL_USE_REF_DIV) |
477 | min_ref_div = max_ref_div = pll->reference_div; | 485 | min_ref_div = max_ref_div = pll->reference_div; |
478 | else { | 486 | else { |
@@ -536,10 +544,10 @@ static void radeon_compute_pll_legacy(struct radeon_pll *pll, | |||
536 | tmp = (uint64_t)pll->reference_freq * feedback_div; | 544 | tmp = (uint64_t)pll->reference_freq * feedback_div; |
537 | vco = radeon_div(tmp, ref_div); | 545 | vco = radeon_div(tmp, ref_div); |
538 | 546 | ||
539 | if (vco < pll->pll_out_min) { | 547 | if (vco < pll_out_min) { |
540 | min_feed_div = feedback_div + 1; | 548 | min_feed_div = feedback_div + 1; |
541 | continue; | 549 | continue; |
542 | } else if (vco > pll->pll_out_max) { | 550 | } else if (vco > pll_out_max) { |
543 | max_feed_div = feedback_div; | 551 | max_feed_div = feedback_div; |
544 | continue; | 552 | continue; |
545 | } | 553 | } |
@@ -675,6 +683,15 @@ calc_fb_ref_div(struct radeon_pll *pll, | |||
675 | { | 683 | { |
676 | fixed20_12 ffreq, max_error, error, pll_out, a; | 684 | fixed20_12 ffreq, max_error, error, pll_out, a; |
677 | u32 vco; | 685 | u32 vco; |
686 | u32 pll_out_min, pll_out_max; | ||
687 | |||
688 | if (pll->flags & RADEON_PLL_IS_LCD) { | ||
689 | pll_out_min = pll->lcd_pll_out_min; | ||
690 | pll_out_max = pll->lcd_pll_out_max; | ||
691 | } else { | ||
692 | pll_out_min = pll->pll_out_min; | ||
693 | pll_out_max = pll->pll_out_max; | ||
694 | } | ||
678 | 695 | ||
679 | ffreq.full = rfixed_const(freq); | 696 | ffreq.full = rfixed_const(freq); |
680 | /* max_error = ffreq * 0.0025; */ | 697 | /* max_error = ffreq * 0.0025; */ |
@@ -686,7 +703,7 @@ calc_fb_ref_div(struct radeon_pll *pll, | |||
686 | vco = pll->reference_freq * (((*fb_div) * 10) + (*fb_div_frac)); | 703 | vco = pll->reference_freq * (((*fb_div) * 10) + (*fb_div_frac)); |
687 | vco = vco / ((*ref_div) * 10); | 704 | vco = vco / ((*ref_div) * 10); |
688 | 705 | ||
689 | if ((vco < pll->pll_out_min) || (vco > pll->pll_out_max)) | 706 | if ((vco < pll_out_min) || (vco > pll_out_max)) |
690 | continue; | 707 | continue; |
691 | 708 | ||
692 | /* pll_out = vco / post_div; */ | 709 | /* pll_out = vco / post_div; */ |
@@ -714,6 +731,15 @@ static void radeon_compute_pll_new(struct radeon_pll *pll, | |||
714 | { | 731 | { |
715 | u32 fb_div = 0, fb_div_frac = 0, post_div = 0, ref_div = 0; | 732 | u32 fb_div = 0, fb_div_frac = 0, post_div = 0, ref_div = 0; |
716 | u32 best_freq = 0, vco_frequency; | 733 | u32 best_freq = 0, vco_frequency; |
734 | u32 pll_out_min, pll_out_max; | ||
735 | |||
736 | if (pll->flags & RADEON_PLL_IS_LCD) { | ||
737 | pll_out_min = pll->lcd_pll_out_min; | ||
738 | pll_out_max = pll->lcd_pll_out_max; | ||
739 | } else { | ||
740 | pll_out_min = pll->pll_out_min; | ||
741 | pll_out_max = pll->pll_out_max; | ||
742 | } | ||
717 | 743 | ||
718 | /* freq = freq / 10; */ | 744 | /* freq = freq / 10; */ |
719 | do_div(freq, 10); | 745 | do_div(freq, 10); |
@@ -724,7 +750,7 @@ static void radeon_compute_pll_new(struct radeon_pll *pll, | |||
724 | goto done; | 750 | goto done; |
725 | 751 | ||
726 | vco_frequency = freq * post_div; | 752 | vco_frequency = freq * post_div; |
727 | if ((vco_frequency < pll->pll_out_min) || (vco_frequency > pll->pll_out_max)) | 753 | if ((vco_frequency < pll_out_min) || (vco_frequency > pll_out_max)) |
728 | goto done; | 754 | goto done; |
729 | 755 | ||
730 | if (pll->flags & RADEON_PLL_USE_REF_DIV) { | 756 | if (pll->flags & RADEON_PLL_USE_REF_DIV) { |
@@ -749,7 +775,7 @@ static void radeon_compute_pll_new(struct radeon_pll *pll, | |||
749 | continue; | 775 | continue; |
750 | 776 | ||
751 | vco_frequency = freq * post_div; | 777 | vco_frequency = freq * post_div; |
752 | if ((vco_frequency < pll->pll_out_min) || (vco_frequency > pll->pll_out_max)) | 778 | if ((vco_frequency < pll_out_min) || (vco_frequency > pll_out_max)) |
753 | continue; | 779 | continue; |
754 | if (pll->flags & RADEON_PLL_USE_REF_DIV) { | 780 | if (pll->flags & RADEON_PLL_USE_REF_DIV) { |
755 | ref_div = pll->reference_div; | 781 | ref_div = pll->reference_div; |
@@ -945,6 +971,23 @@ static int radeon_modeset_create_props(struct radeon_device *rdev) | |||
945 | return 0; | 971 | return 0; |
946 | } | 972 | } |
947 | 973 | ||
974 | void radeon_update_display_priority(struct radeon_device *rdev) | ||
975 | { | ||
976 | /* adjustment options for the display watermarks */ | ||
977 | if ((radeon_disp_priority == 0) || (radeon_disp_priority > 2)) { | ||
978 | /* set display priority to high for r3xx, rv515 chips | ||
979 | * this avoids flickering due to underflow to the | ||
980 | * display controllers during heavy acceleration. | ||
981 | */ | ||
982 | if (ASIC_IS_R300(rdev) || (rdev->family == CHIP_RV515)) | ||
983 | rdev->disp_priority = 2; | ||
984 | else | ||
985 | rdev->disp_priority = 0; | ||
986 | } else | ||
987 | rdev->disp_priority = radeon_disp_priority; | ||
988 | |||
989 | } | ||
990 | |||
948 | int radeon_modeset_init(struct radeon_device *rdev) | 991 | int radeon_modeset_init(struct radeon_device *rdev) |
949 | { | 992 | { |
950 | int i; | 993 | int i; |
@@ -976,15 +1019,6 @@ int radeon_modeset_init(struct radeon_device *rdev) | |||
976 | radeon_combios_check_hardcoded_edid(rdev); | 1019 | radeon_combios_check_hardcoded_edid(rdev); |
977 | } | 1020 | } |
978 | 1021 | ||
979 | if (rdev->flags & RADEON_SINGLE_CRTC) | ||
980 | rdev->num_crtc = 1; | ||
981 | else { | ||
982 | if (ASIC_IS_DCE4(rdev)) | ||
983 | rdev->num_crtc = 6; | ||
984 | else | ||
985 | rdev->num_crtc = 2; | ||
986 | } | ||
987 | |||
988 | /* allocate crtcs */ | 1022 | /* allocate crtcs */ |
989 | for (i = 0; i < rdev->num_crtc; i++) { | 1023 | for (i = 0; i < rdev->num_crtc; i++) { |
990 | radeon_crtc_init(rdev->ddev, i); | 1024 | radeon_crtc_init(rdev->ddev, i); |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 6eec0ece6a6c..055a51732dcb 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
@@ -42,9 +42,10 @@ | |||
42 | * KMS wrapper. | 42 | * KMS wrapper. |
43 | * - 2.0.0 - initial interface | 43 | * - 2.0.0 - initial interface |
44 | * - 2.1.0 - add square tiling interface | 44 | * - 2.1.0 - add square tiling interface |
45 | * - 2.2.0 - add r6xx/r7xx const buffer support | ||
45 | */ | 46 | */ |
46 | #define KMS_DRIVER_MAJOR 2 | 47 | #define KMS_DRIVER_MAJOR 2 |
47 | #define KMS_DRIVER_MINOR 1 | 48 | #define KMS_DRIVER_MINOR 2 |
48 | #define KMS_DRIVER_PATCHLEVEL 0 | 49 | #define KMS_DRIVER_PATCHLEVEL 0 |
49 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); | 50 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); |
50 | int radeon_driver_unload_kms(struct drm_device *dev); | 51 | int radeon_driver_unload_kms(struct drm_device *dev); |
@@ -91,6 +92,8 @@ int radeon_tv = 1; | |||
91 | int radeon_new_pll = -1; | 92 | int radeon_new_pll = -1; |
92 | int radeon_dynpm = -1; | 93 | int radeon_dynpm = -1; |
93 | int radeon_audio = 1; | 94 | int radeon_audio = 1; |
95 | int radeon_disp_priority = 0; | ||
96 | int radeon_hw_i2c = 0; | ||
94 | 97 | ||
95 | MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers"); | 98 | MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers"); |
96 | module_param_named(no_wb, radeon_no_wb, int, 0444); | 99 | module_param_named(no_wb, radeon_no_wb, int, 0444); |
@@ -134,6 +137,12 @@ module_param_named(dynpm, radeon_dynpm, int, 0444); | |||
134 | MODULE_PARM_DESC(audio, "Audio enable (0 = disable)"); | 137 | MODULE_PARM_DESC(audio, "Audio enable (0 = disable)"); |
135 | module_param_named(audio, radeon_audio, int, 0444); | 138 | module_param_named(audio, radeon_audio, int, 0444); |
136 | 139 | ||
140 | MODULE_PARM_DESC(disp_priority, "Display Priority (0 = auto, 1 = normal, 2 = high)"); | ||
141 | module_param_named(disp_priority, radeon_disp_priority, int, 0444); | ||
142 | |||
143 | MODULE_PARM_DESC(hw_i2c, "hw i2c engine enable (0 = disable)"); | ||
144 | module_param_named(hw_i2c, radeon_hw_i2c, int, 0444); | ||
145 | |||
137 | static int radeon_suspend(struct drm_device *dev, pm_message_t state) | 146 | static int radeon_suspend(struct drm_device *dev, pm_message_t state) |
138 | { | 147 | { |
139 | drm_radeon_private_t *dev_priv = dev->dev_private; | 148 | drm_radeon_private_t *dev_priv = dev->dev_private; |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h index ec55f2b23c22..448eba89d1e6 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.h +++ b/drivers/gpu/drm/radeon/radeon_drv.h | |||
@@ -107,9 +107,10 @@ | |||
107 | * 1.30- Add support for occlusion queries | 107 | * 1.30- Add support for occlusion queries |
108 | * 1.31- Add support for num Z pipes from GET_PARAM | 108 | * 1.31- Add support for num Z pipes from GET_PARAM |
109 | * 1.32- fixes for rv740 setup | 109 | * 1.32- fixes for rv740 setup |
110 | * 1.33- Add r6xx/r7xx const buffer support | ||
110 | */ | 111 | */ |
111 | #define DRIVER_MAJOR 1 | 112 | #define DRIVER_MAJOR 1 |
112 | #define DRIVER_MINOR 32 | 113 | #define DRIVER_MINOR 33 |
113 | #define DRIVER_PATCHLEVEL 0 | 114 | #define DRIVER_PATCHLEVEL 0 |
114 | 115 | ||
115 | enum radeon_cp_microcode_version { | 116 | enum radeon_cp_microcode_version { |
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c index bc926ea0a530..c52fc3080b67 100644 --- a/drivers/gpu/drm/radeon/radeon_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_encoders.c | |||
@@ -302,7 +302,7 @@ static bool radeon_atom_mode_fixup(struct drm_encoder *encoder, | |||
302 | } | 302 | } |
303 | 303 | ||
304 | if (ASIC_IS_DCE3(rdev) && | 304 | if (ASIC_IS_DCE3(rdev) && |
305 | (radeon_encoder->active_device & (ATOM_DEVICE_DFP_SUPPORT))) { | 305 | (radeon_encoder->active_device & (ATOM_DEVICE_DFP_SUPPORT | ATOM_DEVICE_LCD_SUPPORT))) { |
306 | struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); | 306 | struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); |
307 | radeon_dp_set_link_config(connector, mode); | 307 | radeon_dp_set_link_config(connector, mode); |
308 | } | 308 | } |
@@ -317,12 +317,8 @@ atombios_dac_setup(struct drm_encoder *encoder, int action) | |||
317 | struct radeon_device *rdev = dev->dev_private; | 317 | struct radeon_device *rdev = dev->dev_private; |
318 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | 318 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
319 | DAC_ENCODER_CONTROL_PS_ALLOCATION args; | 319 | DAC_ENCODER_CONTROL_PS_ALLOCATION args; |
320 | int index = 0, num = 0; | 320 | int index = 0; |
321 | struct radeon_encoder_atom_dac *dac_info = radeon_encoder->enc_priv; | 321 | struct radeon_encoder_atom_dac *dac_info = radeon_encoder->enc_priv; |
322 | enum radeon_tv_std tv_std = TV_STD_NTSC; | ||
323 | |||
324 | if (dac_info->tv_std) | ||
325 | tv_std = dac_info->tv_std; | ||
326 | 322 | ||
327 | memset(&args, 0, sizeof(args)); | 323 | memset(&args, 0, sizeof(args)); |
328 | 324 | ||
@@ -330,12 +326,10 @@ atombios_dac_setup(struct drm_encoder *encoder, int action) | |||
330 | case ENCODER_OBJECT_ID_INTERNAL_DAC1: | 326 | case ENCODER_OBJECT_ID_INTERNAL_DAC1: |
331 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1: | 327 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1: |
332 | index = GetIndexIntoMasterTable(COMMAND, DAC1EncoderControl); | 328 | index = GetIndexIntoMasterTable(COMMAND, DAC1EncoderControl); |
333 | num = 1; | ||
334 | break; | 329 | break; |
335 | case ENCODER_OBJECT_ID_INTERNAL_DAC2: | 330 | case ENCODER_OBJECT_ID_INTERNAL_DAC2: |
336 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2: | 331 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2: |
337 | index = GetIndexIntoMasterTable(COMMAND, DAC2EncoderControl); | 332 | index = GetIndexIntoMasterTable(COMMAND, DAC2EncoderControl); |
338 | num = 2; | ||
339 | break; | 333 | break; |
340 | } | 334 | } |
341 | 335 | ||
@@ -346,7 +340,7 @@ atombios_dac_setup(struct drm_encoder *encoder, int action) | |||
346 | else if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT)) | 340 | else if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT)) |
347 | args.ucDacStandard = ATOM_DAC1_CV; | 341 | args.ucDacStandard = ATOM_DAC1_CV; |
348 | else { | 342 | else { |
349 | switch (tv_std) { | 343 | switch (dac_info->tv_std) { |
350 | case TV_STD_PAL: | 344 | case TV_STD_PAL: |
351 | case TV_STD_PAL_M: | 345 | case TV_STD_PAL_M: |
352 | case TV_STD_SCART_PAL: | 346 | case TV_STD_SCART_PAL: |
@@ -377,10 +371,6 @@ atombios_tv_setup(struct drm_encoder *encoder, int action) | |||
377 | TV_ENCODER_CONTROL_PS_ALLOCATION args; | 371 | TV_ENCODER_CONTROL_PS_ALLOCATION args; |
378 | int index = 0; | 372 | int index = 0; |
379 | struct radeon_encoder_atom_dac *dac_info = radeon_encoder->enc_priv; | 373 | struct radeon_encoder_atom_dac *dac_info = radeon_encoder->enc_priv; |
380 | enum radeon_tv_std tv_std = TV_STD_NTSC; | ||
381 | |||
382 | if (dac_info->tv_std) | ||
383 | tv_std = dac_info->tv_std; | ||
384 | 374 | ||
385 | memset(&args, 0, sizeof(args)); | 375 | memset(&args, 0, sizeof(args)); |
386 | 376 | ||
@@ -391,7 +381,7 @@ atombios_tv_setup(struct drm_encoder *encoder, int action) | |||
391 | if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT)) | 381 | if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT)) |
392 | args.sTVEncoder.ucTvStandard = ATOM_TV_CV; | 382 | args.sTVEncoder.ucTvStandard = ATOM_TV_CV; |
393 | else { | 383 | else { |
394 | switch (tv_std) { | 384 | switch (dac_info->tv_std) { |
395 | case TV_STD_NTSC: | 385 | case TV_STD_NTSC: |
396 | args.sTVEncoder.ucTvStandard = ATOM_TV_NTSC; | 386 | args.sTVEncoder.ucTvStandard = ATOM_TV_NTSC; |
397 | break; | 387 | break; |
@@ -519,7 +509,8 @@ atombios_digital_setup(struct drm_encoder *encoder, int action) | |||
519 | break; | 509 | break; |
520 | } | 510 | } |
521 | 511 | ||
522 | atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev); | 512 | if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev)) |
513 | return; | ||
523 | 514 | ||
524 | switch (frev) { | 515 | switch (frev) { |
525 | case 1: | 516 | case 1: |
@@ -593,7 +584,6 @@ atombios_digital_setup(struct drm_encoder *encoder, int action) | |||
593 | } | 584 | } |
594 | 585 | ||
595 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); | 586 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); |
596 | r600_hdmi_enable(encoder, hdmi_detected); | ||
597 | } | 587 | } |
598 | 588 | ||
599 | int | 589 | int |
@@ -708,7 +698,7 @@ atombios_dig_encoder_setup(struct drm_encoder *encoder, int action) | |||
708 | struct radeon_connector_atom_dig *dig_connector = | 698 | struct radeon_connector_atom_dig *dig_connector = |
709 | radeon_get_atom_connector_priv_from_encoder(encoder); | 699 | radeon_get_atom_connector_priv_from_encoder(encoder); |
710 | union dig_encoder_control args; | 700 | union dig_encoder_control args; |
711 | int index = 0, num = 0; | 701 | int index = 0; |
712 | uint8_t frev, crev; | 702 | uint8_t frev, crev; |
713 | 703 | ||
714 | if (!dig || !dig_connector) | 704 | if (!dig || !dig_connector) |
@@ -724,9 +714,9 @@ atombios_dig_encoder_setup(struct drm_encoder *encoder, int action) | |||
724 | else | 714 | else |
725 | index = GetIndexIntoMasterTable(COMMAND, DIG1EncoderControl); | 715 | index = GetIndexIntoMasterTable(COMMAND, DIG1EncoderControl); |
726 | } | 716 | } |
727 | num = dig->dig_encoder + 1; | ||
728 | 717 | ||
729 | atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev); | 718 | if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev)) |
719 | return; | ||
730 | 720 | ||
731 | args.v1.ucAction = action; | 721 | args.v1.ucAction = action; |
732 | args.v1.usPixelClock = cpu_to_le16(radeon_encoder->pixel_clock / 10); | 722 | args.v1.usPixelClock = cpu_to_le16(radeon_encoder->pixel_clock / 10); |
@@ -785,7 +775,7 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t | |||
785 | struct drm_connector *connector; | 775 | struct drm_connector *connector; |
786 | struct radeon_connector *radeon_connector; | 776 | struct radeon_connector *radeon_connector; |
787 | union dig_transmitter_control args; | 777 | union dig_transmitter_control args; |
788 | int index = 0, num = 0; | 778 | int index = 0; |
789 | uint8_t frev, crev; | 779 | uint8_t frev, crev; |
790 | bool is_dp = false; | 780 | bool is_dp = false; |
791 | int pll_id = 0; | 781 | int pll_id = 0; |
@@ -814,7 +804,8 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t | |||
814 | } | 804 | } |
815 | } | 805 | } |
816 | 806 | ||
817 | atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev); | 807 | if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev)) |
808 | return; | ||
818 | 809 | ||
819 | args.v1.ucAction = action; | 810 | args.v1.ucAction = action; |
820 | if (action == ATOM_TRANSMITTER_ACTION_INIT) { | 811 | if (action == ATOM_TRANSMITTER_ACTION_INIT) { |
@@ -860,15 +851,12 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t | |||
860 | switch (radeon_encoder->encoder_id) { | 851 | switch (radeon_encoder->encoder_id) { |
861 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: | 852 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: |
862 | args.v3.acConfig.ucTransmitterSel = 0; | 853 | args.v3.acConfig.ucTransmitterSel = 0; |
863 | num = 0; | ||
864 | break; | 854 | break; |
865 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: | 855 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: |
866 | args.v3.acConfig.ucTransmitterSel = 1; | 856 | args.v3.acConfig.ucTransmitterSel = 1; |
867 | num = 1; | ||
868 | break; | 857 | break; |
869 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: | 858 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: |
870 | args.v3.acConfig.ucTransmitterSel = 2; | 859 | args.v3.acConfig.ucTransmitterSel = 2; |
871 | num = 2; | ||
872 | break; | 860 | break; |
873 | } | 861 | } |
874 | 862 | ||
@@ -879,23 +867,19 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t | |||
879 | args.v3.acConfig.fCoherentMode = 1; | 867 | args.v3.acConfig.fCoherentMode = 1; |
880 | } | 868 | } |
881 | } else if (ASIC_IS_DCE32(rdev)) { | 869 | } else if (ASIC_IS_DCE32(rdev)) { |
882 | if (dig->dig_encoder == 1) | 870 | args.v2.acConfig.ucEncoderSel = dig->dig_encoder; |
883 | args.v2.acConfig.ucEncoderSel = 1; | ||
884 | if (dig_connector->linkb) | 871 | if (dig_connector->linkb) |
885 | args.v2.acConfig.ucLinkSel = 1; | 872 | args.v2.acConfig.ucLinkSel = 1; |
886 | 873 | ||
887 | switch (radeon_encoder->encoder_id) { | 874 | switch (radeon_encoder->encoder_id) { |
888 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: | 875 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: |
889 | args.v2.acConfig.ucTransmitterSel = 0; | 876 | args.v2.acConfig.ucTransmitterSel = 0; |
890 | num = 0; | ||
891 | break; | 877 | break; |
892 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: | 878 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: |
893 | args.v2.acConfig.ucTransmitterSel = 1; | 879 | args.v2.acConfig.ucTransmitterSel = 1; |
894 | num = 1; | ||
895 | break; | 880 | break; |
896 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: | 881 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: |
897 | args.v2.acConfig.ucTransmitterSel = 2; | 882 | args.v2.acConfig.ucTransmitterSel = 2; |
898 | num = 2; | ||
899 | break; | 883 | break; |
900 | } | 884 | } |
901 | 885 | ||
@@ -913,31 +897,25 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t | |||
913 | else | 897 | else |
914 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG1_ENCODER; | 898 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_DIG1_ENCODER; |
915 | 899 | ||
916 | switch (radeon_encoder->encoder_id) { | 900 | if ((rdev->flags & RADEON_IS_IGP) && |
917 | case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: | 901 | (radeon_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_UNIPHY)) { |
918 | if (rdev->flags & RADEON_IS_IGP) { | 902 | if (is_dp || (radeon_encoder->pixel_clock <= 165000)) { |
919 | if (radeon_encoder->pixel_clock > 165000) { | 903 | if (dig_connector->igp_lane_info & 0x1) |
920 | if (dig_connector->igp_lane_info & 0x3) | 904 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_0_3; |
921 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_0_7; | 905 | else if (dig_connector->igp_lane_info & 0x2) |
922 | else if (dig_connector->igp_lane_info & 0xc) | 906 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_4_7; |
923 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_8_15; | 907 | else if (dig_connector->igp_lane_info & 0x4) |
924 | } else { | 908 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_8_11; |
925 | if (dig_connector->igp_lane_info & 0x1) | 909 | else if (dig_connector->igp_lane_info & 0x8) |
926 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_0_3; | 910 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_12_15; |
927 | else if (dig_connector->igp_lane_info & 0x2) | 911 | } else { |
928 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_4_7; | 912 | if (dig_connector->igp_lane_info & 0x3) |
929 | else if (dig_connector->igp_lane_info & 0x4) | 913 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_0_7; |
930 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_8_11; | 914 | else if (dig_connector->igp_lane_info & 0xc) |
931 | else if (dig_connector->igp_lane_info & 0x8) | 915 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_8_15; |
932 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LANE_12_15; | ||
933 | } | ||
934 | } | 916 | } |
935 | break; | ||
936 | } | 917 | } |
937 | 918 | ||
938 | if (radeon_encoder->pixel_clock > 165000) | ||
939 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_8LANE_LINK; | ||
940 | |||
941 | if (dig_connector->linkb) | 919 | if (dig_connector->linkb) |
942 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LINKB; | 920 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_LINKB; |
943 | else | 921 | else |
@@ -948,6 +926,8 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t | |||
948 | else if (radeon_encoder->devices & (ATOM_DEVICE_DFP_SUPPORT)) { | 926 | else if (radeon_encoder->devices & (ATOM_DEVICE_DFP_SUPPORT)) { |
949 | if (dig->coherent_mode) | 927 | if (dig->coherent_mode) |
950 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_COHERENT; | 928 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_COHERENT; |
929 | if (radeon_encoder->pixel_clock > 165000) | ||
930 | args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_8LANE_LINK; | ||
951 | } | 931 | } |
952 | } | 932 | } |
953 | 933 | ||
@@ -1054,16 +1034,25 @@ radeon_atom_encoder_dpms(struct drm_encoder *encoder, int mode) | |||
1054 | if (is_dig) { | 1034 | if (is_dig) { |
1055 | switch (mode) { | 1035 | switch (mode) { |
1056 | case DRM_MODE_DPMS_ON: | 1036 | case DRM_MODE_DPMS_ON: |
1057 | atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0); | 1037 | if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_DP) { |
1058 | { | ||
1059 | struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); | 1038 | struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); |
1039 | |||
1060 | dp_link_train(encoder, connector); | 1040 | dp_link_train(encoder, connector); |
1041 | if (ASIC_IS_DCE4(rdev)) | ||
1042 | atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_ON); | ||
1061 | } | 1043 | } |
1044 | if (!ASIC_IS_DCE4(rdev)) | ||
1045 | atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0); | ||
1062 | break; | 1046 | break; |
1063 | case DRM_MODE_DPMS_STANDBY: | 1047 | case DRM_MODE_DPMS_STANDBY: |
1064 | case DRM_MODE_DPMS_SUSPEND: | 1048 | case DRM_MODE_DPMS_SUSPEND: |
1065 | case DRM_MODE_DPMS_OFF: | 1049 | case DRM_MODE_DPMS_OFF: |
1066 | atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT, 0, 0); | 1050 | if (!ASIC_IS_DCE4(rdev)) |
1051 | atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT, 0, 0); | ||
1052 | if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_DP) { | ||
1053 | if (ASIC_IS_DCE4(rdev)) | ||
1054 | atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_OFF); | ||
1055 | } | ||
1067 | break; | 1056 | break; |
1068 | } | 1057 | } |
1069 | } else { | 1058 | } else { |
@@ -1104,7 +1093,8 @@ atombios_set_encoder_crtc_source(struct drm_encoder *encoder) | |||
1104 | 1093 | ||
1105 | memset(&args, 0, sizeof(args)); | 1094 | memset(&args, 0, sizeof(args)); |
1106 | 1095 | ||
1107 | atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev); | 1096 | if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev)) |
1097 | return; | ||
1108 | 1098 | ||
1109 | switch (frev) { | 1099 | switch (frev) { |
1110 | case 1: | 1100 | case 1: |
@@ -1216,6 +1206,9 @@ atombios_set_encoder_crtc_source(struct drm_encoder *encoder) | |||
1216 | } | 1206 | } |
1217 | 1207 | ||
1218 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); | 1208 | atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); |
1209 | |||
1210 | /* update scratch regs with new routing */ | ||
1211 | radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); | ||
1219 | } | 1212 | } |
1220 | 1213 | ||
1221 | static void | 1214 | static void |
@@ -1326,19 +1319,9 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder, | |||
1326 | struct drm_device *dev = encoder->dev; | 1319 | struct drm_device *dev = encoder->dev; |
1327 | struct radeon_device *rdev = dev->dev_private; | 1320 | struct radeon_device *rdev = dev->dev_private; |
1328 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | 1321 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
1329 | struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); | ||
1330 | 1322 | ||
1331 | if (radeon_encoder->active_device & | ||
1332 | (ATOM_DEVICE_DFP_SUPPORT | ATOM_DEVICE_LCD_SUPPORT)) { | ||
1333 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; | ||
1334 | if (dig) | ||
1335 | dig->dig_encoder = radeon_atom_pick_dig_encoder(encoder); | ||
1336 | } | ||
1337 | radeon_encoder->pixel_clock = adjusted_mode->clock; | 1323 | radeon_encoder->pixel_clock = adjusted_mode->clock; |
1338 | 1324 | ||
1339 | radeon_atombios_encoder_crtc_scratch_regs(encoder, radeon_crtc->crtc_id); | ||
1340 | atombios_set_encoder_crtc_source(encoder); | ||
1341 | |||
1342 | if (ASIC_IS_AVIVO(rdev)) { | 1325 | if (ASIC_IS_AVIVO(rdev)) { |
1343 | if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT | ATOM_DEVICE_TV_SUPPORT)) | 1326 | if (radeon_encoder->active_device & (ATOM_DEVICE_CV_SUPPORT | ATOM_DEVICE_TV_SUPPORT)) |
1344 | atombios_yuv_setup(encoder, true); | 1327 | atombios_yuv_setup(encoder, true); |
@@ -1396,9 +1379,10 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder, | |||
1396 | } | 1379 | } |
1397 | atombios_apply_encoder_quirks(encoder, adjusted_mode); | 1380 | atombios_apply_encoder_quirks(encoder, adjusted_mode); |
1398 | 1381 | ||
1399 | /* XXX */ | 1382 | if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { |
1400 | if (!ASIC_IS_DCE4(rdev)) | 1383 | r600_hdmi_enable(encoder); |
1401 | r600_hdmi_setmode(encoder, adjusted_mode); | 1384 | r600_hdmi_setmode(encoder, adjusted_mode); |
1385 | } | ||
1402 | } | 1386 | } |
1403 | 1387 | ||
1404 | static bool | 1388 | static bool |
@@ -1418,7 +1402,8 @@ atombios_dac_load_detect(struct drm_encoder *encoder, struct drm_connector *conn | |||
1418 | 1402 | ||
1419 | memset(&args, 0, sizeof(args)); | 1403 | memset(&args, 0, sizeof(args)); |
1420 | 1404 | ||
1421 | atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev); | 1405 | if (!atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev, &crev)) |
1406 | return false; | ||
1422 | 1407 | ||
1423 | args.sDacload.ucMisc = 0; | 1408 | args.sDacload.ucMisc = 0; |
1424 | 1409 | ||
@@ -1492,8 +1477,20 @@ radeon_atom_dac_detect(struct drm_encoder *encoder, struct drm_connector *connec | |||
1492 | 1477 | ||
1493 | static void radeon_atom_encoder_prepare(struct drm_encoder *encoder) | 1478 | static void radeon_atom_encoder_prepare(struct drm_encoder *encoder) |
1494 | { | 1479 | { |
1480 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | ||
1481 | |||
1482 | if (radeon_encoder->active_device & | ||
1483 | (ATOM_DEVICE_DFP_SUPPORT | ATOM_DEVICE_LCD_SUPPORT)) { | ||
1484 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; | ||
1485 | if (dig) | ||
1486 | dig->dig_encoder = radeon_atom_pick_dig_encoder(encoder); | ||
1487 | } | ||
1488 | |||
1495 | radeon_atom_output_lock(encoder, true); | 1489 | radeon_atom_output_lock(encoder, true); |
1496 | radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF); | 1490 | radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF); |
1491 | |||
1492 | /* this is needed for the pll/ss setup to work correctly in some cases */ | ||
1493 | atombios_set_encoder_crtc_source(encoder); | ||
1497 | } | 1494 | } |
1498 | 1495 | ||
1499 | static void radeon_atom_encoder_commit(struct drm_encoder *encoder) | 1496 | static void radeon_atom_encoder_commit(struct drm_encoder *encoder) |
@@ -1509,6 +1506,8 @@ static void radeon_atom_encoder_disable(struct drm_encoder *encoder) | |||
1509 | radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF); | 1506 | radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF); |
1510 | 1507 | ||
1511 | if (radeon_encoder_is_digital(encoder)) { | 1508 | if (radeon_encoder_is_digital(encoder)) { |
1509 | if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) | ||
1510 | r600_hdmi_disable(encoder); | ||
1512 | dig = radeon_encoder->enc_priv; | 1511 | dig = radeon_encoder->enc_priv; |
1513 | dig->dig_encoder = -1; | 1512 | dig->dig_encoder = -1; |
1514 | } | 1513 | } |
@@ -1549,12 +1548,14 @@ static const struct drm_encoder_funcs radeon_atom_enc_funcs = { | |||
1549 | struct radeon_encoder_atom_dac * | 1548 | struct radeon_encoder_atom_dac * |
1550 | radeon_atombios_set_dac_info(struct radeon_encoder *radeon_encoder) | 1549 | radeon_atombios_set_dac_info(struct radeon_encoder *radeon_encoder) |
1551 | { | 1550 | { |
1551 | struct drm_device *dev = radeon_encoder->base.dev; | ||
1552 | struct radeon_device *rdev = dev->dev_private; | ||
1552 | struct radeon_encoder_atom_dac *dac = kzalloc(sizeof(struct radeon_encoder_atom_dac), GFP_KERNEL); | 1553 | struct radeon_encoder_atom_dac *dac = kzalloc(sizeof(struct radeon_encoder_atom_dac), GFP_KERNEL); |
1553 | 1554 | ||
1554 | if (!dac) | 1555 | if (!dac) |
1555 | return NULL; | 1556 | return NULL; |
1556 | 1557 | ||
1557 | dac->tv_std = TV_STD_NTSC; | 1558 | dac->tv_std = radeon_atombios_get_tv_info(rdev); |
1558 | return dac; | 1559 | return dac; |
1559 | } | 1560 | } |
1560 | 1561 | ||
@@ -1632,6 +1633,7 @@ radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_id, uint32_t su | |||
1632 | break; | 1633 | break; |
1633 | case ENCODER_OBJECT_ID_INTERNAL_DAC1: | 1634 | case ENCODER_OBJECT_ID_INTERNAL_DAC1: |
1634 | drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_DAC); | 1635 | drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_DAC); |
1636 | radeon_encoder->enc_priv = radeon_atombios_set_dac_info(radeon_encoder); | ||
1635 | drm_encoder_helper_add(encoder, &radeon_atom_dac_helper_funcs); | 1637 | drm_encoder_helper_add(encoder, &radeon_atom_dac_helper_funcs); |
1636 | break; | 1638 | break; |
1637 | case ENCODER_OBJECT_ID_INTERNAL_DAC2: | 1639 | case ENCODER_OBJECT_ID_INTERNAL_DAC2: |
@@ -1659,6 +1661,4 @@ radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_id, uint32_t su | |||
1659 | drm_encoder_helper_add(encoder, &radeon_atom_dig_helper_funcs); | 1661 | drm_encoder_helper_add(encoder, &radeon_atom_dig_helper_funcs); |
1660 | break; | 1662 | break; |
1661 | } | 1663 | } |
1662 | |||
1663 | r600_hdmi_init(encoder); | ||
1664 | } | 1664 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c index 8fccbf29235e..9ac57a09784b 100644 --- a/drivers/gpu/drm/radeon/radeon_fb.c +++ b/drivers/gpu/drm/radeon/radeon_fb.c | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/fb.h> | 32 | #include <linux/fb.h> |
32 | 33 | ||
33 | #include "drmP.h" | 34 | #include "drmP.h" |
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c index 8495d4e32e18..d90f95b405c5 100644 --- a/drivers/gpu/drm/radeon/radeon_fence.c +++ b/drivers/gpu/drm/radeon/radeon_fence.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/wait.h> | 33 | #include <linux/wait.h> |
34 | #include <linux/list.h> | 34 | #include <linux/list.h> |
35 | #include <linux/kref.h> | 35 | #include <linux/kref.h> |
36 | #include <linux/slab.h> | ||
36 | #include "drmP.h" | 37 | #include "drmP.h" |
37 | #include "drm.h" | 38 | #include "drm.h" |
38 | #include "radeon_reg.h" | 39 | #include "radeon_reg.h" |
diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c index 4ae50c19589f..5def6f5dff38 100644 --- a/drivers/gpu/drm/radeon/radeon_i2c.c +++ b/drivers/gpu/drm/radeon/radeon_i2c.c | |||
@@ -59,6 +59,7 @@ bool radeon_ddc_probe(struct radeon_connector *radeon_connector) | |||
59 | return false; | 59 | return false; |
60 | } | 60 | } |
61 | 61 | ||
62 | /* bit banging i2c */ | ||
62 | 63 | ||
63 | static void radeon_i2c_do_lock(struct radeon_i2c_chan *i2c, int lock_state) | 64 | static void radeon_i2c_do_lock(struct radeon_i2c_chan *i2c, int lock_state) |
64 | { | 65 | { |
@@ -181,13 +182,30 @@ static void set_data(void *i2c_priv, int data) | |||
181 | WREG32(rec->en_data_reg, val); | 182 | WREG32(rec->en_data_reg, val); |
182 | } | 183 | } |
183 | 184 | ||
185 | static int pre_xfer(struct i2c_adapter *i2c_adap) | ||
186 | { | ||
187 | struct radeon_i2c_chan *i2c = i2c_get_adapdata(i2c_adap); | ||
188 | |||
189 | radeon_i2c_do_lock(i2c, 1); | ||
190 | |||
191 | return 0; | ||
192 | } | ||
193 | |||
194 | static void post_xfer(struct i2c_adapter *i2c_adap) | ||
195 | { | ||
196 | struct radeon_i2c_chan *i2c = i2c_get_adapdata(i2c_adap); | ||
197 | |||
198 | radeon_i2c_do_lock(i2c, 0); | ||
199 | } | ||
200 | |||
201 | /* hw i2c */ | ||
202 | |||
184 | static u32 radeon_get_i2c_prescale(struct radeon_device *rdev) | 203 | static u32 radeon_get_i2c_prescale(struct radeon_device *rdev) |
185 | { | 204 | { |
186 | struct radeon_pll *spll = &rdev->clock.spll; | ||
187 | u32 sclk = radeon_get_engine_clock(rdev); | 205 | u32 sclk = radeon_get_engine_clock(rdev); |
188 | u32 prescale = 0; | 206 | u32 prescale = 0; |
189 | u32 n, m; | 207 | u32 nm; |
190 | u8 loop; | 208 | u8 n, m, loop; |
191 | int i2c_clock; | 209 | int i2c_clock; |
192 | 210 | ||
193 | switch (rdev->family) { | 211 | switch (rdev->family) { |
@@ -203,13 +221,15 @@ static u32 radeon_get_i2c_prescale(struct radeon_device *rdev) | |||
203 | case CHIP_R300: | 221 | case CHIP_R300: |
204 | case CHIP_R350: | 222 | case CHIP_R350: |
205 | case CHIP_RV350: | 223 | case CHIP_RV350: |
206 | n = (spll->reference_freq) / (4 * 6); | 224 | i2c_clock = 60; |
225 | nm = (sclk * 10) / (i2c_clock * 4); | ||
207 | for (loop = 1; loop < 255; loop++) { | 226 | for (loop = 1; loop < 255; loop++) { |
208 | if ((loop * (loop - 1)) > n) | 227 | if ((nm / loop) < loop) |
209 | break; | 228 | break; |
210 | } | 229 | } |
211 | m = loop - 1; | 230 | n = loop - 1; |
212 | prescale = m | (loop << 8); | 231 | m = loop - 2; |
232 | prescale = m | (n << 8); | ||
213 | break; | 233 | break; |
214 | case CHIP_RV380: | 234 | case CHIP_RV380: |
215 | case CHIP_RS400: | 235 | case CHIP_RS400: |
@@ -217,7 +237,6 @@ static u32 radeon_get_i2c_prescale(struct radeon_device *rdev) | |||
217 | case CHIP_R420: | 237 | case CHIP_R420: |
218 | case CHIP_R423: | 238 | case CHIP_R423: |
219 | case CHIP_RV410: | 239 | case CHIP_RV410: |
220 | sclk = radeon_get_engine_clock(rdev); | ||
221 | prescale = (((sclk * 10)/(4 * 128 * 100) + 1) << 8) + 128; | 240 | prescale = (((sclk * 10)/(4 * 128 * 100) + 1) << 8) + 128; |
222 | break; | 241 | break; |
223 | case CHIP_RS600: | 242 | case CHIP_RS600: |
@@ -232,7 +251,6 @@ static u32 radeon_get_i2c_prescale(struct radeon_device *rdev) | |||
232 | case CHIP_RV570: | 251 | case CHIP_RV570: |
233 | case CHIP_R580: | 252 | case CHIP_R580: |
234 | i2c_clock = 50; | 253 | i2c_clock = 50; |
235 | sclk = radeon_get_engine_clock(rdev); | ||
236 | if (rdev->family == CHIP_R520) | 254 | if (rdev->family == CHIP_R520) |
237 | prescale = (127 << 8) + ((sclk * 10) / (4 * 127 * i2c_clock)); | 255 | prescale = (127 << 8) + ((sclk * 10) / (4 * 127 * i2c_clock)); |
238 | else | 256 | else |
@@ -291,6 +309,7 @@ static int r100_hw_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
291 | prescale = radeon_get_i2c_prescale(rdev); | 309 | prescale = radeon_get_i2c_prescale(rdev); |
292 | 310 | ||
293 | reg = ((prescale << RADEON_I2C_PRESCALE_SHIFT) | | 311 | reg = ((prescale << RADEON_I2C_PRESCALE_SHIFT) | |
312 | RADEON_I2C_DRIVE_EN | | ||
294 | RADEON_I2C_START | | 313 | RADEON_I2C_START | |
295 | RADEON_I2C_STOP | | 314 | RADEON_I2C_STOP | |
296 | RADEON_I2C_GO); | 315 | RADEON_I2C_GO); |
@@ -757,26 +776,13 @@ done: | |||
757 | return ret; | 776 | return ret; |
758 | } | 777 | } |
759 | 778 | ||
760 | static int radeon_sw_i2c_xfer(struct i2c_adapter *i2c_adap, | 779 | static int radeon_hw_i2c_xfer(struct i2c_adapter *i2c_adap, |
761 | struct i2c_msg *msgs, int num) | 780 | struct i2c_msg *msgs, int num) |
762 | { | 781 | { |
763 | struct radeon_i2c_chan *i2c = i2c_get_adapdata(i2c_adap); | 782 | struct radeon_i2c_chan *i2c = i2c_get_adapdata(i2c_adap); |
764 | int ret; | ||
765 | |||
766 | radeon_i2c_do_lock(i2c, 1); | ||
767 | ret = i2c_transfer(&i2c->algo.radeon.bit_adapter, msgs, num); | ||
768 | radeon_i2c_do_lock(i2c, 0); | ||
769 | |||
770 | return ret; | ||
771 | } | ||
772 | |||
773 | static int radeon_i2c_xfer(struct i2c_adapter *i2c_adap, | ||
774 | struct i2c_msg *msgs, int num) | ||
775 | { | ||
776 | struct radeon_i2c_chan *i2c = i2c_get_adapdata(i2c_adap); | ||
777 | struct radeon_device *rdev = i2c->dev->dev_private; | 783 | struct radeon_device *rdev = i2c->dev->dev_private; |
778 | struct radeon_i2c_bus_rec *rec = &i2c->rec; | 784 | struct radeon_i2c_bus_rec *rec = &i2c->rec; |
779 | int ret; | 785 | int ret = 0; |
780 | 786 | ||
781 | switch (rdev->family) { | 787 | switch (rdev->family) { |
782 | case CHIP_R100: | 788 | case CHIP_R100: |
@@ -797,16 +803,12 @@ static int radeon_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
797 | case CHIP_RV410: | 803 | case CHIP_RV410: |
798 | case CHIP_RS400: | 804 | case CHIP_RS400: |
799 | case CHIP_RS480: | 805 | case CHIP_RS480: |
800 | if (rec->hw_capable) | 806 | ret = r100_hw_i2c_xfer(i2c_adap, msgs, num); |
801 | ret = r100_hw_i2c_xfer(i2c_adap, msgs, num); | ||
802 | else | ||
803 | ret = radeon_sw_i2c_xfer(i2c_adap, msgs, num); | ||
804 | break; | 807 | break; |
805 | case CHIP_RS600: | 808 | case CHIP_RS600: |
806 | case CHIP_RS690: | 809 | case CHIP_RS690: |
807 | case CHIP_RS740: | 810 | case CHIP_RS740: |
808 | /* XXX fill in hw i2c implementation */ | 811 | /* XXX fill in hw i2c implementation */ |
809 | ret = radeon_sw_i2c_xfer(i2c_adap, msgs, num); | ||
810 | break; | 812 | break; |
811 | case CHIP_RV515: | 813 | case CHIP_RV515: |
812 | case CHIP_R520: | 814 | case CHIP_R520: |
@@ -814,20 +816,16 @@ static int radeon_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
814 | case CHIP_RV560: | 816 | case CHIP_RV560: |
815 | case CHIP_RV570: | 817 | case CHIP_RV570: |
816 | case CHIP_R580: | 818 | case CHIP_R580: |
817 | if (rec->hw_capable) { | 819 | if (rec->mm_i2c) |
818 | if (rec->mm_i2c) | 820 | ret = r100_hw_i2c_xfer(i2c_adap, msgs, num); |
819 | ret = r100_hw_i2c_xfer(i2c_adap, msgs, num); | 821 | else |
820 | else | 822 | ret = r500_hw_i2c_xfer(i2c_adap, msgs, num); |
821 | ret = r500_hw_i2c_xfer(i2c_adap, msgs, num); | ||
822 | } else | ||
823 | ret = radeon_sw_i2c_xfer(i2c_adap, msgs, num); | ||
824 | break; | 823 | break; |
825 | case CHIP_R600: | 824 | case CHIP_R600: |
826 | case CHIP_RV610: | 825 | case CHIP_RV610: |
827 | case CHIP_RV630: | 826 | case CHIP_RV630: |
828 | case CHIP_RV670: | 827 | case CHIP_RV670: |
829 | /* XXX fill in hw i2c implementation */ | 828 | /* XXX fill in hw i2c implementation */ |
830 | ret = radeon_sw_i2c_xfer(i2c_adap, msgs, num); | ||
831 | break; | 829 | break; |
832 | case CHIP_RV620: | 830 | case CHIP_RV620: |
833 | case CHIP_RV635: | 831 | case CHIP_RV635: |
@@ -838,7 +836,6 @@ static int radeon_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
838 | case CHIP_RV710: | 836 | case CHIP_RV710: |
839 | case CHIP_RV740: | 837 | case CHIP_RV740: |
840 | /* XXX fill in hw i2c implementation */ | 838 | /* XXX fill in hw i2c implementation */ |
841 | ret = radeon_sw_i2c_xfer(i2c_adap, msgs, num); | ||
842 | break; | 839 | break; |
843 | case CHIP_CEDAR: | 840 | case CHIP_CEDAR: |
844 | case CHIP_REDWOOD: | 841 | case CHIP_REDWOOD: |
@@ -846,7 +843,6 @@ static int radeon_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
846 | case CHIP_CYPRESS: | 843 | case CHIP_CYPRESS: |
847 | case CHIP_HEMLOCK: | 844 | case CHIP_HEMLOCK: |
848 | /* XXX fill in hw i2c implementation */ | 845 | /* XXX fill in hw i2c implementation */ |
849 | ret = radeon_sw_i2c_xfer(i2c_adap, msgs, num); | ||
850 | break; | 846 | break; |
851 | default: | 847 | default: |
852 | DRM_ERROR("i2c: unhandled radeon chip\n"); | 848 | DRM_ERROR("i2c: unhandled radeon chip\n"); |
@@ -857,20 +853,21 @@ static int radeon_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
857 | return ret; | 853 | return ret; |
858 | } | 854 | } |
859 | 855 | ||
860 | static u32 radeon_i2c_func(struct i2c_adapter *adap) | 856 | static u32 radeon_hw_i2c_func(struct i2c_adapter *adap) |
861 | { | 857 | { |
862 | return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; | 858 | return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; |
863 | } | 859 | } |
864 | 860 | ||
865 | static const struct i2c_algorithm radeon_i2c_algo = { | 861 | static const struct i2c_algorithm radeon_i2c_algo = { |
866 | .master_xfer = radeon_i2c_xfer, | 862 | .master_xfer = radeon_hw_i2c_xfer, |
867 | .functionality = radeon_i2c_func, | 863 | .functionality = radeon_hw_i2c_func, |
868 | }; | 864 | }; |
869 | 865 | ||
870 | struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, | 866 | struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, |
871 | struct radeon_i2c_bus_rec *rec, | 867 | struct radeon_i2c_bus_rec *rec, |
872 | const char *name) | 868 | const char *name) |
873 | { | 869 | { |
870 | struct radeon_device *rdev = dev->dev_private; | ||
874 | struct radeon_i2c_chan *i2c; | 871 | struct radeon_i2c_chan *i2c; |
875 | int ret; | 872 | int ret; |
876 | 873 | ||
@@ -878,37 +875,43 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, | |||
878 | if (i2c == NULL) | 875 | if (i2c == NULL) |
879 | return NULL; | 876 | return NULL; |
880 | 877 | ||
881 | /* set the internal bit adapter */ | ||
882 | i2c->algo.radeon.bit_adapter.owner = THIS_MODULE; | ||
883 | i2c_set_adapdata(&i2c->algo.radeon.bit_adapter, i2c); | ||
884 | sprintf(i2c->algo.radeon.bit_adapter.name, "Radeon internal i2c bit bus %s", name); | ||
885 | i2c->algo.radeon.bit_adapter.algo_data = &i2c->algo.radeon.bit_data; | ||
886 | i2c->algo.radeon.bit_data.setsda = set_data; | ||
887 | i2c->algo.radeon.bit_data.setscl = set_clock; | ||
888 | i2c->algo.radeon.bit_data.getsda = get_data; | ||
889 | i2c->algo.radeon.bit_data.getscl = get_clock; | ||
890 | i2c->algo.radeon.bit_data.udelay = 20; | ||
891 | /* vesa says 2.2 ms is enough, 1 jiffy doesn't seem to always | ||
892 | * make this, 2 jiffies is a lot more reliable */ | ||
893 | i2c->algo.radeon.bit_data.timeout = 2; | ||
894 | i2c->algo.radeon.bit_data.data = i2c; | ||
895 | ret = i2c_bit_add_bus(&i2c->algo.radeon.bit_adapter); | ||
896 | if (ret) { | ||
897 | DRM_ERROR("Failed to register internal bit i2c %s\n", name); | ||
898 | goto out_free; | ||
899 | } | ||
900 | /* set the radeon i2c adapter */ | ||
901 | i2c->dev = dev; | ||
902 | i2c->rec = *rec; | 878 | i2c->rec = *rec; |
903 | i2c->adapter.owner = THIS_MODULE; | 879 | i2c->adapter.owner = THIS_MODULE; |
880 | i2c->dev = dev; | ||
904 | i2c_set_adapdata(&i2c->adapter, i2c); | 881 | i2c_set_adapdata(&i2c->adapter, i2c); |
905 | sprintf(i2c->adapter.name, "Radeon i2c %s", name); | 882 | if (rec->mm_i2c || |
906 | i2c->adapter.algo_data = &i2c->algo.radeon; | 883 | (rec->hw_capable && |
907 | i2c->adapter.algo = &radeon_i2c_algo; | 884 | radeon_hw_i2c && |
908 | ret = i2c_add_adapter(&i2c->adapter); | 885 | ((rdev->family <= CHIP_RS480) || |
909 | if (ret) { | 886 | ((rdev->family >= CHIP_RV515) && (rdev->family <= CHIP_R580))))) { |
910 | DRM_ERROR("Failed to register i2c %s\n", name); | 887 | /* set the radeon hw i2c adapter */ |
911 | goto out_free; | 888 | sprintf(i2c->adapter.name, "Radeon i2c hw bus %s", name); |
889 | i2c->adapter.algo = &radeon_i2c_algo; | ||
890 | ret = i2c_add_adapter(&i2c->adapter); | ||
891 | if (ret) { | ||
892 | DRM_ERROR("Failed to register hw i2c %s\n", name); | ||
893 | goto out_free; | ||
894 | } | ||
895 | } else { | ||
896 | /* set the radeon bit adapter */ | ||
897 | sprintf(i2c->adapter.name, "Radeon i2c bit bus %s", name); | ||
898 | i2c->adapter.algo_data = &i2c->algo.bit; | ||
899 | i2c->algo.bit.pre_xfer = pre_xfer; | ||
900 | i2c->algo.bit.post_xfer = post_xfer; | ||
901 | i2c->algo.bit.setsda = set_data; | ||
902 | i2c->algo.bit.setscl = set_clock; | ||
903 | i2c->algo.bit.getsda = get_data; | ||
904 | i2c->algo.bit.getscl = get_clock; | ||
905 | i2c->algo.bit.udelay = 20; | ||
906 | /* vesa says 2.2 ms is enough, 1 jiffy doesn't seem to always | ||
907 | * make this, 2 jiffies is a lot more reliable */ | ||
908 | i2c->algo.bit.timeout = 2; | ||
909 | i2c->algo.bit.data = i2c; | ||
910 | ret = i2c_bit_add_bus(&i2c->adapter); | ||
911 | if (ret) { | ||
912 | DRM_ERROR("Failed to register bit i2c %s\n", name); | ||
913 | goto out_free; | ||
914 | } | ||
912 | } | 915 | } |
913 | 916 | ||
914 | return i2c; | 917 | return i2c; |
@@ -953,16 +956,6 @@ void radeon_i2c_destroy(struct radeon_i2c_chan *i2c) | |||
953 | { | 956 | { |
954 | if (!i2c) | 957 | if (!i2c) |
955 | return; | 958 | return; |
956 | i2c_del_adapter(&i2c->algo.radeon.bit_adapter); | ||
957 | i2c_del_adapter(&i2c->adapter); | ||
958 | kfree(i2c); | ||
959 | } | ||
960 | |||
961 | void radeon_i2c_destroy_dp(struct radeon_i2c_chan *i2c) | ||
962 | { | ||
963 | if (!i2c) | ||
964 | return; | ||
965 | |||
966 | i2c_del_adapter(&i2c->adapter); | 959 | i2c_del_adapter(&i2c->adapter); |
967 | kfree(i2c); | 960 | kfree(i2c); |
968 | } | 961 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c index 3cfd60fd0083..a212041e8b0b 100644 --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c | |||
@@ -67,9 +67,10 @@ void radeon_driver_irq_preinstall_kms(struct drm_device *dev) | |||
67 | 67 | ||
68 | /* Disable *all* interrupts */ | 68 | /* Disable *all* interrupts */ |
69 | rdev->irq.sw_int = false; | 69 | rdev->irq.sw_int = false; |
70 | for (i = 0; i < 2; i++) { | 70 | for (i = 0; i < rdev->num_crtc; i++) |
71 | rdev->irq.crtc_vblank_int[i] = false; | 71 | rdev->irq.crtc_vblank_int[i] = false; |
72 | } | 72 | for (i = 0; i < 6; i++) |
73 | rdev->irq.hpd[i] = false; | ||
73 | radeon_irq_set(rdev); | 74 | radeon_irq_set(rdev); |
74 | /* Clear bits */ | 75 | /* Clear bits */ |
75 | radeon_irq_process(rdev); | 76 | radeon_irq_process(rdev); |
@@ -95,34 +96,29 @@ void radeon_driver_irq_uninstall_kms(struct drm_device *dev) | |||
95 | } | 96 | } |
96 | /* Disable *all* interrupts */ | 97 | /* Disable *all* interrupts */ |
97 | rdev->irq.sw_int = false; | 98 | rdev->irq.sw_int = false; |
98 | for (i = 0; i < 2; i++) { | 99 | for (i = 0; i < rdev->num_crtc; i++) |
99 | rdev->irq.crtc_vblank_int[i] = false; | 100 | rdev->irq.crtc_vblank_int[i] = false; |
101 | for (i = 0; i < 6; i++) | ||
100 | rdev->irq.hpd[i] = false; | 102 | rdev->irq.hpd[i] = false; |
101 | } | ||
102 | radeon_irq_set(rdev); | 103 | radeon_irq_set(rdev); |
103 | } | 104 | } |
104 | 105 | ||
105 | int radeon_irq_kms_init(struct radeon_device *rdev) | 106 | int radeon_irq_kms_init(struct radeon_device *rdev) |
106 | { | 107 | { |
107 | int r = 0; | 108 | int r = 0; |
108 | int num_crtc = 2; | ||
109 | 109 | ||
110 | if (rdev->flags & RADEON_SINGLE_CRTC) | ||
111 | num_crtc = 1; | ||
112 | spin_lock_init(&rdev->irq.sw_lock); | 110 | spin_lock_init(&rdev->irq.sw_lock); |
113 | r = drm_vblank_init(rdev->ddev, num_crtc); | 111 | r = drm_vblank_init(rdev->ddev, rdev->num_crtc); |
114 | if (r) { | 112 | if (r) { |
115 | return r; | 113 | return r; |
116 | } | 114 | } |
117 | /* enable msi */ | 115 | /* enable msi */ |
118 | rdev->msi_enabled = 0; | 116 | rdev->msi_enabled = 0; |
119 | /* MSIs don't seem to work on my rs780; | 117 | /* MSIs don't seem to work reliably on all IGP |
120 | * not sure about rs880 or other rs780s. | 118 | * chips. Disable MSI on them for now. |
121 | * Needs more investigation. | ||
122 | */ | 119 | */ |
123 | if ((rdev->family >= CHIP_RV380) && | 120 | if ((rdev->family >= CHIP_RV380) && |
124 | (rdev->family != CHIP_RS780) && | 121 | (!(rdev->flags & RADEON_IS_IGP))) { |
125 | (rdev->family != CHIP_RS880)) { | ||
126 | int ret = pci_enable_msi(rdev->pdev); | 122 | int ret = pci_enable_msi(rdev->pdev); |
127 | if (!ret) { | 123 | if (!ret) { |
128 | rdev->msi_enabled = 1; | 124 | rdev->msi_enabled = 1; |
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 20ec276e7596..d3657dcfdd26 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "radeon_drm.h" | 31 | #include "radeon_drm.h" |
32 | 32 | ||
33 | #include <linux/vga_switcheroo.h> | 33 | #include <linux/vga_switcheroo.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | int radeon_driver_unload_kms(struct drm_device *dev) | 36 | int radeon_driver_unload_kms(struct drm_device *dev) |
36 | { | 37 | { |
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c index df23d6a01d02..88865e38fe30 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c | |||
@@ -603,6 +603,10 @@ static bool radeon_set_crtc_timing(struct drm_crtc *crtc, struct drm_display_mod | |||
603 | ? RADEON_CRTC2_INTERLACE_EN | 603 | ? RADEON_CRTC2_INTERLACE_EN |
604 | : 0)); | 604 | : 0)); |
605 | 605 | ||
606 | /* rs4xx chips seem to like to have the crtc enabled when the timing is set */ | ||
607 | if ((rdev->family == CHIP_RS400) || (rdev->family == CHIP_RS480)) | ||
608 | crtc2_gen_cntl |= RADEON_CRTC2_EN; | ||
609 | |||
606 | disp2_merge_cntl = RREG32(RADEON_DISP2_MERGE_CNTL); | 610 | disp2_merge_cntl = RREG32(RADEON_DISP2_MERGE_CNTL); |
607 | disp2_merge_cntl &= ~RADEON_DISP2_RGB_OFFSET_EN; | 611 | disp2_merge_cntl &= ~RADEON_DISP2_RGB_OFFSET_EN; |
608 | 612 | ||
@@ -630,6 +634,10 @@ static bool radeon_set_crtc_timing(struct drm_crtc *crtc, struct drm_display_mod | |||
630 | ? RADEON_CRTC_INTERLACE_EN | 634 | ? RADEON_CRTC_INTERLACE_EN |
631 | : 0)); | 635 | : 0)); |
632 | 636 | ||
637 | /* rs4xx chips seem to like to have the crtc enabled when the timing is set */ | ||
638 | if ((rdev->family == CHIP_RS400) || (rdev->family == CHIP_RS480)) | ||
639 | crtc_gen_cntl |= RADEON_CRTC_EN; | ||
640 | |||
633 | crtc_ext_cntl = RREG32(RADEON_CRTC_EXT_CNTL); | 641 | crtc_ext_cntl = RREG32(RADEON_CRTC_EXT_CNTL); |
634 | crtc_ext_cntl |= (RADEON_XCRT_CNT_EN | | 642 | crtc_ext_cntl |= (RADEON_XCRT_CNT_EN | |
635 | RADEON_CRTC_VSYNC_DIS | | 643 | RADEON_CRTC_VSYNC_DIS | |
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index cf389ce50a8a..2441cca7d775 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c | |||
@@ -830,8 +830,8 @@ static void radeon_legacy_tv_dac_dpms(struct drm_encoder *encoder, int mode) | |||
830 | crtc2_gen_cntl &= ~RADEON_CRTC2_CRT2_ON; | 830 | crtc2_gen_cntl &= ~RADEON_CRTC2_CRT2_ON; |
831 | 831 | ||
832 | if (rdev->family == CHIP_R420 || | 832 | if (rdev->family == CHIP_R420 || |
833 | rdev->family == CHIP_R423 || | 833 | rdev->family == CHIP_R423 || |
834 | rdev->family == CHIP_RV410) | 834 | rdev->family == CHIP_RV410) |
835 | tv_dac_cntl |= (R420_TV_DAC_RDACPD | | 835 | tv_dac_cntl |= (R420_TV_DAC_RDACPD | |
836 | R420_TV_DAC_GDACPD | | 836 | R420_TV_DAC_GDACPD | |
837 | R420_TV_DAC_BDACPD | | 837 | R420_TV_DAC_BDACPD | |
@@ -907,35 +907,43 @@ static void radeon_legacy_tv_dac_mode_set(struct drm_encoder *encoder, | |||
907 | if (rdev->family != CHIP_R200) { | 907 | if (rdev->family != CHIP_R200) { |
908 | tv_dac_cntl = RREG32(RADEON_TV_DAC_CNTL); | 908 | tv_dac_cntl = RREG32(RADEON_TV_DAC_CNTL); |
909 | if (rdev->family == CHIP_R420 || | 909 | if (rdev->family == CHIP_R420 || |
910 | rdev->family == CHIP_R423 || | 910 | rdev->family == CHIP_R423 || |
911 | rdev->family == CHIP_RV410) { | 911 | rdev->family == CHIP_RV410) { |
912 | tv_dac_cntl &= ~(RADEON_TV_DAC_STD_MASK | | 912 | tv_dac_cntl &= ~(RADEON_TV_DAC_STD_MASK | |
913 | RADEON_TV_DAC_BGADJ_MASK | | 913 | RADEON_TV_DAC_BGADJ_MASK | |
914 | R420_TV_DAC_DACADJ_MASK | | 914 | R420_TV_DAC_DACADJ_MASK | |
915 | R420_TV_DAC_RDACPD | | 915 | R420_TV_DAC_RDACPD | |
916 | R420_TV_DAC_GDACPD | | 916 | R420_TV_DAC_GDACPD | |
917 | R420_TV_DAC_BDACPD | | 917 | R420_TV_DAC_BDACPD | |
918 | R420_TV_DAC_TVENABLE); | 918 | R420_TV_DAC_TVENABLE); |
919 | } else { | 919 | } else { |
920 | tv_dac_cntl &= ~(RADEON_TV_DAC_STD_MASK | | 920 | tv_dac_cntl &= ~(RADEON_TV_DAC_STD_MASK | |
921 | RADEON_TV_DAC_BGADJ_MASK | | 921 | RADEON_TV_DAC_BGADJ_MASK | |
922 | RADEON_TV_DAC_DACADJ_MASK | | 922 | RADEON_TV_DAC_DACADJ_MASK | |
923 | RADEON_TV_DAC_RDACPD | | 923 | RADEON_TV_DAC_RDACPD | |
924 | RADEON_TV_DAC_GDACPD | | 924 | RADEON_TV_DAC_GDACPD | |
925 | RADEON_TV_DAC_BDACPD); | 925 | RADEON_TV_DAC_BDACPD); |
926 | } | 926 | } |
927 | 927 | ||
928 | /* FIXME TV */ | 928 | tv_dac_cntl |= RADEON_TV_DAC_NBLANK | RADEON_TV_DAC_NHOLD; |
929 | if (tv_dac) { | 929 | |
930 | struct radeon_encoder_tv_dac *tv_dac = radeon_encoder->enc_priv; | 930 | if (is_tv) { |
931 | tv_dac_cntl |= (RADEON_TV_DAC_NBLANK | | 931 | if (tv_dac->tv_std == TV_STD_NTSC || |
932 | RADEON_TV_DAC_NHOLD | | 932 | tv_dac->tv_std == TV_STD_NTSC_J || |
933 | RADEON_TV_DAC_STD_PS2 | | 933 | tv_dac->tv_std == TV_STD_PAL_M || |
934 | tv_dac->ps2_tvdac_adj); | 934 | tv_dac->tv_std == TV_STD_PAL_60) |
935 | tv_dac_cntl |= tv_dac->ntsc_tvdac_adj; | ||
936 | else | ||
937 | tv_dac_cntl |= tv_dac->pal_tvdac_adj; | ||
938 | |||
939 | if (tv_dac->tv_std == TV_STD_NTSC || | ||
940 | tv_dac->tv_std == TV_STD_NTSC_J) | ||
941 | tv_dac_cntl |= RADEON_TV_DAC_STD_NTSC; | ||
942 | else | ||
943 | tv_dac_cntl |= RADEON_TV_DAC_STD_PAL; | ||
935 | } else | 944 | } else |
936 | tv_dac_cntl |= (RADEON_TV_DAC_NBLANK | | 945 | tv_dac_cntl |= (RADEON_TV_DAC_STD_PS2 | |
937 | RADEON_TV_DAC_NHOLD | | 946 | tv_dac->ps2_tvdac_adj); |
938 | RADEON_TV_DAC_STD_PS2); | ||
939 | 947 | ||
940 | WREG32(RADEON_TV_DAC_CNTL, tv_dac_cntl); | 948 | WREG32(RADEON_TV_DAC_CNTL, tv_dac_cntl); |
941 | } | 949 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_tv.c b/drivers/gpu/drm/radeon/radeon_legacy_tv.c index 417684daef4c..f2ed27c8055b 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_tv.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_tv.c | |||
@@ -57,6 +57,10 @@ | |||
57 | #define NTSC_TV_PLL_N_14 693 | 57 | #define NTSC_TV_PLL_N_14 693 |
58 | #define NTSC_TV_PLL_P_14 7 | 58 | #define NTSC_TV_PLL_P_14 7 |
59 | 59 | ||
60 | #define PAL_TV_PLL_M_14 19 | ||
61 | #define PAL_TV_PLL_N_14 353 | ||
62 | #define PAL_TV_PLL_P_14 5 | ||
63 | |||
60 | #define VERT_LEAD_IN_LINES 2 | 64 | #define VERT_LEAD_IN_LINES 2 |
61 | #define FRAC_BITS 0xe | 65 | #define FRAC_BITS 0xe |
62 | #define FRAC_MASK 0x3fff | 66 | #define FRAC_MASK 0x3fff |
@@ -205,9 +209,24 @@ static const struct radeon_tv_mode_constants available_tv_modes[] = { | |||
205 | 630627, /* defRestart */ | 209 | 630627, /* defRestart */ |
206 | 347, /* crtcPLL_N */ | 210 | 347, /* crtcPLL_N */ |
207 | 14, /* crtcPLL_M */ | 211 | 14, /* crtcPLL_M */ |
208 | 8, /* crtcPLL_postDiv */ | 212 | 8, /* crtcPLL_postDiv */ |
209 | 1022, /* pixToTV */ | 213 | 1022, /* pixToTV */ |
210 | }, | 214 | }, |
215 | { /* PAL timing for 14 Mhz ref clk */ | ||
216 | 800, /* horResolution */ | ||
217 | 600, /* verResolution */ | ||
218 | TV_STD_PAL, /* standard */ | ||
219 | 1131, /* horTotal */ | ||
220 | 742, /* verTotal */ | ||
221 | 813, /* horStart */ | ||
222 | 840, /* horSyncStart */ | ||
223 | 633, /* verSyncStart */ | ||
224 | 708369, /* defRestart */ | ||
225 | 211, /* crtcPLL_N */ | ||
226 | 9, /* crtcPLL_M */ | ||
227 | 8, /* crtcPLL_postDiv */ | ||
228 | 759, /* pixToTV */ | ||
229 | }, | ||
211 | }; | 230 | }; |
212 | 231 | ||
213 | #define N_AVAILABLE_MODES ARRAY_SIZE(available_tv_modes) | 232 | #define N_AVAILABLE_MODES ARRAY_SIZE(available_tv_modes) |
@@ -242,7 +261,7 @@ static const struct radeon_tv_mode_constants *radeon_legacy_tv_get_std_mode(stru | |||
242 | if (pll->reference_freq == 2700) | 261 | if (pll->reference_freq == 2700) |
243 | const_ptr = &available_tv_modes[1]; | 262 | const_ptr = &available_tv_modes[1]; |
244 | else | 263 | else |
245 | const_ptr = &available_tv_modes[1]; /* FIX ME */ | 264 | const_ptr = &available_tv_modes[3]; |
246 | } | 265 | } |
247 | return const_ptr; | 266 | return const_ptr; |
248 | } | 267 | } |
@@ -685,9 +704,9 @@ void radeon_legacy_tv_mode_set(struct drm_encoder *encoder, | |||
685 | n = PAL_TV_PLL_N_27; | 704 | n = PAL_TV_PLL_N_27; |
686 | p = PAL_TV_PLL_P_27; | 705 | p = PAL_TV_PLL_P_27; |
687 | } else { | 706 | } else { |
688 | m = PAL_TV_PLL_M_27; | 707 | m = PAL_TV_PLL_M_14; |
689 | n = PAL_TV_PLL_N_27; | 708 | n = PAL_TV_PLL_N_14; |
690 | p = PAL_TV_PLL_P_27; | 709 | p = PAL_TV_PLL_P_14; |
691 | } | 710 | } |
692 | } | 711 | } |
693 | 712 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index 1702b820aa4d..0b8e32776b10 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h | |||
@@ -129,6 +129,7 @@ struct radeon_tmds_pll { | |||
129 | #define RADEON_PLL_USE_FRAC_FB_DIV (1 << 10) | 129 | #define RADEON_PLL_USE_FRAC_FB_DIV (1 << 10) |
130 | #define RADEON_PLL_PREFER_CLOSEST_LOWER (1 << 11) | 130 | #define RADEON_PLL_PREFER_CLOSEST_LOWER (1 << 11) |
131 | #define RADEON_PLL_USE_POST_DIV (1 << 12) | 131 | #define RADEON_PLL_USE_POST_DIV (1 << 12) |
132 | #define RADEON_PLL_IS_LCD (1 << 13) | ||
132 | 133 | ||
133 | /* pll algo */ | 134 | /* pll algo */ |
134 | enum radeon_pll_algo { | 135 | enum radeon_pll_algo { |
@@ -149,6 +150,8 @@ struct radeon_pll { | |||
149 | uint32_t pll_in_max; | 150 | uint32_t pll_in_max; |
150 | uint32_t pll_out_min; | 151 | uint32_t pll_out_min; |
151 | uint32_t pll_out_max; | 152 | uint32_t pll_out_max; |
153 | uint32_t lcd_pll_out_min; | ||
154 | uint32_t lcd_pll_out_max; | ||
152 | uint32_t best_vco; | 155 | uint32_t best_vco; |
153 | 156 | ||
154 | /* divider limits */ | 157 | /* divider limits */ |
@@ -170,17 +173,12 @@ struct radeon_pll { | |||
170 | enum radeon_pll_algo algo; | 173 | enum radeon_pll_algo algo; |
171 | }; | 174 | }; |
172 | 175 | ||
173 | struct i2c_algo_radeon_data { | ||
174 | struct i2c_adapter bit_adapter; | ||
175 | struct i2c_algo_bit_data bit_data; | ||
176 | }; | ||
177 | |||
178 | struct radeon_i2c_chan { | 176 | struct radeon_i2c_chan { |
179 | struct i2c_adapter adapter; | 177 | struct i2c_adapter adapter; |
180 | struct drm_device *dev; | 178 | struct drm_device *dev; |
181 | union { | 179 | union { |
180 | struct i2c_algo_bit_data bit; | ||
182 | struct i2c_algo_dp_aux_data dp; | 181 | struct i2c_algo_dp_aux_data dp; |
183 | struct i2c_algo_radeon_data radeon; | ||
184 | } algo; | 182 | } algo; |
185 | struct radeon_i2c_bus_rec rec; | 183 | struct radeon_i2c_bus_rec rec; |
186 | }; | 184 | }; |
@@ -342,6 +340,7 @@ struct radeon_encoder { | |||
342 | struct drm_display_mode native_mode; | 340 | struct drm_display_mode native_mode; |
343 | void *enc_priv; | 341 | void *enc_priv; |
344 | int hdmi_offset; | 342 | int hdmi_offset; |
343 | int hdmi_config_offset; | ||
345 | int hdmi_audio_workaround; | 344 | int hdmi_audio_workaround; |
346 | int hdmi_buffer_status; | 345 | int hdmi_buffer_status; |
347 | }; | 346 | }; |
@@ -431,7 +430,6 @@ extern struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, | |||
431 | struct radeon_i2c_bus_rec *rec, | 430 | struct radeon_i2c_bus_rec *rec, |
432 | const char *name); | 431 | const char *name); |
433 | extern void radeon_i2c_destroy(struct radeon_i2c_chan *i2c); | 432 | extern void radeon_i2c_destroy(struct radeon_i2c_chan *i2c); |
434 | extern void radeon_i2c_destroy_dp(struct radeon_i2c_chan *i2c); | ||
435 | extern void radeon_i2c_get_byte(struct radeon_i2c_chan *i2c_bus, | 433 | extern void radeon_i2c_get_byte(struct radeon_i2c_chan *i2c_bus, |
436 | u8 slave_addr, | 434 | u8 slave_addr, |
437 | u8 addr, | 435 | u8 addr, |
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index fc9d00ac6b15..122774742bd5 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c | |||
@@ -30,6 +30,7 @@ | |||
30 | * Dave Airlie | 30 | * Dave Airlie |
31 | */ | 31 | */ |
32 | #include <linux/list.h> | 32 | #include <linux/list.h> |
33 | #include <linux/slab.h> | ||
33 | #include <drm/drmP.h> | 34 | #include <drm/drmP.h> |
34 | #include "radeon_drm.h" | 35 | #include "radeon_drm.h" |
35 | #include "radeon.h" | 36 | #include "radeon.h" |
@@ -185,8 +186,10 @@ int radeon_bo_pin(struct radeon_bo *bo, u32 domain, u64 *gpu_addr) | |||
185 | return 0; | 186 | return 0; |
186 | } | 187 | } |
187 | radeon_ttm_placement_from_domain(bo, domain); | 188 | radeon_ttm_placement_from_domain(bo, domain); |
188 | /* force to pin into visible video ram */ | 189 | if (domain == RADEON_GEM_DOMAIN_VRAM) { |
189 | bo->placement.lpfn = bo->rdev->mc.visible_vram_size >> PAGE_SHIFT; | 190 | /* force to pin into visible video ram */ |
191 | bo->placement.lpfn = bo->rdev->mc.visible_vram_size >> PAGE_SHIFT; | ||
192 | } | ||
190 | for (i = 0; i < bo->placement.num_placement; i++) | 193 | for (i = 0; i < bo->placement.num_placement; i++) |
191 | bo->placements[i] |= TTM_PL_FLAG_NO_EVICT; | 194 | bo->placements[i] |= TTM_PL_FLAG_NO_EVICT; |
192 | r = ttm_bo_validate(&bo->tbo, &bo->placement, false, false); | 195 | r = ttm_bo_validate(&bo->tbo, &bo->placement, false, false); |
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index d4d1c39a0e99..a4b57493aa78 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #define RADEON_RECLOCK_DELAY_MS 200 | 28 | #define RADEON_RECLOCK_DELAY_MS 200 |
29 | #define RADEON_WAIT_VBLANK_TIMEOUT 200 | 29 | #define RADEON_WAIT_VBLANK_TIMEOUT 200 |
30 | 30 | ||
31 | static bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish); | ||
31 | static void radeon_pm_set_clocks_locked(struct radeon_device *rdev); | 32 | static void radeon_pm_set_clocks_locked(struct radeon_device *rdev); |
32 | static void radeon_pm_set_clocks(struct radeon_device *rdev); | 33 | static void radeon_pm_set_clocks(struct radeon_device *rdev); |
33 | static void radeon_pm_idle_work_handler(struct work_struct *work); | 34 | static void radeon_pm_idle_work_handler(struct work_struct *work); |
@@ -179,6 +180,16 @@ static void radeon_get_power_state(struct radeon_device *rdev, | |||
179 | rdev->pm.requested_power_state->non_clock_info.pcie_lanes); | 180 | rdev->pm.requested_power_state->non_clock_info.pcie_lanes); |
180 | } | 181 | } |
181 | 182 | ||
183 | static inline void radeon_sync_with_vblank(struct radeon_device *rdev) | ||
184 | { | ||
185 | if (rdev->pm.active_crtcs) { | ||
186 | rdev->pm.vblank_sync = false; | ||
187 | wait_event_timeout( | ||
188 | rdev->irq.vblank_queue, rdev->pm.vblank_sync, | ||
189 | msecs_to_jiffies(RADEON_WAIT_VBLANK_TIMEOUT)); | ||
190 | } | ||
191 | } | ||
192 | |||
182 | static void radeon_set_power_state(struct radeon_device *rdev) | 193 | static void radeon_set_power_state(struct radeon_device *rdev) |
183 | { | 194 | { |
184 | /* if *_clock_mode are the same, *_power_state are as well */ | 195 | /* if *_clock_mode are the same, *_power_state are as well */ |
@@ -189,11 +200,28 @@ static void radeon_set_power_state(struct radeon_device *rdev) | |||
189 | rdev->pm.requested_clock_mode->sclk, | 200 | rdev->pm.requested_clock_mode->sclk, |
190 | rdev->pm.requested_clock_mode->mclk, | 201 | rdev->pm.requested_clock_mode->mclk, |
191 | rdev->pm.requested_power_state->non_clock_info.pcie_lanes); | 202 | rdev->pm.requested_power_state->non_clock_info.pcie_lanes); |
203 | |||
192 | /* set pcie lanes */ | 204 | /* set pcie lanes */ |
205 | /* TODO */ | ||
206 | |||
193 | /* set voltage */ | 207 | /* set voltage */ |
208 | /* TODO */ | ||
209 | |||
194 | /* set engine clock */ | 210 | /* set engine clock */ |
211 | radeon_sync_with_vblank(rdev); | ||
212 | radeon_pm_debug_check_in_vbl(rdev, false); | ||
195 | radeon_set_engine_clock(rdev, rdev->pm.requested_clock_mode->sclk); | 213 | radeon_set_engine_clock(rdev, rdev->pm.requested_clock_mode->sclk); |
214 | radeon_pm_debug_check_in_vbl(rdev, true); | ||
215 | |||
216 | #if 0 | ||
196 | /* set memory clock */ | 217 | /* set memory clock */ |
218 | if (rdev->asic->set_memory_clock) { | ||
219 | radeon_sync_with_vblank(rdev); | ||
220 | radeon_pm_debug_check_in_vbl(rdev, false); | ||
221 | radeon_set_memory_clock(rdev, rdev->pm.requested_clock_mode->mclk); | ||
222 | radeon_pm_debug_check_in_vbl(rdev, true); | ||
223 | } | ||
224 | #endif | ||
197 | 225 | ||
198 | rdev->pm.current_power_state = rdev->pm.requested_power_state; | 226 | rdev->pm.current_power_state = rdev->pm.requested_power_state; |
199 | rdev->pm.current_clock_mode = rdev->pm.requested_clock_mode; | 227 | rdev->pm.current_clock_mode = rdev->pm.requested_clock_mode; |
@@ -229,6 +257,12 @@ int radeon_pm_init(struct radeon_device *rdev) | |||
229 | return 0; | 257 | return 0; |
230 | } | 258 | } |
231 | 259 | ||
260 | void radeon_pm_fini(struct radeon_device *rdev) | ||
261 | { | ||
262 | if (rdev->pm.i2c_bus) | ||
263 | radeon_i2c_destroy(rdev->pm.i2c_bus); | ||
264 | } | ||
265 | |||
232 | void radeon_pm_compute_clocks(struct radeon_device *rdev) | 266 | void radeon_pm_compute_clocks(struct radeon_device *rdev) |
233 | { | 267 | { |
234 | struct drm_device *ddev = rdev->ddev; | 268 | struct drm_device *ddev = rdev->ddev; |
@@ -245,7 +279,8 @@ void radeon_pm_compute_clocks(struct radeon_device *rdev) | |||
245 | list_for_each_entry(connector, | 279 | list_for_each_entry(connector, |
246 | &ddev->mode_config.connector_list, head) { | 280 | &ddev->mode_config.connector_list, head) { |
247 | if (connector->encoder && | 281 | if (connector->encoder && |
248 | connector->dpms != DRM_MODE_DPMS_OFF) { | 282 | connector->encoder->crtc && |
283 | connector->dpms != DRM_MODE_DPMS_OFF) { | ||
249 | radeon_crtc = to_radeon_crtc(connector->encoder->crtc); | 284 | radeon_crtc = to_radeon_crtc(connector->encoder->crtc); |
250 | rdev->pm.active_crtcs |= (1 << radeon_crtc->crtc_id); | 285 | rdev->pm.active_crtcs |= (1 << radeon_crtc->crtc_id); |
251 | ++count; | 286 | ++count; |
@@ -333,10 +368,7 @@ static void radeon_pm_set_clocks_locked(struct radeon_device *rdev) | |||
333 | break; | 368 | break; |
334 | } | 369 | } |
335 | 370 | ||
336 | /* check if we are in vblank */ | ||
337 | radeon_pm_debug_check_in_vbl(rdev, false); | ||
338 | radeon_set_power_state(rdev); | 371 | radeon_set_power_state(rdev); |
339 | radeon_pm_debug_check_in_vbl(rdev, true); | ||
340 | rdev->pm.planned_action = PM_ACTION_NONE; | 372 | rdev->pm.planned_action = PM_ACTION_NONE; |
341 | } | 373 | } |
342 | 374 | ||
@@ -353,10 +385,7 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev) | |||
353 | rdev->pm.req_vblank |= (1 << 1); | 385 | rdev->pm.req_vblank |= (1 << 1); |
354 | drm_vblank_get(rdev->ddev, 1); | 386 | drm_vblank_get(rdev->ddev, 1); |
355 | } | 387 | } |
356 | if (rdev->pm.active_crtcs) | 388 | radeon_pm_set_clocks_locked(rdev); |
357 | wait_event_interruptible_timeout( | ||
358 | rdev->irq.vblank_queue, 0, | ||
359 | msecs_to_jiffies(RADEON_WAIT_VBLANK_TIMEOUT)); | ||
360 | if (rdev->pm.req_vblank & (1 << 0)) { | 389 | if (rdev->pm.req_vblank & (1 << 0)) { |
361 | rdev->pm.req_vblank &= ~(1 << 0); | 390 | rdev->pm.req_vblank &= ~(1 << 0); |
362 | drm_vblank_put(rdev->ddev, 0); | 391 | drm_vblank_put(rdev->ddev, 0); |
@@ -366,7 +395,6 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev) | |||
366 | drm_vblank_put(rdev->ddev, 1); | 395 | drm_vblank_put(rdev->ddev, 1); |
367 | } | 396 | } |
368 | 397 | ||
369 | radeon_pm_set_clocks_locked(rdev); | ||
370 | mutex_unlock(&rdev->cp.mutex); | 398 | mutex_unlock(&rdev->cp.mutex); |
371 | } | 399 | } |
372 | 400 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_reg.h b/drivers/gpu/drm/radeon/radeon_reg.h index 5c0dc082d330..eabbc9cf30a7 100644 --- a/drivers/gpu/drm/radeon/radeon_reg.h +++ b/drivers/gpu/drm/radeon/radeon_reg.h | |||
@@ -346,6 +346,7 @@ | |||
346 | # define RADEON_TVPLL_PWRMGT_OFF (1 << 30) | 346 | # define RADEON_TVPLL_PWRMGT_OFF (1 << 30) |
347 | # define RADEON_TVCLK_TURNOFF (1 << 31) | 347 | # define RADEON_TVCLK_TURNOFF (1 << 31) |
348 | #define RADEON_PLL_PWRMGT_CNTL 0x0015 /* PLL */ | 348 | #define RADEON_PLL_PWRMGT_CNTL 0x0015 /* PLL */ |
349 | # define RADEON_PM_MODE_SEL (1 << 13) | ||
349 | # define RADEON_TCL_BYPASS_DISABLE (1 << 20) | 350 | # define RADEON_TCL_BYPASS_DISABLE (1 << 20) |
350 | #define RADEON_CLR_CMP_CLR_3D 0x1a24 | 351 | #define RADEON_CLR_CMP_CLR_3D 0x1a24 |
351 | #define RADEON_CLR_CMP_CLR_DST 0x15c8 | 352 | #define RADEON_CLR_CMP_CLR_DST 0x15c8 |
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index e50513a62735..f6e1e8d4d986 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c | |||
@@ -26,6 +26,7 @@ | |||
26 | * Jerome Glisse | 26 | * Jerome Glisse |
27 | */ | 27 | */ |
28 | #include <linux/seq_file.h> | 28 | #include <linux/seq_file.h> |
29 | #include <linux/slab.h> | ||
29 | #include "drmP.h" | 30 | #include "drmP.h" |
30 | #include "radeon_drm.h" | 31 | #include "radeon_drm.h" |
31 | #include "radeon_reg.h" | 32 | #include "radeon_reg.h" |
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 43c5ab34b634..d031b6863082 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <drm/drmP.h> | 36 | #include <drm/drmP.h> |
37 | #include <drm/radeon_drm.h> | 37 | #include <drm/radeon_drm.h> |
38 | #include <linux/seq_file.h> | 38 | #include <linux/seq_file.h> |
39 | #include <linux/slab.h> | ||
39 | #include "radeon_reg.h" | 40 | #include "radeon_reg.h" |
40 | #include "radeon.h" | 41 | #include "radeon.h" |
41 | 42 | ||
diff --git a/drivers/gpu/drm/radeon/reg_srcs/r600 b/drivers/gpu/drm/radeon/reg_srcs/r600 index 8f414a5f520f..af0da4ae3f55 100644 --- a/drivers/gpu/drm/radeon/reg_srcs/r600 +++ b/drivers/gpu/drm/radeon/reg_srcs/r600 | |||
@@ -26,20 +26,16 @@ r600 0x9400 | |||
26 | 0x00028408 VGT_INDX_OFFSET | 26 | 0x00028408 VGT_INDX_OFFSET |
27 | 0x00028AA0 VGT_INSTANCE_STEP_RATE_0 | 27 | 0x00028AA0 VGT_INSTANCE_STEP_RATE_0 |
28 | 0x00028AA4 VGT_INSTANCE_STEP_RATE_1 | 28 | 0x00028AA4 VGT_INSTANCE_STEP_RATE_1 |
29 | 0x000088C0 VGT_LAST_COPY_STATE | ||
30 | 0x00028400 VGT_MAX_VTX_INDX | 29 | 0x00028400 VGT_MAX_VTX_INDX |
31 | 0x000088D8 VGT_MC_LAT_CNTL | ||
32 | 0x00028404 VGT_MIN_VTX_INDX | 30 | 0x00028404 VGT_MIN_VTX_INDX |
33 | 0x00028A94 VGT_MULTI_PRIM_IB_RESET_EN | 31 | 0x00028A94 VGT_MULTI_PRIM_IB_RESET_EN |
34 | 0x0002840C VGT_MULTI_PRIM_IB_RESET_INDX | 32 | 0x0002840C VGT_MULTI_PRIM_IB_RESET_INDX |
35 | 0x00008970 VGT_NUM_INDICES | 33 | 0x00008970 VGT_NUM_INDICES |
36 | 0x00008974 VGT_NUM_INSTANCES | 34 | 0x00008974 VGT_NUM_INSTANCES |
37 | 0x00028A10 VGT_OUTPUT_PATH_CNTL | 35 | 0x00028A10 VGT_OUTPUT_PATH_CNTL |
38 | 0x00028C5C VGT_OUT_DEALLOC_CNTL | ||
39 | 0x00028A84 VGT_PRIMITIVEID_EN | 36 | 0x00028A84 VGT_PRIMITIVEID_EN |
40 | 0x00008958 VGT_PRIMITIVE_TYPE | 37 | 0x00008958 VGT_PRIMITIVE_TYPE |
41 | 0x00028AB4 VGT_REUSE_OFF | 38 | 0x00028AB4 VGT_REUSE_OFF |
42 | 0x00028C58 VGT_VERTEX_REUSE_BLOCK_CNTL | ||
43 | 0x00028AB8 VGT_VTX_CNT_EN | 39 | 0x00028AB8 VGT_VTX_CNT_EN |
44 | 0x000088B0 VGT_VTX_VECT_EJECT_REG | 40 | 0x000088B0 VGT_VTX_VECT_EJECT_REG |
45 | 0x00028810 PA_CL_CLIP_CNTL | 41 | 0x00028810 PA_CL_CLIP_CNTL |
@@ -280,7 +276,6 @@ r600 0x9400 | |||
280 | 0x00028E00 PA_SU_POLY_OFFSET_FRONT_SCALE | 276 | 0x00028E00 PA_SU_POLY_OFFSET_FRONT_SCALE |
281 | 0x00028814 PA_SU_SC_MODE_CNTL | 277 | 0x00028814 PA_SU_SC_MODE_CNTL |
282 | 0x00028C08 PA_SU_VTX_CNTL | 278 | 0x00028C08 PA_SU_VTX_CNTL |
283 | 0x00008C00 SQ_CONFIG | ||
284 | 0x00008C04 SQ_GPR_RESOURCE_MGMT_1 | 279 | 0x00008C04 SQ_GPR_RESOURCE_MGMT_1 |
285 | 0x00008C08 SQ_GPR_RESOURCE_MGMT_2 | 280 | 0x00008C08 SQ_GPR_RESOURCE_MGMT_2 |
286 | 0x00008C10 SQ_STACK_RESOURCE_MGMT_1 | 281 | 0x00008C10 SQ_STACK_RESOURCE_MGMT_1 |
@@ -320,18 +315,6 @@ r600 0x9400 | |||
320 | 0x000283FC SQ_VTX_SEMANTIC_31 | 315 | 0x000283FC SQ_VTX_SEMANTIC_31 |
321 | 0x000288E0 SQ_VTX_SEMANTIC_CLEAR | 316 | 0x000288E0 SQ_VTX_SEMANTIC_CLEAR |
322 | 0x0003CFF4 SQ_VTX_START_INST_LOC | 317 | 0x0003CFF4 SQ_VTX_START_INST_LOC |
323 | 0x0003C000 SQ_TEX_SAMPLER_WORD0_0 | ||
324 | 0x0003C004 SQ_TEX_SAMPLER_WORD1_0 | ||
325 | 0x0003C008 SQ_TEX_SAMPLER_WORD2_0 | ||
326 | 0x00030000 SQ_ALU_CONSTANT0_0 | ||
327 | 0x00030004 SQ_ALU_CONSTANT1_0 | ||
328 | 0x00030008 SQ_ALU_CONSTANT2_0 | ||
329 | 0x0003000C SQ_ALU_CONSTANT3_0 | ||
330 | 0x0003E380 SQ_BOOL_CONST_0 | ||
331 | 0x0003E384 SQ_BOOL_CONST_1 | ||
332 | 0x0003E388 SQ_BOOL_CONST_2 | ||
333 | 0x0003E200 SQ_LOOP_CONST_0 | ||
334 | 0x0003E200 SQ_LOOP_CONST_DX10_0 | ||
335 | 0x000281C0 SQ_ALU_CONST_BUFFER_SIZE_GS_0 | 318 | 0x000281C0 SQ_ALU_CONST_BUFFER_SIZE_GS_0 |
336 | 0x000281C4 SQ_ALU_CONST_BUFFER_SIZE_GS_1 | 319 | 0x000281C4 SQ_ALU_CONST_BUFFER_SIZE_GS_1 |
337 | 0x000281C8 SQ_ALU_CONST_BUFFER_SIZE_GS_2 | 320 | 0x000281C8 SQ_ALU_CONST_BUFFER_SIZE_GS_2 |
@@ -380,54 +363,6 @@ r600 0x9400 | |||
380 | 0x000281B4 SQ_ALU_CONST_BUFFER_SIZE_VS_13 | 363 | 0x000281B4 SQ_ALU_CONST_BUFFER_SIZE_VS_13 |
381 | 0x000281B8 SQ_ALU_CONST_BUFFER_SIZE_VS_14 | 364 | 0x000281B8 SQ_ALU_CONST_BUFFER_SIZE_VS_14 |
382 | 0x000281BC SQ_ALU_CONST_BUFFER_SIZE_VS_15 | 365 | 0x000281BC SQ_ALU_CONST_BUFFER_SIZE_VS_15 |
383 | 0x000289C0 SQ_ALU_CONST_CACHE_GS_0 | ||
384 | 0x000289C4 SQ_ALU_CONST_CACHE_GS_1 | ||
385 | 0x000289C8 SQ_ALU_CONST_CACHE_GS_2 | ||
386 | 0x000289CC SQ_ALU_CONST_CACHE_GS_3 | ||
387 | 0x000289D0 SQ_ALU_CONST_CACHE_GS_4 | ||
388 | 0x000289D4 SQ_ALU_CONST_CACHE_GS_5 | ||
389 | 0x000289D8 SQ_ALU_CONST_CACHE_GS_6 | ||
390 | 0x000289DC SQ_ALU_CONST_CACHE_GS_7 | ||
391 | 0x000289E0 SQ_ALU_CONST_CACHE_GS_8 | ||
392 | 0x000289E4 SQ_ALU_CONST_CACHE_GS_9 | ||
393 | 0x000289E8 SQ_ALU_CONST_CACHE_GS_10 | ||
394 | 0x000289EC SQ_ALU_CONST_CACHE_GS_11 | ||
395 | 0x000289F0 SQ_ALU_CONST_CACHE_GS_12 | ||
396 | 0x000289F4 SQ_ALU_CONST_CACHE_GS_13 | ||
397 | 0x000289F8 SQ_ALU_CONST_CACHE_GS_14 | ||
398 | 0x000289FC SQ_ALU_CONST_CACHE_GS_15 | ||
399 | 0x00028940 SQ_ALU_CONST_CACHE_PS_0 | ||
400 | 0x00028944 SQ_ALU_CONST_CACHE_PS_1 | ||
401 | 0x00028948 SQ_ALU_CONST_CACHE_PS_2 | ||
402 | 0x0002894C SQ_ALU_CONST_CACHE_PS_3 | ||
403 | 0x00028950 SQ_ALU_CONST_CACHE_PS_4 | ||
404 | 0x00028954 SQ_ALU_CONST_CACHE_PS_5 | ||
405 | 0x00028958 SQ_ALU_CONST_CACHE_PS_6 | ||
406 | 0x0002895C SQ_ALU_CONST_CACHE_PS_7 | ||
407 | 0x00028960 SQ_ALU_CONST_CACHE_PS_8 | ||
408 | 0x00028964 SQ_ALU_CONST_CACHE_PS_9 | ||
409 | 0x00028968 SQ_ALU_CONST_CACHE_PS_10 | ||
410 | 0x0002896C SQ_ALU_CONST_CACHE_PS_11 | ||
411 | 0x00028970 SQ_ALU_CONST_CACHE_PS_12 | ||
412 | 0x00028974 SQ_ALU_CONST_CACHE_PS_13 | ||
413 | 0x00028978 SQ_ALU_CONST_CACHE_PS_14 | ||
414 | 0x0002897C SQ_ALU_CONST_CACHE_PS_15 | ||
415 | 0x00028980 SQ_ALU_CONST_CACHE_VS_0 | ||
416 | 0x00028984 SQ_ALU_CONST_CACHE_VS_1 | ||
417 | 0x00028988 SQ_ALU_CONST_CACHE_VS_2 | ||
418 | 0x0002898C SQ_ALU_CONST_CACHE_VS_3 | ||
419 | 0x00028990 SQ_ALU_CONST_CACHE_VS_4 | ||
420 | 0x00028994 SQ_ALU_CONST_CACHE_VS_5 | ||
421 | 0x00028998 SQ_ALU_CONST_CACHE_VS_6 | ||
422 | 0x0002899C SQ_ALU_CONST_CACHE_VS_7 | ||
423 | 0x000289A0 SQ_ALU_CONST_CACHE_VS_8 | ||
424 | 0x000289A4 SQ_ALU_CONST_CACHE_VS_9 | ||
425 | 0x000289A8 SQ_ALU_CONST_CACHE_VS_10 | ||
426 | 0x000289AC SQ_ALU_CONST_CACHE_VS_11 | ||
427 | 0x000289B0 SQ_ALU_CONST_CACHE_VS_12 | ||
428 | 0x000289B4 SQ_ALU_CONST_CACHE_VS_13 | ||
429 | 0x000289B8 SQ_ALU_CONST_CACHE_VS_14 | ||
430 | 0x000289BC SQ_ALU_CONST_CACHE_VS_15 | ||
431 | 0x000288D8 SQ_PGM_CF_OFFSET_ES | 366 | 0x000288D8 SQ_PGM_CF_OFFSET_ES |
432 | 0x000288DC SQ_PGM_CF_OFFSET_FS | 367 | 0x000288DC SQ_PGM_CF_OFFSET_FS |
433 | 0x000288D4 SQ_PGM_CF_OFFSET_GS | 368 | 0x000288D4 SQ_PGM_CF_OFFSET_GS |
@@ -494,12 +429,7 @@ r600 0x9400 | |||
494 | 0x00028438 SX_ALPHA_REF | 429 | 0x00028438 SX_ALPHA_REF |
495 | 0x00028410 SX_ALPHA_TEST_CONTROL | 430 | 0x00028410 SX_ALPHA_TEST_CONTROL |
496 | 0x00028350 SX_MISC | 431 | 0x00028350 SX_MISC |
497 | 0x0000A020 SMX_DC_CTL0 | ||
498 | 0x0000A024 SMX_DC_CTL1 | ||
499 | 0x0000A028 SMX_DC_CTL2 | ||
500 | 0x00009608 TC_CNTL | ||
501 | 0x00009604 TC_INVALIDATE | 432 | 0x00009604 TC_INVALIDATE |
502 | 0x00009490 TD_CNTL | ||
503 | 0x00009400 TD_FILTER4 | 433 | 0x00009400 TD_FILTER4 |
504 | 0x00009404 TD_FILTER4_1 | 434 | 0x00009404 TD_FILTER4_1 |
505 | 0x00009408 TD_FILTER4_2 | 435 | 0x00009408 TD_FILTER4_2 |
@@ -824,14 +754,9 @@ r600 0x9400 | |||
824 | 0x00028428 CB_FOG_GREEN | 754 | 0x00028428 CB_FOG_GREEN |
825 | 0x00028424 CB_FOG_RED | 755 | 0x00028424 CB_FOG_RED |
826 | 0x00008040 WAIT_UNTIL | 756 | 0x00008040 WAIT_UNTIL |
827 | 0x00008950 CC_GC_SHADER_PIPE_CONFIG | ||
828 | 0x00008954 GC_USER_SHADER_PIPE_CONFIG | ||
829 | 0x00009714 VC_ENHANCE | 757 | 0x00009714 VC_ENHANCE |
830 | 0x00009830 DB_DEBUG | 758 | 0x00009830 DB_DEBUG |
831 | 0x00009838 DB_WATERMARKS | 759 | 0x00009838 DB_WATERMARKS |
832 | 0x00028D28 DB_SRESULTS_COMPARE_STATE0 | 760 | 0x00028D28 DB_SRESULTS_COMPARE_STATE0 |
833 | 0x00028D44 DB_ALPHA_TO_MASK | 761 | 0x00028D44 DB_ALPHA_TO_MASK |
834 | 0x00009504 TA_CNTL | ||
835 | 0x00009700 VC_CNTL | 762 | 0x00009700 VC_CNTL |
836 | 0x00009718 VC_CONFIG | ||
837 | 0x0000A02C SMX_DC_MC_INTF_CTL | ||
diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs400.c index 626d51891ee9..1a41cb268b72 100644 --- a/drivers/gpu/drm/radeon/rs400.c +++ b/drivers/gpu/drm/radeon/rs400.c | |||
@@ -26,8 +26,10 @@ | |||
26 | * Jerome Glisse | 26 | * Jerome Glisse |
27 | */ | 27 | */ |
28 | #include <linux/seq_file.h> | 28 | #include <linux/seq_file.h> |
29 | #include <linux/slab.h> | ||
29 | #include <drm/drmP.h> | 30 | #include <drm/drmP.h> |
30 | #include "radeon.h" | 31 | #include "radeon.h" |
32 | #include "radeon_asic.h" | ||
31 | #include "rs400d.h" | 33 | #include "rs400d.h" |
32 | 34 | ||
33 | /* This files gather functions specifics to : rs400,rs480 */ | 35 | /* This files gather functions specifics to : rs400,rs480 */ |
@@ -202,9 +204,9 @@ void rs400_gart_disable(struct radeon_device *rdev) | |||
202 | 204 | ||
203 | void rs400_gart_fini(struct radeon_device *rdev) | 205 | void rs400_gart_fini(struct radeon_device *rdev) |
204 | { | 206 | { |
207 | radeon_gart_fini(rdev); | ||
205 | rs400_gart_disable(rdev); | 208 | rs400_gart_disable(rdev); |
206 | radeon_gart_table_ram_free(rdev); | 209 | radeon_gart_table_ram_free(rdev); |
207 | radeon_gart_fini(rdev); | ||
208 | } | 210 | } |
209 | 211 | ||
210 | int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr) | 212 | int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr) |
@@ -264,6 +266,7 @@ void rs400_mc_init(struct radeon_device *rdev) | |||
264 | base = (RREG32(RADEON_NB_TOM) & 0xffff) << 16; | 266 | base = (RREG32(RADEON_NB_TOM) & 0xffff) << 16; |
265 | radeon_vram_location(rdev, &rdev->mc, base); | 267 | radeon_vram_location(rdev, &rdev->mc, base); |
266 | radeon_gtt_location(rdev, &rdev->mc); | 268 | radeon_gtt_location(rdev, &rdev->mc); |
269 | radeon_update_bandwidth_info(rdev); | ||
267 | } | 270 | } |
268 | 271 | ||
269 | uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg) | 272 | uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg) |
@@ -388,6 +391,8 @@ static int rs400_startup(struct radeon_device *rdev) | |||
388 | { | 391 | { |
389 | int r; | 392 | int r; |
390 | 393 | ||
394 | r100_set_common_regs(rdev); | ||
395 | |||
391 | rs400_mc_program(rdev); | 396 | rs400_mc_program(rdev); |
392 | /* Resume clock */ | 397 | /* Resume clock */ |
393 | r300_clock_startup(rdev); | 398 | r300_clock_startup(rdev); |
@@ -453,6 +458,7 @@ int rs400_suspend(struct radeon_device *rdev) | |||
453 | 458 | ||
454 | void rs400_fini(struct radeon_device *rdev) | 459 | void rs400_fini(struct radeon_device *rdev) |
455 | { | 460 | { |
461 | radeon_pm_fini(rdev); | ||
456 | r100_cp_fini(rdev); | 462 | r100_cp_fini(rdev); |
457 | r100_wb_fini(rdev); | 463 | r100_wb_fini(rdev); |
458 | r100_ib_fini(rdev); | 464 | r100_ib_fini(rdev); |
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c index 47f046b78c6b..abf824c2123d 100644 --- a/drivers/gpu/drm/radeon/rs600.c +++ b/drivers/gpu/drm/radeon/rs600.c | |||
@@ -37,6 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | #include "drmP.h" | 38 | #include "drmP.h" |
39 | #include "radeon.h" | 39 | #include "radeon.h" |
40 | #include "radeon_asic.h" | ||
40 | #include "atom.h" | 41 | #include "atom.h" |
41 | #include "rs600d.h" | 42 | #include "rs600d.h" |
42 | 43 | ||
@@ -267,9 +268,9 @@ void rs600_gart_disable(struct radeon_device *rdev) | |||
267 | 268 | ||
268 | void rs600_gart_fini(struct radeon_device *rdev) | 269 | void rs600_gart_fini(struct radeon_device *rdev) |
269 | { | 270 | { |
271 | radeon_gart_fini(rdev); | ||
270 | rs600_gart_disable(rdev); | 272 | rs600_gart_disable(rdev); |
271 | radeon_gart_table_vram_free(rdev); | 273 | radeon_gart_table_vram_free(rdev); |
272 | radeon_gart_fini(rdev); | ||
273 | } | 274 | } |
274 | 275 | ||
275 | #define R600_PTE_VALID (1 << 0) | 276 | #define R600_PTE_VALID (1 << 0) |
@@ -392,10 +393,12 @@ int rs600_irq_process(struct radeon_device *rdev) | |||
392 | /* Vertical blank interrupts */ | 393 | /* Vertical blank interrupts */ |
393 | if (G_007EDC_LB_D1_VBLANK_INTERRUPT(r500_disp_int)) { | 394 | if (G_007EDC_LB_D1_VBLANK_INTERRUPT(r500_disp_int)) { |
394 | drm_handle_vblank(rdev->ddev, 0); | 395 | drm_handle_vblank(rdev->ddev, 0); |
396 | rdev->pm.vblank_sync = true; | ||
395 | wake_up(&rdev->irq.vblank_queue); | 397 | wake_up(&rdev->irq.vblank_queue); |
396 | } | 398 | } |
397 | if (G_007EDC_LB_D2_VBLANK_INTERRUPT(r500_disp_int)) { | 399 | if (G_007EDC_LB_D2_VBLANK_INTERRUPT(r500_disp_int)) { |
398 | drm_handle_vblank(rdev->ddev, 1); | 400 | drm_handle_vblank(rdev->ddev, 1); |
401 | rdev->pm.vblank_sync = true; | ||
399 | wake_up(&rdev->irq.vblank_queue); | 402 | wake_up(&rdev->irq.vblank_queue); |
400 | } | 403 | } |
401 | if (G_007EDC_DC_HOT_PLUG_DETECT1_INTERRUPT(r500_disp_int)) { | 404 | if (G_007EDC_DC_HOT_PLUG_DETECT1_INTERRUPT(r500_disp_int)) { |
@@ -472,13 +475,38 @@ void rs600_mc_init(struct radeon_device *rdev) | |||
472 | rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); | 475 | rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); |
473 | base = RREG32_MC(R_000004_MC_FB_LOCATION); | 476 | base = RREG32_MC(R_000004_MC_FB_LOCATION); |
474 | base = G_000004_MC_FB_START(base) << 16; | 477 | base = G_000004_MC_FB_START(base) << 16; |
478 | rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); | ||
475 | radeon_vram_location(rdev, &rdev->mc, base); | 479 | radeon_vram_location(rdev, &rdev->mc, base); |
476 | radeon_gtt_location(rdev, &rdev->mc); | 480 | radeon_gtt_location(rdev, &rdev->mc); |
481 | radeon_update_bandwidth_info(rdev); | ||
477 | } | 482 | } |
478 | 483 | ||
479 | void rs600_bandwidth_update(struct radeon_device *rdev) | 484 | void rs600_bandwidth_update(struct radeon_device *rdev) |
480 | { | 485 | { |
481 | /* FIXME: implement, should this be like rs690 ? */ | 486 | struct drm_display_mode *mode0 = NULL; |
487 | struct drm_display_mode *mode1 = NULL; | ||
488 | u32 d1mode_priority_a_cnt, d2mode_priority_a_cnt; | ||
489 | /* FIXME: implement full support */ | ||
490 | |||
491 | radeon_update_display_priority(rdev); | ||
492 | |||
493 | if (rdev->mode_info.crtcs[0]->base.enabled) | ||
494 | mode0 = &rdev->mode_info.crtcs[0]->base.mode; | ||
495 | if (rdev->mode_info.crtcs[1]->base.enabled) | ||
496 | mode1 = &rdev->mode_info.crtcs[1]->base.mode; | ||
497 | |||
498 | rs690_line_buffer_adjust(rdev, mode0, mode1); | ||
499 | |||
500 | if (rdev->disp_priority == 2) { | ||
501 | d1mode_priority_a_cnt = RREG32(R_006548_D1MODE_PRIORITY_A_CNT); | ||
502 | d2mode_priority_a_cnt = RREG32(R_006D48_D2MODE_PRIORITY_A_CNT); | ||
503 | d1mode_priority_a_cnt |= S_006548_D1MODE_PRIORITY_A_ALWAYS_ON(1); | ||
504 | d2mode_priority_a_cnt |= S_006D48_D2MODE_PRIORITY_A_ALWAYS_ON(1); | ||
505 | WREG32(R_006548_D1MODE_PRIORITY_A_CNT, d1mode_priority_a_cnt); | ||
506 | WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, d1mode_priority_a_cnt); | ||
507 | WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, d2mode_priority_a_cnt); | ||
508 | WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, d2mode_priority_a_cnt); | ||
509 | } | ||
482 | } | 510 | } |
483 | 511 | ||
484 | uint32_t rs600_mc_rreg(struct radeon_device *rdev, uint32_t reg) | 512 | uint32_t rs600_mc_rreg(struct radeon_device *rdev, uint32_t reg) |
@@ -598,6 +626,7 @@ int rs600_suspend(struct radeon_device *rdev) | |||
598 | 626 | ||
599 | void rs600_fini(struct radeon_device *rdev) | 627 | void rs600_fini(struct radeon_device *rdev) |
600 | { | 628 | { |
629 | radeon_pm_fini(rdev); | ||
601 | r100_cp_fini(rdev); | 630 | r100_cp_fini(rdev); |
602 | r100_wb_fini(rdev); | 631 | r100_wb_fini(rdev); |
603 | r100_ib_fini(rdev); | 632 | r100_ib_fini(rdev); |
diff --git a/drivers/gpu/drm/radeon/rs600d.h b/drivers/gpu/drm/radeon/rs600d.h index c1c8f5885cbb..e52d2695510b 100644 --- a/drivers/gpu/drm/radeon/rs600d.h +++ b/drivers/gpu/drm/radeon/rs600d.h | |||
@@ -535,4 +535,57 @@ | |||
535 | #define G_00016C_INVALIDATE_L1_TLB(x) (((x) >> 20) & 0x1) | 535 | #define G_00016C_INVALIDATE_L1_TLB(x) (((x) >> 20) & 0x1) |
536 | #define C_00016C_INVALIDATE_L1_TLB 0xFFEFFFFF | 536 | #define C_00016C_INVALIDATE_L1_TLB 0xFFEFFFFF |
537 | 537 | ||
538 | #define R_006548_D1MODE_PRIORITY_A_CNT 0x006548 | ||
539 | #define S_006548_D1MODE_PRIORITY_MARK_A(x) (((x) & 0x7FFF) << 0) | ||
540 | #define G_006548_D1MODE_PRIORITY_MARK_A(x) (((x) >> 0) & 0x7FFF) | ||
541 | #define C_006548_D1MODE_PRIORITY_MARK_A 0xFFFF8000 | ||
542 | #define S_006548_D1MODE_PRIORITY_A_OFF(x) (((x) & 0x1) << 16) | ||
543 | #define G_006548_D1MODE_PRIORITY_A_OFF(x) (((x) >> 16) & 0x1) | ||
544 | #define C_006548_D1MODE_PRIORITY_A_OFF 0xFFFEFFFF | ||
545 | #define S_006548_D1MODE_PRIORITY_A_ALWAYS_ON(x) (((x) & 0x1) << 20) | ||
546 | #define G_006548_D1MODE_PRIORITY_A_ALWAYS_ON(x) (((x) >> 20) & 0x1) | ||
547 | #define C_006548_D1MODE_PRIORITY_A_ALWAYS_ON 0xFFEFFFFF | ||
548 | #define S_006548_D1MODE_PRIORITY_A_FORCE_MASK(x) (((x) & 0x1) << 24) | ||
549 | #define G_006548_D1MODE_PRIORITY_A_FORCE_MASK(x) (((x) >> 24) & 0x1) | ||
550 | #define C_006548_D1MODE_PRIORITY_A_FORCE_MASK 0xFEFFFFFF | ||
551 | #define R_00654C_D1MODE_PRIORITY_B_CNT 0x00654C | ||
552 | #define S_00654C_D1MODE_PRIORITY_MARK_B(x) (((x) & 0x7FFF) << 0) | ||
553 | #define G_00654C_D1MODE_PRIORITY_MARK_B(x) (((x) >> 0) & 0x7FFF) | ||
554 | #define C_00654C_D1MODE_PRIORITY_MARK_B 0xFFFF8000 | ||
555 | #define S_00654C_D1MODE_PRIORITY_B_OFF(x) (((x) & 0x1) << 16) | ||
556 | #define G_00654C_D1MODE_PRIORITY_B_OFF(x) (((x) >> 16) & 0x1) | ||
557 | #define C_00654C_D1MODE_PRIORITY_B_OFF 0xFFFEFFFF | ||
558 | #define S_00654C_D1MODE_PRIORITY_B_ALWAYS_ON(x) (((x) & 0x1) << 20) | ||
559 | #define G_00654C_D1MODE_PRIORITY_B_ALWAYS_ON(x) (((x) >> 20) & 0x1) | ||
560 | #define C_00654C_D1MODE_PRIORITY_B_ALWAYS_ON 0xFFEFFFFF | ||
561 | #define S_00654C_D1MODE_PRIORITY_B_FORCE_MASK(x) (((x) & 0x1) << 24) | ||
562 | #define G_00654C_D1MODE_PRIORITY_B_FORCE_MASK(x) (((x) >> 24) & 0x1) | ||
563 | #define C_00654C_D1MODE_PRIORITY_B_FORCE_MASK 0xFEFFFFFF | ||
564 | #define R_006D48_D2MODE_PRIORITY_A_CNT 0x006D48 | ||
565 | #define S_006D48_D2MODE_PRIORITY_MARK_A(x) (((x) & 0x7FFF) << 0) | ||
566 | #define G_006D48_D2MODE_PRIORITY_MARK_A(x) (((x) >> 0) & 0x7FFF) | ||
567 | #define C_006D48_D2MODE_PRIORITY_MARK_A 0xFFFF8000 | ||
568 | #define S_006D48_D2MODE_PRIORITY_A_OFF(x) (((x) & 0x1) << 16) | ||
569 | #define G_006D48_D2MODE_PRIORITY_A_OFF(x) (((x) >> 16) & 0x1) | ||
570 | #define C_006D48_D2MODE_PRIORITY_A_OFF 0xFFFEFFFF | ||
571 | #define S_006D48_D2MODE_PRIORITY_A_ALWAYS_ON(x) (((x) & 0x1) << 20) | ||
572 | #define G_006D48_D2MODE_PRIORITY_A_ALWAYS_ON(x) (((x) >> 20) & 0x1) | ||
573 | #define C_006D48_D2MODE_PRIORITY_A_ALWAYS_ON 0xFFEFFFFF | ||
574 | #define S_006D48_D2MODE_PRIORITY_A_FORCE_MASK(x) (((x) & 0x1) << 24) | ||
575 | #define G_006D48_D2MODE_PRIORITY_A_FORCE_MASK(x) (((x) >> 24) & 0x1) | ||
576 | #define C_006D48_D2MODE_PRIORITY_A_FORCE_MASK 0xFEFFFFFF | ||
577 | #define R_006D4C_D2MODE_PRIORITY_B_CNT 0x006D4C | ||
578 | #define S_006D4C_D2MODE_PRIORITY_MARK_B(x) (((x) & 0x7FFF) << 0) | ||
579 | #define G_006D4C_D2MODE_PRIORITY_MARK_B(x) (((x) >> 0) & 0x7FFF) | ||
580 | #define C_006D4C_D2MODE_PRIORITY_MARK_B 0xFFFF8000 | ||
581 | #define S_006D4C_D2MODE_PRIORITY_B_OFF(x) (((x) & 0x1) << 16) | ||
582 | #define G_006D4C_D2MODE_PRIORITY_B_OFF(x) (((x) >> 16) & 0x1) | ||
583 | #define C_006D4C_D2MODE_PRIORITY_B_OFF 0xFFFEFFFF | ||
584 | #define S_006D4C_D2MODE_PRIORITY_B_ALWAYS_ON(x) (((x) & 0x1) << 20) | ||
585 | #define G_006D4C_D2MODE_PRIORITY_B_ALWAYS_ON(x) (((x) >> 20) & 0x1) | ||
586 | #define C_006D4C_D2MODE_PRIORITY_B_ALWAYS_ON 0xFFEFFFFF | ||
587 | #define S_006D4C_D2MODE_PRIORITY_B_FORCE_MASK(x) (((x) & 0x1) << 24) | ||
588 | #define G_006D4C_D2MODE_PRIORITY_B_FORCE_MASK(x) (((x) >> 24) & 0x1) | ||
589 | #define C_006D4C_D2MODE_PRIORITY_B_FORCE_MASK 0xFEFFFFFF | ||
590 | |||
538 | #endif | 591 | #endif |
diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c index 83b9174f76f2..bbf3da790fd5 100644 --- a/drivers/gpu/drm/radeon/rs690.c +++ b/drivers/gpu/drm/radeon/rs690.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | #include "drmP.h" | 28 | #include "drmP.h" |
29 | #include "radeon.h" | 29 | #include "radeon.h" |
30 | #include "radeon_asic.h" | ||
30 | #include "atom.h" | 31 | #include "atom.h" |
31 | #include "rs690d.h" | 32 | #include "rs690d.h" |
32 | 33 | ||
@@ -57,42 +58,57 @@ static void rs690_gpu_init(struct radeon_device *rdev) | |||
57 | } | 58 | } |
58 | } | 59 | } |
59 | 60 | ||
61 | union igp_info { | ||
62 | struct _ATOM_INTEGRATED_SYSTEM_INFO info; | ||
63 | struct _ATOM_INTEGRATED_SYSTEM_INFO_V2 info_v2; | ||
64 | }; | ||
65 | |||
60 | void rs690_pm_info(struct radeon_device *rdev) | 66 | void rs690_pm_info(struct radeon_device *rdev) |
61 | { | 67 | { |
62 | int index = GetIndexIntoMasterTable(DATA, IntegratedSystemInfo); | 68 | int index = GetIndexIntoMasterTable(DATA, IntegratedSystemInfo); |
63 | struct _ATOM_INTEGRATED_SYSTEM_INFO *info; | 69 | union igp_info *info; |
64 | struct _ATOM_INTEGRATED_SYSTEM_INFO_V2 *info_v2; | ||
65 | void *ptr; | ||
66 | uint16_t data_offset; | 70 | uint16_t data_offset; |
67 | uint8_t frev, crev; | 71 | uint8_t frev, crev; |
68 | fixed20_12 tmp; | 72 | fixed20_12 tmp; |
69 | 73 | ||
70 | atom_parse_data_header(rdev->mode_info.atom_context, index, NULL, | 74 | if (atom_parse_data_header(rdev->mode_info.atom_context, index, NULL, |
71 | &frev, &crev, &data_offset); | 75 | &frev, &crev, &data_offset)) { |
72 | ptr = rdev->mode_info.atom_context->bios + data_offset; | 76 | info = (union igp_info *)(rdev->mode_info.atom_context->bios + data_offset); |
73 | info = (struct _ATOM_INTEGRATED_SYSTEM_INFO *)ptr; | 77 | |
74 | info_v2 = (struct _ATOM_INTEGRATED_SYSTEM_INFO_V2 *)ptr; | 78 | /* Get various system informations from bios */ |
75 | /* Get various system informations from bios */ | 79 | switch (crev) { |
76 | switch (crev) { | 80 | case 1: |
77 | case 1: | 81 | tmp.full = rfixed_const(100); |
78 | tmp.full = rfixed_const(100); | 82 | rdev->pm.igp_sideport_mclk.full = rfixed_const(info->info.ulBootUpMemoryClock); |
79 | rdev->pm.igp_sideport_mclk.full = rfixed_const(info->ulBootUpMemoryClock); | 83 | rdev->pm.igp_sideport_mclk.full = rfixed_div(rdev->pm.igp_sideport_mclk, tmp); |
80 | rdev->pm.igp_sideport_mclk.full = rfixed_div(rdev->pm.igp_sideport_mclk, tmp); | 84 | rdev->pm.igp_system_mclk.full = rfixed_const(le16_to_cpu(info->info.usK8MemoryClock)); |
81 | rdev->pm.igp_system_mclk.full = rfixed_const(le16_to_cpu(info->usK8MemoryClock)); | 85 | rdev->pm.igp_ht_link_clk.full = rfixed_const(le16_to_cpu(info->info.usFSBClock)); |
82 | rdev->pm.igp_ht_link_clk.full = rfixed_const(le16_to_cpu(info->usFSBClock)); | 86 | rdev->pm.igp_ht_link_width.full = rfixed_const(info->info.ucHTLinkWidth); |
83 | rdev->pm.igp_ht_link_width.full = rfixed_const(info->ucHTLinkWidth); | 87 | break; |
84 | break; | 88 | case 2: |
85 | case 2: | 89 | tmp.full = rfixed_const(100); |
86 | tmp.full = rfixed_const(100); | 90 | rdev->pm.igp_sideport_mclk.full = rfixed_const(info->info_v2.ulBootUpSidePortClock); |
87 | rdev->pm.igp_sideport_mclk.full = rfixed_const(info_v2->ulBootUpSidePortClock); | 91 | rdev->pm.igp_sideport_mclk.full = rfixed_div(rdev->pm.igp_sideport_mclk, tmp); |
88 | rdev->pm.igp_sideport_mclk.full = rfixed_div(rdev->pm.igp_sideport_mclk, tmp); | 92 | rdev->pm.igp_system_mclk.full = rfixed_const(info->info_v2.ulBootUpUMAClock); |
89 | rdev->pm.igp_system_mclk.full = rfixed_const(info_v2->ulBootUpUMAClock); | 93 | rdev->pm.igp_system_mclk.full = rfixed_div(rdev->pm.igp_system_mclk, tmp); |
90 | rdev->pm.igp_system_mclk.full = rfixed_div(rdev->pm.igp_system_mclk, tmp); | 94 | rdev->pm.igp_ht_link_clk.full = rfixed_const(info->info_v2.ulHTLinkFreq); |
91 | rdev->pm.igp_ht_link_clk.full = rfixed_const(info_v2->ulHTLinkFreq); | 95 | rdev->pm.igp_ht_link_clk.full = rfixed_div(rdev->pm.igp_ht_link_clk, tmp); |
92 | rdev->pm.igp_ht_link_clk.full = rfixed_div(rdev->pm.igp_ht_link_clk, tmp); | 96 | rdev->pm.igp_ht_link_width.full = rfixed_const(le16_to_cpu(info->info_v2.usMinHTLinkWidth)); |
93 | rdev->pm.igp_ht_link_width.full = rfixed_const(le16_to_cpu(info_v2->usMinHTLinkWidth)); | 97 | break; |
94 | break; | 98 | default: |
95 | default: | 99 | tmp.full = rfixed_const(100); |
100 | /* We assume the slower possible clock ie worst case */ | ||
101 | /* DDR 333Mhz */ | ||
102 | rdev->pm.igp_sideport_mclk.full = rfixed_const(333); | ||
103 | /* FIXME: system clock ? */ | ||
104 | rdev->pm.igp_system_mclk.full = rfixed_const(100); | ||
105 | rdev->pm.igp_system_mclk.full = rfixed_div(rdev->pm.igp_system_mclk, tmp); | ||
106 | rdev->pm.igp_ht_link_clk.full = rfixed_const(200); | ||
107 | rdev->pm.igp_ht_link_width.full = rfixed_const(8); | ||
108 | DRM_ERROR("No integrated system info for your GPU, using safe default\n"); | ||
109 | break; | ||
110 | } | ||
111 | } else { | ||
96 | tmp.full = rfixed_const(100); | 112 | tmp.full = rfixed_const(100); |
97 | /* We assume the slower possible clock ie worst case */ | 113 | /* We assume the slower possible clock ie worst case */ |
98 | /* DDR 333Mhz */ | 114 | /* DDR 333Mhz */ |
@@ -103,7 +119,6 @@ void rs690_pm_info(struct radeon_device *rdev) | |||
103 | rdev->pm.igp_ht_link_clk.full = rfixed_const(200); | 119 | rdev->pm.igp_ht_link_clk.full = rfixed_const(200); |
104 | rdev->pm.igp_ht_link_width.full = rfixed_const(8); | 120 | rdev->pm.igp_ht_link_width.full = rfixed_const(8); |
105 | DRM_ERROR("No integrated system info for your GPU, using safe default\n"); | 121 | DRM_ERROR("No integrated system info for your GPU, using safe default\n"); |
106 | break; | ||
107 | } | 122 | } |
108 | /* Compute various bandwidth */ | 123 | /* Compute various bandwidth */ |
109 | /* k8_bandwidth = (memory_clk / 2) * 2 * 8 * 0.5 = memory_clk * 4 */ | 124 | /* k8_bandwidth = (memory_clk / 2) * 2 * 8 * 0.5 = memory_clk * 4 */ |
@@ -131,7 +146,6 @@ void rs690_pm_info(struct radeon_device *rdev) | |||
131 | 146 | ||
132 | void rs690_mc_init(struct radeon_device *rdev) | 147 | void rs690_mc_init(struct radeon_device *rdev) |
133 | { | 148 | { |
134 | fixed20_12 a; | ||
135 | u64 base; | 149 | u64 base; |
136 | 150 | ||
137 | rs400_gart_adjust_size(rdev); | 151 | rs400_gart_adjust_size(rdev); |
@@ -145,18 +159,10 @@ void rs690_mc_init(struct radeon_device *rdev) | |||
145 | base = RREG32_MC(R_000100_MCCFG_FB_LOCATION); | 159 | base = RREG32_MC(R_000100_MCCFG_FB_LOCATION); |
146 | base = G_000100_MC_FB_START(base) << 16; | 160 | base = G_000100_MC_FB_START(base) << 16; |
147 | rs690_pm_info(rdev); | 161 | rs690_pm_info(rdev); |
148 | /* FIXME: we should enforce default clock in case GPU is not in | ||
149 | * default setup | ||
150 | */ | ||
151 | a.full = rfixed_const(100); | ||
152 | rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk); | ||
153 | rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); | ||
154 | a.full = rfixed_const(16); | ||
155 | /* core_bandwidth = sclk(Mhz) * 16 */ | ||
156 | rdev->pm.core_bandwidth.full = rfixed_div(rdev->pm.sclk, a); | ||
157 | rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); | 162 | rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); |
158 | radeon_vram_location(rdev, &rdev->mc, base); | 163 | radeon_vram_location(rdev, &rdev->mc, base); |
159 | radeon_gtt_location(rdev, &rdev->mc); | 164 | radeon_gtt_location(rdev, &rdev->mc); |
165 | radeon_update_bandwidth_info(rdev); | ||
160 | } | 166 | } |
161 | 167 | ||
162 | void rs690_line_buffer_adjust(struct radeon_device *rdev, | 168 | void rs690_line_buffer_adjust(struct radeon_device *rdev, |
@@ -394,10 +400,12 @@ void rs690_bandwidth_update(struct radeon_device *rdev) | |||
394 | struct drm_display_mode *mode1 = NULL; | 400 | struct drm_display_mode *mode1 = NULL; |
395 | struct rs690_watermark wm0; | 401 | struct rs690_watermark wm0; |
396 | struct rs690_watermark wm1; | 402 | struct rs690_watermark wm1; |
397 | u32 tmp; | 403 | u32 tmp, d1mode_priority_a_cnt, d2mode_priority_a_cnt; |
398 | fixed20_12 priority_mark02, priority_mark12, fill_rate; | 404 | fixed20_12 priority_mark02, priority_mark12, fill_rate; |
399 | fixed20_12 a, b; | 405 | fixed20_12 a, b; |
400 | 406 | ||
407 | radeon_update_display_priority(rdev); | ||
408 | |||
401 | if (rdev->mode_info.crtcs[0]->base.enabled) | 409 | if (rdev->mode_info.crtcs[0]->base.enabled) |
402 | mode0 = &rdev->mode_info.crtcs[0]->base.mode; | 410 | mode0 = &rdev->mode_info.crtcs[0]->base.mode; |
403 | if (rdev->mode_info.crtcs[1]->base.enabled) | 411 | if (rdev->mode_info.crtcs[1]->base.enabled) |
@@ -407,7 +415,8 @@ void rs690_bandwidth_update(struct radeon_device *rdev) | |||
407 | * modes if the user specifies HIGH for displaypriority | 415 | * modes if the user specifies HIGH for displaypriority |
408 | * option. | 416 | * option. |
409 | */ | 417 | */ |
410 | if (rdev->disp_priority == 2) { | 418 | if ((rdev->disp_priority == 2) && |
419 | ((rdev->family == CHIP_RS690) || (rdev->family == CHIP_RS740))) { | ||
411 | tmp = RREG32_MC(R_000104_MC_INIT_MISC_LAT_TIMER); | 420 | tmp = RREG32_MC(R_000104_MC_INIT_MISC_LAT_TIMER); |
412 | tmp &= C_000104_MC_DISP0R_INIT_LAT; | 421 | tmp &= C_000104_MC_DISP0R_INIT_LAT; |
413 | tmp &= C_000104_MC_DISP1R_INIT_LAT; | 422 | tmp &= C_000104_MC_DISP1R_INIT_LAT; |
@@ -482,10 +491,16 @@ void rs690_bandwidth_update(struct radeon_device *rdev) | |||
482 | priority_mark12.full = 0; | 491 | priority_mark12.full = 0; |
483 | if (wm1.priority_mark_max.full > priority_mark12.full) | 492 | if (wm1.priority_mark_max.full > priority_mark12.full) |
484 | priority_mark12.full = wm1.priority_mark_max.full; | 493 | priority_mark12.full = wm1.priority_mark_max.full; |
485 | WREG32(R_006548_D1MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark02)); | 494 | d1mode_priority_a_cnt = rfixed_trunc(priority_mark02); |
486 | WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark02)); | 495 | d2mode_priority_a_cnt = rfixed_trunc(priority_mark12); |
487 | WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark12)); | 496 | if (rdev->disp_priority == 2) { |
488 | WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark12)); | 497 | d1mode_priority_a_cnt |= S_006548_D1MODE_PRIORITY_A_ALWAYS_ON(1); |
498 | d2mode_priority_a_cnt |= S_006D48_D2MODE_PRIORITY_A_ALWAYS_ON(1); | ||
499 | } | ||
500 | WREG32(R_006548_D1MODE_PRIORITY_A_CNT, d1mode_priority_a_cnt); | ||
501 | WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, d1mode_priority_a_cnt); | ||
502 | WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, d2mode_priority_a_cnt); | ||
503 | WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, d2mode_priority_a_cnt); | ||
489 | } else if (mode0) { | 504 | } else if (mode0) { |
490 | if (rfixed_trunc(wm0.dbpp) > 64) | 505 | if (rfixed_trunc(wm0.dbpp) > 64) |
491 | a.full = rfixed_mul(wm0.dbpp, wm0.num_line_pair); | 506 | a.full = rfixed_mul(wm0.dbpp, wm0.num_line_pair); |
@@ -512,8 +527,11 @@ void rs690_bandwidth_update(struct radeon_device *rdev) | |||
512 | priority_mark02.full = 0; | 527 | priority_mark02.full = 0; |
513 | if (wm0.priority_mark_max.full > priority_mark02.full) | 528 | if (wm0.priority_mark_max.full > priority_mark02.full) |
514 | priority_mark02.full = wm0.priority_mark_max.full; | 529 | priority_mark02.full = wm0.priority_mark_max.full; |
515 | WREG32(R_006548_D1MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark02)); | 530 | d1mode_priority_a_cnt = rfixed_trunc(priority_mark02); |
516 | WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark02)); | 531 | if (rdev->disp_priority == 2) |
532 | d1mode_priority_a_cnt |= S_006548_D1MODE_PRIORITY_A_ALWAYS_ON(1); | ||
533 | WREG32(R_006548_D1MODE_PRIORITY_A_CNT, d1mode_priority_a_cnt); | ||
534 | WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, d1mode_priority_a_cnt); | ||
517 | WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, | 535 | WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, |
518 | S_006D48_D2MODE_PRIORITY_A_OFF(1)); | 536 | S_006D48_D2MODE_PRIORITY_A_OFF(1)); |
519 | WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, | 537 | WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, |
@@ -544,12 +562,15 @@ void rs690_bandwidth_update(struct radeon_device *rdev) | |||
544 | priority_mark12.full = 0; | 562 | priority_mark12.full = 0; |
545 | if (wm1.priority_mark_max.full > priority_mark12.full) | 563 | if (wm1.priority_mark_max.full > priority_mark12.full) |
546 | priority_mark12.full = wm1.priority_mark_max.full; | 564 | priority_mark12.full = wm1.priority_mark_max.full; |
565 | d2mode_priority_a_cnt = rfixed_trunc(priority_mark12); | ||
566 | if (rdev->disp_priority == 2) | ||
567 | d2mode_priority_a_cnt |= S_006D48_D2MODE_PRIORITY_A_ALWAYS_ON(1); | ||
547 | WREG32(R_006548_D1MODE_PRIORITY_A_CNT, | 568 | WREG32(R_006548_D1MODE_PRIORITY_A_CNT, |
548 | S_006548_D1MODE_PRIORITY_A_OFF(1)); | 569 | S_006548_D1MODE_PRIORITY_A_OFF(1)); |
549 | WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, | 570 | WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, |
550 | S_00654C_D1MODE_PRIORITY_B_OFF(1)); | 571 | S_00654C_D1MODE_PRIORITY_B_OFF(1)); |
551 | WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark12)); | 572 | WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, d2mode_priority_a_cnt); |
552 | WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark12)); | 573 | WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, d2mode_priority_a_cnt); |
553 | } | 574 | } |
554 | } | 575 | } |
555 | 576 | ||
@@ -657,6 +678,7 @@ int rs690_suspend(struct radeon_device *rdev) | |||
657 | 678 | ||
658 | void rs690_fini(struct radeon_device *rdev) | 679 | void rs690_fini(struct radeon_device *rdev) |
659 | { | 680 | { |
681 | radeon_pm_fini(rdev); | ||
660 | r100_cp_fini(rdev); | 682 | r100_cp_fini(rdev); |
661 | r100_wb_fini(rdev); | 683 | r100_wb_fini(rdev); |
662 | r100_ib_fini(rdev); | 684 | r100_ib_fini(rdev); |
diff --git a/drivers/gpu/drm/radeon/rs690d.h b/drivers/gpu/drm/radeon/rs690d.h index 62d31e7a897f..36e6398a98ae 100644 --- a/drivers/gpu/drm/radeon/rs690d.h +++ b/drivers/gpu/drm/radeon/rs690d.h | |||
@@ -182,6 +182,9 @@ | |||
182 | #define S_006548_D1MODE_PRIORITY_A_OFF(x) (((x) & 0x1) << 16) | 182 | #define S_006548_D1MODE_PRIORITY_A_OFF(x) (((x) & 0x1) << 16) |
183 | #define G_006548_D1MODE_PRIORITY_A_OFF(x) (((x) >> 16) & 0x1) | 183 | #define G_006548_D1MODE_PRIORITY_A_OFF(x) (((x) >> 16) & 0x1) |
184 | #define C_006548_D1MODE_PRIORITY_A_OFF 0xFFFEFFFF | 184 | #define C_006548_D1MODE_PRIORITY_A_OFF 0xFFFEFFFF |
185 | #define S_006548_D1MODE_PRIORITY_A_ALWAYS_ON(x) (((x) & 0x1) << 20) | ||
186 | #define G_006548_D1MODE_PRIORITY_A_ALWAYS_ON(x) (((x) >> 20) & 0x1) | ||
187 | #define C_006548_D1MODE_PRIORITY_A_ALWAYS_ON 0xFFEFFFFF | ||
185 | #define S_006548_D1MODE_PRIORITY_A_FORCE_MASK(x) (((x) & 0x1) << 24) | 188 | #define S_006548_D1MODE_PRIORITY_A_FORCE_MASK(x) (((x) & 0x1) << 24) |
186 | #define G_006548_D1MODE_PRIORITY_A_FORCE_MASK(x) (((x) >> 24) & 0x1) | 189 | #define G_006548_D1MODE_PRIORITY_A_FORCE_MASK(x) (((x) >> 24) & 0x1) |
187 | #define C_006548_D1MODE_PRIORITY_A_FORCE_MASK 0xFEFFFFFF | 190 | #define C_006548_D1MODE_PRIORITY_A_FORCE_MASK 0xFEFFFFFF |
diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c index bea747da123f..9035121f4b58 100644 --- a/drivers/gpu/drm/radeon/rv515.c +++ b/drivers/gpu/drm/radeon/rv515.c | |||
@@ -26,9 +26,11 @@ | |||
26 | * Jerome Glisse | 26 | * Jerome Glisse |
27 | */ | 27 | */ |
28 | #include <linux/seq_file.h> | 28 | #include <linux/seq_file.h> |
29 | #include <linux/slab.h> | ||
29 | #include "drmP.h" | 30 | #include "drmP.h" |
30 | #include "rv515d.h" | 31 | #include "rv515d.h" |
31 | #include "radeon.h" | 32 | #include "radeon.h" |
33 | #include "radeon_asic.h" | ||
32 | #include "atom.h" | 34 | #include "atom.h" |
33 | #include "rv515_reg_safe.h" | 35 | #include "rv515_reg_safe.h" |
34 | 36 | ||
@@ -279,19 +281,13 @@ static void rv515_vram_get_type(struct radeon_device *rdev) | |||
279 | 281 | ||
280 | void rv515_mc_init(struct radeon_device *rdev) | 282 | void rv515_mc_init(struct radeon_device *rdev) |
281 | { | 283 | { |
282 | fixed20_12 a; | ||
283 | 284 | ||
284 | rv515_vram_get_type(rdev); | 285 | rv515_vram_get_type(rdev); |
285 | r100_vram_init_sizes(rdev); | 286 | r100_vram_init_sizes(rdev); |
286 | radeon_vram_location(rdev, &rdev->mc, 0); | 287 | radeon_vram_location(rdev, &rdev->mc, 0); |
287 | if (!(rdev->flags & RADEON_IS_AGP)) | 288 | if (!(rdev->flags & RADEON_IS_AGP)) |
288 | radeon_gtt_location(rdev, &rdev->mc); | 289 | radeon_gtt_location(rdev, &rdev->mc); |
289 | /* FIXME: we should enforce default clock in case GPU is not in | 290 | radeon_update_bandwidth_info(rdev); |
290 | * default setup | ||
291 | */ | ||
292 | a.full = rfixed_const(100); | ||
293 | rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk); | ||
294 | rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); | ||
295 | } | 291 | } |
296 | 292 | ||
297 | uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg) | 293 | uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg) |
@@ -539,6 +535,7 @@ void rv515_set_safe_registers(struct radeon_device *rdev) | |||
539 | 535 | ||
540 | void rv515_fini(struct radeon_device *rdev) | 536 | void rv515_fini(struct radeon_device *rdev) |
541 | { | 537 | { |
538 | radeon_pm_fini(rdev); | ||
542 | r100_cp_fini(rdev); | 539 | r100_cp_fini(rdev); |
543 | r100_wb_fini(rdev); | 540 | r100_wb_fini(rdev); |
544 | r100_ib_fini(rdev); | 541 | r100_ib_fini(rdev); |
@@ -1020,7 +1017,7 @@ void rv515_bandwidth_avivo_update(struct radeon_device *rdev) | |||
1020 | struct drm_display_mode *mode1 = NULL; | 1017 | struct drm_display_mode *mode1 = NULL; |
1021 | struct rv515_watermark wm0; | 1018 | struct rv515_watermark wm0; |
1022 | struct rv515_watermark wm1; | 1019 | struct rv515_watermark wm1; |
1023 | u32 tmp; | 1020 | u32 tmp, d1mode_priority_a_cnt, d2mode_priority_a_cnt; |
1024 | fixed20_12 priority_mark02, priority_mark12, fill_rate; | 1021 | fixed20_12 priority_mark02, priority_mark12, fill_rate; |
1025 | fixed20_12 a, b; | 1022 | fixed20_12 a, b; |
1026 | 1023 | ||
@@ -1088,10 +1085,16 @@ void rv515_bandwidth_avivo_update(struct radeon_device *rdev) | |||
1088 | priority_mark12.full = 0; | 1085 | priority_mark12.full = 0; |
1089 | if (wm1.priority_mark_max.full > priority_mark12.full) | 1086 | if (wm1.priority_mark_max.full > priority_mark12.full) |
1090 | priority_mark12.full = wm1.priority_mark_max.full; | 1087 | priority_mark12.full = wm1.priority_mark_max.full; |
1091 | WREG32(D1MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark02)); | 1088 | d1mode_priority_a_cnt = rfixed_trunc(priority_mark02); |
1092 | WREG32(D1MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark02)); | 1089 | d2mode_priority_a_cnt = rfixed_trunc(priority_mark12); |
1093 | WREG32(D2MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark12)); | 1090 | if (rdev->disp_priority == 2) { |
1094 | WREG32(D2MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark12)); | 1091 | d1mode_priority_a_cnt |= MODE_PRIORITY_ALWAYS_ON; |
1092 | d2mode_priority_a_cnt |= MODE_PRIORITY_ALWAYS_ON; | ||
1093 | } | ||
1094 | WREG32(D1MODE_PRIORITY_A_CNT, d1mode_priority_a_cnt); | ||
1095 | WREG32(D1MODE_PRIORITY_B_CNT, d1mode_priority_a_cnt); | ||
1096 | WREG32(D2MODE_PRIORITY_A_CNT, d2mode_priority_a_cnt); | ||
1097 | WREG32(D2MODE_PRIORITY_B_CNT, d2mode_priority_a_cnt); | ||
1095 | } else if (mode0) { | 1098 | } else if (mode0) { |
1096 | if (rfixed_trunc(wm0.dbpp) > 64) | 1099 | if (rfixed_trunc(wm0.dbpp) > 64) |
1097 | a.full = rfixed_div(wm0.dbpp, wm0.num_line_pair); | 1100 | a.full = rfixed_div(wm0.dbpp, wm0.num_line_pair); |
@@ -1118,8 +1121,11 @@ void rv515_bandwidth_avivo_update(struct radeon_device *rdev) | |||
1118 | priority_mark02.full = 0; | 1121 | priority_mark02.full = 0; |
1119 | if (wm0.priority_mark_max.full > priority_mark02.full) | 1122 | if (wm0.priority_mark_max.full > priority_mark02.full) |
1120 | priority_mark02.full = wm0.priority_mark_max.full; | 1123 | priority_mark02.full = wm0.priority_mark_max.full; |
1121 | WREG32(D1MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark02)); | 1124 | d1mode_priority_a_cnt = rfixed_trunc(priority_mark02); |
1122 | WREG32(D1MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark02)); | 1125 | if (rdev->disp_priority == 2) |
1126 | d1mode_priority_a_cnt |= MODE_PRIORITY_ALWAYS_ON; | ||
1127 | WREG32(D1MODE_PRIORITY_A_CNT, d1mode_priority_a_cnt); | ||
1128 | WREG32(D1MODE_PRIORITY_B_CNT, d1mode_priority_a_cnt); | ||
1123 | WREG32(D2MODE_PRIORITY_A_CNT, MODE_PRIORITY_OFF); | 1129 | WREG32(D2MODE_PRIORITY_A_CNT, MODE_PRIORITY_OFF); |
1124 | WREG32(D2MODE_PRIORITY_B_CNT, MODE_PRIORITY_OFF); | 1130 | WREG32(D2MODE_PRIORITY_B_CNT, MODE_PRIORITY_OFF); |
1125 | } else { | 1131 | } else { |
@@ -1148,10 +1154,13 @@ void rv515_bandwidth_avivo_update(struct radeon_device *rdev) | |||
1148 | priority_mark12.full = 0; | 1154 | priority_mark12.full = 0; |
1149 | if (wm1.priority_mark_max.full > priority_mark12.full) | 1155 | if (wm1.priority_mark_max.full > priority_mark12.full) |
1150 | priority_mark12.full = wm1.priority_mark_max.full; | 1156 | priority_mark12.full = wm1.priority_mark_max.full; |
1157 | d2mode_priority_a_cnt = rfixed_trunc(priority_mark12); | ||
1158 | if (rdev->disp_priority == 2) | ||
1159 | d2mode_priority_a_cnt |= MODE_PRIORITY_ALWAYS_ON; | ||
1151 | WREG32(D1MODE_PRIORITY_A_CNT, MODE_PRIORITY_OFF); | 1160 | WREG32(D1MODE_PRIORITY_A_CNT, MODE_PRIORITY_OFF); |
1152 | WREG32(D1MODE_PRIORITY_B_CNT, MODE_PRIORITY_OFF); | 1161 | WREG32(D1MODE_PRIORITY_B_CNT, MODE_PRIORITY_OFF); |
1153 | WREG32(D2MODE_PRIORITY_A_CNT, rfixed_trunc(priority_mark12)); | 1162 | WREG32(D2MODE_PRIORITY_A_CNT, d2mode_priority_a_cnt); |
1154 | WREG32(D2MODE_PRIORITY_B_CNT, rfixed_trunc(priority_mark12)); | 1163 | WREG32(D2MODE_PRIORITY_B_CNT, d2mode_priority_a_cnt); |
1155 | } | 1164 | } |
1156 | } | 1165 | } |
1157 | 1166 | ||
@@ -1161,6 +1170,8 @@ void rv515_bandwidth_update(struct radeon_device *rdev) | |||
1161 | struct drm_display_mode *mode0 = NULL; | 1170 | struct drm_display_mode *mode0 = NULL; |
1162 | struct drm_display_mode *mode1 = NULL; | 1171 | struct drm_display_mode *mode1 = NULL; |
1163 | 1172 | ||
1173 | radeon_update_display_priority(rdev); | ||
1174 | |||
1164 | if (rdev->mode_info.crtcs[0]->base.enabled) | 1175 | if (rdev->mode_info.crtcs[0]->base.enabled) |
1165 | mode0 = &rdev->mode_info.crtcs[0]->base.mode; | 1176 | mode0 = &rdev->mode_info.crtcs[0]->base.mode; |
1166 | if (rdev->mode_info.crtcs[1]->base.enabled) | 1177 | if (rdev->mode_info.crtcs[1]->base.enabled) |
@@ -1170,7 +1181,8 @@ void rv515_bandwidth_update(struct radeon_device *rdev) | |||
1170 | * modes if the user specifies HIGH for displaypriority | 1181 | * modes if the user specifies HIGH for displaypriority |
1171 | * option. | 1182 | * option. |
1172 | */ | 1183 | */ |
1173 | if (rdev->disp_priority == 2) { | 1184 | if ((rdev->disp_priority == 2) && |
1185 | (rdev->family == CHIP_RV515)) { | ||
1174 | tmp = RREG32_MC(MC_MISC_LAT_TIMER); | 1186 | tmp = RREG32_MC(MC_MISC_LAT_TIMER); |
1175 | tmp &= ~MC_DISP1R_INIT_LAT_MASK; | 1187 | tmp &= ~MC_DISP1R_INIT_LAT_MASK; |
1176 | tmp &= ~MC_DISP0R_INIT_LAT_MASK; | 1188 | tmp &= ~MC_DISP0R_INIT_LAT_MASK; |
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index 37887dee12af..97958a64df1a 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
@@ -27,8 +27,10 @@ | |||
27 | */ | 27 | */ |
28 | #include <linux/firmware.h> | 28 | #include <linux/firmware.h> |
29 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
30 | #include <linux/slab.h> | ||
30 | #include "drmP.h" | 31 | #include "drmP.h" |
31 | #include "radeon.h" | 32 | #include "radeon.h" |
33 | #include "radeon_asic.h" | ||
32 | #include "radeon_drm.h" | 34 | #include "radeon_drm.h" |
33 | #include "rv770d.h" | 35 | #include "rv770d.h" |
34 | #include "atom.h" | 36 | #include "atom.h" |
@@ -125,9 +127,9 @@ void rv770_pcie_gart_disable(struct radeon_device *rdev) | |||
125 | 127 | ||
126 | void rv770_pcie_gart_fini(struct radeon_device *rdev) | 128 | void rv770_pcie_gart_fini(struct radeon_device *rdev) |
127 | { | 129 | { |
130 | radeon_gart_fini(rdev); | ||
128 | rv770_pcie_gart_disable(rdev); | 131 | rv770_pcie_gart_disable(rdev); |
129 | radeon_gart_table_vram_free(rdev); | 132 | radeon_gart_table_vram_free(rdev); |
130 | radeon_gart_fini(rdev); | ||
131 | } | 133 | } |
132 | 134 | ||
133 | 135 | ||
@@ -647,10 +649,13 @@ static void rv770_gpu_init(struct radeon_device *rdev) | |||
647 | 649 | ||
648 | WREG32(CC_RB_BACKEND_DISABLE, cc_rb_backend_disable); | 650 | WREG32(CC_RB_BACKEND_DISABLE, cc_rb_backend_disable); |
649 | WREG32(CC_GC_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); | 651 | WREG32(CC_GC_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); |
652 | WREG32(GC_USER_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); | ||
650 | WREG32(CC_SYS_RB_BACKEND_DISABLE, cc_rb_backend_disable); | 653 | WREG32(CC_SYS_RB_BACKEND_DISABLE, cc_rb_backend_disable); |
651 | 654 | ||
652 | WREG32(CGTS_SYS_TCC_DISABLE, 0); | 655 | WREG32(CGTS_SYS_TCC_DISABLE, 0); |
653 | WREG32(CGTS_TCC_DISABLE, 0); | 656 | WREG32(CGTS_TCC_DISABLE, 0); |
657 | WREG32(CGTS_USER_SYS_TCC_DISABLE, 0); | ||
658 | WREG32(CGTS_USER_TCC_DISABLE, 0); | ||
654 | 659 | ||
655 | num_qd_pipes = | 660 | num_qd_pipes = |
656 | R7XX_MAX_PIPES - r600_count_pipe_bits((cc_gc_shader_pipe_config & INACTIVE_QD_PIPES_MASK) >> 8); | 661 | R7XX_MAX_PIPES - r600_count_pipe_bits((cc_gc_shader_pipe_config & INACTIVE_QD_PIPES_MASK) >> 8); |
@@ -864,7 +869,6 @@ static void rv770_gpu_init(struct radeon_device *rdev) | |||
864 | 869 | ||
865 | int rv770_mc_init(struct radeon_device *rdev) | 870 | int rv770_mc_init(struct radeon_device *rdev) |
866 | { | 871 | { |
867 | fixed20_12 a; | ||
868 | u32 tmp; | 872 | u32 tmp; |
869 | int chansize, numchan; | 873 | int chansize, numchan; |
870 | 874 | ||
@@ -908,12 +912,8 @@ int rv770_mc_init(struct radeon_device *rdev) | |||
908 | rdev->mc.real_vram_size = rdev->mc.aper_size; | 912 | rdev->mc.real_vram_size = rdev->mc.aper_size; |
909 | } | 913 | } |
910 | r600_vram_gtt_location(rdev, &rdev->mc); | 914 | r600_vram_gtt_location(rdev, &rdev->mc); |
911 | /* FIXME: we should enforce default clock in case GPU is not in | 915 | radeon_update_bandwidth_info(rdev); |
912 | * default setup | 916 | |
913 | */ | ||
914 | a.full = rfixed_const(100); | ||
915 | rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk); | ||
916 | rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); | ||
917 | return 0; | 917 | return 0; |
918 | } | 918 | } |
919 | 919 | ||
@@ -1013,6 +1013,13 @@ int rv770_resume(struct radeon_device *rdev) | |||
1013 | DRM_ERROR("radeon: failled testing IB (%d).\n", r); | 1013 | DRM_ERROR("radeon: failled testing IB (%d).\n", r); |
1014 | return r; | 1014 | return r; |
1015 | } | 1015 | } |
1016 | |||
1017 | r = r600_audio_init(rdev); | ||
1018 | if (r) { | ||
1019 | dev_err(rdev->dev, "radeon: audio init failed\n"); | ||
1020 | return r; | ||
1021 | } | ||
1022 | |||
1016 | return r; | 1023 | return r; |
1017 | 1024 | ||
1018 | } | 1025 | } |
@@ -1021,6 +1028,7 @@ int rv770_suspend(struct radeon_device *rdev) | |||
1021 | { | 1028 | { |
1022 | int r; | 1029 | int r; |
1023 | 1030 | ||
1031 | r600_audio_fini(rdev); | ||
1024 | /* FIXME: we should wait for ring to be empty */ | 1032 | /* FIXME: we should wait for ring to be empty */ |
1025 | r700_cp_stop(rdev); | 1033 | r700_cp_stop(rdev); |
1026 | rdev->cp.ready = false; | 1034 | rdev->cp.ready = false; |
@@ -1144,11 +1152,19 @@ int rv770_init(struct radeon_device *rdev) | |||
1144 | } | 1152 | } |
1145 | } | 1153 | } |
1146 | } | 1154 | } |
1155 | |||
1156 | r = r600_audio_init(rdev); | ||
1157 | if (r) { | ||
1158 | dev_err(rdev->dev, "radeon: audio init failed\n"); | ||
1159 | return r; | ||
1160 | } | ||
1161 | |||
1147 | return 0; | 1162 | return 0; |
1148 | } | 1163 | } |
1149 | 1164 | ||
1150 | void rv770_fini(struct radeon_device *rdev) | 1165 | void rv770_fini(struct radeon_device *rdev) |
1151 | { | 1166 | { |
1167 | radeon_pm_fini(rdev); | ||
1152 | r600_blit_fini(rdev); | 1168 | r600_blit_fini(rdev); |
1153 | r600_cp_fini(rdev); | 1169 | r600_cp_fini(rdev); |
1154 | r600_wb_fini(rdev); | 1170 | r600_wb_fini(rdev); |
diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c index 4648ed2f0143..4bf69c404491 100644 --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "ttm/ttm_placement.h" | 35 | #include "ttm/ttm_placement.h" |
36 | #include <linux/agp_backend.h> | 36 | #include <linux/agp_backend.h> |
37 | #include <linux/module.h> | 37 | #include <linux/module.h> |
38 | #include <linux/slab.h> | ||
38 | #include <linux/io.h> | 39 | #include <linux/io.h> |
39 | #include <asm/agp.h> | 40 | #include <asm/agp.h> |
40 | 41 | ||
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 89c38c49066f..dd47b2a9a791 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
@@ -1425,8 +1425,8 @@ int ttm_bo_global_init(struct ttm_global_reference *ref) | |||
1425 | 1425 | ||
1426 | atomic_set(&glob->bo_count, 0); | 1426 | atomic_set(&glob->bo_count, 0); |
1427 | 1427 | ||
1428 | kobject_init(&glob->kobj, &ttm_bo_glob_kobj_type); | 1428 | ret = kobject_init_and_add( |
1429 | ret = kobject_add(&glob->kobj, ttm_get_kobj(), "buffer_objects"); | 1429 | &glob->kobj, &ttm_bo_glob_kobj_type, ttm_get_kobj(), "buffer_objects"); |
1430 | if (unlikely(ret != 0)) | 1430 | if (unlikely(ret != 0)) |
1431 | kobject_put(&glob->kobj); | 1431 | kobject_put(&glob->kobj); |
1432 | return ret; | 1432 | return ret; |
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 5ca37a58a98c..d764e82e799b 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <linux/highmem.h> | 34 | #include <linux/highmem.h> |
35 | #include <linux/wait.h> | 35 | #include <linux/wait.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/vmalloc.h> | 37 | #include <linux/vmalloc.h> |
37 | #include <linux/module.h> | 38 | #include <linux/module.h> |
38 | 39 | ||
diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c index eb143e04d402..801b702566e6 100644 --- a/drivers/gpu/drm/ttm/ttm_memory.c +++ b/drivers/gpu/drm/ttm/ttm_memory.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/wait.h> | 32 | #include <linux/wait.h> |
33 | #include <linux/mm.h> | 33 | #include <linux/mm.h> |
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #define TTM_MEMORY_ALLOC_RETRIES 4 | 37 | #define TTM_MEMORY_ALLOC_RETRIES 4 |
37 | 38 | ||
@@ -260,8 +261,8 @@ static int ttm_mem_init_kernel_zone(struct ttm_mem_global *glob, | |||
260 | zone->used_mem = 0; | 261 | zone->used_mem = 0; |
261 | zone->glob = glob; | 262 | zone->glob = glob; |
262 | glob->zone_kernel = zone; | 263 | glob->zone_kernel = zone; |
263 | kobject_init(&zone->kobj, &ttm_mem_zone_kobj_type); | 264 | ret = kobject_init_and_add( |
264 | ret = kobject_add(&zone->kobj, &glob->kobj, zone->name); | 265 | &zone->kobj, &ttm_mem_zone_kobj_type, &glob->kobj, zone->name); |
265 | if (unlikely(ret != 0)) { | 266 | if (unlikely(ret != 0)) { |
266 | kobject_put(&zone->kobj); | 267 | kobject_put(&zone->kobj); |
267 | return ret; | 268 | return ret; |
@@ -296,8 +297,8 @@ static int ttm_mem_init_highmem_zone(struct ttm_mem_global *glob, | |||
296 | zone->used_mem = 0; | 297 | zone->used_mem = 0; |
297 | zone->glob = glob; | 298 | zone->glob = glob; |
298 | glob->zone_highmem = zone; | 299 | glob->zone_highmem = zone; |
299 | kobject_init(&zone->kobj, &ttm_mem_zone_kobj_type); | 300 | ret = kobject_init_and_add( |
300 | ret = kobject_add(&zone->kobj, &glob->kobj, zone->name); | 301 | &zone->kobj, &ttm_mem_zone_kobj_type, &glob->kobj, zone->name); |
301 | if (unlikely(ret != 0)) { | 302 | if (unlikely(ret != 0)) { |
302 | kobject_put(&zone->kobj); | 303 | kobject_put(&zone->kobj); |
303 | return ret; | 304 | return ret; |
@@ -343,8 +344,8 @@ static int ttm_mem_init_dma32_zone(struct ttm_mem_global *glob, | |||
343 | zone->used_mem = 0; | 344 | zone->used_mem = 0; |
344 | zone->glob = glob; | 345 | zone->glob = glob; |
345 | glob->zone_dma32 = zone; | 346 | glob->zone_dma32 = zone; |
346 | kobject_init(&zone->kobj, &ttm_mem_zone_kobj_type); | 347 | ret = kobject_init_and_add( |
347 | ret = kobject_add(&zone->kobj, &glob->kobj, zone->name); | 348 | &zone->kobj, &ttm_mem_zone_kobj_type, &glob->kobj, zone->name); |
348 | if (unlikely(ret != 0)) { | 349 | if (unlikely(ret != 0)) { |
349 | kobject_put(&zone->kobj); | 350 | kobject_put(&zone->kobj); |
350 | return ret; | 351 | return ret; |
@@ -365,10 +366,8 @@ int ttm_mem_global_init(struct ttm_mem_global *glob) | |||
365 | glob->swap_queue = create_singlethread_workqueue("ttm_swap"); | 366 | glob->swap_queue = create_singlethread_workqueue("ttm_swap"); |
366 | INIT_WORK(&glob->work, ttm_shrink_work); | 367 | INIT_WORK(&glob->work, ttm_shrink_work); |
367 | init_waitqueue_head(&glob->queue); | 368 | init_waitqueue_head(&glob->queue); |
368 | kobject_init(&glob->kobj, &ttm_mem_glob_kobj_type); | 369 | ret = kobject_init_and_add( |
369 | ret = kobject_add(&glob->kobj, | 370 | &glob->kobj, &ttm_mem_glob_kobj_type, ttm_get_kobj(), "memory_accounting"); |
370 | ttm_get_kobj(), | ||
371 | "memory_accounting"); | ||
372 | if (unlikely(ret != 0)) { | 371 | if (unlikely(ret != 0)) { |
373 | kobject_put(&glob->kobj); | 372 | kobject_put(&glob->kobj); |
374 | return ret; | 373 | return ret; |
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index a759170763bb..d5fd5b8faeb3 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c | |||
@@ -28,13 +28,14 @@ | |||
28 | * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com> | 28 | * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com> |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/vmalloc.h> | ||
32 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
33 | #include <linux/highmem.h> | 32 | #include <linux/highmem.h> |
34 | #include <linux/pagemap.h> | 33 | #include <linux/pagemap.h> |
35 | #include <linux/file.h> | 34 | #include <linux/file.h> |
36 | #include <linux/swap.h> | 35 | #include <linux/swap.h> |
36 | #include <linux/slab.h> | ||
37 | #include "drm_cache.h" | 37 | #include "drm_cache.h" |
38 | #include "drm_mem_util.h" | ||
38 | #include "ttm/ttm_module.h" | 39 | #include "ttm/ttm_module.h" |
39 | #include "ttm/ttm_bo_driver.h" | 40 | #include "ttm/ttm_bo_driver.h" |
40 | #include "ttm/ttm_placement.h" | 41 | #include "ttm/ttm_placement.h" |
@@ -43,32 +44,15 @@ static int ttm_tt_swapin(struct ttm_tt *ttm); | |||
43 | 44 | ||
44 | /** | 45 | /** |
45 | * Allocates storage for pointers to the pages that back the ttm. | 46 | * Allocates storage for pointers to the pages that back the ttm. |
46 | * | ||
47 | * Uses kmalloc if possible. Otherwise falls back to vmalloc. | ||
48 | */ | 47 | */ |
49 | static void ttm_tt_alloc_page_directory(struct ttm_tt *ttm) | 48 | static void ttm_tt_alloc_page_directory(struct ttm_tt *ttm) |
50 | { | 49 | { |
51 | unsigned long size = ttm->num_pages * sizeof(*ttm->pages); | 50 | ttm->pages = drm_calloc_large(ttm->num_pages, sizeof(*ttm->pages)); |
52 | ttm->pages = NULL; | ||
53 | |||
54 | if (size <= PAGE_SIZE) | ||
55 | ttm->pages = kzalloc(size, GFP_KERNEL); | ||
56 | |||
57 | if (!ttm->pages) { | ||
58 | ttm->pages = vmalloc_user(size); | ||
59 | if (ttm->pages) | ||
60 | ttm->page_flags |= TTM_PAGE_FLAG_VMALLOC; | ||
61 | } | ||
62 | } | 51 | } |
63 | 52 | ||
64 | static void ttm_tt_free_page_directory(struct ttm_tt *ttm) | 53 | static void ttm_tt_free_page_directory(struct ttm_tt *ttm) |
65 | { | 54 | { |
66 | if (ttm->page_flags & TTM_PAGE_FLAG_VMALLOC) { | 55 | drm_free_large(ttm->pages); |
67 | vfree(ttm->pages); | ||
68 | ttm->page_flags &= ~TTM_PAGE_FLAG_VMALLOC; | ||
69 | } else { | ||
70 | kfree(ttm->pages); | ||
71 | } | ||
72 | ttm->pages = NULL; | 56 | ttm->pages = NULL; |
73 | } | 57 | } |
74 | 58 | ||
diff --git a/drivers/gpu/drm/via/via_dmablit.c b/drivers/gpu/drm/via/via_dmablit.c index 327380888b4a..4c54f043068e 100644 --- a/drivers/gpu/drm/via/via_dmablit.c +++ b/drivers/gpu/drm/via/via_dmablit.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "via_dmablit.h" | 40 | #include "via_dmablit.h" |
41 | 41 | ||
42 | #include <linux/pagemap.h> | 42 | #include <linux/pagemap.h> |
43 | #include <linux/slab.h> | ||
43 | 44 | ||
44 | #define VIA_PGDN(x) (((unsigned long)(x)) & PAGE_MASK) | 45 | #define VIA_PGDN(x) (((unsigned long)(x)) & PAGE_MASK) |
45 | #define VIA_PGOFF(x) (((unsigned long)(x)) & ~PAGE_MASK) | 46 | #define VIA_PGOFF(x) (((unsigned long)(x)) & ~PAGE_MASK) |
diff --git a/drivers/gpu/drm/vmwgfx/Kconfig b/drivers/gpu/drm/vmwgfx/Kconfig index f20b8bcbef39..30ad13344f7b 100644 --- a/drivers/gpu/drm/vmwgfx/Kconfig +++ b/drivers/gpu/drm/vmwgfx/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config DRM_VMWGFX | 1 | config DRM_VMWGFX |
2 | tristate "DRM driver for VMware Virtual GPU" | 2 | tristate "DRM driver for VMware Virtual GPU" |
3 | depends on DRM && PCI | 3 | depends on DRM && PCI && FB |
4 | select FB_DEFERRED_IO | 4 | select FB_DEFERRED_IO |
5 | select FB_CFB_FILLRECT | 5 | select FB_CFB_FILLRECT |
6 | select FB_CFB_COPYAREA | 6 | select FB_CFB_COPYAREA |
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c index 8827814d0735..441e38c95a85 100644 --- a/drivers/gpu/vga/vgaarb.c +++ b/drivers/gpu/vga/vgaarb.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/poll.h> | 21 | #include <linux/poll.h> |
22 | #include <linux/miscdevice.h> | 22 | #include <linux/miscdevice.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <linux/uaccess.h> | 25 | #include <linux/uaccess.h> |
25 | 26 | ||
diff --git a/drivers/hid/hid-3m-pct.c b/drivers/hid/hid-3m-pct.c index 2370aefc86b2..c31e0be8ccea 100644 --- a/drivers/hid/hid-3m-pct.c +++ b/drivers/hid/hid-3m-pct.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/hid.h> | 16 | #include <linux/hid.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/usb.h> | 19 | #include <linux/usb.h> |
19 | 20 | ||
20 | MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>"); | 21 | MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>"); |
diff --git a/drivers/hid/hid-a4tech.c b/drivers/hid/hid-a4tech.c index df474c699fb8..3a2b223c1da4 100644 --- a/drivers/hid/hid-a4tech.c +++ b/drivers/hid/hid-a4tech.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/input.h> | 20 | #include <linux/input.h> |
21 | #include <linux/hid.h> | 21 | #include <linux/hid.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include "hid-ids.h" | 25 | #include "hid-ids.h" |
25 | 26 | ||
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c index 78286b184ace..bba05d0a8980 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
20 | #include <linux/hid.h> | 20 | #include <linux/hid.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/usb.h> | 23 | #include <linux/usb.h> |
23 | 24 | ||
24 | #include "hid-ids.h" | 25 | #include "hid-ids.h" |
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index 0c4e75573186..56f314fbd4f9 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/debugfs.h> | 29 | #include <linux/debugfs.h> |
30 | #include <linux/seq_file.h> | 30 | #include <linux/seq_file.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/uaccess.h> | 33 | #include <linux/uaccess.h> |
33 | #include <linux/poll.h> | 34 | #include <linux/poll.h> |
34 | 35 | ||
diff --git a/drivers/hid/hid-drff.c b/drivers/hid/hid-drff.c index a239d20ad7a5..968b04f9b796 100644 --- a/drivers/hid/hid-drff.c +++ b/drivers/hid/hid-drff.c | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/input.h> | 30 | #include <linux/input.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/usb.h> | 32 | #include <linux/usb.h> |
32 | #include <linux/hid.h> | 33 | #include <linux/hid.h> |
33 | 34 | ||
diff --git a/drivers/hid/hid-gaff.c b/drivers/hid/hid-gaff.c index 8a11ccddaf2e..88dfcf49a5d7 100644 --- a/drivers/hid/hid-gaff.c +++ b/drivers/hid/hid-gaff.c | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/input.h> | 30 | #include <linux/input.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/usb.h> | 32 | #include <linux/usb.h> |
32 | #include <linux/hid.h> | 33 | #include <linux/hid.h> |
33 | #include "hid-ids.h" | 34 | #include "hid-ids.h" |
diff --git a/drivers/hid/hid-gyration.c b/drivers/hid/hid-gyration.c index cab13e8c7d29..62416e6baeca 100644 --- a/drivers/hid/hid-gyration.c +++ b/drivers/hid/hid-gyration.c | |||
@@ -53,10 +53,13 @@ static int gyration_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |||
53 | static int gyration_event(struct hid_device *hdev, struct hid_field *field, | 53 | static int gyration_event(struct hid_device *hdev, struct hid_field *field, |
54 | struct hid_usage *usage, __s32 value) | 54 | struct hid_usage *usage, __s32 value) |
55 | { | 55 | { |
56 | struct input_dev *input = field->hidinput->input; | 56 | |
57 | if (!(hdev->claimed & HID_CLAIMED_INPUT) || !field->hidinput) | ||
58 | return 0; | ||
57 | 59 | ||
58 | if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK && | 60 | if ((usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK && |
59 | (usage->hid & 0xff) == 0x82) { | 61 | (usage->hid & 0xff) == 0x82) { |
62 | struct input_dev *input = field->hidinput->input; | ||
60 | input_event(input, usage->type, usage->code, 1); | 63 | input_event(input, usage->type, usage->code, 1); |
61 | input_sync(input); | 64 | input_sync(input); |
62 | input_event(input, usage->type, usage->code, 0); | 65 | input_event(input, usage->type, usage->code, 0); |
diff --git a/drivers/hid/hid-lg2ff.c b/drivers/hid/hid-lg2ff.c index 4e6dc6e26523..d888f1e6794f 100644 --- a/drivers/hid/hid-lg2ff.c +++ b/drivers/hid/hid-lg2ff.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | 23 | ||
24 | #include <linux/input.h> | 24 | #include <linux/input.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/usb.h> | 26 | #include <linux/usb.h> |
26 | #include <linux/hid.h> | 27 | #include <linux/hid.h> |
27 | 28 | ||
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index c174b64c3810..0d471fc2ab82 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/hid.h> | 15 | #include <linux/hid.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/usb.h> | 18 | #include <linux/usb.h> |
18 | 19 | ||
19 | #include "hid-ids.h" | 20 | #include "hid-ids.h" |
diff --git a/drivers/hid/hid-mosart.c b/drivers/hid/hid-mosart.c index c8718168fe42..e91437c18906 100644 --- a/drivers/hid/hid-mosart.c +++ b/drivers/hid/hid-mosart.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/hid.h> | 17 | #include <linux/hid.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/usb.h> | 20 | #include <linux/usb.h> |
20 | #include "usbhid/usbhid.h" | 21 | #include "usbhid/usbhid.h" |
21 | 22 | ||
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c index edcc0c4247bb..9b24fc510712 100644 --- a/drivers/hid/hid-ntrig.c +++ b/drivers/hid/hid-ntrig.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/hid.h> | 17 | #include <linux/hid.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include "hid-ids.h" | 21 | #include "hid-ids.h" |
21 | 22 | ||
diff --git a/drivers/hid/hid-pl.c b/drivers/hid/hid-pl.c index c6d7dbc935b1..9f41e2bd8483 100644 --- a/drivers/hid/hid-pl.c +++ b/drivers/hid/hid-pl.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #define debug(format, arg...) pr_debug("hid-plff: " format "\n" , ## arg) | 39 | #define debug(format, arg...) pr_debug("hid-plff: " format "\n" , ## arg) |
40 | 40 | ||
41 | #include <linux/input.h> | 41 | #include <linux/input.h> |
42 | #include <linux/slab.h> | ||
42 | #include <linux/usb.h> | 43 | #include <linux/usb.h> |
43 | #include <linux/hid.h> | 44 | #include <linux/hid.h> |
44 | 45 | ||
diff --git a/drivers/hid/hid-quanta.c b/drivers/hid/hid-quanta.c index 01dd51c4986c..54d3db50605b 100644 --- a/drivers/hid/hid-quanta.c +++ b/drivers/hid/hid-quanta.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/hid.h> | 16 | #include <linux/hid.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>"); | 20 | MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>"); |
20 | MODULE_DESCRIPTION("Quanta dual-touch panel"); | 21 | MODULE_DESCRIPTION("Quanta dual-touch panel"); |
diff --git a/drivers/hid/hid-sjoy.c b/drivers/hid/hid-sjoy.c index 203c438b016f..e10a7687ebf2 100644 --- a/drivers/hid/hid-sjoy.c +++ b/drivers/hid/hid-sjoy.c | |||
@@ -27,6 +27,7 @@ | |||
27 | /* #define DEBUG */ | 27 | /* #define DEBUG */ |
28 | 28 | ||
29 | #include <linux/input.h> | 29 | #include <linux/input.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/usb.h> | 31 | #include <linux/usb.h> |
31 | #include <linux/hid.h> | 32 | #include <linux/hid.h> |
32 | #include "hid-ids.h" | 33 | #include "hid-ids.h" |
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 9bf00d77d92b..7502a4b2fa86 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
20 | #include <linux/hid.h> | 20 | #include <linux/hid.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/usb.h> | 23 | #include <linux/usb.h> |
23 | 24 | ||
24 | #include "hid-ids.h" | 25 | #include "hid-ids.h" |
diff --git a/drivers/hid/hid-stantum.c b/drivers/hid/hid-stantum.c index 2e592a06654e..90df886c5e04 100644 --- a/drivers/hid/hid-stantum.c +++ b/drivers/hid/hid-stantum.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/hid.h> | 16 | #include <linux/hid.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>"); | 20 | MODULE_AUTHOR("Stephane Chatty <chatty@enac.fr>"); |
20 | MODULE_DESCRIPTION("Stantum HID multitouch panels"); | 21 | MODULE_DESCRIPTION("Stantum HID multitouch panels"); |
diff --git a/drivers/hid/hid-tmff.c b/drivers/hid/hid-tmff.c index c32f32c84ac8..15434c814793 100644 --- a/drivers/hid/hid-tmff.c +++ b/drivers/hid/hid-tmff.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/hid.h> | 30 | #include <linux/hid.h> |
31 | #include <linux/input.h> | 31 | #include <linux/input.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/usb.h> | 33 | #include <linux/usb.h> |
33 | 34 | ||
34 | #include "hid-ids.h" | 35 | #include "hid-ids.h" |
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c index 8d3b46f5d149..f7700cf49721 100644 --- a/drivers/hid/hid-wacom.c +++ b/drivers/hid/hid-wacom.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/hid.h> | 22 | #include <linux/hid.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include "hid-ids.h" | 26 | #include "hid-ids.h" |
26 | 27 | ||
diff --git a/drivers/hid/hid-zpff.c b/drivers/hid/hid-zpff.c index a79f0d78c6be..b7acceabba80 100644 --- a/drivers/hid/hid-zpff.c +++ b/drivers/hid/hid-zpff.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/hid.h> | 24 | #include <linux/hid.h> |
25 | #include <linux/input.h> | 25 | #include <linux/input.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/usb.h> | 27 | #include <linux/usb.h> |
27 | 28 | ||
28 | #include "hid-ids.h" | 29 | #include "hid-ids.h" |
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index d04476700b7b..6eadf1a9b3cc 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/poll.h> | 28 | #include <linux/poll.h> |
29 | #include <linux/device.h> | 29 | #include <linux/device.h> |
30 | #include <linux/major.h> | 30 | #include <linux/major.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/hid.h> | 32 | #include <linux/hid.h> |
32 | #include <linux/mutex.h> | 33 | #include <linux/mutex.h> |
33 | #include <linux/sched.h> | 34 | #include <linux/sched.h> |
diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c index e565dbe91d97..ef381d79cfa8 100644 --- a/drivers/hid/usbhid/hid-pidff.c +++ b/drivers/hid/usbhid/hid-pidff.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #define debug(format, arg...) pr_debug("hid-pidff: " format "\n" , ## arg) | 25 | #define debug(format, arg...) pr_debug("hid-pidff: " format "\n" , ## arg) |
26 | 26 | ||
27 | #include <linux/input.h> | 27 | #include <linux/input.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/usb.h> | 29 | #include <linux/usb.h> |
29 | 30 | ||
30 | #include <linux/hid.h> | 31 | #include <linux/hid.h> |
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 928943c7ce9a..1152f9b5fd44 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/hid.h> | 18 | #include <linux/hid.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include "../hid-ids.h" | 21 | #include "../hid-ids.h" |
21 | 22 | ||
@@ -60,6 +61,7 @@ static const struct hid_blacklist { | |||
60 | { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, | 61 | { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET }, |
61 | { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, | 62 | { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, |
62 | { USB_VENDOR_ID_PRODIGE, USB_DEVICE_ID_PRODIGE_CORDLESS, HID_QUIRK_NOGET }, | 63 | { USB_VENDOR_ID_PRODIGE, USB_DEVICE_ID_PRODIGE_CORDLESS, HID_QUIRK_NOGET }, |
64 | { USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN, HID_QUIRK_NOGET }, | ||
63 | { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, | 65 | { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, |
64 | { USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD, HID_QUIRK_NOGET }, | 66 | { USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD, HID_QUIRK_NOGET }, |
65 | { USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_PF1209, HID_QUIRK_MULTI_INPUT }, | 67 | { USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_PF1209, HID_QUIRK_MULTI_INPUT }, |
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index e4595e6147b4..9be8e1754a0b 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig | |||
@@ -217,8 +217,8 @@ config SENSORS_ASC7621 | |||
217 | depends on HWMON && I2C | 217 | depends on HWMON && I2C |
218 | help | 218 | help |
219 | If you say yes here you get support for the aSC7621 | 219 | If you say yes here you get support for the aSC7621 |
220 | family of SMBus sensors chip found on most Intel X48, X38, 975, | 220 | family of SMBus sensors chip found on most Intel X38, X48, X58, |
221 | 965 and 945 desktop boards. Currently supported chips: | 221 | 945, 965 and 975 desktop boards. Currently supported chips: |
222 | aSC7621 | 222 | aSC7621 |
223 | aSC7621a | 223 | aSC7621a |
224 | 224 | ||
diff --git a/drivers/hwmon/ad7414.c b/drivers/hwmon/ad7414.c index bfda8c80ef24..1e4c21fc1a89 100644 --- a/drivers/hwmon/ad7414.c +++ b/drivers/hwmon/ad7414.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/err.h> | 27 | #include <linux/err.h> |
28 | #include <linux/mutex.h> | 28 | #include <linux/mutex.h> |
29 | #include <linux/sysfs.h> | 29 | #include <linux/sysfs.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | 32 | ||
32 | /* AD7414 registers */ | 33 | /* AD7414 registers */ |
diff --git a/drivers/hwmon/ad7418.c b/drivers/hwmon/ad7418.c index f97b5b356875..ffc781fec185 100644 --- a/drivers/hwmon/ad7418.c +++ b/drivers/hwmon/ad7418.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/err.h> | 20 | #include <linux/err.h> |
21 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include "lm75.h" | 25 | #include "lm75.h" |
25 | 26 | ||
diff --git a/drivers/hwmon/adcxx.c b/drivers/hwmon/adcxx.c index 74d9c5195e44..fbdc7655303b 100644 --- a/drivers/hwmon/adcxx.c +++ b/drivers/hwmon/adcxx.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/init.h> | 37 | #include <linux/init.h> |
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
40 | #include <linux/slab.h> | ||
40 | #include <linux/device.h> | 41 | #include <linux/device.h> |
41 | #include <linux/err.h> | 42 | #include <linux/err.h> |
42 | #include <linux/sysfs.h> | 43 | #include <linux/sysfs.h> |
diff --git a/drivers/hwmon/adt7411.c b/drivers/hwmon/adt7411.c index 3471884e42d2..4086c7257f91 100644 --- a/drivers/hwmon/adt7411.c +++ b/drivers/hwmon/adt7411.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
22 | #include <linux/hwmon.h> | 22 | #include <linux/hwmon.h> |
23 | #include <linux/hwmon-sysfs.h> | 23 | #include <linux/hwmon-sysfs.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #define ADT7411_REG_INT_TEMP_VDD_LSB 0x03 | 26 | #define ADT7411_REG_INT_TEMP_VDD_LSB 0x03 |
26 | #define ADT7411_REG_EXT_TEMP_AIN14_LSB 0x04 | 27 | #define ADT7411_REG_EXT_TEMP_AIN14_LSB 0x04 |
diff --git a/drivers/hwmon/adt7462.c b/drivers/hwmon/adt7462.c index b8156b4893bb..2af0c7b6b4e4 100644 --- a/drivers/hwmon/adt7462.c +++ b/drivers/hwmon/adt7462.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/mutex.h> | 28 | #include <linux/mutex.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/log2.h> | 30 | #include <linux/log2.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | /* Addresses to scan */ | 33 | /* Addresses to scan */ |
33 | static const unsigned short normal_i2c[] = { 0x58, 0x5C, I2C_CLIENT_END }; | 34 | static const unsigned short normal_i2c[] = { 0x58, 0x5C, I2C_CLIENT_END }; |
diff --git a/drivers/hwmon/adt7470.c b/drivers/hwmon/adt7470.c index 3445ce1cba81..9e775717abb7 100644 --- a/drivers/hwmon/adt7470.c +++ b/drivers/hwmon/adt7470.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/log2.h> | 30 | #include <linux/log2.h> |
31 | #include <linux/kthread.h> | 31 | #include <linux/kthread.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | /* Addresses to scan */ | 34 | /* Addresses to scan */ |
34 | static const unsigned short normal_i2c[] = { 0x2C, 0x2E, 0x2F, I2C_CLIENT_END }; | 35 | static const unsigned short normal_i2c[] = { 0x2C, 0x2E, 0x2F, I2C_CLIENT_END }; |
diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c index 028284f544e3..75f3fa55663d 100644 --- a/drivers/hwmon/asus_atk0110.c +++ b/drivers/hwmon/asus_atk0110.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/hwmon.h> | 10 | #include <linux/hwmon.h> |
11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/slab.h> | ||
13 | 14 | ||
14 | #include <acpi/acpi.h> | 15 | #include <acpi/acpi.h> |
15 | #include <acpi/acpixf.h> | 16 | #include <acpi/acpixf.h> |
diff --git a/drivers/hwmon/atxp1.c b/drivers/hwmon/atxp1.c index 94cadc19f0c5..33cc143b2069 100644 --- a/drivers/hwmon/atxp1.c +++ b/drivers/hwmon/atxp1.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
29 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
30 | #include <linux/sysfs.h> | 30 | #include <linux/sysfs.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | MODULE_LICENSE("GPL"); | 33 | MODULE_LICENSE("GPL"); |
33 | MODULE_DESCRIPTION("System voltages control via Attansic ATXP1"); | 34 | MODULE_DESCRIPTION("System voltages control via Attansic ATXP1"); |
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 2d7bceeed0bc..e9b7fbc5a447 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c | |||
@@ -228,7 +228,7 @@ static int __devinit adjust_tjmax(struct cpuinfo_x86 *c, u32 id, struct device * | |||
228 | if (err) { | 228 | if (err) { |
229 | dev_warn(dev, | 229 | dev_warn(dev, |
230 | "Unable to access MSR 0xEE, for Tjmax, left" | 230 | "Unable to access MSR 0xEE, for Tjmax, left" |
231 | " at default"); | 231 | " at default\n"); |
232 | } else if (eax & 0x40000000) { | 232 | } else if (eax & 0x40000000) { |
233 | tjmax = tjmax_ee; | 233 | tjmax = tjmax_ee; |
234 | } | 234 | } |
@@ -466,7 +466,7 @@ static int __init coretemp_init(void) | |||
466 | family 6 CPU */ | 466 | family 6 CPU */ |
467 | if ((c->x86 == 0x6) && (c->x86_model > 0xf)) | 467 | if ((c->x86 == 0x6) && (c->x86_model > 0xf)) |
468 | printk(KERN_WARNING DRVNAME ": Unknown CPU " | 468 | printk(KERN_WARNING DRVNAME ": Unknown CPU " |
469 | "model %x\n", c->x86_model); | 469 | "model 0x%x\n", c->x86_model); |
470 | continue; | 470 | continue; |
471 | } | 471 | } |
472 | 472 | ||
diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index 277398f9c938..bad2cf3ef4a4 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/err.h> | 35 | #include <linux/err.h> |
36 | #include <linux/mutex.h> | 36 | #include <linux/mutex.h> |
37 | #include <linux/f75375s.h> | 37 | #include <linux/f75375s.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | /* Addresses to scan */ | 40 | /* Addresses to scan */ |
40 | static const unsigned short normal_i2c[] = { 0x2d, 0x2e, I2C_CLIENT_END }; | 41 | static const unsigned short normal_i2c[] = { 0x2d, 0x2e, I2C_CLIENT_END }; |
diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c index 27d7f72a5f11..e880e2c3871d 100644 --- a/drivers/hwmon/i5k_amb.c +++ b/drivers/hwmon/i5k_amb.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/log2.h> | 30 | #include <linux/log2.h> |
31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #define DRVNAME "i5k_amb" | 35 | #define DRVNAME "i5k_amb" |
35 | 36 | ||
diff --git a/drivers/hwmon/ibmaem.c b/drivers/hwmon/ibmaem.c index 405d3fb5d76f..eaee546af19a 100644 --- a/drivers/hwmon/ibmaem.c +++ b/drivers/hwmon/ibmaem.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/kdev_t.h> | 29 | #include <linux/kdev_t.h> |
30 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
31 | #include <linux/idr.h> | 31 | #include <linux/idr.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
33 | #include <linux/platform_device.h> | 34 | #include <linux/platform_device.h> |
34 | #include <linux/math64.h> | 35 | #include <linux/math64.h> |
diff --git a/drivers/hwmon/ibmpex.c b/drivers/hwmon/ibmpex.c index a36363312f2f..06d4eafcf76b 100644 --- a/drivers/hwmon/ibmpex.c +++ b/drivers/hwmon/ibmpex.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/hwmon-sysfs.h> | 25 | #include <linux/hwmon-sysfs.h> |
26 | #include <linux/jiffies.h> | 26 | #include <linux/jiffies.h> |
27 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #define REFRESH_INTERVAL (2 * HZ) | 30 | #define REFRESH_INTERVAL (2 * HZ) |
30 | #define DRVNAME "ibmpex" | 31 | #define DRVNAME "ibmpex" |
diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c index ab8a5d3c7690..fd108cfc05c7 100644 --- a/drivers/hwmon/lm70.c +++ b/drivers/hwmon/lm70.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/mutex.h> | 34 | #include <linux/mutex.h> |
35 | #include <linux/mod_devicetable.h> | 35 | #include <linux/mod_devicetable.h> |
36 | #include <linux/spi/spi.h> | 36 | #include <linux/spi/spi.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | 39 | ||
39 | #define DRVNAME "lm70" | 40 | #define DRVNAME "lm70" |
diff --git a/drivers/hwmon/lm73.c b/drivers/hwmon/lm73.c index c5f39ba103c0..4d1b76bc8148 100644 --- a/drivers/hwmon/lm73.c +++ b/drivers/hwmon/lm73.c | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
21 | #include <linux/hwmon.h> | 20 | #include <linux/hwmon.h> |
22 | #include <linux/hwmon-sysfs.h> | 21 | #include <linux/hwmon-sysfs.h> |
diff --git a/drivers/hwmon/max1111.c b/drivers/hwmon/max1111.c index 9ac497271adf..12a54aa29776 100644 --- a/drivers/hwmon/max1111.c +++ b/drivers/hwmon/max1111.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/hwmon.h> | 20 | #include <linux/hwmon.h> |
21 | #include <linux/hwmon-sysfs.h> | 21 | #include <linux/hwmon-sysfs.h> |
22 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #define MAX1111_TX_BUF_SIZE 1 | 25 | #define MAX1111_TX_BUF_SIZE 1 |
25 | #define MAX1111_RX_BUF_SIZE 2 | 26 | #define MAX1111_RX_BUF_SIZE 2 |
diff --git a/drivers/hwmon/mc13783-adc.c b/drivers/hwmon/mc13783-adc.c index 883fa8197da4..ce3c7bc81814 100644 --- a/drivers/hwmon/mc13783-adc.c +++ b/drivers/hwmon/mc13783-adc.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/hwmon.h> | 26 | #include <linux/hwmon.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/init.h> | 28 | #include <linux/init.h> |
28 | #include <linux/err.h> | 29 | #include <linux/err.h> |
29 | 30 | ||
diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c index 864a371f6eb9..6b2d8ae64fe1 100644 --- a/drivers/hwmon/sht15.c +++ b/drivers/hwmon/sht15.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/err.h> | 36 | #include <linux/err.h> |
37 | #include <linux/sht15.h> | 37 | #include <linux/sht15.h> |
38 | #include <linux/regulator/consumer.h> | 38 | #include <linux/regulator/consumer.h> |
39 | #include <linux/slab.h> | ||
39 | #include <asm/atomic.h> | 40 | #include <asm/atomic.h> |
40 | 41 | ||
41 | #define SHT15_MEASURE_TEMP 3 | 42 | #define SHT15_MEASURE_TEMP 3 |
diff --git a/drivers/hwmon/w83793.c b/drivers/hwmon/w83793.c index 9de81a4c15a2..612807d97155 100644 --- a/drivers/hwmon/w83793.c +++ b/drivers/hwmon/w83793.c | |||
@@ -1294,7 +1294,7 @@ static int watchdog_close(struct inode *inode, struct file *filp) | |||
1294 | static ssize_t watchdog_write(struct file *filp, const char __user *buf, | 1294 | static ssize_t watchdog_write(struct file *filp, const char __user *buf, |
1295 | size_t count, loff_t *offset) | 1295 | size_t count, loff_t *offset) |
1296 | { | 1296 | { |
1297 | size_t ret; | 1297 | ssize_t ret; |
1298 | struct w83793_data *data = filp->private_data; | 1298 | struct w83793_data *data = filp->private_data; |
1299 | 1299 | ||
1300 | if (count) { | 1300 | if (count) { |
diff --git a/drivers/hwmon/wm831x-hwmon.c b/drivers/hwmon/wm831x-hwmon.c index c16e9e74c356..97b1f834a471 100644 --- a/drivers/hwmon/wm831x-hwmon.c +++ b/drivers/hwmon/wm831x-hwmon.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/err.h> | 24 | #include <linux/err.h> |
25 | #include <linux/hwmon.h> | 25 | #include <linux/hwmon.h> |
26 | #include <linux/hwmon-sysfs.h> | 26 | #include <linux/hwmon-sysfs.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include <linux/mfd/wm831x/core.h> | 29 | #include <linux/mfd/wm831x/core.h> |
29 | #include <linux/mfd/wm831x/auxadc.h> | 30 | #include <linux/mfd/wm831x/auxadc.h> |
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index e8d568c3fb09..a39e6cff86e7 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/init.h> | 27 | #include <linux/init.h> |
29 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
30 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
diff --git a/drivers/i2c/algos/i2c-algo-pcf.c b/drivers/i2c/algos/i2c-algo-pcf.c index 6b6bd06202b2..5eebf562ff31 100644 --- a/drivers/i2c/algos/i2c-algo-pcf.c +++ b/drivers/i2c/algos/i2c-algo-pcf.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
34 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
35 | #include <linux/i2c.h> | 34 | #include <linux/i2c.h> |
diff --git a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c index d0dc970d7370..2fbef27b6cd6 100644 --- a/drivers/i2c/busses/i2c-amd8111.c +++ b/drivers/i2c/busses/i2c-amd8111.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/acpi.h> | 19 | #include <linux/acpi.h> |
20 | #include <linux/slab.h> | ||
20 | #include <asm/io.h> | 21 | #include <asm/io.h> |
21 | 22 | ||
22 | MODULE_LICENSE("GPL"); | 23 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index fe3fb567317d..f1e14dd590c9 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/i2c.h> | 14 | #include <linux/i2c.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/io.h> | 16 | #include <linux/io.h> |
16 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
17 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index c89687a10835..4523364e6722 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
36 | #include <linux/platform_device.h> | 36 | #include <linux/platform_device.h> |
37 | #include <linux/io.h> | 37 | #include <linux/io.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
40 | 41 | ||
diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c index 3e72b69aa7f8..b664ed8bbdb3 100644 --- a/drivers/i2c/busses/i2c-designware.c +++ b/drivers/i2c/busses/i2c-designware.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
37 | #include <linux/platform_device.h> | 37 | #include <linux/platform_device.h> |
38 | #include <linux/io.h> | 38 | #include <linux/io.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | /* | 41 | /* |
41 | * Registers offset | 42 | * Registers offset |
diff --git a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c index 448b4bf35eb7..612255614a66 100644 --- a/drivers/i2c/busses/i2c-elektor.c +++ b/drivers/i2c/busses/i2c-elektor.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/ioport.h> | 29 | #include <linux/ioport.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
34 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
35 | #include <linux/pci.h> | 34 | #include <linux/pci.h> |
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c index 32104eac8d3d..c21077d248af 100644 --- a/drivers/i2c/busses/i2c-gpio.c +++ b/drivers/i2c/busses/i2c-gpio.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/i2c-gpio.h> | 12 | #include <linux/i2c-gpio.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
16 | 17 | ||
17 | #include <asm/gpio.h> | 18 | #include <asm/gpio.h> |
diff --git a/drivers/i2c/busses/i2c-highlander.c b/drivers/i2c/busses/i2c-highlander.c index 87ecace415da..ce87a902c94d 100644 --- a/drivers/i2c/busses/i2c-highlander.c +++ b/drivers/i2c/busses/i2c-highlander.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/completion.h> | 19 | #include <linux/completion.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #define SMCR 0x00 | 24 | #define SMCR 0x00 |
24 | #define SMCR_START (1 << 0) | 25 | #define SMCR_START (1 << 0) |
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 32375bddae7d..f7e27b702375 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/sched.h> | 47 | #include <linux/sched.h> |
48 | #include <linux/platform_device.h> | 48 | #include <linux/platform_device.h> |
49 | #include <linux/clk.h> | 49 | #include <linux/clk.h> |
50 | #include <linux/slab.h> | ||
50 | 51 | ||
51 | #include <mach/irqs.h> | 52 | #include <mach/irqs.h> |
52 | #include <mach/hardware.h> | 53 | #include <mach/hardware.h> |
diff --git a/drivers/i2c/busses/i2c-ixp2000.c b/drivers/i2c/busses/i2c-ixp2000.c index c016f7a2c5fc..5d8aed5ec21b 100644 --- a/drivers/i2c/busses/i2c-ixp2000.c +++ b/drivers/i2c/busses/i2c-ixp2000.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/i2c.h> | 33 | #include <linux/i2c.h> |
34 | #include <linux/i2c-algo-bit.h> | 34 | #include <linux/i2c-algo-bit.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #include <mach/hardware.h> /* Pick up IXP2000-specific bits */ | 37 | #include <mach/hardware.h> /* Pick up IXP2000-specific bits */ |
37 | #include <mach/gpio.h> | 38 | #include <mach/gpio.h> |
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index 78a15af32942..f1321f763789 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/of_platform.h> | 20 | #include <linux/of_platform.h> |
21 | #include <linux/of_i2c.h> | 21 | #include <linux/of_i2c.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
24 | #include <linux/fsl_devices.h> | 25 | #include <linux/fsl_devices.h> |
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c index ed387ffa4730..3623a4499084 100644 --- a/drivers/i2c/busses/i2c-mv64xxx.c +++ b/drivers/i2c/busses/i2c-mv64xxx.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * or implied. | 10 | * or implied. |
11 | */ | 11 | */ |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
15 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c index 4a700587ef18..4a48dd4ef787 100644 --- a/drivers/i2c/busses/i2c-nforce2.c +++ b/drivers/i2c/busses/i2c-nforce2.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include <linux/delay.h> | 56 | #include <linux/delay.h> |
57 | #include <linux/dmi.h> | 57 | #include <linux/dmi.h> |
58 | #include <linux/acpi.h> | 58 | #include <linux/acpi.h> |
59 | #include <linux/slab.h> | ||
59 | #include <asm/io.h> | 60 | #include <asm/io.h> |
60 | 61 | ||
61 | MODULE_LICENSE("GPL"); | 62 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index a15f731fa451..a4f8d33fa389 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
20 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
21 | #include <linux/err.h> | 22 | #include <linux/err.h> |
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c index 0dabe643ec51..b4ed4ca802ed 100644 --- a/drivers/i2c/busses/i2c-ocores.c +++ b/drivers/i2c/busses/i2c-ocores.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/wait.h> | 19 | #include <linux/wait.h> |
20 | #include <linux/i2c-ocores.h> | 20 | #include <linux/i2c-ocores.h> |
21 | #include <linux/slab.h> | ||
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
22 | 23 | ||
23 | struct ocores_i2c { | 24 | struct ocores_i2c { |
diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c index 60375504fa49..a2481f40ea1c 100644 --- a/drivers/i2c/busses/i2c-octeon.c +++ b/drivers/i2c/busses/i2c-octeon.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | 19 | ||
19 | #include <linux/io.h> | 20 | #include <linux/io.h> |
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index c7c237537f81..6bd0f19cd451 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/platform_device.h> | 37 | #include <linux/platform_device.h> |
38 | #include <linux/clk.h> | 38 | #include <linux/clk.h> |
39 | #include <linux/io.h> | 39 | #include <linux/io.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | /* I2C controller revisions */ | 42 | /* I2C controller revisions */ |
42 | #define OMAP_I2C_REV_2 0x20 | 43 | #define OMAP_I2C_REV_2 0x20 |
diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c index 220fca7f23a6..846583ed4763 100644 --- a/drivers/i2c/busses/i2c-parport.c +++ b/drivers/i2c/busses/i2c-parport.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/i2c.h> | 32 | #include <linux/i2c.h> |
33 | #include <linux/i2c-algo-bit.h> | 33 | #include <linux/i2c-algo-bit.h> |
34 | #include <linux/i2c-smbus.h> | 34 | #include <linux/i2c-smbus.h> |
35 | #include <linux/slab.h> | ||
35 | #include "i2c-parport.h" | 36 | #include "i2c-parport.h" |
36 | 37 | ||
37 | /* ----- Device list ------------------------------------------------------ */ | 38 | /* ----- Device list ------------------------------------------------------ */ |
diff --git a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c index 0d20ff46a518..d3d4a4b43a1d 100644 --- a/drivers/i2c/busses/i2c-pasemi.c +++ b/drivers/i2c/busses/i2c-pasemi.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/slab.h> | ||
27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
28 | 29 | ||
29 | static struct pci_driver pasemi_smb_driver; | 30 | static struct pci_driver pasemi_smb_driver; |
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c index 9532dee6b580..247103372a06 100644 --- a/drivers/i2c/busses/i2c-pnx.c +++ b/drivers/i2c/busses/i2c-pnx.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
24 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
27 | #include <mach/i2c.h> | 28 | #include <mach/i2c.h> |
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 90ffbf6f9d4f..14d249f5ed3f 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
35 | #include <linux/clk.h> | 35 | #include <linux/clk.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
38 | #include <asm/io.h> | 39 | #include <asm/io.h> |
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 1d8c98613fa0..d27072b2249f 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/platform_device.h> | 34 | #include <linux/platform_device.h> |
35 | #include <linux/clk.h> | 35 | #include <linux/clk.h> |
36 | #include <linux/cpufreq.h> | 36 | #include <linux/cpufreq.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include <asm/irq.h> | 39 | #include <asm/irq.h> |
39 | #include <asm/io.h> | 40 | #include <asm/io.h> |
diff --git a/drivers/i2c/busses/i2c-scmi.c b/drivers/i2c/busses/i2c-scmi.c index 365e0becaf12..388cbdc96db7 100644 --- a/drivers/i2c/busses/i2c-scmi.c +++ b/drivers/i2c/busses/i2c-scmi.c | |||
@@ -33,6 +33,7 @@ struct acpi_smbus_cmi { | |||
33 | u8 cap_info:1; | 33 | u8 cap_info:1; |
34 | u8 cap_read:1; | 34 | u8 cap_read:1; |
35 | u8 cap_write:1; | 35 | u8 cap_write:1; |
36 | struct smbus_methods_t *methods; | ||
36 | }; | 37 | }; |
37 | 38 | ||
38 | static const struct smbus_methods_t smbus_methods = { | 39 | static const struct smbus_methods_t smbus_methods = { |
@@ -41,10 +42,19 @@ static const struct smbus_methods_t smbus_methods = { | |||
41 | .mt_sbw = "_SBW", | 42 | .mt_sbw = "_SBW", |
42 | }; | 43 | }; |
43 | 44 | ||
45 | /* Some IBM BIOSes omit the leading underscore */ | ||
46 | static const struct smbus_methods_t ibm_smbus_methods = { | ||
47 | .mt_info = "SBI_", | ||
48 | .mt_sbr = "SBR_", | ||
49 | .mt_sbw = "SBW_", | ||
50 | }; | ||
51 | |||
44 | static const struct acpi_device_id acpi_smbus_cmi_ids[] = { | 52 | static const struct acpi_device_id acpi_smbus_cmi_ids[] = { |
45 | {"SMBUS01", 0}, | 53 | {"SMBUS01", (kernel_ulong_t)&smbus_methods}, |
54 | {ACPI_SMBUS_IBM_HID, (kernel_ulong_t)&ibm_smbus_methods}, | ||
46 | {"", 0} | 55 | {"", 0} |
47 | }; | 56 | }; |
57 | MODULE_DEVICE_TABLE(acpi, acpi_smbus_cmi_ids); | ||
48 | 58 | ||
49 | #define ACPI_SMBUS_STATUS_OK 0x00 | 59 | #define ACPI_SMBUS_STATUS_OK 0x00 |
50 | #define ACPI_SMBUS_STATUS_FAIL 0x07 | 60 | #define ACPI_SMBUS_STATUS_FAIL 0x07 |
@@ -150,11 +160,11 @@ acpi_smbus_cmi_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, | |||
150 | 160 | ||
151 | if (read_write == I2C_SMBUS_READ) { | 161 | if (read_write == I2C_SMBUS_READ) { |
152 | protocol |= ACPI_SMBUS_PRTCL_READ; | 162 | protocol |= ACPI_SMBUS_PRTCL_READ; |
153 | method = smbus_methods.mt_sbr; | 163 | method = smbus_cmi->methods->mt_sbr; |
154 | input.count = 3; | 164 | input.count = 3; |
155 | } else { | 165 | } else { |
156 | protocol |= ACPI_SMBUS_PRTCL_WRITE; | 166 | protocol |= ACPI_SMBUS_PRTCL_WRITE; |
157 | method = smbus_methods.mt_sbw; | 167 | method = smbus_cmi->methods->mt_sbw; |
158 | input.count = 5; | 168 | input.count = 5; |
159 | } | 169 | } |
160 | 170 | ||
@@ -290,13 +300,13 @@ static int acpi_smbus_cmi_add_cap(struct acpi_smbus_cmi *smbus_cmi, | |||
290 | union acpi_object *obj; | 300 | union acpi_object *obj; |
291 | acpi_status status; | 301 | acpi_status status; |
292 | 302 | ||
293 | if (!strcmp(name, smbus_methods.mt_info)) { | 303 | if (!strcmp(name, smbus_cmi->methods->mt_info)) { |
294 | status = acpi_evaluate_object(smbus_cmi->handle, | 304 | status = acpi_evaluate_object(smbus_cmi->handle, |
295 | smbus_methods.mt_info, | 305 | smbus_cmi->methods->mt_info, |
296 | NULL, &buffer); | 306 | NULL, &buffer); |
297 | if (ACPI_FAILURE(status)) { | 307 | if (ACPI_FAILURE(status)) { |
298 | ACPI_ERROR((AE_INFO, "Evaluating %s: %i", | 308 | ACPI_ERROR((AE_INFO, "Evaluating %s: %i", |
299 | smbus_methods.mt_info, status)); | 309 | smbus_cmi->methods->mt_info, status)); |
300 | return -EIO; | 310 | return -EIO; |
301 | } | 311 | } |
302 | 312 | ||
@@ -319,9 +329,9 @@ static int acpi_smbus_cmi_add_cap(struct acpi_smbus_cmi *smbus_cmi, | |||
319 | 329 | ||
320 | kfree(buffer.pointer); | 330 | kfree(buffer.pointer); |
321 | smbus_cmi->cap_info = 1; | 331 | smbus_cmi->cap_info = 1; |
322 | } else if (!strcmp(name, smbus_methods.mt_sbr)) | 332 | } else if (!strcmp(name, smbus_cmi->methods->mt_sbr)) |
323 | smbus_cmi->cap_read = 1; | 333 | smbus_cmi->cap_read = 1; |
324 | else if (!strcmp(name, smbus_methods.mt_sbw)) | 334 | else if (!strcmp(name, smbus_cmi->methods->mt_sbw)) |
325 | smbus_cmi->cap_write = 1; | 335 | smbus_cmi->cap_write = 1; |
326 | else | 336 | else |
327 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Unsupported CMI method: %s\n", | 337 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Unsupported CMI method: %s\n", |
@@ -349,6 +359,7 @@ static acpi_status acpi_smbus_cmi_query_methods(acpi_handle handle, u32 level, | |||
349 | static int acpi_smbus_cmi_add(struct acpi_device *device) | 359 | static int acpi_smbus_cmi_add(struct acpi_device *device) |
350 | { | 360 | { |
351 | struct acpi_smbus_cmi *smbus_cmi; | 361 | struct acpi_smbus_cmi *smbus_cmi; |
362 | const struct acpi_device_id *id; | ||
352 | 363 | ||
353 | smbus_cmi = kzalloc(sizeof(struct acpi_smbus_cmi), GFP_KERNEL); | 364 | smbus_cmi = kzalloc(sizeof(struct acpi_smbus_cmi), GFP_KERNEL); |
354 | if (!smbus_cmi) | 365 | if (!smbus_cmi) |
@@ -362,6 +373,11 @@ static int acpi_smbus_cmi_add(struct acpi_device *device) | |||
362 | smbus_cmi->cap_read = 0; | 373 | smbus_cmi->cap_read = 0; |
363 | smbus_cmi->cap_write = 0; | 374 | smbus_cmi->cap_write = 0; |
364 | 375 | ||
376 | for (id = acpi_smbus_cmi_ids; id->id[0]; id++) | ||
377 | if (!strcmp(id->id, acpi_device_hid(device))) | ||
378 | smbus_cmi->methods = | ||
379 | (struct smbus_methods_t *) id->driver_data; | ||
380 | |||
365 | acpi_walk_namespace(ACPI_TYPE_METHOD, smbus_cmi->handle, 1, | 381 | acpi_walk_namespace(ACPI_TYPE_METHOD, smbus_cmi->handle, 1, |
366 | acpi_smbus_cmi_query_methods, NULL, smbus_cmi, NULL); | 382 | acpi_smbus_cmi_query_methods, NULL, smbus_cmi, NULL); |
367 | 383 | ||
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index ccc46418ef7f..ffb405d7c6f2 100644 --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/pm_runtime.h> | 31 | #include <linux/pm_runtime.h> |
32 | #include <linux/clk.h> | 32 | #include <linux/clk.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | /* Transmit operation: */ | 36 | /* Transmit operation: */ |
36 | /* */ | 37 | /* */ |
diff --git a/drivers/i2c/busses/i2c-simtec.c b/drivers/i2c/busses/i2c-simtec.c index 6407f47bda82..78b06107342c 100644 --- a/drivers/i2c/busses/i2c-simtec.c +++ b/drivers/i2c/busses/i2c-simtec.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
28 | #include <linux/i2c-algo-bit.h> | 29 | #include <linux/i2c-algo-bit.h> |
diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c index d2728a28a8db..1f5b38be73bc 100644 --- a/drivers/i2c/busses/i2c-stu300.c +++ b/drivers/i2c/busses/i2c-stu300.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | /* the name of this kernel module */ | 21 | /* the name of this kernel module */ |
21 | #define NAME "stu300" | 22 | #define NAME "stu300" |
diff --git a/drivers/i2c/busses/i2c-tiny-usb.c b/drivers/i2c/busses/i2c-tiny-usb.c index b5b1bbf37d3c..d03b04002f0d 100644 --- a/drivers/i2c/busses/i2c-tiny-usb.c +++ b/drivers/i2c/busses/i2c-tiny-usb.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/types.h> | 17 | #include <linux/types.h> |
17 | 18 | ||
18 | /* include interfaces to usb layer */ | 19 | /* include interfaces to usb layer */ |
diff --git a/drivers/i2c/busses/i2c-versatile.c b/drivers/i2c/busses/i2c-versatile.c index 70de82163463..5c473833d948 100644 --- a/drivers/i2c/busses/i2c-versatile.c +++ b/drivers/i2c/busses/i2c-versatile.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/i2c-algo-bit.h> | 14 | #include <linux/i2c-algo-bit.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include <asm/io.h> | 19 | #include <asm/io.h> |
19 | 20 | ||
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index f0ef8da6c554..a9c419e075a5 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/wait.h> | 39 | #include <linux/wait.h> |
40 | #include <linux/i2c-xiic.h> | 40 | #include <linux/i2c-xiic.h> |
41 | #include <linux/io.h> | 41 | #include <linux/io.h> |
42 | #include <linux/slab.h> | ||
42 | 43 | ||
43 | #define DRIVER_NAME "xiic-i2c" | 44 | #define DRIVER_NAME "xiic-i2c" |
44 | 45 | ||
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index cf994bd01d9c..684395b6f3e2 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <linux/mutex.h> | 33 | #include <linux/mutex.h> |
34 | #include <linux/slab.h> | ||
34 | #include <asm/io.h> | 35 | #include <asm/io.h> |
35 | 36 | ||
36 | #include <linux/scx200.h> | 37 | #include <linux/scx200.h> |
diff --git a/drivers/i2c/i2c-boardinfo.c b/drivers/i2c/i2c-boardinfo.c index a26a34a06641..7e6a63b57165 100644 --- a/drivers/i2c/i2c-boardinfo.c +++ b/drivers/i2c/i2c-boardinfo.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/rwsem.h> | 22 | #include <linux/rwsem.h> |
22 | 23 | ||
23 | #include "i2c-core.h" | 24 | #include "i2c-core.h" |
diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c index 7a8201ed2181..a24e0bfe9201 100644 --- a/drivers/i2c/i2c-smbus.c +++ b/drivers/i2c/i2c-smbus.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
27 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
28 | #include <linux/i2c-smbus.h> | 28 | #include <linux/i2c-smbus.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | struct i2c_smbus_alert { | 31 | struct i2c_smbus_alert { |
31 | unsigned int alert_edge_triggered:1; | 32 | unsigned int alert_edge_triggered:1; |
diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c index b885c1d548f5..45163693f737 100644 --- a/drivers/ide/hpt366.c +++ b/drivers/ide/hpt366.c | |||
@@ -128,6 +128,7 @@ | |||
128 | #include <linux/pci.h> | 128 | #include <linux/pci.h> |
129 | #include <linux/init.h> | 129 | #include <linux/init.h> |
130 | #include <linux/ide.h> | 130 | #include <linux/ide.h> |
131 | #include <linux/slab.h> | ||
131 | 132 | ||
132 | #include <asm/uaccess.h> | 133 | #include <asm/uaccess.h> |
133 | #include <asm/io.h> | 134 | #include <asm/io.h> |
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index 5cb01e5c323c..c26c11905ffe 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/slab.h> | ||
15 | #include <acpi/acpi.h> | 16 | #include <acpi/acpi.h> |
16 | #include <linux/ide.h> | 17 | #include <linux/ide.h> |
17 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index eb2181a6a11c..f9daffd7d0e3 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/delay.h> | 7 | #include <linux/delay.h> |
8 | #include <linux/ide.h> | 8 | #include <linux/ide.h> |
9 | #include <linux/scatterlist.h> | 9 | #include <linux/scatterlist.h> |
10 | #include <linux/gfp.h> | ||
10 | 11 | ||
11 | #include <scsi/scsi.h> | 12 | #include <scsi/scsi.h> |
12 | 13 | ||
@@ -263,8 +264,8 @@ void ide_retry_pc(ide_drive_t *drive) | |||
263 | * of it. The failed command will be retried after sense data | 264 | * of it. The failed command will be retried after sense data |
264 | * is acquired. | 265 | * is acquired. |
265 | */ | 266 | */ |
266 | blk_requeue_request(failed_rq->q, failed_rq); | ||
267 | drive->hwif->rq = NULL; | 267 | drive->hwif->rq = NULL; |
268 | ide_requeue_and_plug(drive, failed_rq); | ||
268 | if (ide_queue_sense_rq(drive, pc)) { | 269 | if (ide_queue_sense_rq(drive, pc)) { |
269 | blk_start_request(failed_rq); | 270 | blk_start_request(failed_rq); |
270 | ide_complete_rq(drive, -EIO, blk_rq_bytes(failed_rq)); | 271 | ide_complete_rq(drive, -EIO, blk_rq_bytes(failed_rq)); |
diff --git a/drivers/ide/ide-cd_ioctl.c b/drivers/ide/ide-cd_ioctl.c index df3df0041eb6..02712bf045c1 100644 --- a/drivers/ide/ide-cd_ioctl.c +++ b/drivers/ide/ide-cd_ioctl.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/cdrom.h> | 10 | #include <linux/cdrom.h> |
11 | #include <linux/gfp.h> | ||
11 | #include <linux/ide.h> | 12 | #include <linux/ide.h> |
12 | #include <scsi/scsi.h> | 13 | #include <scsi/scsi.h> |
13 | 14 | ||
diff --git a/drivers/ide/ide-devsets.c b/drivers/ide/ide-devsets.c index c6935c78757c..9e98122f646e 100644 --- a/drivers/ide/ide-devsets.c +++ b/drivers/ide/ide-devsets.c | |||
@@ -1,5 +1,6 @@ | |||
1 | 1 | ||
2 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
3 | #include <linux/gfp.h> | ||
3 | #include <linux/ide.h> | 4 | #include <linux/ide.h> |
4 | 5 | ||
5 | DEFINE_MUTEX(ide_setting_mtx); | 6 | DEFINE_MUTEX(ide_setting_mtx); |
diff --git a/drivers/ide/ide-disk_proc.c b/drivers/ide/ide-disk_proc.c index 60b0590ccc9c..f9bbd904eae7 100644 --- a/drivers/ide/ide-disk_proc.c +++ b/drivers/ide/ide-disk_proc.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/ide.h> | 2 | #include <linux/ide.h> |
3 | #include <linux/slab.h> | ||
3 | #include <linux/seq_file.h> | 4 | #include <linux/seq_file.h> |
4 | 5 | ||
5 | #include "ide-disk.h" | 6 | #include "ide-disk.h" |
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index ee58c88dee5a..06b14bc9a1d4 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -29,6 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/gfp.h> | ||
32 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
33 | #include <linux/ide.h> | 34 | #include <linux/ide.h> |
34 | #include <linux/scatterlist.h> | 35 | #include <linux/scatterlist.h> |
@@ -492,6 +493,7 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) | |||
492 | if (rq) { | 493 | if (rq) { |
493 | hwif->rq = NULL; | 494 | hwif->rq = NULL; |
494 | rq->errors = 0; | 495 | rq->errors = 0; |
496 | ide_requeue_and_plug(drive, rq); | ||
495 | } | 497 | } |
496 | return ret; | 498 | return ret; |
497 | } | 499 | } |
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index efd907623469..4713bdca20b6 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/major.h> | 25 | #include <linux/major.h> |
26 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
27 | #include <linux/genhd.h> | 27 | #include <linux/genhd.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/cdrom.h> | 28 | #include <linux/cdrom.h> |
30 | #include <linux/ide.h> | 29 | #include <linux/ide.h> |
31 | #include <linux/hdreg.h> | 30 | #include <linux/hdreg.h> |
diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c index 753241429c26..c32d83996ae1 100644 --- a/drivers/ide/ide-gd.c +++ b/drivers/ide/ide-gd.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/ide.h> | 8 | #include <linux/ide.h> |
9 | #include <linux/hdreg.h> | 9 | #include <linux/hdreg.h> |
10 | #include <linux/dmi.h> | 10 | #include <linux/dmi.h> |
11 | #include <linux/slab.h> | ||
11 | 12 | ||
12 | #if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT) | 13 | #if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT) |
13 | #define IDE_DISK_MINORS (1 << PARTN_BITS) | 14 | #define IDE_DISK_MINORS (1 << PARTN_BITS) |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index db96138fefcd..172ac9218154 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -566,7 +566,7 @@ plug_device_2: | |||
566 | blk_plug_device(q); | 566 | blk_plug_device(q); |
567 | } | 567 | } |
568 | 568 | ||
569 | static void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) | 569 | void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) |
570 | { | 570 | { |
571 | struct request_queue *q = drive->queue; | 571 | struct request_queue *q = drive->queue; |
572 | unsigned long flags; | 572 | unsigned long flags; |
diff --git a/drivers/ide/ide-ioctls.c b/drivers/ide/ide-ioctls.c index 6e7ae2b6cfc6..9965ecd5078c 100644 --- a/drivers/ide/ide-ioctls.c +++ b/drivers/ide/ide-ioctls.c | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | #include <linux/hdreg.h> | 5 | #include <linux/hdreg.h> |
6 | #include <linux/ide.h> | 6 | #include <linux/ide.h> |
7 | #include <linux/slab.h> | ||
7 | 8 | ||
8 | static const struct ide_ioctl_devset ide_ioctl_settings[] = { | 9 | static const struct ide_ioctl_devset ide_ioctl_settings[] = { |
9 | { HDIO_GET_32BIT, HDIO_SET_32BIT, &ide_devset_io_32bit }, | 10 | { HDIO_GET_32BIT, HDIO_SET_32BIT, &ide_devset_io_32bit }, |
diff --git a/drivers/ide/ide-park.c b/drivers/ide/ide-park.c index a914023d6d03..88a380c5a470 100644 --- a/drivers/ide/ide-park.c +++ b/drivers/ide/ide-park.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/gfp.h> | ||
2 | #include <linux/ide.h> | 3 | #include <linux/ide.h> |
3 | #include <linux/jiffies.h> | 4 | #include <linux/jiffies.h> |
4 | #include <linux/blkdev.h> | 5 | #include <linux/blkdev.h> |
diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c index ad7be2669dcb..1c08311b0a0e 100644 --- a/drivers/ide/ide-pm.c +++ b/drivers/ide/ide-pm.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/gfp.h> | ||
2 | #include <linux/ide.h> | 3 | #include <linux/ide.h> |
3 | 4 | ||
4 | int generic_ide_suspend(struct device *dev, pm_message_t mesg) | 5 | int generic_ide_suspend(struct device *dev, pm_message_t mesg) |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index fbedd35feb44..4c3d1bfec0c5 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -695,14 +695,8 @@ static int ide_probe_port(ide_hwif_t *hwif) | |||
695 | if (irqd) | 695 | if (irqd) |
696 | disable_irq(hwif->irq); | 696 | disable_irq(hwif->irq); |
697 | 697 | ||
698 | rc = ide_port_wait_ready(hwif); | 698 | if (ide_port_wait_ready(hwif) == -EBUSY) |
699 | if (rc == -ENODEV) { | 699 | printk(KERN_DEBUG "%s: Wait for ready failed before probe !\n", hwif->name); |
700 | printk(KERN_INFO "%s: no devices on the port\n", hwif->name); | ||
701 | goto out; | ||
702 | } else if (rc == -EBUSY) | ||
703 | printk(KERN_ERR "%s: not ready before the probe\n", hwif->name); | ||
704 | else | ||
705 | rc = -ENODEV; | ||
706 | 700 | ||
707 | /* | 701 | /* |
708 | * Second drive should only exist if first drive was found, | 702 | * Second drive should only exist if first drive was found, |
@@ -713,7 +707,7 @@ static int ide_probe_port(ide_hwif_t *hwif) | |||
713 | if (drive->dev_flags & IDE_DFLAG_PRESENT) | 707 | if (drive->dev_flags & IDE_DFLAG_PRESENT) |
714 | rc = 0; | 708 | rc = 0; |
715 | } | 709 | } |
716 | out: | 710 | |
717 | /* | 711 | /* |
718 | * Use cached IRQ number. It might be (and is...) changed by probe | 712 | * Use cached IRQ number. It might be (and is...) changed by probe |
719 | * code above | 713 | * code above |
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index 017c09540c2f..a3133d7b2a0c 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/ctype.h> | 25 | #include <linux/ctype.h> |
26 | #include <linux/ide.h> | 26 | #include <linux/ide.h> |
27 | #include <linux/seq_file.h> | 27 | #include <linux/seq_file.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
30 | 31 | ||
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index cc8633cbe133..67fb73559fd5 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -428,13 +428,11 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf, | |||
428 | { | 428 | { |
429 | struct request *rq; | 429 | struct request *rq; |
430 | int error; | 430 | int error; |
431 | int rw = !(cmd->tf_flags & IDE_TFLAG_WRITE) ? READ : WRITE; | ||
431 | 432 | ||
432 | rq = blk_get_request(drive->queue, READ, __GFP_WAIT); | 433 | rq = blk_get_request(drive->queue, rw, __GFP_WAIT); |
433 | rq->cmd_type = REQ_TYPE_ATA_TASKFILE; | 434 | rq->cmd_type = REQ_TYPE_ATA_TASKFILE; |
434 | 435 | ||
435 | if (cmd->tf_flags & IDE_TFLAG_WRITE) | ||
436 | rq->cmd_flags |= REQ_RW; | ||
437 | |||
438 | /* | 436 | /* |
439 | * (ks) We transfer currently only whole sectors. | 437 | * (ks) We transfer currently only whole sectors. |
440 | * This is suffient for now. But, it would be great, | 438 | * This is suffient for now. But, it would be great, |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 16d056939f9f..3cb9c4e056ff 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <linux/major.h> | 52 | #include <linux/major.h> |
53 | #include <linux/errno.h> | 53 | #include <linux/errno.h> |
54 | #include <linux/genhd.h> | 54 | #include <linux/genhd.h> |
55 | #include <linux/slab.h> | ||
56 | #include <linux/init.h> | 55 | #include <linux/init.h> |
57 | #include <linux/pci.h> | 56 | #include <linux/pci.h> |
58 | #include <linux/ide.h> | 57 | #include <linux/ide.h> |
diff --git a/drivers/ide/it821x.c b/drivers/ide/it821x.c index b2709c733485..2e3169f2acda 100644 --- a/drivers/ide/it821x.c +++ b/drivers/ide/it821x.c | |||
@@ -61,6 +61,7 @@ | |||
61 | 61 | ||
62 | #include <linux/types.h> | 62 | #include <linux/types.h> |
63 | #include <linux/module.h> | 63 | #include <linux/module.h> |
64 | #include <linux/slab.h> | ||
64 | #include <linux/pci.h> | 65 | #include <linux/pci.h> |
65 | #include <linux/ide.h> | 66 | #include <linux/ide.h> |
66 | #include <linux/init.h> | 67 | #include <linux/init.h> |
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index 850ee452e9bb..159955d16c47 100644 --- a/drivers/ide/pmac.c +++ b/drivers/ide/pmac.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/adb.h> | 33 | #include <linux/adb.h> |
34 | #include <linux/pmu.h> | 34 | #include <linux/pmu.h> |
35 | #include <linux/scatterlist.h> | 35 | #include <linux/scatterlist.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <asm/prom.h> | 38 | #include <asm/prom.h> |
38 | #include <asm/io.h> | 39 | #include <asm/io.h> |
diff --git a/drivers/ide/rapide.c b/drivers/ide/rapide.c index 00f54248f41f..48d976aad7ab 100644 --- a/drivers/ide/rapide.c +++ b/drivers/ide/rapide.c | |||
@@ -3,7 +3,6 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/slab.h> | ||
7 | #include <linux/blkdev.h> | 6 | #include <linux/blkdev.h> |
8 | #include <linux/errno.h> | 7 | #include <linux/errno.h> |
9 | #include <linux/ide.h> | 8 | #include <linux/ide.h> |
diff --git a/drivers/ide/sc1200.c b/drivers/ide/sc1200.c index 134f1fd13866..356b9b504ffd 100644 --- a/drivers/ide/sc1200.c +++ b/drivers/ide/sc1200.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <linux/ide.h> | 20 | #include <linux/ide.h> |
diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c index e65d010b708d..101f40022386 100644 --- a/drivers/ide/via82cxxx.c +++ b/drivers/ide/via82cxxx.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
30 | #include <linux/init.h> | 31 | #include <linux/init.h> |
31 | #include <linux/ide.h> | 32 | #include <linux/ide.h> |
@@ -110,7 +111,6 @@ struct via82cxxx_dev | |||
110 | { | 111 | { |
111 | struct via_isa_bridge *via_config; | 112 | struct via_isa_bridge *via_config; |
112 | unsigned int via_80w; | 113 | unsigned int via_80w; |
113 | u8 cached_device[2]; | ||
114 | }; | 114 | }; |
115 | 115 | ||
116 | /** | 116 | /** |
@@ -403,66 +403,10 @@ static const struct ide_port_ops via_port_ops = { | |||
403 | .cable_detect = via82cxxx_cable_detect, | 403 | .cable_detect = via82cxxx_cable_detect, |
404 | }; | 404 | }; |
405 | 405 | ||
406 | static void via_write_devctl(ide_hwif_t *hwif, u8 ctl) | ||
407 | { | ||
408 | struct via82cxxx_dev *vdev = hwif->host->host_priv; | ||
409 | |||
410 | outb(ctl, hwif->io_ports.ctl_addr); | ||
411 | outb(vdev->cached_device[hwif->channel], hwif->io_ports.device_addr); | ||
412 | } | ||
413 | |||
414 | static void __via_dev_select(ide_drive_t *drive, u8 select) | ||
415 | { | ||
416 | ide_hwif_t *hwif = drive->hwif; | ||
417 | struct via82cxxx_dev *vdev = hwif->host->host_priv; | ||
418 | |||
419 | outb(select, hwif->io_ports.device_addr); | ||
420 | vdev->cached_device[hwif->channel] = select; | ||
421 | } | ||
422 | |||
423 | static void via_dev_select(ide_drive_t *drive) | ||
424 | { | ||
425 | __via_dev_select(drive, drive->select | ATA_DEVICE_OBS); | ||
426 | } | ||
427 | |||
428 | static void via_tf_load(ide_drive_t *drive, struct ide_taskfile *tf, u8 valid) | ||
429 | { | ||
430 | ide_hwif_t *hwif = drive->hwif; | ||
431 | struct ide_io_ports *io_ports = &hwif->io_ports; | ||
432 | |||
433 | if (valid & IDE_VALID_FEATURE) | ||
434 | outb(tf->feature, io_ports->feature_addr); | ||
435 | if (valid & IDE_VALID_NSECT) | ||
436 | outb(tf->nsect, io_ports->nsect_addr); | ||
437 | if (valid & IDE_VALID_LBAL) | ||
438 | outb(tf->lbal, io_ports->lbal_addr); | ||
439 | if (valid & IDE_VALID_LBAM) | ||
440 | outb(tf->lbam, io_ports->lbam_addr); | ||
441 | if (valid & IDE_VALID_LBAH) | ||
442 | outb(tf->lbah, io_ports->lbah_addr); | ||
443 | if (valid & IDE_VALID_DEVICE) | ||
444 | __via_dev_select(drive, tf->device); | ||
445 | } | ||
446 | |||
447 | const struct ide_tp_ops via_tp_ops = { | ||
448 | .exec_command = ide_exec_command, | ||
449 | .read_status = ide_read_status, | ||
450 | .read_altstatus = ide_read_altstatus, | ||
451 | .write_devctl = via_write_devctl, | ||
452 | |||
453 | .dev_select = via_dev_select, | ||
454 | .tf_load = via_tf_load, | ||
455 | .tf_read = ide_tf_read, | ||
456 | |||
457 | .input_data = ide_input_data, | ||
458 | .output_data = ide_output_data, | ||
459 | }; | ||
460 | |||
461 | static const struct ide_port_info via82cxxx_chipset __devinitdata = { | 406 | static const struct ide_port_info via82cxxx_chipset __devinitdata = { |
462 | .name = DRV_NAME, | 407 | .name = DRV_NAME, |
463 | .init_chipset = init_chipset_via82cxxx, | 408 | .init_chipset = init_chipset_via82cxxx, |
464 | .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } }, | 409 | .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } }, |
465 | .tp_ops = &via_tp_ops, | ||
466 | .port_ops = &via_port_ops, | 410 | .port_ops = &via_port_ops, |
467 | .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST | | 411 | .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST | |
468 | IDE_HFLAG_POST_SET_MODE | | 412 | IDE_HFLAG_POST_SET_MODE | |
diff --git a/drivers/idle/i7300_idle.c b/drivers/idle/i7300_idle.c index dd253002cd50..15341fc1c68b 100644 --- a/drivers/idle/i7300_idle.c +++ b/drivers/idle/i7300_idle.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
21 | #include <linux/gfp.h> | ||
21 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
22 | #include <linux/notifier.h> | 23 | #include <linux/notifier.h> |
23 | #include <linux/cpumask.h> | 24 | #include <linux/cpumask.h> |
diff --git a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c index 8e7e3344c4b3..d178699b194a 100644 --- a/drivers/ieee1394/dma.c +++ b/drivers/ieee1394/dma.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/vmalloc.h> | 13 | #include <linux/vmalloc.h> |
15 | #include <linux/scatterlist.h> | 14 | #include <linux/scatterlist.h> |
16 | 15 | ||
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index c88696a6cf8a..4565cb5d3d1a 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
@@ -56,7 +56,6 @@ | |||
56 | #include <linux/delay.h> | 56 | #include <linux/delay.h> |
57 | #include <linux/device.h> | 57 | #include <linux/device.h> |
58 | #include <linux/dma-mapping.h> | 58 | #include <linux/dma-mapping.h> |
59 | #include <linux/gfp.h> | ||
60 | #include <linux/init.h> | 59 | #include <linux/init.h> |
61 | #include <linux/kernel.h> | 60 | #include <linux/kernel.h> |
62 | #include <linux/list.h> | 61 | #include <linux/list.h> |
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index abbb06996f9e..0b926e45afe2 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include <linux/mutex.h> | 36 | #include <linux/mutex.h> |
37 | #include <linux/inetdevice.h> | 37 | #include <linux/inetdevice.h> |
38 | #include <linux/slab.h> | ||
38 | #include <linux/workqueue.h> | 39 | #include <linux/workqueue.h> |
39 | #include <net/arp.h> | 40 | #include <net/arp.h> |
40 | #include <net/neighbour.h> | 41 | #include <net/neighbour.h> |
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 764787ebe8d8..ad63b79afac1 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/random.h> | 42 | #include <linux/random.h> |
43 | #include <linux/rbtree.h> | 43 | #include <linux/rbtree.h> |
44 | #include <linux/spinlock.h> | 44 | #include <linux/spinlock.h> |
45 | #include <linux/slab.h> | ||
45 | #include <linux/sysfs.h> | 46 | #include <linux/sysfs.h> |
46 | #include <linux/workqueue.h> | 47 | #include <linux/workqueue.h> |
47 | #include <linux/kdev_t.h> | 48 | #include <linux/kdev_t.h> |
@@ -3693,7 +3694,7 @@ static void cm_add_one(struct ib_device *ib_device) | |||
3693 | cm_dev->device = device_create(&cm_class, &ib_device->dev, | 3694 | cm_dev->device = device_create(&cm_class, &ib_device->dev, |
3694 | MKDEV(0, 0), NULL, | 3695 | MKDEV(0, 0), NULL, |
3695 | "%s", ib_device->name); | 3696 | "%s", ib_device->name); |
3696 | if (!cm_dev->device) { | 3697 | if (IS_ERR(cm_dev->device)) { |
3697 | kfree(cm_dev); | 3698 | kfree(cm_dev); |
3698 | return; | 3699 | return; |
3699 | } | 3700 | } |
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 875e34e0b235..6d777069d86d 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/random.h> | 40 | #include <linux/random.h> |
41 | #include <linux/idr.h> | 41 | #include <linux/idr.h> |
42 | #include <linux/inetdevice.h> | 42 | #include <linux/inetdevice.h> |
43 | #include <linux/slab.h> | ||
43 | 44 | ||
44 | #include <net/tcp.h> | 45 | #include <net/tcp.h> |
45 | #include <net/ipv6.h> | 46 | #include <net/ipv6.h> |
@@ -1683,6 +1684,7 @@ int rdma_set_ib_paths(struct rdma_cm_id *id, | |||
1683 | } | 1684 | } |
1684 | 1685 | ||
1685 | memcpy(id->route.path_rec, path_rec, sizeof *path_rec * num_paths); | 1686 | memcpy(id->route.path_rec, path_rec, sizeof *path_rec * num_paths); |
1687 | id->route.num_paths = num_paths; | ||
1686 | return 0; | 1688 | return 0; |
1687 | err: | 1689 | err: |
1688 | cma_comp_exch(id_priv, CMA_ROUTE_RESOLVED, CMA_ADDR_RESOLVED); | 1690 | cma_comp_exch(id_priv, CMA_ROUTE_RESOLVED, CMA_ADDR_RESOLVED); |
diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c index 0f89909abce9..bfead5bc25f6 100644 --- a/drivers/infiniband/core/iwcm.c +++ b/drivers/infiniband/core/iwcm.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/spinlock.h> | 44 | #include <linux/spinlock.h> |
45 | #include <linux/workqueue.h> | 45 | #include <linux/workqueue.h> |
46 | #include <linux/completion.h> | 46 | #include <linux/completion.h> |
47 | #include <linux/slab.h> | ||
47 | 48 | ||
48 | #include <rdma/iw_cm.h> | 49 | #include <rdma/iw_cm.h> |
49 | #include <rdma/ib_addr.h> | 50 | #include <rdma/ib_addr.h> |
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index e351b1548535..1df1194aeba4 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -34,6 +34,7 @@ | |||
34 | * | 34 | * |
35 | */ | 35 | */ |
36 | #include <linux/dma-mapping.h> | 36 | #include <linux/dma-mapping.h> |
37 | #include <linux/slab.h> | ||
37 | #include <rdma/ib_cache.h> | 38 | #include <rdma/ib_cache.h> |
38 | 39 | ||
39 | #include "mad_priv.h" | 40 | #include "mad_priv.h" |
diff --git a/drivers/infiniband/core/mad_rmpp.c b/drivers/infiniband/core/mad_rmpp.c index 4e0f2829e0e5..f37878c9c06e 100644 --- a/drivers/infiniband/core/mad_rmpp.c +++ b/drivers/infiniband/core/mad_rmpp.c | |||
@@ -31,6 +31,8 @@ | |||
31 | * SOFTWARE. | 31 | * SOFTWARE. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/slab.h> | ||
35 | |||
34 | #include "mad_priv.h" | 36 | #include "mad_priv.h" |
35 | #include "mad_rmpp.h" | 37 | #include "mad_rmpp.h" |
36 | 38 | ||
diff --git a/drivers/infiniband/core/multicast.c b/drivers/infiniband/core/multicast.c index 8d82ba171353..a519801dcfb7 100644 --- a/drivers/infiniband/core/multicast.c +++ b/drivers/infiniband/core/multicast.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
35 | #include <linux/err.h> | 35 | #include <linux/err.h> |
36 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
37 | #include <linux/slab.h> | ||
37 | #include <linux/bitops.h> | 38 | #include <linux/bitops.h> |
38 | #include <linux/random.h> | 39 | #include <linux/random.h> |
39 | 40 | ||
diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c index 017d6e24448f..512b1c43460c 100644 --- a/drivers/infiniband/core/ucm.c +++ b/drivers/infiniband/core/ucm.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/cdev.h> | 44 | #include <linux/cdev.h> |
45 | #include <linux/idr.h> | 45 | #include <linux/idr.h> |
46 | #include <linux/mutex.h> | 46 | #include <linux/mutex.h> |
47 | #include <linux/slab.h> | ||
47 | 48 | ||
48 | #include <asm/uaccess.h> | 49 | #include <asm/uaccess.h> |
49 | 50 | ||
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index b2e16c332d5b..46185084121e 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/in.h> | 39 | #include <linux/in.h> |
40 | #include <linux/in6.h> | 40 | #include <linux/in6.h> |
41 | #include <linux/miscdevice.h> | 41 | #include <linux/miscdevice.h> |
42 | #include <linux/slab.h> | ||
42 | 43 | ||
43 | #include <rdma/rdma_user_cm.h> | 44 | #include <rdma/rdma_user_cm.h> |
44 | #include <rdma/ib_marshall.h> | 45 | #include <rdma/ib_marshall.h> |
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index 4f906f0614f0..415e186eee32 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
38 | #include <linux/hugetlb.h> | 38 | #include <linux/hugetlb.h> |
39 | #include <linux/dma-attrs.h> | 39 | #include <linux/dma-attrs.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | #include "uverbs.h" | 42 | #include "uverbs.h" |
42 | 43 | ||
diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c index 04b585e86cb2..e7db054fb1c8 100644 --- a/drivers/infiniband/core/user_mad.c +++ b/drivers/infiniband/core/user_mad.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/compat.h> | 46 | #include <linux/compat.h> |
47 | #include <linux/sched.h> | 47 | #include <linux/sched.h> |
48 | #include <linux/semaphore.h> | 48 | #include <linux/semaphore.h> |
49 | #include <linux/slab.h> | ||
49 | 50 | ||
50 | #include <asm/uaccess.h> | 51 | #include <asm/uaccess.h> |
51 | 52 | ||
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index f71cf138d674..6fcfbeb24a23 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include <linux/file.h> | 36 | #include <linux/file.h> |
37 | #include <linux/fs.h> | 37 | #include <linux/fs.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include <asm/uaccess.h> | 40 | #include <asm/uaccess.h> |
40 | 41 | ||
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index d805cf365c8d..fb3526254426 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/file.h> | 44 | #include <linux/file.h> |
45 | #include <linux/cdev.h> | 45 | #include <linux/cdev.h> |
46 | #include <linux/anon_inodes.h> | 46 | #include <linux/anon_inodes.h> |
47 | #include <linux/slab.h> | ||
47 | 48 | ||
48 | #include <asm/uaccess.h> | 49 | #include <asm/uaccess.h> |
49 | 50 | ||
diff --git a/drivers/infiniband/hw/amso1100/c2.c b/drivers/infiniband/hw/amso1100/c2.c index c61fd2b4a556..dc85d777578e 100644 --- a/drivers/infiniband/hw/amso1100/c2.c +++ b/drivers/infiniband/hw/amso1100/c2.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/tcp.h> | 46 | #include <linux/tcp.h> |
47 | #include <linux/init.h> | 47 | #include <linux/init.h> |
48 | #include <linux/dma-mapping.h> | 48 | #include <linux/dma-mapping.h> |
49 | #include <linux/slab.h> | ||
49 | 50 | ||
50 | #include <asm/io.h> | 51 | #include <asm/io.h> |
51 | #include <asm/irq.h> | 52 | #include <asm/irq.h> |
diff --git a/drivers/infiniband/hw/amso1100/c2_alloc.c b/drivers/infiniband/hw/amso1100/c2_alloc.c index e9110163aeff..d4f5f5d42e90 100644 --- a/drivers/infiniband/hw/amso1100/c2_alloc.c +++ b/drivers/infiniband/hw/amso1100/c2_alloc.c | |||
@@ -32,7 +32,6 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/slab.h> | ||
36 | #include <linux/bitmap.h> | 35 | #include <linux/bitmap.h> |
37 | 36 | ||
38 | #include "c2.h" | 37 | #include "c2.h" |
diff --git a/drivers/infiniband/hw/amso1100/c2_cm.c b/drivers/infiniband/hw/amso1100/c2_cm.c index 75b93e9b8810..95f58ab1e0b8 100644 --- a/drivers/infiniband/hw/amso1100/c2_cm.c +++ b/drivers/infiniband/hw/amso1100/c2_cm.c | |||
@@ -31,6 +31,8 @@ | |||
31 | * SOFTWARE. | 31 | * SOFTWARE. |
32 | * | 32 | * |
33 | */ | 33 | */ |
34 | #include <linux/slab.h> | ||
35 | |||
34 | #include "c2.h" | 36 | #include "c2.h" |
35 | #include "c2_wr.h" | 37 | #include "c2_wr.h" |
36 | #include "c2_vq.h" | 38 | #include "c2_vq.h" |
diff --git a/drivers/infiniband/hw/amso1100/c2_cq.c b/drivers/infiniband/hw/amso1100/c2_cq.c index f5c45b194f53..f7b0fc23f413 100644 --- a/drivers/infiniband/hw/amso1100/c2_cq.c +++ b/drivers/infiniband/hw/amso1100/c2_cq.c | |||
@@ -35,6 +35,8 @@ | |||
35 | * SOFTWARE. | 35 | * SOFTWARE. |
36 | * | 36 | * |
37 | */ | 37 | */ |
38 | #include <linux/gfp.h> | ||
39 | |||
38 | #include "c2.h" | 40 | #include "c2.h" |
39 | #include "c2_vq.h" | 41 | #include "c2_vq.h" |
40 | #include "c2_status.h" | 42 | #include "c2_status.h" |
diff --git a/drivers/infiniband/hw/amso1100/c2_mm.c b/drivers/infiniband/hw/amso1100/c2_mm.c index b506fe22b4d4..119c4f3d9791 100644 --- a/drivers/infiniband/hw/amso1100/c2_mm.c +++ b/drivers/infiniband/hw/amso1100/c2_mm.c | |||
@@ -30,6 +30,8 @@ | |||
30 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | 30 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
31 | * SOFTWARE. | 31 | * SOFTWARE. |
32 | */ | 32 | */ |
33 | #include <linux/slab.h> | ||
34 | |||
33 | #include "c2.h" | 35 | #include "c2.h" |
34 | #include "c2_vq.h" | 36 | #include "c2_vq.h" |
35 | 37 | ||
diff --git a/drivers/infiniband/hw/amso1100/c2_pd.c b/drivers/infiniband/hw/amso1100/c2_pd.c index 00c709926c8d..161f2a285351 100644 --- a/drivers/infiniband/hw/amso1100/c2_pd.c +++ b/drivers/infiniband/hw/amso1100/c2_pd.c | |||
@@ -34,6 +34,7 @@ | |||
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/init.h> | 36 | #include <linux/init.h> |
37 | #include <linux/slab.h> | ||
37 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
38 | 39 | ||
39 | #include "c2.h" | 40 | #include "c2.h" |
diff --git a/drivers/infiniband/hw/amso1100/c2_provider.c b/drivers/infiniband/hw/amso1100/c2_provider.c index ad723bd8bf49..c47f618d12e8 100644 --- a/drivers/infiniband/hw/amso1100/c2_provider.c +++ b/drivers/infiniband/hw/amso1100/c2_provider.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/dma-mapping.h> | 50 | #include <linux/dma-mapping.h> |
51 | #include <linux/if_arp.h> | 51 | #include <linux/if_arp.h> |
52 | #include <linux/vmalloc.h> | 52 | #include <linux/vmalloc.h> |
53 | #include <linux/slab.h> | ||
53 | 54 | ||
54 | #include <asm/io.h> | 55 | #include <asm/io.h> |
55 | #include <asm/irq.h> | 56 | #include <asm/irq.h> |
diff --git a/drivers/infiniband/hw/amso1100/c2_qp.c b/drivers/infiniband/hw/amso1100/c2_qp.c index ad518868df77..d8f4bb8bf42e 100644 --- a/drivers/infiniband/hw/amso1100/c2_qp.c +++ b/drivers/infiniband/hw/amso1100/c2_qp.c | |||
@@ -36,6 +36,7 @@ | |||
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
39 | #include <linux/gfp.h> | ||
39 | 40 | ||
40 | #include "c2.h" | 41 | #include "c2.h" |
41 | #include "c2_vq.h" | 42 | #include "c2_vq.h" |
diff --git a/drivers/infiniband/hw/amso1100/c2_rnic.c b/drivers/infiniband/hw/amso1100/c2_rnic.c index dd05c4835642..78c4bcc6ef60 100644 --- a/drivers/infiniband/hw/amso1100/c2_rnic.c +++ b/drivers/infiniband/hw/amso1100/c2_rnic.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/mm.h> | 51 | #include <linux/mm.h> |
52 | #include <linux/inet.h> | 52 | #include <linux/inet.h> |
53 | #include <linux/vmalloc.h> | 53 | #include <linux/vmalloc.h> |
54 | #include <linux/slab.h> | ||
54 | 55 | ||
55 | #include <linux/route.h> | 56 | #include <linux/route.h> |
56 | 57 | ||
diff --git a/drivers/infiniband/hw/cxgb3/cxio_dbg.c b/drivers/infiniband/hw/cxgb3/cxio_dbg.c index a8d24d53f307..8bca6b4ec9af 100644 --- a/drivers/infiniband/hw/cxgb3/cxio_dbg.c +++ b/drivers/infiniband/hw/cxgb3/cxio_dbg.c | |||
@@ -31,6 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | #ifdef DEBUG | 32 | #ifdef DEBUG |
33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
34 | #include <linux/slab.h> | ||
34 | #include "common.h" | 35 | #include "common.h" |
35 | #include "cxgb3_ioctl.h" | 36 | #include "cxgb3_ioctl.h" |
36 | #include "cxio_hal.h" | 37 | #include "cxio_hal.h" |
diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.c b/drivers/infiniband/hw/cxgb3/cxio_hal.c index a28e862f2d68..35f286f1ad1e 100644 --- a/drivers/infiniband/hw/cxgb3/cxio_hal.c +++ b/drivers/infiniband/hw/cxgb3/cxio_hal.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/spinlock.h> | 37 | #include <linux/spinlock.h> |
38 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
39 | #include <linux/dma-mapping.h> | 39 | #include <linux/dma-mapping.h> |
40 | #include <linux/slab.h> | ||
40 | #include <net/net_namespace.h> | 41 | #include <net/net_namespace.h> |
41 | 42 | ||
42 | #include "cxio_resource.h" | 43 | #include "cxio_resource.h" |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c index d94388b81a40..4fef03296276 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c | |||
@@ -31,6 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/list.h> | 33 | #include <linux/list.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/workqueue.h> | 35 | #include <linux/workqueue.h> |
35 | #include <linux/skbuff.h> | 36 | #include <linux/skbuff.h> |
36 | #include <linux/timer.h> | 37 | #include <linux/timer.h> |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_ev.c b/drivers/infiniband/hw/cxgb3/iwch_ev.c index 743c5d8b8806..6afc89e7572c 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_ev.c +++ b/drivers/infiniband/hw/cxgb3/iwch_ev.c | |||
@@ -29,7 +29,7 @@ | |||
29 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | 29 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
30 | * SOFTWARE. | 30 | * SOFTWARE. |
31 | */ | 31 | */ |
32 | #include <linux/slab.h> | 32 | #include <linux/gfp.h> |
33 | #include <linux/mman.h> | 33 | #include <linux/mman.h> |
34 | #include <net/sock.h> | 34 | #include <net/sock.h> |
35 | #include "iwch_provider.h" | 35 | #include "iwch_provider.h" |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_mem.c b/drivers/infiniband/hw/cxgb3/iwch_mem.c index e1ec65ebb016..5c36ee2809ac 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_mem.c +++ b/drivers/infiniband/hw/cxgb3/iwch_mem.c | |||
@@ -29,6 +29,7 @@ | |||
29 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | 29 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
30 | * SOFTWARE. | 30 | * SOFTWARE. |
31 | */ | 31 | */ |
32 | #include <linux/slab.h> | ||
32 | #include <asm/byteorder.h> | 33 | #include <asm/byteorder.h> |
33 | 34 | ||
34 | #include <rdma/iw_cm.h> | 35 | #include <rdma/iw_cm.h> |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index 47b35c6608d2..19b1c4a62a23 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/ethtool.h> | 42 | #include <linux/ethtool.h> |
43 | #include <linux/rtnetlink.h> | 43 | #include <linux/rtnetlink.h> |
44 | #include <linux/inetdevice.h> | 44 | #include <linux/inetdevice.h> |
45 | #include <linux/slab.h> | ||
45 | 46 | ||
46 | #include <asm/io.h> | 47 | #include <asm/io.h> |
47 | #include <asm/irq.h> | 48 | #include <asm/irq.h> |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c b/drivers/infiniband/hw/cxgb3/iwch_qp.c index b4d893de3650..ae47bfd22bd5 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_qp.c +++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c | |||
@@ -30,6 +30,7 @@ | |||
30 | * SOFTWARE. | 30 | * SOFTWARE. |
31 | */ | 31 | */ |
32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
33 | #include <linux/gfp.h> | ||
33 | #include "iwch_provider.h" | 34 | #include "iwch_provider.h" |
34 | #include "iwch.h" | 35 | #include "iwch.h" |
35 | #include "iwch_cm.h" | 36 | #include "iwch_cm.h" |
diff --git a/drivers/infiniband/hw/ehca/ehca_av.c b/drivers/infiniband/hw/ehca/ehca_av.c index 56735ea2fc57..465926319f3d 100644 --- a/drivers/infiniband/hw/ehca/ehca_av.c +++ b/drivers/infiniband/hw/ehca/ehca_av.c | |||
@@ -41,6 +41,8 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGE. | 41 | * POSSIBILITY OF SUCH DAMAGE. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/slab.h> | ||
45 | |||
44 | #include "ehca_tools.h" | 46 | #include "ehca_tools.h" |
45 | #include "ehca_iverbs.h" | 47 | #include "ehca_iverbs.h" |
46 | #include "hcp_if.h" | 48 | #include "hcp_if.h" |
diff --git a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/ehca_cq.c index 97e4b231cdc4..d9b0ebcb67d7 100644 --- a/drivers/infiniband/hw/ehca/ehca_cq.c +++ b/drivers/infiniband/hw/ehca/ehca_cq.c | |||
@@ -43,6 +43,8 @@ | |||
43 | * POSSIBILITY OF SUCH DAMAGE. | 43 | * POSSIBILITY OF SUCH DAMAGE. |
44 | */ | 44 | */ |
45 | 45 | ||
46 | #include <linux/slab.h> | ||
47 | |||
46 | #include "ehca_iverbs.h" | 48 | #include "ehca_iverbs.h" |
47 | #include "ehca_classes.h" | 49 | #include "ehca_classes.h" |
48 | #include "ehca_irq.h" | 50 | #include "ehca_irq.h" |
diff --git a/drivers/infiniband/hw/ehca/ehca_hca.c b/drivers/infiniband/hw/ehca/ehca_hca.c index 8b92f85d4dd0..73edc3668663 100644 --- a/drivers/infiniband/hw/ehca/ehca_hca.c +++ b/drivers/infiniband/hw/ehca/ehca_hca.c | |||
@@ -39,6 +39,8 @@ | |||
39 | * POSSIBILITY OF SUCH DAMAGE. | 39 | * POSSIBILITY OF SUCH DAMAGE. |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include <linux/gfp.h> | ||
43 | |||
42 | #include "ehca_tools.h" | 44 | #include "ehca_tools.h" |
43 | #include "ehca_iverbs.h" | 45 | #include "ehca_iverbs.h" |
44 | #include "hcp_if.h" | 46 | #include "hcp_if.h" |
diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c index b2b6fea2b141..07cae552cafb 100644 --- a/drivers/infiniband/hw/ehca/ehca_irq.c +++ b/drivers/infiniband/hw/ehca/ehca_irq.c | |||
@@ -41,6 +41,8 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGE. | 41 | * POSSIBILITY OF SUCH DAMAGE. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/slab.h> | ||
45 | |||
44 | #include "ehca_classes.h" | 46 | #include "ehca_classes.h" |
45 | #include "ehca_irq.h" | 47 | #include "ehca_irq.h" |
46 | #include "ehca_iverbs.h" | 48 | #include "ehca_iverbs.h" |
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c index 7550a534005c..31a68b9c52d0 100644 --- a/drivers/infiniband/hw/ehca/ehca_mrmw.c +++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c | |||
@@ -40,6 +40,7 @@ | |||
40 | * POSSIBILITY OF SUCH DAMAGE. | 40 | * POSSIBILITY OF SUCH DAMAGE. |
41 | */ | 41 | */ |
42 | 42 | ||
43 | #include <linux/slab.h> | ||
43 | #include <rdma/ib_umem.h> | 44 | #include <rdma/ib_umem.h> |
44 | 45 | ||
45 | #include "ehca_iverbs.h" | 46 | #include "ehca_iverbs.h" |
diff --git a/drivers/infiniband/hw/ehca/ehca_pd.c b/drivers/infiniband/hw/ehca/ehca_pd.c index 2fe554855fa5..351577a6670a 100644 --- a/drivers/infiniband/hw/ehca/ehca_pd.c +++ b/drivers/infiniband/hw/ehca/ehca_pd.c | |||
@@ -38,6 +38,8 @@ | |||
38 | * POSSIBILITY OF SUCH DAMAGE. | 38 | * POSSIBILITY OF SUCH DAMAGE. |
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include <linux/slab.h> | ||
42 | |||
41 | #include "ehca_tools.h" | 43 | #include "ehca_tools.h" |
42 | #include "ehca_iverbs.h" | 44 | #include "ehca_iverbs.h" |
43 | 45 | ||
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index b105f664d3ef..47d388ec1cde 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c | |||
@@ -43,6 +43,8 @@ | |||
43 | * POSSIBILITY OF SUCH DAMAGE. | 43 | * POSSIBILITY OF SUCH DAMAGE. |
44 | */ | 44 | */ |
45 | 45 | ||
46 | #include <linux/slab.h> | ||
47 | |||
46 | #include "ehca_classes.h" | 48 | #include "ehca_classes.h" |
47 | #include "ehca_tools.h" | 49 | #include "ehca_tools.h" |
48 | #include "ehca_qes.h" | 50 | #include "ehca_qes.h" |
diff --git a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/ehca/ehca_uverbs.c index f1565cae8ec6..45ee89b65c23 100644 --- a/drivers/infiniband/hw/ehca/ehca_uverbs.c +++ b/drivers/infiniband/hw/ehca/ehca_uverbs.c | |||
@@ -40,6 +40,8 @@ | |||
40 | * POSSIBILITY OF SUCH DAMAGE. | 40 | * POSSIBILITY OF SUCH DAMAGE. |
41 | */ | 41 | */ |
42 | 42 | ||
43 | #include <linux/slab.h> | ||
44 | |||
43 | #include "ehca_classes.h" | 45 | #include "ehca_classes.h" |
44 | #include "ehca_iverbs.h" | 46 | #include "ehca_iverbs.h" |
45 | #include "ehca_mrmw.h" | 47 | #include "ehca_mrmw.h" |
diff --git a/drivers/infiniband/hw/ehca/ipz_pt_fn.c b/drivers/infiniband/hw/ehca/ipz_pt_fn.c index 1227c593627a..1596e3085344 100644 --- a/drivers/infiniband/hw/ehca/ipz_pt_fn.c +++ b/drivers/infiniband/hw/ehca/ipz_pt_fn.c | |||
@@ -38,6 +38,8 @@ | |||
38 | * POSSIBILITY OF SUCH DAMAGE. | 38 | * POSSIBILITY OF SUCH DAMAGE. |
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include <linux/slab.h> | ||
42 | |||
41 | #include "ehca_tools.h" | 43 | #include "ehca_tools.h" |
42 | #include "ipz_pt_fn.h" | 44 | #include "ipz_pt_fn.h" |
43 | #include "ehca_classes.h" | 45 | #include "ehca_classes.h" |
diff --git a/drivers/infiniband/hw/ipath/ipath_cq.c b/drivers/infiniband/hw/ipath/ipath_cq.c index d385e4168c97..0416c6c0e126 100644 --- a/drivers/infiniband/hw/ipath/ipath_cq.c +++ b/drivers/infiniband/hw/ipath/ipath_cq.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/vmalloc.h> | 36 | #include <linux/vmalloc.h> |
36 | 37 | ||
37 | #include "ipath_verbs.h" | 38 | #include "ipath_verbs.h" |
diff --git a/drivers/infiniband/hw/ipath/ipath_dma.c b/drivers/infiniband/hw/ipath/ipath_dma.c index e90a0ea538a0..644c2c74e054 100644 --- a/drivers/infiniband/hw/ipath/ipath_dma.c +++ b/drivers/infiniband/hw/ipath/ipath_dma.c | |||
@@ -31,6 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/scatterlist.h> | 33 | #include <linux/scatterlist.h> |
34 | #include <linux/gfp.h> | ||
34 | #include <rdma/ib_verbs.h> | 35 | #include <rdma/ib_verbs.h> |
35 | 36 | ||
36 | #include "ipath_verbs.h" | 37 | #include "ipath_verbs.h" |
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index d2787fe80304..6302626d17f0 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/netdevice.h> | 40 | #include <linux/netdevice.h> |
41 | #include <linux/vmalloc.h> | 41 | #include <linux/vmalloc.h> |
42 | #include <linux/bitmap.h> | 42 | #include <linux/bitmap.h> |
43 | #include <linux/slab.h> | ||
43 | 44 | ||
44 | #include "ipath_kernel.h" | 45 | #include "ipath_kernel.h" |
45 | #include "ipath_verbs.h" | 46 | #include "ipath_verbs.h" |
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c index 73933a41ce84..9c5c66d16a23 100644 --- a/drivers/infiniband/hw/ipath/ipath_file_ops.c +++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/cdev.h> | 36 | #include <linux/cdev.h> |
37 | #include <linux/swap.h> | 37 | #include <linux/swap.h> |
38 | #include <linux/vmalloc.h> | 38 | #include <linux/vmalloc.h> |
39 | #include <linux/slab.h> | ||
39 | #include <linux/highmem.h> | 40 | #include <linux/highmem.h> |
40 | #include <linux/io.h> | 41 | #include <linux/io.h> |
41 | #include <linux/jiffies.h> | 42 | #include <linux/jiffies.h> |
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index 100da8542bba..2fca70836dae 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/pagemap.h> | 37 | #include <linux/pagemap.h> |
38 | #include <linux/init.h> | 38 | #include <linux/init.h> |
39 | #include <linux/namei.h> | 39 | #include <linux/namei.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | #include "ipath_kernel.h" | 42 | #include "ipath_kernel.h" |
42 | 43 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_init_chip.c b/drivers/infiniband/hw/ipath/ipath_init_chip.c index 077879c0bdb5..776938299e4c 100644 --- a/drivers/infiniband/hw/ipath/ipath_init_chip.c +++ b/drivers/infiniband/hw/ipath/ipath_init_chip.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <linux/pci.h> | 34 | #include <linux/pci.h> |
35 | #include <linux/netdevice.h> | 35 | #include <linux/netdevice.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/vmalloc.h> | 37 | #include <linux/vmalloc.h> |
37 | 38 | ||
38 | #include "ipath_kernel.h" | 39 | #include "ipath_kernel.h" |
diff --git a/drivers/infiniband/hw/ipath/ipath_mmap.c b/drivers/infiniband/hw/ipath/ipath_mmap.c index b28865faf435..e73274229404 100644 --- a/drivers/infiniband/hw/ipath/ipath_mmap.c +++ b/drivers/infiniband/hw/ipath/ipath_mmap.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/vmalloc.h> | 34 | #include <linux/vmalloc.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/mm.h> | 36 | #include <linux/mm.h> |
36 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
37 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
diff --git a/drivers/infiniband/hw/ipath/ipath_mr.c b/drivers/infiniband/hw/ipath/ipath_mr.c index 9d343b7c2f3b..e346d3890a0e 100644 --- a/drivers/infiniband/hw/ipath/ipath_mr.c +++ b/drivers/infiniband/hw/ipath/ipath_mr.c | |||
@@ -31,6 +31,8 @@ | |||
31 | * SOFTWARE. | 31 | * SOFTWARE. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/slab.h> | ||
35 | |||
34 | #include <rdma/ib_umem.h> | 36 | #include <rdma/ib_umem.h> |
35 | #include <rdma/ib_pack.h> | 37 | #include <rdma/ib_pack.h> |
36 | #include <rdma/ib_smi.h> | 38 | #include <rdma/ib_smi.h> |
diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c index cb2d3ef2ae12..0857a9c3cd3d 100644 --- a/drivers/infiniband/hw/ipath/ipath_qp.c +++ b/drivers/infiniband/hw/ipath/ipath_qp.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
35 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/vmalloc.h> | 37 | #include <linux/vmalloc.h> |
37 | 38 | ||
38 | #include "ipath_verbs.h" | 39 | #include "ipath_verbs.h" |
diff --git a/drivers/infiniband/hw/ipath/ipath_sdma.c b/drivers/infiniband/hw/ipath/ipath_sdma.c index 4b0698590850..98ac18ec977e 100644 --- a/drivers/infiniband/hw/ipath/ipath_sdma.c +++ b/drivers/infiniband/hw/ipath/ipath_sdma.c | |||
@@ -31,6 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/spinlock.h> | 33 | #include <linux/spinlock.h> |
34 | #include <linux/gfp.h> | ||
34 | 35 | ||
35 | #include "ipath_kernel.h" | 36 | #include "ipath_kernel.h" |
36 | #include "ipath_verbs.h" | 37 | #include "ipath_verbs.h" |
diff --git a/drivers/infiniband/hw/ipath/ipath_srq.c b/drivers/infiniband/hw/ipath/ipath_srq.c index e3d80ca84c1a..386e2c717c53 100644 --- a/drivers/infiniband/hw/ipath/ipath_srq.c +++ b/drivers/infiniband/hw/ipath/ipath_srq.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/vmalloc.h> | 36 | #include <linux/vmalloc.h> |
36 | 37 | ||
37 | #include "ipath_verbs.h" | 38 | #include "ipath_verbs.h" |
diff --git a/drivers/infiniband/hw/ipath/ipath_user_pages.c b/drivers/infiniband/hw/ipath/ipath_user_pages.c index eb7d59abd12d..5e86d73eba2a 100644 --- a/drivers/infiniband/hw/ipath/ipath_user_pages.c +++ b/drivers/infiniband/hw/ipath/ipath_user_pages.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <linux/mm.h> | 34 | #include <linux/mm.h> |
35 | #include <linux/device.h> | 35 | #include <linux/device.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
37 | 38 | ||
38 | #include "ipath_kernel.h" | 39 | #include "ipath_kernel.h" |
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 9289ab4b0ae8..559f39be0dcc 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <rdma/ib_mad.h> | 34 | #include <rdma/ib_mad.h> |
35 | #include <rdma/ib_user_verbs.h> | 35 | #include <rdma/ib_user_verbs.h> |
36 | #include <linux/io.h> | 36 | #include <linux/io.h> |
37 | #include <linux/slab.h> | ||
37 | #include <linux/utsname.h> | 38 | #include <linux/utsname.h> |
38 | #include <linux/rculist.h> | 39 | #include <linux/rculist.h> |
39 | 40 | ||
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c b/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c index 6923e1d986da..6216ea923853 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <linux/rculist.h> | 34 | #include <linux/rculist.h> |
35 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include "ipath_verbs.h" | 38 | #include "ipath_verbs.h" |
38 | 39 | ||
diff --git a/drivers/infiniband/hw/mlx4/ah.c b/drivers/infiniband/hw/mlx4/ah.c index c75ac9463e20..11a236f8d884 100644 --- a/drivers/infiniband/hw/mlx4/ah.c +++ b/drivers/infiniband/hw/mlx4/ah.c | |||
@@ -30,6 +30,8 @@ | |||
30 | * SOFTWARE. | 30 | * SOFTWARE. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/slab.h> | ||
34 | |||
33 | #include "mlx4_ib.h" | 35 | #include "mlx4_ib.h" |
34 | 36 | ||
35 | struct ib_ah *mlx4_ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr) | 37 | struct ib_ah *mlx4_ib_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr) |
diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c index de5263beab4a..cc2ddd29ac57 100644 --- a/drivers/infiniband/hw/mlx4/cq.c +++ b/drivers/infiniband/hw/mlx4/cq.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <linux/mlx4/cq.h> | 34 | #include <linux/mlx4/cq.h> |
35 | #include <linux/mlx4/qp.h> | 35 | #include <linux/mlx4/qp.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include "mlx4_ib.h" | 38 | #include "mlx4_ib.h" |
38 | #include "user.h" | 39 | #include "user.h" |
diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c index 19e68ab66168..f38d5b118927 100644 --- a/drivers/infiniband/hw/mlx4/mad.c +++ b/drivers/infiniband/hw/mlx4/mad.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <rdma/ib_smi.h> | 34 | #include <rdma/ib_smi.h> |
35 | 35 | ||
36 | #include <linux/mlx4/cmd.h> | 36 | #include <linux/mlx4/cmd.h> |
37 | #include <linux/gfp.h> | ||
37 | 38 | ||
38 | #include "mlx4_ib.h" | 39 | #include "mlx4_ib.h" |
39 | 40 | ||
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index e596537ff353..01f2a3f93355 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
37 | 38 | ||
38 | #include <rdma/ib_smi.h> | 39 | #include <rdma/ib_smi.h> |
diff --git a/drivers/infiniband/hw/mlx4/mr.c b/drivers/infiniband/hw/mlx4/mr.c index 8f3666b20ea4..1d27b9a8e2d6 100644 --- a/drivers/infiniband/hw/mlx4/mr.c +++ b/drivers/infiniband/hw/mlx4/mr.c | |||
@@ -31,6 +31,8 @@ | |||
31 | * SOFTWARE. | 31 | * SOFTWARE. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/slab.h> | ||
35 | |||
34 | #include "mlx4_ib.h" | 36 | #include "mlx4_ib.h" |
35 | 37 | ||
36 | static u32 convert_access(int acc) | 38 | static u32 convert_access(int acc) |
@@ -238,7 +240,7 @@ struct ib_fast_reg_page_list *mlx4_ib_alloc_fast_reg_page_list(struct ib_device | |||
238 | mfrpl->mapped_page_list = dma_alloc_coherent(&dev->dev->pdev->dev, | 240 | mfrpl->mapped_page_list = dma_alloc_coherent(&dev->dev->pdev->dev, |
239 | size, &mfrpl->map, | 241 | size, &mfrpl->map, |
240 | GFP_KERNEL); | 242 | GFP_KERNEL); |
241 | if (!mfrpl->ibfrpl.page_list) | 243 | if (!mfrpl->mapped_page_list) |
242 | goto err_free; | 244 | goto err_free; |
243 | 245 | ||
244 | WARN_ON(mfrpl->map & 0x3f); | 246 | WARN_ON(mfrpl->map & 0x3f); |
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index ae75389937d6..5643f4a8ffef 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/log2.h> | 34 | #include <linux/log2.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #include <rdma/ib_cache.h> | 37 | #include <rdma/ib_cache.h> |
37 | #include <rdma/ib_pack.h> | 38 | #include <rdma/ib_pack.h> |
diff --git a/drivers/infiniband/hw/mlx4/srq.c b/drivers/infiniband/hw/mlx4/srq.c index cf8085bcbd6d..818b7ecace5e 100644 --- a/drivers/infiniband/hw/mlx4/srq.c +++ b/drivers/infiniband/hw/mlx4/srq.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <linux/mlx4/qp.h> | 34 | #include <linux/mlx4/qp.h> |
35 | #include <linux/mlx4/srq.h> | 35 | #include <linux/mlx4/srq.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include "mlx4_ib.h" | 38 | #include "mlx4_ib.h" |
38 | #include "user.h" | 39 | #include "user.h" |
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c index 8c2ed994d540..3603ae89b606 100644 --- a/drivers/infiniband/hw/mthca/mthca_cmd.c +++ b/drivers/infiniband/hw/mthca/mthca_cmd.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/pci.h> | 36 | #include <linux/pci.h> |
37 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
38 | #include <linux/sched.h> | 38 | #include <linux/sched.h> |
39 | #include <linux/slab.h> | ||
39 | #include <asm/io.h> | 40 | #include <asm/io.h> |
40 | #include <rdma/ib_mad.h> | 41 | #include <rdma/ib_mad.h> |
41 | 42 | ||
diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c index d9f4735c2b37..18ee3fa4b88c 100644 --- a/drivers/infiniband/hw/mthca/mthca_cq.c +++ b/drivers/infiniband/hw/mthca/mthca_cq.c | |||
@@ -34,6 +34,7 @@ | |||
34 | * SOFTWARE. | 34 | * SOFTWARE. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/gfp.h> | ||
37 | #include <linux/hardirq.h> | 38 | #include <linux/hardirq.h> |
38 | #include <linux/sched.h> | 39 | #include <linux/sched.h> |
39 | 40 | ||
diff --git a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c index 8c31fa36e95e..9388164b6053 100644 --- a/drivers/infiniband/hw/mthca/mthca_eq.c +++ b/drivers/infiniband/hw/mthca/mthca_eq.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
36 | #include <linux/pci.h> | 36 | #include <linux/pci.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include "mthca_dev.h" | 39 | #include "mthca_dev.h" |
39 | #include "mthca_cmd.h" | 40 | #include "mthca_cmd.h" |
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index b01b28987874..5eee6665919a 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
38 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
40 | #include <linux/gfp.h> | ||
40 | 41 | ||
41 | #include "mthca_dev.h" | 42 | #include "mthca_dev.h" |
42 | #include "mthca_config_reg.h" | 43 | #include "mthca_config_reg.h" |
diff --git a/drivers/infiniband/hw/mthca/mthca_mcg.c b/drivers/infiniband/hw/mthca/mthca_mcg.c index d4c81053e439..515790a606e6 100644 --- a/drivers/infiniband/hw/mthca/mthca_mcg.c +++ b/drivers/infiniband/hw/mthca/mthca_mcg.c | |||
@@ -31,7 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/string.h> | 33 | #include <linux/string.h> |
34 | #include <linux/slab.h> | 34 | #include <linux/gfp.h> |
35 | 35 | ||
36 | #include "mthca_dev.h" | 36 | #include "mthca_dev.h" |
37 | #include "mthca_cmd.h" | 37 | #include "mthca_cmd.h" |
diff --git a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniband/hw/mthca/mthca_memfree.c index 1f7d1a29d2a8..8c2a83732b5d 100644 --- a/drivers/infiniband/hw/mthca/mthca_memfree.c +++ b/drivers/infiniband/hw/mthca/mthca_memfree.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/mm.h> | 35 | #include <linux/mm.h> |
36 | #include <linux/scatterlist.h> | 36 | #include <linux/scatterlist.h> |
37 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include <asm/page.h> | 40 | #include <asm/page.h> |
40 | 41 | ||
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index bcf7a4014820..f080a784bc79 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/drivers/infiniband/hw/mthca/mthca_provider.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <rdma/ib_user_verbs.h> | 39 | #include <rdma/ib_user_verbs.h> |
40 | 40 | ||
41 | #include <linux/sched.h> | 41 | #include <linux/sched.h> |
42 | #include <linux/slab.h> | ||
42 | #include <linux/mm.h> | 43 | #include <linux/mm.h> |
43 | 44 | ||
44 | #include "mthca_dev.h" | 45 | #include "mthca_dev.h" |
diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c index 4272c52e38a4..de7b9d7166f3 100644 --- a/drivers/infiniband/hw/nes/nes.c +++ b/drivers/infiniband/hw/nes/nes.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/init.h> | 44 | #include <linux/init.h> |
45 | #include <linux/if_arp.h> | 45 | #include <linux/if_arp.h> |
46 | #include <linux/highmem.h> | 46 | #include <linux/highmem.h> |
47 | #include <linux/slab.h> | ||
47 | #include <asm/io.h> | 48 | #include <asm/io.h> |
48 | #include <asm/irq.h> | 49 | #include <asm/irq.h> |
49 | #include <asm/byteorder.h> | 50 | #include <asm/byteorder.h> |
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 2a49ee40b520..986d6f32dded 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <linux/list.h> | 53 | #include <linux/list.h> |
54 | #include <linux/threads.h> | 54 | #include <linux/threads.h> |
55 | #include <linux/highmem.h> | 55 | #include <linux/highmem.h> |
56 | #include <linux/slab.h> | ||
56 | #include <net/arp.h> | 57 | #include <net/arp.h> |
57 | #include <net/neighbour.h> | 58 | #include <net/neighbour.h> |
58 | #include <net/route.h> | 59 | #include <net/route.h> |
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index 925075557dc2..c36a3f514929 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/tcp.h> | 39 | #include <linux/tcp.h> |
40 | #include <linux/if_vlan.h> | 40 | #include <linux/if_vlan.h> |
41 | #include <linux/inet_lro.h> | 41 | #include <linux/inet_lro.h> |
42 | #include <linux/slab.h> | ||
42 | 43 | ||
43 | #include "nes.h" | 44 | #include "nes.h" |
44 | 45 | ||
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index ce9ef6bc865c..65369d3fad81 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/if_arp.h> | 40 | #include <linux/if_arp.h> |
41 | #include <linux/if_vlan.h> | 41 | #include <linux/if_vlan.h> |
42 | #include <linux/ethtool.h> | 42 | #include <linux/ethtool.h> |
43 | #include <linux/slab.h> | ||
43 | #include <net/tcp.h> | 44 | #include <net/tcp.h> |
44 | 45 | ||
45 | #include <net/inet_common.h> | 46 | #include <net/inet_common.h> |
diff --git a/drivers/infiniband/hw/nes/nes_utils.c b/drivers/infiniband/hw/nes/nes_utils.c index 729d525c5b70..186623d86959 100644 --- a/drivers/infiniband/hw/nes/nes_utils.c +++ b/drivers/infiniband/hw/nes/nes_utils.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/ethtool.h> | 38 | #include <linux/ethtool.h> |
39 | #include <linux/mii.h> | 39 | #include <linux/mii.h> |
40 | #include <linux/if_vlan.h> | 40 | #include <linux/if_vlan.h> |
41 | #include <linux/slab.h> | ||
41 | #include <linux/crc32.h> | 42 | #include <linux/crc32.h> |
42 | #include <linux/in.h> | 43 | #include <linux/in.h> |
43 | #include <linux/ip.h> | 44 | #include <linux/ip.h> |
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 69928296d74b..e54f312e4bdc 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/moduleparam.h> | 35 | #include <linux/moduleparam.h> |
36 | #include <linux/random.h> | 36 | #include <linux/random.h> |
37 | #include <linux/highmem.h> | 37 | #include <linux/highmem.h> |
38 | #include <linux/slab.h> | ||
38 | #include <asm/byteorder.h> | 39 | #include <asm/byteorder.h> |
39 | 40 | ||
40 | #include <rdma/ib_verbs.h> | 41 | #include <rdma/ib_verbs.h> |
@@ -2820,11 +2821,10 @@ static int nes_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
2820 | attr->cap.max_send_wr = nesqp->hwqp.sq_size; | 2821 | attr->cap.max_send_wr = nesqp->hwqp.sq_size; |
2821 | attr->cap.max_recv_wr = nesqp->hwqp.rq_size; | 2822 | attr->cap.max_recv_wr = nesqp->hwqp.rq_size; |
2822 | attr->cap.max_recv_sge = 1; | 2823 | attr->cap.max_recv_sge = 1; |
2823 | if (nes_drv_opt & NES_DRV_OPT_NO_INLINE_DATA) { | 2824 | if (nes_drv_opt & NES_DRV_OPT_NO_INLINE_DATA) |
2824 | init_attr->cap.max_inline_data = 0; | 2825 | attr->cap.max_inline_data = 0; |
2825 | } else { | 2826 | else |
2826 | init_attr->cap.max_inline_data = 64; | 2827 | attr->cap.max_inline_data = 64; |
2827 | } | ||
2828 | 2828 | ||
2829 | init_attr->event_handler = nesqp->ibqp.event_handler; | 2829 | init_attr->event_handler = nesqp->ibqp.event_handler; |
2830 | init_attr->qp_context = nesqp->ibqp.qp_context; | 2830 | init_attr->qp_context = nesqp->ibqp.qp_context; |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index bc658373ad55..bb1004114dec 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <net/icmp.h> | 35 | #include <net/icmp.h> |
36 | #include <linux/icmpv6.h> | 36 | #include <linux/icmpv6.h> |
37 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
38 | #include <linux/slab.h> | ||
38 | #include <linux/vmalloc.h> | 39 | #include <linux/vmalloc.h> |
39 | 40 | ||
40 | #include "ipoib.h" | 41 | #include "ipoib.h" |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_fs.c b/drivers/infiniband/ulp/ipoib/ipoib_fs.c index 961c585da216..86eae229dc49 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_fs.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_fs.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include <linux/err.h> | 33 | #include <linux/err.h> |
34 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | struct file_operations; | 37 | struct file_operations; |
37 | 38 | ||
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index 5df40b128f81..ec6b4fbe25e4 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
37 | #include <linux/dma-mapping.h> | 37 | #include <linux/dma-mapping.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include <linux/ip.h> | 40 | #include <linux/ip.h> |
40 | #include <linux/tcp.h> | 41 | #include <linux/tcp.h> |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index c8a0f7dab5b0..3871ac663554 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/inetdevice.h> | 40 | #include <linux/inetdevice.h> |
41 | #include <linux/delay.h> | 41 | #include <linux/delay.h> |
42 | #include <linux/completion.h> | 42 | #include <linux/completion.h> |
43 | #include <linux/slab.h> | ||
43 | 44 | ||
44 | #include <net/dst.h> | 45 | #include <net/dst.h> |
45 | 46 | ||
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c index 68325119f740..049a997caff3 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c | |||
@@ -31,6 +31,8 @@ | |||
31 | * SOFTWARE. | 31 | * SOFTWARE. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/slab.h> | ||
35 | |||
34 | #include "ipoib.h" | 36 | #include "ipoib.h" |
35 | 37 | ||
36 | int ipoib_mcast_attach(struct net_device *dev, u16 mlid, union ib_gid *mgid, int set_qkey) | 38 | int ipoib_mcast_attach(struct net_device *dev, u16 mlid, union ib_gid *mgid, int set_qkey) |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c index e3bf00d8cd25..d7e9740c7248 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | 34 | ||
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/slab.h> | ||
37 | #include <linux/seq_file.h> | 36 | #include <linux/seq_file.h> |
38 | 37 | ||
39 | #include <asm/uaccess.h> | 38 | #include <asm/uaccess.h> |
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index e78af36d3a0e..93399dff0c6f 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include <linux/net.h> | 56 | #include <linux/net.h> |
57 | #include <linux/scatterlist.h> | 57 | #include <linux/scatterlist.h> |
58 | #include <linux/delay.h> | 58 | #include <linux/delay.h> |
59 | #include <linux/slab.h> | ||
59 | 60 | ||
60 | #include <net/sock.h> | 61 | #include <net/sock.h> |
61 | 62 | ||
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index 308d17bb5146..b89d76b39a13 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
36 | 37 | ||
37 | #include "iscsi_iser.h" | 38 | #include "iscsi_iser.h" |
diff --git a/drivers/input/ff-core.c b/drivers/input/ff-core.c index b2f07aa1604b..03078c08309a 100644 --- a/drivers/input/ff-core.c +++ b/drivers/input/ff-core.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/mutex.h> | 30 | #include <linux/mutex.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | /* | 34 | /* |
34 | * Check that the effect_id is a valid effect and whether the user | 35 | * Check that the effect_id is a valid effect and whether the user |
diff --git a/drivers/input/ff-memless.c b/drivers/input/ff-memless.c index f967008f332e..1d881c96ba8f 100644 --- a/drivers/input/ff-memless.c +++ b/drivers/input/ff-memless.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #define debug(format, arg...) pr_debug("ff-memless: " format "\n", ## arg) | 26 | #define debug(format, arg...) pr_debug("ff-memless: " format "\n", ## arg) |
27 | 27 | ||
28 | #include <linux/slab.h> | ||
28 | #include <linux/input.h> | 29 | #include <linux/input.h> |
29 | #include <linux/module.h> | 30 | #include <linux/module.h> |
30 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
diff --git a/drivers/input/gameport/lightning.c b/drivers/input/gameport/lightning.c index 06ad36ed3483..85d6ee09f11f 100644 --- a/drivers/input/gameport/lightning.c +++ b/drivers/input/gameport/lightning.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/gameport.h> | 36 | #include <linux/gameport.h> |
37 | #include <linux/slab.h> | ||
38 | 37 | ||
39 | #define L4_PORT 0x201 | 38 | #define L4_PORT 0x201 |
40 | #define L4_SELECT_ANALOG 0xa4 | 39 | #define L4_SELECT_ANALOG 0xa4 |
diff --git a/drivers/input/input-polldev.c b/drivers/input/input-polldev.c index 291d9393d359..10c9b0a845f0 100644 --- a/drivers/input/input-polldev.c +++ b/drivers/input/input-polldev.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/jiffies.h> | 11 | #include <linux/jiffies.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
13 | #include <linux/input-polldev.h> | 14 | #include <linux/input-polldev.h> |
14 | 15 | ||
diff --git a/drivers/input/input.c b/drivers/input/input.c index e2aad0a51826..afd4e2b7658c 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/input.h> | 15 | #include <linux/input.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/random.h> | 18 | #include <linux/random.h> |
18 | #include <linux/major.h> | 19 | #include <linux/major.h> |
19 | #include <linux/proc_fs.h> | 20 | #include <linux/proc_fs.h> |
diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c index 523959484753..8e7de5c7754f 100644 --- a/drivers/input/joystick/db9.c +++ b/drivers/input/joystick/db9.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/parport.h> | 36 | #include <linux/parport.h> |
37 | #include <linux/input.h> | 37 | #include <linux/input.h> |
38 | #include <linux/mutex.h> | 38 | #include <linux/mutex.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>"); | 41 | MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>"); |
41 | MODULE_DESCRIPTION("Atari, Amstrad, Commodore, Amiga, Sega, etc. joystick driver"); | 42 | MODULE_DESCRIPTION("Atari, Amstrad, Commodore, Amiga, Sega, etc. joystick driver"); |
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c index 7a55714a1486..fbd62abb66f9 100644 --- a/drivers/input/joystick/gamecon.c +++ b/drivers/input/joystick/gamecon.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/parport.h> | 39 | #include <linux/parport.h> |
40 | #include <linux/input.h> | 40 | #include <linux/input.h> |
41 | #include <linux/mutex.h> | 41 | #include <linux/mutex.h> |
42 | #include <linux/slab.h> | ||
42 | 43 | ||
43 | MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>"); | 44 | MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>"); |
44 | MODULE_DESCRIPTION("NES, SNES, N64, MultiSystem, PSX gamepad driver"); | 45 | MODULE_DESCRIPTION("NES, SNES, N64, MultiSystem, PSX gamepad driver"); |
diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c index b6f859869540..d53b9e900234 100644 --- a/drivers/input/joystick/turbografx.c +++ b/drivers/input/joystick/turbografx.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/init.h> | 36 | #include <linux/init.h> |
37 | #include <linux/mutex.h> | 37 | #include <linux/mutex.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>"); | 40 | MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>"); |
40 | MODULE_DESCRIPTION("TurboGraFX parallel port interface driver"); | 41 | MODULE_DESCRIPTION("TurboGraFX parallel port interface driver"); |
diff --git a/drivers/input/keyboard/adp5520-keys.c b/drivers/input/keyboard/adp5520-keys.c index a7ba27fb4109..3db8006dac3a 100644 --- a/drivers/input/keyboard/adp5520-keys.c +++ b/drivers/input/keyboard/adp5520-keys.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/input.h> | 13 | #include <linux/input.h> |
14 | #include <linux/mfd/adp5520.h> | 14 | #include <linux/mfd/adp5520.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | struct adp5520_keys { | 17 | struct adp5520_keys { |
17 | struct input_dev *input; | 18 | struct input_dev *input; |
diff --git a/drivers/input/keyboard/adp5588-keys.c b/drivers/input/keyboard/adp5588-keys.c index b5142d2d5112..4771ab172b59 100644 --- a/drivers/input/keyboard/adp5588-keys.c +++ b/drivers/input/keyboard/adp5588-keys.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/input.h> | 20 | #include <linux/input.h> |
21 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <linux/i2c/adp5588.h> | 24 | #include <linux/i2c/adp5588.h> |
24 | 25 | ||
diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c index 593c052416b9..7d989603f875 100644 --- a/drivers/input/keyboard/bf54x-keys.c +++ b/drivers/input/keyboard/bf54x-keys.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/fs.h> | 34 | #include <linux/fs.h> |
35 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
36 | #include <linux/irq.h> | 36 | #include <linux/irq.h> |
37 | #include <linux/slab.h> | ||
37 | #include <linux/sched.h> | 38 | #include <linux/sched.h> |
38 | #include <linux/pm.h> | 39 | #include <linux/pm.h> |
39 | #include <linux/sysctl.h> | 40 | #include <linux/sysctl.h> |
diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c index d410d7a52f1d..a91ee941b5c1 100644 --- a/drivers/input/keyboard/davinci_keyscan.c +++ b/drivers/input/keyboard/davinci_keyscan.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
35 | 36 | ||
diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c index bd25a3af1664..c8242dd190d0 100644 --- a/drivers/input/keyboard/ep93xx_keypad.c +++ b/drivers/input/keyboard/ep93xx_keypad.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/input/matrix_keypad.h> | 27 | #include <linux/input/matrix_keypad.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
30 | #include <mach/ep93xx_keypad.h> | 31 | #include <mach/ep93xx_keypad.h> |
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 2b708aa85553..b8213fd13c3f 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/sysctl.h> | 20 | #include <linux/sysctl.h> |
20 | #include <linux/proc_fs.h> | 21 | #include <linux/proc_fs.h> |
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index 2ee5b798024d..d92c15c39e68 100644 --- a/drivers/input/keyboard/imx_keypad.c +++ b/drivers/input/keyboard/imx_keypad.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
25 | 26 | ||
26 | /* | 27 | /* |
diff --git a/drivers/input/keyboard/jornada680_kbd.c b/drivers/input/keyboard/jornada680_kbd.c index 781fc6102860..5fc976dbce0b 100644 --- a/drivers/input/keyboard/jornada680_kbd.c +++ b/drivers/input/keyboard/jornada680_kbd.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include <asm/delay.h> | 29 | #include <asm/delay.h> |
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
diff --git a/drivers/input/keyboard/jornada720_kbd.c b/drivers/input/keyboard/jornada720_kbd.c index 4e016d823069..2cd3e1d56ea4 100644 --- a/drivers/input/keyboard/jornada720_kbd.c +++ b/drivers/input/keyboard/jornada720_kbd.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <mach/jornada720.h> | 28 | #include <mach/jornada720.h> |
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c index 574eda2a4957..60ac4684f875 100644 --- a/drivers/input/keyboard/lm8323.c +++ b/drivers/input/keyboard/lm8323.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/input.h> | 31 | #include <linux/input.h> |
32 | #include <linux/leds.h> | 32 | #include <linux/leds.h> |
33 | #include <linux/i2c/lm8323.h> | 33 | #include <linux/i2c/lm8323.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | /* Commands to send to the chip. */ | 36 | /* Commands to send to the chip. */ |
36 | #define LM8323_CMD_READ_ID 0x80 /* Read chip ID. */ | 37 | #define LM8323_CMD_READ_ID 0x80 /* Read chip ID. */ |
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c index d3c8b61a941d..ffc25cfcef7a 100644 --- a/drivers/input/keyboard/matrix_keypad.c +++ b/drivers/input/keyboard/matrix_keypad.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/input/matrix_keypad.h> | 24 | #include <linux/input/matrix_keypad.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | struct matrix_keypad { | 27 | struct matrix_keypad { |
27 | const struct matrix_keypad_platform_data *pdata; | 28 | const struct matrix_keypad_platform_data *pdata; |
diff --git a/drivers/input/keyboard/max7359_keypad.c b/drivers/input/keyboard/max7359_keypad.c index 3b5b948eba39..7fc8185e5c1b 100644 --- a/drivers/input/keyboard/max7359_keypad.c +++ b/drivers/input/keyboard/max7359_keypad.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
19 | #include <linux/input.h> | 20 | #include <linux/input.h> |
20 | #include <linux/input/matrix_keypad.h> | 21 | #include <linux/input/matrix_keypad.h> |
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index 1a494d505431..a72e61ddca91 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/platform_device.h> | 34 | #include <linux/platform_device.h> |
35 | #include <linux/mutex.h> | 35 | #include <linux/mutex.h> |
36 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
37 | #include <linux/slab.h> | ||
37 | #include <mach/gpio.h> | 38 | #include <mach/gpio.h> |
38 | #include <plat/keypad.h> | 39 | #include <plat/keypad.h> |
39 | #include <plat/menelaus.h> | 40 | #include <plat/menelaus.h> |
diff --git a/drivers/input/keyboard/opencores-kbd.c b/drivers/input/keyboard/opencores-kbd.c index 78cccddbf551..1f1a5563f60a 100644 --- a/drivers/input/keyboard/opencores-kbd.c +++ b/drivers/input/keyboard/opencores-kbd.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | struct opencores_kbd { | 19 | struct opencores_kbd { |
19 | struct input_dev *input; | 20 | struct input_dev *input; |
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index 79cd3e9fdf2e..0e53b3bc39af 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/clk.h> | 26 | #include <linux/clk.h> |
27 | #include <linux/err.h> | 27 | #include <linux/err.h> |
28 | #include <linux/input/matrix_keypad.h> | 28 | #include <linux/input/matrix_keypad.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
diff --git a/drivers/input/keyboard/pxa930_rotary.c b/drivers/input/keyboard/pxa930_rotary.c index 95fbba470e65..b7123a44b6ec 100644 --- a/drivers/input/keyboard/pxa930_rotary.c +++ b/drivers/input/keyboard/pxa930_rotary.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/input.h> | 13 | #include <linux/input.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #include <mach/pxa930_rotary.h> | 18 | #include <mach/pxa930_rotary.h> |
18 | 19 | ||
diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c index 854e2035cd6e..d7dafd9425b6 100644 --- a/drivers/input/keyboard/sh_keysc.c +++ b/drivers/input/keyboard/sh_keysc.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/bitmap.h> | 22 | #include <linux/bitmap.h> |
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | static const struct { | 27 | static const struct { |
27 | unsigned char kymd, keyout, keyin; | 28 | unsigned char kymd, keyout, keyin; |
diff --git a/drivers/input/keyboard/tosakbd.c b/drivers/input/keyboard/tosakbd.c index 42cb3faf7336..3910f269cfc8 100644 --- a/drivers/input/keyboard/tosakbd.c +++ b/drivers/input/keyboard/tosakbd.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/input.h> | 18 | #include <linux/input.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <mach/gpio.h> | 23 | #include <mach/gpio.h> |
23 | #include <mach/tosa.h> | 24 | #include <mach/tosa.h> |
diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c index 21d6184efa96..7aa59e07b689 100644 --- a/drivers/input/keyboard/twl4030_keypad.c +++ b/drivers/input/keyboard/twl4030_keypad.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/input.h> | 32 | #include <linux/input.h> |
33 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
34 | #include <linux/i2c/twl.h> | 34 | #include <linux/i2c/twl.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | 37 | ||
37 | /* | 38 | /* |
diff --git a/drivers/input/keyboard/w90p910_keypad.c b/drivers/input/keyboard/w90p910_keypad.c index 6032def03707..4ef764cc493c 100644 --- a/drivers/input/keyboard/w90p910_keypad.c +++ b/drivers/input/keyboard/w90p910_keypad.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/err.h> | 20 | #include <linux/err.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <mach/w90p910_keypad.h> | 24 | #include <mach/w90p910_keypad.h> |
24 | 25 | ||
diff --git a/drivers/input/misc/88pm860x_onkey.c b/drivers/input/misc/88pm860x_onkey.c index 69a48e8701b9..40dabd8487b5 100644 --- a/drivers/input/misc/88pm860x_onkey.c +++ b/drivers/input/misc/88pm860x_onkey.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/input.h> | 25 | #include <linux/input.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/mfd/88pm860x.h> | 27 | #include <linux/mfd/88pm860x.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #define PM8607_WAKEUP 0x0b | 30 | #define PM8607_WAKEUP 0x0b |
30 | 31 | ||
diff --git a/drivers/input/misc/ati_remote2.c b/drivers/input/misc/ati_remote2.c index 15be5430bc6d..2124b99378bb 100644 --- a/drivers/input/misc/ati_remote2.c +++ b/drivers/input/misc/ati_remote2.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/usb/input.h> | 12 | #include <linux/usb/input.h> |
13 | #include <linux/slab.h> | ||
13 | 14 | ||
14 | #define DRIVER_DESC "ATI/Philips USB RF remote driver" | 15 | #define DRIVER_DESC "ATI/Philips USB RF remote driver" |
15 | #define DRIVER_VERSION "0.3" | 16 | #define DRIVER_VERSION "0.3" |
diff --git a/drivers/input/misc/bfin_rotary.c b/drivers/input/misc/bfin_rotary.c index 61d10177fa83..4f72bdd69410 100644 --- a/drivers/input/misc/bfin_rotary.c +++ b/drivers/input/misc/bfin_rotary.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/pm.h> | 13 | #include <linux/pm.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/input.h> | 15 | #include <linux/input.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #include <asm/portmux.h> | 18 | #include <asm/portmux.h> |
18 | #include <asm/bfin_rotary.h> | 19 | #include <asm/bfin_rotary.h> |
diff --git a/drivers/input/misc/cobalt_btns.c b/drivers/input/misc/cobalt_btns.c index ee73d7219c92..fd8407a29631 100644 --- a/drivers/input/misc/cobalt_btns.c +++ b/drivers/input/misc/cobalt_btns.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/ioport.h> | 22 | #include <linux/ioport.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #define BUTTONS_POLL_INTERVAL 30 /* msec */ | 27 | #define BUTTONS_POLL_INTERVAL 30 /* msec */ |
27 | #define BUTTONS_COUNT_THRESHOLD 3 | 28 | #define BUTTONS_COUNT_THRESHOLD 3 |
diff --git a/drivers/input/misc/dm355evm_keys.c b/drivers/input/misc/dm355evm_keys.c index 766c06911f41..19af682c24fb 100644 --- a/drivers/input/misc/dm355evm_keys.c +++ b/drivers/input/misc/dm355evm_keys.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/input.h> | 14 | #include <linux/input.h> |
14 | #include <linux/input/sparse-keymap.h> | 15 | #include <linux/input/sparse-keymap.h> |
15 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
diff --git a/drivers/input/misc/pcap_keys.c b/drivers/input/misc/pcap_keys.c index 7ea969347ca9..99335c286250 100644 --- a/drivers/input/misc/pcap_keys.c +++ b/drivers/input/misc/pcap_keys.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/input.h> | 18 | #include <linux/input.h> |
19 | #include <linux/mfd/ezx-pcap.h> | 19 | #include <linux/mfd/ezx-pcap.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | struct pcap_keys { | 22 | struct pcap_keys { |
22 | struct pcap_chip *pcap; | 23 | struct pcap_chip *pcap; |
diff --git a/drivers/input/misc/pcf50633-input.c b/drivers/input/misc/pcf50633-input.c index 008de0c5834b..95562735728d 100644 --- a/drivers/input/misc/pcf50633-input.c +++ b/drivers/input/misc/pcf50633-input.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/input.h> | 22 | #include <linux/input.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <linux/mfd/pcf50633/core.h> | 25 | #include <linux/mfd/pcf50633/core.h> |
25 | 26 | ||
diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c index 4ae07935985e..1f8e0108962e 100644 --- a/drivers/input/misc/rotary_encoder.c +++ b/drivers/input/misc/rotary_encoder.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/rotary_encoder.h> | 24 | #include <linux/rotary_encoder.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #define DRV_NAME "rotary-encoder" | 27 | #define DRV_NAME "rotary-encoder" |
27 | 28 | ||
diff --git a/drivers/input/misc/sgi_btns.c b/drivers/input/misc/sgi_btns.c index be3a15f5b25d..1a80c0dab83b 100644 --- a/drivers/input/misc/sgi_btns.c +++ b/drivers/input/misc/sgi_btns.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/ioport.h> | 22 | #include <linux/ioport.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #ifdef CONFIG_SGI_IP22 | 27 | #ifdef CONFIG_SGI_IP22 |
27 | #include <asm/sgi/ioc.h> | 28 | #include <asm/sgi/ioc.h> |
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c index b064419b90a2..0d45422f8095 100644 --- a/drivers/input/misc/sparcspkr.c +++ b/drivers/input/misc/sparcspkr.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/input.h> | 10 | #include <linux/input.h> |
11 | #include <linux/of_device.h> | 11 | #include <linux/of_device.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | #include <asm/io.h> | 14 | #include <asm/io.h> |
14 | 15 | ||
diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c index 2fb79e064da3..fee9eac8e04a 100644 --- a/drivers/input/misc/twl4030-vibra.c +++ b/drivers/input/misc/twl4030-vibra.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/i2c/twl.h> | 30 | #include <linux/i2c/twl.h> |
31 | #include <linux/mfd/twl4030-codec.h> | 31 | #include <linux/mfd/twl4030-codec.h> |
32 | #include <linux/input.h> | 32 | #include <linux/input.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | /* MODULE ID2 */ | 35 | /* MODULE ID2 */ |
35 | #define LEDEN 0x00 | 36 | #define LEDEN 0x00 |
diff --git a/drivers/input/misc/winbond-cir.c b/drivers/input/misc/winbond-cir.c index 9c155a43abc2..64f1de7960c6 100644 --- a/drivers/input/misc/winbond-cir.c +++ b/drivers/input/misc/winbond-cir.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include <linux/io.h> | 56 | #include <linux/io.h> |
57 | #include <linux/bitrev.h> | 57 | #include <linux/bitrev.h> |
58 | #include <linux/bitops.h> | 58 | #include <linux/bitops.h> |
59 | #include <linux/slab.h> | ||
59 | 60 | ||
60 | #define DRVNAME "winbond-cir" | 61 | #define DRVNAME "winbond-cir" |
61 | 62 | ||
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index c0afb71a3a6d..04d5a4a3181f 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/preempt.h> | 30 | #include <linux/preempt.h> |
31 | #include <linux/string.h> | 31 | #include <linux/string.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/types.h> | 33 | #include <linux/types.h> |
33 | #include <linux/platform_device.h> | 34 | #include <linux/platform_device.h> |
34 | #include <linux/leds.h> | 35 | #include <linux/leds.h> |
diff --git a/drivers/input/misc/wm831x-on.c b/drivers/input/misc/wm831x-on.c index 1e54bce72db5..c3d7ba5f5b47 100644 --- a/drivers/input/misc/wm831x-on.c +++ b/drivers/input/misc/wm831x-on.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
23 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
24 | #include <linux/input.h> | 25 | #include <linux/input.h> |
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 7490f1da4a53..99d58764ef03 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * the Free Software Foundation. | 15 | * the Free Software Foundation. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/slab.h> | ||
18 | #include <linux/input.h> | 19 | #include <linux/input.h> |
19 | #include <linux/serio.h> | 20 | #include <linux/serio.h> |
20 | #include <linux/libps2.h> | 21 | #include <linux/libps2.h> |
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index b27684f267bf..a138b5da79f9 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/input.h> | 16 | #include <linux/input.h> |
16 | #include <linux/serio.h> | 17 | #include <linux/serio.h> |
diff --git a/drivers/input/mouse/hgpk.c b/drivers/input/mouse/hgpk.c index 9169d1591c1f..08d66d820d2b 100644 --- a/drivers/input/mouse/hgpk.c +++ b/drivers/input/mouse/hgpk.c | |||
@@ -30,6 +30,7 @@ | |||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #define DEBUG | 32 | #define DEBUG |
33 | #include <linux/slab.h> | ||
33 | #include <linux/input.h> | 34 | #include <linux/input.h> |
34 | #include <linux/serio.h> | 35 | #include <linux/serio.h> |
35 | #include <linux/libps2.h> | 36 | #include <linux/libps2.h> |
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c index 7c1d7d420ae3..c31ad11df6bb 100644 --- a/drivers/input/mouse/lifebook.c +++ b/drivers/input/mouse/lifebook.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/serio.h> | 16 | #include <linux/serio.h> |
17 | #include <linux/libps2.h> | 17 | #include <linux/libps2.h> |
18 | #include <linux/dmi.h> | 18 | #include <linux/dmi.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include "psmouse.h" | 21 | #include "psmouse.h" |
21 | #include "lifebook.h" | 22 | #include "lifebook.h" |
diff --git a/drivers/input/mouse/pxa930_trkball.c b/drivers/input/mouse/pxa930_trkball.c index 1e827ad0afbe..943cfec15665 100644 --- a/drivers/input/mouse/pxa930_trkball.c +++ b/drivers/input/mouse/pxa930_trkball.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <mach/pxa930_trkball.h> | 24 | #include <mach/pxa930_trkball.h> |
diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c index 81a6b81cb2fe..1242775fee19 100644 --- a/drivers/input/mouse/sentelic.c +++ b/drivers/input/mouse/sentelic.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/libps2.h> | 26 | #include <linux/libps2.h> |
27 | #include <linux/serio.h> | 27 | #include <linux/serio.h> |
28 | #include <linux/jiffies.h> | 28 | #include <linux/jiffies.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include "psmouse.h" | 31 | #include "psmouse.h" |
31 | #include "sentelic.h" | 32 | #include "sentelic.h" |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index d3f5243fa093..026df6010161 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/input.h> | 28 | #include <linux/input.h> |
29 | #include <linux/serio.h> | 29 | #include <linux/serio.h> |
30 | #include <linux/libps2.h> | 30 | #include <linux/libps2.h> |
31 | #include <linux/slab.h> | ||
31 | #include "psmouse.h" | 32 | #include "psmouse.h" |
32 | #include "synaptics.h" | 33 | #include "synaptics.h" |
33 | 34 | ||
diff --git a/drivers/input/mouse/synaptics_i2c.c b/drivers/input/mouse/synaptics_i2c.c index 9867dfe2a638..8291e7399ffa 100644 --- a/drivers/input/mouse/synaptics_i2c.c +++ b/drivers/input/mouse/synaptics_i2c.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/input.h> | 17 | #include <linux/input.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/workqueue.h> | 19 | #include <linux/workqueue.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #define DRIVER_NAME "synaptics_i2c" | 22 | #define DRIVER_NAME "synaptics_i2c" |
22 | /* maximum product id is 15 characters */ | 23 | /* maximum product id is 15 characters */ |
diff --git a/drivers/input/mouse/touchkit_ps2.c b/drivers/input/mouse/touchkit_ps2.c index 909431c31ab4..88121c59c3cc 100644 --- a/drivers/input/mouse/touchkit_ps2.c +++ b/drivers/input/mouse/touchkit_ps2.c | |||
@@ -26,7 +26,6 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/slab.h> | ||
30 | 29 | ||
31 | #include <linux/input.h> | 30 | #include <linux/input.h> |
32 | #include <linux/serio.h> | 31 | #include <linux/serio.h> |
diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c index 63d4a67830f2..0643e49ca603 100644 --- a/drivers/input/mouse/trackpoint.c +++ b/drivers/input/mouse/trackpoint.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * Trademarks are the property of their respective owners. | 8 | * Trademarks are the property of their respective owners. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/slab.h> | ||
11 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
12 | #include <linux/serio.h> | 13 | #include <linux/serio.h> |
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c index 320b7ca48bf8..7998560a1904 100644 --- a/drivers/input/serio/altera_ps2.c +++ b/drivers/input/serio/altera_ps2.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #define DRV_NAME "altera_ps2" | 23 | #define DRV_NAME "altera_ps2" |
23 | 24 | ||
diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c index b54452a8c771..6ee8f0ddad51 100644 --- a/drivers/input/serio/at32psif.c +++ b/drivers/input/serio/at32psif.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | /* PSIF register offsets */ | 23 | /* PSIF register offsets */ |
23 | #define PSIF_CR 0x00 | 24 | #define PSIF_CR 0x00 |
diff --git a/drivers/input/serio/ct82c710.c b/drivers/input/serio/ct82c710.c index d1380fc72cc6..4a3084695c00 100644 --- a/drivers/input/serio/ct82c710.c +++ b/drivers/input/serio/ct82c710.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/errno.h> | 35 | #include <linux/errno.h> |
36 | #include <linux/err.h> | 36 | #include <linux/err.h> |
37 | #include <linux/platform_device.h> | 37 | #include <linux/platform_device.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include <asm/io.h> | 40 | #include <asm/io.h> |
40 | 41 | ||
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index 06addfa7cc47..3c287dd879d3 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/serio.h> | 28 | #include <linux/serio.h> |
28 | #include <linux/input.h> | 29 | #include <linux/input.h> |
29 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c index 6cd03ebaf5fb..c92f4edfee7b 100644 --- a/drivers/input/serio/hil_mlc.c +++ b/drivers/input/serio/hil_mlc.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/module.h> | 58 | #include <linux/module.h> |
59 | #include <linux/init.h> | 59 | #include <linux/init.h> |
60 | #include <linux/interrupt.h> | 60 | #include <linux/interrupt.h> |
61 | #include <linux/slab.h> | ||
61 | #include <linux/timer.h> | 62 | #include <linux/timer.h> |
62 | #include <linux/list.h> | 63 | #include <linux/list.h> |
63 | 64 | ||
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 9302ba0e48f8..577688b5b951 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/rcupdate.h> | 21 | #include <linux/rcupdate.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/i8042.h> | 23 | #include <linux/i8042.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
26 | 27 | ||
diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c index f3876acc3e83..980af94ba9c8 100644 --- a/drivers/input/serio/libps2.c +++ b/drivers/input/serio/libps2.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
19 | #include <linux/input.h> | 18 | #include <linux/input.h> |
20 | #include <linux/serio.h> | 19 | #include <linux/serio.h> |
diff --git a/drivers/input/serio/parkbd.c b/drivers/input/serio/parkbd.c index b089977e0ef9..26b45936f9fd 100644 --- a/drivers/input/serio/parkbd.c +++ b/drivers/input/serio/parkbd.c | |||
@@ -46,6 +46,7 @@ | |||
46 | 46 | ||
47 | #include <linux/module.h> | 47 | #include <linux/module.h> |
48 | #include <linux/parport.h> | 48 | #include <linux/parport.h> |
49 | #include <linux/slab.h> | ||
49 | #include <linux/init.h> | 50 | #include <linux/init.h> |
50 | #include <linux/serio.h> | 51 | #include <linux/serio.h> |
51 | 52 | ||
diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c index 797314be7af2..43494742541c 100644 --- a/drivers/input/serio/pcips2.c +++ b/drivers/input/serio/pcips2.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/ioport.h> | 15 | #include <linux/ioport.h> |
16 | #include <linux/input.h> | 16 | #include <linux/input.h> |
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <linux/serio.h> | 20 | #include <linux/serio.h> |
20 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
diff --git a/drivers/input/serio/q40kbd.c b/drivers/input/serio/q40kbd.c index e36a0901646c..5eb84b3b67fb 100644 --- a/drivers/input/serio/q40kbd.c +++ b/drivers/input/serio/q40kbd.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/err.h> | 36 | #include <linux/err.h> |
37 | #include <linux/bitops.h> | 37 | #include <linux/bitops.h> |
38 | #include <linux/platform_device.h> | 38 | #include <linux/platform_device.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | #include <asm/io.h> | 41 | #include <asm/io.h> |
41 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
diff --git a/drivers/input/serio/rpckbd.c b/drivers/input/serio/rpckbd.c index ed045c99f84b..9da6fbcaaa7e 100644 --- a/drivers/input/serio/rpckbd.c +++ b/drivers/input/serio/rpckbd.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
35 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
36 | #include <linux/io.h> | 36 | #include <linux/io.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include <asm/irq.h> | 39 | #include <asm/irq.h> |
39 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index 8298e1f68234..f84f8e32e3f1 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/serio.h> | 19 | #include <linux/serio.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | #include <linux/list.h> | 24 | #include <linux/list.h> |
24 | #include <linux/io.h> | 25 | #include <linux/io.h> |
diff --git a/drivers/input/sparse-keymap.c b/drivers/input/sparse-keymap.c index e6bde55e5203..82ae18d29685 100644 --- a/drivers/input/sparse-keymap.c +++ b/drivers/input/sparse-keymap.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/input.h> | 16 | #include <linux/input.h> |
17 | #include <linux/input/sparse-keymap.h> | 17 | #include <linux/input/sparse-keymap.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | MODULE_AUTHOR("Dmitry Torokhov <dtor@mail.ru>"); | 20 | MODULE_AUTHOR("Dmitry Torokhov <dtor@mail.ru>"); |
20 | MODULE_DESCRIPTION("Generic support for sparse keymaps"); | 21 | MODULE_DESCRIPTION("Generic support for sparse keymaps"); |
diff --git a/drivers/input/touchscreen/88pm860x-ts.c b/drivers/input/touchscreen/88pm860x-ts.c index 286bb490a9f2..b3aebc2166ba 100644 --- a/drivers/input/touchscreen/88pm860x-ts.c +++ b/drivers/input/touchscreen/88pm860x-ts.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/i2c.h> | 14 | #include <linux/i2c.h> |
15 | #include <linux/input.h> | 15 | #include <linux/input.h> |
16 | #include <linux/mfd/88pm860x.h> | 16 | #include <linux/mfd/88pm860x.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #define MEAS_LEN (8) | 19 | #define MEAS_LEN (8) |
19 | #define ACCURATE_BIT (12) | 20 | #define ACCURATE_BIT (12) |
diff --git a/drivers/input/touchscreen/atmel-wm97xx.c b/drivers/input/touchscreen/atmel-wm97xx.c index a12242f77e23..fa8e56bd9094 100644 --- a/drivers/input/touchscreen/atmel-wm97xx.c +++ b/drivers/input/touchscreen/atmel-wm97xx.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #define AC97C_ICA 0x10 | 24 | #define AC97C_ICA 0x10 |
24 | #define AC97C_CBRHR 0x30 | 25 | #define AC97C_CBRHR 0x30 |
diff --git a/drivers/input/touchscreen/da9034-ts.c b/drivers/input/touchscreen/da9034-ts.c index 3ffd4c4b170c..2b72a5923c16 100644 --- a/drivers/input/touchscreen/da9034-ts.c +++ b/drivers/input/touchscreen/da9034-ts.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/input.h> | 19 | #include <linux/input.h> |
20 | #include <linux/workqueue.h> | 20 | #include <linux/workqueue.h> |
21 | #include <linux/mfd/da903x.h> | 21 | #include <linux/mfd/da903x.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #define DA9034_MANUAL_CTRL 0x50 | 24 | #define DA9034_MANUAL_CTRL 0x50 |
24 | #define DA9034_LDO_ADC_EN (1 << 4) | 25 | #define DA9034_LDO_ADC_EN (1 << 4) |
diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c index 9029bd3f34e5..204b8a1a601c 100644 --- a/drivers/input/touchscreen/eeti_ts.c +++ b/drivers/input/touchscreen/eeti_ts.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/timer.h> | 33 | #include <linux/timer.h> |
34 | #include <linux/gpio.h> | 34 | #include <linux/gpio.h> |
35 | #include <linux/input/eeti_ts.h> | 35 | #include <linux/input/eeti_ts.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | static int flip_x; | 38 | static int flip_x; |
38 | module_param(flip_x, bool, 0644); | 39 | module_param(flip_x, bool, 0644); |
diff --git a/drivers/input/touchscreen/jornada720_ts.c b/drivers/input/touchscreen/jornada720_ts.c index c8b7e8a45c4d..4b0a061811ff 100644 --- a/drivers/input/touchscreen/jornada720_ts.c +++ b/drivers/input/touchscreen/jornada720_ts.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/input.h> | 18 | #include <linux/input.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <mach/jornada720.h> | 24 | #include <mach/jornada720.h> |
diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c index be54fd639aca..c5bc62d85bb6 100644 --- a/drivers/input/touchscreen/mc13783_ts.c +++ b/drivers/input/touchscreen/mc13783_ts.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/input.h> | 18 | #include <linux/input.h> |
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | 22 | ||
22 | #define MC13783_TS_NAME "mc13783-ts" | 23 | #define MC13783_TS_NAME "mc13783-ts" |
diff --git a/drivers/input/touchscreen/mcs5000_ts.c b/drivers/input/touchscreen/mcs5000_ts.c index 4c28b89757f9..ce8ab0269f6f 100644 --- a/drivers/input/touchscreen/mcs5000_ts.c +++ b/drivers/input/touchscreen/mcs5000_ts.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/input.h> | 21 | #include <linux/input.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | /* Registers */ | 25 | /* Registers */ |
25 | #define MCS5000_TS_STATUS 0x00 | 26 | #define MCS5000_TS_STATUS 0x00 |
diff --git a/drivers/input/touchscreen/migor_ts.c b/drivers/input/touchscreen/migor_ts.c index 141dd584330e..defe5dd3627c 100644 --- a/drivers/input/touchscreen/migor_ts.c +++ b/drivers/input/touchscreen/migor_ts.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/input.h> | 24 | #include <linux/input.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/slab.h> | ||
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
27 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
28 | #include <linux/timer.h> | 29 | #include <linux/timer.h> |
diff --git a/drivers/input/touchscreen/pcap_ts.c b/drivers/input/touchscreen/pcap_ts.c index b79097e3028a..ea6ef16e59b4 100644 --- a/drivers/input/touchscreen/pcap_ts.c +++ b/drivers/input/touchscreen/pcap_ts.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
18 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
19 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c index 3755a47d053c..98a7d1279486 100644 --- a/drivers/input/touchscreen/s3c2410_ts.c +++ b/drivers/input/touchscreen/s3c2410_ts.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/gpio.h> | 29 | #include <linux/gpio.h> |
31 | #include <linux/input.h> | 30 | #include <linux/input.h> |
32 | #include <linux/init.h> | 31 | #include <linux/init.h> |
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index 89dcbe7b4b02..028a5363eea1 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/device.h> | 26 | #include <linux/device.h> |
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/suspend.h> | 28 | #include <linux/suspend.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/kthread.h> | 29 | #include <linux/kthread.h> |
31 | #include <linux/freezer.h> | 30 | #include <linux/freezer.h> |
32 | #include <linux/ucb1400.h> | 31 | #include <linux/ucb1400.h> |
diff --git a/drivers/input/touchscreen/w90p910_ts.c b/drivers/input/touchscreen/w90p910_ts.c index 6ccbdbbf33fe..cc18265be1a8 100644 --- a/drivers/input/touchscreen/w90p910_ts.c +++ b/drivers/input/touchscreen/w90p910_ts.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/clk.h> | 16 | #include <linux/clk.h> |
17 | #include <linux/input.h> | 17 | #include <linux/input.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | /* ADC controller bit defines */ | 21 | /* ADC controller bit defines */ |
21 | #define ADC_DELAY 0xf00 | 22 | #define ADC_DELAY 0xf00 |
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index f944918466e5..5109bf3dd858 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/wm97xx.h> | 48 | #include <linux/wm97xx.h> |
49 | #include <linux/uaccess.h> | 49 | #include <linux/uaccess.h> |
50 | #include <linux/io.h> | 50 | #include <linux/io.h> |
51 | #include <linux/slab.h> | ||
51 | 52 | ||
52 | #define TS_NAME "wm97xx" | 53 | #define TS_NAME "wm97xx" |
53 | #define WM_CORE_VERSION "1.00" | 54 | #define WM_CORE_VERSION "1.00" |
diff --git a/drivers/input/xen-kbdfront.c b/drivers/input/xen-kbdfront.c index d30436fee476..e14081675bb2 100644 --- a/drivers/input/xen-kbdfront.c +++ b/drivers/input/xen-kbdfront.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/input.h> | 23 | #include <linux/input.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <asm/xen/hypervisor.h> | 26 | #include <asm/xen/hypervisor.h> |
26 | 27 | ||
diff --git a/drivers/isdn/act2000/module.c b/drivers/isdn/act2000/module.c index f774e12bb64d..05ed72c4cf59 100644 --- a/drivers/isdn/act2000/module.c +++ b/drivers/isdn/act2000/module.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include "act2000_isa.h" | 16 | #include "act2000_isa.h" |
17 | #include "capi.h" | 17 | #include "capi.h" |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/init.h> | 20 | #include <linux/init.h> |
20 | 21 | ||
21 | static unsigned short act2000_isa_ports[] = | 22 | static unsigned short act2000_isa_ports[] = |
diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c index 8596bd1a4d26..2b83850997c3 100644 --- a/drivers/isdn/capi/capifs.c +++ b/drivers/isdn/capi/capifs.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
13 | #include <linux/mount.h> | 13 | #include <linux/mount.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/namei.h> | 15 | #include <linux/namei.h> |
15 | #include <linux/module.h> | 16 | #include <linux/module.h> |
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
diff --git a/drivers/isdn/capi/capilib.c b/drivers/isdn/capi/capilib.c index fcaa1241ee77..0b041df2108c 100644 --- a/drivers/isdn/capi/capilib.c +++ b/drivers/isdn/capi/capilib.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #include <linux/slab.h> | ||
2 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
3 | #include <linux/module.h> | 4 | #include <linux/module.h> |
4 | #include <linux/isdn/capilli.h> | 5 | #include <linux/isdn/capilli.h> |
diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c index 26626eead828..03c469e4451f 100644 --- a/drivers/isdn/capi/capiutil.c +++ b/drivers/isdn/capi/capiutil.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/isdn/capiutil.h> | 20 | #include <linux/isdn/capiutil.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | /* from CAPI2.0 DDK AVM Berlin GmbH */ | 23 | /* from CAPI2.0 DDK AVM Berlin GmbH */ |
23 | 24 | ||
diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index ce9b05b9e93a..bd00dceacaf0 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/moduleparam.h> | 28 | #include <linux/moduleparam.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/slab.h> | ||
30 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
31 | #include <linux/isdn/capicmd.h> | 32 | #include <linux/isdn/capicmd.h> |
32 | #include <linux/isdn/capiutil.h> | 33 | #include <linux/isdn/capiutil.h> |
diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c index 3697c409bec6..9f49d9065791 100644 --- a/drivers/isdn/divert/divert_procfs.c +++ b/drivers/isdn/divert/divert_procfs.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/poll.h> | 13 | #include <linux/poll.h> |
14 | #include <linux/slab.h> | ||
14 | #ifdef CONFIG_PROC_FS | 15 | #ifdef CONFIG_PROC_FS |
15 | #include <linux/proc_fs.h> | 16 | #include <linux/proc_fs.h> |
16 | #else | 17 | #else |
diff --git a/drivers/isdn/divert/isdn_divert.c b/drivers/isdn/divert/isdn_divert.c index 77e9fdda0597..70cf6bac7a5a 100644 --- a/drivers/isdn/divert/isdn_divert.c +++ b/drivers/isdn/divert/isdn_divert.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/proc_fs.h> | 12 | #include <linux/proc_fs.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/timer.h> | 14 | #include <linux/timer.h> |
14 | #include <linux/jiffies.h> | 15 | #include <linux/jiffies.h> |
15 | 16 | ||
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c index 0220c19351d9..eb7e27105a82 100644 --- a/drivers/isdn/gigaset/capi.c +++ b/drivers/isdn/gigaset/capi.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "gigaset.h" | 14 | #include "gigaset.h" |
15 | #include <linux/slab.h> | ||
15 | #include <linux/ctype.h> | 16 | #include <linux/ctype.h> |
16 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
17 | #include <linux/seq_file.h> | 18 | #include <linux/seq_file.h> |
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index bdc01cb9f0ab..0b39b387c125 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/ctype.h> | 17 | #include <linux/ctype.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/moduleparam.h> | 19 | #include <linux/moduleparam.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | /* Version Information */ | 22 | /* Version Information */ |
22 | #define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>, Stefan Eilers" | 23 | #define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>, Stefan Eilers" |
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h index cdd144ecdc5f..9ef5b0463fd5 100644 --- a/drivers/isdn/gigaset/gigaset.h +++ b/drivers/isdn/gigaset/gigaset.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/compiler.h> | 23 | #include <linux/compiler.h> |
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
26 | #include <linux/usb.h> | 27 | #include <linux/usb.h> |
27 | #include <linux/skbuff.h> | 28 | #include <linux/skbuff.h> |
diff --git a/drivers/isdn/gigaset/i4l.c b/drivers/isdn/gigaset/i4l.c index c22e5ace8276..c99fb9790a13 100644 --- a/drivers/isdn/gigaset/i4l.c +++ b/drivers/isdn/gigaset/i4l.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include "gigaset.h" | 16 | #include "gigaset.h" |
17 | #include <linux/isdnif.h> | 17 | #include <linux/isdnif.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #define HW_HDR_LEN 2 /* Header size used to store ack info */ | 20 | #define HW_HDR_LEN 2 /* Header size used to store ack info */ |
20 | 21 | ||
diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c index 168d585d64d8..8b0afd203a07 100644 --- a/drivers/isdn/gigaset/ser-gigaset.c +++ b/drivers/isdn/gigaset/ser-gigaset.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/tty.h> | 18 | #include <linux/tty.h> |
19 | #include <linux/completion.h> | 19 | #include <linux/completion.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | /* Version Information */ | 22 | /* Version Information */ |
22 | #define DRIVER_AUTHOR "Tilman Schmidt" | 23 | #define DRIVER_AUTHOR "Tilman Schmidt" |
diff --git a/drivers/isdn/hardware/avm/b1.c b/drivers/isdn/hardware/avm/b1.c index c38fa0f4c729..2a57da590d79 100644 --- a/drivers/isdn/hardware/avm/b1.c +++ b/drivers/isdn/hardware/avm/b1.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
22 | #include <linux/capi.h> | 22 | #include <linux/capi.h> |
23 | #include <linux/kernelcapi.h> | 23 | #include <linux/kernelcapi.h> |
24 | #include <linux/slab.h> | ||
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
25 | #include <linux/init.h> | 26 | #include <linux/init.h> |
26 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
diff --git a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c index 124550d0dbf3..9c8d7aa053c5 100644 --- a/drivers/isdn/hardware/avm/b1dma.c +++ b/drivers/isdn/hardware/avm/b1dma.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
21 | #include <linux/capi.h> | 21 | #include <linux/capi.h> |
22 | #include <linux/kernelcapi.h> | 22 | #include <linux/kernelcapi.h> |
23 | #include <linux/gfp.h> | ||
23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c index de6e6b311819..7715d3242ec8 100644 --- a/drivers/isdn/hardware/avm/c4.c +++ b/drivers/isdn/hardware/avm/c4.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/capi.h> | 22 | #include <linux/capi.h> |
23 | #include <linux/kernelcapi.h> | 23 | #include <linux/kernelcapi.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/gfp.h> | ||
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
26 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
27 | #include <linux/netdevice.h> | 28 | #include <linux/netdevice.h> |
diff --git a/drivers/isdn/hardware/avm/t1isa.c b/drivers/isdn/hardware/avm/t1isa.c index baeeb3c2a3ee..08216b14be13 100644 --- a/drivers/isdn/hardware/avm/t1isa.c +++ b/drivers/isdn/hardware/avm/t1isa.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/kernelcapi.h> | 21 | #include <linux/kernelcapi.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/gfp.h> | ||
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
25 | #include <linux/isdn/capicmd.h> | 26 | #include <linux/isdn/capicmd.h> |
26 | #include <linux/isdn/capiutil.h> | 27 | #include <linux/isdn/capiutil.h> |
diff --git a/drivers/isdn/hardware/eicon/capimain.c b/drivers/isdn/hardware/eicon/capimain.c index 0f073cd73763..97a20964cfc7 100644 --- a/drivers/isdn/hardware/eicon/capimain.c +++ b/drivers/isdn/hardware/eicon/capimain.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
16 | #include <linux/seq_file.h> | 17 | #include <linux/seq_file.h> |
diff --git a/drivers/isdn/hardware/mISDN/avmfritz.c b/drivers/isdn/hardware/mISDN/avmfritz.c index 81ac541d40d9..d4215369bb59 100644 --- a/drivers/isdn/hardware/mISDN/avmfritz.c +++ b/drivers/isdn/hardware/mISDN/avmfritz.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/mISDNhw.h> | 26 | #include <linux/mISDNhw.h> |
27 | #include <linux/slab.h> | ||
27 | #include <asm/unaligned.h> | 28 | #include <asm/unaligned.h> |
28 | #include "ipac.h" | 29 | #include "ipac.h" |
29 | 30 | ||
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 8affba3e569d..75e71b5d9215 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c | |||
@@ -153,6 +153,7 @@ | |||
153 | #define HFC_MULTI_VERSION "2.03" | 153 | #define HFC_MULTI_VERSION "2.03" |
154 | 154 | ||
155 | #include <linux/module.h> | 155 | #include <linux/module.h> |
156 | #include <linux/slab.h> | ||
156 | #include <linux/pci.h> | 157 | #include <linux/pci.h> |
157 | #include <linux/delay.h> | 158 | #include <linux/delay.h> |
158 | #include <linux/mISDNhw.h> | 159 | #include <linux/mISDNhw.h> |
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index 70e6b0e01121..5940a2c12074 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/pci.h> | 48 | #include <linux/pci.h> |
49 | #include <linux/delay.h> | 49 | #include <linux/delay.h> |
50 | #include <linux/mISDNhw.h> | 50 | #include <linux/mISDNhw.h> |
51 | #include <linux/slab.h> | ||
51 | 52 | ||
52 | #include "hfc_pci.h" | 53 | #include "hfc_pci.h" |
53 | 54 | ||
diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c index a64bb6c67ba7..b3b7e2879bac 100644 --- a/drivers/isdn/hardware/mISDN/hfcsusb.c +++ b/drivers/isdn/hardware/mISDN/hfcsusb.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
34 | #include <linux/usb.h> | 34 | #include <linux/usb.h> |
35 | #include <linux/mISDNhw.h> | 35 | #include <linux/mISDNhw.h> |
36 | #include <linux/slab.h> | ||
36 | #include "hfcsusb.h" | 37 | #include "hfcsusb.h" |
37 | 38 | ||
38 | static const char *hfcsusb_rev = "Revision: 0.3.3 (socket), 2008-11-05"; | 39 | static const char *hfcsusb_rev = "Revision: 0.3.3 (socket), 2008-11-05"; |
diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c index 36c6c616a655..f5b3d2b26a08 100644 --- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c +++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/pci.h> | 42 | #include <linux/pci.h> |
43 | #include <linux/delay.h> | 43 | #include <linux/delay.h> |
44 | #include <linux/mISDNhw.h> | 44 | #include <linux/mISDNhw.h> |
45 | #include <linux/slab.h> | ||
45 | #include "ipac.h" | 46 | #include "ipac.h" |
46 | 47 | ||
47 | #define INFINEON_REV "1.0" | 48 | #define INFINEON_REV "1.0" |
diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c index 613ba0435372..64ecc6f5ffaf 100644 --- a/drivers/isdn/hardware/mISDN/mISDNipac.c +++ b/drivers/isdn/hardware/mISDN/mISDNipac.c | |||
@@ -20,6 +20,7 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/slab.h> | ||
23 | #include <linux/module.h> | 24 | #include <linux/module.h> |
24 | #include <linux/mISDNhw.h> | 25 | #include <linux/mISDNhw.h> |
25 | #include "ipac.h" | 26 | #include "ipac.h" |
diff --git a/drivers/isdn/hardware/mISDN/mISDNisar.c b/drivers/isdn/hardware/mISDN/mISDNisar.c index f0bc6fa95809..38eb31439a73 100644 --- a/drivers/isdn/hardware/mISDN/mISDNisar.c +++ b/drivers/isdn/hardware/mISDN/mISDNisar.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | /* #define DEBUG */ | 26 | /* #define DEBUG */ |
27 | 27 | ||
28 | #include <linux/gfp.h> | ||
28 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
29 | #include <linux/vmalloc.h> | 30 | #include <linux/vmalloc.h> |
30 | #include <linux/mISDNhw.h> | 31 | #include <linux/mISDNhw.h> |
diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c index 6c1b164937a9..0a3553df065f 100644 --- a/drivers/isdn/hardware/mISDN/netjet.c +++ b/drivers/isdn/hardware/mISDN/netjet.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/mISDNhw.h> | 26 | #include <linux/mISDNhw.h> |
27 | #include <linux/slab.h> | ||
27 | #include "ipac.h" | 28 | #include "ipac.h" |
28 | #include "iohelper.h" | 29 | #include "iohelper.h" |
29 | #include "netjet.h" | 30 | #include "netjet.h" |
diff --git a/drivers/isdn/hardware/mISDN/speedfax.c b/drivers/isdn/hardware/mISDN/speedfax.c index 7726afdbb40b..d097a4e40e2b 100644 --- a/drivers/isdn/hardware/mISDN/speedfax.c +++ b/drivers/isdn/hardware/mISDN/speedfax.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
27 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
28 | #include <linux/mISDNhw.h> | 29 | #include <linux/mISDNhw.h> |
diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c index 2952a58c7a61..31f9d71fb22f 100644 --- a/drivers/isdn/hardware/mISDN/w6692.c +++ b/drivers/isdn/hardware/mISDN/w6692.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/mISDNhw.h> | 27 | #include <linux/mISDNhw.h> |
28 | #include <linux/slab.h> | ||
28 | #include "w6692.h" | 29 | #include "w6692.h" |
29 | 30 | ||
30 | #define W6692_REV "2.0" | 31 | #define W6692_REV "2.0" |
diff --git a/drivers/isdn/hisax/amd7930_fn.c b/drivers/isdn/hisax/amd7930_fn.c index d6fdf1f66754..5d7278397878 100644 --- a/drivers/isdn/hisax/amd7930_fn.c +++ b/drivers/isdn/hisax/amd7930_fn.c | |||
@@ -59,6 +59,7 @@ | |||
59 | #include "amd7930_fn.h" | 59 | #include "amd7930_fn.h" |
60 | #include <linux/interrupt.h> | 60 | #include <linux/interrupt.h> |
61 | #include <linux/init.h> | 61 | #include <linux/init.h> |
62 | #include <linux/gfp.h> | ||
62 | 63 | ||
63 | static void Amd7930_new_ph(struct IsdnCardState *cs); | 64 | static void Amd7930_new_ph(struct IsdnCardState *cs); |
64 | 65 | ||
diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c index 14295a155e71..fcf4ed1cb4b9 100644 --- a/drivers/isdn/hisax/avm_pci.c +++ b/drivers/isdn/hisax/avm_pci.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include "isac.h" | 17 | #include "isac.h" |
18 | #include "isdnl1.h" | 18 | #include "isdnl1.h" |
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/isapnp.h> | 21 | #include <linux/isapnp.h> |
21 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
22 | 23 | ||
diff --git a/drivers/isdn/hisax/callc.c b/drivers/isdn/hisax/callc.c index 475b1a020003..f58ded8f403f 100644 --- a/drivers/isdn/hisax/callc.c +++ b/drivers/isdn/hisax/callc.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | #include "hisax.h" | 22 | #include "hisax.h" |
22 | #include <linux/isdn/capicmd.h> | 23 | #include <linux/isdn/capicmd.h> |
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index 4fab18d4d02f..544cf4b1cce3 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kernel_stat.h> | 23 | #include <linux/kernel_stat.h> |
24 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/slab.h> | ||
26 | #define HISAX_STATUS_BUFSIZE 4096 | 27 | #define HISAX_STATUS_BUFSIZE 4096 |
27 | 28 | ||
28 | /* | 29 | /* |
diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c index 23c41fcd864e..5d9d338814aa 100644 --- a/drivers/isdn/hisax/elsa.c +++ b/drivers/isdn/hisax/elsa.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/slab.h> | ||
22 | #include "hisax.h" | 23 | #include "hisax.h" |
23 | #include "arcofi.h" | 24 | #include "arcofi.h" |
24 | #include "isac.h" | 25 | #include "isac.h" |
diff --git a/drivers/isdn/hisax/elsa_ser.c b/drivers/isdn/hisax/elsa_ser.c index 1657bba7879e..cbda3790a10d 100644 --- a/drivers/isdn/hisax/elsa_ser.c +++ b/drivers/isdn/hisax/elsa_ser.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/serial.h> | 10 | #include <linux/serial.h> |
11 | #include <linux/serial_reg.h> | 11 | #include <linux/serial_reg.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | #define MAX_MODEM_BUF 256 | 14 | #define MAX_MODEM_BUF 256 |
14 | #define WAKEUP_CHARS (MAX_MODEM_BUF/2) | 15 | #define WAKEUP_CHARS (MAX_MODEM_BUF/2) |
diff --git a/drivers/isdn/hisax/fsm.c b/drivers/isdn/hisax/fsm.c index 34fade96a581..732ea633758c 100644 --- a/drivers/isdn/hisax/fsm.c +++ b/drivers/isdn/hisax/fsm.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include "hisax.h" | 20 | #include "hisax.h" |
20 | 21 | ||
diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c index ab98e135bcbb..051b44e2556c 100644 --- a/drivers/isdn/hisax/hfc4s8s_l1.c +++ b/drivers/isdn/hisax/hfc4s8s_l1.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/timer.h> | 29 | #include <linux/timer.h> |
29 | #include <linux/skbuff.h> | 30 | #include <linux/skbuff.h> |
30 | #include <linux/wait.h> | 31 | #include <linux/wait.h> |
diff --git a/drivers/isdn/hisax/hfc_2bds0.c b/drivers/isdn/hisax/hfc_2bds0.c index 8d22f50760eb..7250f56a5246 100644 --- a/drivers/isdn/hisax/hfc_2bds0.c +++ b/drivers/isdn/hisax/hfc_2bds0.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/slab.h> | ||
15 | #include "hisax.h" | 16 | #include "hisax.h" |
16 | #include "hfc_2bds0.h" | 17 | #include "hfc_2bds0.h" |
17 | #include "isdnl1.h" | 18 | #include "isdnl1.h" |
diff --git a/drivers/isdn/hisax/hfc_2bs0.c b/drivers/isdn/hisax/hfc_2bs0.c index d0520ad30677..b1f6481e1193 100644 --- a/drivers/isdn/hisax/hfc_2bs0.c +++ b/drivers/isdn/hisax/hfc_2bs0.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include "isac.h" | 16 | #include "isac.h" |
17 | #include "isdnl1.h" | 17 | #include "isdnl1.h" |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | static inline int | 21 | static inline int |
21 | WaitForBusy(struct IsdnCardState *cs) | 22 | WaitForBusy(struct IsdnCardState *cs) |
diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c index 419f87cad8cb..be5faf4aa868 100644 --- a/drivers/isdn/hisax/hfc_sx.c +++ b/drivers/isdn/hisax/hfc_sx.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include "isdnl1.h" | 17 | #include "isdnl1.h" |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/isapnp.h> | 19 | #include <linux/isapnp.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | static const char *hfcsx_revision = "$Revision: 1.12.2.5 $"; | 22 | static const char *hfcsx_revision = "$Revision: 1.12.2.5 $"; |
22 | 23 | ||
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c index aaaeaafd86f4..ed9527aa5f2c 100644 --- a/drivers/isdn/hisax/hfc_usb.c +++ b/drivers/isdn/hisax/hfc_usb.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
40 | #include <linux/sched.h> | 40 | #include <linux/sched.h> |
41 | #include <linux/moduleparam.h> | 41 | #include <linux/moduleparam.h> |
42 | #include <linux/slab.h> | ||
42 | #include "hisax.h" | 43 | #include "hisax.h" |
43 | #include "hisax_if.h" | 44 | #include "hisax_if.h" |
44 | #include "hfc_usb.h" | 45 | #include "hfc_usb.h" |
diff --git a/drivers/isdn/hisax/hisax_isac.c b/drivers/isdn/hisax/hisax_isac.c index d0fefcf999cb..a8447fa2f470 100644 --- a/drivers/isdn/hisax/hisax_isac.c +++ b/drivers/isdn/hisax/hisax_isac.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/gfp.h> | ||
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/netdevice.h> | 26 | #include <linux/netdevice.h> |
26 | #include "hisax_isac.h" | 27 | #include "hisax_isac.h" |
diff --git a/drivers/isdn/hisax/hscx.c b/drivers/isdn/hisax/hscx.c index c8f9951f7914..904b9100df95 100644 --- a/drivers/isdn/hisax/hscx.c +++ b/drivers/isdn/hisax/hscx.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include "isac.h" | 16 | #include "isac.h" |
17 | #include "isdnl1.h" | 17 | #include "isdnl1.h" |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | static char *HSCXVer[] = | 21 | static char *HSCXVer[] = |
21 | {"A1", "?1", "A2", "?3", "A3", "V2.1", "?6", "?7", | 22 | {"A1", "?1", "A2", "?3", "A3", "V2.1", "?6", "?7", |
diff --git a/drivers/isdn/hisax/icc.c b/drivers/isdn/hisax/icc.c index c80cbb8a2ef9..63057268cc3d 100644 --- a/drivers/isdn/hisax/icc.c +++ b/drivers/isdn/hisax/icc.c | |||
@@ -20,6 +20,7 @@ | |||
20 | // #include "arcofi.h" | 20 | // #include "arcofi.h" |
21 | #include "isdnl1.h" | 21 | #include "isdnl1.h" |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #define DBUSY_TIMER_VALUE 80 | 25 | #define DBUSY_TIMER_VALUE 80 |
25 | #define ARCOFI_USE 0 | 26 | #define ARCOFI_USE 0 |
diff --git a/drivers/isdn/hisax/ipacx.c b/drivers/isdn/hisax/ipacx.c index 00afd5538909..751b25f2ff58 100644 --- a/drivers/isdn/hisax/ipacx.c +++ b/drivers/isdn/hisax/ipacx.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/init.h> | 14 | #include <linux/init.h> |
14 | #include "hisax_if.h" | 15 | #include "hisax_if.h" |
15 | #include "hisax.h" | 16 | #include "hisax.h" |
diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c index a19354d94343..2b66728136d5 100644 --- a/drivers/isdn/hisax/isac.c +++ b/drivers/isdn/hisax/isac.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include "arcofi.h" | 18 | #include "arcofi.h" |
19 | #include "isdnl1.h" | 19 | #include "isdnl1.h" |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
22 | 23 | ||
23 | #define DBUSY_TIMER_VALUE 80 | 24 | #define DBUSY_TIMER_VALUE 80 |
diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c index 6bde16c00fb5..40b914bded8c 100644 --- a/drivers/isdn/hisax/isar.c +++ b/drivers/isdn/hisax/isar.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include "isar.h" | 13 | #include "isar.h" |
14 | #include "isdnl1.h" | 14 | #include "isdnl1.h" |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #define DBG_LOADFIRM 0 | 18 | #define DBG_LOADFIRM 0 |
18 | #define DUMP_MBOXFRAME 2 | 19 | #define DUMP_MBOXFRAME 2 |
diff --git a/drivers/isdn/hisax/isdnl1.c b/drivers/isdn/hisax/isdnl1.c index 9ce6abe05b1a..d5eeacf565d6 100644 --- a/drivers/isdn/hisax/isdnl1.c +++ b/drivers/isdn/hisax/isdnl1.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/gfp.h> | ||
22 | #include "hisax.h" | 23 | #include "hisax.h" |
23 | #include "isdnl1.h" | 24 | #include "isdnl1.h" |
24 | 25 | ||
diff --git a/drivers/isdn/hisax/isdnl2.c b/drivers/isdn/hisax/isdnl2.c index 7b9496a63b5f..0858791978d8 100644 --- a/drivers/isdn/hisax/isdnl2.c +++ b/drivers/isdn/hisax/isdnl2.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/gfp.h> | ||
19 | #include "hisax.h" | 20 | #include "hisax.h" |
20 | #include "isdnl2.h" | 21 | #include "isdnl2.h" |
21 | 22 | ||
diff --git a/drivers/isdn/hisax/isdnl3.c b/drivers/isdn/hisax/isdnl3.c index 06766022d3ae..fd0b643ab740 100644 --- a/drivers/isdn/hisax/isdnl3.c +++ b/drivers/isdn/hisax/isdnl3.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/slab.h> | ||
19 | #include "hisax.h" | 20 | #include "hisax.h" |
20 | #include "isdnl3.h" | 21 | #include "isdnl3.h" |
21 | 22 | ||
diff --git a/drivers/isdn/hisax/jade.c b/drivers/isdn/hisax/jade.c index 70840a710acf..ea8f840871d0 100644 --- a/drivers/isdn/hisax/jade.c +++ b/drivers/isdn/hisax/jade.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include "jade.h" | 17 | #include "jade.h" |
18 | #include "isdnl1.h" | 18 | #include "isdnl1.h" |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | 22 | ||
22 | int | 23 | int |
diff --git a/drivers/isdn/hisax/l3dss1.c b/drivers/isdn/hisax/l3dss1.c index a12fa4d34903..cc6ee2d39880 100644 --- a/drivers/isdn/hisax/l3dss1.c +++ b/drivers/isdn/hisax/l3dss1.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "isdnl3.h" | 23 | #include "isdnl3.h" |
24 | #include "l3dss1.h" | 24 | #include "l3dss1.h" |
25 | #include <linux/ctype.h> | 25 | #include <linux/ctype.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | extern char *HiSax_getrev(const char *revision); | 28 | extern char *HiSax_getrev(const char *revision); |
28 | static const char *dss1_revision = "$Revision: 2.32.2.3 $"; | 29 | static const char *dss1_revision = "$Revision: 2.32.2.3 $"; |
diff --git a/drivers/isdn/hisax/l3ni1.c b/drivers/isdn/hisax/l3ni1.c index 4622d43c7e10..f9584491fe8e 100644 --- a/drivers/isdn/hisax/l3ni1.c +++ b/drivers/isdn/hisax/l3ni1.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include "isdnl3.h" | 22 | #include "isdnl3.h" |
23 | #include "l3ni1.h" | 23 | #include "l3ni1.h" |
24 | #include <linux/ctype.h> | 24 | #include <linux/ctype.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | extern char *HiSax_getrev(const char *revision); | 27 | extern char *HiSax_getrev(const char *revision); |
27 | static const char *ni1_revision = "$Revision: 2.8.2.3 $"; | 28 | static const char *ni1_revision = "$Revision: 2.8.2.3 $"; |
diff --git a/drivers/isdn/hisax/netjet.c b/drivers/isdn/hisax/netjet.c index 02c6fbaeccf8..5d7f0f2ff9b9 100644 --- a/drivers/isdn/hisax/netjet.c +++ b/drivers/isdn/hisax/netjet.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include "isdnl1.h" | 21 | #include "isdnl1.h" |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/ppp_defs.h> | 23 | #include <linux/ppp_defs.h> |
24 | #include <linux/slab.h> | ||
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
25 | #include "netjet.h" | 26 | #include "netjet.h" |
26 | 27 | ||
diff --git a/drivers/isdn/hisax/st5481_b.c b/drivers/isdn/hisax/st5481_b.c index 95b1cdd97958..e56e5af889b6 100644 --- a/drivers/isdn/hisax/st5481_b.c +++ b/drivers/isdn/hisax/st5481_b.c | |||
@@ -11,8 +11,8 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/gfp.h> | ||
14 | #include <linux/usb.h> | 15 | #include <linux/usb.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
17 | #include <linux/bitrev.h> | 17 | #include <linux/bitrev.h> |
18 | #include "st5481.h" | 18 | #include "st5481.h" |
diff --git a/drivers/isdn/hisax/st5481_d.c b/drivers/isdn/hisax/st5481_d.c index 39e8e49cfd2d..b7876b19fe73 100644 --- a/drivers/isdn/hisax/st5481_d.c +++ b/drivers/isdn/hisax/st5481_d.c | |||
@@ -11,8 +11,8 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/gfp.h> | ||
14 | #include <linux/usb.h> | 15 | #include <linux/usb.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
17 | #include "st5481.h" | 17 | #include "st5481.h" |
18 | 18 | ||
diff --git a/drivers/isdn/hisax/tei.c b/drivers/isdn/hisax/tei.c index 6e65424f1f04..f4cb178b0666 100644 --- a/drivers/isdn/hisax/tei.c +++ b/drivers/isdn/hisax/tei.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include "hisax.h" | 18 | #include "hisax.h" |
19 | #include "isdnl2.h" | 19 | #include "isdnl2.h" |
20 | #include <linux/gfp.h> | ||
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | #include <linux/random.h> | 22 | #include <linux/random.h> |
22 | 23 | ||
diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c index 9d6e864023fe..e2cfb6f5aa42 100644 --- a/drivers/isdn/hisax/w6692.c +++ b/drivers/isdn/hisax/w6692.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include "isdnl1.h" | 16 | #include "isdnl1.h" |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | /* table entry in the PCI devices list */ | 21 | /* table entry in the PCI devices list */ |
21 | typedef struct { | 22 | typedef struct { |
diff --git a/drivers/isdn/hysdn/hycapi.c b/drivers/isdn/hysdn/hycapi.c index fe874afa4f81..6299b06ae009 100644 --- a/drivers/isdn/hysdn/hycapi.c +++ b/drivers/isdn/hysdn/hycapi.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/skbuff.h> | 18 | #include <linux/skbuff.h> |
19 | #include <linux/netdevice.h> | 19 | #include <linux/netdevice.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #define VER_DRIVER 0 | 22 | #define VER_DRIVER 0 |
22 | #define VER_CARDTYPE 1 | 23 | #define VER_CARDTYPE 1 |
diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c index 90b35e1a4b7e..80966462d6dc 100644 --- a/drivers/isdn/hysdn/hysdn_procconf.c +++ b/drivers/isdn/hysdn/hysdn_procconf.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/poll.h> | 16 | #include <linux/poll.h> |
17 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/smp_lock.h> | 20 | #include <linux/smp_lock.h> |
20 | #include <net/net_namespace.h> | 21 | #include <net/net_namespace.h> |
21 | 22 | ||
diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/isdn/hysdn/hysdn_proclog.c index 8bcae28c4409..e83f6fda32fe 100644 --- a/drivers/isdn/hysdn/hysdn_proclog.c +++ b/drivers/isdn/hysdn/hysdn_proclog.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/poll.h> | 14 | #include <linux/poll.h> |
15 | #include <linux/proc_fs.h> | 15 | #include <linux/proc_fs.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/smp_lock.h> | 18 | #include <linux/smp_lock.h> |
18 | 19 | ||
19 | #include "hysdn_defs.h" | 20 | #include "hysdn_defs.h" |
diff --git a/drivers/isdn/i4l/isdn_audio.c b/drivers/isdn/i4l/isdn_audio.c index fb350c567c6b..861bdf3421f2 100644 --- a/drivers/isdn/i4l/isdn_audio.c +++ b/drivers/isdn/i4l/isdn_audio.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/isdn.h> | 14 | #include <linux/isdn.h> |
15 | #include <linux/slab.h> | ||
15 | #include "isdn_audio.h" | 16 | #include "isdn_audio.h" |
16 | #include "isdn_common.h" | 17 | #include "isdn_common.h" |
17 | 18 | ||
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 00c60e2e0ff7..70044ee4b228 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/poll.h> | 16 | #include <linux/poll.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
18 | #include <linux/isdn.h> | 19 | #include <linux/isdn.h> |
19 | #include <linux/smp_lock.h> | 20 | #include <linux/smp_lock.h> |
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index 507e13d9a57c..8c85d1e88cc6 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/isdn.h> | 25 | #include <linux/isdn.h> |
26 | #include <linux/slab.h> | ||
26 | #include <net/arp.h> | 27 | #include <net/arp.h> |
27 | #include <net/dst.h> | 28 | #include <net/dst.h> |
28 | #include <net/pkt_sched.h> | 29 | #include <net/pkt_sched.h> |
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index 45df6675e8ed..f37b8f68d0aa 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/isdn.h> | 12 | #include <linux/isdn.h> |
13 | #include <linux/poll.h> | 13 | #include <linux/poll.h> |
14 | #include <linux/ppp-comp.h> | 14 | #include <linux/ppp-comp.h> |
15 | #include <linux/slab.h> | ||
15 | #ifdef CONFIG_IPPP_FILTER | 16 | #ifdef CONFIG_IPPP_FILTER |
16 | #include <linux/filter.h> | 17 | #include <linux/filter.h> |
17 | #endif | 18 | #endif |
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 2881a66c1aa9..fc8454d2eea5 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #undef ISDN_TTY_STAT_DEBUG | 12 | #undef ISDN_TTY_STAT_DEBUG |
13 | 13 | ||
14 | #include <linux/isdn.h> | 14 | #include <linux/isdn.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
16 | #include <linux/smp_lock.h> | 17 | #include <linux/smp_lock.h> |
17 | #include "isdn_common.h" | 18 | #include "isdn_common.h" |
diff --git a/drivers/isdn/i4l/isdn_x25iface.c b/drivers/isdn/i4l/isdn_x25iface.c index 8b3efc243161..efcf1f9327e5 100644 --- a/drivers/isdn/i4l/isdn_x25iface.c +++ b/drivers/isdn/i4l/isdn_x25iface.c | |||
@@ -20,6 +20,7 @@ | |||
20 | /* #include <linux/isdn.h> */ | 20 | /* #include <linux/isdn.h> */ |
21 | #include <linux/netdevice.h> | 21 | #include <linux/netdevice.h> |
22 | #include <linux/concap.h> | 22 | #include <linux/concap.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/wanrouter.h> | 24 | #include <linux/wanrouter.h> |
24 | #include <net/x25device.h> | 25 | #include <net/x25device.h> |
25 | #include "isdn_x25iface.h" | 26 | #include "isdn_x25iface.h" |
diff --git a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c index bf7997abc4ac..2e847a90bad0 100644 --- a/drivers/isdn/icn/icn.c +++ b/drivers/isdn/icn/icn.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include "icn.h" | 12 | #include "icn.h" |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
16 | 17 | ||
17 | static int portbase = ICN_BASEADDR; | 18 | static int portbase = ICN_BASEADDR; |
diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c index a335c85a736e..b8a1098b66ed 100644 --- a/drivers/isdn/isdnloop/isdnloop.c +++ b/drivers/isdn/isdnloop/isdnloop.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
16 | #include "isdnloop.h" | 17 | #include "isdnloop.h" |
diff --git a/drivers/isdn/mISDN/clock.c b/drivers/isdn/mISDN/clock.c index f1bbc88763b2..1fa629b3b940 100644 --- a/drivers/isdn/mISDN/clock.c +++ b/drivers/isdn/mISDN/clock.c | |||
@@ -33,6 +33,7 @@ | |||
33 | * | 33 | * |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/slab.h> | ||
36 | #include <linux/types.h> | 37 | #include <linux/types.h> |
37 | #include <linux/stddef.h> | 38 | #include <linux/stddef.h> |
38 | #include <linux/spinlock.h> | 39 | #include <linux/spinlock.h> |
diff --git a/drivers/isdn/mISDN/core.c b/drivers/isdn/mISDN/core.c index 21d34be5af6a..afeebb00fe0b 100644 --- a/drivers/isdn/mISDN/core.c +++ b/drivers/isdn/mISDN/core.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/slab.h> | ||
15 | #include <linux/types.h> | 16 | #include <linux/types.h> |
16 | #include <linux/stddef.h> | 17 | #include <linux/stddef.h> |
17 | #include <linux/module.h> | 18 | #include <linux/module.h> |
diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c index 9c7c0d1ba55f..713ef2b805a2 100644 --- a/drivers/isdn/mISDN/dsp_cmx.c +++ b/drivers/isdn/mISDN/dsp_cmx.c | |||
@@ -124,6 +124,7 @@ | |||
124 | 124 | ||
125 | /* delay.h is required for hw_lock.h */ | 125 | /* delay.h is required for hw_lock.h */ |
126 | 126 | ||
127 | #include <linux/slab.h> | ||
127 | #include <linux/delay.h> | 128 | #include <linux/delay.h> |
128 | #include <linux/mISDNif.h> | 129 | #include <linux/mISDNif.h> |
129 | #include <linux/mISDNdsp.h> | 130 | #include <linux/mISDNdsp.h> |
diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c index 6eac588e0a37..6f5b54864283 100644 --- a/drivers/isdn/mISDN/dsp_core.c +++ b/drivers/isdn/mISDN/dsp_core.c | |||
@@ -154,6 +154,7 @@ | |||
154 | */ | 154 | */ |
155 | 155 | ||
156 | #include <linux/delay.h> | 156 | #include <linux/delay.h> |
157 | #include <linux/gfp.h> | ||
157 | #include <linux/mISDNif.h> | 158 | #include <linux/mISDNif.h> |
158 | #include <linux/mISDNdsp.h> | 159 | #include <linux/mISDNdsp.h> |
159 | #include <linux/module.h> | 160 | #include <linux/module.h> |
diff --git a/drivers/isdn/mISDN/dsp_pipeline.c b/drivers/isdn/mISDN/dsp_pipeline.c index e9941678edfa..621f31007095 100644 --- a/drivers/isdn/mISDN/dsp_pipeline.c +++ b/drivers/isdn/mISDN/dsp_pipeline.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/list.h> | 29 | #include <linux/list.h> |
29 | #include <linux/string.h> | 30 | #include <linux/string.h> |
30 | #include <linux/mISDNif.h> | 31 | #include <linux/mISDNif.h> |
diff --git a/drivers/isdn/mISDN/dsp_tones.c b/drivers/isdn/mISDN/dsp_tones.c index 1debf53670de..7dbe54ed1deb 100644 --- a/drivers/isdn/mISDN/dsp_tones.c +++ b/drivers/isdn/mISDN/dsp_tones.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/gfp.h> | ||
11 | #include <linux/mISDNif.h> | 12 | #include <linux/mISDNif.h> |
12 | #include <linux/mISDNdsp.h> | 13 | #include <linux/mISDNdsp.h> |
13 | #include "core.h" | 14 | #include "core.h" |
diff --git a/drivers/isdn/mISDN/hwchannel.c b/drivers/isdn/mISDN/hwchannel.c index e8049be552aa..307bd6e8988b 100644 --- a/drivers/isdn/mISDN/hwchannel.c +++ b/drivers/isdn/mISDN/hwchannel.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * | 15 | * |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/gfp.h> | ||
18 | #include <linux/module.h> | 19 | #include <linux/module.h> |
19 | #include <linux/mISDNhw.h> | 20 | #include <linux/mISDNhw.h> |
20 | 21 | ||
diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c index 325b1ad7d4b8..22f38e48ac4e 100644 --- a/drivers/isdn/mISDN/l1oip_core.c +++ b/drivers/isdn/mISDN/l1oip_core.c | |||
@@ -233,6 +233,7 @@ socket process and create a new one. | |||
233 | #include <linux/inet.h> | 233 | #include <linux/inet.h> |
234 | #include <linux/workqueue.h> | 234 | #include <linux/workqueue.h> |
235 | #include <linux/kthread.h> | 235 | #include <linux/kthread.h> |
236 | #include <linux/slab.h> | ||
236 | #include <net/sock.h> | 237 | #include <net/sock.h> |
237 | #include "core.h" | 238 | #include "core.h" |
238 | #include "l1oip.h" | 239 | #include "l1oip.h" |
diff --git a/drivers/isdn/mISDN/layer1.c b/drivers/isdn/mISDN/layer1.c index e826eeb1ecec..ac4aa18c632b 100644 --- a/drivers/isdn/mISDN/layer1.c +++ b/drivers/isdn/mISDN/layer1.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | 18 | ||
19 | #include <linux/slab.h> | ||
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/mISDNhw.h> | 21 | #include <linux/mISDNhw.h> |
21 | #include "core.h" | 22 | #include "core.h" |
diff --git a/drivers/isdn/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c index e17f0044e0b6..c97371788764 100644 --- a/drivers/isdn/mISDN/layer2.c +++ b/drivers/isdn/mISDN/layer2.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/mISDNif.h> | 18 | #include <linux/mISDNif.h> |
19 | #include <linux/slab.h> | ||
19 | #include "core.h" | 20 | #include "core.h" |
20 | #include "fsm.h" | 21 | #include "fsm.h" |
21 | #include "layer2.h" | 22 | #include "layer2.h" |
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c index fcfe17a19a61..3232206406b1 100644 --- a/drivers/isdn/mISDN/socket.c +++ b/drivers/isdn/mISDN/socket.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/mISDNif.h> | 18 | #include <linux/mISDNif.h> |
19 | #include <linux/slab.h> | ||
19 | #include "core.h" | 20 | #include "core.h" |
20 | 21 | ||
21 | static u_int *debug; | 22 | static u_int *debug; |
diff --git a/drivers/isdn/mISDN/stack.c b/drivers/isdn/mISDN/stack.c index 0d05ec43012c..b159bd59e64e 100644 --- a/drivers/isdn/mISDN/stack.c +++ b/drivers/isdn/mISDN/stack.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * | 15 | * |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/slab.h> | ||
18 | #include <linux/mISDNif.h> | 19 | #include <linux/mISDNif.h> |
19 | #include <linux/kthread.h> | 20 | #include <linux/kthread.h> |
20 | #include <linux/smp_lock.h> | 21 | #include <linux/smp_lock.h> |
diff --git a/drivers/isdn/mISDN/tei.c b/drivers/isdn/mISDN/tei.c index 6d4da6095885..34e898fe2f4f 100644 --- a/drivers/isdn/mISDN/tei.c +++ b/drivers/isdn/mISDN/tei.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | #include "layer2.h" | 17 | #include "layer2.h" |
18 | #include <linux/random.h> | 18 | #include <linux/random.h> |
19 | #include <linux/slab.h> | ||
19 | #include "core.h" | 20 | #include "core.h" |
20 | 21 | ||
21 | #define ID_REQUEST 1 | 22 | #define ID_REQUEST 1 |
diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c index 5b7e9bf514f1..8785004e85e0 100644 --- a/drivers/isdn/mISDN/timerdev.c +++ b/drivers/isdn/mISDN/timerdev.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/poll.h> | 20 | #include <linux/poll.h> |
21 | #include <linux/vmalloc.h> | 21 | #include <linux/vmalloc.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/timer.h> | 23 | #include <linux/timer.h> |
23 | #include <linux/miscdevice.h> | 24 | #include <linux/miscdevice.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
diff --git a/drivers/isdn/pcbit/callbacks.c b/drivers/isdn/pcbit/callbacks.c index 43ecd0f54235..976143b2346d 100644 --- a/drivers/isdn/pcbit/callbacks.c +++ b/drivers/isdn/pcbit/callbacks.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | 20 | ||
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
24 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
25 | 24 | ||
diff --git a/drivers/isdn/pcbit/edss1.c b/drivers/isdn/pcbit/edss1.c index 37e9626cebf6..d5920ae22d73 100644 --- a/drivers/isdn/pcbit/edss1.c +++ b/drivers/isdn/pcbit/edss1.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | 20 | ||
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
24 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
25 | 24 | ||
diff --git a/drivers/isdn/sc/init.c b/drivers/isdn/sc/init.c index 5a0774880d56..ca710ab278ec 100644 --- a/drivers/isdn/sc/init.c +++ b/drivers/isdn/sc/init.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/interrupt.h> | 9 | #include <linux/interrupt.h> |
10 | #include <linux/delay.h> | 10 | #include <linux/delay.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/slab.h> | ||
12 | #include "includes.h" | 13 | #include "includes.h" |
13 | #include "hardware.h" | 14 | #include "hardware.h" |
14 | #include "card.h" | 15 | #include "card.h" |
diff --git a/drivers/leds/dell-led.c b/drivers/leds/dell-led.c index ee310891fff8..52590296af33 100644 --- a/drivers/leds/dell-led.c +++ b/drivers/leds/dell-led.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/acpi.h> | 14 | #include <linux/acpi.h> |
15 | #include <linux/leds.h> | 15 | #include <linux/leds.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | MODULE_AUTHOR("Louis Davis/Jim Dailey"); | 18 | MODULE_AUTHOR("Louis Davis/Jim Dailey"); |
18 | MODULE_DESCRIPTION("Dell LED Control Driver"); | 19 | MODULE_DESCRIPTION("Dell LED Control Driver"); |
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c index d8ddd9ef8994..f1c00db88b5e 100644 --- a/drivers/leds/led-triggers.c +++ b/drivers/leds/led-triggers.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/timer.h> | 21 | #include <linux/timer.h> |
22 | #include <linux/rwsem.h> | 22 | #include <linux/rwsem.h> |
23 | #include <linux/leds.h> | 23 | #include <linux/leds.h> |
24 | #include <linux/slab.h> | ||
24 | #include "leds.h" | 25 | #include "leds.h" |
25 | 26 | ||
26 | /* | 27 | /* |
diff --git a/drivers/leds/leds-88pm860x.c b/drivers/leds/leds-88pm860x.c index d196073a6aeb..16a60c06c96c 100644 --- a/drivers/leds/leds-88pm860x.c +++ b/drivers/leds/leds-88pm860x.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/leds.h> | 17 | #include <linux/leds.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/workqueue.h> | 19 | #include <linux/workqueue.h> |
19 | #include <linux/mfd/88pm860x.h> | 20 | #include <linux/mfd/88pm860x.h> |
20 | 21 | ||
diff --git a/drivers/leds/leds-adp5520.c b/drivers/leds/leds-adp5520.c index a8f315902131..7ba4c7b5b97e 100644 --- a/drivers/leds/leds-adp5520.c +++ b/drivers/leds/leds-adp5520.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/leds.h> | 20 | #include <linux/leds.h> |
21 | #include <linux/workqueue.h> | 21 | #include <linux/workqueue.h> |
22 | #include <linux/mfd/adp5520.h> | 22 | #include <linux/mfd/adp5520.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | struct adp5520_led { | 25 | struct adp5520_led { |
25 | struct led_classdev cdev; | 26 | struct led_classdev cdev; |
diff --git a/drivers/leds/leds-atmel-pwm.c b/drivers/leds/leds-atmel-pwm.c index 52297c3ab246..c941d906bba6 100644 --- a/drivers/leds/leds-atmel-pwm.c +++ b/drivers/leds/leds-atmel-pwm.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/leds.h> | 3 | #include <linux/leds.h> |
4 | #include <linux/io.h> | 4 | #include <linux/io.h> |
5 | #include <linux/atmel_pwm.h> | 5 | #include <linux/atmel_pwm.h> |
6 | #include <linux/slab.h> | ||
6 | 7 | ||
7 | 8 | ||
8 | struct pwmled { | 9 | struct pwmled { |
diff --git a/drivers/leds/leds-bd2802.c b/drivers/leds/leds-bd2802.c index 779d7f262c04..286b501a3573 100644 --- a/drivers/leds/leds-bd2802.c +++ b/drivers/leds/leds-bd2802.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/leds.h> | 19 | #include <linux/leds.h> |
20 | #include <linux/leds-bd2802.h> | 20 | #include <linux/leds-bd2802.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | 23 | ||
23 | #define LED_CTL(rgb2en, rgb1en) ((rgb2en) << 4 | ((rgb1en) << 0)) | 24 | #define LED_CTL(rgb2en, rgb1en) ((rgb2en) << 4 | ((rgb1en) << 0)) |
diff --git a/drivers/leds/leds-da903x.c b/drivers/leds/leds-da903x.c index 1f3cc512eff8..f28931cf6781 100644 --- a/drivers/leds/leds-da903x.c +++ b/drivers/leds/leds-da903x.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/leds.h> | 19 | #include <linux/leds.h> |
20 | #include <linux/workqueue.h> | 20 | #include <linux/workqueue.h> |
21 | #include <linux/mfd/da903x.h> | 21 | #include <linux/mfd/da903x.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #define DA9030_LED1_CONTROL 0x20 | 24 | #define DA9030_LED1_CONTROL 0x20 |
24 | #define DA9030_LED2_CONTROL 0x21 | 25 | #define DA9030_LED2_CONTROL 0x21 |
diff --git a/drivers/leds/leds-dac124s085.c b/drivers/leds/leds-dac124s085.c index 2913d76ad3d2..31cf0d60a9a5 100644 --- a/drivers/leds/leds-dac124s085.c +++ b/drivers/leds/leds-dac124s085.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * LED driver for the DAC124S085 SPI DAC | 9 | * LED driver for the DAC124S085 SPI DAC |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/gfp.h> | ||
13 | #include <linux/leds.h> | 12 | #include <linux/leds.h> |
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index 0823e2622e8c..c6e4b772b757 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/leds.h> | 16 | #include <linux/leds.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/workqueue.h> | 18 | #include <linux/workqueue.h> |
18 | 19 | ||
19 | #include <asm/gpio.h> | 20 | #include <asm/gpio.h> |
diff --git a/drivers/leds/leds-lp3944.c b/drivers/leds/leds-lp3944.c index 5946208ba26e..8d5ecceba181 100644 --- a/drivers/leds/leds-lp3944.c +++ b/drivers/leds/leds-lp3944.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/i2c.h> | 30 | #include <linux/i2c.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/leds.h> | 32 | #include <linux/leds.h> |
32 | #include <linux/mutex.h> | 33 | #include <linux/mutex.h> |
33 | #include <linux/workqueue.h> | 34 | #include <linux/workqueue.h> |
diff --git a/drivers/leds/leds-lt3593.c b/drivers/leds/leds-lt3593.c index fee40a841959..2579678f97a6 100644 --- a/drivers/leds/leds-lt3593.c +++ b/drivers/leds/leds-lt3593.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/workqueue.h> | 23 | #include <linux/workqueue.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | struct lt3593_led_data { | 28 | struct lt3593_led_data { |
28 | struct led_classdev cdev; | 29 | struct led_classdev cdev; |
diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c index adc561eb59d2..6682175fa9f7 100644 --- a/drivers/leds/leds-pca9532.c +++ b/drivers/leds/leds-pca9532.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/i2c.h> | 15 | #include <linux/i2c.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/leds.h> | 17 | #include <linux/leds.h> |
17 | #include <linux/input.h> | 18 | #include <linux/input.h> |
18 | #include <linux/mutex.h> | 19 | #include <linux/mutex.h> |
diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c index 4e2d1a42b48f..8ff50f234190 100644 --- a/drivers/leds/leds-pca955x.c +++ b/drivers/leds/leds-pca955x.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/err.h> | 48 | #include <linux/err.h> |
49 | #include <linux/i2c.h> | 49 | #include <linux/i2c.h> |
50 | #include <linux/workqueue.h> | 50 | #include <linux/workqueue.h> |
51 | #include <linux/slab.h> | ||
51 | 52 | ||
52 | /* LED select registers determine the source that drives LED outputs */ | 53 | /* LED select registers determine the source that drives LED outputs */ |
53 | #define PCA955X_LS_LED_ON 0x0 /* Output LOW */ | 54 | #define PCA955X_LS_LED_ON 0x0 /* Output LOW */ |
diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c index 88b1dd091cfb..da3fa8dcdf5b 100644 --- a/drivers/leds/leds-pwm.c +++ b/drivers/leds/leds-pwm.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/pwm.h> | 22 | #include <linux/pwm.h> |
23 | #include <linux/leds_pwm.h> | 23 | #include <linux/leds_pwm.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | struct led_pwm_data { | 26 | struct led_pwm_data { |
26 | struct led_classdev cdev; | 27 | struct led_classdev cdev; |
diff --git a/drivers/leds/leds-regulator.c b/drivers/leds/leds-regulator.c index 7f00de3ef922..3790816643be 100644 --- a/drivers/leds/leds-regulator.c +++ b/drivers/leds/leds-regulator.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/err.h> | 15 | #include <linux/err.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/workqueue.h> | 17 | #include <linux/workqueue.h> |
17 | #include <linux/leds.h> | 18 | #include <linux/leds.h> |
18 | #include <linux/leds-regulator.h> | 19 | #include <linux/leds-regulator.h> |
diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c index aa7acf3b9224..a77771dc2e95 100644 --- a/drivers/leds/leds-s3c24xx.c +++ b/drivers/leds/leds-s3c24xx.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/leds.h> | 17 | #include <linux/leds.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include <mach/hardware.h> | 21 | #include <mach/hardware.h> |
21 | #include <mach/regs-gpio.h> | 22 | #include <mach/regs-gpio.h> |
diff --git a/drivers/leds/leds-sunfire.c b/drivers/leds/leds-sunfire.c index 6b008f0c3f62..ab6d18f5c39f 100644 --- a/drivers/leds/leds-sunfire.c +++ b/drivers/leds/leds-sunfire.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/leds.h> | 9 | #include <linux/leds.h> |
10 | #include <linux/io.h> | 10 | #include <linux/io.h> |
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | #include <asm/fhc.h> | 14 | #include <asm/fhc.h> |
14 | #include <asm/upa.h> | 15 | #include <asm/upa.h> |
diff --git a/drivers/leds/leds-wm831x-status.c b/drivers/leds/leds-wm831x-status.c index c586d05e336a..ef5c24140a44 100644 --- a/drivers/leds/leds-wm831x-status.c +++ b/drivers/leds/leds-wm831x-status.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/leds.h> | 16 | #include <linux/leds.h> |
16 | #include <linux/err.h> | 17 | #include <linux/err.h> |
17 | #include <linux/mfd/wm831x/core.h> | 18 | #include <linux/mfd/wm831x/core.h> |
diff --git a/drivers/leds/leds-wm8350.c b/drivers/leds/leds-wm8350.c index 38c6bcb07e6c..5aab32ce4f4d 100644 --- a/drivers/leds/leds-wm8350.c +++ b/drivers/leds/leds-wm8350.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/mfd/wm8350/pmic.h> | 17 | #include <linux/mfd/wm8350/pmic.h> |
18 | #include <linux/regulator/consumer.h> | 18 | #include <linux/regulator/consumer.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | /* Microamps */ | 21 | /* Microamps */ |
21 | static const int isink_cur[] = { | 22 | static const int isink_cur[] = { |
diff --git a/drivers/leds/ledtrig-backlight.c b/drivers/leds/ledtrig-backlight.c index d3dfcfb417b8..f948e57bd9b8 100644 --- a/drivers/leds/ledtrig-backlight.c +++ b/drivers/leds/ledtrig-backlight.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
16 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
17 | #include <linux/leds.h> | 18 | #include <linux/leds.h> |
diff --git a/drivers/leds/ledtrig-gpio.c b/drivers/leds/ledtrig-gpio.c index f5913372d691..991d93be0f44 100644 --- a/drivers/leds/ledtrig-gpio.c +++ b/drivers/leds/ledtrig-gpio.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/workqueue.h> | 17 | #include <linux/workqueue.h> |
18 | #include <linux/leds.h> | 18 | #include <linux/leds.h> |
19 | #include <linux/slab.h> | ||
19 | #include "leds.h" | 20 | #include "leds.h" |
20 | 21 | ||
21 | struct gpio_trig_data { | 22 | struct gpio_trig_data { |
diff --git a/drivers/leds/ledtrig-heartbeat.c b/drivers/leds/ledtrig-heartbeat.c index c1c1ea6f817b..759c0bba4a8f 100644 --- a/drivers/leds/ledtrig-heartbeat.c +++ b/drivers/leds/ledtrig-heartbeat.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
18 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
19 | #include <linux/leds.h> | 20 | #include <linux/leds.h> |
diff --git a/drivers/leds/ledtrig-timer.c b/drivers/leds/ledtrig-timer.c index 38b3378be442..82b77bd482ff 100644 --- a/drivers/leds/ledtrig-timer.c +++ b/drivers/leds/ledtrig-timer.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/timer.h> | 22 | #include <linux/timer.h> |
23 | #include <linux/ctype.h> | 23 | #include <linux/ctype.h> |
24 | #include <linux/leds.h> | 24 | #include <linux/leds.h> |
25 | #include <linux/slab.h> | ||
25 | #include "leds.h" | 26 | #include "leds.h" |
26 | 27 | ||
27 | struct timer_trig_data { | 28 | struct timer_trig_data { |
diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c index 8744d24ac6e6..efa202499e37 100644 --- a/drivers/lguest/core.c +++ b/drivers/lguest/core.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/cpu.h> | 12 | #include <linux/cpu.h> |
13 | #include <linux/freezer.h> | 13 | #include <linux/freezer.h> |
14 | #include <linux/highmem.h> | 14 | #include <linux/highmem.h> |
15 | #include <linux/slab.h> | ||
15 | #include <asm/paravirt.h> | 16 | #include <asm/paravirt.h> |
16 | #include <asm/pgtable.h> | 17 | #include <asm/pgtable.h> |
17 | #include <asm/uaccess.h> | 18 | #include <asm/uaccess.h> |
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h index bc28745d05af..9136411fadd5 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/wait.h> | 10 | #include <linux/wait.h> |
11 | #include <linux/hrtimer.h> | 11 | #include <linux/hrtimer.h> |
12 | #include <linux/err.h> | 12 | #include <linux/err.h> |
13 | #include <linux/slab.h> | ||
13 | 14 | ||
14 | #include <asm/lguest.h> | 15 | #include <asm/lguest.h> |
15 | 16 | ||
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index b6200bc39b58..07090f379c63 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/virtio_ring.h> | 16 | #include <linux/virtio_ring.h> |
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/slab.h> | ||
18 | #include <asm/io.h> | 19 | #include <asm/io.h> |
19 | #include <asm/paravirt.h> | 20 | #include <asm/paravirt.h> |
20 | #include <asm/lguest_hcall.h> | 21 | #include <asm/lguest_hcall.h> |
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c index bd1632388e4a..85b714df8eae 100644 --- a/drivers/lguest/lguest_user.c +++ b/drivers/lguest/lguest_user.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/eventfd.h> | 11 | #include <linux/eventfd.h> |
12 | #include <linux/file.h> | 12 | #include <linux/file.h> |
13 | #include <linux/slab.h> | ||
13 | #include "lg.h" | 14 | #include "lg.h" |
14 | 15 | ||
15 | /*L:056 | 16 | /*L:056 |
diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c index cf94326f1b59..04b22128a474 100644 --- a/drivers/lguest/page_tables.c +++ b/drivers/lguest/page_tables.c | |||
@@ -10,6 +10,7 @@ | |||
10 | /* Copyright (C) Rusty Russell IBM Corporation 2006. | 10 | /* Copyright (C) Rusty Russell IBM Corporation 2006. |
11 | * GPL v2 and any later version */ | 11 | * GPL v2 and any later version */ |
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/gfp.h> | ||
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
14 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
15 | #include <linux/random.h> | 16 | #include <linux/random.h> |
diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index e943d2a29253..067f9962f499 100644 --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/sysctl.h> | 13 | #include <linux/sysctl.h> |
14 | #include <linux/input.h> | 14 | #include <linux/input.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | MODULE_LICENSE("GPL"); | 18 | MODULE_LICENSE("GPL"); |
18 | 19 | ||
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 93fb32038b14..7c54d80c4fb2 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/device.h> | 22 | #include <linux/device.h> |
22 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
23 | #include <linux/module.h> | 24 | #include <linux/module.h> |
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index f96feeb6b9ce..888448cf7f1f 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/mutex.h> | 38 | #include <linux/mutex.h> |
39 | #include <linux/of_device.h> | 39 | #include <linux/of_device.h> |
40 | #include <linux/of_platform.h> | 40 | #include <linux/of_platform.h> |
41 | #include <linux/slab.h> | ||
41 | 42 | ||
42 | #include <asm/byteorder.h> | 43 | #include <asm/byteorder.h> |
43 | #include <asm/io.h> | 44 | #include <asm/io.h> |
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index 921373e4e3af..b18fa948f3d1 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -114,7 +114,6 @@ | |||
114 | #include <linux/kernel.h> | 114 | #include <linux/kernel.h> |
115 | #include <linux/delay.h> | 115 | #include <linux/delay.h> |
116 | #include <linux/sched.h> | 116 | #include <linux/sched.h> |
117 | #include <linux/slab.h> | ||
118 | #include <linux/init.h> | 117 | #include <linux/init.h> |
119 | #include <linux/spinlock.h> | 118 | #include <linux/spinlock.h> |
120 | #include <linux/wait.h> | 119 | #include <linux/wait.h> |
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index 7fb8b4da35a7..0839770e4ec5 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
36 | #include <linux/i2c.h> | 36 | #include <linux/i2c.h> |
37 | #include <linux/slab.h> | ||
38 | #include <linux/init.h> | 37 | #include <linux/init.h> |
39 | #include <linux/kthread.h> | 38 | #include <linux/kthread.h> |
40 | #include <linux/of_platform.h> | 39 | #include <linux/of_platform.h> |
diff --git a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c index fb9fa614a0e8..aeb30d07d5a2 100644 --- a/drivers/macintosh/via-pmu68k.c +++ b/drivers/macintosh/via-pmu68k.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/miscdevice.h> | 25 | #include <linux/miscdevice.h> |
26 | #include <linux/blkdev.h> | 26 | #include <linux/blkdev.h> |
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
30 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
31 | 30 | ||
diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c index 419795f4a2aa..ce8897933a84 100644 --- a/drivers/macintosh/windfarm_core.c +++ b/drivers/macintosh/windfarm_core.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/init.h> | 29 | #include <linux/init.h> |
29 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
30 | #include <linux/kthread.h> | 31 | #include <linux/kthread.h> |
@@ -209,6 +210,7 @@ int wf_register_control(struct wf_control *new_ct) | |||
209 | kref_init(&new_ct->ref); | 210 | kref_init(&new_ct->ref); |
210 | list_add(&new_ct->link, &wf_controls); | 211 | list_add(&new_ct->link, &wf_controls); |
211 | 212 | ||
213 | sysfs_attr_init(&new_ct->attr.attr); | ||
212 | new_ct->attr.attr.name = new_ct->name; | 214 | new_ct->attr.attr.name = new_ct->name; |
213 | new_ct->attr.attr.mode = 0644; | 215 | new_ct->attr.attr.mode = 0644; |
214 | new_ct->attr.show = wf_show_control; | 216 | new_ct->attr.show = wf_show_control; |
diff --git a/drivers/md/dm-log-userspace-base.c b/drivers/md/dm-log-userspace-base.c index 7ac2c1450d10..1ed0094f064b 100644 --- a/drivers/md/dm-log-userspace-base.c +++ b/drivers/md/dm-log-userspace-base.c | |||
@@ -5,6 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/bio.h> | 7 | #include <linux/bio.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/dm-dirty-log.h> | 9 | #include <linux/dm-dirty-log.h> |
9 | #include <linux/device-mapper.h> | 10 | #include <linux/device-mapper.h> |
10 | #include <linux/dm-log-userspace.h> | 11 | #include <linux/dm-log-userspace.h> |
diff --git a/drivers/md/dm-log-userspace-transfer.c b/drivers/md/dm-log-userspace-transfer.c index f1c8cae70b4b..075cbcf8a9f5 100644 --- a/drivers/md/dm-log-userspace-transfer.c +++ b/drivers/md/dm-log-userspace-transfer.c | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/slab.h> | ||
9 | #include <net/sock.h> | 10 | #include <net/sock.h> |
10 | #include <linux/workqueue.h> | 11 | #include <linux/workqueue.h> |
11 | #include <linux/connector.h> | 12 | #include <linux/connector.h> |
diff --git a/drivers/md/dm-region-hash.c b/drivers/md/dm-region-hash.c index 168bd38f5006..bd5c58b28868 100644 --- a/drivers/md/dm-region-hash.c +++ b/drivers/md/dm-region-hash.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/ctype.h> | 11 | #include <linux/ctype.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/vmalloc.h> | 15 | #include <linux/vmalloc.h> |
15 | 16 | ||
16 | #include "dm.h" | 17 | #include "dm.h" |
diff --git a/drivers/md/dm-service-time.c b/drivers/md/dm-service-time.c index cfa668f46c40..9c6c2e47ad62 100644 --- a/drivers/md/dm-service-time.c +++ b/drivers/md/dm-service-time.c | |||
@@ -11,6 +11,8 @@ | |||
11 | #include "dm.h" | 11 | #include "dm.h" |
12 | #include "dm-path-selector.h" | 12 | #include "dm-path-selector.h" |
13 | 13 | ||
14 | #include <linux/slab.h> | ||
15 | |||
14 | #define DM_MSG_PREFIX "multipath service-time" | 16 | #define DM_MSG_PREFIX "multipath service-time" |
15 | #define ST_MIN_IO 1 | 17 | #define ST_MIN_IO 1 |
16 | #define ST_MAX_RELATIVE_THROUGHPUT 100 | 18 | #define ST_MAX_RELATIVE_THROUGHPUT 100 |
diff --git a/drivers/md/dm-target.c b/drivers/md/dm-target.c index 04feccf2a997..11dea11dc0b6 100644 --- a/drivers/md/dm-target.c +++ b/drivers/md/dm-target.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/kmod.h> | 11 | #include <linux/kmod.h> |
12 | #include <linux/bio.h> | 12 | #include <linux/bio.h> |
13 | #include <linux/slab.h> | ||
14 | 13 | ||
15 | #define DM_MSG_PREFIX "target" | 14 | #define DM_MSG_PREFIX "target" |
16 | 15 | ||
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c index 713acd02ab39..8e3850b98cca 100644 --- a/drivers/md/faulty.c +++ b/drivers/md/faulty.c | |||
@@ -64,6 +64,7 @@ | |||
64 | #define MaxFault 50 | 64 | #define MaxFault 50 |
65 | #include <linux/blkdev.h> | 65 | #include <linux/blkdev.h> |
66 | #include <linux/raid/md_u.h> | 66 | #include <linux/raid/md_u.h> |
67 | #include <linux/slab.h> | ||
67 | #include "md.h" | 68 | #include "md.h" |
68 | #include <linux/seq_file.h> | 69 | #include <linux/seq_file.h> |
69 | 70 | ||
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index bb2a23159b21..09437e958235 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/blkdev.h> | 19 | #include <linux/blkdev.h> |
20 | #include <linux/raid/md_u.h> | 20 | #include <linux/raid/md_u.h> |
21 | #include <linux/seq_file.h> | 21 | #include <linux/seq_file.h> |
22 | #include <linux/slab.h> | ||
22 | #include "md.h" | 23 | #include "md.h" |
23 | #include "linear.h" | 24 | #include "linear.h" |
24 | 25 | ||
diff --git a/drivers/md/md.c b/drivers/md/md.c index fdc1890b6ac5..9712b2e97be4 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/delay.h> | 49 | #include <linux/delay.h> |
50 | #include <linux/raid/md_p.h> | 50 | #include <linux/raid/md_p.h> |
51 | #include <linux/raid/md_u.h> | 51 | #include <linux/raid/md_u.h> |
52 | #include <linux/slab.h> | ||
52 | #include "md.h" | 53 | #include "md.h" |
53 | #include "bitmap.h" | 54 | #include "bitmap.h" |
54 | 55 | ||
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 5558ebc705c8..789bf535d29c 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
23 | #include <linux/raid/md_u.h> | 23 | #include <linux/raid/md_u.h> |
24 | #include <linux/seq_file.h> | 24 | #include <linux/seq_file.h> |
25 | #include <linux/slab.h> | ||
25 | #include "md.h" | 26 | #include "md.h" |
26 | #include "multipath.h" | 27 | #include "multipath.h" |
27 | 28 | ||
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 377cf2a3c333..c3bec024612e 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/blkdev.h> | 21 | #include <linux/blkdev.h> |
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/slab.h> | ||
23 | #include "md.h" | 24 | #include "md.h" |
24 | #include "raid0.h" | 25 | #include "raid0.h" |
25 | 26 | ||
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index f741f77eeb2b..e59b10e66edb 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 31 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/slab.h> | ||
34 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
35 | #include <linux/blkdev.h> | 36 | #include <linux/blkdev.h> |
36 | #include <linux/seq_file.h> | 37 | #include <linux/seq_file.h> |
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index b4ba41ecbd20..e2766d8251a1 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 18 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/slab.h> | ||
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
22 | #include <linux/blkdev.h> | 23 | #include <linux/blkdev.h> |
23 | #include <linux/seq_file.h> | 24 | #include <linux/seq_file.h> |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 70ffbd071b2e..e3e9a36ea3b7 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/async.h> | 50 | #include <linux/async.h> |
51 | #include <linux/seq_file.h> | 51 | #include <linux/seq_file.h> |
52 | #include <linux/cpu.h> | 52 | #include <linux/cpu.h> |
53 | #include <linux/slab.h> | ||
53 | #include "md.h" | 54 | #include "md.h" |
54 | #include "raid5.h" | 55 | #include "raid5.h" |
55 | #include "bitmap.h" | 56 | #include "bitmap.h" |
diff --git a/drivers/md/raid6algos.c b/drivers/md/raid6algos.c index bffc61bff5ab..1f8784bfd44d 100644 --- a/drivers/md/raid6algos.c +++ b/drivers/md/raid6algos.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/raid/pq.h> | 19 | #include <linux/raid/pq.h> |
20 | #include <linux/gfp.h> | ||
20 | #ifndef __KERNEL__ | 21 | #ifndef __KERNEL__ |
21 | #include <sys/mman.h> | 22 | #include <sys/mman.h> |
22 | #include <stdio.h> | 23 | #include <stdio.h> |
diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index 0a3b4ed38e48..bfca26d51827 100644 --- a/drivers/media/IR/ir-keytable.c +++ b/drivers/media/IR/ir-keytable.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | 15 | ||
16 | #include <linux/input.h> | 16 | #include <linux/input.h> |
17 | #include <linux/slab.h> | ||
17 | #include <media/ir-common.h> | 18 | #include <media/ir-common.h> |
18 | 19 | ||
19 | #define IR_TAB_MIN_SIZE 32 | 20 | #define IR_TAB_MIN_SIZE 32 |
diff --git a/drivers/media/IR/ir-sysfs.c b/drivers/media/IR/ir-sysfs.c index bf5fbcd84238..e14e6c486b52 100644 --- a/drivers/media/IR/ir-sysfs.c +++ b/drivers/media/IR/ir-sysfs.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/slab.h> | ||
15 | #include <linux/input.h> | 16 | #include <linux/input.h> |
16 | #include <linux/device.h> | 17 | #include <linux/device.h> |
17 | #include <media/ir-core.h> | 18 | #include <media/ir-core.h> |
diff --git a/drivers/media/common/tuners/max2165.c b/drivers/media/common/tuners/max2165.c index 3d03640cf1fe..937e4b00d7ee 100644 --- a/drivers/media/common/tuners/max2165.c +++ b/drivers/media/common/tuners/max2165.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/dvb/frontend.h> | 26 | #include <linux/dvb/frontend.h> |
27 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include "dvb_frontend.h" | 30 | #include "dvb_frontend.h" |
30 | 31 | ||
diff --git a/drivers/media/common/tuners/mc44s803.c b/drivers/media/common/tuners/mc44s803.c index 20c4485ce16a..fe5c4b8d83ee 100644 --- a/drivers/media/common/tuners/mc44s803.c +++ b/drivers/media/common/tuners/mc44s803.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/dvb/frontend.h> | 24 | #include <linux/dvb/frontend.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "dvb_frontend.h" | 28 | #include "dvb_frontend.h" |
28 | 29 | ||
diff --git a/drivers/media/common/tuners/mt2060.c b/drivers/media/common/tuners/mt2060.c index c7abe3d8f90e..2d0e7689c6a2 100644 --- a/drivers/media/common/tuners/mt2060.c +++ b/drivers/media/common/tuners/mt2060.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/dvb/frontend.h> | 26 | #include <linux/dvb/frontend.h> |
27 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include "dvb_frontend.h" | 30 | #include "dvb_frontend.h" |
30 | 31 | ||
diff --git a/drivers/media/common/tuners/mt20xx.c b/drivers/media/common/tuners/mt20xx.c index 44608ad4e2d2..d0e70e10a717 100644 --- a/drivers/media/common/tuners/mt20xx.c +++ b/drivers/media/common/tuners/mt20xx.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | #include <linux/delay.h> | 7 | #include <linux/delay.h> |
8 | #include <linux/i2c.h> | 8 | #include <linux/i2c.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/videodev2.h> | 10 | #include <linux/videodev2.h> |
10 | #include "tuner-i2c.h" | 11 | #include "tuner-i2c.h" |
11 | #include "mt20xx.h" | 12 | #include "mt20xx.h" |
diff --git a/drivers/media/common/tuners/mt2131.c b/drivers/media/common/tuners/mt2131.c index e8d3c48f8605..a4f830bb25d1 100644 --- a/drivers/media/common/tuners/mt2131.c +++ b/drivers/media/common/tuners/mt2131.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/dvb/frontend.h> | 24 | #include <linux/dvb/frontend.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "dvb_frontend.h" | 28 | #include "dvb_frontend.h" |
28 | 29 | ||
diff --git a/drivers/media/common/tuners/mt2266.c b/drivers/media/common/tuners/mt2266.c index 54b18f94b14b..25a8ea342c46 100644 --- a/drivers/media/common/tuners/mt2266.c +++ b/drivers/media/common/tuners/mt2266.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/dvb/frontend.h> | 19 | #include <linux/dvb/frontend.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include "dvb_frontend.h" | 23 | #include "dvb_frontend.h" |
23 | #include "mt2266.h" | 24 | #include "mt2266.h" |
diff --git a/drivers/media/common/tuners/tda827x.c b/drivers/media/common/tuners/tda827x.c index 36a7bc7585ab..b21b6ea68b25 100644 --- a/drivers/media/common/tuners/tda827x.c +++ b/drivers/media/common/tuners/tda827x.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
22 | #include <asm/types.h> | 23 | #include <asm/types.h> |
23 | #include <linux/dvb/frontend.h> | 24 | #include <linux/dvb/frontend.h> |
24 | #include <linux/videodev2.h> | 25 | #include <linux/videodev2.h> |
diff --git a/drivers/media/common/tuners/tda8290.c b/drivers/media/common/tuners/tda8290.c index 2833137fa819..c9062ceddc71 100644 --- a/drivers/media/common/tuners/tda8290.c +++ b/drivers/media/common/tuners/tda8290.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
25 | #include <linux/videodev2.h> | 26 | #include <linux/videodev2.h> |
26 | #include "tuner-i2c.h" | 27 | #include "tuner-i2c.h" |
diff --git a/drivers/media/common/tuners/tda9887.c b/drivers/media/common/tuners/tda9887.c index a71c100c95df..bf14bd79e2fc 100644 --- a/drivers/media/common/tuners/tda9887.c +++ b/drivers/media/common/tuners/tda9887.c | |||
@@ -4,7 +4,6 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
6 | #include <linux/errno.h> | 6 | #include <linux/errno.h> |
7 | #include <linux/slab.h> | ||
8 | #include <linux/delay.h> | 7 | #include <linux/delay.h> |
9 | #include <linux/videodev2.h> | 8 | #include <linux/videodev2.h> |
10 | #include <media/v4l2-common.h> | 9 | #include <media/v4l2-common.h> |
diff --git a/drivers/media/common/tuners/tea5761.c b/drivers/media/common/tuners/tea5761.c index 60ed872f3d44..925399dffbed 100644 --- a/drivers/media/common/tuners/tea5761.c +++ b/drivers/media/common/tuners/tea5761.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/i2c.h> | 10 | #include <linux/i2c.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
12 | #include <linux/videodev2.h> | 13 | #include <linux/videodev2.h> |
13 | #include <media/tuner.h> | 14 | #include <media/tuner.h> |
diff --git a/drivers/media/common/tuners/tea5767.c b/drivers/media/common/tuners/tea5767.c index 223a226d20a1..36e85d81acb2 100644 --- a/drivers/media/common/tuners/tea5767.c +++ b/drivers/media/common/tuners/tea5767.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
15 | #include <linux/videodev2.h> | 16 | #include <linux/videodev2.h> |
16 | #include "tuner-i2c.h" | 17 | #include "tuner-i2c.h" |
diff --git a/drivers/media/common/tuners/tuner-i2c.h b/drivers/media/common/tuners/tuner-i2c.h index cb1c7141f0c6..18f005634c67 100644 --- a/drivers/media/common/tuners/tuner-i2c.h +++ b/drivers/media/common/tuners/tuner-i2c.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #define __TUNER_I2C_H__ | 22 | #define __TUNER_I2C_H__ |
23 | 23 | ||
24 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | struct tuner_i2c_props { | 27 | struct tuner_i2c_props { |
27 | u8 addr; | 28 | u8 addr; |
diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index be51c294b375..96d61707f501 100644 --- a/drivers/media/common/tuners/tuner-xc2028.c +++ b/drivers/media/common/tuners/tuner-xc2028.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <media/tuner.h> | 16 | #include <media/tuner.h> |
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | #include <linux/slab.h> | ||
18 | #include <asm/unaligned.h> | 19 | #include <asm/unaligned.h> |
19 | #include "tuner-i2c.h" | 20 | #include "tuner-i2c.h" |
20 | #include "tuner-xc2028.h" | 21 | #include "tuner-xc2028.h" |
diff --git a/drivers/media/dvb/bt8xx/dst_ca.c b/drivers/media/dvb/bt8xx/dst_ca.c index 0e246eaad05a..770243c720d2 100644 --- a/drivers/media/dvb/bt8xx/dst_ca.c +++ b/drivers/media/dvb/bt8xx/dst_ca.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/smp_lock.h> | 25 | #include <linux/smp_lock.h> |
25 | #include <linux/string.h> | 26 | #include <linux/string.h> |
diff --git a/drivers/media/dvb/dm1105/dm1105.c b/drivers/media/dvb/dm1105/dm1105.c index 383cca378b8c..b6d46961a99e 100644 --- a/drivers/media/dvb/dm1105/dm1105.c +++ b/drivers/media/dvb/dm1105/dm1105.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/dma-mapping.h> | 28 | #include <linux/dma-mapping.h> |
29 | #include <linux/input.h> | 29 | #include <linux/input.h> |
30 | #include <linux/slab.h> | ||
30 | #include <media/ir-common.h> | 31 | #include <media/ir-common.h> |
31 | 32 | ||
32 | #include "demux.h" | 33 | #include "demux.h" |
diff --git a/drivers/media/dvb/dvb-core/dmxdev.h b/drivers/media/dvb/dvb-core/dmxdev.h index c1379b56dfb4..02ebe28f830d 100644 --- a/drivers/media/dvb/dvb-core/dmxdev.h +++ b/drivers/media/dvb/dvb-core/dmxdev.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/fs.h> | 31 | #include <linux/fs.h> |
32 | #include <linux/string.h> | 32 | #include <linux/string.h> |
33 | #include <linux/mutex.h> | 33 | #include <linux/mutex.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include <linux/dvb/dmx.h> | 36 | #include <linux/dvb/dmx.h> |
36 | 37 | ||
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h index 80dda308ff74..bf0e6bed28dd 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.h +++ b/drivers/media/dvb/dvb-core/dvb_frontend.h | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
37 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
38 | #include <linux/mutex.h> | 38 | #include <linux/mutex.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | #include <linux/dvb/frontend.h> | 41 | #include <linux/dvb/frontend.h> |
41 | 42 | ||
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index d7975383d31b..74d94e45324d 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/hash.h> | 24 | #include <linux/hash.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "af9015.h" | 27 | #include "af9015.h" |
27 | #include "af9013.h" | 28 | #include "af9013.h" |
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index a7b8405c291e..960376da7d59 100644 --- a/drivers/media/dvb/dvb-usb/cxusb.c +++ b/drivers/media/dvb/dvb-usb/cxusb.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | #include <media/tuner.h> | 26 | #include <media/tuner.h> |
27 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include "cxusb.h" | 30 | #include "cxusb.h" |
30 | 31 | ||
diff --git a/drivers/media/dvb/firewire/firedtv-1394.c b/drivers/media/dvb/firewire/firedtv-1394.c index c3e0ec2dcfca..26333b4f4d3e 100644 --- a/drivers/media/dvb/firewire/firedtv-1394.c +++ b/drivers/media/dvb/firewire/firedtv-1394.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
19 | #include <linux/types.h> | 20 | #include <linux/types.h> |
20 | 21 | ||
diff --git a/drivers/media/dvb/firewire/firedtv-rc.c b/drivers/media/dvb/firewire/firedtv-rc.c index 599d66e5843d..fcf3828472b8 100644 --- a/drivers/media/dvb/firewire/firedtv-rc.c +++ b/drivers/media/dvb/firewire/firedtv-rc.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/bitops.h> | 12 | #include <linux/bitops.h> |
13 | #include <linux/input.h> | 13 | #include <linux/input.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/string.h> | 16 | #include <linux/string.h> |
16 | #include <linux/types.h> | 17 | #include <linux/types.h> |
17 | #include <linux/workqueue.h> | 18 | #include <linux/workqueue.h> |
diff --git a/drivers/media/dvb/frontends/au8522_dig.c b/drivers/media/dvb/frontends/au8522_dig.c index 956b80f4979c..a1fed0fa8ed4 100644 --- a/drivers/media/dvb/frontends/au8522_dig.c +++ b/drivers/media/dvb/frontends/au8522_dig.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
28 | #include "dvb_frontend.h" | 27 | #include "dvb_frontend.h" |
29 | #include "au8522.h" | 28 | #include "au8522.h" |
diff --git a/drivers/media/dvb/frontends/dib0070.c b/drivers/media/dvb/frontends/dib0070.c index 0d12763603b4..d4e466a90e43 100644 --- a/drivers/media/dvb/frontends/dib0070.c +++ b/drivers/media/dvb/frontends/dib0070.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/i2c.h> | 29 | #include <linux/i2c.h> |
29 | 30 | ||
30 | #include "dvb_frontend.h" | 31 | #include "dvb_frontend.h" |
diff --git a/drivers/media/dvb/frontends/dib0090.c b/drivers/media/dvb/frontends/dib0090.c index 7eac178f57b2..65240b7801e8 100644 --- a/drivers/media/dvb/frontends/dib0090.c +++ b/drivers/media/dvb/frontends/dib0090.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/i2c.h> | 29 | #include <linux/i2c.h> |
29 | 30 | ||
30 | #include "dvb_frontend.h" | 31 | #include "dvb_frontend.h" |
diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c index fa851601e7d4..40a099810279 100644 --- a/drivers/media/dvb/frontends/dib3000mc.c +++ b/drivers/media/dvb/frontends/dib3000mc.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
16 | 17 | ||
17 | #include "dvb_frontend.h" | 18 | #include "dvb_frontend.h" |
diff --git a/drivers/media/dvb/frontends/dib7000m.c b/drivers/media/dvb/frontends/dib7000m.c index 0109720353bd..0f09fd31cb29 100644 --- a/drivers/media/dvb/frontends/dib7000m.c +++ b/drivers/media/dvb/frontends/dib7000m.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * published by the Free Software Foundation, version 2. | 9 | * published by the Free Software Foundation, version 2. |
10 | */ | 10 | */ |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
13 | 14 | ||
14 | #include "dvb_frontend.h" | 15 | #include "dvb_frontend.h" |
diff --git a/drivers/media/dvb/frontends/dib7000p.c b/drivers/media/dvb/frontends/dib7000p.c index 750ae61a20f4..85468a45c344 100644 --- a/drivers/media/dvb/frontends/dib7000p.c +++ b/drivers/media/dvb/frontends/dib7000p.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * published by the Free Software Foundation, version 2. | 8 | * published by the Free Software Foundation, version 2. |
9 | */ | 9 | */ |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/i2c.h> | 12 | #include <linux/i2c.h> |
12 | 13 | ||
13 | #include "dvb_math.h" | 14 | #include "dvb_math.h" |
diff --git a/drivers/media/dvb/frontends/dib8000.c b/drivers/media/dvb/frontends/dib8000.c index 2aa97dd6a8af..df17b91b3250 100644 --- a/drivers/media/dvb/frontends/dib8000.c +++ b/drivers/media/dvb/frontends/dib8000.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * published by the Free Software Foundation, version 2. | 8 | * published by the Free Software Foundation, version 2. |
9 | */ | 9 | */ |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/i2c.h> | 12 | #include <linux/i2c.h> |
12 | #include "dvb_math.h" | 13 | #include "dvb_math.h" |
13 | 14 | ||
diff --git a/drivers/media/dvb/frontends/drx397xD.c b/drivers/media/dvb/frontends/drx397xD.c index 868b78bfae75..f74cca6dc26b 100644 --- a/drivers/media/dvb/frontends/drx397xD.c +++ b/drivers/media/dvb/frontends/drx397xD.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/string.h> | 27 | #include <linux/string.h> |
28 | #include <linux/firmware.h> | 28 | #include <linux/firmware.h> |
29 | #include <linux/slab.h> | ||
29 | #include <asm/div64.h> | 30 | #include <asm/div64.h> |
30 | 31 | ||
31 | #include "dvb_frontend.h" | 32 | #include "dvb_frontend.h" |
diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c index 6d865d6161d7..4d4d0bb5920a 100644 --- a/drivers/media/dvb/frontends/dvb-pll.c +++ b/drivers/media/dvb/frontends/dvb-pll.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/slab.h> | ||
21 | #include <linux/module.h> | 22 | #include <linux/module.h> |
22 | #include <linux/dvb/frontend.h> | 23 | #include <linux/dvb/frontend.h> |
23 | #include <asm/types.h> | 24 | #include <asm/types.h> |
diff --git a/drivers/media/dvb/frontends/itd1000.c b/drivers/media/dvb/frontends/itd1000.c index 600dad6b41ea..f7a40a18777a 100644 --- a/drivers/media/dvb/frontends/itd1000.c +++ b/drivers/media/dvb/frontends/itd1000.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/dvb/frontend.h> | 25 | #include <linux/dvb/frontend.h> |
26 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include "dvb_frontend.h" | 29 | #include "dvb_frontend.h" |
29 | 30 | ||
diff --git a/drivers/media/dvb/frontends/lgdt3304.c b/drivers/media/dvb/frontends/lgdt3304.c index e334b5d4e578..45a529b06b9d 100644 --- a/drivers/media/dvb/frontends/lgdt3304.c +++ b/drivers/media/dvb/frontends/lgdt3304.c | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
11 | #include "dvb_frontend.h" | 12 | #include "dvb_frontend.h" |
12 | #include "lgdt3304.h" | 13 | #include "lgdt3304.h" |
diff --git a/drivers/media/dvb/frontends/lgdt3305.c b/drivers/media/dvb/frontends/lgdt3305.c index fde8c59700fb..d69c775f8645 100644 --- a/drivers/media/dvb/frontends/lgdt3305.c +++ b/drivers/media/dvb/frontends/lgdt3305.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <asm/div64.h> | 22 | #include <asm/div64.h> |
23 | #include <linux/dvb/frontend.h> | 23 | #include <linux/dvb/frontend.h> |
24 | #include <linux/slab.h> | ||
24 | #include "dvb_math.h" | 25 | #include "dvb_math.h" |
25 | #include "lgdt3305.h" | 26 | #include "lgdt3305.h" |
26 | 27 | ||
diff --git a/drivers/media/dvb/frontends/mb86a16.c b/drivers/media/dvb/frontends/mb86a16.c index d05f7500e0c5..599d1aa519a3 100644 --- a/drivers/media/dvb/frontends/mb86a16.c +++ b/drivers/media/dvb/frontends/mb86a16.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/moduleparam.h> | 24 | #include <linux/moduleparam.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "dvb_frontend.h" | 27 | #include "dvb_frontend.h" |
27 | #include "mb86a16.h" | 28 | #include "mb86a16.h" |
diff --git a/drivers/media/dvb/frontends/s921_module.c b/drivers/media/dvb/frontends/s921_module.c index 3156b64cfc96..0eefff61cc50 100644 --- a/drivers/media/dvb/frontends/s921_module.c +++ b/drivers/media/dvb/frontends/s921_module.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
13 | #include "dvb_frontend.h" | 14 | #include "dvb_frontend.h" |
14 | #include "s921_module.h" | 15 | #include "s921_module.h" |
diff --git a/drivers/media/dvb/frontends/stb0899_drv.c b/drivers/media/dvb/frontends/stb0899_drv.c index 1570669837ea..8e38fcee564e 100644 --- a/drivers/media/dvb/frontends/stb0899_drv.c +++ b/drivers/media/dvb/frontends/stb0899_drv.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/string.h> | 26 | #include <linux/string.h> |
26 | 27 | ||
27 | #include <linux/dvb/frontend.h> | 28 | #include <linux/dvb/frontend.h> |
diff --git a/drivers/media/dvb/frontends/stb6000.c b/drivers/media/dvb/frontends/stb6000.c index 0e2cb0df1441..ed699647050e 100644 --- a/drivers/media/dvb/frontends/stb6000.c +++ b/drivers/media/dvb/frontends/stb6000.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/slab.h> | ||
23 | #include <linux/module.h> | 24 | #include <linux/module.h> |
24 | #include <linux/dvb/frontend.h> | 25 | #include <linux/dvb/frontend.h> |
25 | #include <asm/types.h> | 26 | #include <asm/types.h> |
diff --git a/drivers/media/dvb/frontends/stb6100.c b/drivers/media/dvb/frontends/stb6100.c index 60ee18a94f43..f73c13323e90 100644 --- a/drivers/media/dvb/frontends/stb6100.c +++ b/drivers/media/dvb/frontends/stb6100.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/string.h> | 26 | #include <linux/string.h> |
26 | 27 | ||
27 | #include "dvb_frontend.h" | 28 | #include "dvb_frontend.h" |
diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c index c52c3357dc54..a3c07fe0e6c4 100644 --- a/drivers/media/dvb/frontends/stv090x.c +++ b/drivers/media/dvb/frontends/stv090x.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
27 | 28 | ||
28 | #include <linux/dvb/frontend.h> | 29 | #include <linux/dvb/frontend.h> |
diff --git a/drivers/media/dvb/frontends/stv6110.c b/drivers/media/dvb/frontends/stv6110.c index bef0cc838471..2dca7c8e5148 100644 --- a/drivers/media/dvb/frontends/stv6110.c +++ b/drivers/media/dvb/frontends/stv6110.c | |||
@@ -22,6 +22,7 @@ | |||
22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/slab.h> | ||
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
26 | #include <linux/dvb/frontend.h> | 27 | #include <linux/dvb/frontend.h> |
27 | 28 | ||
diff --git a/drivers/media/dvb/frontends/stv6110x.c b/drivers/media/dvb/frontends/stv6110x.c index f931ed07e92d..dea4245f077c 100644 --- a/drivers/media/dvb/frontends/stv6110x.c +++ b/drivers/media/dvb/frontends/stv6110x.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/string.h> | 27 | #include <linux/string.h> |
27 | 28 | ||
28 | #include "dvb_frontend.h" | 29 | #include "dvb_frontend.h" |
diff --git a/drivers/media/dvb/frontends/tda665x.c b/drivers/media/dvb/frontends/tda665x.c index c44fefe92d97..2c1c759a4f42 100644 --- a/drivers/media/dvb/frontends/tda665x.c +++ b/drivers/media/dvb/frontends/tda665x.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include "dvb_frontend.h" | 25 | #include "dvb_frontend.h" |
25 | #include "tda665x.h" | 26 | #include "tda665x.h" |
diff --git a/drivers/media/dvb/frontends/tda8261.c b/drivers/media/dvb/frontends/tda8261.c index 614afcec05f1..1742056a34e8 100644 --- a/drivers/media/dvb/frontends/tda8261.c +++ b/drivers/media/dvb/frontends/tda8261.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include "dvb_frontend.h" | 26 | #include "dvb_frontend.h" |
26 | #include "tda8261.h" | 27 | #include "tda8261.h" |
diff --git a/drivers/media/dvb/frontends/tda826x.c b/drivers/media/dvb/frontends/tda826x.c index a051554b5e25..06c94800b940 100644 --- a/drivers/media/dvb/frontends/tda826x.c +++ b/drivers/media/dvb/frontends/tda826x.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/slab.h> | ||
23 | #include <linux/module.h> | 24 | #include <linux/module.h> |
24 | #include <linux/dvb/frontend.h> | 25 | #include <linux/dvb/frontend.h> |
25 | #include <asm/types.h> | 26 | #include <asm/types.h> |
diff --git a/drivers/media/dvb/frontends/tua6100.c b/drivers/media/dvb/frontends/tua6100.c index 1790baee014c..bcb95c2ef296 100644 --- a/drivers/media/dvb/frontends/tua6100.c +++ b/drivers/media/dvb/frontends/tua6100.c | |||
@@ -28,6 +28,7 @@ | |||
28 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 28 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/slab.h> | ||
31 | #include <linux/module.h> | 32 | #include <linux/module.h> |
32 | #include <linux/dvb/frontend.h> | 33 | #include <linux/dvb/frontend.h> |
33 | #include <asm/types.h> | 34 | #include <asm/types.h> |
diff --git a/drivers/media/dvb/frontends/zl10036.c b/drivers/media/dvb/frontends/zl10036.c index 34c5de491d2b..4627f491656b 100644 --- a/drivers/media/dvb/frontends/zl10036.c +++ b/drivers/media/dvb/frontends/zl10036.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/dvb/frontend.h> | 31 | #include <linux/dvb/frontend.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/types.h> | 33 | #include <linux/types.h> |
33 | 34 | ||
34 | #include "zl10036.h" | 35 | #include "zl10036.h" |
diff --git a/drivers/media/dvb/mantis/hopper_cards.c b/drivers/media/dvb/mantis/hopper_cards.c index d073c61e3c0d..09e9fc785189 100644 --- a/drivers/media/dvb/mantis/hopper_cards.c +++ b/drivers/media/dvb/mantis/hopper_cards.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/moduleparam.h> | 22 | #include <linux/moduleparam.h> |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/slab.h> | ||
25 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
26 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
27 | 28 | ||
diff --git a/drivers/media/dvb/mantis/mantis_ca.c b/drivers/media/dvb/mantis/mantis_ca.c index 403ce043d00e..330216febd78 100644 --- a/drivers/media/dvb/mantis/mantis_ca.c +++ b/drivers/media/dvb/mantis/mantis_ca.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/signal.h> | 21 | #include <linux/signal.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
23 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
24 | 25 | ||
diff --git a/drivers/media/dvb/mantis/mantis_cards.c b/drivers/media/dvb/mantis/mantis_cards.c index 16f1708fd3bc..cf4b39ffdaad 100644 --- a/drivers/media/dvb/mantis/mantis_cards.c +++ b/drivers/media/dvb/mantis/mantis_cards.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/moduleparam.h> | 22 | #include <linux/moduleparam.h> |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/slab.h> | ||
25 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
26 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
27 | 28 | ||
diff --git a/drivers/media/dvb/ngene/ngene-core.c b/drivers/media/dvb/ngene/ngene-core.c index 0150dfe7cfbb..645e8b8a7137 100644 --- a/drivers/media/dvb/ngene/ngene-core.c +++ b/drivers/media/dvb/ngene/ngene-core.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <linux/slab.h> | ||
34 | #include <linux/poll.h> | 33 | #include <linux/poll.h> |
35 | #include <linux/io.h> | 34 | #include <linux/io.h> |
36 | #include <asm/div64.h> | 35 | #include <asm/div64.h> |
diff --git a/drivers/media/dvb/pluto2/pluto2.c b/drivers/media/dvb/pluto2/pluto2.c index 80d14a065bad..1c798219dc7c 100644 --- a/drivers/media/dvb/pluto2/pluto2.c +++ b/drivers/media/dvb/pluto2/pluto2.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
32 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include "demux.h" | 35 | #include "demux.h" |
35 | #include "dmxdev.h" | 36 | #include "dmxdev.h" |
diff --git a/drivers/media/dvb/pt1/pt1.c b/drivers/media/dvb/pt1/pt1.c index 81e623a90f09..6aded234aa61 100644 --- a/drivers/media/dvb/pt1/pt1.c +++ b/drivers/media/dvb/pt1/pt1.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
27 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
28 | #include <linux/kthread.h> | 29 | #include <linux/kthread.h> |
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index 4bfd3451b568..0c87a3c3899a 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/dma-mapping.h> | 28 | #include <linux/dma-mapping.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/io.h> | 30 | #include <linux/io.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | #include <linux/firmware.h> | 33 | #include <linux/firmware.h> |
33 | #include <linux/wait.h> | 34 | #include <linux/wait.h> |
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c index 5f3939821ca3..b80d09b035a1 100644 --- a/drivers/media/dvb/siano/smsdvb.c +++ b/drivers/media/dvb/siano/smsdvb.c | |||
@@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
20 | ****************************************************************/ | 20 | ****************************************************************/ |
21 | 21 | ||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | 25 | ||
25 | #include "dmxdev.h" | 26 | #include "dmxdev.h" |
diff --git a/drivers/media/dvb/siano/smssdio.c b/drivers/media/dvb/siano/smssdio.c index 195244a3e69b..e57d38b0197c 100644 --- a/drivers/media/dvb/siano/smssdio.c +++ b/drivers/media/dvb/siano/smssdio.c | |||
@@ -33,6 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/moduleparam.h> | 35 | #include <linux/moduleparam.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/firmware.h> | 37 | #include <linux/firmware.h> |
37 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
38 | #include <linux/mmc/card.h> | 39 | #include <linux/mmc/card.h> |
diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c index 5eac27287d9c..a9c27fb69ba7 100644 --- a/drivers/media/dvb/siano/smsusb.c +++ b/drivers/media/dvb/siano/smsusb.c | |||
@@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/usb.h> | 24 | #include <linux/usb.h> |
25 | #include <linux/firmware.h> | 25 | #include <linux/firmware.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "smscoreapi.h" | 28 | #include "smscoreapi.h" |
28 | #include "sms-cards.h" | 29 | #include "sms-cards.h" |
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index baf3159a3aa6..38915591c6e5 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/crc32.h> | 49 | #include <linux/crc32.h> |
50 | #include <linux/i2c.h> | 50 | #include <linux/i2c.h> |
51 | #include <linux/kthread.h> | 51 | #include <linux/kthread.h> |
52 | #include <linux/slab.h> | ||
52 | #include <asm/unaligned.h> | 53 | #include <asm/unaligned.h> |
53 | #include <asm/byteorder.h> | 54 | #include <asm/byteorder.h> |
54 | 55 | ||
diff --git a/drivers/media/dvb/ttpci/av7110_ca.c b/drivers/media/dvb/ttpci/av7110_ca.c index c7a65b1544a3..ac7779c45c5b 100644 --- a/drivers/media/dvb/ttpci/av7110_ca.c +++ b/drivers/media/dvb/ttpci/av7110_ca.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/fs.h> | 34 | #include <linux/fs.h> |
35 | #include <linux/timer.h> | 35 | #include <linux/timer.h> |
36 | #include <linux/poll.h> | 36 | #include <linux/poll.h> |
37 | #include <linux/gfp.h> | ||
37 | 38 | ||
38 | #include "av7110.h" | 39 | #include "av7110.h" |
39 | #include "av7110_hw.h" | 40 | #include "av7110_hw.h" |
diff --git a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c index 000f4d34087c..79039674a0e0 100644 --- a/drivers/media/radio/radio-gemtek-pci.c +++ b/drivers/media/radio/radio-gemtek-pci.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/errno.h> | 48 | #include <linux/errno.h> |
49 | #include <linux/version.h> /* for KERNEL_VERSION MACRO */ | 49 | #include <linux/version.h> /* for KERNEL_VERSION MACRO */ |
50 | #include <linux/io.h> | 50 | #include <linux/io.h> |
51 | #include <linux/slab.h> | ||
51 | #include <media/v4l2-device.h> | 52 | #include <media/v4l2-device.h> |
52 | #include <media/v4l2-ioctl.h> | 53 | #include <media/v4l2-ioctl.h> |
53 | 54 | ||
diff --git a/drivers/media/radio/radio-maestro.c b/drivers/media/radio/radio-maestro.c index f8213b7c8ddc..08f1051979ca 100644 --- a/drivers/media/radio/radio-maestro.c +++ b/drivers/media/radio/radio-maestro.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/pci.h> | 26 | #include <linux/pci.h> |
27 | #include <linux/videodev2.h> | 27 | #include <linux/videodev2.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/slab.h> | ||
29 | #include <media/v4l2-device.h> | 30 | #include <media/v4l2-device.h> |
30 | #include <media/v4l2-ioctl.h> | 31 | #include <media/v4l2-ioctl.h> |
31 | 32 | ||
diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c index 44b4dbedb322..4349213b403b 100644 --- a/drivers/media/radio/radio-maxiradio.c +++ b/drivers/media/radio/radio-maxiradio.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/videodev2.h> | 42 | #include <linux/videodev2.h> |
43 | #include <linux/version.h> /* for KERNEL_VERSION MACRO */ | 43 | #include <linux/version.h> /* for KERNEL_VERSION MACRO */ |
44 | #include <linux/io.h> | 44 | #include <linux/io.h> |
45 | #include <linux/slab.h> | ||
45 | #include <media/v4l2-device.h> | 46 | #include <media/v4l2-device.h> |
46 | #include <media/v4l2-ioctl.h> | 47 | #include <media/v4l2-ioctl.h> |
47 | 48 | ||
diff --git a/drivers/media/radio/radio-si4713.c b/drivers/media/radio/radio-si4713.c index 170bbe554787..13554ab13f76 100644 --- a/drivers/media/radio/radio-si4713.c +++ b/drivers/media/radio/radio-si4713.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
29 | #include <linux/videodev2.h> | 29 | #include <linux/videodev2.h> |
30 | #include <linux/slab.h> | ||
30 | #include <media/v4l2-device.h> | 31 | #include <media/v4l2-device.h> |
31 | #include <media/v4l2-common.h> | 32 | #include <media/v4l2-common.h> |
32 | #include <media/v4l2-ioctl.h> | 33 | #include <media/v4l2-ioctl.h> |
diff --git a/drivers/media/radio/radio-tea5764.c b/drivers/media/radio/radio-tea5764.c index 8e718bfcdad3..789d2ec66e19 100644 --- a/drivers/media/radio/radio-tea5764.c +++ b/drivers/media/radio/radio-tea5764.c | |||
@@ -32,6 +32,7 @@ | |||
32 | * add RDS support | 32 | * add RDS support |
33 | */ | 33 | */ |
34 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/module.h> | 36 | #include <linux/module.h> |
36 | #include <linux/init.h> /* Initdata */ | 37 | #include <linux/init.h> /* Initdata */ |
37 | #include <linux/videodev2.h> /* kernel radio structs */ | 38 | #include <linux/videodev2.h> /* kernel radio structs */ |
diff --git a/drivers/media/radio/radio-timb.c b/drivers/media/radio/radio-timb.c index 0de457f6e6eb..b8bb3ef47df5 100644 --- a/drivers/media/radio/radio-timb.c +++ b/drivers/media/radio/radio-timb.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <media/v4l2-device.h> | 22 | #include <media/v4l2-device.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
26 | #include <media/timb_radio.h> | 27 | #include <media/timb_radio.h> |
27 | 28 | ||
diff --git a/drivers/media/radio/saa7706h.c b/drivers/media/radio/saa7706h.c index 5db5528a8b25..585680ffbfb6 100644 --- a/drivers/media/radio/saa7706h.c +++ b/drivers/media/radio/saa7706h.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/slab.h> | ||
26 | #include <media/v4l2-device.h> | 27 | #include <media/v4l2-device.h> |
27 | #include <media/v4l2-chip-ident.h> | 28 | #include <media/v4l2-chip-ident.h> |
28 | 29 | ||
diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c b/drivers/media/radio/si470x/radio-si470x-i2c.c index 5466015346a1..a5844d08d8b7 100644 --- a/drivers/media/radio/si470x/radio-si470x-i2c.c +++ b/drivers/media/radio/si470x/radio-si470x-i2c.c | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | /* kernel includes */ | 32 | /* kernel includes */ |
33 | #include <linux/i2c.h> | 33 | #include <linux/i2c.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
35 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
36 | 37 | ||
diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c b/drivers/media/radio/si470x/radio-si470x-usb.c index 6f60841828da..5ec13e50a9f0 100644 --- a/drivers/media/radio/si470x/radio-si470x-usb.c +++ b/drivers/media/radio/si470x/radio-si470x-usb.c | |||
@@ -37,6 +37,7 @@ | |||
37 | /* kernel includes */ | 37 | /* kernel includes */ |
38 | #include <linux/usb.h> | 38 | #include <linux/usb.h> |
39 | #include <linux/hid.h> | 39 | #include <linux/hid.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | #include "radio-si470x.h" | 42 | #include "radio-si470x.h" |
42 | 43 | ||
diff --git a/drivers/media/radio/si4713-i2c.c b/drivers/media/radio/si4713-i2c.c index 6a0028eb461f..ab63dd5b25c4 100644 --- a/drivers/media/radio/si4713-i2c.c +++ b/drivers/media/radio/si4713-i2c.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
29 | #include <linux/slab.h> | ||
29 | #include <media/v4l2-device.h> | 30 | #include <media/v4l2-device.h> |
30 | #include <media/v4l2-ioctl.h> | 31 | #include <media/v4l2-ioctl.h> |
31 | #include <media/v4l2-common.h> | 32 | #include <media/v4l2-common.h> |
diff --git a/drivers/media/radio/tef6862.c b/drivers/media/radio/tef6862.c index 6e607ff0c169..90cae90277e7 100644 --- a/drivers/media/radio/tef6862.c +++ b/drivers/media/radio/tef6862.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
25 | #include <linux/i2c-id.h> | 25 | #include <linux/i2c-id.h> |
26 | #include <linux/slab.h> | ||
26 | #include <media/v4l2-ioctl.h> | 27 | #include <media/v4l2-ioctl.h> |
27 | #include <media/v4l2-device.h> | 28 | #include <media/v4l2-device.h> |
28 | #include <media/v4l2-chip-ident.h> | 29 | #include <media/v4l2-chip-ident.h> |
diff --git a/drivers/media/video/adv7170.c b/drivers/media/video/adv7170.c index 97b003449c91..48e89fbf391b 100644 --- a/drivers/media/video/adv7170.c +++ b/drivers/media/video/adv7170.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/ioctl.h> | 34 | #include <linux/ioctl.h> |
34 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
35 | #include <linux/i2c.h> | 36 | #include <linux/i2c.h> |
diff --git a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c index cf8c06c85ded..f1ba0d742c65 100644 --- a/drivers/media/video/adv7175.c +++ b/drivers/media/video/adv7175.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/ioctl.h> | 30 | #include <linux/ioctl.h> |
30 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
31 | #include <linux/i2c.h> | 32 | #include <linux/i2c.h> |
diff --git a/drivers/media/video/adv7180.c b/drivers/media/video/adv7180.c index 0826f0dabc17..23e610f62736 100644 --- a/drivers/media/video/adv7180.c +++ b/drivers/media/video/adv7180.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
25 | #include <linux/i2c-id.h> | 25 | #include <linux/i2c-id.h> |
26 | #include <linux/slab.h> | ||
26 | #include <media/v4l2-ioctl.h> | 27 | #include <media/v4l2-ioctl.h> |
27 | #include <linux/videodev2.h> | 28 | #include <linux/videodev2.h> |
28 | #include <media/v4l2-device.h> | 29 | #include <media/v4l2-device.h> |
diff --git a/drivers/media/video/adv7343.c b/drivers/media/video/adv7343.c index df26f2fe44eb..41b2930d0ce4 100644 --- a/drivers/media/video/adv7343.c +++ b/drivers/media/video/adv7343.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/ctype.h> | 20 | #include <linux/ctype.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
22 | #include <linux/device.h> | 23 | #include <linux/device.h> |
23 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
diff --git a/drivers/media/video/au0828/au0828-core.c b/drivers/media/video/au0828/au0828-core.c index 3544a2f12f13..ca342e4c61fc 100644 --- a/drivers/media/video/au0828/au0828-core.c +++ b/drivers/media/video/au0828/au0828-core.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/videodev2.h> | 24 | #include <linux/videodev2.h> |
24 | #include <media/v4l2-common.h> | 25 | #include <media/v4l2-common.h> |
25 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
diff --git a/drivers/media/video/au0828/au0828-dvb.c b/drivers/media/video/au0828/au0828-dvb.c index b8a4b52e8d47..f1edf1d4afe8 100644 --- a/drivers/media/video/au0828/au0828-dvb.c +++ b/drivers/media/video/au0828/au0828-dvb.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/device.h> | 25 | #include <linux/device.h> |
25 | #include <linux/suspend.h> | 26 | #include <linux/suspend.h> |
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c index dc67bc40f36f..8c140c01c5e6 100644 --- a/drivers/media/video/au0828/au0828-video.c +++ b/drivers/media/video/au0828/au0828-video.c | |||
@@ -29,6 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/init.h> | 33 | #include <linux/init.h> |
33 | #include <linux/device.h> | 34 | #include <linux/device.h> |
34 | #include <linux/suspend.h> | 35 | #include <linux/suspend.h> |
diff --git a/drivers/media/video/bt819.c b/drivers/media/video/bt819.c index 547e1a93c421..770cb9accf81 100644 --- a/drivers/media/video/bt819.c +++ b/drivers/media/video/bt819.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/i2c.h> | 35 | #include <linux/i2c.h> |
36 | #include <linux/i2c-id.h> | 36 | #include <linux/i2c-id.h> |
37 | #include <linux/videodev2.h> | 37 | #include <linux/videodev2.h> |
38 | #include <linux/slab.h> | ||
38 | #include <media/v4l2-device.h> | 39 | #include <media/v4l2-device.h> |
39 | #include <media/v4l2-chip-ident.h> | 40 | #include <media/v4l2-chip-ident.h> |
40 | #include <media/v4l2-i2c-drv.h> | 41 | #include <media/v4l2-i2c-drv.h> |
diff --git a/drivers/media/video/bt856.c b/drivers/media/video/bt856.c index d0b4d4925ff8..ae3337392505 100644 --- a/drivers/media/video/bt856.c +++ b/drivers/media/video/bt856.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/ioctl.h> | 34 | #include <linux/ioctl.h> |
34 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
35 | #include <linux/i2c.h> | 36 | #include <linux/i2c.h> |
diff --git a/drivers/media/video/bt866.c b/drivers/media/video/bt866.c index af7e3a5bac9f..62ac422bb159 100644 --- a/drivers/media/video/bt866.c +++ b/drivers/media/video/bt866.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/ioctl.h> | 34 | #include <linux/ioctl.h> |
34 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
35 | #include <linux/i2c.h> | 36 | #include <linux/i2c.h> |
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index cb46e8fa8aaa..f4860f03dfc3 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/init.h> | 37 | #include <linux/init.h> |
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
40 | #include <linux/slab.h> | ||
40 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
41 | #include <linux/fs.h> | 42 | #include <linux/fs.h> |
42 | #include <linux/kernel.h> | 43 | #include <linux/kernel.h> |
diff --git a/drivers/media/video/bt8xx/bttv-gpio.c b/drivers/media/video/bt8xx/bttv-gpio.c index 74c325e594a2..fd604d32bbb9 100644 --- a/drivers/media/video/bt8xx/bttv-gpio.c +++ b/drivers/media/video/bt8xx/bttv-gpio.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/device.h> | 32 | #include <linux/device.h> |
33 | #include <linux/slab.h> | ||
33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
34 | 35 | ||
35 | #include "bttvp.h" | 36 | #include "bttvp.h" |
diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/video/bt8xx/bttv-input.c index b320dbd635aa..aa153a986ade 100644 --- a/drivers/media/video/bt8xx/bttv-input.c +++ b/drivers/media/video/bt8xx/bttv-input.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/input.h> | 25 | #include <linux/input.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "bttv.h" | 28 | #include "bttv.h" |
28 | #include "bttvp.h" | 29 | #include "bttvp.h" |
diff --git a/drivers/media/video/bt8xx/bttv-risc.c b/drivers/media/video/bt8xx/bttv-risc.c index d16af2836379..c24b1c100e13 100644 --- a/drivers/media/video/bt8xx/bttv-risc.c +++ b/drivers/media/video/bt8xx/bttv-risc.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
30 | #include <linux/vmalloc.h> | 31 | #include <linux/vmalloc.h> |
31 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c index cbbf7e80d2cf..be35e6965829 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/drivers/media/video/cafe_ccic.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/spinlock.h> | 32 | #include <linux/spinlock.h> |
33 | #include <linux/videodev2.h> | 33 | #include <linux/videodev2.h> |
34 | #include <linux/slab.h> | ||
34 | #include <media/v4l2-device.h> | 35 | #include <media/v4l2-device.h> |
35 | #include <media/v4l2-ioctl.h> | 36 | #include <media/v4l2-ioctl.h> |
36 | #include <media/v4l2-chip-ident.h> | 37 | #include <media/v4l2-chip-ident.h> |
diff --git a/drivers/media/video/cpia_pp.c b/drivers/media/video/cpia_pp.c index c431df8248d6..f5604c16a092 100644 --- a/drivers/media/video/cpia_pp.c +++ b/drivers/media/video/cpia_pp.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/workqueue.h> | 36 | #include <linux/workqueue.h> |
37 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include <linux/kmod.h> | 40 | #include <linux/kmod.h> |
40 | 41 | ||
diff --git a/drivers/media/video/cs5345.c b/drivers/media/video/cs5345.c index 57dc1704b6c0..8362db509e2c 100644 --- a/drivers/media/video/cs5345.c +++ b/drivers/media/video/cs5345.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
24 | #include <linux/videodev2.h> | 24 | #include <linux/videodev2.h> |
25 | #include <linux/slab.h> | ||
25 | #include <media/v4l2-device.h> | 26 | #include <media/v4l2-device.h> |
26 | #include <media/v4l2-chip-ident.h> | 27 | #include <media/v4l2-chip-ident.h> |
27 | #include <media/v4l2-i2c-drv.h> | 28 | #include <media/v4l2-i2c-drv.h> |
diff --git a/drivers/media/video/cs53l32a.c b/drivers/media/video/cs53l32a.c index 80bca8df9fbf..3cc135a98d82 100644 --- a/drivers/media/video/cs53l32a.c +++ b/drivers/media/video/cs53l32a.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/ioctl.h> | 26 | #include <linux/ioctl.h> |
26 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
27 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
diff --git a/drivers/media/video/cx18/cx18-alsa-main.c b/drivers/media/video/cx18/cx18-alsa-main.c index eb41d7ec65b9..b5d7cbf4528a 100644 --- a/drivers/media/video/cx18/cx18-alsa-main.c +++ b/drivers/media/video/cx18/cx18-alsa-main.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/module.h> | 27 | #include <linux/module.h> |
27 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
28 | #include <linux/device.h> | 29 | #include <linux/device.h> |
diff --git a/drivers/media/video/cx18/cx18-controls.c b/drivers/media/video/cx18/cx18-controls.c index 93f0dae01350..7fa589240ff2 100644 --- a/drivers/media/video/cx18/cx18-controls.c +++ b/drivers/media/video/cx18/cx18-controls.c | |||
@@ -21,6 +21,7 @@ | |||
21 | * 02111-1307 USA | 21 | * 02111-1307 USA |
22 | */ | 22 | */ |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include "cx18-driver.h" | 26 | #include "cx18-driver.h" |
26 | #include "cx18-cards.h" | 27 | #include "cx18-cards.h" |
diff --git a/drivers/media/video/cx18/cx18-driver.h b/drivers/media/video/cx18/cx18-driver.h index 23ad6d548dc5..b9728e8eee40 100644 --- a/drivers/media/video/cx18/cx18-driver.h +++ b/drivers/media/video/cx18/cx18-driver.h | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/pagemap.h> | 42 | #include <linux/pagemap.h> |
43 | #include <linux/workqueue.h> | 43 | #include <linux/workqueue.h> |
44 | #include <linux/mutex.h> | 44 | #include <linux/mutex.h> |
45 | #include <linux/slab.h> | ||
45 | #include <asm/byteorder.h> | 46 | #include <asm/byteorder.h> |
46 | 47 | ||
47 | #include <linux/dvb/video.h> | 48 | #include <linux/dvb/video.h> |
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index a54908235009..6bdc0ef18119 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/drivers/media/video/cx231xx/cx231xx-cards.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
26 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
27 | #include <linux/usb.h> | 28 | #include <linux/usb.h> |
diff --git a/drivers/media/video/cx231xx/cx231xx-core.c b/drivers/media/video/cx231xx/cx231xx-core.c index 4a60dfbc347d..b24eee115e7e 100644 --- a/drivers/media/video/cx231xx/cx231xx-core.c +++ b/drivers/media/video/cx231xx/cx231xx-core.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/usb.h> | 27 | #include <linux/usb.h> |
27 | #include <linux/vmalloc.h> | 28 | #include <linux/vmalloc.h> |
28 | #include <media/v4l2-common.h> | 29 | #include <media/v4l2-common.h> |
diff --git a/drivers/media/video/cx231xx/cx231xx-dvb.c b/drivers/media/video/cx231xx/cx231xx-dvb.c index 64e025e2bdf1..4ea3776b39fb 100644 --- a/drivers/media/video/cx231xx/cx231xx-dvb.c +++ b/drivers/media/video/cx231xx/cx231xx-dvb.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/usb.h> | 24 | #include <linux/usb.h> |
24 | 25 | ||
25 | #include "cx231xx.h" | 26 | #include "cx231xx.h" |
diff --git a/drivers/media/video/cx231xx/cx231xx-input.c b/drivers/media/video/cx231xx/cx231xx-input.c index c5771db3bfce..b473cd8367f5 100644 --- a/drivers/media/video/cx231xx/cx231xx-input.c +++ b/drivers/media/video/cx231xx/cx231xx-input.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/input.h> | 28 | #include <linux/input.h> |
29 | #include <linux/usb.h> | 29 | #include <linux/usb.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include "cx231xx.h" | 32 | #include "cx231xx.h" |
32 | 33 | ||
diff --git a/drivers/media/video/cx231xx/cx231xx-vbi.c b/drivers/media/video/cx231xx/cx231xx-vbi.c index e97b8023a655..689c5e25776c 100644 --- a/drivers/media/video/cx231xx/cx231xx-vbi.c +++ b/drivers/media/video/cx231xx/cx231xx-vbi.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
29 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
30 | #include <linux/mutex.h> | 30 | #include <linux/mutex.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | #include <media/v4l2-common.h> | 33 | #include <media/v4l2-common.h> |
33 | #include <media/v4l2-ioctl.h> | 34 | #include <media/v4l2-ioctl.h> |
diff --git a/drivers/media/video/cx231xx/cx231xx-video.c b/drivers/media/video/cx231xx/cx231xx-video.c index d4f546f11d74..16a73eab6726 100644 --- a/drivers/media/video/cx231xx/cx231xx-video.c +++ b/drivers/media/video/cx231xx/cx231xx-video.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/version.h> | 32 | #include <linux/version.h> |
33 | #include <linux/mm.h> | 33 | #include <linux/mm.h> |
34 | #include <linux/mutex.h> | 34 | #include <linux/mutex.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #include <media/v4l2-common.h> | 37 | #include <media/v4l2-common.h> |
37 | #include <media/v4l2-ioctl.h> | 38 | #include <media/v4l2-ioctl.h> |
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c index 2ab97ad7b6fb..a8ddc227cf86 100644 --- a/drivers/media/video/cx23885/cx23885-417.c +++ b/drivers/media/video/cx23885/cx23885-417.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/device.h> | 32 | #include <linux/device.h> |
33 | #include <linux/firmware.h> | 33 | #include <linux/firmware.h> |
34 | #include <linux/smp_lock.h> | 34 | #include <linux/smp_lock.h> |
35 | #include <linux/slab.h> | ||
35 | #include <media/v4l2-common.h> | 36 | #include <media/v4l2-common.h> |
36 | #include <media/v4l2-ioctl.h> | 37 | #include <media/v4l2-ioctl.h> |
37 | #include <media/cx2341x.h> | 38 | #include <media/cx2341x.h> |
diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c index 9c6620f86dca..8e9d990dbe93 100644 --- a/drivers/media/video/cx23885/cx23885-input.c +++ b/drivers/media/video/cx23885/cx23885-input.c | |||
@@ -36,6 +36,7 @@ | |||
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <linux/input.h> | 38 | #include <linux/input.h> |
39 | #include <linux/slab.h> | ||
39 | #include <media/ir-common.h> | 40 | #include <media/ir-common.h> |
40 | #include <media/v4l2-subdev.h> | 41 | #include <media/v4l2-subdev.h> |
41 | 42 | ||
diff --git a/drivers/media/video/cx23885/cx23885-vbi.c b/drivers/media/video/cx23885/cx23885-vbi.c index 5b297f0323b6..708a8c766d1a 100644 --- a/drivers/media/video/cx23885/cx23885-vbi.c +++ b/drivers/media/video/cx23885/cx23885-vbi.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/moduleparam.h> | 24 | #include <linux/moduleparam.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/slab.h> | ||
27 | 26 | ||
28 | #include "cx23885.h" | 27 | #include "cx23885.h" |
29 | 28 | ||
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h index 0e3a98d243c5..8d6a55e54ee7 100644 --- a/drivers/media/video/cx23885/cx23885.h +++ b/drivers/media/video/cx23885/cx23885.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
24 | #include <linux/i2c-algo-bit.h> | 24 | #include <linux/i2c-algo-bit.h> |
25 | #include <linux/kdev_t.h> | 25 | #include <linux/kdev_t.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <media/v4l2-device.h> | 28 | #include <media/v4l2-device.h> |
28 | #include <media/tuner.h> | 29 | #include <media/tuner.h> |
diff --git a/drivers/media/video/cx23885/cx23888-ir.c b/drivers/media/video/cx23885/cx23888-ir.c index 2bf57a4527d3..ad728d767d69 100644 --- a/drivers/media/video/cx23885/cx23888-ir.c +++ b/drivers/media/video/cx23885/cx23888-ir.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/kfifo.h> | 24 | #include <linux/kfifo.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <media/v4l2-device.h> | 27 | #include <media/v4l2-device.h> |
27 | #include <media/v4l2-chip-ident.h> | 28 | #include <media/v4l2-chip-ident.h> |
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c index 64b350df78e3..33082c96745e 100644 --- a/drivers/media/video/cx88/cx88-alsa.c +++ b/drivers/media/video/cx88/cx88-alsa.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/vmalloc.h> | 31 | #include <linux/vmalloc.h> |
32 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include <asm/delay.h> | 36 | #include <asm/delay.h> |
36 | #include <sound/core.h> | 37 | #include <sound/core.h> |
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index 6fe30e6c4262..e46e1ceef72c 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
32 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
33 | #include <linux/device.h> | 34 | #include <linux/device.h> |
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index eaf0ee7de832..2918a6e38fe8 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include "cx88.h" | 29 | #include "cx88.h" |
29 | #include "tea5767.h" | 30 | #include "tea5767.h" |
diff --git a/drivers/media/video/cx88/cx88-dsp.c b/drivers/media/video/cx88/cx88-dsp.c index 3e5eaf3fe2a6..a94e00a4ac5d 100644 --- a/drivers/media/video/cx88/cx88-dsp.c +++ b/drivers/media/video/cx88/cx88-dsp.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/slab.h> | ||
22 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
23 | #include <linux/module.h> | 24 | #include <linux/module.h> |
24 | #include <linux/jiffies.h> | 25 | #include <linux/jiffies.h> |
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index de180d4d5a21..6b6abf062c21 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/hrtimer.h> | 26 | #include <linux/hrtimer.h> |
27 | #include <linux/input.h> | 27 | #include <linux/input.h> |
28 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/module.h> | 30 | #include <linux/module.h> |
30 | 31 | ||
31 | #include "cx88.h" | 32 | #include "cx88.h" |
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index 338af77f7f01..6aba7af9160a 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/init.h> | 27 | #include <linux/init.h> |
27 | #include <linux/device.h> | 28 | #include <linux/device.h> |
28 | #include <linux/dma-mapping.h> | 29 | #include <linux/dma-mapping.h> |
diff --git a/drivers/media/video/cx88/cx88-tvaudio.c b/drivers/media/video/cx88/cx88-tvaudio.c index e8316cf7f32f..239631568f3b 100644 --- a/drivers/media/video/cx88/cx88-tvaudio.c +++ b/drivers/media/video/cx88/cx88-tvaudio.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
40 | #include <linux/freezer.h> | 40 | #include <linux/freezer.h> |
41 | #include <linux/kernel.h> | 41 | #include <linux/kernel.h> |
42 | #include <linux/slab.h> | ||
43 | #include <linux/mm.h> | 42 | #include <linux/mm.h> |
44 | #include <linux/poll.h> | 43 | #include <linux/poll.h> |
45 | #include <linux/signal.h> | 44 | #include <linux/signal.h> |
diff --git a/drivers/media/video/cx88/cx88-vbi.c b/drivers/media/video/cx88/cx88-vbi.c index 0943060682bc..d9445b0e7ab2 100644 --- a/drivers/media/video/cx88/cx88-vbi.c +++ b/drivers/media/video/cx88/cx88-vbi.c | |||
@@ -3,7 +3,6 @@ | |||
3 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
4 | #include <linux/module.h> | 4 | #include <linux/module.h> |
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
6 | #include <linux/slab.h> | ||
7 | 6 | ||
8 | #include "cx88.h" | 7 | #include "cx88.h" |
9 | 8 | ||
diff --git a/drivers/media/video/cx88/cx88-vp3054-i2c.c b/drivers/media/video/cx88/cx88-vp3054-i2c.c index 20800425c51e..794f2932b755 100644 --- a/drivers/media/video/cx88/cx88-vp3054-i2c.c +++ b/drivers/media/video/cx88/cx88-vp3054-i2c.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/init.h> | 27 | #include <linux/init.h> |
27 | 28 | ||
28 | #include <asm/io.h> | 29 | #include <asm/io.h> |
diff --git a/drivers/media/video/davinci/dm644x_ccdc.c b/drivers/media/video/davinci/dm644x_ccdc.c index 0c394cade22a..b4cc96dc99ef 100644 --- a/drivers/media/video/davinci/dm644x_ccdc.c +++ b/drivers/media/video/davinci/dm644x_ccdc.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/platform_device.h> | 37 | #include <linux/platform_device.h> |
38 | #include <linux/uaccess.h> | 38 | #include <linux/uaccess.h> |
39 | #include <linux/videodev2.h> | 39 | #include <linux/videodev2.h> |
40 | #include <linux/gfp.h> | ||
40 | #include <linux/clk.h> | 41 | #include <linux/clk.h> |
41 | #include <linux/err.h> | 42 | #include <linux/err.h> |
42 | 43 | ||
diff --git a/drivers/media/video/davinci/vpfe_capture.c b/drivers/media/video/davinci/vpfe_capture.c index 885cd54499cf..7cf042f9b377 100644 --- a/drivers/media/video/davinci/vpfe_capture.c +++ b/drivers/media/video/davinci/vpfe_capture.c | |||
@@ -67,6 +67,7 @@ | |||
67 | * - Support for control ioctls | 67 | * - Support for control ioctls |
68 | */ | 68 | */ |
69 | #include <linux/module.h> | 69 | #include <linux/module.h> |
70 | #include <linux/slab.h> | ||
70 | #include <linux/init.h> | 71 | #include <linux/init.h> |
71 | #include <linux/platform_device.h> | 72 | #include <linux/platform_device.h> |
72 | #include <linux/interrupt.h> | 73 | #include <linux/interrupt.h> |
diff --git a/drivers/media/video/davinci/vpif_capture.c b/drivers/media/video/davinci/vpif_capture.c index 78130721f578..2e5a7fb2d0c9 100644 --- a/drivers/media/video/davinci/vpif_capture.c +++ b/drivers/media/video/davinci/vpif_capture.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/platform_device.h> | 34 | #include <linux/platform_device.h> |
35 | #include <linux/io.h> | 35 | #include <linux/io.h> |
36 | #include <linux/version.h> | 36 | #include <linux/version.h> |
37 | #include <linux/slab.h> | ||
37 | #include <media/v4l2-device.h> | 38 | #include <media/v4l2-device.h> |
38 | #include <media/v4l2-ioctl.h> | 39 | #include <media/v4l2-ioctl.h> |
39 | 40 | ||
diff --git a/drivers/media/video/davinci/vpif_display.c b/drivers/media/video/davinci/vpif_display.c index dfddef7228dd..13c3a1b97760 100644 --- a/drivers/media/video/davinci/vpif_display.c +++ b/drivers/media/video/davinci/vpif_display.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/io.h> | 31 | #include <linux/io.h> |
32 | #include <linux/version.h> | 32 | #include <linux/version.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
35 | #include <asm/page.h> | 36 | #include <asm/page.h> |
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index ecbcefb08739..b0fb08337710 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
28 | #include <linux/i2c.h> | 29 | #include <linux/i2c.h> |
29 | #include <linux/usb.h> | 30 | #include <linux/usb.h> |
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index 5a37eccbd7d6..a41cc5566778 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/list.h> | 25 | #include <linux/list.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/usb.h> | 28 | #include <linux/usb.h> |
28 | #include <linux/vmalloc.h> | 29 | #include <linux/vmalloc.h> |
29 | #include <media/v4l2-common.h> | 30 | #include <media/v4l2-common.h> |
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index 1b96356b3ab2..bcd3c371009b 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/usb.h> | 24 | #include <linux/usb.h> |
24 | 25 | ||
25 | #include "em28xx.h" | 26 | #include "em28xx.h" |
diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/video/em28xx/em28xx-input.c index 1fb754e20875..20a0001e8885 100644 --- a/drivers/media/video/em28xx/em28xx-input.c +++ b/drivers/media/video/em28xx/em28xx-input.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/input.h> | 28 | #include <linux/input.h> |
29 | #include <linux/usb.h> | 29 | #include <linux/usb.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include "em28xx.h" | 32 | #include "em28xx.h" |
32 | 33 | ||
diff --git a/drivers/media/video/em28xx/em28xx-vbi.c b/drivers/media/video/em28xx/em28xx-vbi.c index c7dce39823d8..7f1c4a2173b6 100644 --- a/drivers/media/video/em28xx/em28xx-vbi.c +++ b/drivers/media/video/em28xx/em28xx-vbi.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/slab.h> | ||
28 | 27 | ||
29 | #include "em28xx.h" | 28 | #include "em28xx.h" |
30 | 29 | ||
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index ac2bd935927e..0fe20110bfd6 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/version.h> | 35 | #include <linux/version.h> |
36 | #include <linux/mm.h> | 36 | #include <linux/mm.h> |
37 | #include <linux/mutex.h> | 37 | #include <linux/mutex.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include "em28xx.h" | 40 | #include "em28xx.h" |
40 | #include <media/v4l2-common.h> | 41 | #include <media/v4l2-common.h> |
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h index 02c696a22be0..8bb242fb79de 100644 --- a/drivers/media/video/gspca/gspca.h +++ b/drivers/media/video/gspca/gspca.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/videodev2.h> | 7 | #include <linux/videodev2.h> |
8 | #include <media/v4l2-common.h> | 8 | #include <media/v4l2-common.h> |
9 | #include <linux/mutex.h> | 9 | #include <linux/mutex.h> |
10 | #include <linux/slab.h> | ||
10 | 11 | ||
11 | /* compilation option */ | 12 | /* compilation option */ |
12 | #define GSPCA_DEBUG 1 | 13 | #define GSPCA_DEBUG 1 |
diff --git a/drivers/media/video/gspca/jeilinj.c b/drivers/media/video/gspca/jeilinj.c index 2019b04f9235..84ecd56c6470 100644 --- a/drivers/media/video/gspca/jeilinj.c +++ b/drivers/media/video/gspca/jeilinj.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #define MODULE_NAME "jeilinj" | 24 | #define MODULE_NAME "jeilinj" |
25 | 25 | ||
26 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
27 | #include <linux/slab.h> | ||
27 | #include "gspca.h" | 28 | #include "gspca.h" |
28 | #include "jpeg.h" | 29 | #include "jpeg.h" |
29 | 30 | ||
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k83a.c b/drivers/media/video/gspca/m5602/m5602_s5k83a.c index fbd91545497a..6b3be4fa2c06 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k83a.c +++ b/drivers/media/video/gspca/m5602/m5602_s5k83a.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/kthread.h> | 19 | #include <linux/kthread.h> |
20 | #include <linux/slab.h> | ||
20 | #include "m5602_s5k83a.h" | 21 | #include "m5602_s5k83a.h" |
21 | 22 | ||
22 | static int s5k83a_set_gain(struct gspca_dev *gspca_dev, __s32 val); | 23 | static int s5k83a_set_gain(struct gspca_dev *gspca_dev, __s32 val); |
diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c index 4a1bc08f82b9..38a6e15e096b 100644 --- a/drivers/media/video/gspca/sn9c20x.c +++ b/drivers/media/video/gspca/sn9c20x.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/freezer.h> | 23 | #include <linux/freezer.h> |
24 | #include <linux/usb/input.h> | 24 | #include <linux/usb/input.h> |
25 | #include <linux/input.h> | 25 | #include <linux/input.h> |
26 | #include <linux/slab.h> | ||
26 | #endif | 27 | #endif |
27 | 28 | ||
28 | #include "gspca.h" | 29 | #include "gspca.h" |
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 83d5773d4629..1d61b92f6bfc 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #define MODULE_NAME "sonixj" | 22 | #define MODULE_NAME "sonixj" |
23 | 23 | ||
24 | #include <linux/input.h> | 24 | #include <linux/input.h> |
25 | #include <linux/slab.h> | ||
25 | #include "gspca.h" | 26 | #include "gspca.h" |
26 | #include "jpeg.h" | 27 | #include "jpeg.h" |
27 | 28 | ||
diff --git a/drivers/media/video/gspca/sq905.c b/drivers/media/video/gspca/sq905.c index 1fcaca6a87f7..09b3f93fa4d6 100644 --- a/drivers/media/video/gspca/sq905.c +++ b/drivers/media/video/gspca/sq905.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #define MODULE_NAME "sq905" | 36 | #define MODULE_NAME "sq905" |
37 | 37 | ||
38 | #include <linux/workqueue.h> | 38 | #include <linux/workqueue.h> |
39 | #include <linux/slab.h> | ||
39 | #include "gspca.h" | 40 | #include "gspca.h" |
40 | 41 | ||
41 | MODULE_AUTHOR("Adam Baker <linux@baker-net.org.uk>, " | 42 | MODULE_AUTHOR("Adam Baker <linux@baker-net.org.uk>, " |
diff --git a/drivers/media/video/gspca/sq905c.c b/drivers/media/video/gspca/sq905c.c index e64662052992..4c70628ca615 100644 --- a/drivers/media/video/gspca/sq905c.c +++ b/drivers/media/video/gspca/sq905c.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #define MODULE_NAME "sq905c" | 30 | #define MODULE_NAME "sq905c" |
31 | 31 | ||
32 | #include <linux/workqueue.h> | 32 | #include <linux/workqueue.h> |
33 | #include <linux/slab.h> | ||
33 | #include "gspca.h" | 34 | #include "gspca.h" |
34 | 35 | ||
35 | MODULE_AUTHOR("Theodore Kilgore <kilgota@auburn.edu>"); | 36 | MODULE_AUTHOR("Theodore Kilgore <kilgota@auburn.edu>"); |
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index 50986da3d912..7d7814c43f92 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #define MODULE_NAME "zc3xx" | 22 | #define MODULE_NAME "zc3xx" |
23 | 23 | ||
24 | #include <linux/input.h> | 24 | #include <linux/input.h> |
25 | #include <linux/slab.h> | ||
25 | #include "gspca.h" | 26 | #include "gspca.h" |
26 | #include "jpeg.h" | 27 | #include "jpeg.h" |
27 | 28 | ||
diff --git a/drivers/media/video/hdpvr/hdpvr-i2c.c b/drivers/media/video/hdpvr/hdpvr-i2c.c index 296330a0e1e5..463b81bef6e2 100644 --- a/drivers/media/video/hdpvr/hdpvr-i2c.c +++ b/drivers/media/video/hdpvr/hdpvr-i2c.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/slab.h> | ||
14 | 15 | ||
15 | #include "hdpvr.h" | 16 | #include "hdpvr.h" |
16 | 17 | ||
diff --git a/drivers/media/video/ivtv/ivtv-controls.c b/drivers/media/video/ivtv/ivtv-controls.c index 4a9c8ce0ecb3..b59475bfc243 100644 --- a/drivers/media/video/ivtv/ivtv-controls.c +++ b/drivers/media/video/ivtv/ivtv-controls.c | |||
@@ -18,6 +18,7 @@ | |||
18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include "ivtv-driver.h" | 23 | #include "ivtv-driver.h" |
23 | #include "ivtv-cards.h" | 24 | #include "ivtv-cards.h" |
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h index e4816da6482b..5028e31c564a 100644 --- a/drivers/media/video/ivtv/ivtv-driver.h +++ b/drivers/media/video/ivtv/ivtv-driver.h | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <linux/scatterlist.h> | 53 | #include <linux/scatterlist.h> |
54 | #include <linux/workqueue.h> | 54 | #include <linux/workqueue.h> |
55 | #include <linux/mutex.h> | 55 | #include <linux/mutex.h> |
56 | #include <linux/slab.h> | ||
56 | #include <asm/uaccess.h> | 57 | #include <asm/uaccess.h> |
57 | #include <asm/system.h> | 58 | #include <asm/system.h> |
58 | #include <asm/byteorder.h> | 59 | #include <asm/byteorder.h> |
diff --git a/drivers/media/video/ivtv/ivtvfb.c b/drivers/media/video/ivtv/ivtvfb.c index fa6bb85cb4b0..de2ff1c6ac34 100644 --- a/drivers/media/video/ivtv/ivtvfb.c +++ b/drivers/media/video/ivtv/ivtvfb.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/kernel.h> | 42 | #include <linux/kernel.h> |
43 | #include <linux/fb.h> | 43 | #include <linux/fb.h> |
44 | #include <linux/ivtvfb.h> | 44 | #include <linux/ivtvfb.h> |
45 | #include <linux/slab.h> | ||
45 | 46 | ||
46 | #ifdef CONFIG_MTRR | 47 | #ifdef CONFIG_MTRR |
47 | #include <asm/mtrr.h> | 48 | #include <asm/mtrr.h> |
diff --git a/drivers/media/video/ks0127.c b/drivers/media/video/ks0127.c index fab8e0254bbc..94734828053b 100644 --- a/drivers/media/video/ks0127.c +++ b/drivers/media/video/ks0127.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
41 | #include <linux/i2c.h> | 41 | #include <linux/i2c.h> |
42 | #include <linux/videodev2.h> | 42 | #include <linux/videodev2.h> |
43 | #include <linux/slab.h> | ||
43 | #include <media/v4l2-device.h> | 44 | #include <media/v4l2-device.h> |
44 | #include <media/v4l2-chip-ident.h> | 45 | #include <media/v4l2-chip-ident.h> |
45 | #include <media/v4l2-i2c-drv.h> | 46 | #include <media/v4l2-i2c-drv.h> |
diff --git a/drivers/media/video/m52790.c b/drivers/media/video/m52790.c index d7317e798cc4..4491d018eba6 100644 --- a/drivers/media/video/m52790.c +++ b/drivers/media/video/m52790.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/ioctl.h> | 26 | #include <linux/ioctl.h> |
26 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
27 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c index b421858ccf90..4404e5ef818f 100644 --- a/drivers/media/video/meye.c +++ b/drivers/media/video/meye.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/videodev.h> | 33 | #include <linux/videodev.h> |
34 | #include <linux/gfp.h> | ||
34 | #include <media/v4l2-common.h> | 35 | #include <media/v4l2-common.h> |
35 | #include <media/v4l2-ioctl.h> | 36 | #include <media/v4l2-ioctl.h> |
36 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
diff --git a/drivers/media/video/msp3400-kthreads.c b/drivers/media/video/msp3400-kthreads.c index 168bca703614..d5a69c5ee5e4 100644 --- a/drivers/media/video/msp3400-kthreads.c +++ b/drivers/media/video/msp3400-kthreads.c | |||
@@ -22,7 +22,6 @@ | |||
22 | 22 | ||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/slab.h> | ||
26 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
27 | #include <linux/freezer.h> | 26 | #include <linux/freezer.h> |
28 | #include <linux/videodev2.h> | 27 | #include <linux/videodev2.h> |
diff --git a/drivers/media/video/mt9v011.c b/drivers/media/video/mt9v011.c index cc85f77a5706..72e55be0b4ab 100644 --- a/drivers/media/video/mt9v011.c +++ b/drivers/media/video/mt9v011.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/i2c.h> | 8 | #include <linux/i2c.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/videodev2.h> | 10 | #include <linux/videodev2.h> |
10 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
11 | #include <asm/div64.h> | 12 | #include <asm/div64.h> |
diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c index c167cc3de492..3c8ebfcb742e 100644 --- a/drivers/media/video/mx1_camera.c +++ b/drivers/media/video/mx1_camera.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/time.h> | 33 | #include <linux/time.h> |
33 | #include <linux/version.h> | 34 | #include <linux/version.h> |
34 | #include <linux/videodev2.h> | 35 | #include <linux/videodev2.h> |
diff --git a/drivers/media/video/omap24xxcam.c b/drivers/media/video/omap24xxcam.c index 142c327afb32..b189fe63394b 100644 --- a/drivers/media/video/omap24xxcam.c +++ b/drivers/media/video/omap24xxcam.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
36 | #include <linux/clk.h> | 36 | #include <linux/clk.h> |
37 | #include <linux/io.h> | 37 | #include <linux/io.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include <media/v4l2-common.h> | 40 | #include <media/v4l2-common.h> |
40 | #include <media/v4l2-ioctl.h> | 41 | #include <media/v4l2-ioctl.h> |
diff --git a/drivers/media/video/ov7670.c b/drivers/media/video/ov7670.c index 0e2184ec994e..aaa50f9b8e78 100644 --- a/drivers/media/video/ov7670.c +++ b/drivers/media/video/ov7670.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
16 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
17 | #include <linux/videodev2.h> | 18 | #include <linux/videodev2.h> |
diff --git a/drivers/media/video/pms.c b/drivers/media/video/pms.c index 11a2c26399b5..0598bbd3f368 100644 --- a/drivers/media/video/pms.c +++ b/drivers/media/video/pms.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
30 | #include <linux/ioport.h> | 29 | #include <linux/ioport.h> |
31 | #include <linux/init.h> | 30 | #include <linux/init.h> |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c b/drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c index 68980e19409f..88320900dbd4 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c +++ b/drivers/media/video/pvrusb2/pvrusb2-cs53l32a.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/videodev2.h> | 34 | #include <linux/videodev2.h> |
35 | #include <media/v4l2-common.h> | 35 | #include <media/v4l2-common.h> |
36 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
37 | #include <linux/slab.h> | ||
38 | 37 | ||
39 | struct routing_scheme { | 38 | struct routing_scheme { |
40 | const int *def; | 39 | const int *def; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c index 82c135835753..2222da8d0ca6 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c +++ b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/videodev2.h> | 36 | #include <linux/videodev2.h> |
37 | #include <media/v4l2-common.h> | 37 | #include <media/v4l2-common.h> |
38 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
39 | #include <linux/slab.h> | ||
40 | 39 | ||
41 | 40 | ||
42 | struct routing_scheme_item { | 41 | struct routing_scheme_item { |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c index ae977668c496..e9b11e119f62 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c +++ b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | #include <linux/slab.h> | ||
23 | #include "pvrusb2-debugifc.h" | 22 | #include "pvrusb2-debugifc.h" |
24 | #include "pvrusb2-hdw.h" | 23 | #include "pvrusb2-hdw.h" |
25 | #include "pvrusb2-debug.h" | 24 | #include "pvrusb2-debug.h" |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-dvb.c b/drivers/media/video/pvrusb2/pvrusb2-dvb.c index b7f5c49b1dbc..8c95793433e7 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-dvb.c +++ b/drivers/media/video/pvrusb2/pvrusb2-dvb.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/kthread.h> | 21 | #include <linux/kthread.h> |
22 | #include <linux/freezer.h> | 22 | #include <linux/freezer.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
24 | #include "dvbdev.h" | 25 | #include "dvbdev.h" |
25 | #include "pvrusb2-debug.h" | 26 | #include "pvrusb2-debug.h" |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c index 299afa4fa969..aeed1c2945fb 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c +++ b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/slab.h> | ||
22 | #include "pvrusb2-eeprom.h" | 23 | #include "pvrusb2-eeprom.h" |
23 | #include "pvrusb2-hdw-internal.h" | 24 | #include "pvrusb2-hdw-internal.h" |
24 | #include "pvrusb2-debug.h" | 25 | #include "pvrusb2-debug.h" |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-main.c b/drivers/media/video/pvrusb2/pvrusb2-main.c index 8689ddb54420..eeacd0f67855 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-main.c +++ b/drivers/media/video/pvrusb2/pvrusb2-main.c | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | #include <linux/usb.h> | 25 | #include <linux/usb.h> |
27 | #include <linux/videodev2.h> | 26 | #include <linux/videodev2.h> |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c index 6c23456e0bda..71f50565f637 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c +++ b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c | |||
@@ -423,10 +423,12 @@ static void pvr2_sysfs_add_debugifc(struct pvr2_sysfs *sfp) | |||
423 | 423 | ||
424 | dip = kzalloc(sizeof(*dip),GFP_KERNEL); | 424 | dip = kzalloc(sizeof(*dip),GFP_KERNEL); |
425 | if (!dip) return; | 425 | if (!dip) return; |
426 | sysfs_attr_init(&dip->attr_debugcmd.attr); | ||
426 | dip->attr_debugcmd.attr.name = "debugcmd"; | 427 | dip->attr_debugcmd.attr.name = "debugcmd"; |
427 | dip->attr_debugcmd.attr.mode = S_IRUGO|S_IWUSR|S_IWGRP; | 428 | dip->attr_debugcmd.attr.mode = S_IRUGO|S_IWUSR|S_IWGRP; |
428 | dip->attr_debugcmd.show = debugcmd_show; | 429 | dip->attr_debugcmd.show = debugcmd_show; |
429 | dip->attr_debugcmd.store = debugcmd_store; | 430 | dip->attr_debugcmd.store = debugcmd_store; |
431 | sysfs_attr_init(&dip->attr_debuginfo.attr); | ||
430 | dip->attr_debuginfo.attr.name = "debuginfo"; | 432 | dip->attr_debuginfo.attr.name = "debuginfo"; |
431 | dip->attr_debuginfo.attr.mode = S_IRUGO; | 433 | dip->attr_debuginfo.attr.mode = S_IRUGO; |
432 | dip->attr_debuginfo.show = debuginfo_show; | 434 | dip->attr_debuginfo.show = debuginfo_show; |
@@ -644,6 +646,7 @@ static void class_dev_create(struct pvr2_sysfs *sfp, | |||
644 | return; | 646 | return; |
645 | } | 647 | } |
646 | 648 | ||
649 | sysfs_attr_init(&sfp->attr_v4l_minor_number.attr); | ||
647 | sfp->attr_v4l_minor_number.attr.name = "v4l_minor_number"; | 650 | sfp->attr_v4l_minor_number.attr.name = "v4l_minor_number"; |
648 | sfp->attr_v4l_minor_number.attr.mode = S_IRUGO; | 651 | sfp->attr_v4l_minor_number.attr.mode = S_IRUGO; |
649 | sfp->attr_v4l_minor_number.show = v4l_minor_number_show; | 652 | sfp->attr_v4l_minor_number.show = v4l_minor_number_show; |
@@ -658,6 +661,7 @@ static void class_dev_create(struct pvr2_sysfs *sfp, | |||
658 | sfp->v4l_minor_number_created_ok = !0; | 661 | sfp->v4l_minor_number_created_ok = !0; |
659 | } | 662 | } |
660 | 663 | ||
664 | sysfs_attr_init(&sfp->attr_v4l_radio_minor_number.attr); | ||
661 | sfp->attr_v4l_radio_minor_number.attr.name = "v4l_radio_minor_number"; | 665 | sfp->attr_v4l_radio_minor_number.attr.name = "v4l_radio_minor_number"; |
662 | sfp->attr_v4l_radio_minor_number.attr.mode = S_IRUGO; | 666 | sfp->attr_v4l_radio_minor_number.attr.mode = S_IRUGO; |
663 | sfp->attr_v4l_radio_minor_number.show = v4l_radio_minor_number_show; | 667 | sfp->attr_v4l_radio_minor_number.show = v4l_radio_minor_number_show; |
@@ -672,6 +676,7 @@ static void class_dev_create(struct pvr2_sysfs *sfp, | |||
672 | sfp->v4l_radio_minor_number_created_ok = !0; | 676 | sfp->v4l_radio_minor_number_created_ok = !0; |
673 | } | 677 | } |
674 | 678 | ||
679 | sysfs_attr_init(&sfp->attr_unit_number.attr); | ||
675 | sfp->attr_unit_number.attr.name = "unit_number"; | 680 | sfp->attr_unit_number.attr.name = "unit_number"; |
676 | sfp->attr_unit_number.attr.mode = S_IRUGO; | 681 | sfp->attr_unit_number.attr.mode = S_IRUGO; |
677 | sfp->attr_unit_number.show = unit_number_show; | 682 | sfp->attr_unit_number.show = unit_number_show; |
@@ -685,6 +690,7 @@ static void class_dev_create(struct pvr2_sysfs *sfp, | |||
685 | sfp->unit_number_created_ok = !0; | 690 | sfp->unit_number_created_ok = !0; |
686 | } | 691 | } |
687 | 692 | ||
693 | sysfs_attr_init(&sfp->attr_bus_info.attr); | ||
688 | sfp->attr_bus_info.attr.name = "bus_info_str"; | 694 | sfp->attr_bus_info.attr.name = "bus_info_str"; |
689 | sfp->attr_bus_info.attr.mode = S_IRUGO; | 695 | sfp->attr_bus_info.attr.mode = S_IRUGO; |
690 | sfp->attr_bus_info.show = bus_info_show; | 696 | sfp->attr_bus_info.show = bus_info_show; |
@@ -699,6 +705,7 @@ static void class_dev_create(struct pvr2_sysfs *sfp, | |||
699 | sfp->bus_info_created_ok = !0; | 705 | sfp->bus_info_created_ok = !0; |
700 | } | 706 | } |
701 | 707 | ||
708 | sysfs_attr_init(&sfp->attr_hdw_name.attr); | ||
702 | sfp->attr_hdw_name.attr.name = "device_hardware_type"; | 709 | sfp->attr_hdw_name.attr.name = "device_hardware_type"; |
703 | sfp->attr_hdw_name.attr.mode = S_IRUGO; | 710 | sfp->attr_hdw_name.attr.mode = S_IRUGO; |
704 | sfp->attr_hdw_name.show = hdw_name_show; | 711 | sfp->attr_hdw_name.show = hdw_name_show; |
@@ -713,6 +720,7 @@ static void class_dev_create(struct pvr2_sysfs *sfp, | |||
713 | sfp->hdw_name_created_ok = !0; | 720 | sfp->hdw_name_created_ok = !0; |
714 | } | 721 | } |
715 | 722 | ||
723 | sysfs_attr_init(&sfp->attr_hdw_desc.attr); | ||
716 | sfp->attr_hdw_desc.attr.name = "device_hardware_description"; | 724 | sfp->attr_hdw_desc.attr.name = "device_hardware_description"; |
717 | sfp->attr_hdw_desc.attr.mode = S_IRUGO; | 725 | sfp->attr_hdw_desc.attr.mode = S_IRUGO; |
718 | sfp->attr_hdw_desc.show = hdw_desc_show; | 726 | sfp->attr_hdw_desc.show = hdw_desc_show; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index cc8ddb2d2382..bf1e0fe9f4d2 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/version.h> | 24 | #include <linux/version.h> |
24 | #include "pvrusb2-context.h" | 25 | #include "pvrusb2-context.h" |
25 | #include "pvrusb2-hdw.h" | 26 | #include "pvrusb2-hdw.h" |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c index 4c96cf48c796..2e205c99eb96 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c +++ b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <media/v4l2-common.h> | 37 | #include <media/v4l2-common.h> |
38 | #include <media/saa7115.h> | 38 | #include <media/saa7115.h> |
39 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
40 | #include <linux/slab.h> | ||
41 | 40 | ||
42 | struct routing_scheme { | 41 | struct routing_scheme { |
43 | const int *def; | 42 | const int *def; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c index 8c1eae05aa08..3ac8d751a5c0 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c +++ b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/videodev2.h> | 34 | #include <linux/videodev2.h> |
35 | #include <media/v4l2-common.h> | 35 | #include <media/v4l2-common.h> |
36 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
37 | #include <linux/slab.h> | ||
38 | 37 | ||
39 | void pvr2_wm8775_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd) | 38 | void pvr2_wm8775_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd) |
40 | { | 39 | { |
diff --git a/drivers/media/video/pwc/pwc-dec23.c b/drivers/media/video/pwc/pwc-dec23.c index 9e2d91f26bfe..0c801b8f3eca 100644 --- a/drivers/media/video/pwc/pwc-dec23.c +++ b/drivers/media/video/pwc/pwc-dec23.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <media/pwc-ioctl.h> | 30 | #include <media/pwc-ioctl.h> |
31 | 31 | ||
32 | #include <linux/string.h> | 32 | #include <linux/string.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | /* | 35 | /* |
35 | * USE_LOOKUP_TABLE_TO_CLAMP | 36 | * USE_LOOKUP_TABLE_TO_CLAMP |
diff --git a/drivers/media/video/pwc/pwc-v4l.c b/drivers/media/video/pwc/pwc-v4l.c index bdb4ced57496..62d89b3113a4 100644 --- a/drivers/media/video/pwc/pwc-v4l.c +++ b/drivers/media/video/pwc/pwc-v4l.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/poll.h> | 32 | #include <linux/poll.h> |
33 | #include <linux/slab.h> | ||
34 | #include <linux/vmalloc.h> | 33 | #include <linux/vmalloc.h> |
35 | #include <asm/io.h> | 34 | #include <asm/io.h> |
36 | 35 | ||
diff --git a/drivers/media/video/pwc/pwc.h b/drivers/media/video/pwc/pwc.h index 0902355dfa77..f1b206632957 100644 --- a/drivers/media/video/pwc/pwc.h +++ b/drivers/media/video/pwc/pwc.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/version.h> | 32 | #include <linux/version.h> |
33 | #include <linux/mutex.h> | 33 | #include <linux/mutex.h> |
34 | #include <linux/mm.h> | 34 | #include <linux/mm.h> |
35 | #include <linux/slab.h> | ||
35 | #include <asm/errno.h> | 36 | #include <asm/errno.h> |
36 | #include <linux/videodev.h> | 37 | #include <linux/videodev.h> |
37 | #include <media/v4l2-common.h> | 38 | #include <media/v4l2-common.h> |
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 322ac4eecf0a..5ecc30daef2d 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <media/v4l2-common.h> | 32 | #include <media/v4l2-common.h> |
32 | #include <media/v4l2-dev.h> | 33 | #include <media/v4l2-dev.h> |
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index fb742f1ae711..3de914deb8ee 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/firmware.h> | 45 | #include <linux/firmware.h> |
46 | #include <linux/kernel.h> | 46 | #include <linux/kernel.h> |
47 | #include <linux/mutex.h> | 47 | #include <linux/mutex.h> |
48 | #include <linux/slab.h> | ||
48 | #include <linux/videodev2.h> | 49 | #include <linux/videodev2.h> |
49 | #include <linux/version.h> | 50 | #include <linux/version.h> |
50 | #include <linux/mm.h> | 51 | #include <linux/mm.h> |
diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c index 5ab6a0f901c0..6b3b09ef8978 100644 --- a/drivers/media/video/saa5246a.c +++ b/drivers/media/video/saa5246a.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/mm.h> | 43 | #include <linux/mm.h> |
44 | #include <linux/init.h> | 44 | #include <linux/init.h> |
45 | #include <linux/i2c.h> | 45 | #include <linux/i2c.h> |
46 | #include <linux/slab.h> | ||
46 | #include <linux/mutex.h> | 47 | #include <linux/mutex.h> |
47 | #include <linux/videotext.h> | 48 | #include <linux/videotext.h> |
48 | #include <linux/videodev2.h> | 49 | #include <linux/videodev2.h> |
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c index 12835fb82c95..31ff27df4cbf 100644 --- a/drivers/media/video/saa5249.c +++ b/drivers/media/video/saa5249.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/delay.h> | 50 | #include <linux/delay.h> |
51 | #include <linux/videotext.h> | 51 | #include <linux/videotext.h> |
52 | #include <linux/videodev2.h> | 52 | #include <linux/videodev2.h> |
53 | #include <linux/slab.h> | ||
53 | #include <media/v4l2-device.h> | 54 | #include <media/v4l2-device.h> |
54 | #include <media/v4l2-chip-ident.h> | 55 | #include <media/v4l2-chip-ident.h> |
55 | #include <media/v4l2-ioctl.h> | 56 | #include <media/v4l2-ioctl.h> |
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index 73739d2a63dd..4ab4a987c9b9 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
29 | #include <linux/kthread.h> | 28 | #include <linux/kthread.h> |
30 | #include <linux/suspend.h> | 29 | #include <linux/suspend.h> |
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index ee5bff02a92c..ea877a50f52d 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/smp_lock.h> | 24 | #include <linux/smp_lock.h> |
26 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
27 | 26 | ||
diff --git a/drivers/media/video/saa7134/saa7134-i2c.c b/drivers/media/video/saa7134/saa7134-i2c.c index 8096dace5f6c..da41b6b1e64a 100644 --- a/drivers/media/video/saa7134/saa7134-i2c.c +++ b/drivers/media/video/saa7134/saa7134-i2c.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
29 | 28 | ||
30 | #include "saa7134-reg.h" | 29 | #include "saa7134-reg.h" |
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index 9499000f66b6..58a0cdc8414a 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/input.h> | 25 | #include <linux/input.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "saa7134-reg.h" | 28 | #include "saa7134-reg.h" |
28 | #include "saa7134.h" | 29 | #include "saa7134.h" |
diff --git a/drivers/media/video/saa7134/saa7134-ts.c b/drivers/media/video/saa7134/saa7134-ts.c index b9817d74943f..2e3f4b412d8c 100644 --- a/drivers/media/video/saa7134/saa7134-ts.c +++ b/drivers/media/video/saa7134/saa7134-ts.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
29 | 28 | ||
30 | #include "saa7134-reg.h" | 29 | #include "saa7134-reg.h" |
diff --git a/drivers/media/video/saa7134/saa7134-tvaudio.c b/drivers/media/video/saa7134/saa7134-tvaudio.c index 76b16407b01e..3e7d2fd1688f 100644 --- a/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/drivers/media/video/saa7134/saa7134-tvaudio.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/kthread.h> | 27 | #include <linux/kthread.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
30 | #include <linux/freezer.h> | 29 | #include <linux/freezer.h> |
31 | #include <asm/div64.h> | 30 | #include <asm/div64.h> |
diff --git a/drivers/media/video/saa7134/saa7134-vbi.c b/drivers/media/video/saa7134/saa7134-vbi.c index cb0304298a96..e9aa94b807f1 100644 --- a/drivers/media/video/saa7134/saa7134-vbi.c +++ b/drivers/media/video/saa7134/saa7134-vbi.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/slab.h> | ||
28 | 27 | ||
29 | #include "saa7134-reg.h" | 28 | #include "saa7134-reg.h" |
30 | #include "saa7134.h" | 29 | #include "saa7134.h" |
diff --git a/drivers/media/video/saa7164/saa7164-api.c b/drivers/media/video/saa7164/saa7164-api.c index 1d487c150340..3f1262b00cc0 100644 --- a/drivers/media/video/saa7164/saa7164-api.c +++ b/drivers/media/video/saa7164/saa7164-api.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/wait.h> | 22 | #include <linux/wait.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include "saa7164.h" | 25 | #include "saa7164.h" |
25 | 26 | ||
diff --git a/drivers/media/video/saa7164/saa7164-buffer.c b/drivers/media/video/saa7164/saa7164-buffer.c index 9ca5c83d165b..5713f3a4b76c 100644 --- a/drivers/media/video/saa7164/saa7164-buffer.c +++ b/drivers/media/video/saa7164/saa7164-buffer.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/slab.h> | ||
23 | |||
22 | #include "saa7164.h" | 24 | #include "saa7164.h" |
23 | 25 | ||
24 | /* The PCI address space for buffer handling looks like this: | 26 | /* The PCI address space for buffer handling looks like this: |
diff --git a/drivers/media/video/saa7164/saa7164-fw.c b/drivers/media/video/saa7164/saa7164-fw.c index ee0af3534ede..270245d275ab 100644 --- a/drivers/media/video/saa7164/saa7164-fw.c +++ b/drivers/media/video/saa7164/saa7164-fw.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/firmware.h> | 22 | #include <linux/firmware.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include "saa7164.h" | 25 | #include "saa7164.h" |
25 | 26 | ||
diff --git a/drivers/media/video/saa717x.c b/drivers/media/video/saa717x.c index 6818df571168..d521c648e157 100644 --- a/drivers/media/video/saa717x.c +++ b/drivers/media/video/saa717x.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/sched.h> | 36 | #include <linux/sched.h> |
36 | 37 | ||
37 | #include <linux/videodev2.h> | 38 | #include <linux/videodev2.h> |
diff --git a/drivers/media/video/saa7185.c b/drivers/media/video/saa7185.c index 212baa10829b..77db20392910 100644 --- a/drivers/media/video/saa7185.c +++ b/drivers/media/video/saa7185.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/ioctl.h> | 30 | #include <linux/ioctl.h> |
30 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
31 | #include <linux/i2c.h> | 32 | #include <linux/i2c.h> |
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index fb88c63188f3..6e16b3979326 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/moduleparam.h> | 27 | #include <linux/moduleparam.h> |
28 | #include <linux/time.h> | 28 | #include <linux/time.h> |
29 | #include <linux/version.h> | 29 | #include <linux/version.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/device.h> | 31 | #include <linux/device.h> |
31 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
32 | #include <linux/videodev2.h> | 33 | #include <linux/videodev2.h> |
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index 80f6bfa2632b..a24174ddec46 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/mutex.h> | 24 | #include <linux/mutex.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/vmalloc.h> | 28 | #include <linux/vmalloc.h> |
28 | 29 | ||
29 | #include <media/soc_camera.h> | 30 | #include <media/soc_camera.h> |
diff --git a/drivers/media/video/tda9840.c b/drivers/media/video/tda9840.c index d381fce3db40..92d22d8931c1 100644 --- a/drivers/media/video/tda9840.c +++ b/drivers/media/video/tda9840.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/ioctl.h> | 30 | #include <linux/ioctl.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/i2c.h> | 32 | #include <linux/i2c.h> |
32 | #include <media/v4l2-device.h> | 33 | #include <media/v4l2-device.h> |
33 | #include <media/v4l2-chip-ident.h> | 34 | #include <media/v4l2-chip-ident.h> |
diff --git a/drivers/media/video/tea6415c.c b/drivers/media/video/tea6415c.c index 1585839bd0bd..3021a1e6b7bb 100644 --- a/drivers/media/video/tea6415c.c +++ b/drivers/media/video/tea6415c.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/ioctl.h> | 32 | #include <linux/ioctl.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/i2c.h> | 34 | #include <linux/i2c.h> |
34 | #include <media/v4l2-device.h> | 35 | #include <media/v4l2-device.h> |
35 | #include <media/v4l2-chip-ident.h> | 36 | #include <media/v4l2-chip-ident.h> |
diff --git a/drivers/media/video/tea6420.c b/drivers/media/video/tea6420.c index 6bf6bc7dbc7f..49dafc5e1e2f 100644 --- a/drivers/media/video/tea6420.c +++ b/drivers/media/video/tea6420.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/ioctl.h> | 32 | #include <linux/ioctl.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/i2c.h> | 34 | #include <linux/i2c.h> |
34 | #include <media/v4l2-device.h> | 35 | #include <media/v4l2-device.h> |
35 | #include <media/v4l2-chip-ident.h> | 36 | #include <media/v4l2-chip-ident.h> |
diff --git a/drivers/media/video/ths7303.c b/drivers/media/video/ths7303.c index 21781f8a0e8e..61b1dd118364 100644 --- a/drivers/media/video/ths7303.c +++ b/drivers/media/video/ths7303.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/ctype.h> | 18 | #include <linux/ctype.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
20 | #include <linux/device.h> | 21 | #include <linux/device.h> |
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/media/video/tlg2300/pd-alsa.c b/drivers/media/video/tlg2300/pd-alsa.c index 6f42621ad478..9f8b7da56b67 100644 --- a/drivers/media/video/tlg2300/pd-alsa.c +++ b/drivers/media/video/tlg2300/pd-alsa.c | |||
@@ -4,10 +4,10 @@ | |||
4 | #include <linux/sound.h> | 4 | #include <linux/sound.h> |
5 | #include <linux/spinlock.h> | 5 | #include <linux/spinlock.h> |
6 | #include <linux/soundcard.h> | 6 | #include <linux/soundcard.h> |
7 | #include <linux/slab.h> | ||
8 | #include <linux/vmalloc.h> | 7 | #include <linux/vmalloc.h> |
9 | #include <linux/proc_fs.h> | 8 | #include <linux/proc_fs.h> |
10 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/gfp.h> | ||
11 | #include <sound/core.h> | 11 | #include <sound/core.h> |
12 | #include <sound/pcm.h> | 12 | #include <sound/pcm.h> |
13 | #include <sound/pcm_params.h> | 13 | #include <sound/pcm_params.h> |
diff --git a/drivers/media/video/tlg2300/pd-dvb.c b/drivers/media/video/tlg2300/pd-dvb.c index 4133aee568bf..ebd9cb5bec74 100644 --- a/drivers/media/video/tlg2300/pd-dvb.c +++ b/drivers/media/video/tlg2300/pd-dvb.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/usb.h> | 3 | #include <linux/usb.h> |
4 | #include <linux/dvb/dmx.h> | 4 | #include <linux/dvb/dmx.h> |
5 | #include <linux/delay.h> | 5 | #include <linux/delay.h> |
6 | #include <linux/gfp.h> | ||
6 | 7 | ||
7 | #include "vendorcmds.h" | 8 | #include "vendorcmds.h" |
8 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
diff --git a/drivers/media/video/tlg2300/pd-video.c b/drivers/media/video/tlg2300/pd-video.c index becfba6a3041..cf8f18c007e6 100644 --- a/drivers/media/video/tlg2300/pd-video.c +++ b/drivers/media/video/tlg2300/pd-video.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/usb.h> | 4 | #include <linux/usb.h> |
5 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/slab.h> | ||
7 | 8 | ||
8 | #include <media/v4l2-ioctl.h> | 9 | #include <media/v4l2-ioctl.h> |
9 | #include <media/v4l2-dev.h> | 10 | #include <media/v4l2-dev.h> |
diff --git a/drivers/media/video/tlv320aic23b.c b/drivers/media/video/tlv320aic23b.c index 07789c64814c..9ddb32bc7af0 100644 --- a/drivers/media/video/tlv320aic23b.c +++ b/drivers/media/video/tlv320aic23b.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/ioctl.h> | 29 | #include <linux/ioctl.h> |
29 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
30 | #include <linux/i2c.h> | 31 | #include <linux/i2c.h> |
diff --git a/drivers/media/video/tvp514x.c b/drivers/media/video/tvp514x.c index 26b4e718cd6d..e4815a1806e3 100644 --- a/drivers/media/video/tvp514x.c +++ b/drivers/media/video/tvp514x.c | |||
@@ -29,6 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/i2c.h> | 31 | #include <linux/i2c.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
33 | #include <linux/videodev2.h> | 34 | #include <linux/videodev2.h> |
34 | 35 | ||
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index 2d38e253f14e..908ffb68e926 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/i2c.h> | 8 | #include <linux/i2c.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/videodev2.h> | 10 | #include <linux/videodev2.h> |
10 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
11 | #include <media/v4l2-device.h> | 12 | #include <media/v4l2-device.h> |
diff --git a/drivers/media/video/tvp7002.c b/drivers/media/video/tvp7002.c index 5a878bca02d4..4a69bcc738f3 100644 --- a/drivers/media/video/tvp7002.c +++ b/drivers/media/video/tvp7002.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/videodev2.h> | 30 | #include <linux/videodev2.h> |
30 | #include <media/tvp7002.h> | 31 | #include <media/tvp7002.h> |
31 | #include <media/v4l2-device.h> | 32 | #include <media/v4l2-device.h> |
diff --git a/drivers/media/video/upd64031a.c b/drivers/media/video/upd64031a.c index a07a3fbb51eb..36c0c461d8be 100644 --- a/drivers/media/video/upd64031a.c +++ b/drivers/media/video/upd64031a.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
27 | #include <linux/videodev2.h> | 27 | #include <linux/videodev2.h> |
28 | #include <linux/slab.h> | ||
28 | #include <media/v4l2-device.h> | 29 | #include <media/v4l2-device.h> |
29 | #include <media/v4l2-chip-ident.h> | 30 | #include <media/v4l2-chip-ident.h> |
30 | #include <media/v4l2-i2c-drv.h> | 31 | #include <media/v4l2-i2c-drv.h> |
diff --git a/drivers/media/video/upd64083.c b/drivers/media/video/upd64083.c index 6eb0e5b00c32..c5af93b30a2b 100644 --- a/drivers/media/video/upd64083.c +++ b/drivers/media/video/upd64083.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
27 | #include <linux/videodev2.h> | 27 | #include <linux/videodev2.h> |
28 | #include <linux/slab.h> | ||
28 | #include <media/v4l2-device.h> | 29 | #include <media/v4l2-device.h> |
29 | #include <media/v4l2-chip-ident.h> | 30 | #include <media/v4l2-chip-ident.h> |
30 | #include <media/v4l2-i2c-drv.h> | 31 | #include <media/v4l2-i2c-drv.h> |
diff --git a/drivers/media/video/usbvideo/konicawc.c b/drivers/media/video/usbvideo/konicawc.c index a0addcb04295..562e1d170be0 100644 --- a/drivers/media/video/usbvideo/konicawc.c +++ b/drivers/media/video/usbvideo/konicawc.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/usb/input.h> | 18 | #include <linux/usb/input.h> |
19 | #include <linux/gfp.h> | ||
19 | 20 | ||
20 | #include "usbvideo.h" | 21 | #include "usbvideo.h" |
21 | 22 | ||
diff --git a/drivers/media/video/usbvideo/quickcam_messenger.c b/drivers/media/video/usbvideo/quickcam_messenger.c index c4d1b96b5cee..fab48ec6c0ea 100644 --- a/drivers/media/video/usbvideo/quickcam_messenger.c +++ b/drivers/media/video/usbvideo/quickcam_messenger.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
35 | #include <linux/input.h> | 35 | #include <linux/input.h> |
36 | #include <linux/usb/input.h> | 36 | #include <linux/usb/input.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include "usbvideo.h" | 39 | #include "usbvideo.h" |
39 | #include "quickcam_messenger.h" | 40 | #include "quickcam_messenger.h" |
diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c index e0f91e4ab653..f7aae2293758 100644 --- a/drivers/media/video/usbvision/usbvision-core.c +++ b/drivers/media/video/usbvision/usbvision-core.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/list.h> | 27 | #include <linux/list.h> |
28 | #include <linux/timer.h> | 28 | #include <linux/timer.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/gfp.h> |
30 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
31 | #include <linux/highmem.h> | 31 | #include <linux/highmem.h> |
32 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
diff --git a/drivers/media/video/usbvision/usbvision-i2c.c b/drivers/media/video/usbvision/usbvision-i2c.c index 0613922997e0..083765238a6a 100644 --- a/drivers/media/video/usbvision/usbvision-i2c.c +++ b/drivers/media/video/usbvision/usbvision-i2c.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/slab.h> | ||
31 | #include <linux/init.h> | 30 | #include <linux/init.h> |
32 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
33 | #include <linux/ioport.h> | 32 | #include <linux/ioport.h> |
diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c index 3b2e7800d56f..6d3850b37161 100644 --- a/drivers/media/video/uvc/uvc_ctrl.c +++ b/drivers/media/video/uvc/uvc_ctrl.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/uaccess.h> | 18 | #include <linux/uaccess.h> |
18 | #include <linux/usb.h> | 19 | #include <linux/usb.h> |
19 | #include <linux/videodev2.h> | 20 | #include <linux/videodev2.h> |
diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c index a814820a3f6e..86ff8c12ea58 100644 --- a/drivers/media/video/uvc/uvc_driver.c +++ b/drivers/media/video/uvc/uvc_driver.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/list.h> | 27 | #include <linux/list.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/usb.h> | 30 | #include <linux/usb.h> |
30 | #include <linux/videodev2.h> | 31 | #include <linux/videodev2.h> |
31 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
diff --git a/drivers/media/video/uvc/uvc_status.c b/drivers/media/video/uvc/uvc_status.c index 1ca6dff73612..85019bdacdf7 100644 --- a/drivers/media/video/uvc/uvc_status.c +++ b/drivers/media/video/uvc/uvc_status.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/input.h> | 15 | #include <linux/input.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/usb.h> | 17 | #include <linux/usb.h> |
17 | #include <linux/usb/input.h> | 18 | #include <linux/usb/input.h> |
18 | 19 | ||
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c index 43152aa52227..7c9ab2933496 100644 --- a/drivers/media/video/uvc/uvc_v4l2.c +++ b/drivers/media/video/uvc/uvc_v4l2.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/version.h> | 15 | #include <linux/version.h> |
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/usb.h> | 19 | #include <linux/usb.h> |
19 | #include <linux/videodev2.h> | 20 | #include <linux/videodev2.h> |
20 | #include <linux/vmalloc.h> | 21 | #include <linux/vmalloc.h> |
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index 6b0666be370f..821a9969b7bf 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/usb.h> | 18 | #include <linux/usb.h> |
18 | #include <linux/videodev2.h> | 19 | #include <linux/videodev2.h> |
19 | #include <linux/vmalloc.h> | 20 | #include <linux/vmalloc.h> |
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index 4b11257c3184..7d59c107f13b 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/types.h> | 17 | #include <linux/types.h> |
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | 19 | ||
diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c index 22c01097e8a8..dce4f3aa4af1 100644 --- a/drivers/media/video/videobuf-dma-contig.c +++ b/drivers/media/video/videobuf-dma-contig.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/pagemap.h> | 20 | #include <linux/pagemap.h> |
21 | #include <linux/dma-mapping.h> | 21 | #include <linux/dma-mapping.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/slab.h> | ||
23 | #include <media/videobuf-dma-contig.h> | 24 | #include <media/videobuf-dma-contig.h> |
24 | 25 | ||
25 | struct videobuf_dma_contig_memory { | 26 | struct videobuf_dma_contig_memory { |
diff --git a/drivers/media/video/videobuf-dvb.c b/drivers/media/video/videobuf-dvb.c index a56cf0d3a6d6..0afb62e63d99 100644 --- a/drivers/media/video/videobuf-dvb.c +++ b/drivers/media/video/videobuf-dvb.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
20 | #include <linux/kthread.h> | 20 | #include <linux/kthread.h> |
21 | #include <linux/file.h> | 21 | #include <linux/file.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <linux/freezer.h> | 24 | #include <linux/freezer.h> |
24 | 25 | ||
diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c index a15d1e7cbed8..3eb15f72ac09 100644 --- a/drivers/media/video/vino.c +++ b/drivers/media/video/vino.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/fs.h> | 33 | #include <linux/fs.h> |
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/mm.h> | 37 | #include <linux/mm.h> |
37 | #include <linux/time.h> | 38 | #include <linux/time.h> |
38 | #include <linux/version.h> | 39 | #include <linux/version.h> |
diff --git a/drivers/media/video/vp27smpx.c b/drivers/media/video/vp27smpx.c index 38e53b303cc3..ca8303bd2401 100644 --- a/drivers/media/video/vp27smpx.c +++ b/drivers/media/video/vp27smpx.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/ioctl.h> | 27 | #include <linux/ioctl.h> |
27 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
28 | #include <linux/i2c.h> | 29 | #include <linux/i2c.h> |
diff --git a/drivers/media/video/vpx3220.c b/drivers/media/video/vpx3220.c index 33205d7537d8..77ebcea7c3da 100644 --- a/drivers/media/video/vpx3220.c +++ b/drivers/media/video/vpx3220.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/slab.h> | ||
25 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
26 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
27 | #include <linux/videodev2.h> | 28 | #include <linux/videodev2.h> |
diff --git a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c index dcade619cbd8..bf9bf650a317 100644 --- a/drivers/media/video/w9966.c +++ b/drivers/media/video/w9966.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/init.h> | 58 | #include <linux/init.h> |
59 | #include <linux/delay.h> | 59 | #include <linux/delay.h> |
60 | #include <linux/videodev.h> | 60 | #include <linux/videodev.h> |
61 | #include <linux/slab.h> | ||
61 | #include <media/v4l2-common.h> | 62 | #include <media/v4l2-common.h> |
62 | #include <media/v4l2-ioctl.h> | 63 | #include <media/v4l2-ioctl.h> |
63 | #include <linux/parport.h> | 64 | #include <linux/parport.h> |
diff --git a/drivers/media/video/wm8739.c b/drivers/media/video/wm8739.c index b572ce288e14..a11b99b4226b 100644 --- a/drivers/media/video/wm8739.c +++ b/drivers/media/video/wm8739.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/ioctl.h> | 27 | #include <linux/ioctl.h> |
27 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
28 | #include <linux/i2c.h> | 29 | #include <linux/i2c.h> |
diff --git a/drivers/media/video/wm8775.c b/drivers/media/video/wm8775.c index f1f261a35245..5c2ba599c0c7 100644 --- a/drivers/media/video/wm8775.c +++ b/drivers/media/video/wm8775.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/ioctl.h> | 31 | #include <linux/ioctl.h> |
31 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
32 | #include <linux/i2c.h> | 33 | #include <linux/i2c.h> |
diff --git a/drivers/media/video/zoran/zoran_card.c b/drivers/media/video/zoran/zoran_card.c index be70574870de..bfcd3aef50f9 100644 --- a/drivers/media/video/zoran/zoran_card.c +++ b/drivers/media/video/zoran/zoran_card.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/vmalloc.h> | 36 | #include <linux/vmalloc.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include <linux/proc_fs.h> | 39 | #include <linux/proc_fs.h> |
39 | #include <linux/i2c.h> | 40 | #include <linux/i2c.h> |
diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c index b3bf1c44d74d..c00fe8253c51 100644 --- a/drivers/memstick/core/memstick.c +++ b/drivers/memstick/core/memstick.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/idr.h> | 16 | #include <linux/idr.h> |
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #define DRIVER_NAME "memstick" | 21 | #define DRIVER_NAME "memstick" |
21 | 22 | ||
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c index 972b87069d55..8327e248520a 100644 --- a/drivers/memstick/core/mspro_block.c +++ b/drivers/memstick/core/mspro_block.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/hdreg.h> | 17 | #include <linux/hdreg.h> |
18 | #include <linux/kthread.h> | 18 | #include <linux/kthread.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/memstick.h> | 21 | #include <linux/memstick.h> |
21 | 22 | ||
22 | #define DRIVER_NAME "mspro_block" | 23 | #define DRIVER_NAME "mspro_block" |
diff --git a/drivers/memstick/host/jmb38x_ms.c b/drivers/memstick/host/jmb38x_ms.c index f4a162a4bece..f2b894cd8b02 100644 --- a/drivers/memstick/host/jmb38x_ms.c +++ b/drivers/memstick/host/jmb38x_ms.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/highmem.h> | 17 | #include <linux/highmem.h> |
18 | #include <linux/memstick.h> | 18 | #include <linux/memstick.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #define DRIVER_NAME "jmb38x_ms" | 21 | #define DRIVER_NAME "jmb38x_ms" |
21 | 22 | ||
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index 612ab3c51a6b..33f7256055b1 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c | |||
@@ -54,6 +54,7 @@ | |||
54 | #include <linux/reboot.h> /* notifier code */ | 54 | #include <linux/reboot.h> /* notifier code */ |
55 | #include <linux/workqueue.h> | 55 | #include <linux/workqueue.h> |
56 | #include <linux/sort.h> | 56 | #include <linux/sort.h> |
57 | #include <linux/slab.h> | ||
57 | 58 | ||
58 | #include <scsi/scsi.h> | 59 | #include <scsi/scsi.h> |
59 | #include <scsi/scsi_cmnd.h> | 60 | #include <scsi/scsi_cmnd.h> |
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c index 34f3f36f819b..4fa9665cbe93 100644 --- a/drivers/message/fusion/mptlan.c +++ b/drivers/message/fusion/mptlan.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <linux/module.h> | 57 | #include <linux/module.h> |
58 | #include <linux/fs.h> | 58 | #include <linux/fs.h> |
59 | #include <linux/sched.h> | 59 | #include <linux/sched.h> |
60 | #include <linux/slab.h> | ||
60 | 61 | ||
61 | #define my_VERSION MPT_LINUX_VERSION_COMMON | 62 | #define my_VERSION MPT_LINUX_VERSION_COMMON |
62 | #define MYNAM "mptlan" | 63 | #define MYNAM "mptlan" |
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index c20bbe45da82..76687126b573 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
@@ -45,6 +45,7 @@ | |||
45 | 45 | ||
46 | #include <linux/module.h> | 46 | #include <linux/module.h> |
47 | #include <linux/kernel.h> | 47 | #include <linux/kernel.h> |
48 | #include <linux/slab.h> | ||
48 | #include <linux/init.h> | 49 | #include <linux/init.h> |
49 | #include <linux/errno.h> | 50 | #include <linux/errno.h> |
50 | #include <linux/jiffies.h> | 51 | #include <linux/jiffies.h> |
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 4a7d1afcb666..6796597dcee0 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -46,6 +46,7 @@ | |||
46 | 46 | ||
47 | #include <linux/module.h> | 47 | #include <linux/module.h> |
48 | #include <linux/kernel.h> | 48 | #include <linux/kernel.h> |
49 | #include <linux/slab.h> | ||
49 | #include <linux/init.h> | 50 | #include <linux/init.h> |
50 | #include <linux/errno.h> | 51 | #include <linux/errno.h> |
51 | #include <linux/kdev_t.h> | 52 | #include <linux/kdev_t.h> |
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 69f4257419b5..e44365193fdf 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c | |||
@@ -46,6 +46,7 @@ | |||
46 | 46 | ||
47 | #include <linux/module.h> | 47 | #include <linux/module.h> |
48 | #include <linux/kernel.h> | 48 | #include <linux/kernel.h> |
49 | #include <linux/slab.h> | ||
49 | #include <linux/init.h> | 50 | #include <linux/init.h> |
50 | #include <linux/errno.h> | 51 | #include <linux/errno.h> |
51 | #include <linux/kdev_t.h> | 52 | #include <linux/kdev_t.h> |
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index 2658b1484a2c..fc593fbab696 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c | |||
@@ -51,6 +51,7 @@ | |||
51 | */ | 51 | */ |
52 | 52 | ||
53 | #include <linux/module.h> | 53 | #include <linux/module.h> |
54 | #include <linux/slab.h> | ||
54 | #include <linux/i2o.h> | 55 | #include <linux/i2o.h> |
55 | 56 | ||
56 | #include <linux/mempool.h> | 57 | #include <linux/mempool.h> |
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c index 3d5f40cd69df..11073fa3d9f4 100644 --- a/drivers/message/i2o/i2o_config.c +++ b/drivers/message/i2o/i2o_config.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/miscdevice.h> | 33 | #include <linux/miscdevice.h> |
34 | #include <linux/smp_lock.h> | 34 | #include <linux/smp_lock.h> |
35 | #include <linux/compat.h> | 35 | #include <linux/compat.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <asm/uaccess.h> | 38 | #include <asm/uaccess.h> |
38 | 39 | ||
diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c index 949a648f8e2e..07dbeaf9df99 100644 --- a/drivers/message/i2o/i2o_proc.c +++ b/drivers/message/i2o/i2o_proc.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
41 | #include <linux/pci.h> | 41 | #include <linux/pci.h> |
42 | #include <linux/i2o.h> | 42 | #include <linux/i2o.h> |
43 | #include <linux/slab.h> | ||
43 | #include <linux/proc_fs.h> | 44 | #include <linux/proc_fs.h> |
44 | #include <linux/seq_file.h> | 45 | #include <linux/seq_file.h> |
45 | #include <linux/init.h> | 46 | #include <linux/init.h> |
diff --git a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c index ef5ce2676f05..090d2a3a6548 100644 --- a/drivers/message/i2o/iop.c +++ b/drivers/message/i2o/iop.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/i2o.h> | 29 | #include <linux/i2o.h> |
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <linux/slab.h> | ||
32 | #include "core.h" | 33 | #include "core.h" |
33 | 34 | ||
34 | #define OSM_NAME "i2o" | 35 | #define OSM_NAME "i2o" |
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c index 35ba2ae38b42..73e4658af53c 100644 --- a/drivers/message/i2o/pci.c +++ b/drivers/message/i2o/pci.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/i2o.h> | 33 | #include <linux/i2o.h> |
33 | #include "core.h" | 34 | #include "core.h" |
34 | 35 | ||
diff --git a/drivers/mfd/88pm860x-i2c.c b/drivers/mfd/88pm860x-i2c.c index c37e12bf3004..4a6e7186334e 100644 --- a/drivers/mfd/88pm860x-i2c.c +++ b/drivers/mfd/88pm860x-i2c.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/i2c.h> | 14 | #include <linux/i2c.h> |
15 | #include <linux/mfd/88pm860x.h> | 15 | #include <linux/mfd/88pm860x.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | static inline int pm860x_read_device(struct i2c_client *i2c, | 18 | static inline int pm860x_read_device(struct i2c_client *i2c, |
18 | int reg, int bytes, void *dest) | 19 | int reg, int bytes, void *dest) |
diff --git a/drivers/mfd/ab3100-core.c b/drivers/mfd/ab3100-core.c index a2ce3b6af4a2..e4ca5909e424 100644 --- a/drivers/mfd/ab3100-core.c +++ b/drivers/mfd/ab3100-core.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/mutex.h> | 10 | #include <linux/mutex.h> |
11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
12 | #include <linux/notifier.h> | 12 | #include <linux/notifier.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/err.h> | 14 | #include <linux/err.h> |
14 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
15 | #include <linux/device.h> | 16 | #include <linux/device.h> |
diff --git a/drivers/mfd/ab3100-otp.c b/drivers/mfd/ab3100-otp.c index b603469dff69..2d14655fdebd 100644 --- a/drivers/mfd/ab3100-otp.c +++ b/drivers/mfd/ab3100-otp.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
14 | #include <linux/mfd/ab3100.h> | 15 | #include <linux/mfd/ab3100.h> |
diff --git a/drivers/mfd/ab4500-core.c b/drivers/mfd/ab4500-core.c index 1c44c19e073a..c275daa3ab1a 100644 --- a/drivers/mfd/ab4500-core.c +++ b/drivers/mfd/ab4500-core.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * Interrupt management to be added - TODO. | 15 | * Interrupt management to be added - TODO. |
16 | */ | 16 | */ |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
diff --git a/drivers/mfd/adp5520.c b/drivers/mfd/adp5520.c index b26644772d02..005532865654 100644 --- a/drivers/mfd/adp5520.c +++ b/drivers/mfd/adp5520.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
25 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
26 | #include <linux/err.h> | 27 | #include <linux/err.h> |
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index 95c1e6bd1729..7de708d15d72 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
25 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
26 | 27 | ||
diff --git a/drivers/mfd/da903x.c b/drivers/mfd/da903x.c index e5ffe5617393..67181b147ab3 100644 --- a/drivers/mfd/da903x.c +++ b/drivers/mfd/da903x.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/mfd/da903x.h> | 20 | #include <linux/mfd/da903x.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #define DA9030_CHIP_ID 0x00 | 23 | #define DA9030_CHIP_ID 0x00 |
23 | #define DA9030_EVENT_A 0x01 | 24 | #define DA9030_EVENT_A 0x01 |
diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c index df405af968fa..134c69aa4790 100644 --- a/drivers/mfd/ezx-pcap.c +++ b/drivers/mfd/ezx-pcap.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/mfd/ezx-pcap.h> | 18 | #include <linux/mfd/ezx-pcap.h> |
19 | #include <linux/spi/spi.h> | 19 | #include <linux/spi/spi.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #define PCAP_ADC_MAXQ 8 | 23 | #define PCAP_ADC_MAXQ 8 |
23 | struct pcap_adc_request { | 24 | struct pcap_adc_request { |
diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c index addb846c1e34..d3e74f8585e0 100644 --- a/drivers/mfd/htc-egpio.c +++ b/drivers/mfd/htc-egpio.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/module.h> | 19 | #include <linux/module.h> |
19 | #include <linux/mfd/htc-egpio.h> | 20 | #include <linux/mfd/htc-egpio.h> |
20 | 21 | ||
diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c index 37b9fdab4f36..594c9a8e25e1 100644 --- a/drivers/mfd/htc-i2cpld.c +++ b/drivers/mfd/htc-i2cpld.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/spinlock.h> | 35 | #include <linux/spinlock.h> |
36 | #include <linux/htcpld.h> | 36 | #include <linux/htcpld.h> |
37 | #include <linux/gpio.h> | 37 | #include <linux/gpio.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | struct htcpld_chip { | 40 | struct htcpld_chip { |
40 | spinlock_t lock; | 41 | spinlock_t lock; |
diff --git a/drivers/mfd/htc-pasic3.c b/drivers/mfd/htc-pasic3.c index cb73051e43db..f04300e05fd6 100644 --- a/drivers/mfd/htc-pasic3.c +++ b/drivers/mfd/htc-pasic3.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mfd/core.h> | 19 | #include <linux/mfd/core.h> |
20 | #include <linux/mfd/ds1wm.h> | 20 | #include <linux/mfd/ds1wm.h> |
21 | #include <linux/mfd/htc-pasic3.h> | 21 | #include <linux/mfd/htc-pasic3.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | struct pasic3_data { | 24 | struct pasic3_data { |
24 | void __iomem *mapping; | 25 | void __iomem *mapping; |
diff --git a/drivers/mfd/max8925-i2c.c b/drivers/mfd/max8925-i2c.c index c0b883c14f41..d9fd8785da4d 100644 --- a/drivers/mfd/max8925-i2c.c +++ b/drivers/mfd/max8925-i2c.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/i2c.h> | 14 | #include <linux/i2c.h> |
15 | #include <linux/mfd/max8925.h> | 15 | #include <linux/mfd/max8925.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #define RTC_I2C_ADDR 0x68 | 18 | #define RTC_I2C_ADDR 0x68 |
18 | #define ADC_I2C_ADDR 0x47 | 19 | #define ADC_I2C_ADDR 0x47 |
diff --git a/drivers/mfd/mc13783-core.c b/drivers/mfd/mc13783-core.c index 62a847e4c2d8..1f68ecadddc2 100644 --- a/drivers/mfd/mc13783-core.c +++ b/drivers/mfd/mc13783-core.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * the terms of the GNU General Public License version 2 as published by the | 9 | * the terms of the GNU General Public License version 2 as published by the |
10 | * Free Software Foundation. | 10 | * Free Software Foundation. |
11 | */ | 11 | */ |
12 | #include <linux/slab.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/spi/spi.h> | 14 | #include <linux/spi/spi.h> |
14 | #include <linux/mfd/core.h> | 15 | #include <linux/mfd/core.h> |
diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c index 258427232728..2dab02d9ac8b 100644 --- a/drivers/mfd/mcp-sa11x0.c +++ b/drivers/mfd/mcp-sa11x0.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
22 | #include <linux/mfd/mcp.h> | 21 | #include <linux/mfd/mcp.h> |
23 | 22 | ||
diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c index 970afa103261..a94b131a18ef 100644 --- a/drivers/mfd/menelaus.c +++ b/drivers/mfd/menelaus.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/delay.h> | 40 | #include <linux/delay.h> |
41 | #include <linux/rtc.h> | 41 | #include <linux/rtc.h> |
42 | #include <linux/bcd.h> | 42 | #include <linux/bcd.h> |
43 | #include <linux/slab.h> | ||
43 | 44 | ||
44 | #include <asm/mach/irq.h> | 45 | #include <asm/mach/irq.h> |
45 | 46 | ||
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index aa17f4bddc56..8ffbb7a85a7e 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/acpi.h> | 16 | #include <linux/acpi.h> |
17 | #include <linux/mfd/core.h> | 17 | #include <linux/mfd/core.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | static int mfd_add_device(struct device *parent, int id, | 20 | static int mfd_add_device(struct device *parent, int id, |
20 | const struct mfd_cell *cell, | 21 | const struct mfd_cell *cell, |
diff --git a/drivers/mfd/pcf50633-adc.c b/drivers/mfd/pcf50633-adc.c index 6d2e8466df1d..fe8f922f6654 100644 --- a/drivers/mfd/pcf50633-adc.c +++ b/drivers/mfd/pcf50633-adc.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/module.h> | 21 | #include <linux/module.h> |
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
22 | #include <linux/device.h> | 23 | #include <linux/device.h> |
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c index 03dcc9200707..63a614d696c1 100644 --- a/drivers/mfd/pcf50633-core.c +++ b/drivers/mfd/pcf50633-core.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
24 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <linux/mfd/pcf50633/core.h> | 27 | #include <linux/mfd/pcf50633/core.h> |
27 | 28 | ||
diff --git a/drivers/mfd/sh_mobile_sdhi.c b/drivers/mfd/sh_mobile_sdhi.c index 468fd366d4da..497f91b6138e 100644 --- a/drivers/mfd/sh_mobile_sdhi.c +++ b/drivers/mfd/sh_mobile_sdhi.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
24 | #include <linux/mmc/host.h> | 25 | #include <linux/mmc/host.h> |
25 | #include <linux/mfd/core.h> | 26 | #include <linux/mfd/core.h> |
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c index 7b6652f60117..bc9275c12133 100644 --- a/drivers/mfd/sm501.c +++ b/drivers/mfd/sm501.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/i2c-gpio.h> | 22 | #include <linux/i2c-gpio.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <linux/sm501.h> | 25 | #include <linux/sm501.h> |
25 | #include <linux/sm501-regs.h> | 26 | #include <linux/sm501-regs.h> |
diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c index 26d9176fca91..da6383a934ac 100644 --- a/drivers/mfd/t7l66xb.c +++ b/drivers/mfd/t7l66xb.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/err.h> | 27 | #include <linux/err.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/irq.h> | 30 | #include <linux/irq.h> |
30 | #include <linux/clk.h> | 31 | #include <linux/clk.h> |
31 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
diff --git a/drivers/mfd/tc6387xb.c b/drivers/mfd/tc6387xb.c index 5c7f04343d5c..517f9bcdeaac 100644 --- a/drivers/mfd/tc6387xb.c +++ b/drivers/mfd/tc6387xb.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/mfd/core.h> | 17 | #include <linux/mfd/core.h> |
18 | #include <linux/mfd/tmio.h> | 18 | #include <linux/mfd/tmio.h> |
19 | #include <linux/mfd/tc6387xb.h> | 19 | #include <linux/mfd/tc6387xb.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | enum { | 22 | enum { |
22 | TC6387XB_CELL_MMC, | 23 | TC6387XB_CELL_MMC, |
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c index c59e5c5737d0..fcf9068810fb 100644 --- a/drivers/mfd/tc6393xb.c +++ b/drivers/mfd/tc6393xb.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/mfd/tmio.h> | 25 | #include <linux/mfd/tmio.h> |
26 | #include <linux/mfd/tc6393xb.h> | 26 | #include <linux/mfd/tc6393xb.h> |
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #define SCR_REVID 0x08 /* b Revision ID */ | 30 | #define SCR_REVID 0x08 /* b Revision ID */ |
30 | #define SCR_ISR 0x50 /* b Interrupt Status */ | 31 | #define SCR_ISR 0x50 /* b Interrupt Status */ |
diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c index 1ed44d283803..7f478ec4184b 100644 --- a/drivers/mfd/timberdale.c +++ b/drivers/mfd/timberdale.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
26 | #include <linux/msi.h> | 26 | #include <linux/msi.h> |
27 | #include <linux/mfd/core.h> | 27 | #include <linux/mfd/core.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include <linux/timb_gpio.h> | 30 | #include <linux/timb_gpio.h> |
30 | 31 | ||
diff --git a/drivers/mfd/twl4030-codec.c b/drivers/mfd/twl4030-codec.c index 700b149c1b91..add6f67d8032 100644 --- a/drivers/mfd/twl4030-codec.c +++ b/drivers/mfd/twl4030-codec.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
27 | #include <linux/fs.h> | 28 | #include <linux/fs.h> |
28 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c index 9df9a5ad38f9..202bdd59632d 100644 --- a/drivers/mfd/twl4030-irq.c +++ b/drivers/mfd/twl4030-irq.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/irq.h> | 32 | #include <linux/irq.h> |
33 | #include <linux/kthread.h> | 33 | #include <linux/kthread.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include <linux/i2c/twl.h> | 36 | #include <linux/i2c/twl.h> |
36 | 37 | ||
diff --git a/drivers/mfd/ucb1400_core.c b/drivers/mfd/ucb1400_core.c index 85fd9421be94..dbe280153f9e 100644 --- a/drivers/mfd/ucb1400_core.c +++ b/drivers/mfd/ucb1400_core.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/ucb1400.h> | 26 | #include <linux/ucb1400.h> |
26 | 27 | ||
27 | unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, | 28 | unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, |
diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c index 07101e9e1cba..a3d5728b6449 100644 --- a/drivers/mfd/wm831x-core.c +++ b/drivers/mfd/wm831x-core.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/bcd.h> | 18 | #include <linux/bcd.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/mfd/core.h> | 20 | #include <linux/mfd/core.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <linux/mfd/wm831x/core.h> | 23 | #include <linux/mfd/wm831x/core.h> |
23 | #include <linux/mfd/wm831x/pdata.h> | 24 | #include <linux/mfd/wm831x/pdata.h> |
diff --git a/drivers/mfd/wm8350-core.c b/drivers/mfd/wm8350-core.c index bd75807d5302..e400a3bed063 100644 --- a/drivers/mfd/wm8350-core.c +++ b/drivers/mfd/wm8350-core.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/bug.h> | 19 | #include <linux/bug.h> |
19 | #include <linux/device.h> | 20 | #include <linux/device.h> |
20 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
diff --git a/drivers/mfd/wm8350-i2c.c b/drivers/mfd/wm8350-i2c.c index 8d8c93217572..65830f57c093 100644 --- a/drivers/mfd/wm8350-i2c.c +++ b/drivers/mfd/wm8350-i2c.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/mfd/wm8350/core.h> | 21 | #include <linux/mfd/wm8350/core.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | static int wm8350_i2c_read_device(struct wm8350 *wm8350, char reg, | 24 | static int wm8350_i2c_read_device(struct wm8350 *wm8350, char reg, |
24 | int bytes, void *dest) | 25 | int bytes, void *dest) |
diff --git a/drivers/mfd/wm8400-core.c b/drivers/mfd/wm8400-core.c index ecfc8bbe89b9..865ce013a821 100644 --- a/drivers/mfd/wm8400-core.c +++ b/drivers/mfd/wm8400-core.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/mfd/core.h> | 18 | #include <linux/mfd/core.h> |
19 | #include <linux/mfd/wm8400-private.h> | 19 | #include <linux/mfd/wm8400-private.h> |
20 | #include <linux/mfd/wm8400-audio.h> | 20 | #include <linux/mfd/wm8400-audio.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | static struct { | 23 | static struct { |
23 | u16 readable; /* Mask of readable bits */ | 24 | u16 readable; /* Mask of readable bits */ |
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index 844e1c1b7d90..cc524df10aa1 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/i2c.h> | 18 | #include <linux/i2c.h> |
18 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
19 | #include <linux/mfd/core.h> | 20 | #include <linux/mfd/core.h> |
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index 558bf3f2c276..4afffe610f99 100644 --- a/drivers/misc/atmel-ssc.c +++ b/drivers/misc/atmel-ssc.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/atmel-ssc.h> | 17 | #include <linux/atmel-ssc.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | /* Serialize access to ssc_list and user count */ | 20 | /* Serialize access to ssc_list and user count */ |
20 | static DEFINE_SPINLOCK(user_lock); | 21 | static DEFINE_SPINLOCK(user_lock); |
diff --git a/drivers/misc/atmel_pwm.c b/drivers/misc/atmel_pwm.c index 6aa5294dfec4..0f3fb4f03bdf 100644 --- a/drivers/misc/atmel_pwm.c +++ b/drivers/misc/atmel_pwm.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <linux/module.h> | 1 | #include <linux/module.h> |
2 | #include <linux/clk.h> | 2 | #include <linux/clk.h> |
3 | #include <linux/err.h> | 3 | #include <linux/err.h> |
4 | #include <linux/slab.h> | ||
4 | #include <linux/io.h> | 5 | #include <linux/io.h> |
5 | #include <linux/interrupt.h> | 6 | #include <linux/interrupt.h> |
6 | #include <linux/platform_device.h> | 7 | #include <linux/platform_device.h> |
diff --git a/drivers/misc/atmel_tclib.c b/drivers/misc/atmel_tclib.c index 05dc8a31f280..3891124001f2 100644 --- a/drivers/misc/atmel_tclib.c +++ b/drivers/misc/atmel_tclib.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/ioport.h> | 6 | #include <linux/ioport.h> |
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/platform_device.h> | 8 | #include <linux/platform_device.h> |
9 | #include <linux/slab.h> | ||
9 | 10 | ||
10 | /* Number of bytes to reserve for the iomem resource */ | 11 | /* Number of bytes to reserve for the iomem resource */ |
11 | #define ATMEL_TC_IOMEM_SIZE 256 | 12 | #define ATMEL_TC_IOMEM_SIZE 256 |
diff --git a/drivers/misc/c2port/core.c b/drivers/misc/c2port/core.c index b5346b4db91a..ed090e77c9cd 100644 --- a/drivers/misc/c2port/core.c +++ b/drivers/misc/c2port/core.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/idr.h> | 21 | #include <linux/idr.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <linux/c2port.h> | 25 | #include <linux/c2port.h> |
25 | 26 | ||
@@ -912,8 +913,8 @@ struct c2port_device *c2port_device_register(char *name, | |||
912 | 913 | ||
913 | c2dev->dev = device_create(c2port_class, NULL, 0, c2dev, | 914 | c2dev->dev = device_create(c2port_class, NULL, 0, c2dev, |
914 | "c2port%d", id); | 915 | "c2port%d", id); |
915 | if (unlikely(!c2dev->dev)) { | 916 | if (unlikely(IS_ERR(c2dev->dev))) { |
916 | ret = -ENOMEM; | 917 | ret = PTR_ERR(c2dev->dev); |
917 | goto error_device_create; | 918 | goto error_device_create; |
918 | } | 919 | } |
919 | dev_set_drvdata(c2dev->dev, c2dev); | 920 | dev_set_drvdata(c2dev->dev, c2dev); |
diff --git a/drivers/misc/cb710/core.c b/drivers/misc/cb710/core.c index b14eab0f2ba5..efec4139c3f6 100644 --- a/drivers/misc/cb710/core.c +++ b/drivers/misc/cb710/core.c | |||
@@ -9,11 +9,11 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
14 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
15 | #include <linux/idr.h> | 14 | #include <linux/idr.h> |
16 | #include <linux/cb710.h> | 15 | #include <linux/cb710.h> |
16 | #include <linux/gfp.h> | ||
17 | 17 | ||
18 | static DEFINE_IDA(cb710_ida); | 18 | static DEFINE_IDA(cb710_ida); |
19 | static DEFINE_SPINLOCK(cb710_ida_lock); | 19 | static DEFINE_SPINLOCK(cb710_ida_lock); |
diff --git a/drivers/misc/cb710/debug.c b/drivers/misc/cb710/debug.c index 02358d086e03..fcb3b8e30c52 100644 --- a/drivers/misc/cb710/debug.c +++ b/drivers/misc/cb710/debug.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/cb710.h> | 10 | #include <linux/cb710.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/slab.h> | ||
14 | 13 | ||
15 | #define CB710_REG_COUNT 0x80 | 14 | #define CB710_REG_COUNT 0x80 |
16 | 15 | ||
diff --git a/drivers/misc/cs5535-mfgpt.c b/drivers/misc/cs5535-mfgpt.c index 8110460558ff..9bec24db4d41 100644 --- a/drivers/misc/cs5535-mfgpt.c +++ b/drivers/misc/cs5535-mfgpt.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | #include <linux/cs5535.h> | 20 | #include <linux/cs5535.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #define DRV_NAME "cs5535-mfgpt" | 23 | #define DRV_NAME "cs5535-mfgpt" |
23 | #define MFGPT_BAR 2 | 24 | #define MFGPT_BAR 2 |
diff --git a/drivers/misc/ds1682.c b/drivers/misc/ds1682.c index f3ee4a1abb77..9197cfc55015 100644 --- a/drivers/misc/ds1682.c +++ b/drivers/misc/ds1682.c | |||
@@ -33,7 +33,6 @@ | |||
33 | 33 | ||
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/slab.h> | ||
37 | #include <linux/i2c.h> | 36 | #include <linux/i2c.h> |
38 | #include <linux/string.h> | 37 | #include <linux/string.h> |
39 | #include <linux/list.h> | 38 | #include <linux/list.h> |
diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c index 1eac626e710a..48c84a58163e 100644 --- a/drivers/misc/enclosure.c +++ b/drivers/misc/enclosure.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | static LIST_HEAD(container_list); | 32 | static LIST_HEAD(container_list); |
32 | static DEFINE_MUTEX(container_list_lock); | 33 | static DEFINE_MUTEX(container_list_lock); |
diff --git a/drivers/misc/ep93xx_pwm.c b/drivers/misc/ep93xx_pwm.c index ba4694169d79..46b3439673e9 100644 --- a/drivers/misc/ep93xx_pwm.c +++ b/drivers/misc/ep93xx_pwm.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
23 | #include <linux/err.h> | 24 | #include <linux/err.h> |
24 | #include <linux/io.h> | 25 | #include <linux/io.h> |
diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c index a92a3a742b43..98ad0120aa9b 100644 --- a/drivers/misc/hpilo.c +++ b/drivers/misc/hpilo.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/wait.h> | 26 | #include <linux/wait.h> |
27 | #include <linux/poll.h> | 27 | #include <linux/poll.h> |
28 | #include <linux/slab.h> | ||
28 | #include "hpilo.h" | 29 | #include "hpilo.h" |
29 | 30 | ||
30 | static struct class *ilo_class; | 31 | static struct class *ilo_class; |
diff --git a/drivers/misc/ibmasm/command.c b/drivers/misc/ibmasm/command.c index e2031739aa29..5c766b4fb238 100644 --- a/drivers/misc/ibmasm/command.c +++ b/drivers/misc/ibmasm/command.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
26 | #include <linux/slab.h> | ||
26 | #include "ibmasm.h" | 27 | #include "ibmasm.h" |
27 | #include "lowlevel.h" | 28 | #include "lowlevel.h" |
28 | 29 | ||
diff --git a/drivers/misc/ibmasm/event.c b/drivers/misc/ibmasm/event.c index 572d41ffc186..76bfda1ffaa9 100644 --- a/drivers/misc/ibmasm/event.c +++ b/drivers/misc/ibmasm/event.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
26 | #include <linux/slab.h> | ||
26 | #include "ibmasm.h" | 27 | #include "ibmasm.h" |
27 | #include "lowlevel.h" | 28 | #include "lowlevel.h" |
28 | 29 | ||
diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c index aecf40ecb3a4..8844a3f45381 100644 --- a/drivers/misc/ibmasm/ibmasmfs.c +++ b/drivers/misc/ibmasm/ibmasmfs.c | |||
@@ -75,6 +75,7 @@ | |||
75 | 75 | ||
76 | #include <linux/fs.h> | 76 | #include <linux/fs.h> |
77 | #include <linux/pagemap.h> | 77 | #include <linux/pagemap.h> |
78 | #include <linux/slab.h> | ||
78 | #include <asm/uaccess.h> | 79 | #include <asm/uaccess.h> |
79 | #include <asm/io.h> | 80 | #include <asm/io.h> |
80 | #include "ibmasm.h" | 81 | #include "ibmasm.h" |
diff --git a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c index dc14b0b9cbfa..a234d965243b 100644 --- a/drivers/misc/ibmasm/module.c +++ b/drivers/misc/ibmasm/module.c | |||
@@ -52,6 +52,7 @@ | |||
52 | 52 | ||
53 | #include <linux/pci.h> | 53 | #include <linux/pci.h> |
54 | #include <linux/init.h> | 54 | #include <linux/init.h> |
55 | #include <linux/slab.h> | ||
55 | #include "ibmasm.h" | 56 | #include "ibmasm.h" |
56 | #include "lowlevel.h" | 57 | #include "lowlevel.h" |
57 | #include "remote.h" | 58 | #include "remote.h" |
diff --git a/drivers/misc/ics932s401.c b/drivers/misc/ics932s401.c index 395a4ea64e9c..152e9d93eecb 100644 --- a/drivers/misc/ics932s401.c +++ b/drivers/misc/ics932s401.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/log2.h> | 28 | #include <linux/log2.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | /* Addresses to scan */ | 31 | /* Addresses to scan */ |
31 | static const unsigned short normal_i2c[] = { 0x69, I2C_CLIENT_END }; | 32 | static const unsigned short normal_i2c[] = { 0x69, I2C_CLIENT_END }; |
diff --git a/drivers/misc/ioc4.c b/drivers/misc/ioc4.c index 09dcb699e667..193206602d88 100644 --- a/drivers/misc/ioc4.c +++ b/drivers/misc/ioc4.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
31 | #include <linux/ioc4.h> | 31 | #include <linux/ioc4.h> |
32 | #include <linux/ktime.h> | 32 | #include <linux/ktime.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/mutex.h> | 34 | #include <linux/mutex.h> |
34 | #include <linux/time.h> | 35 | #include <linux/time.h> |
35 | #include <asm/io.h> | 36 | #include <asm/io.h> |
diff --git a/drivers/misc/iwmc3200top/debugfs.c b/drivers/misc/iwmc3200top/debugfs.c index 0c8ea0a1c8a3..e9eda471f6e0 100644 --- a/drivers/misc/iwmc3200top/debugfs.c +++ b/drivers/misc/iwmc3200top/debugfs.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/string.h> | 29 | #include <linux/string.h> |
29 | #include <linux/ctype.h> | 30 | #include <linux/ctype.h> |
30 | #include <linux/mmc/sdio_func.h> | 31 | #include <linux/mmc/sdio_func.h> |
diff --git a/drivers/misc/iwmc3200top/fw-download.c b/drivers/misc/iwmc3200top/fw-download.c index 9dbaeb574e63..e27afde6e99f 100644 --- a/drivers/misc/iwmc3200top/fw-download.c +++ b/drivers/misc/iwmc3200top/fw-download.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/firmware.h> | 27 | #include <linux/firmware.h> |
28 | #include <linux/mmc/sdio_func.h> | 28 | #include <linux/mmc/sdio_func.h> |
29 | #include <linux/slab.h> | ||
29 | #include <asm/unaligned.h> | 30 | #include <asm/unaligned.h> |
30 | 31 | ||
31 | #include "iwmc3200top.h" | 32 | #include "iwmc3200top.h" |
diff --git a/drivers/misc/iwmc3200top/log.c b/drivers/misc/iwmc3200top/log.c index d569279698f6..a36a55a49cac 100644 --- a/drivers/misc/iwmc3200top/log.c +++ b/drivers/misc/iwmc3200top/log.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/mmc/sdio_func.h> | 28 | #include <linux/mmc/sdio_func.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/ctype.h> | 30 | #include <linux/ctype.h> |
30 | #include "fw-msg.h" | 31 | #include "fw-msg.h" |
31 | #include "iwmc3200top.h" | 32 | #include "iwmc3200top.h" |
diff --git a/drivers/misc/iwmc3200top/main.c b/drivers/misc/iwmc3200top/main.c index 3b7292a5cea9..c73cef2c3c5e 100644 --- a/drivers/misc/iwmc3200top/main.c +++ b/drivers/misc/iwmc3200top/main.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/init.h> | 29 | #include <linux/init.h> |
29 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
30 | #include <linux/debugfs.h> | 31 | #include <linux/debugfs.h> |
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index fcb6ec1af173..72450237a0f4 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c | |||
@@ -295,6 +295,10 @@ static int check_and_rewind_pc(char *put_str, char *arg) | |||
295 | /* On x86 a breakpoint stop requires it to be decremented */ | 295 | /* On x86 a breakpoint stop requires it to be decremented */ |
296 | if (addr + 1 == kgdbts_regs.ip) | 296 | if (addr + 1 == kgdbts_regs.ip) |
297 | offset = -1; | 297 | offset = -1; |
298 | #elif defined(CONFIG_SUPERH) | ||
299 | /* On SUPERH a breakpoint stop requires it to be decremented */ | ||
300 | if (addr + 2 == kgdbts_regs.pc) | ||
301 | offset = -2; | ||
298 | #endif | 302 | #endif |
299 | if (strcmp(arg, "silent") && | 303 | if (strcmp(arg, "silent") && |
300 | instruction_pointer(&kgdbts_regs) + offset != addr) { | 304 | instruction_pointer(&kgdbts_regs) + offset != addr) { |
@@ -305,6 +309,8 @@ static int check_and_rewind_pc(char *put_str, char *arg) | |||
305 | #ifdef CONFIG_X86 | 309 | #ifdef CONFIG_X86 |
306 | /* On x86 adjust the instruction pointer if needed */ | 310 | /* On x86 adjust the instruction pointer if needed */ |
307 | kgdbts_regs.ip += offset; | 311 | kgdbts_regs.ip += offset; |
312 | #elif defined(CONFIG_SUPERH) | ||
313 | kgdbts_regs.pc += offset; | ||
308 | #endif | 314 | #endif |
309 | return 0; | 315 | return 0; |
310 | } | 316 | } |
diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c index 4a0648301fdf..31a991161f0a 100644 --- a/drivers/misc/lkdtm.c +++ b/drivers/misc/lkdtm.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/init.h> | 40 | #include <linux/init.h> |
41 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
42 | #include <linux/hrtimer.h> | 42 | #include <linux/hrtimer.h> |
43 | #include <linux/slab.h> | ||
43 | #include <scsi/scsi_cmnd.h> | 44 | #include <scsi/scsi_cmnd.h> |
44 | #include <linux/debugfs.h> | 45 | #include <linux/debugfs.h> |
45 | 46 | ||
diff --git a/drivers/misc/phantom.c b/drivers/misc/phantom.c index 779aa8ebe4cf..75ee0d3f6f45 100644 --- a/drivers/misc/phantom.c +++ b/drivers/misc/phantom.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/poll.h> | 21 | #include <linux/poll.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/cdev.h> | 23 | #include <linux/cdev.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/phantom.h> | 25 | #include <linux/phantom.h> |
25 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
26 | #include <linux/smp_lock.h> | 27 | #include <linux/smp_lock.h> |
diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c index 832ed4c88cf7..8d082b46426b 100644 --- a/drivers/misc/sgi-xp/xpc_main.c +++ b/drivers/misc/sgi-xp/xpc_main.c | |||
@@ -44,6 +44,7 @@ | |||
44 | */ | 44 | */ |
45 | 45 | ||
46 | #include <linux/module.h> | 46 | #include <linux/module.h> |
47 | #include <linux/slab.h> | ||
47 | #include <linux/sysctl.h> | 48 | #include <linux/sysctl.h> |
48 | #include <linux/device.h> | 49 | #include <linux/device.h> |
49 | #include <linux/delay.h> | 50 | #include <linux/delay.h> |
diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp/xpc_partition.c index 9a6268c89fdd..d551f09ccb79 100644 --- a/drivers/misc/sgi-xp/xpc_partition.c +++ b/drivers/misc/sgi-xp/xpc_partition.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/device.h> | 18 | #include <linux/device.h> |
19 | #include <linux/hardirq.h> | 19 | #include <linux/hardirq.h> |
20 | #include <linux/slab.h> | ||
20 | #include "xpc.h" | 21 | #include "xpc.h" |
21 | #include <asm/uv/uv_hub.h> | 22 | #include <asm/uv/uv_hub.h> |
22 | 23 | ||
diff --git a/drivers/misc/sgi-xp/xpc_sn2.c b/drivers/misc/sgi-xp/xpc_sn2.c index 8b70e03f939f..7d71c04fc938 100644 --- a/drivers/misc/sgi-xp/xpc_sn2.c +++ b/drivers/misc/sgi-xp/xpc_sn2.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/slab.h> | ||
17 | #include <asm/uncached.h> | 18 | #include <asm/uncached.h> |
18 | #include <asm/sn/mspec.h> | 19 | #include <asm/sn/mspec.h> |
19 | #include <asm/sn/sn_sal.h> | 20 | #include <asm/sn/sn_sal.h> |
diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c index 8725d5e8ab0c..1f59ee2226ca 100644 --- a/drivers/misc/sgi-xp/xpc_uv.c +++ b/drivers/misc/sgi-xp/xpc_uv.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/slab.h> | ||
22 | #include <asm/uv/uv_hub.h> | 23 | #include <asm/uv/uv_hub.h> |
23 | #if defined CONFIG_X86_64 | 24 | #if defined CONFIG_X86_64 |
24 | #include <asm/uv/bios.h> | 25 | #include <asm/uv/bios.h> |
diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c index 57b152f8d1b9..ee5109a3cd98 100644 --- a/drivers/misc/sgi-xp/xpnet.c +++ b/drivers/misc/sgi-xp/xpnet.c | |||
@@ -20,6 +20,7 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/slab.h> | ||
23 | #include <linux/module.h> | 24 | #include <linux/module.h> |
24 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
25 | #include <linux/etherdevice.h> | 26 | #include <linux/etherdevice.h> |
diff --git a/drivers/misc/tifm_core.c b/drivers/misc/tifm_core.c index 98bcba521da2..5f6852dff40b 100644 --- a/drivers/misc/tifm_core.c +++ b/drivers/misc/tifm_core.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/tifm.h> | 12 | #include <linux/tifm.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/init.h> | 14 | #include <linux/init.h> |
14 | #include <linux/idr.h> | 15 | #include <linux/idr.h> |
15 | 16 | ||
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 1f552c6e7579..cb9fbc83b090 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
27 | #include <linux/hdreg.h> | 28 | #include <linux/hdreg.h> |
28 | #include <linux/kdev_t.h> | 29 | #include <linux/kdev_t.h> |
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index e7f8027165e6..445d7db2277e 100644 --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card/mmc_test.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/mmc/card.h> | 13 | #include <linux/mmc/card.h> |
14 | #include <linux/mmc/host.h> | 14 | #include <linux/mmc/host.h> |
15 | #include <linux/mmc/mmc.h> | 15 | #include <linux/mmc/mmc.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #include <linux/scatterlist.h> | 18 | #include <linux/scatterlist.h> |
18 | 19 | ||
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 381fe032caa1..d6ded247d941 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | * | 10 | * |
11 | */ | 11 | */ |
12 | #include <linux/slab.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/blkdev.h> | 14 | #include <linux/blkdev.h> |
14 | #include <linux/freezer.h> | 15 | #include <linux/freezer.h> |
diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index 723e50894db9..a0716967b7c8 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c | |||
@@ -34,10 +34,10 @@ | |||
34 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
35 | #include <linux/serial_reg.h> | 35 | #include <linux/serial_reg.h> |
36 | #include <linux/circ_buf.h> | 36 | #include <linux/circ_buf.h> |
37 | #include <linux/gfp.h> | ||
38 | #include <linux/tty.h> | 37 | #include <linux/tty.h> |
39 | #include <linux/tty_flip.h> | 38 | #include <linux/tty_flip.h> |
40 | #include <linux/kfifo.h> | 39 | #include <linux/kfifo.h> |
40 | #include <linux/slab.h> | ||
41 | 41 | ||
42 | #include <linux/mmc/core.h> | 42 | #include <linux/mmc/core.h> |
43 | #include <linux/mmc/card.h> | 43 | #include <linux/mmc/card.h> |
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index bdb165f93046..49d9dcaeca49 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/err.h> | 15 | #include <linux/err.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #include <linux/mmc/card.h> | 18 | #include <linux/mmc/card.h> |
18 | #include <linux/mmc/host.h> | 19 | #include <linux/mmc/host.h> |
diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c index 96d10f40fb23..53cb380c0987 100644 --- a/drivers/mmc/core/debugfs.c +++ b/drivers/mmc/core/debugfs.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/debugfs.h> | 10 | #include <linux/debugfs.h> |
11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
12 | #include <linux/seq_file.h> | 12 | #include <linux/seq_file.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/stat.h> | 14 | #include <linux/stat.h> |
14 | 15 | ||
15 | #include <linux/mmc/card.h> | 16 | #include <linux/mmc/card.h> |
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index a268d12f1af0..47353909e345 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/idr.h> | 16 | #include <linux/idr.h> |
17 | #include <linux/pagemap.h> | 17 | #include <linux/pagemap.h> |
18 | #include <linux/leds.h> | 18 | #include <linux/leds.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include <linux/mmc/host.h> | 21 | #include <linux/mmc/host.h> |
21 | 22 | ||
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 0eac6c814904..89f7a25b7ac1 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/err.h> | 13 | #include <linux/err.h> |
14 | #include <linux/slab.h> | ||
14 | 15 | ||
15 | #include <linux/mmc/host.h> | 16 | #include <linux/mmc/host.h> |
16 | #include <linux/mmc/card.h> | 17 | #include <linux/mmc/card.h> |
@@ -225,7 +226,7 @@ static int mmc_read_ext_csd(struct mmc_card *card) | |||
225 | mmc_card_set_blockaddr(card); | 226 | mmc_card_set_blockaddr(card); |
226 | } | 227 | } |
227 | 228 | ||
228 | switch (ext_csd[EXT_CSD_CARD_TYPE]) { | 229 | switch (ext_csd[EXT_CSD_CARD_TYPE] & EXT_CSD_CARD_TYPE_MASK) { |
229 | case EXT_CSD_CARD_TYPE_52 | EXT_CSD_CARD_TYPE_26: | 230 | case EXT_CSD_CARD_TYPE_52 | EXT_CSD_CARD_TYPE_26: |
230 | card->ext_csd.hs_max_dtr = 52000000; | 231 | card->ext_csd.hs_max_dtr = 52000000; |
231 | break; | 232 | break; |
@@ -237,7 +238,6 @@ static int mmc_read_ext_csd(struct mmc_card *card) | |||
237 | printk(KERN_WARNING "%s: card is mmc v4 but doesn't " | 238 | printk(KERN_WARNING "%s: card is mmc v4 but doesn't " |
238 | "support any high-speed modes.\n", | 239 | "support any high-speed modes.\n", |
239 | mmc_hostname(card->host)); | 240 | mmc_hostname(card->host)); |
240 | goto out; | ||
241 | } | 241 | } |
242 | 242 | ||
243 | if (card->ext_csd.rev >= 3) { | 243 | if (card->ext_csd.rev >= 3) { |
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index d2cb5c634392..326447c9ede8 100644 --- a/drivers/mmc/core/mmc_ops.c +++ b/drivers/mmc/core/mmc_ops.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * your option) any later version. | 9 | * your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
12 | #include <linux/types.h> | 13 | #include <linux/types.h> |
13 | #include <linux/scatterlist.h> | 14 | #include <linux/scatterlist.h> |
14 | 15 | ||
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index fdd414eded09..5eac21df4809 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/err.h> | 13 | #include <linux/err.h> |
14 | #include <linux/slab.h> | ||
14 | 15 | ||
15 | #include <linux/mmc/host.h> | 16 | #include <linux/mmc/host.h> |
16 | #include <linux/mmc/card.h> | 17 | #include <linux/mmc/card.h> |
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c index 9e060c87e64d..4a890dcb95ab 100644 --- a/drivers/mmc/core/sdio_bus.c +++ b/drivers/mmc/core/sdio_bus.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/err.h> | 15 | #include <linux/err.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #include <linux/mmc/card.h> | 18 | #include <linux/mmc/card.h> |
18 | #include <linux/mmc/sdio_func.h> | 19 | #include <linux/mmc/sdio_func.h> |
diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c index 9538389783c1..541bdb89e0c5 100644 --- a/drivers/mmc/core/sdio_cis.c +++ b/drivers/mmc/core/sdio_cis.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include <linux/mmc/host.h> | 19 | #include <linux/mmc/host.h> |
19 | #include <linux/mmc/card.h> | 20 | #include <linux/mmc/card.h> |
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index 91dc60cd032b..a6dd7da37357 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c | |||
@@ -65,6 +65,7 @@ | |||
65 | #include <linux/dma-mapping.h> | 65 | #include <linux/dma-mapping.h> |
66 | #include <linux/clk.h> | 66 | #include <linux/clk.h> |
67 | #include <linux/atmel_pdc.h> | 67 | #include <linux/atmel_pdc.h> |
68 | #include <linux/gfp.h> | ||
68 | 69 | ||
69 | #include <linux/mmc/host.h> | 70 | #include <linux/mmc/host.h> |
70 | 71 | ||
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 8072128e933b..88be37d9e9a5 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/scatterlist.h> | 23 | #include <linux/scatterlist.h> |
24 | #include <linux/seq_file.h> | 24 | #include <linux/seq_file.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/stat.h> | 26 | #include <linux/stat.h> |
26 | 27 | ||
27 | #include <linux/mmc/host.h> | 28 | #include <linux/mmc/host.h> |
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index 57b21198828f..f5834449400e 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/scatterlist.h> | 41 | #include <linux/scatterlist.h> |
42 | #include <linux/leds.h> | 42 | #include <linux/leds.h> |
43 | #include <linux/mmc/host.h> | 43 | #include <linux/mmc/host.h> |
44 | #include <linux/slab.h> | ||
44 | 45 | ||
45 | #include <asm/io.h> | 46 | #include <asm/io.h> |
46 | #include <asm/mach-au1x00/au1000.h> | 47 | #include <asm/mach-au1x00/au1000.h> |
diff --git a/drivers/mmc/host/bfin_sdh.c b/drivers/mmc/host/bfin_sdh.c index 56f7b448b911..6919e844072c 100644 --- a/drivers/mmc/host/bfin_sdh.c +++ b/drivers/mmc/host/bfin_sdh.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/dma-mapping.h> | 17 | #include <linux/dma-mapping.h> |
18 | #include <linux/mmc/host.h> | 18 | #include <linux/mmc/host.h> |
19 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
20 | #include <linux/gfp.h> | ||
20 | 21 | ||
21 | #include <asm/cacheflush.h> | 22 | #include <asm/cacheflush.h> |
22 | #include <asm/dma.h> | 23 | #include <asm/dma.h> |
diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c index 4e72964a7b43..92a324f7417c 100644 --- a/drivers/mmc/host/cb710-mmc.c +++ b/drivers/mmc/host/cb710-mmc.c | |||
@@ -9,7 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
14 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
15 | #include "cb710-mmc.h" | 14 | #include "cb710-mmc.h" |
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c index d55fe4fb7935..ad847a24a675 100644 --- a/drivers/mmc/host/mmc_spi.c +++ b/drivers/mmc/host/mmc_spi.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/bio.h> | 30 | #include <linux/bio.h> |
30 | #include <linux/dma-mapping.h> | 31 | #include <linux/dma-mapping.h> |
31 | #include <linux/crc7.h> | 32 | #include <linux/crc7.h> |
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c index 4c068e5fe6b2..04ae884383f6 100644 --- a/drivers/mmc/host/msm_sdcc.c +++ b/drivers/mmc/host/msm_sdcc.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/debugfs.h> | 33 | #include <linux/debugfs.h> |
34 | #include <linux/io.h> | 34 | #include <linux/io.h> |
35 | #include <linux/memory.h> | 35 | #include <linux/memory.h> |
36 | #include <linux/gfp.h> | ||
36 | 37 | ||
37 | #include <asm/cacheflush.h> | 38 | #include <asm/cacheflush.h> |
38 | #include <asm/div64.h> | 39 | #include <asm/div64.h> |
diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c index 0c7a63c1f12f..bb6cc54b558e 100644 --- a/drivers/mmc/host/of_mmc_spi.c +++ b/drivers/mmc/host/of_mmc_spi.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
18 | #include <linux/of.h> | 19 | #include <linux/of.h> |
19 | #include <linux/of_gpio.h> | 20 | #include <linux/of_gpio.h> |
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index c6d7e8ecadbf..84d280406341 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/clk.h> | 26 | #include <linux/clk.h> |
27 | #include <linux/scatterlist.h> | 27 | #include <linux/scatterlist.h> |
28 | #include <linux/i2c/tps65010.h> | 28 | #include <linux/i2c/tps65010.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <asm/io.h> | 31 | #include <asm/io.h> |
31 | #include <asm/irq.h> | 32 | #include <asm/irq.h> |
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 83f0affadcae..e9caf694c59e 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -1179,15 +1179,10 @@ static void omap_hsmmc_detect(struct work_struct *work) | |||
1179 | carddetect = -ENOSYS; | 1179 | carddetect = -ENOSYS; |
1180 | } | 1180 | } |
1181 | 1181 | ||
1182 | if (carddetect) { | 1182 | if (carddetect) |
1183 | mmc_detect_change(host->mmc, (HZ * 200) / 1000); | 1183 | mmc_detect_change(host->mmc, (HZ * 200) / 1000); |
1184 | } else { | 1184 | else |
1185 | mmc_host_enable(host->mmc); | ||
1186 | omap_hsmmc_reset_controller_fsm(host, SRD); | ||
1187 | mmc_host_lazy_disable(host->mmc); | ||
1188 | |||
1189 | mmc_detect_change(host->mmc, (HZ * 50) / 1000); | 1185 | mmc_detect_change(host->mmc, (HZ * 50) / 1000); |
1190 | } | ||
1191 | } | 1186 | } |
1192 | 1187 | ||
1193 | /* | 1188 | /* |
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 0d783f3e79ed..0ed48959b590 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/regulator/consumer.h> | 30 | #include <linux/regulator/consumer.h> |
31 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
32 | #include <linux/gfp.h> | ||
32 | 33 | ||
33 | #include <asm/sizes.h> | 34 | #include <asm/sizes.h> |
34 | 35 | ||
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 8e1020cf73f4..6701af629c30 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/highmem.h> | 16 | #include <linux/highmem.h> |
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include <linux/dma-mapping.h> | 18 | #include <linux/dma-mapping.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include <linux/mmc/host.h> | 21 | #include <linux/mmc/host.h> |
21 | 22 | ||
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 50997d2a63e7..2136794c0cfa 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/dma-mapping.h> | 16 | #include <linux/dma-mapping.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
19 | #include <linux/io.h> | 20 | #include <linux/io.h> |
20 | 21 | ||
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index d6ab62d539fb..9d4fdfa685e5 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/highmem.h> | 17 | #include <linux/highmem.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/dma-mapping.h> | 19 | #include <linux/dma-mapping.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/scatterlist.h> | 21 | #include <linux/scatterlist.h> |
21 | 22 | ||
22 | #include <linux/leds.h> | 23 | #include <linux/leds.h> |
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index 89bf8cd25cac..69efe01eece8 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/highmem.h> | 34 | #include <linux/highmem.h> |
35 | #include <linux/mmc/host.h> | 35 | #include <linux/mmc/host.h> |
36 | #include <linux/scatterlist.h> | 36 | #include <linux/scatterlist.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include <asm/io.h> | 39 | #include <asm/io.h> |
39 | #include <asm/dma.h> | 40 | #include <asm/dma.h> |
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index 8c295f40d2ac..ce6424008ed9 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/buffer_head.h> | 17 | #include <linux/buffer_head.h> |
18 | #include <linux/mutex.h> | 18 | #include <linux/mutex.h> |
19 | #include <linux/mount.h> | 19 | #include <linux/mount.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args) | 22 | #define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args) |
22 | #define INFO(fmt, args...) printk(KERN_INFO "block2mtd: " fmt "\n" , ## args) | 23 | #define INFO(fmt, args...) printk(KERN_INFO "block2mtd: " fmt "\n" , ## args) |
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index f3f4768d6e18..81e49a9b017e 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
23 | #include <linux/math64.h> | 23 | #include <linux/math64.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
25 | #include <linux/mod_devicetable.h> | 26 | #include <linux/mod_devicetable.h> |
26 | 27 | ||
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c index 0a11721f146e..fe17054ee2fe 100644 --- a/drivers/mtd/devices/sst25l.c +++ b/drivers/mtd/devices/sst25l.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
24 | 25 | ||
25 | #include <linux/mtd/mtd.h> | 26 | #include <linux/mtd/mtd.h> |
diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c index e22ca49583e7..a73ee12aad81 100644 --- a/drivers/mtd/lpddr/lpddr_cmds.c +++ b/drivers/mtd/lpddr/lpddr_cmds.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | #include <linux/mtd/pfow.h> | 27 | #include <linux/mtd/pfow.h> |
28 | #include <linux/mtd/qinfo.h> | 28 | #include <linux/mtd/qinfo.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | static int lpddr_read(struct mtd_info *mtd, loff_t adr, size_t len, | 31 | static int lpddr_read(struct mtd_info *mtd, loff_t adr, size_t len, |
31 | size_t *retlen, u_char *buf); | 32 | size_t *retlen, u_char *buf); |
diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c index 237733d094c4..19fe92db0c46 100644 --- a/drivers/mtd/maps/amd76xrom.c +++ b/drivers/mtd/maps/amd76xrom.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/slab.h> | ||
11 | #include <asm/io.h> | 12 | #include <asm/io.h> |
12 | #include <linux/mtd/mtd.h> | 13 | #include <linux/mtd/mtd.h> |
13 | #include <linux/mtd/map.h> | 14 | #include <linux/mtd/map.h> |
diff --git a/drivers/mtd/maps/bfin-async-flash.c b/drivers/mtd/maps/bfin-async-flash.c index a7c808b577d3..c0fd99b0c525 100644 --- a/drivers/mtd/maps/bfin-async-flash.c +++ b/drivers/mtd/maps/bfin-async-flash.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
23 | #include <linux/mtd/physmap.h> | 23 | #include <linux/mtd/physmap.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/types.h> | 26 | #include <linux/types.h> |
26 | 27 | ||
27 | #include <asm/blackfin.h> | 28 | #include <asm/blackfin.h> |
diff --git a/drivers/mtd/maps/ck804xrom.c b/drivers/mtd/maps/ck804xrom.c index 424f17d6ffd1..ddb462bea9b5 100644 --- a/drivers/mtd/maps/ck804xrom.c +++ b/drivers/mtd/maps/ck804xrom.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/slab.h> | ||
14 | #include <asm/io.h> | 15 | #include <asm/io.h> |
15 | #include <linux/mtd/mtd.h> | 16 | #include <linux/mtd/mtd.h> |
16 | #include <linux/mtd/map.h> | 17 | #include <linux/mtd/map.h> |
diff --git a/drivers/mtd/maps/esb2rom.c b/drivers/mtd/maps/esb2rom.c index 11a2f57df9cf..d12c93dc1aad 100644 --- a/drivers/mtd/maps/esb2rom.c +++ b/drivers/mtd/maps/esb2rom.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/slab.h> | ||
17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
18 | #include <linux/mtd/mtd.h> | 19 | #include <linux/mtd/mtd.h> |
19 | #include <linux/mtd/map.h> | 20 | #include <linux/mtd/map.h> |
diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c index 1ad5caf9fe69..32e89d773b4e 100644 --- a/drivers/mtd/maps/gpio-addr-flash.c +++ b/drivers/mtd/maps/gpio-addr-flash.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mtd/partitions.h> | 23 | #include <linux/mtd/partitions.h> |
24 | #include <linux/mtd/physmap.h> | 24 | #include <linux/mtd/physmap.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/types.h> | 27 | #include <linux/types.h> |
27 | 28 | ||
28 | #define pr_devinit(fmt, args...) ({ static const __devinitconst char __fmt[] = fmt; printk(__fmt, ## args); }) | 29 | #define pr_devinit(fmt, args...) ({ static const __devinitconst char __fmt[] = fmt; printk(__fmt, ## args); }) |
diff --git a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c index c32bc28920b3..f102bf243a74 100644 --- a/drivers/mtd/maps/ichxrom.c +++ b/drivers/mtd/maps/ichxrom.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/slab.h> | ||
11 | #include <asm/io.h> | 12 | #include <asm/io.h> |
12 | #include <linux/mtd/mtd.h> | 13 | #include <linux/mtd/mtd.h> |
13 | #include <linux/mtd/map.h> | 14 | #include <linux/mtd/map.h> |
diff --git a/drivers/mtd/maps/intel_vr_nor.c b/drivers/mtd/maps/intel_vr_nor.c index 1e7814ae212a..fc1998512eb4 100644 --- a/drivers/mtd/maps/intel_vr_nor.c +++ b/drivers/mtd/maps/intel_vr_nor.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
33 | #include <linux/init.h> | 34 | #include <linux/init.h> |
34 | #include <linux/mtd/mtd.h> | 35 | #include <linux/mtd/mtd.h> |
diff --git a/drivers/mtd/maps/octagon-5066.c b/drivers/mtd/maps/octagon-5066.c index 2b2e45093218..23fe1786770f 100644 --- a/drivers/mtd/maps/octagon-5066.c +++ b/drivers/mtd/maps/octagon-5066.c | |||
@@ -24,7 +24,6 @@ | |||
24 | ##################################################################### */ | 24 | ##################################################################### */ |
25 | 25 | ||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/ioport.h> | 27 | #include <linux/ioport.h> |
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
30 | #include <asm/io.h> | 29 | #include <asm/io.h> |
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 61e4eb48bb2d..101ee6ead05c 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mtd/concat.h> | 23 | #include <linux/mtd/concat.h> |
24 | #include <linux/of.h> | 24 | #include <linux/of.h> |
25 | #include <linux/of_platform.h> | 25 | #include <linux/of_platform.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | struct of_flash_list { | 28 | struct of_flash_list { |
28 | struct mtd_info *mtd; | 29 | struct mtd_info *mtd; |
diff --git a/drivers/mtd/maps/pismo.c b/drivers/mtd/maps/pismo.c index 30e12c88d1da..60c068db452d 100644 --- a/drivers/mtd/maps/pismo.c +++ b/drivers/mtd/maps/pismo.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/i2c.h> | 12 | #include <linux/i2c.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
14 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
15 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
diff --git a/drivers/mtd/maps/pmcmsp-flash.c b/drivers/mtd/maps/pmcmsp-flash.c index c8fd8da4bc87..acb13fa5001c 100644 --- a/drivers/mtd/maps/pmcmsp-flash.c +++ b/drivers/mtd/maps/pmcmsp-flash.c | |||
@@ -28,6 +28,7 @@ | |||
28 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 28 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/slab.h> | ||
31 | #include <linux/module.h> | 32 | #include <linux/module.h> |
32 | #include <linux/types.h> | 33 | #include <linux/types.h> |
33 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c index b13f6417b5b2..91dc6331053f 100644 --- a/drivers/mtd/maps/pxa2xx-flash.c +++ b/drivers/mtd/maps/pxa2xx-flash.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
diff --git a/drivers/mtd/maps/sbc_gxx.c b/drivers/mtd/maps/sbc_gxx.c index 1b1c0b7e11ef..04b2781fc627 100644 --- a/drivers/mtd/maps/sbc_gxx.c +++ b/drivers/mtd/maps/sbc_gxx.c | |||
@@ -45,7 +45,6 @@ separate MTD devices. | |||
45 | // Includes | 45 | // Includes |
46 | 46 | ||
47 | #include <linux/module.h> | 47 | #include <linux/module.h> |
48 | #include <linux/slab.h> | ||
49 | #include <linux/ioport.h> | 48 | #include <linux/ioport.h> |
50 | #include <linux/init.h> | 49 | #include <linux/init.h> |
51 | #include <asm/io.h> | 50 | #include <asm/io.h> |
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c index fd7a1017399a..fadc4c45b455 100644 --- a/drivers/mtd/maps/sun_uflash.c +++ b/drivers/mtd/maps/sun_uflash.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/ioport.h> | 15 | #include <linux/ioport.h> |
16 | #include <linux/of.h> | 16 | #include <linux/of.h> |
17 | #include <linux/of_device.h> | 17 | #include <linux/of_device.h> |
18 | #include <linux/slab.h> | ||
18 | #include <asm/prom.h> | 19 | #include <asm/prom.h> |
19 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
20 | #include <asm/io.h> | 21 | #include <asm/io.h> |
diff --git a/drivers/mtd/maps/vmax301.c b/drivers/mtd/maps/vmax301.c index 6d452dcdfe34..6adaa6acc193 100644 --- a/drivers/mtd/maps/vmax301.c +++ b/drivers/mtd/maps/vmax301.c | |||
@@ -16,7 +16,6 @@ | |||
16 | ##################################################################### */ | 16 | ##################################################################### */ |
17 | 17 | ||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
diff --git a/drivers/mtd/maps/vmu-flash.c b/drivers/mtd/maps/vmu-flash.c index 82afad0ddd72..4afc167731ef 100644 --- a/drivers/mtd/maps/vmu-flash.c +++ b/drivers/mtd/maps/vmu-flash.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * GNU General Public Licence | 8 | * GNU General Public Licence |
9 | */ | 9 | */ |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
12 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
13 | #include <linux/maple.h> | 14 | #include <linux/maple.h> |
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index c356c0a30c3e..5b38b17d2229 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c | |||
@@ -7,7 +7,6 @@ | |||
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/ptrace.h> | 9 | #include <linux/ptrace.h> |
10 | #include <linux/slab.h> | ||
11 | #include <linux/string.h> | 10 | #include <linux/string.h> |
12 | #include <linux/timer.h> | 11 | #include <linux/timer.h> |
13 | #include <linux/major.h> | 12 | #include <linux/major.h> |
diff --git a/drivers/mtd/nand/bcm_umi_nand.c b/drivers/mtd/nand/bcm_umi_nand.c index 7d1cca7a31a9..c997f98eeb3d 100644 --- a/drivers/mtd/nand/bcm_umi_nand.c +++ b/drivers/mtd/nand/bcm_umi_nand.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/string.h> | 22 | #include <linux/string.h> |
22 | #include <linux/ioport.h> | 23 | #include <linux/ioport.h> |
23 | #include <linux/device.h> | 24 | #include <linux/device.h> |
diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c index c828d9ac7bd7..e5a9f9ccea60 100644 --- a/drivers/mtd/nand/cafe_nand.c +++ b/drivers/mtd/nand/cafe_nand.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/dma-mapping.h> | 22 | #include <linux/dma-mapping.h> |
23 | #include <linux/slab.h> | ||
23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
24 | 25 | ||
25 | #define CAFE_NAND_CTRL1 0x00 | 26 | #define CAFE_NAND_CTRL1 0x00 |
diff --git a/drivers/mtd/nand/cmx270_nand.c b/drivers/mtd/nand/cmx270_nand.c index 826cacffcefc..6e6495278258 100644 --- a/drivers/mtd/nand/cmx270_nand.c +++ b/drivers/mtd/nand/cmx270_nand.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/mtd/nand.h> | 21 | #include <linux/mtd/nand.h> |
22 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
24 | 25 | ||
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index fe3eba87de40..76e2dc8e62f7 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/mtd/nand.h> | 33 | #include <linux/mtd/nand.h> |
34 | #include <linux/mtd/partitions.h> | 34 | #include <linux/mtd/partitions.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #include <mach/nand.h> | 37 | #include <mach/nand.h> |
37 | 38 | ||
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index b126cf887476..47067bc98248 100644 --- a/drivers/mtd/nand/diskonchip.c +++ b/drivers/mtd/nand/diskonchip.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/rslib.h> | 24 | #include <linux/rslib.h> |
25 | #include <linux/moduleparam.h> | 25 | #include <linux/moduleparam.h> |
26 | #include <linux/slab.h> | ||
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
27 | 28 | ||
28 | #include <linux/mtd/mtd.h> | 29 | #include <linux/mtd/mtd.h> |
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c index 071a60cb4204..4b96296af321 100644 --- a/drivers/mtd/nand/fsl_upm.c +++ b/drivers/mtd/nand/fsl_upm.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
22 | #include <linux/of_gpio.h> | 22 | #include <linux/of_gpio.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/slab.h> | ||
24 | #include <asm/fsl_lbc.h> | 25 | #include <asm/fsl_lbc.h> |
25 | 26 | ||
26 | #define FSL_UPM_WAIT_RUN_PATTERN 0x1 | 27 | #define FSL_UPM_WAIT_RUN_PATTERN 0x1 |
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index 40b5658bdbe6..b983cae8c298 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/mtd/nand_ecc.h> | 28 | #include <linux/mtd/nand_ecc.h> |
29 | #include <linux/mtd/partitions.h> | 29 | #include <linux/mtd/partitions.h> |
30 | #include <linux/mtd/ndfc.h> | 30 | #include <linux/mtd/ndfc.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/mtd/mtd.h> | 32 | #include <linux/mtd/mtd.h> |
32 | #include <linux/of_platform.h> | 33 | #include <linux/of_platform.h> |
33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
diff --git a/drivers/mtd/nand/nomadik_nand.c b/drivers/mtd/nand/nomadik_nand.c index 66123419f65d..1f6f741af5da 100644 --- a/drivers/mtd/nand/nomadik_nand.c +++ b/drivers/mtd/nand/nomadik_nand.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/mtd/partitions.h> | 31 | #include <linux/mtd/partitions.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/slab.h> | ||
33 | #include <mach/nand.h> | 34 | #include <mach/nand.h> |
34 | #include <mach/fsmc.h> | 35 | #include <mach/fsmc.h> |
35 | 36 | ||
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 26aec0080184..7545568fce47 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/mtd/nand.h> | 17 | #include <linux/mtd/nand.h> |
18 | #include <linux/mtd/partitions.h> | 18 | #include <linux/mtd/partitions.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include <plat/dma.h> | 22 | #include <plat/dma.h> |
22 | #include <plat/gpmc.h> | 23 | #include <plat/gpmc.h> |
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 1a5a0365c983..5d55152162cf 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/mtd/partitions.h> | 21 | #include <linux/mtd/partitions.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <mach/dma.h> | 26 | #include <mach/dma.h> |
26 | #include <plat/pxa3xx_nand.h> | 27 | #include <plat/pxa3xx_nand.h> |
diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c index 1842df8bdd93..34752fce0793 100644 --- a/drivers/mtd/nand/sh_flctl.c +++ b/drivers/mtd/nand/sh_flctl.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <linux/mtd/mtd.h> | 31 | #include <linux/mtd/mtd.h> |
31 | #include <linux/mtd/nand.h> | 32 | #include <linux/mtd/nand.h> |
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c index 92c73344a669..fa28f01ae009 100644 --- a/drivers/mtd/nand/tmio_nand.c +++ b/drivers/mtd/nand/tmio_nand.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/mtd/nand.h> | 37 | #include <linux/mtd/nand.h> |
38 | #include <linux/mtd/nand_ecc.h> | 38 | #include <linux/mtd/nand_ecc.h> |
39 | #include <linux/mtd/partitions.h> | 39 | #include <linux/mtd/partitions.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | /*--------------------------------------------------------------------------*/ | 42 | /*--------------------------------------------------------------------------*/ |
42 | 43 | ||
diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c index 62d6a78c4eee..4f0d635674f3 100644 --- a/drivers/mtd/ofpart.c +++ b/drivers/mtd/ofpart.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/of.h> | 18 | #include <linux/of.h> |
19 | #include <linux/mtd/mtd.h> | 19 | #include <linux/mtd/mtd.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/mtd/partitions.h> | 21 | #include <linux/mtd/partitions.h> |
21 | 22 | ||
22 | int __devinit of_mtd_parse_partitions(struct device *dev, | 23 | int __devinit of_mtd_parse_partitions(struct device *dev, |
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index 75f38b95811e..fd406348fdfd 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/dma-mapping.h> | 35 | #include <linux/dma-mapping.h> |
36 | #include <linux/io.h> | 36 | #include <linux/io.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include <asm/mach/flash.h> | 39 | #include <asm/mach/flash.h> |
39 | #include <plat/gpmc.h> | 40 | #include <plat/gpmc.h> |
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index f63b1db3ffb3..32f0ed33afe0 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/moduleparam.h> | 25 | #include <linux/moduleparam.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/init.h> | 27 | #include <linux/init.h> |
27 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
28 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
diff --git a/drivers/mtd/onenand/onenand_sim.c b/drivers/mtd/onenand/onenand_sim.c index f6e3c8aebd3a..8b246061d511 100644 --- a/drivers/mtd/onenand/onenand_sim.c +++ b/drivers/mtd/onenand/onenand_sim.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | #include <linux/vmalloc.h> | 22 | #include <linux/vmalloc.h> |
diff --git a/drivers/mtd/tests/mtd_nandecctest.c b/drivers/mtd/tests/mtd_nandecctest.c index c1f31051784c..70d6d7d0d656 100644 --- a/drivers/mtd/tests/mtd_nandecctest.c +++ b/drivers/mtd/tests/mtd_nandecctest.c | |||
@@ -1,7 +1,6 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/module.h> | 2 | #include <linux/module.h> |
3 | #include <linux/list.h> | 3 | #include <linux/list.h> |
4 | #include <linux/slab.h> | ||
5 | #include <linux/random.h> | 4 | #include <linux/random.h> |
6 | #include <linux/string.h> | 5 | #include <linux/string.h> |
7 | #include <linux/bitops.h> | 6 | #include <linux/bitops.h> |
diff --git a/drivers/mtd/tests/mtd_oobtest.c b/drivers/mtd/tests/mtd_oobtest.c index 5813920e79a5..dec92ae6111a 100644 --- a/drivers/mtd/tests/mtd_oobtest.c +++ b/drivers/mtd/tests/mtd_oobtest.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/moduleparam.h> | 25 | #include <linux/moduleparam.h> |
26 | #include <linux/err.h> | 26 | #include <linux/err.h> |
27 | #include <linux/mtd/mtd.h> | 27 | #include <linux/mtd/mtd.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
29 | 30 | ||
30 | #define PRINT_PREF KERN_INFO "mtd_oobtest: " | 31 | #define PRINT_PREF KERN_INFO "mtd_oobtest: " |
diff --git a/drivers/mtd/tests/mtd_pagetest.c b/drivers/mtd/tests/mtd_pagetest.c index ce17cbe918c5..921a85df9196 100644 --- a/drivers/mtd/tests/mtd_pagetest.c +++ b/drivers/mtd/tests/mtd_pagetest.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/moduleparam.h> | 25 | #include <linux/moduleparam.h> |
26 | #include <linux/err.h> | 26 | #include <linux/err.h> |
27 | #include <linux/mtd/mtd.h> | 27 | #include <linux/mtd/mtd.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
29 | 30 | ||
30 | #define PRINT_PREF KERN_INFO "mtd_pagetest: " | 31 | #define PRINT_PREF KERN_INFO "mtd_pagetest: " |
diff --git a/drivers/mtd/tests/mtd_readtest.c b/drivers/mtd/tests/mtd_readtest.c index 25c5dd03a837..7107fccbc7de 100644 --- a/drivers/mtd/tests/mtd_readtest.c +++ b/drivers/mtd/tests/mtd_readtest.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/moduleparam.h> | 24 | #include <linux/moduleparam.h> |
25 | #include <linux/err.h> | 25 | #include <linux/err.h> |
26 | #include <linux/mtd/mtd.h> | 26 | #include <linux/mtd/mtd.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
28 | 29 | ||
29 | #define PRINT_PREF KERN_INFO "mtd_readtest: " | 30 | #define PRINT_PREF KERN_INFO "mtd_readtest: " |
diff --git a/drivers/mtd/tests/mtd_speedtest.c b/drivers/mtd/tests/mtd_speedtest.c index 7fbb51d4eabe..56ca62bb96bf 100644 --- a/drivers/mtd/tests/mtd_speedtest.c +++ b/drivers/mtd/tests/mtd_speedtest.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/moduleparam.h> | 24 | #include <linux/moduleparam.h> |
25 | #include <linux/err.h> | 25 | #include <linux/err.h> |
26 | #include <linux/mtd/mtd.h> | 26 | #include <linux/mtd/mtd.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
28 | 29 | ||
29 | #define PRINT_PREF KERN_INFO "mtd_speedtest: " | 30 | #define PRINT_PREF KERN_INFO "mtd_speedtest: " |
diff --git a/drivers/mtd/tests/mtd_stresstest.c b/drivers/mtd/tests/mtd_stresstest.c index a99d3cd737d8..3854afec56d0 100644 --- a/drivers/mtd/tests/mtd_stresstest.c +++ b/drivers/mtd/tests/mtd_stresstest.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/moduleparam.h> | 24 | #include <linux/moduleparam.h> |
25 | #include <linux/err.h> | 25 | #include <linux/err.h> |
26 | #include <linux/mtd/mtd.h> | 26 | #include <linux/mtd/mtd.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
28 | #include <linux/vmalloc.h> | 29 | #include <linux/vmalloc.h> |
29 | 30 | ||
diff --git a/drivers/mtd/tests/mtd_subpagetest.c b/drivers/mtd/tests/mtd_subpagetest.c index 5b889724268e..700237a3d120 100644 --- a/drivers/mtd/tests/mtd_subpagetest.c +++ b/drivers/mtd/tests/mtd_subpagetest.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/moduleparam.h> | 24 | #include <linux/moduleparam.h> |
25 | #include <linux/err.h> | 25 | #include <linux/err.h> |
26 | #include <linux/mtd/mtd.h> | 26 | #include <linux/mtd/mtd.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
28 | 29 | ||
29 | #define PRINT_PREF KERN_INFO "mtd_subpagetest: " | 30 | #define PRINT_PREF KERN_INFO "mtd_subpagetest: " |
diff --git a/drivers/mtd/tests/mtd_torturetest.c b/drivers/mtd/tests/mtd_torturetest.c index 631a0ab3a33c..5c6c3d248901 100644 --- a/drivers/mtd/tests/mtd_torturetest.c +++ b/drivers/mtd/tests/mtd_torturetest.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/moduleparam.h> | 28 | #include <linux/moduleparam.h> |
29 | #include <linux/err.h> | 29 | #include <linux/err.h> |
30 | #include <linux/mtd/mtd.h> | 30 | #include <linux/mtd/mtd.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
32 | 33 | ||
33 | #define PRINT_PREF KERN_INFO "mtd_torturetest: " | 34 | #define PRINT_PREF KERN_INFO "mtd_torturetest: " |
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index fad40aa6f099..55c726dde942 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/kthread.h> | 44 | #include <linux/kthread.h> |
45 | #include <linux/reboot.h> | 45 | #include <linux/reboot.h> |
46 | #include <linux/kernel.h> | 46 | #include <linux/kernel.h> |
47 | #include <linux/slab.h> | ||
47 | #include "ubi.h" | 48 | #include "ubi.h" |
48 | 49 | ||
49 | /* Maximum length of the 'mtd=' parameter */ | 50 | /* Maximum length of the 'mtd=' parameter */ |
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index 111ea41c4ecd..72ebb3f06b86 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/stat.h> | 39 | #include <linux/stat.h> |
40 | #include <linux/slab.h> | ||
40 | #include <linux/ioctl.h> | 41 | #include <linux/ioctl.h> |
41 | #include <linux/capability.h> | 42 | #include <linux/capability.h> |
42 | #include <linux/uaccess.h> | 43 | #include <linux/uaccess.h> |
diff --git a/drivers/mtd/ubi/gluebi.c b/drivers/mtd/ubi/gluebi.c index b5e478fa2661..9aa81584c8a2 100644 --- a/drivers/mtd/ubi/gluebi.c +++ b/drivers/mtd/ubi/gluebi.c | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | #include <linux/err.h> | 32 | #include <linux/err.h> |
33 | #include <linux/list.h> | 33 | #include <linux/list.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
35 | #include <linux/math64.h> | 36 | #include <linux/math64.h> |
36 | #include <linux/module.h> | 37 | #include <linux/module.h> |
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index b4ecc84c7549..533b1a4b9af1 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c | |||
@@ -88,6 +88,7 @@ | |||
88 | 88 | ||
89 | #include <linux/crc32.h> | 89 | #include <linux/crc32.h> |
90 | #include <linux/err.h> | 90 | #include <linux/err.h> |
91 | #include <linux/slab.h> | ||
91 | #include "ubi.h" | 92 | #include "ubi.h" |
92 | 93 | ||
93 | #ifdef CONFIG_MTD_UBI_DEBUG_PARANOID | 94 | #ifdef CONFIG_MTD_UBI_DEBUG_PARANOID |
diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c index 1361574e2b00..17f287decc36 100644 --- a/drivers/mtd/ubi/kapi.c +++ b/drivers/mtd/ubi/kapi.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/err.h> | 24 | #include <linux/err.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/namei.h> | 26 | #include <linux/namei.h> |
26 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
27 | #include <asm/div64.h> | 28 | #include <asm/div64.h> |
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c index 594184bbd56a..dc5f688699da 100644 --- a/drivers/mtd/ubi/scan.c +++ b/drivers/mtd/ubi/scan.c | |||
@@ -41,6 +41,7 @@ | |||
41 | */ | 41 | */ |
42 | 42 | ||
43 | #include <linux/err.h> | 43 | #include <linux/err.h> |
44 | #include <linux/slab.h> | ||
44 | #include <linux/crc32.h> | 45 | #include <linux/crc32.h> |
45 | #include <linux/math64.h> | 46 | #include <linux/math64.h> |
46 | #include "ubi.h" | 47 | #include "ubi.h" |
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index 1af08178defd..5176d4886518 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/fs.h> | 34 | #include <linux/fs.h> |
35 | #include <linux/cdev.h> | 35 | #include <linux/cdev.h> |
36 | #include <linux/device.h> | 36 | #include <linux/device.h> |
37 | #include <linux/slab.h> | ||
37 | #include <linux/string.h> | 38 | #include <linux/string.h> |
38 | #include <linux/vmalloc.h> | 39 | #include <linux/vmalloc.h> |
39 | #include <linux/notifier.h> | 40 | #include <linux/notifier.h> |
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index ab64cb56df6e..e42afab9a9fe 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/err.h> | 26 | #include <linux/err.h> |
27 | #include <linux/math64.h> | 27 | #include <linux/math64.h> |
28 | #include <linux/slab.h> | ||
28 | #include "ubi.h" | 29 | #include "ubi.h" |
29 | 30 | ||
30 | #ifdef CONFIG_MTD_UBI_DEBUG_PARANOID | 31 | #ifdef CONFIG_MTD_UBI_DEBUG_PARANOID |
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index 40044028d682..cd90ff3b76b1 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c | |||
@@ -58,6 +58,7 @@ | |||
58 | 58 | ||
59 | #include <linux/crc32.h> | 59 | #include <linux/crc32.h> |
60 | #include <linux/err.h> | 60 | #include <linux/err.h> |
61 | #include <linux/slab.h> | ||
61 | #include <asm/div64.h> | 62 | #include <asm/div64.h> |
62 | #include "ubi.h" | 63 | #include "ubi.h" |
63 | 64 | ||
diff --git a/drivers/net/3c501.c b/drivers/net/3c501.c index b6de7b1e2a5c..3ea42ff17657 100644 --- a/drivers/net/3c501.c +++ b/drivers/net/3c501.c | |||
@@ -117,7 +117,6 @@ static const char version[] = | |||
117 | #include <linux/fcntl.h> | 117 | #include <linux/fcntl.h> |
118 | #include <linux/ioport.h> | 118 | #include <linux/ioport.h> |
119 | #include <linux/interrupt.h> | 119 | #include <linux/interrupt.h> |
120 | #include <linux/slab.h> | ||
121 | #include <linux/string.h> | 120 | #include <linux/string.h> |
122 | #include <linux/errno.h> | 121 | #include <linux/errno.h> |
123 | #include <linux/spinlock.h> | 122 | #include <linux/spinlock.h> |
diff --git a/drivers/net/3c505.c b/drivers/net/3c505.c index 81c8b31e629f..8d584f5fd02d 100644 --- a/drivers/net/3c505.c +++ b/drivers/net/3c505.c | |||
@@ -102,12 +102,12 @@ | |||
102 | #include <linux/interrupt.h> | 102 | #include <linux/interrupt.h> |
103 | #include <linux/errno.h> | 103 | #include <linux/errno.h> |
104 | #include <linux/in.h> | 104 | #include <linux/in.h> |
105 | #include <linux/slab.h> | ||
106 | #include <linux/ioport.h> | 105 | #include <linux/ioport.h> |
107 | #include <linux/spinlock.h> | 106 | #include <linux/spinlock.h> |
108 | #include <linux/ethtool.h> | 107 | #include <linux/ethtool.h> |
109 | #include <linux/delay.h> | 108 | #include <linux/delay.h> |
110 | #include <linux/bitops.h> | 109 | #include <linux/bitops.h> |
110 | #include <linux/gfp.h> | ||
111 | 111 | ||
112 | #include <asm/uaccess.h> | 112 | #include <asm/uaccess.h> |
113 | #include <asm/io.h> | 113 | #include <asm/io.h> |
diff --git a/drivers/net/3c507.c b/drivers/net/3c507.c index 77cf0901a441..b32b7a1710b7 100644 --- a/drivers/net/3c507.c +++ b/drivers/net/3c507.c | |||
@@ -58,7 +58,6 @@ static const char version[] = | |||
58 | #include <linux/etherdevice.h> | 58 | #include <linux/etherdevice.h> |
59 | #include <linux/if_ether.h> | 59 | #include <linux/if_ether.h> |
60 | #include <linux/skbuff.h> | 60 | #include <linux/skbuff.h> |
61 | #include <linux/slab.h> | ||
62 | #include <linux/init.h> | 61 | #include <linux/init.h> |
63 | #include <linux/bitops.h> | 62 | #include <linux/bitops.h> |
64 | 63 | ||
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index 902435a76466..ab9bb3c52002 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c | |||
@@ -76,7 +76,6 @@ | |||
76 | #include <linux/interrupt.h> | 76 | #include <linux/interrupt.h> |
77 | #include <linux/errno.h> | 77 | #include <linux/errno.h> |
78 | #include <linux/in.h> | 78 | #include <linux/in.h> |
79 | #include <linux/slab.h> | ||
80 | #include <linux/ioport.h> | 79 | #include <linux/ioport.h> |
81 | #include <linux/init.h> | 80 | #include <linux/init.h> |
82 | #include <linux/netdevice.h> | 81 | #include <linux/netdevice.h> |
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c index 1e898b1c8068..2e17837be546 100644 --- a/drivers/net/3c515.c +++ b/drivers/net/3c515.c | |||
@@ -65,7 +65,6 @@ static int max_interrupt_work = 20; | |||
65 | #include <linux/errno.h> | 65 | #include <linux/errno.h> |
66 | #include <linux/in.h> | 66 | #include <linux/in.h> |
67 | #include <linux/ioport.h> | 67 | #include <linux/ioport.h> |
68 | #include <linux/slab.h> | ||
69 | #include <linux/skbuff.h> | 68 | #include <linux/skbuff.h> |
70 | #include <linux/etherdevice.h> | 69 | #include <linux/etherdevice.h> |
71 | #include <linux/interrupt.h> | 70 | #include <linux/interrupt.h> |
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index 966cb12e1e0a..8c70686d43a1 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c | |||
@@ -99,7 +99,6 @@ | |||
99 | #include <linux/errno.h> | 99 | #include <linux/errno.h> |
100 | #include <linux/ioport.h> | 100 | #include <linux/ioport.h> |
101 | #include <linux/skbuff.h> | 101 | #include <linux/skbuff.h> |
102 | #include <linux/slab.h> | ||
103 | #include <linux/interrupt.h> | 102 | #include <linux/interrupt.h> |
104 | #include <linux/delay.h> | 103 | #include <linux/delay.h> |
105 | #include <linux/mca-legacy.h> | 104 | #include <linux/mca-legacy.h> |
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index f965431f4924..5f92fdbe66e2 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -77,7 +77,6 @@ static int vortex_debug = 1; | |||
77 | #include <linux/errno.h> | 77 | #include <linux/errno.h> |
78 | #include <linux/in.h> | 78 | #include <linux/in.h> |
79 | #include <linux/ioport.h> | 79 | #include <linux/ioport.h> |
80 | #include <linux/slab.h> | ||
81 | #include <linux/interrupt.h> | 80 | #include <linux/interrupt.h> |
82 | #include <linux/pci.h> | 81 | #include <linux/pci.h> |
83 | #include <linux/mii.h> | 82 | #include <linux/mii.h> |
@@ -90,6 +89,7 @@ static int vortex_debug = 1; | |||
90 | #include <linux/eisa.h> | 89 | #include <linux/eisa.h> |
91 | #include <linux/bitops.h> | 90 | #include <linux/bitops.h> |
92 | #include <linux/jiffies.h> | 91 | #include <linux/jiffies.h> |
92 | #include <linux/gfp.h> | ||
93 | #include <asm/irq.h> /* For nr_irqs only. */ | 93 | #include <asm/irq.h> /* For nr_irqs only. */ |
94 | #include <asm/io.h> | 94 | #include <asm/io.h> |
95 | #include <asm/uaccess.h> | 95 | #include <asm/uaccess.h> |
diff --git a/drivers/net/7990.c b/drivers/net/7990.c index 818837d8ffe7..f09e59451495 100644 --- a/drivers/net/7990.c +++ b/drivers/net/7990.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/ioport.h> | 26 | #include <linux/ioport.h> |
27 | #include <linux/in.h> | 27 | #include <linux/in.h> |
28 | #include <linux/route.h> | 28 | #include <linux/route.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/string.h> | 29 | #include <linux/string.h> |
31 | #include <linux/skbuff.h> | 30 | #include <linux/skbuff.h> |
32 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index e4e2aef11017..4e8d11cfe477 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
@@ -64,6 +64,7 @@ | |||
64 | #include <linux/dma-mapping.h> | 64 | #include <linux/dma-mapping.h> |
65 | #include <linux/delay.h> | 65 | #include <linux/delay.h> |
66 | #include <linux/ethtool.h> | 66 | #include <linux/ethtool.h> |
67 | #include <linux/gfp.h> | ||
67 | #include <linux/mii.h> | 68 | #include <linux/mii.h> |
68 | #include <linux/if_vlan.h> | 69 | #include <linux/if_vlan.h> |
69 | #include <linux/crc32.h> | 70 | #include <linux/crc32.h> |
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index f61784c3c4a2..d149624b4a44 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -110,6 +110,7 @@ | |||
110 | #include <linux/crc32.h> | 110 | #include <linux/crc32.h> |
111 | #include <linux/io.h> | 111 | #include <linux/io.h> |
112 | #include <linux/uaccess.h> | 112 | #include <linux/uaccess.h> |
113 | #include <linux/gfp.h> | ||
113 | #include <asm/irq.h> | 114 | #include <asm/irq.h> |
114 | 115 | ||
115 | #define RTL8139_DRIVER_NAME DRV_NAME " Fast Ethernet driver " DRV_VERSION | 116 | #define RTL8139_DRIVER_NAME DRV_NAME " Fast Ethernet driver " DRV_VERSION |
diff --git a/drivers/net/82596.c b/drivers/net/82596.c index 3a28b1f451d9..97c5fc019cd4 100644 --- a/drivers/net/82596.c +++ b/drivers/net/82596.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #include <linux/string.h> | 45 | #include <linux/string.h> |
46 | #include <linux/errno.h> | 46 | #include <linux/errno.h> |
47 | #include <linux/ioport.h> | 47 | #include <linux/ioport.h> |
48 | #include <linux/slab.h> | ||
49 | #include <linux/interrupt.h> | 48 | #include <linux/interrupt.h> |
50 | #include <linux/delay.h> | 49 | #include <linux/delay.h> |
51 | #include <linux/netdevice.h> | 50 | #include <linux/netdevice.h> |
@@ -53,6 +52,7 @@ | |||
53 | #include <linux/skbuff.h> | 52 | #include <linux/skbuff.h> |
54 | #include <linux/init.h> | 53 | #include <linux/init.h> |
55 | #include <linux/bitops.h> | 54 | #include <linux/bitops.h> |
55 | #include <linux/gfp.h> | ||
56 | 56 | ||
57 | #include <asm/io.h> | 57 | #include <asm/io.h> |
58 | #include <asm/dma.h> | 58 | #include <asm/dma.h> |
diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c index 7cce643793c3..ce0a0b8787d8 100644 --- a/drivers/net/a2065.c +++ b/drivers/net/a2065.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <linux/interrupt.h> | 46 | #include <linux/interrupt.h> |
47 | #include <linux/ioport.h> | 47 | #include <linux/ioport.h> |
48 | #include <linux/skbuff.h> | 48 | #include <linux/skbuff.h> |
49 | #include <linux/slab.h> | ||
50 | #include <linux/string.h> | 49 | #include <linux/string.h> |
51 | #include <linux/init.h> | 50 | #include <linux/init.h> |
52 | #include <linux/crc32.h> | 51 | #include <linux/crc32.h> |
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c index 2dc5f9544c77..1328eb9b841d 100644 --- a/drivers/net/acenic.c +++ b/drivers/net/acenic.c | |||
@@ -67,6 +67,7 @@ | |||
67 | #include <linux/highmem.h> | 67 | #include <linux/highmem.h> |
68 | #include <linux/sockios.h> | 68 | #include <linux/sockios.h> |
69 | #include <linux/firmware.h> | 69 | #include <linux/firmware.h> |
70 | #include <linux/slab.h> | ||
70 | 71 | ||
71 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) | 72 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) |
72 | #include <linux/if_vlan.h> | 73 | #include <linux/if_vlan.h> |
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index d002c764a26c..97d71a960602 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c | |||
@@ -73,7 +73,6 @@ Revision History: | |||
73 | #include <linux/kernel.h> | 73 | #include <linux/kernel.h> |
74 | #include <linux/types.h> | 74 | #include <linux/types.h> |
75 | #include <linux/compiler.h> | 75 | #include <linux/compiler.h> |
76 | #include <linux/slab.h> | ||
77 | #include <linux/delay.h> | 76 | #include <linux/delay.h> |
78 | #include <linux/init.h> | 77 | #include <linux/init.h> |
79 | #include <linux/ioport.h> | 78 | #include <linux/ioport.h> |
diff --git a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c index 73b38c204eb9..6f8d6206b5c4 100644 --- a/drivers/net/appletalk/cops.c +++ b/drivers/net/appletalk/cops.c | |||
@@ -56,7 +56,6 @@ static const char *version = | |||
56 | #include <linux/ptrace.h> | 56 | #include <linux/ptrace.h> |
57 | #include <linux/ioport.h> | 57 | #include <linux/ioport.h> |
58 | #include <linux/in.h> | 58 | #include <linux/in.h> |
59 | #include <linux/slab.h> | ||
60 | #include <linux/string.h> | 59 | #include <linux/string.h> |
61 | #include <linux/errno.h> | 60 | #include <linux/errno.h> |
62 | #include <linux/init.h> | 61 | #include <linux/init.h> |
diff --git a/drivers/net/appletalk/ipddp.c b/drivers/net/appletalk/ipddp.c index eb0448b03f41..79636ee35829 100644 --- a/drivers/net/appletalk/ipddp.c +++ b/drivers/net/appletalk/ipddp.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/ip.h> | 31 | #include <linux/ip.h> |
32 | #include <linux/atalk.h> | 32 | #include <linux/atalk.h> |
33 | #include <linux/if_arp.h> | 33 | #include <linux/if_arp.h> |
34 | #include <linux/slab.h> | ||
34 | #include <net/route.h> | 35 | #include <net/route.h> |
35 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
36 | 37 | ||
diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c index 8ea4ec705bef..6af65b656f31 100644 --- a/drivers/net/appletalk/ltpc.c +++ b/drivers/net/appletalk/ltpc.c | |||
@@ -215,7 +215,6 @@ static int dma; | |||
215 | #include <linux/ioport.h> | 215 | #include <linux/ioport.h> |
216 | #include <linux/spinlock.h> | 216 | #include <linux/spinlock.h> |
217 | #include <linux/in.h> | 217 | #include <linux/in.h> |
218 | #include <linux/slab.h> | ||
219 | #include <linux/string.h> | 218 | #include <linux/string.h> |
220 | #include <linux/errno.h> | 219 | #include <linux/errno.h> |
221 | #include <linux/init.h> | 220 | #include <linux/init.h> |
@@ -228,6 +227,7 @@ static int dma; | |||
228 | #include <linux/timer.h> | 227 | #include <linux/timer.h> |
229 | #include <linux/atalk.h> | 228 | #include <linux/atalk.h> |
230 | #include <linux/bitops.h> | 229 | #include <linux/bitops.h> |
230 | #include <linux/gfp.h> | ||
231 | 231 | ||
232 | #include <asm/system.h> | 232 | #include <asm/system.h> |
233 | #include <asm/dma.h> | 233 | #include <asm/dma.h> |
diff --git a/drivers/net/arcnet/arc-rawmode.c b/drivers/net/arcnet/arc-rawmode.c index 8ea9c7545c12..705e6ce2eb90 100644 --- a/drivers/net/arcnet/arc-rawmode.c +++ b/drivers/net/arcnet/arc-rawmode.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/gfp.h> | ||
28 | #include <linux/init.h> | 29 | #include <linux/init.h> |
29 | #include <linux/if_arp.h> | 30 | #include <linux/if_arp.h> |
30 | #include <net/arp.h> | 31 | #include <net/arp.h> |
diff --git a/drivers/net/arcnet/arc-rimi.c b/drivers/net/arcnet/arc-rimi.c index e6afab2455b1..9efbbbae47ca 100644 --- a/drivers/net/arcnet/arc-rimi.c +++ b/drivers/net/arcnet/arc-rimi.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/moduleparam.h> | 29 | #include <linux/moduleparam.h> |
30 | #include <linux/ioport.h> | 30 | #include <linux/ioport.h> |
31 | #include <linux/slab.h> | ||
32 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
33 | #include <linux/netdevice.h> | 32 | #include <linux/netdevice.h> |
34 | #include <linux/bootmem.h> | 33 | #include <linux/bootmem.h> |
diff --git a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c index 66bcbbb6babc..355797f70048 100644 --- a/drivers/net/arcnet/capmode.c +++ b/drivers/net/arcnet/capmode.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/gfp.h> | ||
30 | #include <linux/init.h> | 31 | #include <linux/init.h> |
31 | #include <linux/if_arp.h> | 32 | #include <linux/if_arp.h> |
32 | #include <net/arp.h> | 33 | #include <net/arp.h> |
diff --git a/drivers/net/arcnet/com20020-isa.c b/drivers/net/arcnet/com20020-isa.c index db08fc24047a..0402da30a4ed 100644 --- a/drivers/net/arcnet/com20020-isa.c +++ b/drivers/net/arcnet/com20020-isa.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/ioport.h> | 32 | #include <linux/ioport.h> |
33 | #include <linux/slab.h> | ||
34 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
35 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
36 | #include <linux/netdevice.h> | 35 | #include <linux/netdevice.h> |
diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c index b68e1eb405ff..2c712af6c265 100644 --- a/drivers/net/arcnet/com20020-pci.c +++ b/drivers/net/arcnet/com20020-pci.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/ioport.h> | 33 | #include <linux/ioport.h> |
34 | #include <linux/slab.h> | ||
35 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
36 | #include <linux/netdevice.h> | 35 | #include <linux/netdevice.h> |
37 | #include <linux/init.h> | 36 | #include <linux/init.h> |
diff --git a/drivers/net/arcnet/com20020.c b/drivers/net/arcnet/com20020.c index 0a74f21409c5..c9e459400ff9 100644 --- a/drivers/net/arcnet/com20020.c +++ b/drivers/net/arcnet/com20020.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/ioport.h> | 31 | #include <linux/ioport.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
34 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
35 | #include <linux/netdevice.h> | 34 | #include <linux/netdevice.h> |
diff --git a/drivers/net/arcnet/com90io.c b/drivers/net/arcnet/com90io.c index 28dea518d554..4cb401813b7e 100644 --- a/drivers/net/arcnet/com90io.c +++ b/drivers/net/arcnet/com90io.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/moduleparam.h> | 30 | #include <linux/moduleparam.h> |
31 | #include <linux/ioport.h> | 31 | #include <linux/ioport.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
34 | #include <linux/netdevice.h> | 33 | #include <linux/netdevice.h> |
35 | #include <linux/bootmem.h> | 34 | #include <linux/bootmem.h> |
diff --git a/drivers/net/arcnet/com90xx.c b/drivers/net/arcnet/com90xx.c index 112e230cb13d..f3b46f71e293 100644 --- a/drivers/net/arcnet/com90xx.c +++ b/drivers/net/arcnet/com90xx.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/ioport.h> | 30 | #include <linux/ioport.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/netdevice.h> | 32 | #include <linux/netdevice.h> |
33 | #include <linux/slab.h> | ||
33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
34 | #include <linux/arcdevice.h> | 35 | #include <linux/arcdevice.h> |
35 | 36 | ||
diff --git a/drivers/net/arcnet/rfc1051.c b/drivers/net/arcnet/rfc1051.c index 06f8fa2f8f2f..f81db4070a57 100644 --- a/drivers/net/arcnet/rfc1051.c +++ b/drivers/net/arcnet/rfc1051.c | |||
@@ -24,6 +24,7 @@ | |||
24 | * ********************** | 24 | * ********************** |
25 | */ | 25 | */ |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/gfp.h> | ||
27 | #include <linux/init.h> | 28 | #include <linux/init.h> |
28 | #include <linux/if_arp.h> | 29 | #include <linux/if_arp.h> |
29 | #include <net/arp.h> | 30 | #include <net/arp.h> |
diff --git a/drivers/net/arcnet/rfc1201.c b/drivers/net/arcnet/rfc1201.c index 745530651c45..b71431aae084 100644 --- a/drivers/net/arcnet/rfc1201.c +++ b/drivers/net/arcnet/rfc1201.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * | 23 | * |
24 | * ********************** | 24 | * ********************** |
25 | */ | 25 | */ |
26 | #include <linux/gfp.h> | ||
26 | #include <linux/module.h> | 27 | #include <linux/module.h> |
27 | #include <linux/init.h> | 28 | #include <linux/init.h> |
28 | #include <linux/if_arp.h> | 29 | #include <linux/if_arp.h> |
diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c index 08d8be47dae0..fa1a2354f5f9 100644 --- a/drivers/net/ariadne.c +++ b/drivers/net/ariadne.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <linux/string.h> | 40 | #include <linux/string.h> |
41 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
42 | #include <linux/ioport.h> | 42 | #include <linux/ioport.h> |
43 | #include <linux/slab.h> | ||
44 | #include <linux/netdevice.h> | 43 | #include <linux/netdevice.h> |
45 | #include <linux/etherdevice.h> | 44 | #include <linux/etherdevice.h> |
46 | #include <linux/interrupt.h> | 45 | #include <linux/interrupt.h> |
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c index f31e8b6cbf73..0adab30f626b 100644 --- a/drivers/net/arm/at91_ether.c +++ b/drivers/net/arm/at91_ether.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/ethtool.h> | 27 | #include <linux/ethtool.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/clk.h> | 29 | #include <linux/clk.h> |
30 | #include <linux/gfp.h> | ||
30 | 31 | ||
31 | #include <asm/io.h> | 32 | #include <asm/io.h> |
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c index bf72d57a0afd..6995169d285a 100644 --- a/drivers/net/arm/ep93xx_eth.c +++ b/drivers/net/arm/ep93xx_eth.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
28 | 29 | ||
diff --git a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c index f52f668c49bf..4af235d41fda 100644 --- a/drivers/net/arm/etherh.c +++ b/drivers/net/arm/etherh.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
34 | #include <linux/ioport.h> | 34 | #include <linux/ioport.h> |
35 | #include <linux/in.h> | 35 | #include <linux/in.h> |
36 | #include <linux/slab.h> | ||
37 | #include <linux/string.h> | 36 | #include <linux/string.h> |
38 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
39 | #include <linux/netdevice.h> | 38 | #include <linux/netdevice.h> |
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index f9d168775d06..7800d7dfd299 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/phy.h> | 33 | #include <linux/phy.h> |
34 | #include <linux/platform_device.h> | 34 | #include <linux/platform_device.h> |
35 | #include <linux/slab.h> | ||
35 | #include <mach/npe.h> | 36 | #include <mach/npe.h> |
36 | #include <mach/qmgr.h> | 37 | #include <mach/qmgr.h> |
37 | 38 | ||
diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c index 6ec245c6394b..7413a87e40ff 100644 --- a/drivers/net/arm/ks8695net.c +++ b/drivers/net/arm/ks8695net.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/irq.h> | 31 | #include <linux/irq.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
35 | 36 | ||
diff --git a/drivers/net/arm/w90p910_ether.c b/drivers/net/arm/w90p910_ether.c index 3302df21d591..2491934b73e8 100644 --- a/drivers/net/arm/w90p910_ether.c +++ b/drivers/net/arm/w90p910_ether.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/ethtool.h> | 18 | #include <linux/ethtool.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
21 | #include <linux/gfp.h> | ||
21 | 22 | ||
22 | #define DRV_MODULE_NAME "w90p910-emc" | 23 | #define DRV_MODULE_NAME "w90p910-emc" |
23 | #define DRV_MODULE_VERSION "0.1" | 24 | #define DRV_MODULE_VERSION "0.1" |
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c index e2a549a60e25..332f9806b78e 100644 --- a/drivers/net/at1700.c +++ b/drivers/net/at1700.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include <linux/ioport.h> | 47 | #include <linux/ioport.h> |
48 | #include <linux/in.h> | 48 | #include <linux/in.h> |
49 | #include <linux/skbuff.h> | 49 | #include <linux/skbuff.h> |
50 | #include <linux/slab.h> | ||
51 | #include <linux/string.h> | 50 | #include <linux/string.h> |
52 | #include <linux/init.h> | 51 | #include <linux/init.h> |
53 | #include <linux/crc32.h> | 52 | #include <linux/crc32.h> |
diff --git a/drivers/net/atarilance.c b/drivers/net/atarilance.c index 280cfff48b49..a8686bfec7a1 100644 --- a/drivers/net/atarilance.c +++ b/drivers/net/atarilance.c | |||
@@ -53,7 +53,6 @@ static char version[] = "atarilance.c: v1.3 04/04/96 " | |||
53 | #include <linux/string.h> | 53 | #include <linux/string.h> |
54 | #include <linux/errno.h> | 54 | #include <linux/errno.h> |
55 | #include <linux/skbuff.h> | 55 | #include <linux/skbuff.h> |
56 | #include <linux/slab.h> | ||
57 | #include <linux/interrupt.h> | 56 | #include <linux/interrupt.h> |
58 | #include <linux/init.h> | 57 | #include <linux/init.h> |
59 | #include <linux/bitops.h> | 58 | #include <linux/bitops.h> |
diff --git a/drivers/net/atl1c/atl1c_ethtool.c b/drivers/net/atl1c/atl1c_ethtool.c index 61a0f2ff11e9..32339243d61f 100644 --- a/drivers/net/atl1c/atl1c_ethtool.c +++ b/drivers/net/atl1c/atl1c_ethtool.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
24 | #include <linux/ethtool.h> | 24 | #include <linux/ethtool.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "atl1c.h" | 27 | #include "atl1c.h" |
27 | 28 | ||
diff --git a/drivers/net/atl1e/atl1e_ethtool.c b/drivers/net/atl1e/atl1e_ethtool.c index a76006c1bc6b..ffd696ee7c8e 100644 --- a/drivers/net/atl1e/atl1e_ethtool.c +++ b/drivers/net/atl1e/atl1e_ethtool.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
24 | #include <linux/ethtool.h> | 24 | #include <linux/ethtool.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "atl1e.h" | 27 | #include "atl1e.h" |
27 | 28 | ||
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c index 078d9d1b427c..fee9cf6a5bd4 100644 --- a/drivers/net/atlx/atl2.c +++ b/drivers/net/atlx/atl2.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/pci_ids.h> | 39 | #include <linux/pci_ids.h> |
40 | #include <linux/pm.h> | 40 | #include <linux/pm.h> |
41 | #include <linux/skbuff.h> | 41 | #include <linux/skbuff.h> |
42 | #include <linux/slab.h> | ||
42 | #include <linux/spinlock.h> | 43 | #include <linux/spinlock.h> |
43 | #include <linux/string.h> | 44 | #include <linux/string.h> |
44 | #include <linux/tcp.h> | 45 | #include <linux/tcp.h> |
diff --git a/drivers/net/atp.c b/drivers/net/atp.c index 0d730c8329d4..2bd1a5c0ec17 100644 --- a/drivers/net/atp.c +++ b/drivers/net/atp.c | |||
@@ -129,7 +129,6 @@ static int xcvr[NUM_UNITS]; /* The data transfer mode. */ | |||
129 | #include <linux/interrupt.h> | 129 | #include <linux/interrupt.h> |
130 | #include <linux/ioport.h> | 130 | #include <linux/ioport.h> |
131 | #include <linux/in.h> | 131 | #include <linux/in.h> |
132 | #include <linux/slab.h> | ||
133 | #include <linux/string.h> | 132 | #include <linux/string.h> |
134 | #include <linux/errno.h> | 133 | #include <linux/errno.h> |
135 | #include <linux/init.h> | 134 | #include <linux/init.h> |
diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c index 1dd4403247ca..b718dc60afc4 100644 --- a/drivers/net/ax88796.c +++ b/drivers/net/ax88796.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/ethtool.h> | 25 | #include <linux/ethtool.h> |
26 | #include <linux/mii.h> | 26 | #include <linux/mii.h> |
27 | #include <linux/eeprom_93cx6.h> | 27 | #include <linux/eeprom_93cx6.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include <net/ax88796.h> | 30 | #include <net/ax88796.h> |
30 | 31 | ||
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index b2c5fd7b63af..458272196997 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/dma-mapping.h> | 28 | #include <linux/dma-mapping.h> |
29 | #include <linux/ssb/ssb.h> | 29 | #include <linux/ssb/ssb.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
32 | #include <asm/io.h> | 33 | #include <asm/io.h> |
diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c index 51733404478e..d91105693c8a 100644 --- a/drivers/net/bcm63xx_enet.c +++ b/drivers/net/bcm63xx_enet.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/etherdevice.h> | 23 | #include <linux/etherdevice.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
25 | #include <linux/ethtool.h> | 26 | #include <linux/ethtool.h> |
26 | #include <linux/crc32.h> | 27 | #include <linux/crc32.h> |
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h index 45037fbd4ff1..373c1a563474 100644 --- a/drivers/net/benet/be.h +++ b/drivers/net/benet/be.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/workqueue.h> | 29 | #include <linux/workqueue.h> |
30 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
31 | #include <linux/firmware.h> | 31 | #include <linux/firmware.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include "be_hw.h" | 34 | #include "be_hw.h" |
34 | 35 | ||
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c index 1245e9835765..44ceecf9d103 100644 --- a/drivers/net/bmac.c +++ b/drivers/net/bmac.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/crc32.h> | 20 | #include <linux/crc32.h> |
21 | #include <linux/bitrev.h> | 21 | #include <linux/bitrev.h> |
22 | #include <linux/ethtool.h> | 22 | #include <linux/ethtool.h> |
23 | #include <linux/slab.h> | ||
23 | #include <asm/prom.h> | 24 | #include <asm/prom.h> |
24 | #include <asm/dbdma.h> | 25 | #include <asm/dbdma.h> |
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index 904aa369f80e..d0f8c7e67e7d 100644 --- a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
23 | #include <linux/if_arp.h> | 24 | #include <linux/if_arp.h> |
24 | #include <linux/can.h> | 25 | #include <linux/can.h> |
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c index f521579f5adb..eb898515352c 100644 --- a/drivers/net/can/mcp251x.c +++ b/drivers/net/can/mcp251x.c | |||
@@ -73,6 +73,7 @@ | |||
73 | #include <linux/module.h> | 73 | #include <linux/module.h> |
74 | #include <linux/netdevice.h> | 74 | #include <linux/netdevice.h> |
75 | #include <linux/platform_device.h> | 75 | #include <linux/platform_device.h> |
76 | #include <linux/slab.h> | ||
76 | #include <linux/spi/spi.h> | 77 | #include <linux/spi/spi.h> |
77 | #include <linux/uaccess.h> | 78 | #include <linux/uaccess.h> |
78 | 79 | ||
diff --git a/drivers/net/can/sja1000/ems_pci.c b/drivers/net/can/sja1000/ems_pci.c index 87300606abb9..5f53da0bc40c 100644 --- a/drivers/net/can/sja1000/ems_pci.c +++ b/drivers/net/can/sja1000/ems_pci.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/pci.h> | 26 | #include <linux/pci.h> |
26 | #include <linux/can.h> | 27 | #include <linux/can.h> |
27 | #include <linux/can/dev.h> | 28 | #include <linux/can/dev.h> |
diff --git a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja1000/plx_pci.c index 6b46a6395f80..4aff4070db96 100644 --- a/drivers/net/can/sja1000/plx_pci.c +++ b/drivers/net/can/sja1000/plx_pci.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/netdevice.h> | 26 | #include <linux/netdevice.h> |
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
29 | #include <linux/can.h> | 30 | #include <linux/can.h> |
30 | #include <linux/can/dev.h> | 31 | #include <linux/can/dev.h> |
diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c index d124d837ae58..a30b8f480f61 100644 --- a/drivers/net/can/vcan.c +++ b/drivers/net/can/vcan.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/if_ether.h> | 48 | #include <linux/if_ether.h> |
49 | #include <linux/can.h> | 49 | #include <linux/can.h> |
50 | #include <linux/can/dev.h> | 50 | #include <linux/can/dev.h> |
51 | #include <linux/slab.h> | ||
51 | #include <net/rtnetlink.h> | 52 | #include <net/rtnetlink.h> |
52 | 53 | ||
53 | static __initdata const char banner[] = | 54 | static __initdata const char banner[] = |
diff --git a/drivers/net/chelsio/common.h b/drivers/net/chelsio/common.h index 2d11afe45310..036b2dfb1d40 100644 --- a/drivers/net/chelsio/common.h +++ b/drivers/net/chelsio/common.h | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/mdio.h> | 51 | #include <linux/mdio.h> |
52 | #include <linux/crc32.h> | 52 | #include <linux/crc32.h> |
53 | #include <linux/init.h> | 53 | #include <linux/init.h> |
54 | #include <linux/slab.h> | ||
54 | #include <asm/io.h> | 55 | #include <asm/io.h> |
55 | #include <linux/pci_ids.h> | 56 | #include <linux/pci_ids.h> |
56 | 57 | ||
diff --git a/drivers/net/chelsio/pm3393.c b/drivers/net/chelsio/pm3393.c index 13fd9628db1d..7dbb16d36fff 100644 --- a/drivers/net/chelsio/pm3393.c +++ b/drivers/net/chelsio/pm3393.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include "suni1x10gexp_regs.h" | 44 | #include "suni1x10gexp_regs.h" |
45 | 45 | ||
46 | #include <linux/crc32.h> | 46 | #include <linux/crc32.h> |
47 | #include <linux/slab.h> | ||
47 | 48 | ||
48 | #define OFFSET(REG_ADDR) ((REG_ADDR) << 2) | 49 | #define OFFSET(REG_ADDR) ((REG_ADDR) << 2) |
49 | 50 | ||
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c index 55d99ca82f8a..df3a1410696e 100644 --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <linux/ip.h> | 53 | #include <linux/ip.h> |
54 | #include <linux/in.h> | 54 | #include <linux/in.h> |
55 | #include <linux/if_arp.h> | 55 | #include <linux/if_arp.h> |
56 | #include <linux/slab.h> | ||
56 | 57 | ||
57 | #include "cpl5_cmd.h" | 58 | #include "cpl5_cmd.h" |
58 | #include "sge.h" | 59 | #include "sge.h" |
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c index 9781942992e9..4b451a7c03e9 100644 --- a/drivers/net/cnic.c +++ b/drivers/net/cnic.c | |||
@@ -2334,13 +2334,13 @@ static int cnic_service_bnx2x(void *data, void *status_blk) | |||
2334 | struct cnic_local *cp = dev->cnic_priv; | 2334 | struct cnic_local *cp = dev->cnic_priv; |
2335 | u16 prod = cp->kcq_prod_idx & MAX_KCQ_IDX; | 2335 | u16 prod = cp->kcq_prod_idx & MAX_KCQ_IDX; |
2336 | 2336 | ||
2337 | prefetch(cp->status_blk.bnx2x); | 2337 | if (likely(test_bit(CNIC_F_CNIC_UP, &dev->flags))) { |
2338 | prefetch(&cp->kcq[KCQ_PG(prod)][KCQ_IDX(prod)]); | 2338 | prefetch(cp->status_blk.bnx2x); |
2339 | prefetch(&cp->kcq[KCQ_PG(prod)][KCQ_IDX(prod)]); | ||
2339 | 2340 | ||
2340 | if (likely(test_bit(CNIC_F_CNIC_UP, &dev->flags))) | ||
2341 | tasklet_schedule(&cp->cnic_irq_task); | 2341 | tasklet_schedule(&cp->cnic_irq_task); |
2342 | 2342 | cnic_chk_pkt_rings(cp); | |
2343 | cnic_chk_pkt_rings(cp); | 2343 | } |
2344 | 2344 | ||
2345 | return 0; | 2345 | return 0; |
2346 | } | 2346 | } |
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c index 59110bc119a8..f49ad8ed9b07 100644 --- a/drivers/net/cris/eth_v10.c +++ b/drivers/net/cris/eth_v10.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/ptrace.h> | 18 | #include <linux/ptrace.h> |
19 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
20 | #include <linux/in.h> | 20 | #include <linux/in.h> |
21 | #include <linux/slab.h> | ||
22 | #include <linux/string.h> | 21 | #include <linux/string.h> |
23 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
24 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index b0208e474f7e..4c38491b8efb 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -138,12 +138,12 @@ | |||
138 | #include <linux/ioport.h> | 138 | #include <linux/ioport.h> |
139 | #include <linux/in.h> | 139 | #include <linux/in.h> |
140 | #include <linux/skbuff.h> | 140 | #include <linux/skbuff.h> |
141 | #include <linux/slab.h> | ||
142 | #include <linux/spinlock.h> | 141 | #include <linux/spinlock.h> |
143 | #include <linux/string.h> | 142 | #include <linux/string.h> |
144 | #include <linux/init.h> | 143 | #include <linux/init.h> |
145 | #include <linux/bitops.h> | 144 | #include <linux/bitops.h> |
146 | #include <linux/delay.h> | 145 | #include <linux/delay.h> |
146 | #include <linux/gfp.h> | ||
147 | 147 | ||
148 | #include <asm/system.h> | 148 | #include <asm/system.h> |
149 | #include <asm/io.h> | 149 | #include <asm/io.h> |
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index 9e3e8750b46a..aced6c5e635c 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/log2.h> | 46 | #include <linux/log2.h> |
47 | #include <linux/stringify.h> | 47 | #include <linux/stringify.h> |
48 | #include <linux/sched.h> | 48 | #include <linux/sched.h> |
49 | #include <linux/slab.h> | ||
49 | #include <asm/uaccess.h> | 50 | #include <asm/uaccess.h> |
50 | 51 | ||
51 | #include "common.h" | 52 | #include "common.h" |
diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c index 9498361119d6..c6485b39eb0e 100644 --- a/drivers/net/cxgb3/cxgb3_offload.c +++ b/drivers/net/cxgb3/cxgb3_offload.c | |||
@@ -31,6 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/list.h> | 33 | #include <linux/list.h> |
34 | #include <linux/slab.h> | ||
34 | #include <net/neighbour.h> | 35 | #include <net/neighbour.h> |
35 | #include <linux/notifier.h> | 36 | #include <linux/notifier.h> |
36 | #include <asm/atomic.h> | 37 | #include <asm/atomic.h> |
diff --git a/drivers/net/cxgb3/l2t.c b/drivers/net/cxgb3/l2t.c index ff1611f90e7a..2f3ee721c3e1 100644 --- a/drivers/net/cxgb3/l2t.c +++ b/drivers/net/cxgb3/l2t.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/if.h> | 34 | #include <linux/if.h> |
35 | #include <linux/if_vlan.h> | 35 | #include <linux/if_vlan.h> |
36 | #include <linux/jhash.h> | 36 | #include <linux/jhash.h> |
37 | #include <linux/slab.h> | ||
37 | #include <net/neighbour.h> | 38 | #include <net/neighbour.h> |
38 | #include "common.h" | 39 | #include "common.h" |
39 | #include "t3cdev.h" | 40 | #include "t3cdev.h" |
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index 67e61b2a8c42..07d7e7fab3f5 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/ip.h> | 36 | #include <linux/ip.h> |
37 | #include <linux/tcp.h> | 37 | #include <linux/tcp.h> |
38 | #include <linux/dma-mapping.h> | 38 | #include <linux/dma-mapping.h> |
39 | #include <linux/slab.h> | ||
39 | #include <net/arp.h> | 40 | #include <net/arp.h> |
40 | #include "common.h" | 41 | #include "common.h" |
41 | #include "regs.h" | 42 | #include "regs.h" |
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 989f2beb123b..a818ea998bbe 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
34 | #include <linux/platform_device.h> | 34 | #include <linux/platform_device.h> |
35 | #include <linux/irq.h> | 35 | #include <linux/irq.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <asm/delay.h> | 38 | #include <asm/delay.h> |
38 | #include <asm/irq.h> | 39 | #include <asm/irq.h> |
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index b33e3cbe9ab0..983493f2330c 100644 --- a/drivers/net/e1000e/ethtool.c +++ b/drivers/net/e1000e/ethtool.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/netdevice.h> | 31 | #include <linux/netdevice.h> |
32 | #include <linux/ethtool.h> | 32 | #include <linux/ethtool.h> |
33 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
35 | 36 | ||
36 | #include "e1000.h" | 37 | #include "e1000.h" |
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 167b1aedfb42..38390b5bfd73 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/netdevice.h> | 38 | #include <linux/netdevice.h> |
39 | #include <linux/tcp.h> | 39 | #include <linux/tcp.h> |
40 | #include <linux/ipv6.h> | 40 | #include <linux/ipv6.h> |
41 | #include <linux/slab.h> | ||
41 | #include <net/checksum.h> | 42 | #include <net/checksum.h> |
42 | #include <net/ip6_checksum.h> | 43 | #include <net/ip6_checksum.h> |
43 | #include <linux/mii.h> | 44 | #include <linux/mii.h> |
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c index b01e6997403b..eed65d821e47 100644 --- a/drivers/net/eepro.c +++ b/drivers/net/eepro.c | |||
@@ -137,7 +137,6 @@ static const char version[] = | |||
137 | #include <linux/interrupt.h> | 137 | #include <linux/interrupt.h> |
138 | #include <linux/ioport.h> | 138 | #include <linux/ioport.h> |
139 | #include <linux/in.h> | 139 | #include <linux/in.h> |
140 | #include <linux/slab.h> | ||
141 | #include <linux/string.h> | 140 | #include <linux/string.h> |
142 | #include <linux/errno.h> | 141 | #include <linux/errno.h> |
143 | #include <linux/netdevice.h> | 142 | #include <linux/netdevice.h> |
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c index b3882fd8db6d..c31dd0685553 100644 --- a/drivers/net/eexpress.c +++ b/drivers/net/eexpress.c | |||
@@ -111,7 +111,6 @@ | |||
111 | #include <linux/netdevice.h> | 111 | #include <linux/netdevice.h> |
112 | #include <linux/etherdevice.h> | 112 | #include <linux/etherdevice.h> |
113 | #include <linux/skbuff.h> | 113 | #include <linux/skbuff.h> |
114 | #include <linux/slab.h> | ||
115 | #include <linux/mca-legacy.h> | 114 | #include <linux/mca-legacy.h> |
116 | #include <linux/spinlock.h> | 115 | #include <linux/spinlock.h> |
117 | #include <linux/bitops.h> | 116 | #include <linux/bitops.h> |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index b97411aaa77c..e2d25fbb6d28 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/udp.h> | 32 | #include <linux/udp.h> |
33 | #include <linux/if.h> | 33 | #include <linux/if.h> |
34 | #include <linux/list.h> | 34 | #include <linux/list.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/if_ether.h> | 36 | #include <linux/if_ether.h> |
36 | #include <linux/notifier.h> | 37 | #include <linux/notifier.h> |
37 | #include <linux/reboot.h> | 38 | #include <linux/reboot.h> |
diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c index 18d405f78c0f..a1b4c7e56367 100644 --- a/drivers/net/ehea/ehea_qmr.c +++ b/drivers/net/ehea/ehea_qmr.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
30 | #include <linux/slab.h> | ||
30 | #include "ehea.h" | 31 | #include "ehea.h" |
31 | #include "ehea_phyp.h" | 32 | #include "ehea_phyp.h" |
32 | #include "ehea_qmr.h" | 33 | #include "ehea_qmr.h" |
diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c index 3ee32e58c7ec..ff27f728fd9d 100644 --- a/drivers/net/enc28j60.c +++ b/drivers/net/enc28j60.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <linux/fcntl.h> | 19 | #include <linux/fcntl.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/slab.h> | ||
22 | #include <linux/string.h> | 21 | #include <linux/string.h> |
23 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
diff --git a/drivers/net/enic/vnic_dev.c b/drivers/net/enic/vnic_dev.c index cbc0ba953fc6..d43a9d43bbff 100644 --- a/drivers/net/enic/vnic_dev.c +++ b/drivers/net/enic/vnic_dev.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/if_ether.h> | 25 | #include <linux/if_ether.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "vnic_resource.h" | 28 | #include "vnic_resource.h" |
28 | #include "vnic_devcmd.h" | 29 | #include "vnic_devcmd.h" |
diff --git a/drivers/net/enic/vnic_rq.c b/drivers/net/enic/vnic_rq.c index 7bcd90373487..cc580cfec41d 100644 --- a/drivers/net/enic/vnic_rq.c +++ b/drivers/net/enic/vnic_rq.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "vnic_dev.h" | 27 | #include "vnic_dev.h" |
27 | #include "vnic_rq.h" | 28 | #include "vnic_rq.h" |
diff --git a/drivers/net/enic/vnic_wq.c b/drivers/net/enic/vnic_wq.c index 44fc3234d585..1378afbdfe67 100644 --- a/drivers/net/enic/vnic_wq.c +++ b/drivers/net/enic/vnic_wq.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "vnic_dev.h" | 27 | #include "vnic_dev.h" |
27 | #include "vnic_wq.h" | 28 | #include "vnic_wq.h" |
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c index f6584a1ad3bc..8b5a203d3aa2 100644 --- a/drivers/net/epic100.c +++ b/drivers/net/epic100.c | |||
@@ -73,7 +73,6 @@ static int rx_copybreak; | |||
73 | #include <linux/timer.h> | 73 | #include <linux/timer.h> |
74 | #include <linux/errno.h> | 74 | #include <linux/errno.h> |
75 | #include <linux/ioport.h> | 75 | #include <linux/ioport.h> |
76 | #include <linux/slab.h> | ||
77 | #include <linux/interrupt.h> | 76 | #include <linux/interrupt.h> |
78 | #include <linux/pci.h> | 77 | #include <linux/pci.h> |
79 | #include <linux/delay.h> | 78 | #include <linux/delay.h> |
diff --git a/drivers/net/eql.c b/drivers/net/eql.c index f5b96cadeb25..b34a2ddeef4c 100644 --- a/drivers/net/eql.c +++ b/drivers/net/eql.c | |||
@@ -115,6 +115,7 @@ | |||
115 | #include <linux/module.h> | 115 | #include <linux/module.h> |
116 | #include <linux/kernel.h> | 116 | #include <linux/kernel.h> |
117 | #include <linux/init.h> | 117 | #include <linux/init.h> |
118 | #include <linux/slab.h> | ||
118 | #include <linux/timer.h> | 119 | #include <linux/timer.h> |
119 | #include <linux/netdevice.h> | 120 | #include <linux/netdevice.h> |
120 | #include <net/net_namespace.h> | 121 | #include <net/net_namespace.h> |
diff --git a/drivers/net/eth16i.c b/drivers/net/eth16i.c index d3abeee3f110..d4e24f08b3ba 100644 --- a/drivers/net/eth16i.c +++ b/drivers/net/eth16i.c | |||
@@ -152,7 +152,6 @@ static char *version = | |||
152 | #include <linux/interrupt.h> | 152 | #include <linux/interrupt.h> |
153 | #include <linux/ioport.h> | 153 | #include <linux/ioport.h> |
154 | #include <linux/in.h> | 154 | #include <linux/in.h> |
155 | #include <linux/slab.h> | ||
156 | #include <linux/string.h> | 155 | #include <linux/string.h> |
157 | #include <linux/errno.h> | 156 | #include <linux/errno.h> |
158 | #include <linux/init.h> | 157 | #include <linux/init.h> |
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index f6be5aeaf94c..6bd03c8b8886 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/phy.h> | 18 | #include <linux/phy.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/slab.h> | ||
21 | #include <net/ethoc.h> | 22 | #include <net/ethoc.h> |
22 | 23 | ||
23 | static int buffer_size = 0x8000; /* 32 KBytes */ | 24 | static int buffer_size = 0x8000; /* 32 KBytes */ |
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c index e8a2705237bf..51b738dd6547 100644 --- a/drivers/net/fealnx.c +++ b/drivers/net/fealnx.c | |||
@@ -74,7 +74,6 @@ static int full_duplex[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1 }; | |||
74 | #include <linux/timer.h> | 74 | #include <linux/timer.h> |
75 | #include <linux/errno.h> | 75 | #include <linux/errno.h> |
76 | #include <linux/ioport.h> | 76 | #include <linux/ioport.h> |
77 | #include <linux/slab.h> | ||
78 | #include <linux/interrupt.h> | 77 | #include <linux/interrupt.h> |
79 | #include <linux/pci.h> | 78 | #include <linux/pci.h> |
80 | #include <linux/netdevice.h> | 79 | #include <linux/netdevice.h> |
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index 667ba1391b9d..0376c3e472a7 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/crc32.h> | 25 | #include <linux/crc32.h> |
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c index ee0f3c6d3f88..7658a082e390 100644 --- a/drivers/net/fec_mpc52xx_phy.c +++ b/drivers/net/fec_mpc52xx_phy.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/netdevice.h> | 14 | #include <linux/netdevice.h> |
15 | #include <linux/phy.h> | 15 | #include <linux/phy.h> |
16 | #include <linux/of_platform.h> | 16 | #include <linux/of_platform.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/of_mdio.h> | 18 | #include <linux/of_mdio.h> |
18 | #include <asm/io.h> | 19 | #include <asm/io.h> |
19 | #include <asm/mpc52xx.h> | 20 | #include <asm/mpc52xx.h> |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 6a2b64f0a7db..3267b2390917 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -59,6 +59,7 @@ | |||
59 | #include <linux/init.h> | 59 | #include <linux/init.h> |
60 | #include <linux/if_vlan.h> | 60 | #include <linux/if_vlan.h> |
61 | #include <linux/dma-mapping.h> | 61 | #include <linux/dma-mapping.h> |
62 | #include <linux/slab.h> | ||
62 | 63 | ||
63 | #include <asm/irq.h> | 64 | #include <asm/irq.h> |
64 | #include <asm/io.h> | 65 | #include <asm/io.h> |
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c index b3bad7c15d02..714da967fa19 100644 --- a/drivers/net/fs_enet/mac-fcc.c +++ b/drivers/net/fs_enet/mac-fcc.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/ptrace.h> | 19 | #include <linux/ptrace.h> |
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
25 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
@@ -34,6 +33,7 @@ | |||
34 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
35 | #include <linux/phy.h> | 34 | #include <linux/phy.h> |
36 | #include <linux/of_device.h> | 35 | #include <linux/of_device.h> |
36 | #include <linux/gfp.h> | ||
37 | 37 | ||
38 | #include <asm/immap_cpm2.h> | 38 | #include <asm/immap_cpm2.h> |
39 | #include <asm/mpc8260.h> | 39 | #include <asm/mpc8260.h> |
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c index 75974c6d201b..7eff92ef01da 100644 --- a/drivers/net/fs_enet/mac-fec.c +++ b/drivers/net/fs_enet/mac-fec.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/ptrace.h> | 19 | #include <linux/ptrace.h> |
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
25 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
@@ -33,6 +32,7 @@ | |||
33 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
34 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
35 | #include <linux/of_device.h> | 34 | #include <linux/of_device.h> |
35 | #include <linux/gfp.h> | ||
36 | 36 | ||
37 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
38 | #include <asm/uaccess.h> | 38 | #include <asm/uaccess.h> |
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index 0ab6a346a193..7f0591e43cd9 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/ptrace.h> | 19 | #include <linux/ptrace.h> |
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/ioport.h> | 21 | #include <linux/ioport.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
25 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c index 1010367695e4..9bda023c0235 100644 --- a/drivers/net/gianfar_ethtool.c +++ b/drivers/net/gianfar_ethtool.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
25 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
diff --git a/drivers/net/gianfar_sysfs.c b/drivers/net/gianfar_sysfs.c index b98c6c512299..64f4094ac7f1 100644 --- a/drivers/net/gianfar_sysfs.c +++ b/drivers/net/gianfar_sysfs.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/string.h> | 24 | #include <linux/string.h> |
25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
26 | #include <linux/unistd.h> | 26 | #include <linux/unistd.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/init.h> | 27 | #include <linux/init.h> |
29 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
30 | #include <linux/etherdevice.h> | 29 | #include <linux/etherdevice.h> |
diff --git a/drivers/net/greth.c b/drivers/net/greth.c index fbe6ab6b919b..fd491e409488 100644 --- a/drivers/net/greth.c +++ b/drivers/net/greth.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/mii.h> | 34 | #include <linux/mii.h> |
35 | #include <linux/of_device.h> | 35 | #include <linux/of_device.h> |
36 | #include <linux/of_platform.h> | 36 | #include <linux/of_platform.h> |
37 | #include <linux/slab.h> | ||
37 | #include <asm/cacheflush.h> | 38 | #include <asm/cacheflush.h> |
38 | #include <asm/byteorder.h> | 39 | #include <asm/byteorder.h> |
39 | 40 | ||
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c index 2bfcca6d180c..83f43bb835d6 100644 --- a/drivers/net/hamachi.c +++ b/drivers/net/hamachi.c | |||
@@ -153,7 +153,6 @@ static int tx_params[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; | |||
153 | #include <linux/time.h> | 153 | #include <linux/time.h> |
154 | #include <linux/errno.h> | 154 | #include <linux/errno.h> |
155 | #include <linux/ioport.h> | 155 | #include <linux/ioport.h> |
156 | #include <linux/slab.h> | ||
157 | #include <linux/interrupt.h> | 156 | #include <linux/interrupt.h> |
158 | #include <linux/pci.h> | 157 | #include <linux/pci.h> |
159 | #include <linux/init.h> | 158 | #include <linux/init.h> |
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index 689b9bd377a5..4b52c767ad05 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
26 | #include <linux/timer.h> | 26 | #include <linux/timer.h> |
27 | #include <linux/slab.h> | ||
27 | #include <net/ax25.h> | 28 | #include <net/ax25.h> |
28 | #include <linux/etherdevice.h> | 29 | #include <linux/etherdevice.h> |
29 | #include <linux/skbuff.h> | 30 | #include <linux/skbuff.h> |
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index bdadf3e23c94..14f01d156db9 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <linux/kernel.h> | 61 | #include <linux/kernel.h> |
62 | #include <linux/string.h> | 62 | #include <linux/string.h> |
63 | #include <linux/net.h> | 63 | #include <linux/net.h> |
64 | #include <linux/slab.h> | ||
64 | #include <net/ax25.h> | 65 | #include <net/ax25.h> |
65 | #include <linux/inet.h> | 66 | #include <linux/inet.h> |
66 | #include <linux/netdevice.h> | 67 | #include <linux/netdevice.h> |
diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index 9ee76b42668f..52b14256e2c0 100644 --- a/drivers/net/hamradio/dmascc.c +++ b/drivers/net/hamradio/dmascc.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/mm.h> | 33 | #include <linux/mm.h> |
34 | #include <linux/netdevice.h> | 34 | #include <linux/netdevice.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/rtnetlink.h> | 36 | #include <linux/rtnetlink.h> |
36 | #include <linux/sockios.h> | 37 | #include <linux/sockios.h> |
37 | #include <linux/workqueue.h> | 38 | #include <linux/workqueue.h> |
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c index 91c5790c9581..b8bdf9d51cd4 100644 --- a/drivers/net/hamradio/hdlcdrv.c +++ b/drivers/net/hamradio/hdlcdrv.c | |||
@@ -48,7 +48,6 @@ | |||
48 | #include <linux/net.h> | 48 | #include <linux/net.h> |
49 | #include <linux/in.h> | 49 | #include <linux/in.h> |
50 | #include <linux/if.h> | 50 | #include <linux/if.h> |
51 | #include <linux/slab.h> | ||
52 | #include <linux/errno.h> | 51 | #include <linux/errno.h> |
53 | #include <linux/init.h> | 52 | #include <linux/init.h> |
54 | #include <linux/bitops.h> | 53 | #include <linux/bitops.h> |
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index 7db0a1c3216c..66e88bd59caa 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/in.h> | 27 | #include <linux/in.h> |
28 | #include <linux/inet.h> | 28 | #include <linux/inet.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/tty.h> | 30 | #include <linux/tty.h> |
30 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
31 | #include <linux/netdevice.h> | 32 | #include <linux/netdevice.h> |
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index 35c936175bba..f3a96b843911 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c | |||
@@ -158,7 +158,6 @@ | |||
158 | #include <linux/in.h> | 158 | #include <linux/in.h> |
159 | #include <linux/fcntl.h> | 159 | #include <linux/fcntl.h> |
160 | #include <linux/ptrace.h> | 160 | #include <linux/ptrace.h> |
161 | #include <linux/slab.h> | ||
162 | #include <linux/delay.h> | 161 | #include <linux/delay.h> |
163 | #include <linux/skbuff.h> | 162 | #include <linux/skbuff.h> |
164 | #include <linux/netdevice.h> | 163 | #include <linux/netdevice.h> |
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c index 86b2b4332341..0f3f6c2e6942 100644 --- a/drivers/net/hp100.c +++ b/drivers/net/hp100.c | |||
@@ -102,7 +102,6 @@ | |||
102 | #include <linux/string.h> | 102 | #include <linux/string.h> |
103 | #include <linux/errno.h> | 103 | #include <linux/errno.h> |
104 | #include <linux/ioport.h> | 104 | #include <linux/ioport.h> |
105 | #include <linux/slab.h> | ||
106 | #include <linux/interrupt.h> | 105 | #include <linux/interrupt.h> |
107 | #include <linux/eisa.h> | 106 | #include <linux/eisa.h> |
108 | #include <linux/pci.h> | 107 | #include <linux/pci.h> |
diff --git a/drivers/net/hplance.c b/drivers/net/hplance.c index 3e3528ade259..b6060f7538df 100644 --- a/drivers/net/hplance.c +++ b/drivers/net/hplance.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/ioport.h> | 12 | #include <linux/ioport.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/string.h> | 13 | #include <linux/string.h> |
15 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
diff --git a/drivers/net/hydra.c b/drivers/net/hydra.c index d496b6f4a478..24724b4ad709 100644 --- a/drivers/net/hydra.c +++ b/drivers/net/hydra.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
22 | #include <linux/netdevice.h> | 21 | #include <linux/netdevice.h> |
23 | #include <linux/etherdevice.h> | 22 | #include <linux/etherdevice.h> |
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 40c78507ef16..2484e9e6c1ed 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/bitops.h> | 39 | #include <linux/bitops.h> |
40 | #include <linux/workqueue.h> | 40 | #include <linux/workqueue.h> |
41 | #include <linux/of.h> | 41 | #include <linux/of.h> |
42 | #include <linux/slab.h> | ||
42 | 43 | ||
43 | #include <asm/processor.h> | 44 | #include <asm/processor.h> |
44 | #include <asm/io.h> | 45 | #include <asm/io.h> |
diff --git a/drivers/net/ibm_newemac/core.h b/drivers/net/ibm_newemac/core.h index 18d56c6c4238..b1cbe6fdfc7a 100644 --- a/drivers/net/ibm_newemac/core.h +++ b/drivers/net/ibm_newemac/core.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
35 | #include <linux/spinlock.h> | 35 | #include <linux/spinlock.h> |
36 | #include <linux/of_platform.h> | 36 | #include <linux/of_platform.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include <asm/io.h> | 39 | #include <asm/io.h> |
39 | #include <asm/dcr.h> | 40 | #include <asm/dcr.h> |
diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c index 2a2fc17b2878..5b3d94419fe6 100644 --- a/drivers/net/ibm_newemac/mal.c +++ b/drivers/net/ibm_newemac/mal.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include "core.h" | 31 | #include "core.h" |
31 | #include <asm/dcr-regs.h> | 32 | #include <asm/dcr-regs.h> |
diff --git a/drivers/net/ibm_newemac/rgmii.c b/drivers/net/ibm_newemac/rgmii.c index 8d76cb89dbd6..5b90d34c8455 100644 --- a/drivers/net/ibm_newemac/rgmii.c +++ b/drivers/net/ibm_newemac/rgmii.c | |||
@@ -21,6 +21,7 @@ | |||
21 | * option) any later version. | 21 | * option) any later version. |
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | #include <linux/slab.h> | ||
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
25 | #include <linux/ethtool.h> | 26 | #include <linux/ethtool.h> |
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
diff --git a/drivers/net/ibm_newemac/zmii.c b/drivers/net/ibm_newemac/zmii.c index 17b154124943..1f038f808ab3 100644 --- a/drivers/net/ibm_newemac/zmii.c +++ b/drivers/net/ibm_newemac/zmii.c | |||
@@ -21,6 +21,7 @@ | |||
21 | * option) any later version. | 21 | * option) any later version. |
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | #include <linux/slab.h> | ||
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
25 | #include <linux/ethtool.h> | 26 | #include <linux/ethtool.h> |
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
diff --git a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c index 76949e08ee84..294ccfb427cf 100644 --- a/drivers/net/ibmlana.c +++ b/drivers/net/ibmlana.c | |||
@@ -79,7 +79,6 @@ History: | |||
79 | #include <linux/string.h> | 79 | #include <linux/string.h> |
80 | #include <linux/errno.h> | 80 | #include <linux/errno.h> |
81 | #include <linux/ioport.h> | 81 | #include <linux/ioport.h> |
82 | #include <linux/slab.h> | ||
83 | #include <linux/interrupt.h> | 82 | #include <linux/interrupt.h> |
84 | #include <linux/delay.h> | 83 | #include <linux/delay.h> |
85 | #include <linux/time.h> | 84 | #include <linux/time.h> |
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index f468590ed454..0d2c3ac2005e 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/proc_fs.h> | 49 | #include <linux/proc_fs.h> |
50 | #include <linux/in.h> | 50 | #include <linux/in.h> |
51 | #include <linux/ip.h> | 51 | #include <linux/ip.h> |
52 | #include <linux/slab.h> | ||
52 | #include <net/net_namespace.h> | 53 | #include <net/net_namespace.h> |
53 | #include <asm/hvcall.h> | 54 | #include <asm/hvcall.h> |
54 | #include <asm/atomic.h> | 55 | #include <asm/atomic.h> |
diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c index 430631f49d9d..3ef495537dc5 100644 --- a/drivers/net/igb/e1000_82575.c +++ b/drivers/net/igb/e1000_82575.c | |||
@@ -30,7 +30,6 @@ | |||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/slab.h> | ||
34 | #include <linux/if_ether.h> | 33 | #include <linux/if_ether.h> |
35 | 34 | ||
36 | #include "e1000_mac.h" | 35 | #include "e1000_mac.h" |
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c index 1d4ee418226d..2a438298d0ff 100644 --- a/drivers/net/igb/igb_ethtool.c +++ b/drivers/net/igb/igb_ethtool.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/if_ether.h> | 35 | #include <linux/if_ether.h> |
36 | #include <linux/ethtool.h> | 36 | #include <linux/ethtool.h> |
37 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include "igb.h" | 40 | #include "igb.h" |
40 | 41 | ||
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 2745e17fd021..8a1f54fb8a3e 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/pagemap.h> | 32 | #include <linux/pagemap.h> |
33 | #include <linux/netdevice.h> | 33 | #include <linux/netdevice.h> |
34 | #include <linux/ipv6.h> | 34 | #include <linux/ipv6.h> |
35 | #include <linux/slab.h> | ||
35 | #include <net/checksum.h> | 36 | #include <net/checksum.h> |
36 | #include <net/ip6_checksum.h> | 37 | #include <net/ip6_checksum.h> |
37 | #include <linux/net_tstamp.h> | 38 | #include <linux/net_tstamp.h> |
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c index 868855078ebc..cc2309027e6a 100644 --- a/drivers/net/igbvf/netdev.c +++ b/drivers/net/igbvf/netdev.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/netdevice.h> | 35 | #include <linux/netdevice.h> |
36 | #include <linux/tcp.h> | 36 | #include <linux/tcp.h> |
37 | #include <linux/ipv6.h> | 37 | #include <linux/ipv6.h> |
38 | #include <linux/slab.h> | ||
38 | #include <net/checksum.h> | 39 | #include <net/checksum.h> |
39 | #include <net/ip6_checksum.h> | 40 | #include <net/ip6_checksum.h> |
40 | #include <linux/mii.h> | 41 | #include <linux/mii.h> |
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c index 57d873da9789..091ea3377ed0 100644 --- a/drivers/net/ioc3-eth.c +++ b/drivers/net/ioc3-eth.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/tcp.h> | 44 | #include <linux/tcp.h> |
45 | #include <linux/udp.h> | 45 | #include <linux/udp.h> |
46 | #include <linux/dma-mapping.h> | 46 | #include <linux/dma-mapping.h> |
47 | #include <linux/gfp.h> | ||
47 | 48 | ||
48 | #ifdef CONFIG_SERIAL_8250 | 49 | #ifdef CONFIG_SERIAL_8250 |
49 | #include <linux/serial_core.h> | 50 | #include <linux/serial_core.h> |
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c index 67cfc7d9d895..72e3d2da9e9f 100644 --- a/drivers/net/ipg.c +++ b/drivers/net/ipg.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | #include <linux/crc32.h> | 23 | #include <linux/crc32.h> |
24 | #include <linux/ethtool.h> | 24 | #include <linux/ethtool.h> |
25 | #include <linux/gfp.h> | ||
25 | #include <linux/mii.h> | 26 | #include <linux/mii.h> |
26 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
27 | 28 | ||
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c index a32c97e6b39d..a3cb109006a5 100644 --- a/drivers/net/irda/ali-ircc.c +++ b/drivers/net/irda/ali-ircc.c | |||
@@ -22,6 +22,7 @@ | |||
22 | ********************************************************************/ | 22 | ********************************************************************/ |
23 | 23 | ||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/gfp.h> | ||
25 | 26 | ||
26 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
27 | #include <linux/types.h> | 28 | #include <linux/types.h> |
@@ -29,7 +30,6 @@ | |||
29 | #include <linux/netdevice.h> | 30 | #include <linux/netdevice.h> |
30 | #include <linux/ioport.h> | 31 | #include <linux/ioport.h> |
31 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | #include <linux/rtnetlink.h> | 34 | #include <linux/rtnetlink.h> |
35 | #include <linux/serial_reg.h> | 35 | #include <linux/serial_reg.h> |
diff --git a/drivers/net/irda/bfin_sir.h b/drivers/net/irda/bfin_sir.h index dac71b1f4f9b..b54a6f08db45 100644 --- a/drivers/net/irda/bfin_sir.h +++ b/drivers/net/irda/bfin_sir.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/dma-mapping.h> | 18 | #include <linux/dma-mapping.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include <net/irda/irda.h> | 21 | #include <net/irda/irda.h> |
21 | #include <net/irda/wrapper.h> | 22 | #include <net/irda/wrapper.h> |
diff --git a/drivers/net/irda/irtty-sir.c b/drivers/net/irda/irtty-sir.c index 20f9bc626688..ee1dde52e8fc 100644 --- a/drivers/net/irda/irtty-sir.c +++ b/drivers/net/irda/irtty-sir.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/tty.h> | 32 | #include <linux/tty.h> |
32 | #include <linux/init.h> | 33 | #include <linux/init.h> |
33 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c index 2413295ebd90..e30cdbb14745 100644 --- a/drivers/net/irda/nsc-ircc.c +++ b/drivers/net/irda/nsc-ircc.c | |||
@@ -43,6 +43,7 @@ | |||
43 | ********************************************************************/ | 43 | ********************************************************************/ |
44 | 44 | ||
45 | #include <linux/module.h> | 45 | #include <linux/module.h> |
46 | #include <linux/gfp.h> | ||
46 | 47 | ||
47 | #include <linux/kernel.h> | 48 | #include <linux/kernel.h> |
48 | #include <linux/types.h> | 49 | #include <linux/types.h> |
@@ -50,7 +51,6 @@ | |||
50 | #include <linux/netdevice.h> | 51 | #include <linux/netdevice.h> |
51 | #include <linux/ioport.h> | 52 | #include <linux/ioport.h> |
52 | #include <linux/delay.h> | 53 | #include <linux/delay.h> |
53 | #include <linux/slab.h> | ||
54 | #include <linux/init.h> | 54 | #include <linux/init.h> |
55 | #include <linux/rtnetlink.h> | 55 | #include <linux/rtnetlink.h> |
56 | #include <linux/dma-mapping.h> | 56 | #include <linux/dma-mapping.h> |
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index 84db145d2b59..1a54f6bb68c5 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <net/irda/irda.h> | 23 | #include <net/irda/irda.h> |
23 | #include <net/irda/irmod.h> | 24 | #include <net/irda/irmod.h> |
diff --git a/drivers/net/irda/sh_sir.c b/drivers/net/irda/sh_sir.c index 7c17ab8ecc29..5c5f99d50341 100644 --- a/drivers/net/irda/sh_sir.c +++ b/drivers/net/irda/sh_sir.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/slab.h> | ||
17 | #include <net/irda/wrapper.h> | 18 | #include <net/irda/wrapper.h> |
18 | #include <net/irda/irda_device.h> | 19 | #include <net/irda/irda_device.h> |
19 | #include <asm/clock.h> | 20 | #include <asm/clock.h> |
diff --git a/drivers/net/irda/sir_dev.c b/drivers/net/irda/sir_dev.c index 4b2a1a9eac2a..de91cd14016b 100644 --- a/drivers/net/irda/sir_dev.c +++ b/drivers/net/irda/sir_dev.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
17 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
18 | 19 | ||
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index 8f7d0d146f24..6af84d88cd03 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c | |||
@@ -48,13 +48,13 @@ | |||
48 | #include <linux/netdevice.h> | 48 | #include <linux/netdevice.h> |
49 | #include <linux/ioport.h> | 49 | #include <linux/ioport.h> |
50 | #include <linux/delay.h> | 50 | #include <linux/delay.h> |
51 | #include <linux/slab.h> | ||
52 | #include <linux/init.h> | 51 | #include <linux/init.h> |
53 | #include <linux/rtnetlink.h> | 52 | #include <linux/rtnetlink.h> |
54 | #include <linux/serial_reg.h> | 53 | #include <linux/serial_reg.h> |
55 | #include <linux/dma-mapping.h> | 54 | #include <linux/dma-mapping.h> |
56 | #include <linux/pnp.h> | 55 | #include <linux/pnp.h> |
57 | #include <linux/platform_device.h> | 56 | #include <linux/platform_device.h> |
57 | #include <linux/gfp.h> | ||
58 | 58 | ||
59 | #include <asm/io.h> | 59 | #include <asm/io.h> |
60 | #include <asm/dma.h> | 60 | #include <asm/dma.h> |
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c index 6533c010cf5c..b0a6cd815be1 100644 --- a/drivers/net/irda/via-ircc.c +++ b/drivers/net/irda/via-ircc.c | |||
@@ -45,11 +45,11 @@ F02 Oct/28/02: Add SB device ID for 3147 and 3177. | |||
45 | #include <linux/netdevice.h> | 45 | #include <linux/netdevice.h> |
46 | #include <linux/ioport.h> | 46 | #include <linux/ioport.h> |
47 | #include <linux/delay.h> | 47 | #include <linux/delay.h> |
48 | #include <linux/slab.h> | ||
49 | #include <linux/init.h> | 48 | #include <linux/init.h> |
50 | #include <linux/rtnetlink.h> | 49 | #include <linux/rtnetlink.h> |
51 | #include <linux/pci.h> | 50 | #include <linux/pci.h> |
52 | #include <linux/dma-mapping.h> | 51 | #include <linux/dma-mapping.h> |
52 | #include <linux/gfp.h> | ||
53 | 53 | ||
54 | #include <asm/io.h> | 54 | #include <asm/io.h> |
55 | #include <asm/dma.h> | 55 | #include <asm/dma.h> |
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c index 980625feb2c0..cb0cb758be64 100644 --- a/drivers/net/irda/w83977af_ir.c +++ b/drivers/net/irda/w83977af_ir.c | |||
@@ -46,10 +46,10 @@ | |||
46 | #include <linux/netdevice.h> | 46 | #include <linux/netdevice.h> |
47 | #include <linux/ioport.h> | 47 | #include <linux/ioport.h> |
48 | #include <linux/delay.h> | 48 | #include <linux/delay.h> |
49 | #include <linux/slab.h> | ||
50 | #include <linux/init.h> | 49 | #include <linux/init.h> |
51 | #include <linux/rtnetlink.h> | 50 | #include <linux/rtnetlink.h> |
52 | #include <linux/dma-mapping.h> | 51 | #include <linux/dma-mapping.h> |
52 | #include <linux/gfp.h> | ||
53 | 53 | ||
54 | #include <asm/io.h> | 54 | #include <asm/io.h> |
55 | #include <asm/dma.h> | 55 | #include <asm/dma.h> |
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c index cd65b8629bcc..ba1de5973fb2 100644 --- a/drivers/net/iseries_veth.c +++ b/drivers/net/iseries_veth.c | |||
@@ -69,6 +69,7 @@ | |||
69 | #include <linux/mm.h> | 69 | #include <linux/mm.h> |
70 | #include <linux/ethtool.h> | 70 | #include <linux/ethtool.h> |
71 | #include <linux/if_ether.h> | 71 | #include <linux/if_ether.h> |
72 | #include <linux/slab.h> | ||
72 | 73 | ||
73 | #include <asm/abs_addr.h> | 74 | #include <asm/abs_addr.h> |
74 | #include <asm/iseries/mf.h> | 75 | #include <asm/iseries/mf.h> |
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 1959ef76c962..8f461d5cee77 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
33 | #include <linux/netdevice.h> | 34 | #include <linux/netdevice.h> |
34 | #include <linux/ethtool.h> | 35 | #include <linux/ethtool.h> |
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c index 9276d5965b0d..6493049b663d 100644 --- a/drivers/net/ixgbe/ixgbe_fcoe.c +++ b/drivers/net/ixgbe/ixgbe_fcoe.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "ixgbe_dcb_82599.h" | 31 | #include "ixgbe_dcb_82599.h" |
32 | #endif /* CONFIG_IXGBE_DCB */ | 32 | #endif /* CONFIG_IXGBE_DCB */ |
33 | #include <linux/if_ether.h> | 33 | #include <linux/if_ether.h> |
34 | #include <linux/gfp.h> | ||
34 | #include <scsi/scsi_cmnd.h> | 35 | #include <scsi/scsi_cmnd.h> |
35 | #include <scsi/scsi_device.h> | 36 | #include <scsi/scsi_device.h> |
36 | #include <scsi/fc/fc_fs.h> | 37 | #include <scsi/fc/fc_fs.h> |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 7216db218442..1b1419c6a3d6 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/tcp.h> | 36 | #include <linux/tcp.h> |
37 | #include <linux/pkt_sched.h> | 37 | #include <linux/pkt_sched.h> |
38 | #include <linux/ipv6.h> | 38 | #include <linux/ipv6.h> |
39 | #include <linux/slab.h> | ||
39 | #include <net/checksum.h> | 40 | #include <net/checksum.h> |
40 | #include <net/ip6_checksum.h> | 41 | #include <net/ip6_checksum.h> |
41 | #include <linux/ethtool.h> | 42 | #include <linux/ethtool.h> |
diff --git a/drivers/net/ixgbevf/ethtool.c b/drivers/net/ixgbevf/ethtool.c index 6fdd651abcd1..4680b069b84f 100644 --- a/drivers/net/ixgbevf/ethtool.c +++ b/drivers/net/ixgbevf/ethtool.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
33 | #include <linux/netdevice.h> | 34 | #include <linux/netdevice.h> |
34 | #include <linux/ethtool.h> | 35 | #include <linux/ethtool.h> |
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c index 65cb133a6a1f..d0c3538271e3 100644 --- a/drivers/net/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ixgbevf/ixgbevf_main.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/ip.h> | 39 | #include <linux/ip.h> |
40 | #include <linux/tcp.h> | 40 | #include <linux/tcp.h> |
41 | #include <linux/ipv6.h> | 41 | #include <linux/ipv6.h> |
42 | #include <linux/slab.h> | ||
42 | #include <net/checksum.h> | 43 | #include <net/checksum.h> |
43 | #include <net/ip6_checksum.h> | 44 | #include <net/ip6_checksum.h> |
44 | #include <linux/ethtool.h> | 45 | #include <linux/ethtool.h> |
diff --git a/drivers/net/ixp2000/ixpdev.c b/drivers/net/ixp2000/ixpdev.c index e9d9d595e1b7..d5932ca3e27d 100644 --- a/drivers/net/ixp2000/ixpdev.c +++ b/drivers/net/ixp2000/ixpdev.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/etherdevice.h> | 15 | #include <linux/etherdevice.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/moduleparam.h> | 17 | #include <linux/moduleparam.h> |
18 | #include <linux/gfp.h> | ||
18 | #include <asm/hardware/uengine.h> | 19 | #include <asm/hardware/uengine.h> |
19 | #include <asm/io.h> | 20 | #include <asm/io.h> |
20 | #include "ixp2400_rx.ucode" | 21 | #include "ixp2400_rx.ucode" |
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c index f47d4d663b19..3e6aaf9e5ce7 100644 --- a/drivers/net/jazzsonic.c +++ b/drivers/net/jazzsonic.c | |||
@@ -22,11 +22,11 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/fcntl.h> | 24 | #include <linux/fcntl.h> |
25 | #include <linux/gfp.h> | ||
25 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
26 | #include <linux/init.h> | 27 | #include <linux/init.h> |
27 | #include <linux/ioport.h> | 28 | #include <linux/ioport.h> |
28 | #include <linux/in.h> | 29 | #include <linux/in.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/string.h> | 30 | #include <linux/string.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/skbuff.h> | 35 | #include <linux/skbuff.h> |
36 | #include <linux/platform_device.h> | 36 | #include <linux/platform_device.h> |
37 | #include <linux/dma-mapping.h> | 37 | #include <linux/dma-mapping.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include <asm/bootinfo.h> | 40 | #include <asm/bootinfo.h> |
40 | #include <asm/system.h> | 41 | #include <asm/system.h> |
diff --git a/drivers/net/jme.c b/drivers/net/jme.c index 10e816d2caff..4e868eeac89e 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/tcp.h> | 37 | #include <linux/tcp.h> |
38 | #include <linux/udp.h> | 38 | #include <linux/udp.h> |
39 | #include <linux/if_vlan.h> | 39 | #include <linux/if_vlan.h> |
40 | #include <linux/slab.h> | ||
40 | #include <net/ip6_checksum.h> | 41 | #include <net/ip6_checksum.h> |
41 | #include "jme.h" | 42 | #include "jme.h" |
42 | 43 | ||
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c index 70a3d98f4bd7..2e2c69b24062 100644 --- a/drivers/net/ks8851_mll.c +++ b/drivers/net/ks8851_mll.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/mii.h> | 33 | #include <linux/mii.h> |
34 | #include <linux/platform_device.h> | 34 | #include <linux/platform_device.h> |
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #define DRV_NAME "ks8851_mll" | 38 | #define DRV_NAME "ks8851_mll" |
38 | 39 | ||
diff --git a/drivers/net/ksz884x.c b/drivers/net/ksz884x.c index 097796423b52..870185837a3b 100644 --- a/drivers/net/ksz884x.c +++ b/drivers/net/ksz884x.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/if_vlan.h> | 31 | #include <linux/if_vlan.h> |
32 | #include <linux/crc32.h> | 32 | #include <linux/crc32.h> |
33 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | 36 | ||
36 | /* DMA Registers */ | 37 | /* DMA Registers */ |
diff --git a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c index b77238dbafb8..6eba352c52e0 100644 --- a/drivers/net/lasi_82596.c +++ b/drivers/net/lasi_82596.c | |||
@@ -74,7 +74,6 @@ | |||
74 | #include <linux/ptrace.h> | 74 | #include <linux/ptrace.h> |
75 | #include <linux/errno.h> | 75 | #include <linux/errno.h> |
76 | #include <linux/ioport.h> | 76 | #include <linux/ioport.h> |
77 | #include <linux/slab.h> | ||
78 | #include <linux/interrupt.h> | 77 | #include <linux/interrupt.h> |
79 | #include <linux/delay.h> | 78 | #include <linux/delay.h> |
80 | #include <linux/netdevice.h> | 79 | #include <linux/netdevice.h> |
diff --git a/drivers/net/lib82596.c b/drivers/net/lib82596.c index fddaf921885e..61c38ab4c247 100644 --- a/drivers/net/lib82596.c +++ b/drivers/net/lib82596.c | |||
@@ -73,7 +73,6 @@ | |||
73 | #include <linux/string.h> | 73 | #include <linux/string.h> |
74 | #include <linux/errno.h> | 74 | #include <linux/errno.h> |
75 | #include <linux/ioport.h> | 75 | #include <linux/ioport.h> |
76 | #include <linux/slab.h> | ||
77 | #include <linux/interrupt.h> | 76 | #include <linux/interrupt.h> |
78 | #include <linux/delay.h> | 77 | #include <linux/delay.h> |
79 | #include <linux/netdevice.h> | 78 | #include <linux/netdevice.h> |
@@ -85,6 +84,7 @@ | |||
85 | #include <linux/dma-mapping.h> | 84 | #include <linux/dma-mapping.h> |
86 | #include <linux/io.h> | 85 | #include <linux/io.h> |
87 | #include <linux/irq.h> | 86 | #include <linux/irq.h> |
87 | #include <linux/gfp.h> | ||
88 | 88 | ||
89 | /* DEBUG flags | 89 | /* DEBUG flags |
90 | */ | 90 | */ |
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index 30474d6b15c3..72cb8c107157 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/in.h> | 49 | #include <linux/in.h> |
50 | #include <linux/io.h> | 50 | #include <linux/io.h> |
51 | #include <linux/ip.h> | 51 | #include <linux/ip.h> |
52 | #include <linux/slab.h> | ||
52 | 53 | ||
53 | #include "ll_temac.h" | 54 | #include "ll_temac.h" |
54 | 55 | ||
diff --git a/drivers/net/ll_temac_mdio.c b/drivers/net/ll_temac_mdio.c index da0e462308d5..5ae28c975b38 100644 --- a/drivers/net/ll_temac_mdio.c +++ b/drivers/net/ll_temac_mdio.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/phy.h> | 10 | #include <linux/phy.h> |
11 | #include <linux/of.h> | 11 | #include <linux/of.h> |
12 | #include <linux/of_device.h> | 12 | #include <linux/of_device.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/of_mdio.h> | 14 | #include <linux/of_mdio.h> |
14 | 15 | ||
15 | #include "ll_temac.h" | 16 | #include "ll_temac.h" |
diff --git a/drivers/net/mac8390.c b/drivers/net/mac8390.c index a8768672dc5a..c8e68fde0664 100644 --- a/drivers/net/mac8390.c +++ b/drivers/net/mac8390.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/ioport.h> | 28 | #include <linux/ioport.h> |
29 | #include <linux/nubus.h> | 29 | #include <linux/nubus.h> |
30 | #include <linux/in.h> | 30 | #include <linux/in.h> |
31 | #include <linux/slab.h> | ||
32 | #include <linux/string.h> | 31 | #include <linux/string.h> |
33 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
34 | #include <linux/init.h> | 33 | #include <linux/init.h> |
diff --git a/drivers/net/mac89x0.c b/drivers/net/mac89x0.c index c292a608f9a9..c0876e915eed 100644 --- a/drivers/net/mac89x0.c +++ b/drivers/net/mac89x0.c | |||
@@ -88,7 +88,6 @@ static char *version = | |||
88 | #include <linux/interrupt.h> | 88 | #include <linux/interrupt.h> |
89 | #include <linux/ioport.h> | 89 | #include <linux/ioport.h> |
90 | #include <linux/in.h> | 90 | #include <linux/in.h> |
91 | #include <linux/slab.h> | ||
92 | #include <linux/string.h> | 91 | #include <linux/string.h> |
93 | #include <linux/nubus.h> | 92 | #include <linux/nubus.h> |
94 | #include <linux/errno.h> | 93 | #include <linux/errno.h> |
@@ -98,6 +97,7 @@ static char *version = | |||
98 | #include <linux/skbuff.h> | 97 | #include <linux/skbuff.h> |
99 | #include <linux/delay.h> | 98 | #include <linux/delay.h> |
100 | #include <linux/bitops.h> | 99 | #include <linux/bitops.h> |
100 | #include <linux/gfp.h> | ||
101 | 101 | ||
102 | #include <asm/system.h> | 102 | #include <asm/system.h> |
103 | #include <asm/io.h> | 103 | #include <asm/io.h> |
diff --git a/drivers/net/mace.c b/drivers/net/mace.c index 2328a7399dcb..b6855a6476f8 100644 --- a/drivers/net/mace.c +++ b/drivers/net/mace.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/crc32.h> | 16 | #include <linux/crc32.h> |
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <linux/bitrev.h> | 18 | #include <linux/bitrev.h> |
19 | #include <linux/slab.h> | ||
19 | #include <asm/prom.h> | 20 | #include <asm/prom.h> |
20 | #include <asm/dbdma.h> | 21 | #include <asm/dbdma.h> |
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
diff --git a/drivers/net/macmace.c b/drivers/net/macmace.c index 8a50c67e5928..a6e19fc8a80a 100644 --- a/drivers/net/macmace.c +++ b/drivers/net/macmace.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/bitrev.h> | 30 | #include <linux/bitrev.h> |
31 | #include <linux/dma-mapping.h> | 31 | #include <linux/dma-mapping.h> |
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/gfp.h> | ||
33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
34 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
35 | #include <asm/macintosh.h> | 36 | #include <asm/macintosh.h> |
diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c index 24109c288108..adb54fe2d82a 100644 --- a/drivers/net/macsonic.c +++ b/drivers/net/macsonic.c | |||
@@ -35,11 +35,11 @@ | |||
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
37 | #include <linux/fcntl.h> | 37 | #include <linux/fcntl.h> |
38 | #include <linux/gfp.h> | ||
38 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
39 | #include <linux/init.h> | 40 | #include <linux/init.h> |
40 | #include <linux/ioport.h> | 41 | #include <linux/ioport.h> |
41 | #include <linux/in.h> | 42 | #include <linux/in.h> |
42 | #include <linux/slab.h> | ||
43 | #include <linux/string.h> | 43 | #include <linux/string.h> |
44 | #include <linux/delay.h> | 44 | #include <linux/delay.h> |
45 | #include <linux/nubus.h> | 45 | #include <linux/nubus.h> |
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/platform_device.h> | 50 | #include <linux/platform_device.h> |
51 | #include <linux/dma-mapping.h> | 51 | #include <linux/dma-mapping.h> |
52 | #include <linux/bitrev.h> | 52 | #include <linux/bitrev.h> |
53 | #include <linux/slab.h> | ||
53 | 54 | ||
54 | #include <asm/bootinfo.h> | 55 | #include <asm/bootinfo.h> |
55 | #include <asm/system.h> | 56 | #include <asm/system.h> |
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 55ceae09738e..abba3cc81f12 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/cache.h> | 9 | #include <linux/cache.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
13 | #include <linux/wait.h> | 14 | #include <linux/wait.h> |
14 | #include <linux/cdev.h> | 15 | #include <linux/cdev.h> |
diff --git a/drivers/net/mlx4/cmd.c b/drivers/net/mlx4/cmd.c index 65ec77dc31f5..23cee7b6af91 100644 --- a/drivers/net/mlx4/cmd.c +++ b/drivers/net/mlx4/cmd.c | |||
@@ -33,6 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
37 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
38 | 39 | ||
diff --git a/drivers/net/mlx4/cq.c b/drivers/net/mlx4/cq.c index ccfe276943f0..7cd34e9c7c7e 100644 --- a/drivers/net/mlx4/cq.c +++ b/drivers/net/mlx4/cq.c | |||
@@ -35,6 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/hardirq.h> | 37 | #include <linux/hardirq.h> |
38 | #include <linux/gfp.h> | ||
38 | 39 | ||
39 | #include <linux/mlx4/cmd.h> | 40 | #include <linux/mlx4/cmd.h> |
40 | #include <linux/mlx4/cq.h> | 41 | #include <linux/mlx4/cq.h> |
diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c index 507e11fce9ed..cbabf14f95d0 100644 --- a/drivers/net/mlx4/en_main.c +++ b/drivers/net/mlx4/en_main.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
37 | #include <linux/netdevice.h> | 37 | #include <linux/netdevice.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include <linux/mlx4/driver.h> | 40 | #include <linux/mlx4/driver.h> |
40 | #include <linux/mlx4/device.h> | 41 | #include <linux/mlx4/device.h> |
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c index 455464223b43..96180c0ec206 100644 --- a/drivers/net/mlx4/en_netdev.c +++ b/drivers/net/mlx4/en_netdev.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/tcp.h> | 35 | #include <linux/tcp.h> |
36 | #include <linux/if_vlan.h> | 36 | #include <linux/if_vlan.h> |
37 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include <linux/mlx4/driver.h> | 40 | #include <linux/mlx4/driver.h> |
40 | #include <linux/mlx4/device.h> | 41 | #include <linux/mlx4/device.h> |
diff --git a/drivers/net/mlx4/en_resources.c b/drivers/net/mlx4/en_resources.c index 16256784a943..0dfb4ec8a9dd 100644 --- a/drivers/net/mlx4/en_resources.c +++ b/drivers/net/mlx4/en_resources.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/slab.h> | ||
34 | #include <linux/vmalloc.h> | 35 | #include <linux/vmalloc.h> |
35 | #include <linux/mlx4/qp.h> | 36 | #include <linux/mlx4/qp.h> |
36 | 37 | ||
diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c index 64394647dddc..8e2fcb7103c3 100644 --- a/drivers/net/mlx4/en_rx.c +++ b/drivers/net/mlx4/en_rx.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/mlx4/cq.h> | 34 | #include <linux/mlx4/cq.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/mlx4/qp.h> | 36 | #include <linux/mlx4/qp.h> |
36 | #include <linux/skbuff.h> | 37 | #include <linux/skbuff.h> |
37 | #include <linux/if_ether.h> | 38 | #include <linux/if_ether.h> |
diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c index 3d1396af9462..580968f304eb 100644 --- a/drivers/net/mlx4/en_tx.c +++ b/drivers/net/mlx4/en_tx.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <asm/page.h> | 34 | #include <asm/page.h> |
35 | #include <linux/mlx4/cq.h> | 35 | #include <linux/mlx4/cq.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/mlx4/qp.h> | 37 | #include <linux/mlx4/qp.h> |
37 | #include <linux/skbuff.h> | 38 | #include <linux/skbuff.h> |
38 | #include <linux/if_vlan.h> | 39 | #include <linux/if_vlan.h> |
diff --git a/drivers/net/mlx4/eq.c b/drivers/net/mlx4/eq.c index bffb7995cb70..7365bf488b81 100644 --- a/drivers/net/mlx4/eq.c +++ b/drivers/net/mlx4/eq.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/mm.h> | 36 | #include <linux/mm.h> |
36 | #include <linux/dma-mapping.h> | 37 | #include <linux/dma-mapping.h> |
37 | 38 | ||
diff --git a/drivers/net/mlx4/icm.c b/drivers/net/mlx4/icm.c index 04b382fcb8c8..57288ca1395f 100644 --- a/drivers/net/mlx4/icm.c +++ b/drivers/net/mlx4/icm.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/mm.h> | 35 | #include <linux/mm.h> |
36 | #include <linux/scatterlist.h> | 36 | #include <linux/scatterlist.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include <linux/mlx4/cmd.h> | 39 | #include <linux/mlx4/cmd.h> |
39 | 40 | ||
diff --git a/drivers/net/mlx4/intf.c b/drivers/net/mlx4/intf.c index 0e7eb1038f9f..555067802751 100644 --- a/drivers/net/mlx4/intf.c +++ b/drivers/net/mlx4/intf.c | |||
@@ -31,6 +31,8 @@ | |||
31 | * SOFTWARE. | 31 | * SOFTWARE. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/slab.h> | ||
35 | |||
34 | #include "mlx4.h" | 36 | #include "mlx4.h" |
35 | 37 | ||
36 | struct mlx4_device_context { | 38 | struct mlx4_device_context { |
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index b402a95c87c7..e3e0d54a7c87 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
39 | #include <linux/pci.h> | 39 | #include <linux/pci.h> |
40 | #include <linux/dma-mapping.h> | 40 | #include <linux/dma-mapping.h> |
41 | #include <linux/slab.h> | ||
41 | 42 | ||
42 | #include <linux/mlx4/device.h> | 43 | #include <linux/mlx4/device.h> |
43 | #include <linux/mlx4/doorbell.h> | 44 | #include <linux/mlx4/doorbell.h> |
diff --git a/drivers/net/mlx4/mcg.c b/drivers/net/mlx4/mcg.c index 5ccbce9866fe..c4f88b7ef7b6 100644 --- a/drivers/net/mlx4/mcg.c +++ b/drivers/net/mlx4/mcg.c | |||
@@ -32,7 +32,6 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/string.h> | 34 | #include <linux/string.h> |
35 | #include <linux/slab.h> | ||
36 | 35 | ||
37 | #include <linux/mlx4/cmd.h> | 36 | #include <linux/mlx4/cmd.h> |
38 | 37 | ||
diff --git a/drivers/net/mlx4/mr.c b/drivers/net/mlx4/mr.c index ca7ab8e7b4cc..3dc69be4949f 100644 --- a/drivers/net/mlx4/mr.c +++ b/drivers/net/mlx4/mr.c | |||
@@ -33,6 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/errno.h> | 35 | #include <linux/errno.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <linux/mlx4/cmd.h> | 38 | #include <linux/mlx4/cmd.h> |
38 | 39 | ||
diff --git a/drivers/net/mlx4/profile.c b/drivers/net/mlx4/profile.c index ca25b9dc8378..5caf0115fa5b 100644 --- a/drivers/net/mlx4/profile.c +++ b/drivers/net/mlx4/profile.c | |||
@@ -32,6 +32,8 @@ | |||
32 | * SOFTWARE. | 32 | * SOFTWARE. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/slab.h> | ||
36 | |||
35 | #include "mlx4.h" | 37 | #include "mlx4.h" |
36 | #include "fw.h" | 38 | #include "fw.h" |
37 | 39 | ||
diff --git a/drivers/net/mlx4/qp.c b/drivers/net/mlx4/qp.c index 42ab9fc01d3e..ec9350e5f21a 100644 --- a/drivers/net/mlx4/qp.c +++ b/drivers/net/mlx4/qp.c | |||
@@ -33,6 +33,7 @@ | |||
33 | * SOFTWARE. | 33 | * SOFTWARE. |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/gfp.h> | ||
36 | #include <linux/mlx4/cmd.h> | 37 | #include <linux/mlx4/cmd.h> |
37 | #include <linux/mlx4/qp.h> | 38 | #include <linux/mlx4/qp.h> |
38 | 39 | ||
diff --git a/drivers/net/mlx4/srq.c b/drivers/net/mlx4/srq.c index 1377d0dc8f1f..3b07b80a0456 100644 --- a/drivers/net/mlx4/srq.c +++ b/drivers/net/mlx4/srq.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/mlx4/cmd.h> | 34 | #include <linux/mlx4/cmd.h> |
35 | #include <linux/gfp.h> | ||
35 | 36 | ||
36 | #include "mlx4.h" | 37 | #include "mlx4.h" |
37 | #include "icm.h" | 38 | #include "icm.h" |
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index d5ebe43b0e65..4ee9d04f6599 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -54,6 +54,7 @@ | |||
54 | #include <linux/io.h> | 54 | #include <linux/io.h> |
55 | #include <linux/types.h> | 55 | #include <linux/types.h> |
56 | #include <linux/inet_lro.h> | 56 | #include <linux/inet_lro.h> |
57 | #include <linux/slab.h> | ||
57 | #include <asm/system.h> | 58 | #include <asm/system.h> |
58 | 59 | ||
59 | static char mv643xx_eth_driver_name[] = "mv643xx_eth"; | 60 | static char mv643xx_eth_driver_name[] = "mv643xx_eth"; |
diff --git a/drivers/net/mvme147.c b/drivers/net/mvme147.c index 93c709d63e2f..3a7ad840d5b5 100644 --- a/drivers/net/mvme147.c +++ b/drivers/net/mvme147.c | |||
@@ -10,11 +10,11 @@ | |||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/ioport.h> | 12 | #include <linux/ioport.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/string.h> | 13 | #include <linux/string.h> |
15 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/gfp.h> | ||
18 | /* Used for the temporal inet entries and routing */ | 18 | /* Used for the temporal inet entries and routing */ |
19 | #include <linux/socket.h> | 19 | #include <linux/socket.h> |
20 | #include <linux/route.h> | 20 | #include <linux/route.h> |
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 6d33adf988dc..72b4b19e14e7 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -64,6 +64,7 @@ | |||
64 | #include <linux/moduleparam.h> | 64 | #include <linux/moduleparam.h> |
65 | #include <linux/io.h> | 65 | #include <linux/io.h> |
66 | #include <linux/log2.h> | 66 | #include <linux/log2.h> |
67 | #include <linux/slab.h> | ||
67 | #include <net/checksum.h> | 68 | #include <net/checksum.h> |
68 | #include <net/ip.h> | 69 | #include <net/ip.h> |
69 | #include <net/tcp.h> | 70 | #include <net/tcp.h> |
@@ -1689,7 +1690,7 @@ myri10ge_set_pauseparam(struct net_device *netdev, | |||
1689 | if (pause->tx_pause != mgp->pause) | 1690 | if (pause->tx_pause != mgp->pause) |
1690 | return myri10ge_change_pause(mgp, pause->tx_pause); | 1691 | return myri10ge_change_pause(mgp, pause->tx_pause); |
1691 | if (pause->rx_pause != mgp->pause) | 1692 | if (pause->rx_pause != mgp->pause) |
1692 | return myri10ge_change_pause(mgp, pause->tx_pause); | 1693 | return myri10ge_change_pause(mgp, pause->rx_pause); |
1693 | if (pause->autoneg != 0) | 1694 | if (pause->autoneg != 0) |
1694 | return -EINVAL; | 1695 | return -EINVAL; |
1695 | return 0; | 1696 | return 0; |
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index 8b4313085359..b72e749afdf1 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
@@ -14,7 +14,6 @@ static char version[] = | |||
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/ioport.h> | 15 | #include <linux/ioport.h> |
16 | #include <linux/in.h> | 16 | #include <linux/in.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/string.h> | 17 | #include <linux/string.h> |
19 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
20 | #include <linux/init.h> | 19 | #include <linux/init.h> |
@@ -26,6 +25,7 @@ static char version[] = | |||
26 | #include <linux/of.h> | 25 | #include <linux/of.h> |
27 | #include <linux/of_device.h> | 26 | #include <linux/of_device.h> |
28 | #include <linux/firmware.h> | 27 | #include <linux/firmware.h> |
28 | #include <linux/gfp.h> | ||
29 | 29 | ||
30 | #include <net/dst.h> | 30 | #include <net/dst.h> |
31 | #include <net/arp.h> | 31 | #include <net/arp.h> |
diff --git a/drivers/net/ne2.c b/drivers/net/ne2.c index a53bb201d3c7..ff3c4c814988 100644 --- a/drivers/net/ne2.c +++ b/drivers/net/ne2.c | |||
@@ -66,7 +66,6 @@ static const char *version = "ne2.c:v0.91 Nov 16 1998 Wim Dumon <wimpie@kotnet.o | |||
66 | #include <linux/interrupt.h> | 66 | #include <linux/interrupt.h> |
67 | #include <linux/ioport.h> | 67 | #include <linux/ioport.h> |
68 | #include <linux/in.h> | 68 | #include <linux/in.h> |
69 | #include <linux/slab.h> | ||
70 | #include <linux/string.h> | 69 | #include <linux/string.h> |
71 | #include <linux/errno.h> | 70 | #include <linux/errno.h> |
72 | #include <linux/init.h> | 71 | #include <linux/init.h> |
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index bf4af5248cb7..a361dea35574 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/mm.h> | 37 | #include <linux/mm.h> |
38 | #include <linux/init.h> | 38 | #include <linux/init.h> |
39 | #include <linux/module.h> | 39 | #include <linux/module.h> |
40 | #include <linux/slab.h> | ||
40 | #include <linux/console.h> | 41 | #include <linux/console.h> |
41 | #include <linux/moduleparam.h> | 42 | #include <linux/moduleparam.h> |
42 | #include <linux/string.h> | 43 | #include <linux/string.h> |
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 781ca893ee0a..5e5fe2fd6397 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/slab.h> | ||
26 | #include "netxen_nic.h" | 27 | #include "netxen_nic.h" |
27 | #include "netxen_nic_hw.h" | 28 | #include "netxen_nic_hw.h" |
28 | 29 | ||
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index ecb6eed1d8e2..388feaf60ee7 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/netdevice.h> | 26 | #include <linux/netdevice.h> |
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/slab.h> | ||
28 | #include "netxen_nic.h" | 29 | #include "netxen_nic.h" |
29 | #include "netxen_nic_hw.h" | 30 | #include "netxen_nic_hw.h" |
30 | 31 | ||
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 9e82061c0235..b665b420a4f2 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/slab.h> | ||
26 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
27 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
28 | #include "netxen_nic_hw.h" | 29 | #include "netxen_nic_hw.h" |
diff --git a/drivers/net/ni5010.c b/drivers/net/ni5010.c index c16cbfb4061b..3892330f244a 100644 --- a/drivers/net/ni5010.c +++ b/drivers/net/ni5010.c | |||
@@ -51,7 +51,6 @@ | |||
51 | #include <linux/string.h> | 51 | #include <linux/string.h> |
52 | #include <linux/errno.h> | 52 | #include <linux/errno.h> |
53 | #include <linux/ioport.h> | 53 | #include <linux/ioport.h> |
54 | #include <linux/slab.h> | ||
55 | #include <linux/interrupt.h> | 54 | #include <linux/interrupt.h> |
56 | #include <linux/delay.h> | 55 | #include <linux/delay.h> |
57 | #include <linux/init.h> | 56 | #include <linux/init.h> |
diff --git a/drivers/net/ni52.c b/drivers/net/ni52.c index a76fabe26292..b7837ebd9a7d 100644 --- a/drivers/net/ni52.c +++ b/drivers/net/ni52.c | |||
@@ -109,7 +109,6 @@ static int fifo = 0x8; /* don't change */ | |||
109 | #include <linux/string.h> | 109 | #include <linux/string.h> |
110 | #include <linux/errno.h> | 110 | #include <linux/errno.h> |
111 | #include <linux/ioport.h> | 111 | #include <linux/ioport.h> |
112 | #include <linux/slab.h> | ||
113 | #include <linux/interrupt.h> | 112 | #include <linux/interrupt.h> |
114 | #include <linux/delay.h> | 113 | #include <linux/delay.h> |
115 | #include <linux/init.h> | 114 | #include <linux/init.h> |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 7b52c466cf48..ef940226ee22 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/jiffies.h> | 25 | #include <linux/jiffies.h> |
26 | #include <linux/crc32.h> | 26 | #include <linux/crc32.h> |
27 | #include <linux/list.h> | 27 | #include <linux/list.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include <linux/io.h> | 30 | #include <linux/io.h> |
30 | 31 | ||
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index 8dd509c09bc8..e88e97cd1b10 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
@@ -116,6 +116,7 @@ | |||
116 | #include <linux/if_vlan.h> | 116 | #include <linux/if_vlan.h> |
117 | #include <linux/rtnetlink.h> | 117 | #include <linux/rtnetlink.h> |
118 | #include <linux/jiffies.h> | 118 | #include <linux/jiffies.h> |
119 | #include <linux/slab.h> | ||
119 | 120 | ||
120 | #include <asm/io.h> | 121 | #include <asm/io.h> |
121 | #include <asm/uaccess.h> | 122 | #include <asm/uaccess.h> |
diff --git a/drivers/net/octeon/octeon_mgmt.c b/drivers/net/octeon/octeon_mgmt.c index ee894ed35f7f..0e2ff1ec58e4 100644 --- a/drivers/net/octeon/octeon_mgmt.c +++ b/drivers/net/octeon/octeon_mgmt.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/netdevice.h> | 13 | #include <linux/netdevice.h> |
14 | #include <linux/etherdevice.h> | 14 | #include <linux/etherdevice.h> |
15 | #include <linux/if_vlan.h> | 15 | #include <linux/if_vlan.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/phy.h> | 17 | #include <linux/phy.h> |
17 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
18 | 19 | ||
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index d44d4a208bbf..370c147d08a3 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
24 | #include <linux/dmaengine.h> | 25 | #include <linux/dmaengine.h> |
25 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 333cb3344d54..70fc9591821f 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/ptrace.h> | 30 | #include <linux/ptrace.h> |
31 | #include <linux/slab.h> | ||
32 | #include <linux/string.h> | 31 | #include <linux/string.h> |
33 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
34 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 1028fcb91a28..4c0368de1815 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | #include <linux/ptrace.h> | 34 | #include <linux/ptrace.h> |
35 | #include <linux/slab.h> | ||
36 | #include <linux/string.h> | 35 | #include <linux/string.h> |
37 | #include <linux/timer.h> | 36 | #include <linux/timer.h> |
38 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
diff --git a/drivers/net/phy/cicada.c b/drivers/net/phy/cicada.c index efc608f35d10..1a325d63756b 100644 --- a/drivers/net/phy/cicada.c +++ b/drivers/net/phy/cicada.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/unistd.h> | 19 | #include <linux/unistd.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
22 | #include <linux/init.h> | 21 | #include <linux/init.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/net/phy/davicom.c b/drivers/net/phy/davicom.c index e02b18cb0d30..29c17617a2ec 100644 --- a/drivers/net/phy/davicom.c +++ b/drivers/net/phy/davicom.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/unistd.h> | 19 | #include <linux/unistd.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
22 | #include <linux/init.h> | 21 | #include <linux/init.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/net/phy/et1011c.c b/drivers/net/phy/et1011c.c index 500f0fd2c138..13995f52d6af 100644 --- a/drivers/net/phy/et1011c.c +++ b/drivers/net/phy/et1011c.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/unistd.h> | 19 | #include <linux/unistd.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
22 | #include <linux/init.h> | 21 | #include <linux/init.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c index e7070515d2e3..1fa4d73c3cca 100644 --- a/drivers/net/phy/fixed.c +++ b/drivers/net/phy/fixed.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/phy.h> | 20 | #include <linux/phy.h> |
21 | #include <linux/phy_fixed.h> | 21 | #include <linux/phy_fixed.h> |
22 | #include <linux/err.h> | 22 | #include <linux/err.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #define MII_REGS_NUM 29 | 25 | #define MII_REGS_NUM 29 |
25 | 26 | ||
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c index e661e9078a7d..439adafeacb1 100644 --- a/drivers/net/phy/icplus.c +++ b/drivers/net/phy/icplus.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/string.h> | 13 | #include <linux/string.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/unistd.h> | 15 | #include <linux/unistd.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
19 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c index 1d94f1d610e4..8ee929b796d8 100644 --- a/drivers/net/phy/lxt.c +++ b/drivers/net/phy/lxt.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/unistd.h> | 19 | #include <linux/unistd.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
22 | #include <linux/init.h> | 21 | #include <linux/init.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index c7e5b9f12861..78b74e83ce5d 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/unistd.h> | 19 | #include <linux/unistd.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
22 | #include <linux/init.h> | 21 | #include <linux/init.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/net/phy/mdio-bitbang.c b/drivers/net/phy/mdio-bitbang.c index 0ff06617a4ab..65391891d8c4 100644 --- a/drivers/net/phy/mdio-bitbang.c +++ b/drivers/net/phy/mdio-bitbang.c | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/mdio-bitbang.h> | 21 | #include <linux/mdio-bitbang.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
25 | 24 | ||
diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c index 61a4461cbda5..a872aea4ed74 100644 --- a/drivers/net/phy/mdio-octeon.c +++ b/drivers/net/phy/mdio-octeon.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Copyright (C) 2009 Cavium Networks | 6 | * Copyright (C) 2009 Cavium Networks |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/gfp.h> | ||
9 | #include <linux/init.h> | 10 | #include <linux/init.h> |
10 | #include <linux/module.h> | 11 | #include <linux/module.h> |
11 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 0295097d6c44..64be4664ccab 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/string.h> | 19 | #include <linux/string.h> |
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/unistd.h> | 21 | #include <linux/unistd.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
25 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
diff --git a/drivers/net/phy/qsemi.c b/drivers/net/phy/qsemi.c index 3ec9610ee520..6736b23f1b28 100644 --- a/drivers/net/phy/qsemi.c +++ b/drivers/net/phy/qsemi.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/unistd.h> | 19 | #include <linux/unistd.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
22 | #include <linux/init.h> | 21 | #include <linux/init.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/net/plip.c b/drivers/net/plip.c index 3327e9fc7b51..9a2103a69e17 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c | |||
@@ -94,6 +94,7 @@ static const char version[] = "NET3 PLIP version 2.4-parport gniibe@mri.co.jp\n" | |||
94 | #include <linux/fcntl.h> | 94 | #include <linux/fcntl.h> |
95 | #include <linux/interrupt.h> | 95 | #include <linux/interrupt.h> |
96 | #include <linux/string.h> | 96 | #include <linux/string.h> |
97 | #include <linux/slab.h> | ||
97 | #include <linux/if_ether.h> | 98 | #include <linux/if_ether.h> |
98 | #include <linux/in.h> | 99 | #include <linux/in.h> |
99 | #include <linux/errno.h> | 100 | #include <linux/errno.h> |
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c index 6a375ea4947d..6c2e8fa0ca31 100644 --- a/drivers/net/ppp_async.c +++ b/drivers/net/ppp_async.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/spinlock.h> | 31 | #include <linux/spinlock.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/jiffies.h> | 33 | #include <linux/jiffies.h> |
34 | #include <linux/slab.h> | ||
34 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
35 | #include <asm/string.h> | 36 | #include <asm/string.h> |
36 | 37 | ||
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 8a0dd8a843a9..35f195329fdd 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/stddef.h> | 46 | #include <linux/stddef.h> |
47 | #include <linux/device.h> | 47 | #include <linux/device.h> |
48 | #include <linux/mutex.h> | 48 | #include <linux/mutex.h> |
49 | #include <linux/slab.h> | ||
49 | #include <net/slhc_vj.h> | 50 | #include <net/slhc_vj.h> |
50 | #include <asm/atomic.h> | 51 | #include <asm/atomic.h> |
51 | 52 | ||
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c index 3a13cecae3e2..52938da1e542 100644 --- a/drivers/net/ppp_synctty.c +++ b/drivers/net/ppp_synctty.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/spinlock.h> | 44 | #include <linux/spinlock.h> |
45 | #include <linux/completion.h> | 45 | #include <linux/completion.h> |
46 | #include <linux/init.h> | 46 | #include <linux/init.h> |
47 | #include <linux/slab.h> | ||
47 | #include <asm/uaccess.h> | 48 | #include <asm/uaccess.h> |
48 | 49 | ||
49 | #define PPP_VERSION "2.4.2" | 50 | #define PPP_VERSION "2.4.2" |
diff --git a/drivers/net/pppox.c b/drivers/net/pppox.c index ac806b27c658..d4191ef9cad1 100644 --- a/drivers/net/pppox.c +++ b/drivers/net/pppox.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/slab.h> | ||
26 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
27 | #include <linux/netdevice.h> | 26 | #include <linux/netdevice.h> |
28 | #include <linux/net.h> | 27 | #include <linux/net.h> |
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c index fed5df9c5ea1..022317db4673 100644 --- a/drivers/net/ps3_gelic_net.c +++ b/drivers/net/ps3_gelic_net.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include <linux/etherdevice.h> | 35 | #include <linux/etherdevice.h> |
35 | #include <linux/ethtool.h> | 36 | #include <linux/ethtool.h> |
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c index a9153a3481e1..d4ff627c6f7a 100644 --- a/drivers/net/ps3_gelic_wireless.c +++ b/drivers/net/ps3_gelic_wireless.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <linux/etherdevice.h> | 26 | #include <linux/etherdevice.h> |
26 | #include <linux/ethtool.h> | 27 | #include <linux/ethtool.h> |
diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c index 9a1daa4ebe22..7a72b8d06bcb 100644 --- a/drivers/net/qlcnic/qlcnic_hw.c +++ b/drivers/net/qlcnic/qlcnic_hw.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include "qlcnic.h" | 25 | #include "qlcnic.h" |
26 | 26 | ||
27 | #include <linux/slab.h> | ||
27 | #include <net/ip.h> | 28 | #include <net/ip.h> |
28 | 29 | ||
29 | #define MASK(n) ((1ULL<<(n))-1) | 30 | #define MASK(n) ((1ULL<<(n))-1) |
@@ -419,6 +420,9 @@ void qlcnic_set_multi(struct net_device *netdev) | |||
419 | u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; | 420 | u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; |
420 | u32 mode = VPORT_MISS_MODE_DROP; | 421 | u32 mode = VPORT_MISS_MODE_DROP; |
421 | 422 | ||
423 | if (adapter->is_up != QLCNIC_ADAPTER_UP_MAGIC) | ||
424 | return; | ||
425 | |||
422 | qlcnic_nic_add_mac(adapter, adapter->mac_addr); | 426 | qlcnic_nic_add_mac(adapter, adapter->mac_addr); |
423 | qlcnic_nic_add_mac(adapter, bcast_addr); | 427 | qlcnic_nic_add_mac(adapter, bcast_addr); |
424 | 428 | ||
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c index 89c64e8ec849..01ce74ee99f9 100644 --- a/drivers/net/qlcnic/qlcnic_init.c +++ b/drivers/net/qlcnic/qlcnic_init.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/slab.h> | ||
27 | #include "qlcnic.h" | 28 | #include "qlcnic.h" |
28 | 29 | ||
29 | struct crb_addr_pair { | 30 | struct crb_addr_pair { |
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 7ae464085b0d..e4fd5dcdfb4c 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c | |||
@@ -22,6 +22,7 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/slab.h> | ||
25 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
26 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
27 | 28 | ||
diff --git a/drivers/net/qlge/qlge_dbg.c b/drivers/net/qlge/qlge_dbg.c index 947a7aa2400e..68a1c9b91e74 100644 --- a/drivers/net/qlge/qlge_dbg.c +++ b/drivers/net/qlge/qlge_dbg.c | |||
@@ -1,3 +1,5 @@ | |||
1 | #include <linux/slab.h> | ||
2 | |||
1 | #include "qlge.h" | 3 | #include "qlge.h" |
2 | 4 | ||
3 | /* Read a NIC register from the alternate function. */ | 5 | /* Read a NIC register from the alternate function. */ |
diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c index 7dbff87480dc..7e09ff4a5755 100644 --- a/drivers/net/qlge/qlge_ethtool.c +++ b/drivers/net/qlge/qlge_ethtool.c | |||
@@ -7,7 +7,6 @@ | |||
7 | #include <linux/dma-mapping.h> | 7 | #include <linux/dma-mapping.h> |
8 | #include <linux/pagemap.h> | 8 | #include <linux/pagemap.h> |
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/slab.h> | ||
11 | #include <linux/dmapool.h> | 10 | #include <linux/dmapool.h> |
12 | #include <linux/mempool.h> | 11 | #include <linux/mempool.h> |
13 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index f5a0e963e688..467fe3b955e0 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/timer.h> | 29 | #include <linux/timer.h> |
30 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
31 | #include <linux/ioport.h> | 31 | #include <linux/ioport.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
34 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
35 | #include <linux/netdevice.h> | 34 | #include <linux/netdevice.h> |
@@ -135,7 +134,7 @@ | |||
135 | #define RX_DESC_SIZE (RX_DCNT * sizeof(struct r6040_descriptor)) | 134 | #define RX_DESC_SIZE (RX_DCNT * sizeof(struct r6040_descriptor)) |
136 | #define TX_DESC_SIZE (TX_DCNT * sizeof(struct r6040_descriptor)) | 135 | #define TX_DESC_SIZE (TX_DCNT * sizeof(struct r6040_descriptor)) |
137 | #define MBCR_DEFAULT 0x012A /* MAC Bus Control Register */ | 136 | #define MBCR_DEFAULT 0x012A /* MAC Bus Control Register */ |
138 | #define MCAST_MAX 4 /* Max number multicast addresses to filter */ | 137 | #define MCAST_MAX 3 /* Max number multicast addresses to filter */ |
139 | 138 | ||
140 | /* Descriptor status */ | 139 | /* Descriptor status */ |
141 | #define DSC_OWNER_MAC 0x8000 /* MAC is the owner of this descriptor */ | 140 | #define DSC_OWNER_MAC 0x8000 /* MAC is the owner of this descriptor */ |
@@ -983,9 +982,6 @@ static void r6040_multicast_list(struct net_device *dev) | |||
983 | crc >>= 26; | 982 | crc >>= 26; |
984 | hash_table[crc >> 4] |= 1 << (15 - (crc & 0xf)); | 983 | hash_table[crc >> 4] |= 1 << (15 - (crc & 0xf)); |
985 | } | 984 | } |
986 | /* Write the index of the hash table */ | ||
987 | for (i = 0; i < 4; i++) | ||
988 | iowrite16(hash_table[i] << 14, ioaddr + MCR1); | ||
989 | /* Fill the MAC hash tables with their values */ | 985 | /* Fill the MAC hash tables with their values */ |
990 | iowrite16(hash_table[0], ioaddr + MAR0); | 986 | iowrite16(hash_table[0], ioaddr + MAR0); |
991 | iowrite16(hash_table[1], ioaddr + MAR1); | 987 | iowrite16(hash_table[1], ioaddr + MAR1); |
@@ -1001,9 +997,9 @@ static void r6040_multicast_list(struct net_device *dev) | |||
1001 | iowrite16(adrp[1], ioaddr + MID_1M + 8 * i); | 997 | iowrite16(adrp[1], ioaddr + MID_1M + 8 * i); |
1002 | iowrite16(adrp[2], ioaddr + MID_1H + 8 * i); | 998 | iowrite16(adrp[2], ioaddr + MID_1H + 8 * i); |
1003 | } else { | 999 | } else { |
1004 | iowrite16(0xffff, ioaddr + MID_0L + 8 * i); | 1000 | iowrite16(0xffff, ioaddr + MID_1L + 8 * i); |
1005 | iowrite16(0xffff, ioaddr + MID_0M + 8 * i); | 1001 | iowrite16(0xffff, ioaddr + MID_1M + 8 * i); |
1006 | iowrite16(0xffff, ioaddr + MID_0H + 8 * i); | 1002 | iowrite16(0xffff, ioaddr + MID_1H + 8 * i); |
1007 | } | 1003 | } |
1008 | i++; | 1004 | i++; |
1009 | } | 1005 | } |
diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c index ede937ee50c7..07eb884ff982 100644 --- a/drivers/net/rionet.c +++ b/drivers/net/rionet.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/rio.h> | 17 | #include <linux/rio.h> |
18 | #include <linux/rio_drv.h> | 18 | #include <linux/rio_drv.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/rio_ids.h> | 20 | #include <linux/rio_ids.h> |
20 | 21 | ||
21 | #include <linux/netdevice.h> | 22 | #include <linux/netdevice.h> |
diff --git a/drivers/net/rrunner.c b/drivers/net/rrunner.c index 266baf534964..f2e335f0d1b7 100644 --- a/drivers/net/rrunner.c +++ b/drivers/net/rrunner.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/init.h> | 40 | #include <linux/init.h> |
41 | #include <linux/delay.h> | 41 | #include <linux/delay.h> |
42 | #include <linux/mm.h> | 42 | #include <linux/mm.h> |
43 | #include <linux/slab.h> | ||
43 | #include <net/sock.h> | 44 | #include <net/sock.h> |
44 | 45 | ||
45 | #include <asm/system.h> | 46 | #include <asm/system.h> |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index ad5a6a873b29..bab0061f30f1 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -79,6 +79,7 @@ | |||
79 | #include <linux/tcp.h> | 79 | #include <linux/tcp.h> |
80 | #include <linux/uaccess.h> | 80 | #include <linux/uaccess.h> |
81 | #include <linux/io.h> | 81 | #include <linux/io.h> |
82 | #include <linux/slab.h> | ||
82 | #include <net/tcp.h> | 83 | #include <net/tcp.h> |
83 | 84 | ||
84 | #include <asm/system.h> | 85 | #include <asm/system.h> |
diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c index 9f83a1197375..abc8eefdd4b6 100644 --- a/drivers/net/sb1000.c +++ b/drivers/net/sb1000.c | |||
@@ -42,7 +42,6 @@ static char version[] = "sb1000.c:v1.1.2 6/01/98 (fventuri@mediaone.net)\n"; | |||
42 | #include <linux/errno.h> | 42 | #include <linux/errno.h> |
43 | #include <linux/if_cablemodem.h> /* for SIOGCM/SIOSCM stuff */ | 43 | #include <linux/if_cablemodem.h> /* for SIOGCM/SIOSCM stuff */ |
44 | #include <linux/in.h> | 44 | #include <linux/in.h> |
45 | #include <linux/slab.h> | ||
46 | #include <linux/ioport.h> | 45 | #include <linux/ioport.h> |
47 | #include <linux/netdevice.h> | 46 | #include <linux/netdevice.h> |
48 | #include <linux/if_arp.h> | 47 | #include <linux/if_arp.h> |
@@ -52,6 +51,7 @@ static char version[] = "sb1000.c:v1.1.2 6/01/98 (fventuri@mediaone.net)\n"; | |||
52 | #include <linux/pnp.h> | 51 | #include <linux/pnp.h> |
53 | #include <linux/init.h> | 52 | #include <linux/init.h> |
54 | #include <linux/bitops.h> | 53 | #include <linux/bitops.h> |
54 | #include <linux/gfp.h> | ||
55 | 55 | ||
56 | #include <asm/io.h> | 56 | #include <asm/io.h> |
57 | #include <asm/processor.h> | 57 | #include <asm/processor.h> |
diff --git a/drivers/net/seeq8005.c b/drivers/net/seeq8005.c index fe806bd9b95f..374832cca11f 100644 --- a/drivers/net/seeq8005.c +++ b/drivers/net/seeq8005.c | |||
@@ -37,7 +37,6 @@ static const char version[] = | |||
37 | #include <linux/interrupt.h> | 37 | #include <linux/interrupt.h> |
38 | #include <linux/ioport.h> | 38 | #include <linux/ioport.h> |
39 | #include <linux/in.h> | 39 | #include <linux/in.h> |
40 | #include <linux/slab.h> | ||
41 | #include <linux/string.h> | 40 | #include <linux/string.h> |
42 | #include <linux/init.h> | 41 | #include <linux/init.h> |
43 | #include <linux/delay.h> | 42 | #include <linux/delay.h> |
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index e07b82b266d9..1ad61b7bba40 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/crc32.h> | 20 | #include <linux/crc32.h> |
21 | #include <linux/ethtool.h> | 21 | #include <linux/ethtool.h> |
22 | #include <linux/topology.h> | 22 | #include <linux/topology.h> |
23 | #include <linux/gfp.h> | ||
23 | #include "net_driver.h" | 24 | #include "net_driver.h" |
24 | #include "efx.h" | 25 | #include "efx.h" |
25 | #include "mdio_10g.h" | 26 | #include "mdio_10g.h" |
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 1b8d83657aaa..d294d66fd600 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/seq_file.h> | 15 | #include <linux/seq_file.h> |
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/mii.h> | 17 | #include <linux/mii.h> |
18 | #include <linux/slab.h> | ||
18 | #include "net_driver.h" | 19 | #include "net_driver.h" |
19 | #include "bitfield.h" | 20 | #include "bitfield.h" |
20 | #include "efx.h" | 21 | #include "efx.h" |
diff --git a/drivers/net/sfc/mcdi_phy.c b/drivers/net/sfc/mcdi_phy.c index 34c22fa986e2..2f2354696663 100644 --- a/drivers/net/sfc/mcdi_phy.c +++ b/drivers/net/sfc/mcdi_phy.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * Driver for PHY related operations via MCDI. | 11 | * Driver for PHY related operations via MCDI. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/slab.h> | ||
14 | #include "efx.h" | 15 | #include "efx.h" |
15 | #include "phy.h" | 16 | #include "phy.h" |
16 | #include "mcdi.h" | 17 | #include "mcdi.h" |
diff --git a/drivers/net/sfc/mtd.c b/drivers/net/sfc/mtd.c index 407bbaddfea6..f3ac7f30b5e7 100644 --- a/drivers/net/sfc/mtd.c +++ b/drivers/net/sfc/mtd.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/mtd/mtd.h> | 13 | #include <linux/mtd/mtd.h> |
14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/rtnetlink.h> | 16 | #include <linux/rtnetlink.h> |
16 | 17 | ||
17 | #define EFX_DRIVER_NAME "sfc_mtd" | 18 | #define EFX_DRIVER_NAME "sfc_mtd" |
diff --git a/drivers/net/sfc/qt202x_phy.c b/drivers/net/sfc/qt202x_phy.c index 1bee62c83001..e077bef08a50 100644 --- a/drivers/net/sfc/qt202x_phy.c +++ b/drivers/net/sfc/qt202x_phy.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * Driver for AMCC QT202x SFP+ and XFP adapters; see www.amcc.com for details | 10 | * Driver for AMCC QT202x SFP+ and XFP adapters; see www.amcc.com for details |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/slab.h> | ||
13 | #include <linux/timer.h> | 14 | #include <linux/timer.h> |
14 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
15 | #include "efx.h" | 16 | #include "efx.h" |
diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c index a97c923b560c..e308818b9f55 100644 --- a/drivers/net/sfc/rx.c +++ b/drivers/net/sfc/rx.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/socket.h> | 11 | #include <linux/socket.h> |
12 | #include <linux/in.h> | 12 | #include <linux/in.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/ip.h> | 14 | #include <linux/ip.h> |
14 | #include <linux/tcp.h> | 15 | #include <linux/tcp.h> |
15 | #include <linux/udp.h> | 16 | #include <linux/udp.h> |
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c index cf0139a7d9a4..0106b1d9aae2 100644 --- a/drivers/net/sfc/selftest.c +++ b/drivers/net/sfc/selftest.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/in.h> | 18 | #include <linux/in.h> |
19 | #include <linux/udp.h> | 19 | #include <linux/udp.h> |
20 | #include <linux/rtnetlink.h> | 20 | #include <linux/rtnetlink.h> |
21 | #include <linux/slab.h> | ||
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
22 | #include "net_driver.h" | 23 | #include "net_driver.h" |
23 | #include "efx.h" | 24 | #include "efx.h" |
diff --git a/drivers/net/sfc/siena.c b/drivers/net/sfc/siena.c index 1619fb5a64f5..38dcc42c4f79 100644 --- a/drivers/net/sfc/siena.c +++ b/drivers/net/sfc/siena.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include "net_driver.h" | 16 | #include "net_driver.h" |
16 | #include "bitfield.h" | 17 | #include "bitfield.h" |
17 | #include "efx.h" | 18 | #include "efx.h" |
diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c index 10db071bd837..f21efe7bd316 100644 --- a/drivers/net/sfc/tenxpress.c +++ b/drivers/net/sfc/tenxpress.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/delay.h> | 10 | #include <linux/delay.h> |
11 | #include <linux/rtnetlink.h> | 11 | #include <linux/rtnetlink.h> |
12 | #include <linux/seq_file.h> | 12 | #include <linux/seq_file.h> |
13 | #include <linux/slab.h> | ||
13 | #include "efx.h" | 14 | #include "efx.h" |
14 | #include "mdio_10g.h" | 15 | #include "mdio_10g.h" |
15 | #include "nic.h" | 16 | #include "nic.h" |
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c index a8b70ef6d817..be0e110a1f73 100644 --- a/drivers/net/sfc/tx.c +++ b/drivers/net/sfc/tx.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/ip.h> | 13 | #include <linux/ip.h> |
14 | #include <linux/in.h> | 14 | #include <linux/in.h> |
15 | #include <linux/ipv6.h> | 15 | #include <linux/ipv6.h> |
16 | #include <linux/slab.h> | ||
16 | #include <net/ipv6.h> | 17 | #include <net/ipv6.h> |
17 | #include <linux/if_ether.h> | 18 | #include <linux/if_ether.h> |
18 | #include <linux/highmem.h> | 19 | #include <linux/highmem.h> |
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c index 37f6a00cde17..c8fc896fc460 100644 --- a/drivers/net/sgiseeq.c +++ b/drivers/net/sgiseeq.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 42a35f086a9f..6242b85d5d15 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/cache.h> | 31 | #include <linux/cache.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/pm_runtime.h> | 33 | #include <linux/pm_runtime.h> |
34 | #include <linux/slab.h> | ||
34 | #include <asm/cacheflush.h> | 35 | #include <asm/cacheflush.h> |
35 | 36 | ||
36 | #include "sh_eth.h" | 37 | #include "sh_eth.h" |
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 6a05b93ae6c9..a5d6a6bd0c1a 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <linux/crc32.h> | 33 | #include <linux/crc32.h> |
34 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
35 | #include <linux/slab.h> | ||
35 | #include <asm/irq.h> | 36 | #include <asm/irq.h> |
36 | 37 | ||
37 | #define PHY_MAX_ADDR 32 | 38 | #define PHY_MAX_ADDR 32 |
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index 7e5b9f310fb2..7912606b0bc7 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c | |||
@@ -78,13 +78,13 @@ static const char * const boot_msg = | |||
78 | #include <linux/kernel.h> | 78 | #include <linux/kernel.h> |
79 | #include <linux/errno.h> | 79 | #include <linux/errno.h> |
80 | #include <linux/ioport.h> | 80 | #include <linux/ioport.h> |
81 | #include <linux/slab.h> | ||
82 | #include <linux/interrupt.h> | 81 | #include <linux/interrupt.h> |
83 | #include <linux/pci.h> | 82 | #include <linux/pci.h> |
84 | #include <linux/netdevice.h> | 83 | #include <linux/netdevice.h> |
85 | #include <linux/fddidevice.h> | 84 | #include <linux/fddidevice.h> |
86 | #include <linux/skbuff.h> | 85 | #include <linux/skbuff.h> |
87 | #include <linux/bitops.h> | 86 | #include <linux/bitops.h> |
87 | #include <linux/gfp.h> | ||
88 | 88 | ||
89 | #include <asm/byteorder.h> | 89 | #include <asm/byteorder.h> |
90 | #include <asm/io.h> | 90 | #include <asm/io.h> |
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index de5ef3877baf..96eee8666877 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/sched.h> | 42 | #include <linux/sched.h> |
43 | #include <linux/seq_file.h> | 43 | #include <linux/seq_file.h> |
44 | #include <linux/mii.h> | 44 | #include <linux/mii.h> |
45 | #include <linux/slab.h> | ||
45 | #include <asm/irq.h> | 46 | #include <asm/irq.h> |
46 | 47 | ||
47 | #include "skge.h" | 48 | #include "skge.h" |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 5b97edb7a35f..3a086d3a7cbf 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/ethtool.h> | 33 | #include <linux/ethtool.h> |
34 | #include <linux/pci.h> | 34 | #include <linux/pci.h> |
35 | #include <linux/ip.h> | 35 | #include <linux/ip.h> |
36 | #include <linux/slab.h> | ||
36 | #include <net/ip.h> | 37 | #include <net/ip.h> |
37 | #include <linux/tcp.h> | 38 | #include <linux/tcp.h> |
38 | #include <linux/in.h> | 39 | #include <linux/in.h> |
diff --git a/drivers/net/slhc.c b/drivers/net/slhc.c index d640c0f5470b..140d63f3cafa 100644 --- a/drivers/net/slhc.c +++ b/drivers/net/slhc.c | |||
@@ -51,6 +51,7 @@ | |||
51 | */ | 51 | */ |
52 | 52 | ||
53 | #include <linux/module.h> | 53 | #include <linux/module.h> |
54 | #include <linux/slab.h> | ||
54 | #include <linux/types.h> | 55 | #include <linux/types.h> |
55 | #include <linux/string.h> | 56 | #include <linux/string.h> |
56 | #include <linux/errno.h> | 57 | #include <linux/errno.h> |
diff --git a/drivers/net/slip.c b/drivers/net/slip.c index ba5bbc503446..89696156c059 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c | |||
@@ -83,6 +83,7 @@ | |||
83 | #include <linux/compat.h> | 83 | #include <linux/compat.h> |
84 | #include <linux/delay.h> | 84 | #include <linux/delay.h> |
85 | #include <linux/init.h> | 85 | #include <linux/init.h> |
86 | #include <linux/slab.h> | ||
86 | #include "slip.h" | 87 | #include "slip.h" |
87 | #ifdef CONFIG_INET | 88 | #ifdef CONFIG_INET |
88 | #include <linux/ip.h> | 89 | #include <linux/ip.h> |
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 6278734c735f..1e49fcfa28ab 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -59,7 +59,6 @@ static const char version[] = | |||
59 | #include <linux/module.h> | 59 | #include <linux/module.h> |
60 | #include <linux/kernel.h> | 60 | #include <linux/kernel.h> |
61 | #include <linux/sched.h> | 61 | #include <linux/sched.h> |
62 | #include <linux/slab.h> | ||
63 | #include <linux/delay.h> | 62 | #include <linux/delay.h> |
64 | #include <linux/interrupt.h> | 63 | #include <linux/interrupt.h> |
65 | #include <linux/errno.h> | 64 | #include <linux/errno.h> |
diff --git a/drivers/net/smc9194.c b/drivers/net/smc9194.c index 9e5e9e792e86..e94521cf70a1 100644 --- a/drivers/net/smc9194.c +++ b/drivers/net/smc9194.c | |||
@@ -64,7 +64,6 @@ static const char version[] = | |||
64 | #include <linux/interrupt.h> | 64 | #include <linux/interrupt.h> |
65 | #include <linux/ioport.h> | 65 | #include <linux/ioport.h> |
66 | #include <linux/in.h> | 66 | #include <linux/in.h> |
67 | #include <linux/slab.h> | ||
68 | #include <linux/string.h> | 67 | #include <linux/string.h> |
69 | #include <linux/init.h> | 68 | #include <linux/init.h> |
70 | #include <linux/crc32.h> | 69 | #include <linux/crc32.h> |
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index 20c756577631..682bc4fe604f 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -70,7 +70,6 @@ static const char version[] = | |||
70 | #include <linux/module.h> | 70 | #include <linux/module.h> |
71 | #include <linux/kernel.h> | 71 | #include <linux/kernel.h> |
72 | #include <linux/sched.h> | 72 | #include <linux/sched.h> |
73 | #include <linux/slab.h> | ||
74 | #include <linux/delay.h> | 73 | #include <linux/delay.h> |
75 | #include <linux/interrupt.h> | 74 | #include <linux/interrupt.h> |
76 | #include <linux/errno.h> | 75 | #include <linux/errno.h> |
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index d6e3a12d65d3..746fb91a0fb0 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <linux/netdevice.h> | 41 | #include <linux/netdevice.h> |
42 | #include <linux/platform_device.h> | 42 | #include <linux/platform_device.h> |
43 | #include <linux/sched.h> | 43 | #include <linux/sched.h> |
44 | #include <linux/slab.h> | ||
45 | #include <linux/timer.h> | 44 | #include <linux/timer.h> |
46 | #include <linux/bug.h> | 45 | #include <linux/bug.h> |
47 | #include <linux/bitops.h> | 46 | #include <linux/bitops.h> |
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c index 5409ec1a5fd7..ada05c452175 100644 --- a/drivers/net/smsc9420.c +++ b/drivers/net/smsc9420.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/if_vlan.h> | 26 | #include <linux/if_vlan.h> |
27 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
28 | #include <linux/crc32.h> | 28 | #include <linux/crc32.h> |
29 | #include <linux/slab.h> | ||
29 | #include <asm/unaligned.h> | 30 | #include <asm/unaligned.h> |
30 | #include "smsc9420.h" | 31 | #include "smsc9420.h" |
31 | 32 | ||
diff --git a/drivers/net/sni_82596.c b/drivers/net/sni_82596.c index 854ccf2b4105..6b2a88817473 100644 --- a/drivers/net/sni_82596.c +++ b/drivers/net/sni_82596.c | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <linux/string.h> | 8 | #include <linux/string.h> |
9 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
10 | #include <linux/ioport.h> | 10 | #include <linux/ioport.h> |
11 | #include <linux/slab.h> | ||
12 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
13 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
14 | #include <linux/netdevice.h> | 13 | #include <linux/netdevice.h> |
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index c04c8f9a2d96..3dff280b438b 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/if_vlan.h> | 31 | #include <linux/if_vlan.h> |
32 | #include <linux/in.h> | 32 | #include <linux/in.h> |
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | #include <linux/gfp.h> | ||
34 | #include <linux/ioport.h> | 35 | #include <linux/ioport.h> |
35 | #include <linux/ip.h> | 36 | #include <linux/ip.h> |
36 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
@@ -40,7 +41,6 @@ | |||
40 | #include <linux/device.h> | 41 | #include <linux/device.h> |
41 | #include <linux/pci.h> | 42 | #include <linux/pci.h> |
42 | #include <linux/skbuff.h> | 43 | #include <linux/skbuff.h> |
43 | #include <linux/slab.h> | ||
44 | #include <linux/tcp.h> | 44 | #include <linux/tcp.h> |
45 | #include <linux/types.h> | 45 | #include <linux/types.h> |
46 | #include <linux/vmalloc.h> | 46 | #include <linux/vmalloc.h> |
diff --git a/drivers/net/stmmac/dwmac100.c b/drivers/net/stmmac/dwmac100.c index c0a1c9df3ac7..1ca84eab289c 100644 --- a/drivers/net/stmmac/dwmac100.c +++ b/drivers/net/stmmac/dwmac100.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/crc32.h> | 29 | #include <linux/crc32.h> |
30 | #include <linux/mii.h> | 30 | #include <linux/mii.h> |
31 | #include <linux/phy.h> | 31 | #include <linux/phy.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include "common.h" | 34 | #include "common.h" |
34 | #include "dwmac100.h" | 35 | #include "dwmac100.h" |
diff --git a/drivers/net/stmmac/dwmac1000_core.c b/drivers/net/stmmac/dwmac1000_core.c index bf73fda6adfb..f9c7c1cbda93 100644 --- a/drivers/net/stmmac/dwmac1000_core.c +++ b/drivers/net/stmmac/dwmac1000_core.c | |||
@@ -27,6 +27,7 @@ | |||
27 | *******************************************************************************/ | 27 | *******************************************************************************/ |
28 | 28 | ||
29 | #include <linux/crc32.h> | 29 | #include <linux/crc32.h> |
30 | #include <linux/slab.h> | ||
30 | #include "dwmac1000.h" | 31 | #include "dwmac1000.h" |
31 | 32 | ||
32 | static void dwmac1000_core_init(unsigned long ioaddr) | 33 | static void dwmac1000_core_init(unsigned long ioaddr) |
diff --git a/drivers/net/stmmac/stmmac_main.c b/drivers/net/stmmac/stmmac_main.c index 963f591f1e0e..cc532ef28c8f 100644 --- a/drivers/net/stmmac/stmmac_main.c +++ b/drivers/net/stmmac/stmmac_main.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/phy.h> | 44 | #include <linux/phy.h> |
45 | #include <linux/if_vlan.h> | 45 | #include <linux/if_vlan.h> |
46 | #include <linux/dma-mapping.h> | 46 | #include <linux/dma-mapping.h> |
47 | #include <linux/slab.h> | ||
47 | #include "stmmac.h" | 48 | #include "stmmac.h" |
48 | 49 | ||
49 | #define STMMAC_RESOURCE_NAME "stmmaceth" | 50 | #define STMMAC_RESOURCE_NAME "stmmaceth" |
@@ -1685,7 +1686,8 @@ static int stmmac_dvr_probe(struct platform_device *pdev) | |||
1685 | } | 1686 | } |
1686 | pr_info("done!\n"); | 1687 | pr_info("done!\n"); |
1687 | 1688 | ||
1688 | if (!request_mem_region(res->start, resource_size(res), pdev->name)) { | 1689 | if (!request_mem_region(res->start, resource_size(res), |
1690 | pdev->name)) { | ||
1689 | pr_err("%s: ERROR: memory allocation failed" | 1691 | pr_err("%s: ERROR: memory allocation failed" |
1690 | "cannot get the I/O addr 0x%x\n", | 1692 | "cannot get the I/O addr 0x%x\n", |
1691 | __func__, (unsigned int)res->start); | 1693 | __func__, (unsigned int)res->start); |
diff --git a/drivers/net/stmmac/stmmac_mdio.c b/drivers/net/stmmac/stmmac_mdio.c index fffe1d037fe6..40b2c7929719 100644 --- a/drivers/net/stmmac/stmmac_mdio.c +++ b/drivers/net/stmmac/stmmac_mdio.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <linux/mii.h> | 27 | #include <linux/mii.h> |
28 | #include <linux/phy.h> | 28 | #include <linux/phy.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include "stmmac.h" | 31 | #include "stmmac.h" |
31 | 32 | ||
diff --git a/drivers/net/sun3_82586.c b/drivers/net/sun3_82586.c index 2cfa065c39c0..31ab4ab0796f 100644 --- a/drivers/net/sun3_82586.c +++ b/drivers/net/sun3_82586.c | |||
@@ -33,7 +33,6 @@ static int fifo=0x8; /* don't change */ | |||
33 | #include <linux/string.h> | 33 | #include <linux/string.h> |
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/ioport.h> | 35 | #include <linux/ioport.h> |
36 | #include <linux/slab.h> | ||
37 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
38 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
39 | #include <linux/init.h> | 38 | #include <linux/init.h> |
diff --git a/drivers/net/sun3lance.c b/drivers/net/sun3lance.c index 99998862c22e..1694ca5bfb41 100644 --- a/drivers/net/sun3lance.c +++ b/drivers/net/sun3lance.c | |||
@@ -28,7 +28,6 @@ static char *version = "sun3lance.c: v1.2 1/12/2001 Sam Creasey (sammy@sammy.ne | |||
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/string.h> | 29 | #include <linux/string.h> |
30 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
31 | #include <linux/slab.h> | ||
32 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
34 | #include <linux/ioport.h> | 33 | #include <linux/ioport.h> |
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c index 4dd159b4116b..52913155ce47 100644 --- a/drivers/net/sunbmac.c +++ b/drivers/net/sunbmac.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/ioport.h> | 12 | #include <linux/ioport.h> |
13 | #include <linux/in.h> | 13 | #include <linux/in.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/string.h> | 14 | #include <linux/string.h> |
16 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
@@ -25,6 +24,7 @@ | |||
25 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
26 | #include <linux/of.h> | 25 | #include <linux/of.h> |
27 | #include <linux/of_device.h> | 26 | #include <linux/of_device.h> |
27 | #include <linux/gfp.h> | ||
28 | 28 | ||
29 | #include <asm/auxio.h> | 29 | #include <asm/auxio.h> |
30 | #include <asm/byteorder.h> | 30 | #include <asm/byteorder.h> |
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c index 47e8cce10d1e..da45f01279c4 100644 --- a/drivers/net/sundance.c +++ b/drivers/net/sundance.c | |||
@@ -84,7 +84,6 @@ static char *media[MAX_UNITS]; | |||
84 | #include <linux/timer.h> | 84 | #include <linux/timer.h> |
85 | #include <linux/errno.h> | 85 | #include <linux/errno.h> |
86 | #include <linux/ioport.h> | 86 | #include <linux/ioport.h> |
87 | #include <linux/slab.h> | ||
88 | #include <linux/interrupt.h> | 87 | #include <linux/interrupt.h> |
89 | #include <linux/pci.h> | 88 | #include <linux/pci.h> |
90 | #include <linux/netdevice.h> | 89 | #include <linux/netdevice.h> |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 58a27541ae39..2b78e97ea9c0 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/ioport.h> | 39 | #include <linux/ioport.h> |
40 | #include <linux/in.h> | 40 | #include <linux/in.h> |
41 | #include <linux/sched.h> | 41 | #include <linux/sched.h> |
42 | #include <linux/slab.h> | ||
43 | #include <linux/string.h> | 42 | #include <linux/string.h> |
44 | #include <linux/delay.h> | 43 | #include <linux/delay.h> |
45 | #include <linux/init.h> | 44 | #include <linux/init.h> |
@@ -58,6 +57,7 @@ | |||
58 | #include <linux/bitops.h> | 57 | #include <linux/bitops.h> |
59 | #include <linux/mutex.h> | 58 | #include <linux/mutex.h> |
60 | #include <linux/mm.h> | 59 | #include <linux/mm.h> |
60 | #include <linux/gfp.h> | ||
61 | 61 | ||
62 | #include <asm/system.h> | 62 | #include <asm/system.h> |
63 | #include <asm/io.h> | 63 | #include <asm/io.h> |
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 674570584bd5..c7748b73fa09 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -78,7 +78,6 @@ static char lancestr[] = "LANCE"; | |||
78 | #include <linux/interrupt.h> | 78 | #include <linux/interrupt.h> |
79 | #include <linux/ioport.h> | 79 | #include <linux/ioport.h> |
80 | #include <linux/in.h> | 80 | #include <linux/in.h> |
81 | #include <linux/slab.h> | ||
82 | #include <linux/string.h> | 81 | #include <linux/string.h> |
83 | #include <linux/delay.h> | 82 | #include <linux/delay.h> |
84 | #include <linux/init.h> | 83 | #include <linux/init.h> |
@@ -94,6 +93,7 @@ static char lancestr[] = "LANCE"; | |||
94 | #include <linux/dma-mapping.h> | 93 | #include <linux/dma-mapping.h> |
95 | #include <linux/of.h> | 94 | #include <linux/of.h> |
96 | #include <linux/of_device.h> | 95 | #include <linux/of_device.h> |
96 | #include <linux/gfp.h> | ||
97 | 97 | ||
98 | #include <asm/system.h> | 98 | #include <asm/system.h> |
99 | #include <asm/io.h> | 99 | #include <asm/io.h> |
diff --git a/drivers/net/tehuti.h b/drivers/net/tehuti.h index a19dcf8b6b56..cff98d07cba8 100644 --- a/drivers/net/tehuti.h +++ b/drivers/net/tehuti.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/firmware.h> | 32 | #include <linux/firmware.h> |
33 | #include <asm/byteorder.h> | 33 | #include <asm/byteorder.h> |
34 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | /* Compile Time Switches */ | 37 | /* Compile Time Switches */ |
37 | /* start */ | 38 | /* start */ |
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index 4673e38c52a9..10800f16a231 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c | |||
@@ -63,6 +63,7 @@ | |||
63 | #include <linux/spinlock.h> | 63 | #include <linux/spinlock.h> |
64 | #include <linux/bitops.h> | 64 | #include <linux/bitops.h> |
65 | #include <linux/firmware.h> | 65 | #include <linux/firmware.h> |
66 | #include <linux/slab.h> | ||
66 | 67 | ||
67 | #include <net/checksum.h> | 68 | #include <net/checksum.h> |
68 | 69 | ||
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c index 88c893100c2b..5bd140704533 100644 --- a/drivers/net/tokenring/lanstreamer.c +++ b/drivers/net/tokenring/lanstreamer.c | |||
@@ -121,6 +121,7 @@ | |||
121 | #include <linux/spinlock.h> | 121 | #include <linux/spinlock.h> |
122 | #include <linux/bitops.h> | 122 | #include <linux/bitops.h> |
123 | #include <linux/jiffies.h> | 123 | #include <linux/jiffies.h> |
124 | #include <linux/slab.h> | ||
124 | 125 | ||
125 | #include <net/net_namespace.h> | 126 | #include <net/net_namespace.h> |
126 | #include <net/checksum.h> | 127 | #include <net/checksum.h> |
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c index 456f8bff40be..53f631ebb162 100644 --- a/drivers/net/tokenring/madgemc.c +++ b/drivers/net/tokenring/madgemc.c | |||
@@ -21,6 +21,7 @@ static const char version[] = "madgemc.c: v0.91 23/01/2000 by Adam Fritzler\n"; | |||
21 | 21 | ||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/mca.h> | 23 | #include <linux/mca.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
25 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
26 | #include <linux/init.h> | 27 | #include <linux/init.h> |
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c index 5401d86a7be4..e40560137c46 100644 --- a/drivers/net/tokenring/smctr.c +++ b/drivers/net/tokenring/smctr.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/ptrace.h> | 36 | #include <linux/ptrace.h> |
37 | #include <linux/ioport.h> | 37 | #include <linux/ioport.h> |
38 | #include <linux/in.h> | 38 | #include <linux/in.h> |
39 | #include <linux/slab.h> | ||
40 | #include <linux/string.h> | 39 | #include <linux/string.h> |
41 | #include <linux/time.h> | 40 | #include <linux/time.h> |
42 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c index 9fa2c36ff904..c169fd05dde0 100644 --- a/drivers/net/tokenring/tms380tr.c +++ b/drivers/net/tokenring/tms380tr.c | |||
@@ -85,7 +85,6 @@ static const char version[] = "tms380tr.c: v1.10 30/12/2002 by Christoph Goos, A | |||
85 | #include <linux/ptrace.h> | 85 | #include <linux/ptrace.h> |
86 | #include <linux/ioport.h> | 86 | #include <linux/ioport.h> |
87 | #include <linux/in.h> | 87 | #include <linux/in.h> |
88 | #include <linux/slab.h> | ||
89 | #include <linux/string.h> | 88 | #include <linux/string.h> |
90 | #include <linux/time.h> | 89 | #include <linux/time.h> |
91 | #include <linux/errno.h> | 90 | #include <linux/errno.h> |
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index 1366541c30a2..1292d2344a34 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <linux/etherdevice.h> | 38 | #include <linux/etherdevice.h> |
39 | #include <linux/ethtool.h> | 39 | #include <linux/ethtool.h> |
40 | #include <linux/skbuff.h> | 40 | #include <linux/skbuff.h> |
41 | #include <linux/slab.h> | ||
42 | #include <linux/spinlock.h> | 41 | #include <linux/spinlock.h> |
43 | #include <linux/delay.h> | 42 | #include <linux/delay.h> |
44 | #include <linux/crc32.h> | 43 | #include <linux/crc32.h> |
@@ -48,6 +47,7 @@ | |||
48 | #include <linux/rtnetlink.h> | 47 | #include <linux/rtnetlink.h> |
49 | #include <linux/timer.h> | 48 | #include <linux/timer.h> |
50 | #include <linux/platform_device.h> | 49 | #include <linux/platform_device.h> |
50 | #include <linux/gfp.h> | ||
51 | 51 | ||
52 | #include <asm/system.h> | 52 | #include <asm/system.h> |
53 | #include <asm/io.h> | 53 | #include <asm/io.h> |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index a68b91764627..9c0f29ce8ba7 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/compiler.h> | 42 | #include <linux/compiler.h> |
43 | #include <linux/rtnetlink.h> | 43 | #include <linux/rtnetlink.h> |
44 | #include <linux/crc32.h> | 44 | #include <linux/crc32.h> |
45 | #include <linux/slab.h> | ||
45 | 46 | ||
46 | #include <asm/io.h> | 47 | #include <asm/io.h> |
47 | #include <asm/irq.h> | 48 | #include <asm/irq.h> |
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index cac4bcc83187..d818456f4713 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c | |||
@@ -450,7 +450,6 @@ | |||
450 | #include <linux/ptrace.h> | 450 | #include <linux/ptrace.h> |
451 | #include <linux/errno.h> | 451 | #include <linux/errno.h> |
452 | #include <linux/ioport.h> | 452 | #include <linux/ioport.h> |
453 | #include <linux/slab.h> | ||
454 | #include <linux/pci.h> | 453 | #include <linux/pci.h> |
455 | #include <linux/eisa.h> | 454 | #include <linux/eisa.h> |
456 | #include <linux/delay.h> | 455 | #include <linux/delay.h> |
@@ -467,6 +466,7 @@ | |||
467 | #include <linux/dma-mapping.h> | 466 | #include <linux/dma-mapping.h> |
468 | #include <linux/moduleparam.h> | 467 | #include <linux/moduleparam.h> |
469 | #include <linux/bitops.h> | 468 | #include <linux/bitops.h> |
469 | #include <linux/gfp.h> | ||
470 | 470 | ||
471 | #include <asm/io.h> | 471 | #include <asm/io.h> |
472 | #include <asm/dma.h> | 472 | #include <asm/dma.h> |
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index a039c8ab98b2..7278ecb823cb 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c | |||
@@ -74,7 +74,6 @@ | |||
74 | #include <linux/ptrace.h> | 74 | #include <linux/ptrace.h> |
75 | #include <linux/errno.h> | 75 | #include <linux/errno.h> |
76 | #include <linux/ioport.h> | 76 | #include <linux/ioport.h> |
77 | #include <linux/slab.h> | ||
78 | #include <linux/interrupt.h> | 77 | #include <linux/interrupt.h> |
79 | #include <linux/pci.h> | 78 | #include <linux/pci.h> |
80 | #include <linux/dma-mapping.h> | 79 | #include <linux/dma-mapping.h> |
diff --git a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c index 49f05d1431f5..6002e651b9ea 100644 --- a/drivers/net/tulip/eeprom.c +++ b/drivers/net/tulip/eeprom.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
16 | #include <linux/slab.h> | ||
16 | #include "tulip.h" | 17 | #include "tulip.h" |
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <asm/unaligned.h> | 19 | #include <asm/unaligned.h> |
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index c4b7cd726b69..22e766e90063 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/pci.h> | 26 | #include <linux/pci.h> |
27 | #include <linux/slab.h> | ||
27 | #include "tulip.h" | 28 | #include "tulip.h" |
28 | #include <linux/init.h> | 29 | #include <linux/init.h> |
29 | #include <linux/etherdevice.h> | 30 | #include <linux/etherdevice.h> |
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c index 7063f56640c3..c7f972852921 100644 --- a/drivers/net/tulip/uli526x.c +++ b/drivers/net/tulip/uli526x.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
26 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
27 | #include <linux/ioport.h> | 27 | #include <linux/ioport.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
30 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
31 | #include <linux/init.h> | 30 | #include <linux/init.h> |
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index 3e3822c98a0d..18c8cedf4cac 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c | |||
@@ -114,7 +114,6 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; | |||
114 | #include <linux/timer.h> | 114 | #include <linux/timer.h> |
115 | #include <linux/errno.h> | 115 | #include <linux/errno.h> |
116 | #include <linux/ioport.h> | 116 | #include <linux/ioport.h> |
117 | #include <linux/slab.h> | ||
118 | #include <linux/interrupt.h> | 117 | #include <linux/interrupt.h> |
119 | #include <linux/pci.h> | 118 | #include <linux/pci.h> |
120 | #include <linux/dma-mapping.h> | 119 | #include <linux/dma-mapping.h> |
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index 3053f85aa066..b94c4cce93c2 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c | |||
@@ -109,7 +109,6 @@ static const int multicast_filter_limit = 32; | |||
109 | #include <linux/timer.h> | 109 | #include <linux/timer.h> |
110 | #include <linux/errno.h> | 110 | #include <linux/errno.h> |
111 | #include <linux/ioport.h> | 111 | #include <linux/ioport.h> |
112 | #include <linux/slab.h> | ||
113 | #include <linux/interrupt.h> | 112 | #include <linux/interrupt.h> |
114 | #include <linux/pci.h> | 113 | #include <linux/pci.h> |
115 | #include <linux/netdevice.h> | 114 | #include <linux/netdevice.h> |
diff --git a/drivers/net/ucc_geth_ethtool.c b/drivers/net/ucc_geth_ethtool.c index 7075f26e97da..6f92e48f02d3 100644 --- a/drivers/net/ucc_geth_ethtool.c +++ b/drivers/net/ucc_geth_ethtool.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/slab.h> | ||
22 | #include <linux/stddef.h> | 21 | #include <linux/stddef.h> |
23 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
24 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index 763364f0972e..8e7d2374558b 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/usb.h> | 34 | #include <linux/usb.h> |
35 | #include <linux/crc32.h> | 35 | #include <linux/crc32.h> |
36 | #include <linux/usb/usbnet.h> | 36 | #include <linux/usb/usbnet.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #define DRIVER_VERSION "14-Jun-2006" | 39 | #define DRIVER_VERSION "14-Jun-2006" |
39 | static const char driver_name [] = "asix"; | 40 | static const char driver_name [] = "asix"; |
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c index 0c48ff97f47c..97687d335903 100644 --- a/drivers/net/usb/catc.c +++ b/drivers/net/usb/catc.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/module.h> | 36 | #include <linux/module.h> |
37 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
38 | #include <linux/string.h> | 38 | #include <linux/string.h> |
39 | #include <linux/slab.h> | ||
40 | #include <linux/netdevice.h> | 39 | #include <linux/netdevice.h> |
41 | #include <linux/etherdevice.h> | 40 | #include <linux/etherdevice.h> |
42 | #include <linux/skbuff.h> | 41 | #include <linux/skbuff.h> |
@@ -44,6 +43,7 @@ | |||
44 | #include <linux/ethtool.h> | 43 | #include <linux/ethtool.h> |
45 | #include <linux/crc32.h> | 44 | #include <linux/crc32.h> |
46 | #include <linux/bitops.h> | 45 | #include <linux/bitops.h> |
46 | #include <linux/gfp.h> | ||
47 | #include <asm/uaccess.h> | 47 | #include <asm/uaccess.h> |
48 | 48 | ||
49 | #undef DEBUG | 49 | #undef DEBUG |
diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c index 6491c9c00c83..dc9444525b49 100644 --- a/drivers/net/usb/cdc-phonet.c +++ b/drivers/net/usb/cdc-phonet.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/gfp.h> | ||
25 | #include <linux/usb.h> | 26 | #include <linux/usb.h> |
26 | #include <linux/usb/cdc.h> | 27 | #include <linux/usb/cdc.h> |
27 | #include <linux/netdevice.h> | 28 | #include <linux/netdevice.h> |
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c index a4a85a6ed86d..5f3b97668e63 100644 --- a/drivers/net/usb/cdc_eem.c +++ b/drivers/net/usb/cdc_eem.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/crc32.h> | 30 | #include <linux/crc32.h> |
31 | #include <linux/usb/cdc.h> | 31 | #include <linux/usb/cdc.h> |
32 | #include <linux/usb/usbnet.h> | 32 | #include <linux/usb/usbnet.h> |
33 | #include <linux/gfp.h> | ||
33 | 34 | ||
34 | 35 | ||
35 | /* | 36 | /* |
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 4eb1fb31ff0b..291add255246 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/usb.h> | 21 | #include <linux/usb.h> |
22 | #include <linux/crc32.h> | 22 | #include <linux/crc32.h> |
23 | #include <linux/usb/usbnet.h> | 23 | #include <linux/usb/usbnet.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | /* datasheet: | 26 | /* datasheet: |
26 | http://ptm2.cc.utu.fi/ftp/network/cards/DM9601/From_NET/DM9601-DS-P01-930914.pdf | 27 | http://ptm2.cc.utu.fi/ftp/network/cards/DM9601/From_NET/DM9601-DS-P01-930914.pdf |
diff --git a/drivers/net/usb/gl620a.c b/drivers/net/usb/gl620a.c index f7ccfad9384e..dcd57c37ef73 100644 --- a/drivers/net/usb/gl620a.c +++ b/drivers/net/usb/gl620a.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/mii.h> | 30 | #include <linux/mii.h> |
31 | #include <linux/usb.h> | 31 | #include <linux/usb.h> |
32 | #include <linux/usb/usbnet.h> | 32 | #include <linux/usb/usbnet.h> |
33 | #include <linux/gfp.h> | ||
33 | 34 | ||
34 | 35 | ||
35 | /* | 36 | /* |
diff --git a/drivers/net/usb/int51x1.c b/drivers/net/usb/int51x1.c index 3c228df57062..be02a25da71a 100644 --- a/drivers/net/usb/int51x1.c +++ b/drivers/net/usb/int51x1.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/netdevice.h> | 29 | #include <linux/netdevice.h> |
30 | #include <linux/etherdevice.h> | 30 | #include <linux/etherdevice.h> |
31 | #include <linux/ethtool.h> | 31 | #include <linux/ethtool.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/mii.h> | 33 | #include <linux/mii.h> |
33 | #include <linux/usb.h> | 34 | #include <linux/usb.h> |
34 | #include <linux/usb/usbnet.h> | 35 | #include <linux/usb/usbnet.h> |
diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c index 0dc92c8ba4b2..834d8cd3005d 100644 --- a/drivers/net/usb/mcs7830.c +++ b/drivers/net/usb/mcs7830.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/mii.h> | 44 | #include <linux/mii.h> |
45 | #include <linux/module.h> | 45 | #include <linux/module.h> |
46 | #include <linux/netdevice.h> | 46 | #include <linux/netdevice.h> |
47 | #include <linux/slab.h> | ||
47 | #include <linux/usb.h> | 48 | #include <linux/usb.h> |
48 | #include <linux/usb/usbnet.h> | 49 | #include <linux/usb/usbnet.h> |
49 | 50 | ||
diff --git a/drivers/net/usb/net1080.c b/drivers/net/usb/net1080.c index bdcad45954a3..961a8ed38d8f 100644 --- a/drivers/net/usb/net1080.c +++ b/drivers/net/usb/net1080.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/mii.h> | 29 | #include <linux/mii.h> |
30 | #include <linux/usb.h> | 30 | #include <linux/usb.h> |
31 | #include <linux/usb/usbnet.h> | 31 | #include <linux/usb/usbnet.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <asm/unaligned.h> | 34 | #include <asm/unaligned.h> |
34 | 35 | ||
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index 4ce331fb1e1e..dd8a4adf48ca 100644 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/etherdevice.h> | 22 | #include <linux/etherdevice.h> |
23 | #include <linux/ethtool.h> | 23 | #include <linux/ethtool.h> |
24 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/mii.h> | 26 | #include <linux/mii.h> |
26 | #include <linux/usb.h> | 27 | #include <linux/usb.h> |
27 | #include <linux/usb/cdc.h> | 28 | #include <linux/usb/cdc.h> |
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c index b8b00d06ea79..753ee6eb7edd 100644 --- a/drivers/net/usb/smsc75xx.c +++ b/drivers/net/usb/smsc75xx.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/usb.h> | 28 | #include <linux/usb.h> |
29 | #include <linux/crc32.h> | 29 | #include <linux/crc32.h> |
30 | #include <linux/usb/usbnet.h> | 30 | #include <linux/usb/usbnet.h> |
31 | #include <linux/slab.h> | ||
31 | #include "smsc75xx.h" | 32 | #include "smsc75xx.h" |
32 | 33 | ||
33 | #define SMSC_CHIPNAME "smsc75xx" | 34 | #define SMSC_CHIPNAME "smsc75xx" |
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index ccd55ca3a06a..12a3c88c5282 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/usb.h> | 28 | #include <linux/usb.h> |
29 | #include <linux/crc32.h> | 29 | #include <linux/crc32.h> |
30 | #include <linux/usb/usbnet.h> | 30 | #include <linux/usb/usbnet.h> |
31 | #include <linux/slab.h> | ||
31 | #include "smsc95xx.h" | 32 | #include "smsc95xx.h" |
32 | 33 | ||
33 | #define SMSC_CHIPNAME "smsc95xx" | 34 | #define SMSC_CHIPNAME "smsc95xx" |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index c0f64392627c..a95c73de5824 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/mii.h> | 43 | #include <linux/mii.h> |
44 | #include <linux/usb.h> | 44 | #include <linux/usb.h> |
45 | #include <linux/usb/usbnet.h> | 45 | #include <linux/usb/usbnet.h> |
46 | #include <linux/slab.h> | ||
46 | 47 | ||
47 | #define DRIVER_VERSION "22-Aug-2005" | 48 | #define DRIVER_VERSION "22-Aug-2005" |
48 | 49 | ||
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index b583d4968add..f9f0730b53d5 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/netdevice.h> | 11 | #include <linux/netdevice.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/ethtool.h> | 13 | #include <linux/ethtool.h> |
13 | #include <linux/etherdevice.h> | 14 | #include <linux/etherdevice.h> |
14 | 15 | ||
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index d9133c62a2f5..467bcff13cd0 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c | |||
@@ -89,7 +89,6 @@ static const int multicast_filter_limit = 32; | |||
89 | #include <linux/timer.h> | 89 | #include <linux/timer.h> |
90 | #include <linux/errno.h> | 90 | #include <linux/errno.h> |
91 | #include <linux/ioport.h> | 91 | #include <linux/ioport.h> |
92 | #include <linux/slab.h> | ||
93 | #include <linux/interrupt.h> | 92 | #include <linux/interrupt.h> |
94 | #include <linux/pci.h> | 93 | #include <linux/pci.h> |
95 | #include <linux/dma-mapping.h> | 94 | #include <linux/dma-mapping.h> |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index b81e452d4ba2..b0a85d038796 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/virtio_net.h> | 25 | #include <linux/virtio_net.h> |
26 | #include <linux/scatterlist.h> | 26 | #include <linux/scatterlist.h> |
27 | #include <linux/if_vlan.h> | 27 | #include <linux/if_vlan.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | static int napi_weight = 128; | 30 | static int napi_weight = 128; |
30 | module_param(napi_weight, int, 0444); | 31 | module_param(napi_weight, int, 0444); |
diff --git a/drivers/net/vxge/vxge-config.c b/drivers/net/vxge/vxge-config.c index 66dd5893c2d3..a5fc8166c01d 100644 --- a/drivers/net/vxge/vxge-config.c +++ b/drivers/net/vxge/vxge-config.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/etherdevice.h> | 15 | #include <linux/etherdevice.h> |
16 | #include <linux/pci.h> | 16 | #include <linux/pci.h> |
17 | #include <linux/pci_hotplug.h> | 17 | #include <linux/pci_hotplug.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include "vxge-traffic.h" | 20 | #include "vxge-traffic.h" |
20 | #include "vxge-config.h" | 21 | #include "vxge-config.h" |
diff --git a/drivers/net/vxge/vxge-config.h b/drivers/net/vxge/vxge-config.h index 1530060d5811..4ae2625d4d8f 100644 --- a/drivers/net/vxge/vxge-config.h +++ b/drivers/net/vxge/vxge-config.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #ifndef VXGE_CONFIG_H | 14 | #ifndef VXGE_CONFIG_H |
15 | #define VXGE_CONFIG_H | 15 | #define VXGE_CONFIG_H |
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #ifndef VXGE_CACHE_LINE_SIZE | 19 | #ifndef VXGE_CACHE_LINE_SIZE |
19 | #define VXGE_CACHE_LINE_SIZE 128 | 20 | #define VXGE_CACHE_LINE_SIZE 128 |
diff --git a/drivers/net/vxge/vxge-ethtool.c b/drivers/net/vxge/vxge-ethtool.c index 6faa39e9d7a6..cadef8549c06 100644 --- a/drivers/net/vxge/vxge-ethtool.c +++ b/drivers/net/vxge/vxge-ethtool.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * Copyright(c) 2002-2009 Neterion Inc. | 12 | * Copyright(c) 2002-2009 Neterion Inc. |
13 | ******************************************************************************/ | 13 | ******************************************************************************/ |
14 | #include<linux/ethtool.h> | 14 | #include<linux/ethtool.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/pci.h> | 16 | #include <linux/pci.h> |
16 | #include <linux/etherdevice.h> | 17 | #include <linux/etherdevice.h> |
17 | 18 | ||
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c index f7482eb9c669..2bab36421f71 100644 --- a/drivers/net/vxge/vxge-main.c +++ b/drivers/net/vxge/vxge-main.c | |||
@@ -43,6 +43,7 @@ | |||
43 | 43 | ||
44 | #include <linux/if_vlan.h> | 44 | #include <linux/if_vlan.h> |
45 | #include <linux/pci.h> | 45 | #include <linux/pci.h> |
46 | #include <linux/slab.h> | ||
46 | #include <linux/tcp.h> | 47 | #include <linux/tcp.h> |
47 | #include <net/ip.h> | 48 | #include <net/ip.h> |
48 | #include <linux/netdevice.h> | 49 | #include <linux/netdevice.h> |
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index f88c07c13197..a4859f7a7cc0 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c | |||
@@ -89,6 +89,7 @@ | |||
89 | #include <linux/pci.h> | 89 | #include <linux/pci.h> |
90 | #include <linux/kernel.h> | 90 | #include <linux/kernel.h> |
91 | #include <linux/mm.h> | 91 | #include <linux/mm.h> |
92 | #include <linux/slab.h> | ||
92 | 93 | ||
93 | #include <asm/system.h> | 94 | #include <asm/system.h> |
94 | #include <asm/cache.h> | 95 | #include <asm/cache.h> |
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index 40d724a8e020..e087b9a6daaa 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/version.h> | 20 | #include <linux/version.h> |
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/ioport.h> | 24 | #include <linux/ioport.h> |
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/if.h> | 26 | #include <linux/if.h> |
diff --git a/drivers/net/wan/hd64570.c b/drivers/net/wan/hd64570.c index 80114c93bae7..4dde2ea4a189 100644 --- a/drivers/net/wan/hd64570.c +++ b/drivers/net/wan/hd64570.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <linux/module.h> | 37 | #include <linux/module.h> |
38 | #include <linux/netdevice.h> | 38 | #include <linux/netdevice.h> |
39 | #include <linux/skbuff.h> | 39 | #include <linux/skbuff.h> |
40 | #include <linux/slab.h> | ||
41 | #include <linux/string.h> | 40 | #include <linux/string.h> |
42 | #include <linux/types.h> | 41 | #include <linux/types.h> |
43 | #include <asm/io.h> | 42 | #include <asm/io.h> |
diff --git a/drivers/net/wan/hd64572.c b/drivers/net/wan/hd64572.c index 84f01373e11f..aad9ed45c254 100644 --- a/drivers/net/wan/hd64572.c +++ b/drivers/net/wan/hd64572.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <linux/module.h> | 37 | #include <linux/module.h> |
38 | #include <linux/netdevice.h> | 38 | #include <linux/netdevice.h> |
39 | #include <linux/skbuff.h> | 39 | #include <linux/skbuff.h> |
40 | #include <linux/slab.h> | ||
41 | #include <linux/string.h> | 40 | #include <linux/string.h> |
42 | #include <linux/types.h> | 41 | #include <linux/types.h> |
43 | #include <asm/io.h> | 42 | #include <asm/io.h> |
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c index 1ceccf1ca6c7..ee7083fbea50 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/poll.h> | 20 | #include <linux/poll.h> |
21 | #include <linux/rtnetlink.h> | 21 | #include <linux/rtnetlink.h> |
22 | #include <linux/skbuff.h> | 22 | #include <linux/skbuff.h> |
23 | #include <linux/slab.h> | ||
24 | 23 | ||
25 | #undef DEBUG_HARD_HEADER | 24 | #undef DEBUG_HARD_HEADER |
26 | 25 | ||
diff --git a/drivers/net/wan/hdlc_raw.c b/drivers/net/wan/hdlc_raw.c index 19f51fdd5522..5dc153e8a29d 100644 --- a/drivers/net/wan/hdlc_raw.c +++ b/drivers/net/wan/hdlc_raw.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/poll.h> | 20 | #include <linux/poll.h> |
21 | #include <linux/rtnetlink.h> | 21 | #include <linux/rtnetlink.h> |
22 | #include <linux/skbuff.h> | 22 | #include <linux/skbuff.h> |
23 | #include <linux/slab.h> | ||
24 | 23 | ||
25 | 24 | ||
26 | static int raw_ioctl(struct net_device *dev, struct ifreq *ifr); | 25 | static int raw_ioctl(struct net_device *dev, struct ifreq *ifr); |
diff --git a/drivers/net/wan/hdlc_raw_eth.c b/drivers/net/wan/hdlc_raw_eth.c index 1b30fcc24145..05c9b0b96239 100644 --- a/drivers/net/wan/hdlc_raw_eth.c +++ b/drivers/net/wan/hdlc_raw_eth.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/etherdevice.h> | 13 | #include <linux/etherdevice.h> |
14 | #include <linux/gfp.h> | ||
14 | #include <linux/hdlc.h> | 15 | #include <linux/hdlc.h> |
15 | #include <linux/if_arp.h> | 16 | #include <linux/if_arp.h> |
16 | #include <linux/inetdevice.h> | 17 | #include <linux/inetdevice.h> |
@@ -21,7 +22,6 @@ | |||
21 | #include <linux/poll.h> | 22 | #include <linux/poll.h> |
22 | #include <linux/rtnetlink.h> | 23 | #include <linux/rtnetlink.h> |
23 | #include <linux/skbuff.h> | 24 | #include <linux/skbuff.h> |
24 | #include <linux/slab.h> | ||
25 | 25 | ||
26 | static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr); | 26 | static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr); |
27 | 27 | ||
diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c index 6e1ca256effd..c7adbb79f7cc 100644 --- a/drivers/net/wan/hdlc_x25.c +++ b/drivers/net/wan/hdlc_x25.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/gfp.h> | ||
13 | #include <linux/hdlc.h> | 14 | #include <linux/hdlc.h> |
14 | #include <linux/if_arp.h> | 15 | #include <linux/if_arp.h> |
15 | #include <linux/inetdevice.h> | 16 | #include <linux/inetdevice.h> |
@@ -21,7 +22,6 @@ | |||
21 | #include <linux/poll.h> | 22 | #include <linux/poll.h> |
22 | #include <linux/rtnetlink.h> | 23 | #include <linux/rtnetlink.h> |
23 | #include <linux/skbuff.h> | 24 | #include <linux/skbuff.h> |
24 | #include <linux/slab.h> | ||
25 | #include <net/x25device.h> | 25 | #include <net/x25device.h> |
26 | 26 | ||
27 | static int x25_ioctl(struct net_device *dev, struct ifreq *ifr); | 27 | static int x25_ioctl(struct net_device *dev, struct ifreq *ifr); |
diff --git a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c index 74164d29524c..48edc5f4dac8 100644 --- a/drivers/net/wan/hostess_sv11.c +++ b/drivers/net/wan/hostess_sv11.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | #include <linux/hdlc.h> | 31 | #include <linux/hdlc.h> |
32 | #include <linux/ioport.h> | 32 | #include <linux/ioport.h> |
33 | #include <linux/slab.h> | ||
33 | #include <net/arp.h> | 34 | #include <net/arp.h> |
34 | 35 | ||
35 | #include <asm/irq.h> | 36 | #include <asm/irq.h> |
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c index c705046d8615..0c2cdde686a0 100644 --- a/drivers/net/wan/ixp4xx_hss.c +++ b/drivers/net/wan/ixp4xx_hss.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/poll.h> | 20 | #include <linux/poll.h> |
21 | #include <linux/slab.h> | ||
21 | #include <mach/npe.h> | 22 | #include <mach/npe.h> |
22 | #include <mach/qmgr.h> | 23 | #include <mach/qmgr.h> |
23 | 24 | ||
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index d1e3c673e9b2..98e2f99903d7 100644 --- a/drivers/net/wan/lapbether.c +++ b/drivers/net/wan/lapbether.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/socket.h> | 25 | #include <linux/socket.h> |
26 | #include <linux/in.h> | 26 | #include <linux/in.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
28 | #include <linux/string.h> | 29 | #include <linux/string.h> |
29 | #include <linux/net.h> | 30 | #include <linux/net.h> |
diff --git a/drivers/net/wan/lmc/lmc_media.c b/drivers/net/wan/lmc/lmc_media.c index f327674fc93a..5920c996fcdf 100644 --- a/drivers/net/wan/lmc/lmc_media.c +++ b/drivers/net/wan/lmc/lmc_media.c | |||
@@ -6,7 +6,6 @@ | |||
6 | #include <linux/ptrace.h> | 6 | #include <linux/ptrace.h> |
7 | #include <linux/errno.h> | 7 | #include <linux/errno.h> |
8 | #include <linux/ioport.h> | 8 | #include <linux/ioport.h> |
9 | #include <linux/slab.h> | ||
10 | #include <linux/interrupt.h> | 9 | #include <linux/interrupt.h> |
11 | #include <linux/in.h> | 10 | #include <linux/in.h> |
12 | #include <linux/if_arp.h> | 11 | #include <linux/if_arp.h> |
diff --git a/drivers/net/wan/lmc/lmc_proto.c b/drivers/net/wan/lmc/lmc_proto.c index 044a48175c42..f600075e84a2 100644 --- a/drivers/net/wan/lmc/lmc_proto.c +++ b/drivers/net/wan/lmc/lmc_proto.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/ptrace.h> | 25 | #include <linux/ptrace.h> |
26 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
27 | #include <linux/ioport.h> | 27 | #include <linux/ioport.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
30 | #include <linux/in.h> | 29 | #include <linux/in.h> |
31 | #include <linux/if_arp.h> | 30 | #include <linux/if_arp.h> |
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c index cb72cc7a1e86..17502d80b65a 100644 --- a/drivers/net/wan/pc300_drv.c +++ b/drivers/net/wan/pc300_drv.c | |||
@@ -228,6 +228,7 @@ static char rcsid[] = | |||
228 | #include <linux/etherdevice.h> | 228 | #include <linux/etherdevice.h> |
229 | #include <linux/spinlock.h> | 229 | #include <linux/spinlock.h> |
230 | #include <linux/if.h> | 230 | #include <linux/if.h> |
231 | #include <linux/slab.h> | ||
231 | #include <net/arp.h> | 232 | #include <net/arp.h> |
232 | 233 | ||
233 | #include <asm/io.h> | 234 | #include <asm/io.h> |
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c index 25477b5cde47..cff13a9597cd 100644 --- a/drivers/net/wan/sbni.c +++ b/drivers/net/wan/sbni.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <linux/fcntl.h> | 43 | #include <linux/fcntl.h> |
44 | #include <linux/ioport.h> | 44 | #include <linux/ioport.h> |
45 | #include <linux/interrupt.h> | 45 | #include <linux/interrupt.h> |
46 | #include <linux/slab.h> | ||
47 | #include <linux/string.h> | 46 | #include <linux/string.h> |
48 | #include <linux/errno.h> | 47 | #include <linux/errno.h> |
49 | #include <linux/netdevice.h> | 48 | #include <linux/netdevice.h> |
diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index 61249f489e37..e91457d6023e 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/hdlc.h> | 23 | #include <linux/hdlc.h> |
24 | #include <linux/ioport.h> | 24 | #include <linux/ioport.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/slab.h> | ||
26 | #include <net/arp.h> | 27 | #include <net/arp.h> |
27 | 28 | ||
28 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index b9f520b7db6a..80d5c5834a0b 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
35 | #include <linux/rtnetlink.h> | 35 | #include <linux/rtnetlink.h> |
36 | #include <linux/compat.h> | 36 | #include <linux/compat.h> |
37 | #include <linux/slab.h> | ||
37 | #include "x25_asy.h" | 38 | #include "x25_asy.h" |
38 | 39 | ||
39 | #include <net/x25device.h> | 40 | #include <net/x25device.h> |
diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c index 0be7ec7299db..fbf5e843d48c 100644 --- a/drivers/net/wan/z85230.c +++ b/drivers/net/wan/z85230.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/hdlc.h> | 47 | #include <linux/hdlc.h> |
48 | #include <linux/ioport.h> | 48 | #include <linux/ioport.h> |
49 | #include <linux/init.h> | 49 | #include <linux/init.h> |
50 | #include <linux/gfp.h> | ||
50 | #include <asm/dma.h> | 51 | #include <asm/dma.h> |
51 | #include <asm/io.h> | 52 | #include <asm/io.h> |
52 | #define RT_LOCK | 53 | #define RT_LOCK |
diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c index 944945540391..6180772dcc09 100644 --- a/drivers/net/wimax/i2400m/control.c +++ b/drivers/net/wimax/i2400m/control.c | |||
@@ -76,6 +76,7 @@ | |||
76 | #include <stdarg.h> | 76 | #include <stdarg.h> |
77 | #include "i2400m.h" | 77 | #include "i2400m.h" |
78 | #include <linux/kernel.h> | 78 | #include <linux/kernel.h> |
79 | #include <linux/slab.h> | ||
79 | #include <linux/wimax/i2400m.h> | 80 | #include <linux/wimax/i2400m.h> |
80 | 81 | ||
81 | 82 | ||
diff --git a/drivers/net/wimax/i2400m/driver.c b/drivers/net/wimax/i2400m/driver.c index 6cead321bc15..94dc83c3969d 100644 --- a/drivers/net/wimax/i2400m/driver.c +++ b/drivers/net/wimax/i2400m/driver.c | |||
@@ -69,6 +69,7 @@ | |||
69 | #include <linux/module.h> | 69 | #include <linux/module.h> |
70 | #include <linux/moduleparam.h> | 70 | #include <linux/moduleparam.h> |
71 | #include <linux/suspend.h> | 71 | #include <linux/suspend.h> |
72 | #include <linux/slab.h> | ||
72 | 73 | ||
73 | #define D_SUBMODULE driver | 74 | #define D_SUBMODULE driver |
74 | #include "debug-levels.h" | 75 | #include "debug-levels.h" |
diff --git a/drivers/net/wimax/i2400m/fw.c b/drivers/net/wimax/i2400m/fw.c index 25c24f0368d8..3f283bff0ff7 100644 --- a/drivers/net/wimax/i2400m/fw.c +++ b/drivers/net/wimax/i2400m/fw.c | |||
@@ -156,6 +156,7 @@ | |||
156 | */ | 156 | */ |
157 | #include <linux/firmware.h> | 157 | #include <linux/firmware.h> |
158 | #include <linux/sched.h> | 158 | #include <linux/sched.h> |
159 | #include <linux/slab.h> | ||
159 | #include <linux/usb.h> | 160 | #include <linux/usb.h> |
160 | #include "i2400m.h" | 161 | #include "i2400m.h" |
161 | 162 | ||
diff --git a/drivers/net/wimax/i2400m/netdev.c b/drivers/net/wimax/i2400m/netdev.c index 599aa4eb9baa..b811c2f1f5e9 100644 --- a/drivers/net/wimax/i2400m/netdev.c +++ b/drivers/net/wimax/i2400m/netdev.c | |||
@@ -73,6 +73,7 @@ | |||
73 | * alloc_netdev. | 73 | * alloc_netdev. |
74 | */ | 74 | */ |
75 | #include <linux/if_arp.h> | 75 | #include <linux/if_arp.h> |
76 | #include <linux/slab.h> | ||
76 | #include <linux/netdevice.h> | 77 | #include <linux/netdevice.h> |
77 | #include <linux/ethtool.h> | 78 | #include <linux/ethtool.h> |
78 | #include "i2400m.h" | 79 | #include "i2400m.h" |
diff --git a/drivers/net/wimax/i2400m/op-rfkill.c b/drivers/net/wimax/i2400m/op-rfkill.c index 43927b5d7ad6..035e4cf3e6ed 100644 --- a/drivers/net/wimax/i2400m/op-rfkill.c +++ b/drivers/net/wimax/i2400m/op-rfkill.c | |||
@@ -34,6 +34,7 @@ | |||
34 | */ | 34 | */ |
35 | #include "i2400m.h" | 35 | #include "i2400m.h" |
36 | #include <linux/wimax/i2400m.h> | 36 | #include <linux/wimax/i2400m.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | 39 | ||
39 | 40 | ||
diff --git a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c index 7ddb173fd4a7..fa2e11e5b4b9 100644 --- a/drivers/net/wimax/i2400m/rx.c +++ b/drivers/net/wimax/i2400m/rx.c | |||
@@ -144,6 +144,7 @@ | |||
144 | * i2400m_msg_size_check | 144 | * i2400m_msg_size_check |
145 | * wimax_msg | 145 | * wimax_msg |
146 | */ | 146 | */ |
147 | #include <linux/slab.h> | ||
147 | #include <linux/kernel.h> | 148 | #include <linux/kernel.h> |
148 | #include <linux/if_arp.h> | 149 | #include <linux/if_arp.h> |
149 | #include <linux/netdevice.h> | 150 | #include <linux/netdevice.h> |
diff --git a/drivers/net/wimax/i2400m/sdio-rx.c b/drivers/net/wimax/i2400m/sdio-rx.c index 8adf6c9b6f8f..d619da33f20b 100644 --- a/drivers/net/wimax/i2400m/sdio-rx.c +++ b/drivers/net/wimax/i2400m/sdio-rx.c | |||
@@ -65,6 +65,7 @@ | |||
65 | #include <linux/skbuff.h> | 65 | #include <linux/skbuff.h> |
66 | #include <linux/mmc/sdio.h> | 66 | #include <linux/mmc/sdio.h> |
67 | #include <linux/mmc/sdio_func.h> | 67 | #include <linux/mmc/sdio_func.h> |
68 | #include <linux/slab.h> | ||
68 | #include "i2400m-sdio.h" | 69 | #include "i2400m-sdio.h" |
69 | 70 | ||
70 | #define D_SUBMODULE rx | 71 | #define D_SUBMODULE rx |
diff --git a/drivers/net/wimax/i2400m/sdio.c b/drivers/net/wimax/i2400m/sdio.c index 14f876b1358b..7632f80954e3 100644 --- a/drivers/net/wimax/i2400m/sdio.c +++ b/drivers/net/wimax/i2400m/sdio.c | |||
@@ -48,6 +48,7 @@ | |||
48 | * __i2400ms_send_barker() | 48 | * __i2400ms_send_barker() |
49 | */ | 49 | */ |
50 | 50 | ||
51 | #include <linux/slab.h> | ||
51 | #include <linux/debugfs.h> | 52 | #include <linux/debugfs.h> |
52 | #include <linux/mmc/sdio_ids.h> | 53 | #include <linux/mmc/sdio_ids.h> |
53 | #include <linux/mmc/sdio.h> | 54 | #include <linux/mmc/sdio.h> |
diff --git a/drivers/net/wimax/i2400m/tx.c b/drivers/net/wimax/i2400m/tx.c index 38f9c921f3e8..6db909ecf1c9 100644 --- a/drivers/net/wimax/i2400m/tx.c +++ b/drivers/net/wimax/i2400m/tx.c | |||
@@ -244,6 +244,7 @@ | |||
244 | * (FIFO empty). | 244 | * (FIFO empty). |
245 | */ | 245 | */ |
246 | #include <linux/netdevice.h> | 246 | #include <linux/netdevice.h> |
247 | #include <linux/slab.h> | ||
247 | #include "i2400m.h" | 248 | #include "i2400m.h" |
248 | 249 | ||
249 | 250 | ||
diff --git a/drivers/net/wimax/i2400m/usb-fw.c b/drivers/net/wimax/i2400m/usb-fw.c index ce6b9938fde0..b58ec56b86f8 100644 --- a/drivers/net/wimax/i2400m/usb-fw.c +++ b/drivers/net/wimax/i2400m/usb-fw.c | |||
@@ -73,6 +73,7 @@ | |||
73 | * i2400m_notif_submit | 73 | * i2400m_notif_submit |
74 | */ | 74 | */ |
75 | #include <linux/usb.h> | 75 | #include <linux/usb.h> |
76 | #include <linux/gfp.h> | ||
76 | #include "i2400m-usb.h" | 77 | #include "i2400m-usb.h" |
77 | 78 | ||
78 | 79 | ||
diff --git a/drivers/net/wimax/i2400m/usb-notif.c b/drivers/net/wimax/i2400m/usb-notif.c index f88d1c6e35cb..7b6a1d98bd74 100644 --- a/drivers/net/wimax/i2400m/usb-notif.c +++ b/drivers/net/wimax/i2400m/usb-notif.c | |||
@@ -56,6 +56,7 @@ | |||
56 | * i2400mu_rx_kick() | 56 | * i2400mu_rx_kick() |
57 | */ | 57 | */ |
58 | #include <linux/usb.h> | 58 | #include <linux/usb.h> |
59 | #include <linux/slab.h> | ||
59 | #include "i2400m-usb.h" | 60 | #include "i2400m-usb.h" |
60 | 61 | ||
61 | 62 | ||
diff --git a/drivers/net/wimax/i2400m/usb-rx.c b/drivers/net/wimax/i2400m/usb-rx.c index ba1b02362dfc..a26483a812a5 100644 --- a/drivers/net/wimax/i2400m/usb-rx.c +++ b/drivers/net/wimax/i2400m/usb-rx.c | |||
@@ -83,6 +83,7 @@ | |||
83 | * i2400mu_rx_release() called from i2400mu_bus_dev_stop() | 83 | * i2400mu_rx_release() called from i2400mu_bus_dev_stop() |
84 | */ | 84 | */ |
85 | #include <linux/workqueue.h> | 85 | #include <linux/workqueue.h> |
86 | #include <linux/slab.h> | ||
86 | #include <linux/usb.h> | 87 | #include <linux/usb.h> |
87 | #include "i2400m-usb.h" | 88 | #include "i2400m-usb.h" |
88 | 89 | ||
diff --git a/drivers/net/wimax/i2400m/usb.c b/drivers/net/wimax/i2400m/usb.c index 99f04c475898..d8c4d6497fdf 100644 --- a/drivers/net/wimax/i2400m/usb.c +++ b/drivers/net/wimax/i2400m/usb.c | |||
@@ -66,6 +66,7 @@ | |||
66 | #include "i2400m-usb.h" | 66 | #include "i2400m-usb.h" |
67 | #include <linux/wimax/i2400m.h> | 67 | #include <linux/wimax/i2400m.h> |
68 | #include <linux/debugfs.h> | 68 | #include <linux/debugfs.h> |
69 | #include <linux/slab.h> | ||
69 | 70 | ||
70 | 71 | ||
71 | #define D_SUBMODULE usb | 72 | #define D_SUBMODULE usb |
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c index 2277998b7264..880ad9d170c2 100644 --- a/drivers/net/wireless/adm8211.c +++ b/drivers/net/wireless/adm8211.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/if.h> | 19 | #include <linux/if.h> |
20 | #include <linux/skbuff.h> | 20 | #include <linux/skbuff.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/etherdevice.h> | 22 | #include <linux/etherdevice.h> |
22 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
23 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c index b43d4b006d7e..7c4a7d84535c 100644 --- a/drivers/net/wireless/ath/ar9170/main.c +++ b/drivers/net/wireless/ath/ar9170/main.c | |||
@@ -38,6 +38,7 @@ | |||
38 | */ | 38 | */ |
39 | 39 | ||
40 | #include <linux/init.h> | 40 | #include <linux/init.h> |
41 | #include <linux/slab.h> | ||
41 | #include <linux/module.h> | 42 | #include <linux/module.h> |
42 | #include <linux/etherdevice.h> | 43 | #include <linux/etherdevice.h> |
43 | #include <net/mac80211.h> | 44 | #include <net/mac80211.h> |
diff --git a/drivers/net/wireless/ath/ar9170/usb.c b/drivers/net/wireless/ath/ar9170/usb.c index 6b1cb706e410..99a6da464bd3 100644 --- a/drivers/net/wireless/ath/ar9170/usb.c +++ b/drivers/net/wireless/ath/ar9170/usb.c | |||
@@ -38,6 +38,7 @@ | |||
38 | */ | 38 | */ |
39 | 39 | ||
40 | #include <linux/module.h> | 40 | #include <linux/module.h> |
41 | #include <linux/slab.h> | ||
41 | #include <linux/usb.h> | 42 | #include <linux/usb.h> |
42 | #include <linux/firmware.h> | 43 | #include <linux/firmware.h> |
43 | #include <linux/etherdevice.h> | 44 | #include <linux/etherdevice.h> |
diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c index dd4099a2ff15..f571ad1a225e 100644 --- a/drivers/net/wireless/ath/ath5k/attach.c +++ b/drivers/net/wireless/ath/ath5k/attach.c | |||
@@ -21,6 +21,7 @@ | |||
21 | \*************************************/ | 21 | \*************************************/ |
22 | 22 | ||
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/slab.h> | ||
24 | #include "ath5k.h" | 25 | #include "ath5k.h" |
25 | #include "reg.h" | 26 | #include "reg.h" |
26 | #include "debug.h" | 27 | #include "debug.h" |
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 53a2340f52bc..7ac3a720e52c 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/pci.h> | 50 | #include <linux/pci.h> |
51 | #include <linux/ethtool.h> | 51 | #include <linux/ethtool.h> |
52 | #include <linux/uaccess.h> | 52 | #include <linux/uaccess.h> |
53 | #include <linux/slab.h> | ||
53 | 54 | ||
54 | #include <net/ieee80211_radiotap.h> | 55 | #include <net/ieee80211_radiotap.h> |
55 | 56 | ||
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c index a3cbfe4fc389..ed0263672d6d 100644 --- a/drivers/net/wireless/ath/ath5k/eeprom.c +++ b/drivers/net/wireless/ath/ath5k/eeprom.c | |||
@@ -21,6 +21,8 @@ | |||
21 | * EEPROM access functions and helpers * | 21 | * EEPROM access functions and helpers * |
22 | \*************************************/ | 22 | \*************************************/ |
23 | 23 | ||
24 | #include <linux/slab.h> | ||
25 | |||
24 | #include "ath5k.h" | 26 | #include "ath5k.h" |
25 | #include "reg.h" | 27 | #include "reg.h" |
26 | #include "debug.h" | 28 | #include "debug.h" |
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index a8adca62e527..3ee74c839768 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include "ath5k.h" | 26 | #include "ath5k.h" |
26 | #include "reg.h" | 27 | #include "reg.h" |
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 42d2a506845a..081e0085ed4c 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/slab.h> | ||
17 | #include <asm/unaligned.h> | 18 | #include <asm/unaligned.h> |
18 | 19 | ||
19 | #include "ath9k.h" | 20 | #include "ath9k.h" |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 77db932c3137..7fdaea3a1629 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/slab.h> | ||
18 | #include <asm/unaligned.h> | 19 | #include <asm/unaligned.h> |
19 | 20 | ||
20 | #include "hw.h" | 21 | #include "hw.h" |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 6063f5463708..b78308c3c4d4 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -14,6 +14,8 @@ | |||
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/slab.h> | ||
18 | |||
17 | #include "ath9k.h" | 19 | #include "ath9k.h" |
18 | 20 | ||
19 | static char *dev_info = "ath9k"; | 21 | static char *dev_info = "ath9k"; |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 67ca4e5a6017..115e1aeedb59 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1532,8 +1532,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) | |||
1532 | all_wiphys_idle = ath9k_all_wiphys_idle(sc); | 1532 | all_wiphys_idle = ath9k_all_wiphys_idle(sc); |
1533 | ath9k_set_wiphy_idle(aphy, idle); | 1533 | ath9k_set_wiphy_idle(aphy, idle); |
1534 | 1534 | ||
1535 | if (!idle && all_wiphys_idle) | 1535 | enable_radio = (!idle && all_wiphys_idle); |
1536 | enable_radio = true; | ||
1537 | 1536 | ||
1538 | /* | 1537 | /* |
1539 | * After we unlock here its possible another wiphy | 1538 | * After we unlock here its possible another wiphy |
diff --git a/drivers/net/wireless/ath/ath9k/phy.c b/drivers/net/wireless/ath/ath9k/phy.c index c3b59390fe38..2547b3c4a26c 100644 --- a/drivers/net/wireless/ath/ath9k/phy.c +++ b/drivers/net/wireless/ath/ath9k/phy.c | |||
@@ -39,6 +39,8 @@ | |||
39 | * AR9287 - 11n single-band 1x1 MIMO for USB | 39 | * AR9287 - 11n single-band 1x1 MIMO for USB |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include <linux/slab.h> | ||
43 | |||
42 | #include "hw.h" | 44 | #include "hw.h" |
43 | 45 | ||
44 | /** | 46 | /** |
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 3c4b5d2d9e16..ee81291f2fba 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -15,6 +15,8 @@ | |||
15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/slab.h> | ||
19 | |||
18 | #include "ath9k.h" | 20 | #include "ath9k.h" |
19 | 21 | ||
20 | static const struct ath_rate_table ar5416_11na_ratetable = { | 22 | static const struct ath_rate_table ar5416_11na_ratetable = { |
diff --git a/drivers/net/wireless/ath/ath9k/virtual.c b/drivers/net/wireless/ath/ath9k/virtual.c index a43fbf84dab9..00c0e21a4af7 100644 --- a/drivers/net/wireless/ath/ath9k/virtual.c +++ b/drivers/net/wireless/ath/ath9k/virtual.c | |||
@@ -14,6 +14,8 @@ | |||
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/slab.h> | ||
18 | |||
17 | #include "ath9k.h" | 19 | #include "ath9k.h" |
18 | 20 | ||
19 | struct ath9k_vif_iter_data { | 21 | struct ath9k_vif_iter_data { |
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c index 04abd1f556b7..00489c40be0c 100644 --- a/drivers/net/wireless/ath/regd.c +++ b/drivers/net/wireless/ath/regd.c | |||
@@ -15,7 +15,6 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/slab.h> | ||
19 | #include <net/cfg80211.h> | 18 | #include <net/cfg80211.h> |
20 | #include <net/mac80211.h> | 19 | #include <net/mac80211.h> |
21 | #include "regd.h" | 20 | #include "regd.h" |
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index be7abf8916ad..fa40fdfea719 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
39 | #include <linux/skbuff.h> | 39 | #include <linux/skbuff.h> |
40 | #include <linux/etherdevice.h> | 40 | #include <linux/etherdevice.h> |
41 | #include <linux/slab.h> | ||
41 | #include <asm/div64.h> | 42 | #include <asm/div64.h> |
42 | 43 | ||
43 | 44 | ||
diff --git a/drivers/net/wireless/b43/lo.c b/drivers/net/wireless/b43/lo.c index 976104f634a1..94e4f1378fc3 100644 --- a/drivers/net/wireless/b43/lo.c +++ b/drivers/net/wireless/b43/lo.c | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/sched.h> | 36 | #include <linux/sched.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | 39 | ||
39 | static struct b43_lo_calib *b43_find_lo_calib(struct b43_txpower_lo_control *lo, | 40 | static struct b43_lo_calib *b43_find_lo_calib(struct b43_txpower_lo_control *lo, |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 14cf3bd7ea51..997303bcf4ae 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/skbuff.h> | 42 | #include <linux/skbuff.h> |
43 | #include <linux/io.h> | 43 | #include <linux/io.h> |
44 | #include <linux/dma-mapping.h> | 44 | #include <linux/dma-mapping.h> |
45 | #include <linux/slab.h> | ||
45 | #include <asm/unaligned.h> | 46 | #include <asm/unaligned.h> |
46 | 47 | ||
47 | #include "b43.h" | 48 | #include "b43.h" |
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c index 984174bc7b0f..609e7051e018 100644 --- a/drivers/net/wireless/b43/pcmcia.c +++ b/drivers/net/wireless/b43/pcmcia.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "pcmcia.h" | 24 | #include "pcmcia.h" |
25 | 25 | ||
26 | #include <linux/ssb/ssb.h> | 26 | #include <linux/ssb/ssb.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include <pcmcia/cs_types.h> | 29 | #include <pcmcia/cs_types.h> |
29 | #include <pcmcia/cs.h> | 30 | #include <pcmcia/cs.h> |
diff --git a/drivers/net/wireless/b43/phy_a.c b/drivers/net/wireless/b43/phy_a.c index d90217c3a706..b6428ec16dd6 100644 --- a/drivers/net/wireless/b43/phy_a.c +++ b/drivers/net/wireless/b43/phy_a.c | |||
@@ -26,6 +26,8 @@ | |||
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/slab.h> | ||
30 | |||
29 | #include "b43.h" | 31 | #include "b43.h" |
30 | #include "phy_a.h" | 32 | #include "phy_a.h" |
31 | #include "phy_common.h" | 33 | #include "phy_common.h" |
diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c index 382826a8da82..29bf34ced865 100644 --- a/drivers/net/wireless/b43/phy_g.c +++ b/drivers/net/wireless/b43/phy_g.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "main.h" | 33 | #include "main.h" |
34 | 34 | ||
35 | #include <linux/bitrev.h> | 35 | #include <linux/bitrev.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | 38 | ||
38 | static const s8 b43_tssi2dbm_g_table[] = { | 39 | static const s8 b43_tssi2dbm_g_table[] = { |
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c index 185219e0a552..c6afe9d94590 100644 --- a/drivers/net/wireless/b43/phy_lp.c +++ b/drivers/net/wireless/b43/phy_lp.c | |||
@@ -23,6 +23,8 @@ | |||
23 | 23 | ||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/slab.h> | ||
27 | |||
26 | #include "b43.h" | 28 | #include "b43.h" |
27 | #include "main.h" | 29 | #include "main.h" |
28 | #include "phy_lp.h" | 30 | #include "phy_lp.h" |
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 6fd140ac7f9e..c4dc369ce703 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/types.h> | 27 | #include <linux/types.h> |
27 | 28 | ||
28 | #include "b43.h" | 29 | #include "b43.h" |
diff --git a/drivers/net/wireless/b43/pio.c b/drivers/net/wireless/b43/pio.c index a6062c3e89a5..aa12273ae716 100644 --- a/drivers/net/wireless/b43/pio.c +++ b/drivers/net/wireless/b43/pio.c | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | 36 | ||
36 | static u16 generate_cookie(struct b43_pio_txqueue *q, | 37 | static u16 generate_cookie(struct b43_pio_txqueue *q, |
diff --git a/drivers/net/wireless/b43/sdio.c b/drivers/net/wireless/b43/sdio.c index 0d3ac64147a5..4e56b7bbcebd 100644 --- a/drivers/net/wireless/b43/sdio.c +++ b/drivers/net/wireless/b43/sdio.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/mmc/card.h> | 16 | #include <linux/mmc/card.h> |
17 | #include <linux/mmc/sdio_func.h> | 17 | #include <linux/mmc/sdio_func.h> |
18 | #include <linux/mmc/sdio_ids.h> | 18 | #include <linux/mmc/sdio_ids.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/ssb/ssb.h> | 20 | #include <linux/ssb/ssb.h> |
20 | 21 | ||
21 | #include "sdio.h" | 22 | #include "sdio.h" |
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c index 8b9387c6ff36..e91520d0312e 100644 --- a/drivers/net/wireless/b43legacy/dma.c +++ b/drivers/net/wireless/b43legacy/dma.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
38 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
39 | #include <linux/skbuff.h> | 39 | #include <linux/skbuff.h> |
40 | #include <linux/slab.h> | ||
40 | #include <net/dst.h> | 41 | #include <net/dst.h> |
41 | 42 | ||
42 | /* 32bit DMA ops. */ | 43 | /* 32bit DMA ops. */ |
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index 1d070be5a678..bb2dd9329aa0 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/sched.h> | 40 | #include <linux/sched.h> |
41 | #include <linux/skbuff.h> | 41 | #include <linux/skbuff.h> |
42 | #include <linux/dma-mapping.h> | 42 | #include <linux/dma-mapping.h> |
43 | #include <linux/slab.h> | ||
43 | #include <net/dst.h> | 44 | #include <net/dst.h> |
44 | #include <asm/unaligned.h> | 45 | #include <asm/unaligned.h> |
45 | 46 | ||
diff --git a/drivers/net/wireless/b43legacy/phy.c b/drivers/net/wireless/b43legacy/phy.c index aaf227203a98..35033dd342ce 100644 --- a/drivers/net/wireless/b43legacy/phy.c +++ b/drivers/net/wireless/b43legacy/phy.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
34 | #include <linux/sched.h> | 34 | #include <linux/sched.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/types.h> | 36 | #include <linux/types.h> |
36 | 37 | ||
37 | #include "b43legacy.h" | 38 | #include "b43legacy.h" |
diff --git a/drivers/net/wireless/b43legacy/pio.c b/drivers/net/wireless/b43legacy/pio.c index 017c0e9c37ef..b033b0ed4ca0 100644 --- a/drivers/net/wireless/b43legacy/pio.c +++ b/drivers/net/wireless/b43legacy/pio.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "xmit.h" | 29 | #include "xmit.h" |
30 | 30 | ||
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | 34 | ||
34 | static void tx_start(struct b43legacy_pioqueue *queue) | 35 | static void tx_start(struct b43legacy_pioqueue *queue) |
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c index 3816df96a663..f4c56121d387 100644 --- a/drivers/net/wireless/hostap/hostap_80211_rx.c +++ b/drivers/net/wireless/hostap/hostap_80211_rx.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/etherdevice.h> | 1 | #include <linux/etherdevice.h> |
2 | #include <linux/slab.h> | ||
2 | #include <net/lib80211.h> | 3 | #include <net/lib80211.h> |
3 | #include <linux/if_arp.h> | 4 | #include <linux/if_arp.h> |
4 | 5 | ||
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c index 90108b698f11..c34a3b7f1292 100644 --- a/drivers/net/wireless/hostap/hostap_80211_tx.c +++ b/drivers/net/wireless/hostap/hostap_80211_tx.c | |||
@@ -1,3 +1,5 @@ | |||
1 | #include <linux/slab.h> | ||
2 | |||
1 | #include "hostap_80211.h" | 3 | #include "hostap_80211.h" |
2 | #include "hostap_common.h" | 4 | #include "hostap_common.h" |
3 | #include "hostap_wlan.h" | 5 | #include "hostap_wlan.h" |
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index a2a203c90ba3..7e72ac1de49b 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/random.h> | 21 | #include <linux/random.h> |
22 | #include <linux/if_arp.h> | 22 | #include <linux/if_arp.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include "hostap_wlan.h" | 25 | #include "hostap_wlan.h" |
25 | #include "hostap.h" | 26 | #include "hostap.h" |
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index d19748d90aaf..a36501dbbe02 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include <linux/init.h> | 4 | #include <linux/init.h> |
5 | #include <linux/if.h> | 5 | #include <linux/if.h> |
6 | #include <linux/slab.h> | ||
6 | #include <linux/wait.h> | 7 | #include <linux/wait.h> |
7 | #include <linux/timer.h> | 8 | #include <linux/timer.h> |
8 | #include <linux/skbuff.h> | 9 | #include <linux/skbuff.h> |
diff --git a/drivers/net/wireless/hostap/hostap_info.c b/drivers/net/wireless/hostap/hostap_info.c index 4dfb40a84c96..d737091cf6ac 100644 --- a/drivers/net/wireless/hostap/hostap_info.c +++ b/drivers/net/wireless/hostap/hostap_info.c | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | #include <linux/if_arp.h> | 3 | #include <linux/if_arp.h> |
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <linux/slab.h> | ||
5 | #include "hostap_wlan.h" | 6 | #include "hostap_wlan.h" |
6 | #include "hostap.h" | 7 | #include "hostap.h" |
7 | #include "hostap_ap.h" | 8 | #include "hostap_ap.h" |
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c index 9419cebca8a5..9a082308a9d4 100644 --- a/drivers/net/wireless/hostap/hostap_ioctl.c +++ b/drivers/net/wireless/hostap/hostap_ioctl.c | |||
@@ -1,5 +1,6 @@ | |||
1 | /* ioctl() (mostly Linux Wireless Extensions) routines for Host AP driver */ | 1 | /* ioctl() (mostly Linux Wireless Extensions) routines for Host AP driver */ |
2 | 2 | ||
3 | #include <linux/slab.h> | ||
3 | #include <linux/types.h> | 4 | #include <linux/types.h> |
4 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
5 | #include <linux/ethtool.h> | 6 | #include <linux/ethtool.h> |
diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c index 4d97ae37499b..d24dc7dc0723 100644 --- a/drivers/net/wireless/hostap/hostap_pci.c +++ b/drivers/net/wireless/hostap/hostap_pci.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/if.h> | 9 | #include <linux/if.h> |
10 | #include <linux/skbuff.h> | 10 | #include <linux/skbuff.h> |
11 | #include <linux/netdevice.h> | 11 | #include <linux/netdevice.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/workqueue.h> | 13 | #include <linux/workqueue.h> |
13 | #include <linux/wireless.h> | 14 | #include <linux/wireless.h> |
14 | #include <net/iw_handler.h> | 15 | #include <net/iw_handler.h> |
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c index fc04ccdc5bef..33e79037770b 100644 --- a/drivers/net/wireless/hostap/hostap_plx.c +++ b/drivers/net/wireless/hostap/hostap_plx.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/if.h> | 12 | #include <linux/if.h> |
13 | #include <linux/skbuff.h> | 13 | #include <linux/skbuff.h> |
14 | #include <linux/netdevice.h> | 14 | #include <linux/netdevice.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/workqueue.h> | 16 | #include <linux/workqueue.h> |
16 | #include <linux/wireless.h> | 17 | #include <linux/wireless.h> |
17 | #include <net/iw_handler.h> | 18 | #include <net/iw_handler.h> |
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index cb3ba134865e..7266730680bc 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -31,6 +31,7 @@ | |||
31 | ******************************************************************************/ | 31 | ******************************************************************************/ |
32 | 32 | ||
33 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
34 | #include <linux/slab.h> | ||
34 | #include "ipw2200.h" | 35 | #include "ipw2200.h" |
35 | 36 | ||
36 | 37 | ||
diff --git a/drivers/net/wireless/ipw2x00/libipw_geo.c b/drivers/net/wireless/ipw2x00/libipw_geo.c index 65e8c175a4a0..c9fe3c99cb00 100644 --- a/drivers/net/wireless/ipw2x00/libipw_geo.c +++ b/drivers/net/wireless/ipw2x00/libipw_geo.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/netdevice.h> | 34 | #include <linux/netdevice.h> |
35 | #include <linux/proc_fs.h> | 35 | #include <linux/proc_fs.h> |
36 | #include <linux/skbuff.h> | 36 | #include <linux/skbuff.h> |
37 | #include <linux/slab.h> | ||
38 | #include <linux/tcp.h> | 37 | #include <linux/tcp.h> |
39 | #include <linux/types.h> | 38 | #include <linux/types.h> |
40 | #include <linux/wireless.h> | 39 | #include <linux/wireless.h> |
diff --git a/drivers/net/wireless/ipw2x00/libipw_rx.c b/drivers/net/wireless/ipw2x00/libipw_rx.c index 282b1f7ff1e9..39a34da52d52 100644 --- a/drivers/net/wireless/ipw2x00/libipw_rx.c +++ b/drivers/net/wireless/ipw2x00/libipw_rx.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/if_arp.h> | 18 | #include <linux/if_arp.h> |
19 | #include <linux/in6.h> | 19 | #include <linux/in6.h> |
20 | #include <linux/gfp.h> | ||
20 | #include <linux/in.h> | 21 | #include <linux/in.h> |
21 | #include <linux/ip.h> | 22 | #include <linux/ip.h> |
22 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
@@ -24,7 +25,6 @@ | |||
24 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
25 | #include <linux/proc_fs.h> | 26 | #include <linux/proc_fs.h> |
26 | #include <linux/skbuff.h> | 27 | #include <linux/skbuff.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/tcp.h> | 28 | #include <linux/tcp.h> |
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #include <linux/wireless.h> | 30 | #include <linux/wireless.h> |
diff --git a/drivers/net/wireless/ipw2x00/libipw_wx.c b/drivers/net/wireless/ipw2x00/libipw_wx.c index 4d89f66f53b2..3633c6682e49 100644 --- a/drivers/net/wireless/ipw2x00/libipw_wx.c +++ b/drivers/net/wireless/ipw2x00/libipw_wx.c | |||
@@ -31,6 +31,7 @@ | |||
31 | ******************************************************************************/ | 31 | ******************************************************************************/ |
32 | 32 | ||
33 | #include <linux/kmod.h> | 33 | #include <linux/kmod.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/module.h> | 35 | #include <linux/module.h> |
35 | #include <linux/jiffies.h> | 36 | #include <linux/jiffies.h> |
36 | 37 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c index 605aca4c78c8..8f85a0db5c39 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/skbuff.h> | 29 | #include <linux/skbuff.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/wireless.h> | 31 | #include <linux/wireless.h> |
31 | #include <net/mac80211.h> | 32 | #include <net/mac80211.h> |
32 | 33 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 3b5889d8d662..7ac6cec006d0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
31 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
32 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 3297fc7b80bf..89aba76e4a2c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -2021,7 +2021,9 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, | |||
2021 | IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn " | 2021 | IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn " |
2022 | "%d index %d\n", scd_ssn , index); | 2022 | "%d index %d\n", scd_ssn , index); |
2023 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); | 2023 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); |
2024 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); | 2024 | if (qc) |
2025 | iwl_free_tfds_in_queue(priv, sta_id, | ||
2026 | tid, freed); | ||
2025 | 2027 | ||
2026 | if (priv->mac80211_registered && | 2028 | if (priv->mac80211_registered && |
2027 | (iwl_queue_space(&txq->q) > txq->q.low_mark) && | 2029 | (iwl_queue_space(&txq->q) > txq->q.low_mark) && |
@@ -2047,14 +2049,17 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, | |||
2047 | tx_resp->failure_frame); | 2049 | tx_resp->failure_frame); |
2048 | 2050 | ||
2049 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); | 2051 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); |
2050 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); | 2052 | if (qc && likely(sta_id != IWL_INVALID_STATION)) |
2053 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); | ||
2054 | else if (sta_id == IWL_INVALID_STATION) | ||
2055 | IWL_DEBUG_TX_REPLY(priv, "Station not known\n"); | ||
2051 | 2056 | ||
2052 | if (priv->mac80211_registered && | 2057 | if (priv->mac80211_registered && |
2053 | (iwl_queue_space(&txq->q) > txq->q.low_mark)) | 2058 | (iwl_queue_space(&txq->q) > txq->q.low_mark)) |
2054 | iwl_wake_queue(priv, txq_id); | 2059 | iwl_wake_queue(priv, txq_id); |
2055 | } | 2060 | } |
2056 | 2061 | if (qc && likely(sta_id != IWL_INVALID_STATION)) | |
2057 | iwl_txq_check_empty(priv, sta_id, tid, txq_id); | 2062 | iwl_txq_check_empty(priv, sta_id, tid, txq_id); |
2058 | 2063 | ||
2059 | if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) | 2064 | if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) |
2060 | IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n"); | 2065 | IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n"); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 5155b1a027eb..0de80914be77 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/skbuff.h> | 28 | #include <linux/skbuff.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/wireless.h> | 30 | #include <linux/wireless.h> |
30 | #include <net/mac80211.h> | 31 | #include <net/mac80211.h> |
31 | 32 | ||
@@ -345,6 +346,17 @@ static inline int get_num_of_ant_from_rate(u32 rate_n_flags) | |||
345 | !!(rate_n_flags & RATE_MCS_ANT_C_MSK); | 346 | !!(rate_n_flags & RATE_MCS_ANT_C_MSK); |
346 | } | 347 | } |
347 | 348 | ||
349 | /* | ||
350 | * Static function to get the expected throughput from an iwl_scale_tbl_info | ||
351 | * that wraps a NULL pointer check | ||
352 | */ | ||
353 | static s32 get_expected_tpt(struct iwl_scale_tbl_info *tbl, int rs_index) | ||
354 | { | ||
355 | if (tbl->expected_tpt) | ||
356 | return tbl->expected_tpt[rs_index]; | ||
357 | return 0; | ||
358 | } | ||
359 | |||
348 | /** | 360 | /** |
349 | * rs_collect_tx_data - Update the success/failure sliding window | 361 | * rs_collect_tx_data - Update the success/failure sliding window |
350 | * | 362 | * |
@@ -352,19 +364,21 @@ static inline int get_num_of_ant_from_rate(u32 rate_n_flags) | |||
352 | * at this rate. window->data contains the bitmask of successful | 364 | * at this rate. window->data contains the bitmask of successful |
353 | * packets. | 365 | * packets. |
354 | */ | 366 | */ |
355 | static int rs_collect_tx_data(struct iwl_rate_scale_data *windows, | 367 | static int rs_collect_tx_data(struct iwl_scale_tbl_info *tbl, |
356 | int scale_index, s32 tpt, int attempts, | 368 | int scale_index, int attempts, int successes) |
357 | int successes) | ||
358 | { | 369 | { |
359 | struct iwl_rate_scale_data *window = NULL; | 370 | struct iwl_rate_scale_data *window = NULL; |
360 | static const u64 mask = (((u64)1) << (IWL_RATE_MAX_WINDOW - 1)); | 371 | static const u64 mask = (((u64)1) << (IWL_RATE_MAX_WINDOW - 1)); |
361 | s32 fail_count; | 372 | s32 fail_count, tpt; |
362 | 373 | ||
363 | if (scale_index < 0 || scale_index >= IWL_RATE_COUNT) | 374 | if (scale_index < 0 || scale_index >= IWL_RATE_COUNT) |
364 | return -EINVAL; | 375 | return -EINVAL; |
365 | 376 | ||
366 | /* Select window for current tx bit rate */ | 377 | /* Select window for current tx bit rate */ |
367 | window = &(windows[scale_index]); | 378 | window = &(tbl->win[scale_index]); |
379 | |||
380 | /* Get expected throughput */ | ||
381 | tpt = get_expected_tpt(tbl, scale_index); | ||
368 | 382 | ||
369 | /* | 383 | /* |
370 | * Keep track of only the latest 62 tx frame attempts in this rate's | 384 | * Keep track of only the latest 62 tx frame attempts in this rate's |
@@ -734,16 +748,6 @@ static bool table_type_matches(struct iwl_scale_tbl_info *a, | |||
734 | return (a->lq_type == b->lq_type) && (a->ant_type == b->ant_type) && | 748 | return (a->lq_type == b->lq_type) && (a->ant_type == b->ant_type) && |
735 | (a->is_SGI == b->is_SGI); | 749 | (a->is_SGI == b->is_SGI); |
736 | } | 750 | } |
737 | /* | ||
738 | * Static function to get the expected throughput from an iwl_scale_tbl_info | ||
739 | * that wraps a NULL pointer check | ||
740 | */ | ||
741 | static s32 get_expected_tpt(struct iwl_scale_tbl_info *tbl, int rs_index) | ||
742 | { | ||
743 | if (tbl->expected_tpt) | ||
744 | return tbl->expected_tpt[rs_index]; | ||
745 | return 0; | ||
746 | } | ||
747 | 751 | ||
748 | /* | 752 | /* |
749 | * mac80211 sends us Tx status | 753 | * mac80211 sends us Tx status |
@@ -760,12 +764,10 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband, | |||
760 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | 764 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
761 | struct iwl_priv *priv = (struct iwl_priv *)priv_r; | 765 | struct iwl_priv *priv = (struct iwl_priv *)priv_r; |
762 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 766 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
763 | struct iwl_rate_scale_data *window = NULL; | ||
764 | enum mac80211_rate_control_flags mac_flags; | 767 | enum mac80211_rate_control_flags mac_flags; |
765 | u32 tx_rate; | 768 | u32 tx_rate; |
766 | struct iwl_scale_tbl_info tbl_type; | 769 | struct iwl_scale_tbl_info tbl_type; |
767 | struct iwl_scale_tbl_info *curr_tbl, *other_tbl; | 770 | struct iwl_scale_tbl_info *curr_tbl, *other_tbl, *tmp_tbl; |
768 | s32 tpt = 0; | ||
769 | 771 | ||
770 | IWL_DEBUG_RATE_LIMIT(priv, "get frame ack response, update rate scale window\n"); | 772 | IWL_DEBUG_RATE_LIMIT(priv, "get frame ack response, update rate scale window\n"); |
771 | 773 | ||
@@ -853,7 +855,6 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband, | |||
853 | IWL_DEBUG_RATE(priv, "Neither active nor search matches tx rate\n"); | 855 | IWL_DEBUG_RATE(priv, "Neither active nor search matches tx rate\n"); |
854 | return; | 856 | return; |
855 | } | 857 | } |
856 | window = (struct iwl_rate_scale_data *)&(curr_tbl->win[0]); | ||
857 | 858 | ||
858 | /* | 859 | /* |
859 | * Updating the frame history depends on whether packets were | 860 | * Updating the frame history depends on whether packets were |
@@ -866,8 +867,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband, | |||
866 | tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags); | 867 | tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags); |
867 | rs_get_tbl_info_from_mcs(tx_rate, priv->band, &tbl_type, | 868 | rs_get_tbl_info_from_mcs(tx_rate, priv->band, &tbl_type, |
868 | &rs_index); | 869 | &rs_index); |
869 | tpt = get_expected_tpt(curr_tbl, rs_index); | 870 | rs_collect_tx_data(curr_tbl, rs_index, |
870 | rs_collect_tx_data(window, rs_index, tpt, | ||
871 | info->status.ampdu_ack_len, | 871 | info->status.ampdu_ack_len, |
872 | info->status.ampdu_ack_map); | 872 | info->status.ampdu_ack_map); |
873 | 873 | ||
@@ -897,19 +897,13 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband, | |||
897 | * table as active/search. | 897 | * table as active/search. |
898 | */ | 898 | */ |
899 | if (table_type_matches(&tbl_type, curr_tbl)) | 899 | if (table_type_matches(&tbl_type, curr_tbl)) |
900 | tpt = get_expected_tpt(curr_tbl, rs_index); | 900 | tmp_tbl = curr_tbl; |
901 | else if (table_type_matches(&tbl_type, other_tbl)) | 901 | else if (table_type_matches(&tbl_type, other_tbl)) |
902 | tpt = get_expected_tpt(other_tbl, rs_index); | 902 | tmp_tbl = other_tbl; |
903 | else | 903 | else |
904 | continue; | 904 | continue; |
905 | 905 | rs_collect_tx_data(tmp_tbl, rs_index, 1, | |
906 | /* Constants mean 1 transmission, 0 successes */ | 906 | i < retries ? 0 : legacy_success); |
907 | if (i < retries) | ||
908 | rs_collect_tx_data(window, rs_index, tpt, 1, | ||
909 | 0); | ||
910 | else | ||
911 | rs_collect_tx_data(window, rs_index, tpt, 1, | ||
912 | legacy_success); | ||
913 | } | 907 | } |
914 | 908 | ||
915 | /* Update success/fail counts if not searching for new mode */ | 909 | /* Update success/fail counts if not searching for new mode */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index f43a45d0f1dd..fe4cec61bdec 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/dma-mapping.h> | 35 | #include <linux/dma-mapping.h> |
35 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
36 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
diff --git a/drivers/net/wireless/iwlwifi/iwl-calib.c b/drivers/net/wireless/iwlwifi/iwl-calib.c index 845831ac053e..de3b3f403d1f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-calib.c +++ b/drivers/net/wireless/iwlwifi/iwl-calib.c | |||
@@ -60,6 +60,7 @@ | |||
60 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 60 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
61 | *****************************************************************************/ | 61 | *****************************************************************************/ |
62 | 62 | ||
63 | #include <linux/slab.h> | ||
63 | #include <net/mac80211.h> | 64 | #include <net/mac80211.h> |
64 | 65 | ||
65 | #include "iwl-dev.h" | 66 | #include "iwl-dev.h" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 5180fb24cd38..0ee8cc296e48 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/etherdevice.h> | 31 | #include <linux/etherdevice.h> |
32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
33 | #include <linux/slab.h> | ||
33 | #include <net/mac80211.h> | 34 | #include <net/mac80211.h> |
34 | 35 | ||
35 | #include "iwl-eeprom.h" | 36 | #include "iwl-eeprom.h" |
@@ -305,10 +306,13 @@ int iwl_hw_nic_init(struct iwl_priv *priv) | |||
305 | 306 | ||
306 | spin_unlock_irqrestore(&priv->lock, flags); | 307 | spin_unlock_irqrestore(&priv->lock, flags); |
307 | 308 | ||
308 | /* Allocate and init all Tx and Command queues */ | 309 | /* Allocate or reset and init all Tx and Command queues */ |
309 | ret = iwl_txq_ctx_reset(priv); | 310 | if (!priv->txq) { |
310 | if (ret) | 311 | ret = iwl_txq_ctx_alloc(priv); |
311 | return ret; | 312 | if (ret) |
313 | return ret; | ||
314 | } else | ||
315 | iwl_txq_ctx_reset(priv); | ||
312 | 316 | ||
313 | set_bit(STATUS_INIT, &priv->status); | 317 | set_bit(STATUS_INIT, &priv->status); |
314 | 318 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index b3e698b576e1..f3b6c72d82cd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -455,7 +455,8 @@ void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb); | |||
455 | /***************************************************** | 455 | /***************************************************** |
456 | * TX | 456 | * TX |
457 | ******************************************************/ | 457 | ******************************************************/ |
458 | int iwl_txq_ctx_reset(struct iwl_priv *priv); | 458 | int iwl_txq_ctx_alloc(struct iwl_priv *priv); |
459 | void iwl_txq_ctx_reset(struct iwl_priv *priv); | ||
459 | void iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq); | 460 | void iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq); |
460 | int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, | 461 | int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, |
461 | struct iwl_tx_queue *txq, | 462 | struct iwl_tx_queue *txq, |
@@ -469,6 +470,8 @@ void iwl_free_tfds_in_queue(struct iwl_priv *priv, | |||
469 | void iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq); | 470 | void iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq); |
470 | int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq, | 471 | int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq, |
471 | int slots_num, u32 txq_id); | 472 | int slots_num, u32 txq_id); |
473 | void iwl_tx_queue_reset(struct iwl_priv *priv, struct iwl_tx_queue *txq, | ||
474 | int slots_num, u32 txq_id); | ||
472 | void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id); | 475 | void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id); |
473 | int iwl_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn); | 476 | int iwl_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn); |
474 | int iwl_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid); | 477 | int iwl_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index 5f5820249a29..607a91f3eb6b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -26,6 +26,7 @@ | |||
26 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | 26 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
27 | *****************************************************************************/ | 27 | *****************************************************************************/ |
28 | 28 | ||
29 | #include <linux/slab.h> | ||
29 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
30 | #include <linux/module.h> | 31 | #include <linux/module.h> |
31 | #include <linux/debugfs.h> | 32 | #include <linux/debugfs.h> |
diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.c b/drivers/net/wireless/iwlwifi/iwl-devtrace.c index 36580d8d8b8d..2ffc2edbf4f0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-devtrace.c +++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.c | |||
@@ -28,6 +28,8 @@ | |||
28 | 28 | ||
29 | /* sparse doesn't like tracepoint macros */ | 29 | /* sparse doesn't like tracepoint macros */ |
30 | #ifndef __CHECKER__ | 30 | #ifndef __CHECKER__ |
31 | #include "iwl-dev.h" | ||
32 | |||
31 | #define CREATE_TRACE_POINTS | 33 | #define CREATE_TRACE_POINTS |
32 | #include "iwl-devtrace.h" | 34 | #include "iwl-devtrace.h" |
33 | 35 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.h b/drivers/net/wireless/iwlwifi/iwl-devtrace.h index ff4d012ce260..ae7319bb3a99 100644 --- a/drivers/net/wireless/iwlwifi/iwl-devtrace.h +++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.h | |||
@@ -28,7 +28,6 @@ | |||
28 | #define __IWLWIFI_DEVICE_TRACE | 28 | #define __IWLWIFI_DEVICE_TRACE |
29 | 29 | ||
30 | #include <linux/tracepoint.h> | 30 | #include <linux/tracepoint.h> |
31 | #include "iwl-dev.h" | ||
32 | 31 | ||
33 | #if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__) | 32 | #if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__) |
34 | #undef TRACE_EVENT | 33 | #undef TRACE_EVENT |
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index fd37152abae3..fb5bb487f3bc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c | |||
@@ -63,6 +63,7 @@ | |||
63 | 63 | ||
64 | #include <linux/kernel.h> | 64 | #include <linux/kernel.h> |
65 | #include <linux/module.h> | 65 | #include <linux/module.h> |
66 | #include <linux/slab.h> | ||
66 | #include <linux/init.h> | 67 | #include <linux/init.h> |
67 | 68 | ||
68 | #include <net/mac80211.h> | 69 | #include <net/mac80211.h> |
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h index c719baf2585a..16eb3ced9b30 100644 --- a/drivers/net/wireless/iwlwifi/iwl-io.h +++ b/drivers/net/wireless/iwlwifi/iwl-io.h | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | 33 | ||
34 | #include "iwl-dev.h" | ||
34 | #include "iwl-debug.h" | 35 | #include "iwl-debug.h" |
35 | #include "iwl-devtrace.h" | 36 | #include "iwl-devtrace.h" |
36 | 37 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 1a1a9f081cc7..548dac2f6a96 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/init.h> | 33 | #include <linux/init.h> |
33 | 34 | ||
34 | #include <net/mac80211.h> | 35 | #include <net/mac80211.h> |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 2fa30dfb7c59..d3b2fb389e58 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -28,6 +28,7 @@ | |||
28 | *****************************************************************************/ | 28 | *****************************************************************************/ |
29 | 29 | ||
30 | #include <linux/etherdevice.h> | 30 | #include <linux/etherdevice.h> |
31 | #include <linux/slab.h> | ||
31 | #include <net/mac80211.h> | 32 | #include <net/mac80211.h> |
32 | #include <asm/unaligned.h> | 33 | #include <asm/unaligned.h> |
33 | #include "iwl-eeprom.h" | 34 | #include "iwl-eeprom.h" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 84b19b12ff03..e8e4b5493e89 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -25,6 +25,7 @@ | |||
25 | * Intel Linux Wireless <ilw@linux.intel.com> | 25 | * Intel Linux Wireless <ilw@linux.intel.com> |
26 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | 26 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
27 | *****************************************************************************/ | 27 | *****************************************************************************/ |
28 | #include <linux/slab.h> | ||
28 | #include <linux/types.h> | 29 | #include <linux/types.h> |
29 | #include <linux/etherdevice.h> | 30 | #include <linux/etherdevice.h> |
30 | #include <net/mac80211.h> | 31 | #include <net/mac80211.h> |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index 1e481f3fcabf..b798fbabc3b6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/etherdevice.h> | 30 | #include <linux/etherdevice.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <linux/slab.h> | ||
32 | #include <net/mac80211.h> | 33 | #include <net/mac80211.h> |
33 | #include "iwl-eeprom.h" | 34 | #include "iwl-eeprom.h" |
34 | #include "iwl-dev.h" | 35 | #include "iwl-dev.h" |
@@ -230,10 +231,34 @@ void iwl_cmd_queue_free(struct iwl_priv *priv) | |||
230 | struct iwl_queue *q = &txq->q; | 231 | struct iwl_queue *q = &txq->q; |
231 | struct device *dev = &priv->pci_dev->dev; | 232 | struct device *dev = &priv->pci_dev->dev; |
232 | int i; | 233 | int i; |
234 | bool huge = false; | ||
233 | 235 | ||
234 | if (q->n_bd == 0) | 236 | if (q->n_bd == 0) |
235 | return; | 237 | return; |
236 | 238 | ||
239 | for (; q->read_ptr != q->write_ptr; | ||
240 | q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) { | ||
241 | /* we have no way to tell if it is a huge cmd ATM */ | ||
242 | i = get_cmd_index(q, q->read_ptr, 0); | ||
243 | |||
244 | if (txq->meta[i].flags & CMD_SIZE_HUGE) { | ||
245 | huge = true; | ||
246 | continue; | ||
247 | } | ||
248 | |||
249 | pci_unmap_single(priv->pci_dev, | ||
250 | pci_unmap_addr(&txq->meta[i], mapping), | ||
251 | pci_unmap_len(&txq->meta[i], len), | ||
252 | PCI_DMA_BIDIRECTIONAL); | ||
253 | } | ||
254 | if (huge) { | ||
255 | i = q->n_window; | ||
256 | pci_unmap_single(priv->pci_dev, | ||
257 | pci_unmap_addr(&txq->meta[i], mapping), | ||
258 | pci_unmap_len(&txq->meta[i], len), | ||
259 | PCI_DMA_BIDIRECTIONAL); | ||
260 | } | ||
261 | |||
237 | /* De-alloc array of command/tx buffers */ | 262 | /* De-alloc array of command/tx buffers */ |
238 | for (i = 0; i <= TFD_CMD_SLOTS; i++) | 263 | for (i = 0; i <= TFD_CMD_SLOTS; i++) |
239 | kfree(txq->cmd[i]); | 264 | kfree(txq->cmd[i]); |
@@ -448,6 +473,26 @@ out_free_arrays: | |||
448 | } | 473 | } |
449 | EXPORT_SYMBOL(iwl_tx_queue_init); | 474 | EXPORT_SYMBOL(iwl_tx_queue_init); |
450 | 475 | ||
476 | void iwl_tx_queue_reset(struct iwl_priv *priv, struct iwl_tx_queue *txq, | ||
477 | int slots_num, u32 txq_id) | ||
478 | { | ||
479 | int actual_slots = slots_num; | ||
480 | |||
481 | if (txq_id == IWL_CMD_QUEUE_NUM) | ||
482 | actual_slots++; | ||
483 | |||
484 | memset(txq->meta, 0, sizeof(struct iwl_cmd_meta) * actual_slots); | ||
485 | |||
486 | txq->need_update = 0; | ||
487 | |||
488 | /* Initialize queue's high/low-water marks, and head/tail indexes */ | ||
489 | iwl_queue_init(priv, &txq->q, TFD_QUEUE_SIZE_MAX, slots_num, txq_id); | ||
490 | |||
491 | /* Tell device where to find queue */ | ||
492 | priv->cfg->ops->lib->txq_init(priv, txq); | ||
493 | } | ||
494 | EXPORT_SYMBOL(iwl_tx_queue_reset); | ||
495 | |||
451 | /** | 496 | /** |
452 | * iwl_hw_txq_ctx_free - Free TXQ Context | 497 | * iwl_hw_txq_ctx_free - Free TXQ Context |
453 | * | 498 | * |
@@ -459,8 +504,7 @@ void iwl_hw_txq_ctx_free(struct iwl_priv *priv) | |||
459 | 504 | ||
460 | /* Tx queues */ | 505 | /* Tx queues */ |
461 | if (priv->txq) { | 506 | if (priv->txq) { |
462 | for (txq_id = 0; txq_id < priv->hw_params.max_txq_num; | 507 | for (txq_id = 0; txq_id < priv->hw_params.max_txq_num; txq_id++) |
463 | txq_id++) | ||
464 | if (txq_id == IWL_CMD_QUEUE_NUM) | 508 | if (txq_id == IWL_CMD_QUEUE_NUM) |
465 | iwl_cmd_queue_free(priv); | 509 | iwl_cmd_queue_free(priv); |
466 | else | 510 | else |
@@ -476,15 +520,15 @@ void iwl_hw_txq_ctx_free(struct iwl_priv *priv) | |||
476 | EXPORT_SYMBOL(iwl_hw_txq_ctx_free); | 520 | EXPORT_SYMBOL(iwl_hw_txq_ctx_free); |
477 | 521 | ||
478 | /** | 522 | /** |
479 | * iwl_txq_ctx_reset - Reset TX queue context | 523 | * iwl_txq_ctx_alloc - allocate TX queue context |
480 | * Destroys all DMA structures and initialize them again | 524 | * Allocate all Tx DMA structures and initialize them |
481 | * | 525 | * |
482 | * @param priv | 526 | * @param priv |
483 | * @return error code | 527 | * @return error code |
484 | */ | 528 | */ |
485 | int iwl_txq_ctx_reset(struct iwl_priv *priv) | 529 | int iwl_txq_ctx_alloc(struct iwl_priv *priv) |
486 | { | 530 | { |
487 | int ret = 0; | 531 | int ret; |
488 | int txq_id, slots_num; | 532 | int txq_id, slots_num; |
489 | unsigned long flags; | 533 | unsigned long flags; |
490 | 534 | ||
@@ -542,8 +586,31 @@ int iwl_txq_ctx_reset(struct iwl_priv *priv) | |||
542 | return ret; | 586 | return ret; |
543 | } | 587 | } |
544 | 588 | ||
589 | void iwl_txq_ctx_reset(struct iwl_priv *priv) | ||
590 | { | ||
591 | int txq_id, slots_num; | ||
592 | unsigned long flags; | ||
593 | |||
594 | spin_lock_irqsave(&priv->lock, flags); | ||
595 | |||
596 | /* Turn off all Tx DMA fifos */ | ||
597 | priv->cfg->ops->lib->txq_set_sched(priv, 0); | ||
598 | |||
599 | /* Tell NIC where to find the "keep warm" buffer */ | ||
600 | iwl_write_direct32(priv, FH_KW_MEM_ADDR_REG, priv->kw.dma >> 4); | ||
601 | |||
602 | spin_unlock_irqrestore(&priv->lock, flags); | ||
603 | |||
604 | /* Alloc and init all Tx queues, including the command queue (#4) */ | ||
605 | for (txq_id = 0; txq_id < priv->hw_params.max_txq_num; txq_id++) { | ||
606 | slots_num = txq_id == IWL_CMD_QUEUE_NUM ? | ||
607 | TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS; | ||
608 | iwl_tx_queue_reset(priv, &priv->txq[txq_id], slots_num, txq_id); | ||
609 | } | ||
610 | } | ||
611 | |||
545 | /** | 612 | /** |
546 | * iwl_txq_ctx_stop - Stop all Tx DMA channels, free Tx queue memory | 613 | * iwl_txq_ctx_stop - Stop all Tx DMA channels |
547 | */ | 614 | */ |
548 | void iwl_txq_ctx_stop(struct iwl_priv *priv) | 615 | void iwl_txq_ctx_stop(struct iwl_priv *priv) |
549 | { | 616 | { |
@@ -563,9 +630,6 @@ void iwl_txq_ctx_stop(struct iwl_priv *priv) | |||
563 | 1000); | 630 | 1000); |
564 | } | 631 | } |
565 | spin_unlock_irqrestore(&priv->lock, flags); | 632 | spin_unlock_irqrestore(&priv->lock, flags); |
566 | |||
567 | /* Deallocate memory for all Tx queues */ | ||
568 | iwl_hw_txq_ctx_free(priv); | ||
569 | } | 633 | } |
570 | EXPORT_SYMBOL(iwl_txq_ctx_stop); | 634 | EXPORT_SYMBOL(iwl_txq_ctx_stop); |
571 | 635 | ||
@@ -1075,6 +1139,14 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
1075 | 1139 | ||
1076 | spin_lock_irqsave(&priv->hcmd_lock, flags); | 1140 | spin_lock_irqsave(&priv->hcmd_lock, flags); |
1077 | 1141 | ||
1142 | /* If this is a huge cmd, mark the huge flag also on the meta.flags | ||
1143 | * of the _original_ cmd. This is used for DMA mapping clean up. | ||
1144 | */ | ||
1145 | if (cmd->flags & CMD_SIZE_HUGE) { | ||
1146 | idx = get_cmd_index(q, q->write_ptr, 0); | ||
1147 | txq->meta[idx].flags = CMD_SIZE_HUGE; | ||
1148 | } | ||
1149 | |||
1078 | idx = get_cmd_index(q, q->write_ptr, cmd->flags & CMD_SIZE_HUGE); | 1150 | idx = get_cmd_index(q, q->write_ptr, cmd->flags & CMD_SIZE_HUGE); |
1079 | out_cmd = txq->cmd[idx]; | 1151 | out_cmd = txq->cmd[idx]; |
1080 | out_meta = &txq->meta[idx]; | 1152 | out_meta = &txq->meta[idx]; |
@@ -1252,6 +1324,7 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) | |||
1252 | bool huge = !!(pkt->hdr.sequence & SEQ_HUGE_FRAME); | 1324 | bool huge = !!(pkt->hdr.sequence & SEQ_HUGE_FRAME); |
1253 | struct iwl_device_cmd *cmd; | 1325 | struct iwl_device_cmd *cmd; |
1254 | struct iwl_cmd_meta *meta; | 1326 | struct iwl_cmd_meta *meta; |
1327 | struct iwl_tx_queue *txq = &priv->txq[IWL_CMD_QUEUE_NUM]; | ||
1255 | 1328 | ||
1256 | /* If a Tx command is being handled and it isn't in the actual | 1329 | /* If a Tx command is being handled and it isn't in the actual |
1257 | * command queue then there a command routing bug has been introduced | 1330 | * command queue then there a command routing bug has been introduced |
@@ -1265,9 +1338,17 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) | |||
1265 | return; | 1338 | return; |
1266 | } | 1339 | } |
1267 | 1340 | ||
1268 | cmd_index = get_cmd_index(&priv->txq[IWL_CMD_QUEUE_NUM].q, index, huge); | 1341 | /* If this is a huge cmd, clear the huge flag on the meta.flags |
1269 | cmd = priv->txq[IWL_CMD_QUEUE_NUM].cmd[cmd_index]; | 1342 | * of the _original_ cmd. So that iwl_cmd_queue_free won't unmap |
1270 | meta = &priv->txq[IWL_CMD_QUEUE_NUM].meta[cmd_index]; | 1343 | * the DMA buffer for the scan (huge) command. |
1344 | */ | ||
1345 | if (huge) { | ||
1346 | cmd_index = get_cmd_index(&txq->q, index, 0); | ||
1347 | txq->meta[cmd_index].flags = 0; | ||
1348 | } | ||
1349 | cmd_index = get_cmd_index(&txq->q, index, huge); | ||
1350 | cmd = txq->cmd[cmd_index]; | ||
1351 | meta = &txq->meta[cmd_index]; | ||
1271 | 1352 | ||
1272 | pci_unmap_single(priv->pci_dev, | 1353 | pci_unmap_single(priv->pci_dev, |
1273 | pci_unmap_addr(meta, mapping), | 1354 | pci_unmap_addr(meta, mapping), |
@@ -1289,6 +1370,7 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) | |||
1289 | get_cmd_string(cmd->hdr.cmd)); | 1370 | get_cmd_string(cmd->hdr.cmd)); |
1290 | wake_up_interruptible(&priv->wait_command_queue); | 1371 | wake_up_interruptible(&priv->wait_command_queue); |
1291 | } | 1372 | } |
1373 | meta->flags = 0; | ||
1292 | } | 1374 | } |
1293 | EXPORT_SYMBOL(iwl_tx_cmd_complete); | 1375 | EXPORT_SYMBOL(iwl_tx_cmd_complete); |
1294 | 1376 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 64f150b19771..e0c05feb296c 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/dma-mapping.h> | 35 | #include <linux/dma-mapping.h> |
35 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
36 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
diff --git a/drivers/net/wireless/iwmc3200wifi/cfg80211.c b/drivers/net/wireless/iwmc3200wifi/cfg80211.c index fc239a32cb6b..902e95f70f6e 100644 --- a/drivers/net/wireless/iwmc3200wifi/cfg80211.c +++ b/drivers/net/wireless/iwmc3200wifi/cfg80211.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/etherdevice.h> | 27 | #include <linux/etherdevice.h> |
28 | #include <linux/wireless.h> | 28 | #include <linux/wireless.h> |
29 | #include <linux/ieee80211.h> | 29 | #include <linux/ieee80211.h> |
30 | #include <linux/slab.h> | ||
30 | #include <net/cfg80211.h> | 31 | #include <net/cfg80211.h> |
31 | 32 | ||
32 | #include "iwm.h" | 33 | #include "iwm.h" |
diff --git a/drivers/net/wireless/iwmc3200wifi/commands.c b/drivers/net/wireless/iwmc3200wifi/commands.c index b5cbd2bfd52a..330c7d9cf101 100644 --- a/drivers/net/wireless/iwmc3200wifi/commands.c +++ b/drivers/net/wireless/iwmc3200wifi/commands.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/etherdevice.h> | 41 | #include <linux/etherdevice.h> |
42 | #include <linux/ieee80211.h> | 42 | #include <linux/ieee80211.h> |
43 | #include <linux/sched.h> | 43 | #include <linux/sched.h> |
44 | #include <linux/slab.h> | ||
44 | 45 | ||
45 | #include "iwm.h" | 46 | #include "iwm.h" |
46 | #include "bus.h" | 47 | #include "bus.h" |
diff --git a/drivers/net/wireless/iwmc3200wifi/debugfs.c b/drivers/net/wireless/iwmc3200wifi/debugfs.c index 5b75a0ddac1c..724441368a18 100644 --- a/drivers/net/wireless/iwmc3200wifi/debugfs.c +++ b/drivers/net/wireless/iwmc3200wifi/debugfs.c | |||
@@ -21,6 +21,7 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/slab.h> | ||
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
25 | #include <linux/bitops.h> | 26 | #include <linux/bitops.h> |
26 | #include <linux/debugfs.h> | 27 | #include <linux/debugfs.h> |
diff --git a/drivers/net/wireless/iwmc3200wifi/eeprom.c b/drivers/net/wireless/iwmc3200wifi/eeprom.c index 8091421ee5e5..e80e776b74f7 100644 --- a/drivers/net/wireless/iwmc3200wifi/eeprom.c +++ b/drivers/net/wireless/iwmc3200wifi/eeprom.c | |||
@@ -37,6 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include <linux/kernel.h> | 39 | #include <linux/kernel.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | #include "iwm.h" | 42 | #include "iwm.h" |
42 | #include "umac.h" | 43 | #include "umac.h" |
diff --git a/drivers/net/wireless/iwmc3200wifi/hal.c b/drivers/net/wireless/iwmc3200wifi/hal.c index 373b5b5001d2..9531b18cf72a 100644 --- a/drivers/net/wireless/iwmc3200wifi/hal.c +++ b/drivers/net/wireless/iwmc3200wifi/hal.c | |||
@@ -98,6 +98,7 @@ | |||
98 | */ | 98 | */ |
99 | #include <linux/kernel.h> | 99 | #include <linux/kernel.h> |
100 | #include <linux/netdevice.h> | 100 | #include <linux/netdevice.h> |
101 | #include <linux/slab.h> | ||
101 | 102 | ||
102 | #include "iwm.h" | 103 | #include "iwm.h" |
103 | #include "bus.h" | 104 | #include "bus.h" |
diff --git a/drivers/net/wireless/iwmc3200wifi/main.c b/drivers/net/wireless/iwmc3200wifi/main.c index 3a3510a6223a..362002735b12 100644 --- a/drivers/net/wireless/iwmc3200wifi/main.c +++ b/drivers/net/wireless/iwmc3200wifi/main.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/sched.h> | 41 | #include <linux/sched.h> |
42 | #include <linux/ieee80211.h> | 42 | #include <linux/ieee80211.h> |
43 | #include <linux/wireless.h> | 43 | #include <linux/wireless.h> |
44 | #include <linux/slab.h> | ||
44 | 45 | ||
45 | #include "iwm.h" | 46 | #include "iwm.h" |
46 | #include "debug.h" | 47 | #include "debug.h" |
diff --git a/drivers/net/wireless/iwmc3200wifi/netdev.c b/drivers/net/wireless/iwmc3200wifi/netdev.c index c4c0d23c63ec..13a69ebf2a94 100644 --- a/drivers/net/wireless/iwmc3200wifi/netdev.c +++ b/drivers/net/wireless/iwmc3200wifi/netdev.c | |||
@@ -46,6 +46,7 @@ | |||
46 | * -> sdio_disable_func() | 46 | * -> sdio_disable_func() |
47 | */ | 47 | */ |
48 | #include <linux/netdevice.h> | 48 | #include <linux/netdevice.h> |
49 | #include <linux/slab.h> | ||
49 | 50 | ||
50 | #include "iwm.h" | 51 | #include "iwm.h" |
51 | #include "commands.h" | 52 | #include "commands.h" |
diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c index ce36baf34039..ad5398779240 100644 --- a/drivers/net/wireless/iwmc3200wifi/rx.c +++ b/drivers/net/wireless/iwmc3200wifi/rx.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/ieee80211.h> | 44 | #include <linux/ieee80211.h> |
45 | #include <linux/if_arp.h> | 45 | #include <linux/if_arp.h> |
46 | #include <linux/list.h> | 46 | #include <linux/list.h> |
47 | #include <linux/slab.h> | ||
47 | #include <net/iw_handler.h> | 48 | #include <net/iw_handler.h> |
48 | 49 | ||
49 | #include "iwm.h" | 50 | #include "iwm.h" |
diff --git a/drivers/net/wireless/iwmc3200wifi/sdio.c b/drivers/net/wireless/iwmc3200wifi/sdio.c index a7ec7eac9137..1eafd6dec3fd 100644 --- a/drivers/net/wireless/iwmc3200wifi/sdio.c +++ b/drivers/net/wireless/iwmc3200wifi/sdio.c | |||
@@ -63,6 +63,7 @@ | |||
63 | */ | 63 | */ |
64 | 64 | ||
65 | #include <linux/kernel.h> | 65 | #include <linux/kernel.h> |
66 | #include <linux/slab.h> | ||
66 | #include <linux/netdevice.h> | 67 | #include <linux/netdevice.h> |
67 | #include <linux/debugfs.h> | 68 | #include <linux/debugfs.h> |
68 | #include <linux/mmc/sdio_ids.h> | 69 | #include <linux/mmc/sdio_ids.h> |
diff --git a/drivers/net/wireless/iwmc3200wifi/tx.c b/drivers/net/wireless/iwmc3200wifi/tx.c index a20b936ae21f..9537cdb13d3f 100644 --- a/drivers/net/wireless/iwmc3200wifi/tx.c +++ b/drivers/net/wireless/iwmc3200wifi/tx.c | |||
@@ -64,6 +64,7 @@ | |||
64 | * (i.e. half of the max size). [iwm_tx_worker] | 64 | * (i.e. half of the max size). [iwm_tx_worker] |
65 | */ | 65 | */ |
66 | 66 | ||
67 | #include <linux/slab.h> | ||
67 | #include <linux/skbuff.h> | 68 | #include <linux/skbuff.h> |
68 | #include <linux/netdevice.h> | 69 | #include <linux/netdevice.h> |
69 | #include <linux/ieee80211.h> | 70 | #include <linux/ieee80211.h> |
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c index 95d3d4c5e08b..aa06070e5eab 100644 --- a/drivers/net/wireless/libertas/assoc.c +++ b/drivers/net/wireless/libertas/assoc.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/etherdevice.h> | 4 | #include <linux/etherdevice.h> |
5 | #include <linux/ieee80211.h> | 5 | #include <linux/ieee80211.h> |
6 | #include <linux/if_arp.h> | 6 | #include <linux/if_arp.h> |
7 | #include <linux/slab.h> | ||
7 | #include <net/lib80211.h> | 8 | #include <net/lib80211.h> |
8 | 9 | ||
9 | #include "assoc.h" | 10 | #include "assoc.h" |
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c index 82ebe1461a77..ce7bec402a33 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/slab.h> | ||
9 | #include <net/cfg80211.h> | 10 | #include <net/cfg80211.h> |
10 | 11 | ||
11 | #include "cfg.h" | 12 | #include "cfg.h" |
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 82371ef39524..cdb9b9650d73 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #include <linux/kfifo.h> | 6 | #include <linux/kfifo.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/slab.h> | ||
8 | 9 | ||
9 | #include "host.h" | 10 | #include "host.h" |
10 | #include "decl.h" | 11 | #include "decl.h" |
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index e7470442f76b..88f7131d66e9 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * This file contains the handling of command | 2 | * This file contains the handling of command |
3 | * responses as well as events generated by firmware. | 3 | * responses as well as events generated by firmware. |
4 | */ | 4 | */ |
5 | #include <linux/slab.h> | ||
5 | #include <linux/delay.h> | 6 | #include <linux/delay.h> |
6 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
7 | #include <linux/if_arp.h> | 8 | #include <linux/if_arp.h> |
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c index 587b0cb0088d..a48ccaffb288 100644 --- a/drivers/net/wireless/libertas/debugfs.c +++ b/drivers/net/wireless/libertas/debugfs.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/delay.h> | 4 | #include <linux/delay.h> |
5 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
6 | #include <linux/string.h> | 6 | #include <linux/string.h> |
7 | #include <linux/slab.h> | ||
7 | #include <net/iw_handler.h> | 8 | #include <net/iw_handler.h> |
8 | #include <net/lib80211.h> | 9 | #include <net/lib80211.h> |
9 | 10 | ||
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index 1f6cb58dd66c..6d55439a7b97 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
26 | #include <linux/moduleparam.h> | 27 | #include <linux/moduleparam.h> |
27 | #include <linux/firmware.h> | 28 | #include <linux/firmware.h> |
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c index 7a73f625273b..7d1a3c6b6ce0 100644 --- a/drivers/net/wireless/libertas/if_sdio.c +++ b/drivers/net/wireless/libertas/if_sdio.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/moduleparam.h> | 30 | #include <linux/moduleparam.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/firmware.h> | 32 | #include <linux/firmware.h> |
32 | #include <linux/netdevice.h> | 33 | #include <linux/netdevice.h> |
33 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c index 3ea03f259ee7..fe3f08028eb3 100644 --- a/drivers/net/wireless/libertas/if_spi.c +++ b/drivers/net/wireless/libertas/if_spi.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
25 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
26 | #include <linux/semaphore.h> | 26 | #include <linux/semaphore.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/spi/libertas_spi.h> | 28 | #include <linux/spi/libertas_spi.h> |
28 | #include <linux/spi/spi.h> | 29 | #include <linux/spi/spi.h> |
29 | 30 | ||
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index 65e174595d12..fcea5741ba62 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/moduleparam.h> | 5 | #include <linux/moduleparam.h> |
6 | #include <linux/firmware.h> | 6 | #include <linux/firmware.h> |
7 | #include <linux/netdevice.h> | 7 | #include <linux/netdevice.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/usb.h> | 9 | #include <linux/usb.h> |
9 | 10 | ||
10 | #ifdef CONFIG_OLPC | 11 | #ifdef CONFIG_OLPC |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index ff7b0d0cca56..38edad6f24b8 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/kfifo.h> | 13 | #include <linux/kfifo.h> |
14 | #include <linux/stddef.h> | 14 | #include <linux/stddef.h> |
15 | #include <linux/ieee80211.h> | 15 | #include <linux/ieee80211.h> |
16 | #include <linux/slab.h> | ||
16 | #include <net/iw_handler.h> | 17 | #include <net/iw_handler.h> |
17 | #include <net/cfg80211.h> | 18 | #include <net/cfg80211.h> |
18 | 19 | ||
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c index 7a867e31ca5a..e2b8d886b091 100644 --- a/drivers/net/wireless/libertas/rx.c +++ b/drivers/net/wireless/libertas/rx.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * This file contains the handling of RX in wlan driver. | 2 | * This file contains the handling of RX in wlan driver. |
3 | */ | 3 | */ |
4 | #include <linux/etherdevice.h> | 4 | #include <linux/etherdevice.h> |
5 | #include <linux/slab.h> | ||
5 | #include <linux/types.h> | 6 | #include <linux/types.h> |
6 | 7 | ||
7 | #include "host.h" | 8 | #include "host.h" |
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 220361e69cd3..24cd54b3a806 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * IOCTL handlers as well as command preperation and response routines | 4 | * IOCTL handlers as well as command preperation and response routines |
5 | * for sending scan commands to the firmware. | 5 | * for sending scan commands to the firmware. |
6 | */ | 6 | */ |
7 | #include <linux/slab.h> | ||
7 | #include <linux/types.h> | 8 | #include <linux/types.h> |
8 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
9 | #include <linux/etherdevice.h> | 10 | #include <linux/etherdevice.h> |
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index aad6263dee6d..f96a96031a50 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * This file contains ioctl functions | 2 | * This file contains ioctl functions |
3 | */ | 3 | */ |
4 | #include <linux/ctype.h> | 4 | #include <linux/ctype.h> |
5 | #include <linux/slab.h> | ||
5 | #include <linux/delay.h> | 6 | #include <linux/delay.h> |
6 | #include <linux/if.h> | 7 | #include <linux/if.h> |
7 | #include <linux/if_arp.h> | 8 | #include <linux/if_arp.h> |
diff --git a/drivers/net/wireless/libertas_tf/cmd.c b/drivers/net/wireless/libertas_tf/cmd.c index 28790e03dc43..b620daf59ef7 100644 --- a/drivers/net/wireless/libertas_tf/cmd.c +++ b/drivers/net/wireless/libertas_tf/cmd.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * the Free Software Foundation; either version 2 of the License, or (at | 7 | * the Free Software Foundation; either version 2 of the License, or (at |
8 | * your option) any later version. | 8 | * your option) any later version. |
9 | */ | 9 | */ |
10 | #include <linux/slab.h> | ||
11 | |||
10 | #include "libertas_tf.h" | 12 | #include "libertas_tf.h" |
11 | 13 | ||
12 | static const struct channel_range channel_ranges[] = { | 14 | static const struct channel_range channel_ranges[] = { |
diff --git a/drivers/net/wireless/libertas_tf/if_usb.c b/drivers/net/wireless/libertas_tf/if_usb.c index 3691c307e674..8cc9db60c14b 100644 --- a/drivers/net/wireless/libertas_tf/if_usb.c +++ b/drivers/net/wireless/libertas_tf/if_usb.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/moduleparam.h> | 11 | #include <linux/moduleparam.h> |
12 | #include <linux/firmware.h> | 12 | #include <linux/firmware.h> |
13 | #include <linux/netdevice.h> | 13 | #include <linux/netdevice.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/usb.h> | 15 | #include <linux/usb.h> |
15 | 16 | ||
16 | #define DRV_NAME "lbtf_usb" | 17 | #define DRV_NAME "lbtf_usb" |
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c index c20eef6b95c2..7533a23e0500 100644 --- a/drivers/net/wireless/libertas_tf/main.c +++ b/drivers/net/wireless/libertas_tf/main.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * the Free Software Foundation; either version 2 of the License, or (at | 7 | * the Free Software Foundation; either version 2 of the License, or (at |
8 | * your option) any later version. | 8 | * your option) any later version. |
9 | */ | 9 | */ |
10 | #include <linux/slab.h> | ||
11 | |||
10 | #include "libertas_tf.h" | 12 | #include "libertas_tf.h" |
11 | #include "linux/etherdevice.h" | 13 | #include "linux/etherdevice.h" |
12 | 14 | ||
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 6ea77e95277b..7cd5f56662fc 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
18 | #include <net/dst.h> | 19 | #include <net/dst.h> |
19 | #include <net/xfrm.h> | 20 | #include <net/xfrm.h> |
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 1b5d0aebbb0e..73bbd080c6e7 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/completion.h> | 20 | #include <linux/completion.h> |
21 | #include <linux/etherdevice.h> | 21 | #include <linux/etherdevice.h> |
22 | #include <linux/slab.h> | ||
22 | #include <net/mac80211.h> | 23 | #include <net/mac80211.h> |
23 | #include <linux/moduleparam.h> | 24 | #include <linux/moduleparam.h> |
24 | #include <linux/firmware.h> | 25 | #include <linux/firmware.h> |
diff --git a/drivers/net/wireless/orinoco/fw.c b/drivers/net/wireless/orinoco/fw.c index cfa72962052b..5ea0f7cf85b1 100644 --- a/drivers/net/wireless/orinoco/fw.c +++ b/drivers/net/wireless/orinoco/fw.c | |||
@@ -3,6 +3,7 @@ | |||
3 | * See copyright notice in main.c | 3 | * See copyright notice in main.c |
4 | */ | 4 | */ |
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/slab.h> | ||
6 | #include <linux/firmware.h> | 7 | #include <linux/firmware.h> |
7 | #include <linux/device.h> | 8 | #include <linux/device.h> |
8 | 9 | ||
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c index b42634c614b5..413e9ab6cab3 100644 --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c | |||
@@ -78,6 +78,7 @@ | |||
78 | 78 | ||
79 | #include <linux/module.h> | 79 | #include <linux/module.h> |
80 | #include <linux/kernel.h> | 80 | #include <linux/kernel.h> |
81 | #include <linux/slab.h> | ||
81 | #include <linux/init.h> | 82 | #include <linux/init.h> |
82 | #include <linux/delay.h> | 83 | #include <linux/delay.h> |
83 | #include <linux/device.h> | 84 | #include <linux/device.h> |
diff --git a/drivers/net/wireless/orinoco/scan.c b/drivers/net/wireless/orinoco/scan.c index d2f10e9c2162..330d42d45333 100644 --- a/drivers/net/wireless/orinoco/scan.c +++ b/drivers/net/wireless/orinoco/scan.c | |||
@@ -3,6 +3,7 @@ | |||
3 | * See copyright notice in main.c | 3 | * See copyright notice in main.c |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/gfp.h> | ||
6 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
7 | #include <linux/string.h> | 8 | #include <linux/string.h> |
8 | #include <linux/ieee80211.h> | 9 | #include <linux/ieee80211.h> |
diff --git a/drivers/net/wireless/orinoco/wext.c b/drivers/net/wireless/orinoco/wext.c index 29f9bc03190a..57b850ebfeb2 100644 --- a/drivers/net/wireless/orinoco/wext.c +++ b/drivers/net/wireless/orinoco/wext.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * | 2 | * |
3 | * See copyright notice in main.c | 3 | * See copyright notice in main.c |
4 | */ | 4 | */ |
5 | #include <linux/slab.h> | ||
5 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
6 | #include <linux/if_arp.h> | 7 | #include <linux/if_arp.h> |
7 | #include <linux/wireless.h> | 8 | #include <linux/wireless.h> |
diff --git a/drivers/net/wireless/p54/eeprom.c b/drivers/net/wireless/p54/eeprom.c index 8e3818f6832e..187e263b045a 100644 --- a/drivers/net/wireless/p54/eeprom.c +++ b/drivers/net/wireless/p54/eeprom.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/firmware.h> | 20 | #include <linux/firmware.h> |
21 | #include <linux/etherdevice.h> | 21 | #include <linux/etherdevice.h> |
22 | #include <linux/sort.h> | 22 | #include <linux/sort.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <net/mac80211.h> | 25 | #include <net/mac80211.h> |
25 | 26 | ||
diff --git a/drivers/net/wireless/p54/fwio.c b/drivers/net/wireless/p54/fwio.c index e7b9e9cb39f5..c43a5d461ab2 100644 --- a/drivers/net/wireless/p54/fwio.c +++ b/drivers/net/wireless/p54/fwio.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/firmware.h> | 21 | #include <linux/firmware.h> |
21 | #include <linux/etherdevice.h> | 22 | #include <linux/etherdevice.h> |
22 | 23 | ||
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c index 36f4c820ad01..7bbd9d3bba60 100644 --- a/drivers/net/wireless/p54/main.c +++ b/drivers/net/wireless/p54/main.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/firmware.h> | 21 | #include <linux/firmware.h> |
21 | #include <linux/etherdevice.h> | 22 | #include <linux/etherdevice.h> |
22 | 23 | ||
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c index ed4bdffdd63e..269fda362836 100644 --- a/drivers/net/wireless/p54/p54pci.c +++ b/drivers/net/wireless/p54/p54pci.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/firmware.h> | 19 | #include <linux/firmware.h> |
19 | #include <linux/etherdevice.h> | 20 | #include <linux/etherdevice.h> |
20 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c index afd26bf06649..c8f09da1f84d 100644 --- a/drivers/net/wireless/p54/p54spi.c +++ b/drivers/net/wireless/p54/p54spi.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/spi/spi.h> | 29 | #include <linux/spi/spi.h> |
30 | #include <linux/etherdevice.h> | 30 | #include <linux/etherdevice.h> |
31 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include "p54spi.h" | 34 | #include "p54spi.h" |
34 | #include "p54spi_eeprom.h" | 35 | #include "p54spi_eeprom.h" |
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index e3cfc001d2fd..743a6c68b29d 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/usb.h> | 16 | #include <linux/usb.h> |
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/firmware.h> | 19 | #include <linux/firmware.h> |
19 | #include <linux/etherdevice.h> | 20 | #include <linux/etherdevice.h> |
20 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index f7f5c793514b..a45818ebfdfb 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/if_arp.h> | 25 | #include <linux/if_arp.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
27 | 28 | ||
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c index a3ba3539db02..689d59a13d5b 100644 --- a/drivers/net/wireless/prism54/islpci_dev.c +++ b/drivers/net/wireless/prism54/islpci_dev.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <linux/netdevice.h> | 24 | #include <linux/netdevice.h> |
24 | #include <linux/ethtool.h> | 25 | #include <linux/ethtool.h> |
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c index 872b64783e78..ac99eaaeabce 100644 --- a/drivers/net/wireless/prism54/islpci_eth.c +++ b/drivers/net/wireless/prism54/islpci_eth.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/gfp.h> | ||
20 | 21 | ||
21 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
22 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
diff --git a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c index 69d2f882fd06..adb289723a96 100644 --- a/drivers/net/wireless/prism54/islpci_mgt.c +++ b/drivers/net/wireless/prism54/islpci_mgt.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
26 | #include <asm/system.h> | 27 | #include <asm/system.h> |
diff --git a/drivers/net/wireless/prism54/islpci_mgt.h b/drivers/net/wireless/prism54/islpci_mgt.h index 87a1734663da..0b27e50fe0d5 100644 --- a/drivers/net/wireless/prism54/islpci_mgt.h +++ b/drivers/net/wireless/prism54/islpci_mgt.h | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/wireless.h> | 23 | #include <linux/wireless.h> |
24 | #include <linux/skbuff.h> | 24 | #include <linux/skbuff.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | /* | 27 | /* |
27 | * Function definitions | 28 | * Function definitions |
diff --git a/drivers/net/wireless/prism54/oid_mgt.c b/drivers/net/wireless/prism54/oid_mgt.c index 1187e6112a64..d66933d70fb9 100644 --- a/drivers/net/wireless/prism54/oid_mgt.c +++ b/drivers/net/wireless/prism54/oid_mgt.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include "prismcompat.h" | 22 | #include "prismcompat.h" |
22 | #include "islpci_dev.h" | 23 | #include "islpci_dev.h" |
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 54680a3a5acb..2940d7d3775e 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/proc_fs.h> | 35 | #include <linux/proc_fs.h> |
36 | #include <linux/ptrace.h> | 36 | #include <linux/ptrace.h> |
37 | #include <linux/seq_file.h> | 37 | #include <linux/seq_file.h> |
38 | #include <linux/slab.h> | ||
39 | #include <linux/string.h> | 38 | #include <linux/string.h> |
40 | #include <linux/timer.h> | 39 | #include <linux/timer.h> |
41 | #include <linux/init.h> | 40 | #include <linux/init.h> |
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 8ab9f094747b..babdcdf6d71d 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/if_arp.h> | 41 | #include <linux/if_arp.h> |
42 | #include <linux/ctype.h> | 42 | #include <linux/ctype.h> |
43 | #include <linux/spinlock.h> | 43 | #include <linux/spinlock.h> |
44 | #include <linux/slab.h> | ||
44 | #include <net/iw_handler.h> | 45 | #include <net/iw_handler.h> |
45 | #include <net/cfg80211.h> | 46 | #include <net/cfg80211.h> |
46 | #include <linux/usb/usbnet.h> | 47 | #include <linux/usb/usbnet.h> |
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index c22b04042d5c..5f5204b82891 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/pci.h> | 32 | #include <linux/pci.h> |
33 | #include <linux/eeprom_93cx6.h> | 33 | #include <linux/eeprom_93cx6.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include "rt2x00.h" | 36 | #include "rt2x00.h" |
36 | #include "rt2x00pci.h" | 37 | #include "rt2x00pci.h" |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 52bbcf1bd17c..2a73f593aab0 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/pci.h> | 32 | #include <linux/pci.h> |
33 | #include <linux/eeprom_93cx6.h> | 33 | #include <linux/eeprom_93cx6.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include "rt2x00.h" | 36 | #include "rt2x00.h" |
36 | #include "rt2x00pci.h" | 37 | #include "rt2x00pci.h" |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 13444b6b3e37..8ebb705fe106 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/usb.h> | 33 | #include <linux/usb.h> |
33 | 34 | ||
34 | #include "rt2x00.h" | 35 | #include "rt2x00.h" |
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 326fce78489d..c015ce9fdd09 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
37 | #include <linux/module.h> | 37 | #include <linux/module.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include "rt2x00.h" | 40 | #include "rt2x00.h" |
40 | #if defined(CONFIG_RT2X00_LIB_USB) || defined(CONFIG_RT2X00_LIB_USB_MODULE) | 41 | #if defined(CONFIG_RT2X00_LIB_USB) || defined(CONFIG_RT2X00_LIB_USB_MODULE) |
diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c index 28a1c46ec4eb..9569fb4e5bc5 100644 --- a/drivers/net/wireless/rt2x00/rt2x00debug.c +++ b/drivers/net/wireless/rt2x00/rt2x00debug.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/poll.h> | 29 | #include <linux/poll.h> |
30 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/uaccess.h> | 32 | #include <linux/uaccess.h> |
32 | 33 | ||
33 | #include "rt2x00.h" | 34 | #include "rt2x00.h" |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index dd5ab8fe2321..eda73ba735a6 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include "rt2x00.h" | 30 | #include "rt2x00.h" |
30 | #include "rt2x00lib.h" | 31 | #include "rt2x00lib.h" |
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 047123b766fc..cf3f1c0c4382 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include "rt2x00.h" | 32 | #include "rt2x00.h" |
32 | #include "rt2x00pci.h" | 33 | #include "rt2x00pci.h" |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 5b6b789cad3d..a0bd36fc4d2e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -24,6 +24,7 @@ | |||
24 | Abstract: rt2x00 queue specific routines. | 24 | Abstract: rt2x00 queue specific routines. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/slab.h> | ||
27 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
28 | #include <linux/module.h> | 29 | #include <linux/module.h> |
29 | #include <linux/dma-mapping.h> | 30 | #include <linux/dma-mapping.h> |
diff --git a/drivers/net/wireless/rt2x00/rt2x00soc.c b/drivers/net/wireless/rt2x00/rt2x00soc.c index 111c0ff5c6c7..fc98063de71d 100644 --- a/drivers/net/wireless/rt2x00/rt2x00soc.c +++ b/drivers/net/wireless/rt2x00/rt2x00soc.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | #include "rt2x00.h" | 33 | #include "rt2x00.h" |
33 | #include "rt2x00soc.h" | 34 | #include "rt2x00soc.h" |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index 0a751e73aa0f..f9a7f8b17411 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/usb.h> | 29 | #include <linux/usb.h> |
29 | #include <linux/bug.h> | 30 | #include <linux/bug.h> |
30 | 31 | ||
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 177472742172..432e75f960b7 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/pci.h> | 34 | #include <linux/pci.h> |
34 | #include <linux/eeprom_93cx6.h> | 35 | #include <linux/eeprom_93cx6.h> |
35 | 36 | ||
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 290d70bc5d22..bb58d797fb72 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/usb.h> | 34 | #include <linux/usb.h> |
34 | 35 | ||
35 | #include "rt2x00.h" | 36 | #include "rt2x00.h" |
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c index fb8a62f2b9b4..6b46329b732f 100644 --- a/drivers/net/wireless/rtl818x/rtl8180_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
21 | #include <linux/etherdevice.h> | 22 | #include <linux/etherdevice.h> |
22 | #include <linux/eeprom_93cx6.h> | 23 | #include <linux/eeprom_93cx6.h> |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index 441d817ed489..738921fda027 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/usb.h> | 24 | #include <linux/usb.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
26 | #include <linux/etherdevice.h> | 27 | #include <linux/etherdevice.h> |
27 | #include <linux/eeprom_93cx6.h> | 28 | #include <linux/eeprom_93cx6.h> |
diff --git a/drivers/net/wireless/wl12xx/wl1251_acx.c b/drivers/net/wireless/wl12xx/wl1251_acx.c index beff084040b5..91891f928070 100644 --- a/drivers/net/wireless/wl12xx/wl1251_acx.c +++ b/drivers/net/wireless/wl12xx/wl1251_acx.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "wl1251_acx.h" | 1 | #include "wl1251_acx.h" |
2 | 2 | ||
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include <linux/slab.h> | ||
4 | #include <linux/crc7.h> | 5 | #include <linux/crc7.h> |
5 | 6 | ||
6 | #include "wl1251.h" | 7 | #include "wl1251.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1251_boot.c b/drivers/net/wireless/wl12xx/wl1251_boot.c index acb334184d70..2545123931e8 100644 --- a/drivers/net/wireless/wl12xx/wl1251_boot.c +++ b/drivers/net/wireless/wl12xx/wl1251_boot.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "wl1251_reg.h" | 27 | #include "wl1251_reg.h" |
27 | #include "wl1251_boot.h" | 28 | #include "wl1251_boot.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1251_cmd.c b/drivers/net/wireless/wl12xx/wl1251_cmd.c index 0320b478bb3f..a37b30cef489 100644 --- a/drivers/net/wireless/wl12xx/wl1251_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1251_cmd.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "wl1251_cmd.h" | 1 | #include "wl1251_cmd.h" |
2 | 2 | ||
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include <linux/slab.h> | ||
4 | #include <linux/crc7.h> | 5 | #include <linux/crc7.h> |
5 | 6 | ||
6 | #include "wl1251.h" | 7 | #include "wl1251.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1251_debugfs.c b/drivers/net/wireless/wl12xx/wl1251_debugfs.c index 05e4d68eb4cc..5e4465ac08fa 100644 --- a/drivers/net/wireless/wl12xx/wl1251_debugfs.c +++ b/drivers/net/wireless/wl12xx/wl1251_debugfs.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "wl1251_debugfs.h" | 24 | #include "wl1251_debugfs.h" |
25 | 25 | ||
26 | #include <linux/skbuff.h> | 26 | #include <linux/skbuff.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include "wl1251.h" | 29 | #include "wl1251.h" |
29 | #include "wl1251_acx.h" | 30 | #include "wl1251_acx.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1251_init.c b/drivers/net/wireless/wl12xx/wl1251_init.c index 5aad56ea7153..b538bdd7b320 100644 --- a/drivers/net/wireless/wl12xx/wl1251_init.c +++ b/drivers/net/wireless/wl12xx/wl1251_init.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "wl1251_init.h" | 28 | #include "wl1251_init.h" |
28 | #include "wl12xx_80211.h" | 29 | #include "wl12xx_80211.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c index 0155653b7105..56b78e4b0198 100644 --- a/drivers/net/wireless/wl12xx/wl1251_main.c +++ b/drivers/net/wireless/wl12xx/wl1251_main.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/crc32.h> | 29 | #include <linux/crc32.h> |
30 | #include <linux/etherdevice.h> | 30 | #include <linux/etherdevice.h> |
31 | #include <linux/vmalloc.h> | 31 | #include <linux/vmalloc.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include "wl1251.h" | 34 | #include "wl1251.h" |
34 | #include "wl12xx_80211.h" | 35 | #include "wl12xx_80211.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1251_rx.c b/drivers/net/wireless/wl12xx/wl1251_rx.c index b56732226cc0..6f229e0990f4 100644 --- a/drivers/net/wireless/wl12xx/wl1251_rx.c +++ b/drivers/net/wireless/wl12xx/wl1251_rx.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/skbuff.h> | 25 | #include <linux/skbuff.h> |
26 | #include <linux/gfp.h> | ||
26 | #include <net/mac80211.h> | 27 | #include <net/mac80211.h> |
27 | 28 | ||
28 | #include "wl1251.h" | 29 | #include "wl1251.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1251_spi.c b/drivers/net/wireless/wl12xx/wl1251_spi.c index 9cc8c323830f..3bfb59bd4635 100644 --- a/drivers/net/wireless/wl12xx/wl1251_spi.c +++ b/drivers/net/wireless/wl12xx/wl1251_spi.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/crc7.h> | 27 | #include <linux/crc7.h> |
27 | #include <linux/spi/spi.h> | 28 | #include <linux/spi/spi.h> |
28 | #include <linux/spi/wl12xx.h> | 29 | #include <linux/spi/wl12xx.h> |
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.c b/drivers/net/wireless/wl12xx/wl1271_acx.c index 7e337cea9905..adaa3f2485c3 100644 --- a/drivers/net/wireless/wl12xx/wl1271_acx.c +++ b/drivers/net/wireless/wl12xx/wl1271_acx.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/crc7.h> | 28 | #include <linux/crc7.h> |
29 | #include <linux/spi/spi.h> | 29 | #include <linux/spi/spi.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include "wl1271.h" | 32 | #include "wl1271.h" |
32 | #include "wl12xx_80211.h" | 33 | #include "wl12xx_80211.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1271_boot.c b/drivers/net/wireless/wl12xx/wl1271_boot.c index 41c6affbee29..1937859d74eb 100644 --- a/drivers/net/wireless/wl12xx/wl1271_boot.c +++ b/drivers/net/wireless/wl12xx/wl1271_boot.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "wl1271_acx.h" | 27 | #include "wl1271_acx.h" |
27 | #include "wl1271_reg.h" | 28 | #include "wl1271_reg.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c index d005729e0312..92254d0d6c4c 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/spi/spi.h> | 27 | #include <linux/spi/spi.h> |
28 | #include <linux/etherdevice.h> | 28 | #include <linux/etherdevice.h> |
29 | #include <linux/ieee80211.h> | 29 | #include <linux/ieee80211.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include "wl1271.h" | 32 | #include "wl1271.h" |
32 | #include "wl1271_reg.h" | 33 | #include "wl1271_reg.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1271_debugfs.c b/drivers/net/wireless/wl12xx/wl1271_debugfs.c index 3c0f5b1ac272..c239ef4d0b8d 100644 --- a/drivers/net/wireless/wl12xx/wl1271_debugfs.c +++ b/drivers/net/wireless/wl12xx/wl1271_debugfs.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "wl1271_debugfs.h" | 24 | #include "wl1271_debugfs.h" |
25 | 25 | ||
26 | #include <linux/skbuff.h> | 26 | #include <linux/skbuff.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include "wl1271.h" | 29 | #include "wl1271.h" |
29 | #include "wl1271_acx.h" | 30 | #include "wl1271_acx.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1271_init.c b/drivers/net/wireless/wl12xx/wl1271_init.c index d9335fc2a575..e3806b035d0c 100644 --- a/drivers/net/wireless/wl12xx/wl1271_init.c +++ b/drivers/net/wireless/wl12xx/wl1271_init.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "wl1271_init.h" | 28 | #include "wl1271_init.h" |
28 | #include "wl12xx_80211.h" | 29 | #include "wl12xx_80211.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 6036d0206fec..aa970b759dd5 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/vmalloc.h> | 30 | #include <linux/vmalloc.h> |
31 | #include <linux/inetdevice.h> | 31 | #include <linux/inetdevice.h> |
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include "wl1271.h" | 35 | #include "wl1271.h" |
35 | #include "wl12xx_80211.h" | 36 | #include "wl12xx_80211.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1271_rx.c b/drivers/net/wireless/wl12xx/wl1271_rx.c index b824c6cc2cc5..6f1b732ae43b 100644 --- a/drivers/net/wireless/wl12xx/wl1271_rx.c +++ b/drivers/net/wireless/wl12xx/wl1271_rx.c | |||
@@ -21,6 +21,8 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/gfp.h> | ||
25 | |||
24 | #include "wl1271.h" | 26 | #include "wl1271.h" |
25 | #include "wl1271_acx.h" | 27 | #include "wl1271_acx.h" |
26 | #include "wl1271_reg.h" | 28 | #include "wl1271_reg.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1271_spi.c b/drivers/net/wireless/wl12xx/wl1271_spi.c index f44b05a32b0d..256e84ad0baf 100644 --- a/drivers/net/wireless/wl12xx/wl1271_spi.c +++ b/drivers/net/wireless/wl12xx/wl1271_spi.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/crc7.h> | 26 | #include <linux/crc7.h> |
27 | #include <linux/spi/spi.h> | 27 | #include <linux/spi/spi.h> |
28 | #include <linux/spi/wl12xx.h> | 28 | #include <linux/spi/wl12xx.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include "wl1271.h" | 31 | #include "wl1271.h" |
31 | #include "wl12xx_80211.h" | 32 | #include "wl12xx_80211.h" |
diff --git a/drivers/net/wireless/wl12xx/wl1271_testmode.c b/drivers/net/wireless/wl12xx/wl1271_testmode.c index 2401e6035d51..554deb4d024e 100644 --- a/drivers/net/wireless/wl12xx/wl1271_testmode.c +++ b/drivers/net/wireless/wl12xx/wl1271_testmode.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | #include "wl1271_testmode.h" | 23 | #include "wl1271_testmode.h" |
24 | 24 | ||
25 | #include <linux/slab.h> | ||
25 | #include <net/genetlink.h> | 26 | #include <net/genetlink.h> |
26 | 27 | ||
27 | #include "wl1271.h" | 28 | #include "wl1271.h" |
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index 74530b2d672c..1e2b684f8ed4 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/net/wireless/zd1201.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/usb.h> | 16 | #include <linux/usb.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/netdevice.h> | 18 | #include <linux/netdevice.h> |
18 | #include <linux/etherdevice.h> | 19 | #include <linux/etherdevice.h> |
19 | #include <linux/wireless.h> | 20 | #include <linux/wireless.h> |
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c index 7ca95c414fa8..b2af3c549bb3 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.c +++ b/drivers/net/wireless/zd1211rw/zd_chip.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include "zd_def.h" | 30 | #include "zd_def.h" |
30 | #include "zd_chip.h" | 31 | #include "zd_chip.h" |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 6d95e4d74d7f..b0b666019a93 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
24 | #include <linux/etherdevice.h> | 24 | #include <linux/etherdevice.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/usb.h> | 26 | #include <linux/usb.h> |
26 | #include <linux/jiffies.h> | 27 | #include <linux/jiffies.h> |
27 | #include <net/ieee80211_radiotap.h> | 28 | #include <net/ieee80211_radiotap.h> |
diff --git a/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c b/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c index 439799b84876..9e74eb1b67d5 100644 --- a/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c +++ b/drivers/net/wireless/zd1211rw/zd_rf_uw2453.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include "zd_rf.h" | 24 | #include "zd_rf.h" |
24 | #include "zd_usb.h" | 25 | #include "zd_usb.h" |
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 442fc1117326..d91ad1a612af 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/firmware.h> | 24 | #include <linux/firmware.h> |
25 | #include <linux/device.h> | 25 | #include <linux/device.h> |
26 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/skbuff.h> | 28 | #include <linux/skbuff.h> |
28 | #include <linux/usb.h> | 29 | #include <linux/usb.h> |
29 | #include <linux/workqueue.h> | 30 | #include <linux/workqueue.h> |
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index a869b45d3d37..d504e2b60257 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/udp.h> | 40 | #include <linux/udp.h> |
41 | #include <linux/moduleparam.h> | 41 | #include <linux/moduleparam.h> |
42 | #include <linux/mm.h> | 42 | #include <linux/mm.h> |
43 | #include <linux/slab.h> | ||
43 | #include <net/ip.h> | 44 | #include <net/ip.h> |
44 | 45 | ||
45 | #include <xen/xen.h> | 46 | #include <xen/xen.h> |
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index eaebba8df6fc..e9381fe3baf4 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/etherdevice.h> | 19 | #include <linux/etherdevice.h> |
20 | #include <linux/skbuff.h> | 20 | #include <linux/skbuff.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <linux/of_device.h> | 24 | #include <linux/of_device.h> |
24 | #include <linux/of_platform.h> | 25 | #include <linux/of_platform.h> |
diff --git a/drivers/net/xtsonic.c b/drivers/net/xtsonic.c index 389ba9df7120..fdba9cb3a599 100644 --- a/drivers/net/xtsonic.c +++ b/drivers/net/xtsonic.c | |||
@@ -20,11 +20,11 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/fcntl.h> | 22 | #include <linux/fcntl.h> |
23 | #include <linux/gfp.h> | ||
23 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/ioport.h> | 26 | #include <linux/ioport.h> |
26 | #include <linux/in.h> | 27 | #include <linux/in.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/string.h> | 28 | #include <linux/string.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/skbuff.h> | 33 | #include <linux/skbuff.h> |
34 | #include <linux/platform_device.h> | 34 | #include <linux/platform_device.h> |
35 | #include <linux/dma-mapping.h> | 35 | #include <linux/dma-mapping.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <asm/io.h> | 38 | #include <asm/io.h> |
38 | #include <asm/pgtable.h> | 39 | #include <asm/pgtable.h> |
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c index 34c91cf5d839..efbff76a9908 100644 --- a/drivers/net/yellowfin.c +++ b/drivers/net/yellowfin.c | |||
@@ -90,7 +90,6 @@ static int gx_fix; | |||
90 | #include <linux/timer.h> | 90 | #include <linux/timer.h> |
91 | #include <linux/errno.h> | 91 | #include <linux/errno.h> |
92 | #include <linux/ioport.h> | 92 | #include <linux/ioport.h> |
93 | #include <linux/slab.h> | ||
94 | #include <linux/interrupt.h> | 93 | #include <linux/interrupt.h> |
95 | #include <linux/pci.h> | 94 | #include <linux/pci.h> |
96 | #include <linux/init.h> | 95 | #include <linux/init.h> |
diff --git a/drivers/net/znet.c b/drivers/net/znet.c index def49d2ec69a..dbfef8d70f2d 100644 --- a/drivers/net/znet.c +++ b/drivers/net/znet.c | |||
@@ -88,6 +88,7 @@ | |||
88 | #include <linux/module.h> | 88 | #include <linux/module.h> |
89 | #include <linux/kernel.h> | 89 | #include <linux/kernel.h> |
90 | #include <linux/string.h> | 90 | #include <linux/string.h> |
91 | #include <linux/slab.h> | ||
91 | #include <linux/errno.h> | 92 | #include <linux/errno.h> |
92 | #include <linux/interrupt.h> | 93 | #include <linux/interrupt.h> |
93 | #include <linux/ioport.h> | 94 | #include <linux/ioport.h> |
diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c index f5f75844954c..b764ac22d523 100644 --- a/drivers/nubus/nubus.c +++ b/drivers/nubus/nubus.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/slab.h> | ||
18 | #include <asm/setup.h> | 19 | #include <asm/setup.h> |
19 | #include <asm/system.h> | 20 | #include <asm/system.h> |
20 | #include <asm/page.h> | 21 | #include <asm/page.h> |
diff --git a/drivers/of/base.c b/drivers/of/base.c index cb96888d1427..b5ad9740d8b2 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/of.h> | 21 | #include <linux/of.h> |
22 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/proc_fs.h> | 24 | #include <linux/proc_fs.h> |
24 | 25 | ||
25 | struct device_node *allnodes; | 26 | struct device_node *allnodes; |
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 406757a9d7ea..dee4fb56b094 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
@@ -376,8 +376,11 @@ unsigned long __init unflatten_dt_node(unsigned long mem, | |||
376 | if (!np->type) | 376 | if (!np->type) |
377 | np->type = "<NULL>"; | 377 | np->type = "<NULL>"; |
378 | } | 378 | } |
379 | while (tag == OF_DT_BEGIN_NODE) { | 379 | while (tag == OF_DT_BEGIN_NODE || tag == OF_DT_NOP) { |
380 | mem = unflatten_dt_node(mem, p, np, allnextpp, fpsize); | 380 | if (tag == OF_DT_NOP) |
381 | *p += 4; | ||
382 | else | ||
383 | mem = unflatten_dt_node(mem, p, np, allnextpp, fpsize); | ||
381 | tag = be32_to_cpup((__be32 *)(*p)); | 384 | tag = be32_to_cpup((__be32 *)(*p)); |
382 | } | 385 | } |
383 | if (tag != OF_DT_END_NODE) { | 386 | if (tag != OF_DT_END_NODE) { |
diff --git a/drivers/of/gpio.c b/drivers/of/gpio.c index 24c3606217f8..a1b31a4abae4 100644 --- a/drivers/of/gpio.c +++ b/drivers/of/gpio.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/of.h> | 17 | #include <linux/of.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/of_gpio.h> | 19 | #include <linux/of_gpio.h> |
19 | #include <asm/prom.h> | 20 | #include <asm/prom.h> |
20 | 21 | ||
diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c index c9e2ae90f195..a9352b2c7ac4 100644 --- a/drivers/oprofile/buffer_sync.c +++ b/drivers/oprofile/buffer_sync.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/fs.h> | 30 | #include <linux/fs.h> |
31 | #include <linux/oprofile.h> | 31 | #include <linux/oprofile.h> |
32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
33 | #include <linux/gfp.h> | ||
33 | 34 | ||
34 | #include "oprofile_stats.h" | 35 | #include "oprofile_stats.h" |
35 | #include "event_buffer.h" | 36 | #include "event_buffer.h" |
diff --git a/drivers/parisc/asp.c b/drivers/parisc/asp.c index 9ca21098b146..6a1ab2512a53 100644 --- a/drivers/parisc/asp.c +++ b/drivers/parisc/asp.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/types.h> | 18 | #include <linux/types.h> |
20 | #include <asm/io.h> | 19 | #include <asm/io.h> |
21 | #include <asm/led.h> | 20 | #include <asm/led.h> |
diff --git a/drivers/parisc/ccio-rm-dma.c b/drivers/parisc/ccio-rm-dma.c index 356b8357bccc..f78f6f1aef47 100644 --- a/drivers/parisc/ccio-rm-dma.c +++ b/drivers/parisc/ccio-rm-dma.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/mm.h> | 38 | #include <linux/mm.h> |
39 | #include <linux/string.h> | 39 | #include <linux/string.h> |
40 | #include <linux/pci.h> | 40 | #include <linux/pci.h> |
41 | #include <linux/gfp.h> | ||
41 | 42 | ||
42 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
43 | 44 | ||
diff --git a/drivers/parisc/gsc.c b/drivers/parisc/gsc.c index c4e1f3c3c2fa..20a1bce1a031 100644 --- a/drivers/parisc/gsc.c +++ b/drivers/parisc/gsc.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | 23 | ||
25 | #include <asm/hardware.h> | 24 | #include <asm/hardware.h> |
diff --git a/drivers/parport/daisy.c b/drivers/parport/daisy.c index 3c8f06c3a5a0..5bed17f68ef4 100644 --- a/drivers/parport/daisy.c +++ b/drivers/parport/daisy.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/parport.h> | 23 | #include <linux/parport.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
26 | 27 | ||
27 | #include <asm/current.h> | 28 | #include <asm/current.h> |
diff --git a/drivers/parport/parport_ax88796.c b/drivers/parport/parport_ax88796.c index 6938d2e9f18f..2c5ac2bf5c56 100644 --- a/drivers/parport/parport_ax88796.c +++ b/drivers/parport/parport_ax88796.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include <asm/io.h> | 20 | #include <asm/io.h> |
20 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
diff --git a/drivers/parport/parport_ip32.c b/drivers/parport/parport_ip32.c index 6d58bf895b1a..d3d7809af8bf 100644 --- a/drivers/parport/parport_ip32.c +++ b/drivers/parport/parport_ip32.c | |||
@@ -103,6 +103,7 @@ | |||
103 | #include <linux/module.h> | 103 | #include <linux/module.h> |
104 | #include <linux/parport.h> | 104 | #include <linux/parport.h> |
105 | #include <linux/sched.h> | 105 | #include <linux/sched.h> |
106 | #include <linux/slab.h> | ||
106 | #include <linux/spinlock.h> | 107 | #include <linux/spinlock.h> |
107 | #include <linux/stddef.h> | 108 | #include <linux/stddef.h> |
108 | #include <linux/types.h> | 109 | #include <linux/types.h> |
diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c index c3bb84ac931e..40e208d130f5 100644 --- a/drivers/parport/parport_serial.c +++ b/drivers/parport/parport_serial.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
25 | #include <linux/parport.h> | 26 | #include <linux/parport.h> |
diff --git a/drivers/parport/probe.c b/drivers/parport/probe.c index 0f6550719bcf..d763bc9e44c1 100644 --- a/drivers/parport/probe.c +++ b/drivers/parport/probe.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/parport.h> | 9 | #include <linux/parport.h> |
10 | #include <linux/ctype.h> | 10 | #include <linux/ctype.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/slab.h> | ||
12 | #include <asm/uaccess.h> | 13 | #include <asm/uaccess.h> |
13 | 14 | ||
14 | static const struct { | 15 | static const struct { |
diff --git a/drivers/pci/access.c b/drivers/pci/access.c index db23200c4874..2f646fe1260f 100644 --- a/drivers/pci/access.c +++ b/drivers/pci/access.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <linux/pci.h> | 2 | #include <linux/pci.h> |
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <linux/slab.h> | ||
5 | #include <linux/ioport.h> | 6 | #include <linux/ioport.h> |
6 | #include <linux/wait.h> | 7 | #include <linux/wait.h> |
7 | 8 | ||
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 26301cb25e7f..628ea20a8841 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/ioport.h> | 14 | #include <linux/ioport.h> |
15 | #include <linux/proc_fs.h> | 15 | #include <linux/proc_fs.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include "pci.h" | 19 | #include "pci.h" |
19 | 20 | ||
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index 83aae4747594..33ead97f0c4b 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
36 | #include <linux/tboot.h> | 36 | #include <linux/tboot.h> |
37 | #include <linux/dmi.h> | 37 | #include <linux/dmi.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #define PREFIX "DMAR: " | 40 | #define PREFIX "DMAR: " |
40 | 41 | ||
diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c index 3c76fc67cf0e..45fcc1e96df9 100644 --- a/drivers/pci/hotplug/acpi_pcihp.c +++ b/drivers/pci/hotplug/acpi_pcihp.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/pci_hotplug.h> | 32 | #include <linux/pci_hotplug.h> |
33 | #include <linux/acpi.h> | 33 | #include <linux/acpi.h> |
34 | #include <linux/pci-acpi.h> | 34 | #include <linux/pci-acpi.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #define MY_NAME "acpi_pcihp" | 37 | #define MY_NAME "acpi_pcihp" |
37 | 38 | ||
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index b5dad9f37453..cb23aa2ebf96 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/pci_hotplug.h> | 47 | #include <linux/pci_hotplug.h> |
48 | #include <linux/pci-acpi.h> | 48 | #include <linux/pci-acpi.h> |
49 | #include <linux/mutex.h> | 49 | #include <linux/mutex.h> |
50 | #include <linux/slab.h> | ||
50 | 51 | ||
51 | #include "../pci.h" | 52 | #include "../pci.h" |
52 | #include "acpiphp.h" | 53 | #include "acpiphp.h" |
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c index aa5df485f8cf..6ecbfb27db9d 100644 --- a/drivers/pci/hotplug/acpiphp_ibm.c +++ b/drivers/pci/hotplug/acpiphp_ibm.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/module.h> | 30 | #include <linux/module.h> |
30 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
31 | #include <acpi/acpi_bus.h> | 32 | #include <acpi/acpi_bus.h> |
diff --git a/drivers/pci/hotplug/cpqphp_sysfs.c b/drivers/pci/hotplug/cpqphp_sysfs.c index e6089bdb6e5b..56215322930a 100644 --- a/drivers/pci/hotplug/cpqphp_sysfs.c +++ b/drivers/pci/hotplug/cpqphp_sysfs.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/types.h> | 32 | #include <linux/types.h> |
32 | #include <linux/proc_fs.h> | 33 | #include <linux/proc_fs.h> |
33 | #include <linux/workqueue.h> | 34 | #include <linux/workqueue.h> |
diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c index 0a894efd4b9b..5317e4d7d96e 100644 --- a/drivers/pci/hotplug/fakephp.c +++ b/drivers/pci/hotplug/fakephp.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/slab.h> | ||
22 | #include "../pci.h" | 23 | #include "../pci.h" |
23 | 24 | ||
24 | struct legacy_slot { | 25 | struct legacy_slot { |
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index 728b119f71ad..6d2eea93298f 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/kobject.h> | 33 | #include <linux/kobject.h> |
34 | #include <linux/sysfs.h> | 34 | #include <linux/sysfs.h> |
35 | #include <linux/pagemap.h> | 35 | #include <linux/pagemap.h> |
36 | #include <linux/slab.h> | ||
37 | #include <linux/init.h> | 36 | #include <linux/init.h> |
38 | #include <linux/mount.h> | 37 | #include <linux/mount.h> |
39 | #include <linux/namei.h> | 38 | #include <linux/namei.h> |
diff --git a/drivers/pci/hotplug/pciehp_acpi.c b/drivers/pci/hotplug/pciehp_acpi.c index b09b083011d6..1f4000a5a108 100644 --- a/drivers/pci/hotplug/pciehp_acpi.c +++ b/drivers/pci/hotplug/pciehp_acpi.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/acpi.h> | 26 | #include <linux/acpi.h> |
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/pci_hotplug.h> | 28 | #include <linux/pci_hotplug.h> |
29 | #include <linux/slab.h> | ||
29 | #include "pciehp.h" | 30 | #include "pciehp.h" |
30 | 31 | ||
31 | #define PCIEHP_DETECT_PCIE (0) | 32 | #define PCIEHP_DETECT_PCIE (0) |
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index 920f820edf87..3588ea61b0dd 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/moduleparam.h> | 31 | #include <linux/moduleparam.h> |
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/types.h> | 34 | #include <linux/types.h> |
34 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
35 | #include "pciehp.h" | 36 | #include "pciehp.h" |
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c index 9a7f247e8ac1..8f58148be044 100644 --- a/drivers/pci/hotplug/pciehp_ctrl.c +++ b/drivers/pci/hotplug/pciehp_ctrl.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/pci.h> | 34 | #include <linux/pci.h> |
34 | #include <linux/workqueue.h> | 35 | #include <linux/workqueue.h> |
35 | #include "../pci.h" | 36 | #include "../pci.h" |
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 40b48f569b1e..0cd42047d89b 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/pci.h> | 36 | #include <linux/pci.h> |
37 | #include <linux/interrupt.h> | 37 | #include <linux/interrupt.h> |
38 | #include <linux/time.h> | 38 | #include <linux/time.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | #include "../pci.h" | 41 | #include "../pci.h" |
41 | #include "pciehp.h" | 42 | #include "pciehp.h" |
@@ -832,9 +833,8 @@ static inline void dbg_ctrl(struct controller *ctrl) | |||
832 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | 833 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { |
833 | if (!pci_resource_len(pdev, i)) | 834 | if (!pci_resource_len(pdev, i)) |
834 | continue; | 835 | continue; |
835 | ctrl_info(ctrl, " PCI resource [%d] : 0x%llx@0x%llx\n", | 836 | ctrl_info(ctrl, " PCI resource [%d] : %pR\n", |
836 | i, (unsigned long long)pci_resource_len(pdev, i), | 837 | i, &pdev->resource[i]); |
837 | (unsigned long long)pci_resource_start(pdev, i)); | ||
838 | } | 838 | } |
839 | ctrl_info(ctrl, "Slot Capabilities : 0x%08x\n", ctrl->slot_cap); | 839 | ctrl_info(ctrl, "Slot Capabilities : 0x%08x\n", ctrl->slot_cap); |
840 | ctrl_info(ctrl, " Physical Slot Number : %d\n", PSN(ctrl)); | 840 | ctrl_info(ctrl, " Physical Slot Number : %d\n", PSN(ctrl)); |
diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index dcaae725fd79..719702240780 100644 --- a/drivers/pci/hotplug/rpaphp_core.c +++ b/drivers/pci/hotplug/rpaphp_core.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/moduleparam.h> | 27 | #include <linux/moduleparam.h> |
28 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
29 | #include <linux/pci_hotplug.h> | 29 | #include <linux/pci_hotplug.h> |
30 | #include <linux/slab.h> | ||
31 | #include <linux/smp.h> | 30 | #include <linux/smp.h> |
32 | #include <linux/init.h> | 31 | #include <linux/init.h> |
33 | #include <asm/eeh.h> /* for eeh_add_device() */ | 32 | #include <asm/eeh.h> /* for eeh_add_device() */ |
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c index 8aebe1e9d3d6..72d507b6a2aa 100644 --- a/drivers/pci/hotplug/sgi_hotplug.c +++ b/drivers/pci/hotplug/sgi_hotplug.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
16 | #include <linux/pci_hotplug.h> | 16 | #include <linux/pci_hotplug.h> |
17 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/types.h> | 19 | #include <linux/types.h> |
19 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
20 | 21 | ||
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c index a5062297f488..a7bd5048396e 100644 --- a/drivers/pci/hotplug/shpchp_core.c +++ b/drivers/pci/hotplug/shpchp_core.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/moduleparam.h> | 31 | #include <linux/moduleparam.h> |
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
35 | #include <linux/workqueue.h> | 36 | #include <linux/workqueue.h> |
36 | #include "shpchp.h" | 37 | #include "shpchp.h" |
diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c index 3bba0c0888ff..3387fbfb0c54 100644 --- a/drivers/pci/hotplug/shpchp_ctrl.c +++ b/drivers/pci/hotplug/shpchp_ctrl.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/pci.h> | 34 | #include <linux/pci.h> |
34 | #include <linux/workqueue.h> | 35 | #include <linux/workqueue.h> |
35 | #include "../pci.h" | 36 | #include "../pci.h" |
diff --git a/drivers/pci/htirq.c b/drivers/pci/htirq.c index 737a1c44b07a..98abf8b91294 100644 --- a/drivers/pci/htirq.c +++ b/drivers/pci/htirq.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
11 | #include <linux/spinlock.h> | 11 | #include <linux/spinlock.h> |
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/gfp.h> | ||
14 | #include <linux/htirq.h> | 13 | #include <linux/htirq.h> |
15 | 14 | ||
16 | /* Global ht irq lock. | 15 | /* Global ht irq lock. |
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c index 95b849130ad4..6ee98a56946f 100644 --- a/drivers/pci/intr_remapping.c +++ b/drivers/pci/intr_remapping.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <linux/interrupt.h> | 1 | #include <linux/interrupt.h> |
2 | #include <linux/dmar.h> | 2 | #include <linux/dmar.h> |
3 | #include <linux/spinlock.h> | 3 | #include <linux/spinlock.h> |
4 | #include <linux/slab.h> | ||
4 | #include <linux/jiffies.h> | 5 | #include <linux/jiffies.h> |
5 | #include <linux/hpet.h> | 6 | #include <linux/hpet.h> |
6 | #include <linux/pci.h> | 7 | #include <linux/pci.h> |
diff --git a/drivers/pci/ioapic.c b/drivers/pci/ioapic.c index 3e0d7b5dd1b9..203508b227b7 100644 --- a/drivers/pci/ioapic.c +++ b/drivers/pci/ioapic.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | #include <linux/acpi.h> | 20 | #include <linux/acpi.h> |
21 | #include <linux/slab.h> | ||
21 | #include <acpi/acpi_bus.h> | 22 | #include <acpi/acpi_bus.h> |
22 | 23 | ||
23 | struct ioapic { | 24 | struct ioapic { |
@@ -31,9 +32,9 @@ static int ioapic_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
31 | acpi_status status; | 32 | acpi_status status; |
32 | unsigned long long gsb; | 33 | unsigned long long gsb; |
33 | struct ioapic *ioapic; | 34 | struct ioapic *ioapic; |
34 | u64 addr; | ||
35 | int ret; | 35 | int ret; |
36 | char *type; | 36 | char *type; |
37 | struct resource *res; | ||
37 | 38 | ||
38 | handle = DEVICE_ACPI_HANDLE(&dev->dev); | 39 | handle = DEVICE_ACPI_HANDLE(&dev->dev); |
39 | if (!handle) | 40 | if (!handle) |
@@ -69,13 +70,12 @@ static int ioapic_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
69 | if (pci_request_region(dev, 0, type)) | 70 | if (pci_request_region(dev, 0, type)) |
70 | goto exit_disable; | 71 | goto exit_disable; |
71 | 72 | ||
72 | addr = pci_resource_start(dev, 0); | 73 | res = &dev->resource[0]; |
73 | if (acpi_register_ioapic(ioapic->handle, addr, ioapic->gsi_base)) | 74 | if (acpi_register_ioapic(ioapic->handle, res->start, ioapic->gsi_base)) |
74 | goto exit_release; | 75 | goto exit_release; |
75 | 76 | ||
76 | pci_set_drvdata(dev, ioapic); | 77 | pci_set_drvdata(dev, ioapic); |
77 | dev_info(&dev->dev, "%s at %#llx, GSI %u\n", type, addr, | 78 | dev_info(&dev->dev, "%s at %pR, GSI %u\n", type, res, ioapic->gsi_base); |
78 | ioapic->gsi_base); | ||
79 | return 0; | 79 | return 0; |
80 | 80 | ||
81 | exit_release: | 81 | exit_release: |
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 3e5ab2bf6a5c..ce6a3666b3d9 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
13 | #include <linux/string.h> | 14 | #include <linux/string.h> |
14 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index f9cf3173b23d..77b68eaf021e 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include "pci.h" | 23 | #include "pci.h" |
23 | #include "msi.h" | 24 | #include "msi.h" |
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 997668558e79..fad93983bfed 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/capability.h> | 24 | #include <linux/capability.h> |
25 | #include <linux/pci-aspm.h> | 25 | #include <linux/pci-aspm.h> |
26 | #include <linux/slab.h> | ||
26 | #include "pci.h" | 27 | #include "pci.h" |
27 | 28 | ||
28 | static int sysfs_initialized; /* = 0 */ | 29 | static int sysfs_initialized; /* = 0 */ |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index cb1dd5f4988c..5ea587e59e48 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
14 | #include <linux/pm.h> | 14 | #include <linux/pm.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/module.h> | 16 | #include <linux/module.h> |
16 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
17 | #include <linux/string.h> | 18 | #include <linux/string.h> |
@@ -2576,18 +2577,17 @@ EXPORT_SYMBOL_GPL(pci_reset_function); | |||
2576 | */ | 2577 | */ |
2577 | int pcix_get_max_mmrbc(struct pci_dev *dev) | 2578 | int pcix_get_max_mmrbc(struct pci_dev *dev) |
2578 | { | 2579 | { |
2579 | int err, cap; | 2580 | int cap; |
2580 | u32 stat; | 2581 | u32 stat; |
2581 | 2582 | ||
2582 | cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); | 2583 | cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); |
2583 | if (!cap) | 2584 | if (!cap) |
2584 | return -EINVAL; | 2585 | return -EINVAL; |
2585 | 2586 | ||
2586 | err = pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat); | 2587 | if (pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat)) |
2587 | if (err) | ||
2588 | return -EINVAL; | 2588 | return -EINVAL; |
2589 | 2589 | ||
2590 | return (stat & PCI_X_STATUS_MAX_READ) >> 12; | 2590 | return 512 << ((stat & PCI_X_STATUS_MAX_READ) >> 21); |
2591 | } | 2591 | } |
2592 | EXPORT_SYMBOL(pcix_get_max_mmrbc); | 2592 | EXPORT_SYMBOL(pcix_get_max_mmrbc); |
2593 | 2593 | ||
@@ -2600,18 +2600,17 @@ EXPORT_SYMBOL(pcix_get_max_mmrbc); | |||
2600 | */ | 2600 | */ |
2601 | int pcix_get_mmrbc(struct pci_dev *dev) | 2601 | int pcix_get_mmrbc(struct pci_dev *dev) |
2602 | { | 2602 | { |
2603 | int ret, cap; | 2603 | int cap; |
2604 | u32 cmd; | 2604 | u16 cmd; |
2605 | 2605 | ||
2606 | cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); | 2606 | cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); |
2607 | if (!cap) | 2607 | if (!cap) |
2608 | return -EINVAL; | 2608 | return -EINVAL; |
2609 | 2609 | ||
2610 | ret = pci_read_config_dword(dev, cap + PCI_X_CMD, &cmd); | 2610 | if (pci_read_config_word(dev, cap + PCI_X_CMD, &cmd)) |
2611 | if (!ret) | 2611 | return -EINVAL; |
2612 | ret = 512 << ((cmd & PCI_X_CMD_MAX_READ) >> 2); | ||
2613 | 2612 | ||
2614 | return ret; | 2613 | return 512 << ((cmd & PCI_X_CMD_MAX_READ) >> 2); |
2615 | } | 2614 | } |
2616 | EXPORT_SYMBOL(pcix_get_mmrbc); | 2615 | EXPORT_SYMBOL(pcix_get_mmrbc); |
2617 | 2616 | ||
@@ -2626,28 +2625,27 @@ EXPORT_SYMBOL(pcix_get_mmrbc); | |||
2626 | */ | 2625 | */ |
2627 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc) | 2626 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc) |
2628 | { | 2627 | { |
2629 | int cap, err = -EINVAL; | 2628 | int cap; |
2630 | u32 stat, cmd, v, o; | 2629 | u32 stat, v, o; |
2630 | u16 cmd; | ||
2631 | 2631 | ||
2632 | if (mmrbc < 512 || mmrbc > 4096 || !is_power_of_2(mmrbc)) | 2632 | if (mmrbc < 512 || mmrbc > 4096 || !is_power_of_2(mmrbc)) |
2633 | goto out; | 2633 | return -EINVAL; |
2634 | 2634 | ||
2635 | v = ffs(mmrbc) - 10; | 2635 | v = ffs(mmrbc) - 10; |
2636 | 2636 | ||
2637 | cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); | 2637 | cap = pci_find_capability(dev, PCI_CAP_ID_PCIX); |
2638 | if (!cap) | 2638 | if (!cap) |
2639 | goto out; | 2639 | return -EINVAL; |
2640 | 2640 | ||
2641 | err = pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat); | 2641 | if (pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat)) |
2642 | if (err) | 2642 | return -EINVAL; |
2643 | goto out; | ||
2644 | 2643 | ||
2645 | if (v > (stat & PCI_X_STATUS_MAX_READ) >> 21) | 2644 | if (v > (stat & PCI_X_STATUS_MAX_READ) >> 21) |
2646 | return -E2BIG; | 2645 | return -E2BIG; |
2647 | 2646 | ||
2648 | err = pci_read_config_dword(dev, cap + PCI_X_CMD, &cmd); | 2647 | if (pci_read_config_word(dev, cap + PCI_X_CMD, &cmd)) |
2649 | if (err) | 2648 | return -EINVAL; |
2650 | goto out; | ||
2651 | 2649 | ||
2652 | o = (cmd & PCI_X_CMD_MAX_READ) >> 2; | 2650 | o = (cmd & PCI_X_CMD_MAX_READ) >> 2; |
2653 | if (o != v) { | 2651 | if (o != v) { |
@@ -2657,10 +2655,10 @@ int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc) | |||
2657 | 2655 | ||
2658 | cmd &= ~PCI_X_CMD_MAX_READ; | 2656 | cmd &= ~PCI_X_CMD_MAX_READ; |
2659 | cmd |= v << 2; | 2657 | cmd |= v << 2; |
2660 | err = pci_write_config_dword(dev, cap + PCI_X_CMD, cmd); | 2658 | if (pci_write_config_word(dev, cap + PCI_X_CMD, cmd)) |
2659 | return -EIO; | ||
2661 | } | 2660 | } |
2662 | out: | 2661 | return 0; |
2663 | return err; | ||
2664 | } | 2662 | } |
2665 | EXPORT_SYMBOL(pcix_set_mmrbc); | 2663 | EXPORT_SYMBOL(pcix_set_mmrbc); |
2666 | 2664 | ||
@@ -3023,7 +3021,6 @@ EXPORT_SYMBOL(pcim_pin_device); | |||
3023 | EXPORT_SYMBOL(pci_disable_device); | 3021 | EXPORT_SYMBOL(pci_disable_device); |
3024 | EXPORT_SYMBOL(pci_find_capability); | 3022 | EXPORT_SYMBOL(pci_find_capability); |
3025 | EXPORT_SYMBOL(pci_bus_find_capability); | 3023 | EXPORT_SYMBOL(pci_bus_find_capability); |
3026 | EXPORT_SYMBOL(pci_register_set_vga_state); | ||
3027 | EXPORT_SYMBOL(pci_release_regions); | 3024 | EXPORT_SYMBOL(pci_release_regions); |
3028 | EXPORT_SYMBOL(pci_request_regions); | 3025 | EXPORT_SYMBOL(pci_request_regions); |
3029 | EXPORT_SYMBOL(pci_request_regions_exclusive); | 3026 | EXPORT_SYMBOL(pci_request_regions_exclusive); |
diff --git a/drivers/pci/pcie/aer/aer_inject.c b/drivers/pci/pcie/aer/aer_inject.c index 223052b73563..f8f425b8731d 100644 --- a/drivers/pci/pcie/aer/aer_inject.c +++ b/drivers/pci/pcie/aer/aer_inject.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/miscdevice.h> | 22 | #include <linux/miscdevice.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
25 | #include <linux/uaccess.h> | 26 | #include <linux/uaccess.h> |
26 | #include <linux/stddef.h> | 27 | #include <linux/stddef.h> |
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c index 21f215f4daa3..aa495ad9bbd4 100644 --- a/drivers/pci/pcie/aer/aerdrv.c +++ b/drivers/pci/pcie/aer/aerdrv.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/pcieport_if.h> | 27 | #include <linux/pcieport_if.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include "aerdrv.h" | 30 | #include "aerdrv.h" |
30 | #include "../../pci.h" | 31 | #include "../../pci.h" |
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index c843a799814d..aceb04b67b60 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/pm.h> | 23 | #include <linux/pm.h> |
24 | #include <linux/suspend.h> | 24 | #include <linux/suspend.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/slab.h> | ||
26 | #include "aerdrv.h" | 27 | #include "aerdrv.h" |
27 | 28 | ||
28 | static int forceload; | 29 | static int forceload; |
diff --git a/drivers/pci/pcie/pme/pcie_pme.c b/drivers/pci/pcie/pme/pcie_pme.c index 7b3cbff547ee..aac285a16b62 100644 --- a/drivers/pci/pcie/pme/pcie_pme.c +++ b/drivers/pci/pcie/pme/pcie_pme.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
19 | #include <linux/device.h> | 20 | #include <linux/device.h> |
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 127e8f169d9c..3debed25e46b 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/pm.h> | 13 | #include <linux/pm.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/pcieport_if.h> | 15 | #include <linux/pcieport_if.h> |
17 | #include <linux/aer.h> | 16 | #include <linux/aer.h> |
18 | #include <linux/dmi.h> | 17 | #include <linux/dmi.h> |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 2a943090a3b7..882bd8d29fe3 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -174,14 +174,19 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
174 | pci_read_config_dword(dev, pos, &sz); | 174 | pci_read_config_dword(dev, pos, &sz); |
175 | pci_write_config_dword(dev, pos, l); | 175 | pci_write_config_dword(dev, pos, l); |
176 | 176 | ||
177 | if (!sz) | ||
178 | goto fail; /* BAR not implemented */ | ||
179 | |||
177 | /* | 180 | /* |
178 | * All bits set in sz means the device isn't working properly. | 181 | * All bits set in sz means the device isn't working properly. |
179 | * If the BAR isn't implemented, all bits must be 0. If it's a | 182 | * If it's a memory BAR or a ROM, bit 0 must be clear; if it's |
180 | * memory BAR or a ROM, bit 0 must be clear; if it's an io BAR, bit | 183 | * an io BAR, bit 1 must be clear. |
181 | * 1 must be clear. | ||
182 | */ | 184 | */ |
183 | if (!sz || sz == 0xffffffff) | 185 | if (sz == 0xffffffff) { |
186 | dev_err(&dev->dev, "reg %x: invalid size %#x; broken device?\n", | ||
187 | pos, sz); | ||
184 | goto fail; | 188 | goto fail; |
189 | } | ||
185 | 190 | ||
186 | /* | 191 | /* |
187 | * I don't know how l can have all bits set. Copied from old code. | 192 | * I don't know how l can have all bits set. Copied from old code. |
@@ -244,13 +249,17 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
244 | pos, res); | 249 | pos, res); |
245 | } | 250 | } |
246 | } else { | 251 | } else { |
247 | sz = pci_size(l, sz, mask); | 252 | u32 size = pci_size(l, sz, mask); |
248 | 253 | ||
249 | if (!sz) | 254 | if (!size) { |
255 | dev_err(&dev->dev, "reg %x: invalid size " | ||
256 | "(l %#x sz %#x mask %#x); broken device?", | ||
257 | pos, l, sz, mask); | ||
250 | goto fail; | 258 | goto fail; |
259 | } | ||
251 | 260 | ||
252 | res->start = l; | 261 | res->start = l; |
253 | res->end = l + sz; | 262 | res->end = l + size; |
254 | 263 | ||
255 | dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pR\n", pos, res); | 264 | dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pR\n", pos, res); |
256 | } | 265 | } |
@@ -312,7 +321,7 @@ static void __devinit pci_read_bridge_io(struct pci_bus *child) | |||
312 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); | 321 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); |
313 | } else { | 322 | } else { |
314 | dev_printk(KERN_DEBUG, &dev->dev, | 323 | dev_printk(KERN_DEBUG, &dev->dev, |
315 | " bridge window [io %04lx - %04lx] reg reading\n", | 324 | " bridge window [io %#06lx-%#06lx] (disabled)\n", |
316 | base, limit); | 325 | base, limit); |
317 | } | 326 | } |
318 | } | 327 | } |
@@ -336,7 +345,7 @@ static void __devinit pci_read_bridge_mmio(struct pci_bus *child) | |||
336 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); | 345 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); |
337 | } else { | 346 | } else { |
338 | dev_printk(KERN_DEBUG, &dev->dev, | 347 | dev_printk(KERN_DEBUG, &dev->dev, |
339 | " bridge window [mem 0x%08lx - 0x%08lx] reg reading\n", | 348 | " bridge window [mem %#010lx-%#010lx] (disabled)\n", |
340 | base, limit + 0xfffff); | 349 | base, limit + 0xfffff); |
341 | } | 350 | } |
342 | } | 351 | } |
@@ -387,7 +396,7 @@ static void __devinit pci_read_bridge_mmio_pref(struct pci_bus *child) | |||
387 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); | 396 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); |
388 | } else { | 397 | } else { |
389 | dev_printk(KERN_DEBUG, &dev->dev, | 398 | dev_printk(KERN_DEBUG, &dev->dev, |
390 | " bridge window [mem 0x%08lx - %08lx pref] reg reading\n", | 399 | " bridge window [mem %#010lx-%#010lx pref] (disabled)\n", |
391 | base, limit + 0xfffff); | 400 | base, limit + 0xfffff); |
392 | } | 401 | } |
393 | } | 402 | } |
@@ -673,16 +682,20 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
673 | int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS); | 682 | int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS); |
674 | u32 buses, i, j = 0; | 683 | u32 buses, i, j = 0; |
675 | u16 bctl; | 684 | u16 bctl; |
685 | u8 primary, secondary, subordinate; | ||
676 | int broken = 0; | 686 | int broken = 0; |
677 | 687 | ||
678 | pci_read_config_dword(dev, PCI_PRIMARY_BUS, &buses); | 688 | pci_read_config_dword(dev, PCI_PRIMARY_BUS, &buses); |
689 | primary = buses & 0xFF; | ||
690 | secondary = (buses >> 8) & 0xFF; | ||
691 | subordinate = (buses >> 16) & 0xFF; | ||
679 | 692 | ||
680 | dev_dbg(&dev->dev, "scanning behind bridge, config %06x, pass %d\n", | 693 | dev_dbg(&dev->dev, "scanning [bus %02x-%02x] behind bridge, pass %d\n", |
681 | buses & 0xffffff, pass); | 694 | secondary, subordinate, pass); |
682 | 695 | ||
683 | /* Check if setup is sensible at all */ | 696 | /* Check if setup is sensible at all */ |
684 | if (!pass && | 697 | if (!pass && |
685 | ((buses & 0xff) != bus->number || ((buses >> 8) & 0xff) <= bus->number)) { | 698 | (primary != bus->number || secondary <= bus->number)) { |
686 | dev_dbg(&dev->dev, "bus configuration invalid, reconfiguring\n"); | 699 | dev_dbg(&dev->dev, "bus configuration invalid, reconfiguring\n"); |
687 | broken = 1; | 700 | broken = 1; |
688 | } | 701 | } |
@@ -693,15 +706,15 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
693 | pci_write_config_word(dev, PCI_BRIDGE_CONTROL, | 706 | pci_write_config_word(dev, PCI_BRIDGE_CONTROL, |
694 | bctl & ~PCI_BRIDGE_CTL_MASTER_ABORT); | 707 | bctl & ~PCI_BRIDGE_CTL_MASTER_ABORT); |
695 | 708 | ||
696 | if ((buses & 0xffff00) && !pcibios_assign_all_busses() && !is_cardbus && !broken) { | 709 | if ((secondary || subordinate) && !pcibios_assign_all_busses() && |
697 | unsigned int cmax, busnr; | 710 | !is_cardbus && !broken) { |
711 | unsigned int cmax; | ||
698 | /* | 712 | /* |
699 | * Bus already configured by firmware, process it in the first | 713 | * Bus already configured by firmware, process it in the first |
700 | * pass and just note the configuration. | 714 | * pass and just note the configuration. |
701 | */ | 715 | */ |
702 | if (pass) | 716 | if (pass) |
703 | goto out; | 717 | goto out; |
704 | busnr = (buses >> 8) & 0xFF; | ||
705 | 718 | ||
706 | /* | 719 | /* |
707 | * If we already got to this bus through a different bridge, | 720 | * If we already got to this bus through a different bridge, |
@@ -710,13 +723,13 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
710 | * However, we continue to descend down the hierarchy and | 723 | * However, we continue to descend down the hierarchy and |
711 | * scan remaining child buses. | 724 | * scan remaining child buses. |
712 | */ | 725 | */ |
713 | child = pci_find_bus(pci_domain_nr(bus), busnr); | 726 | child = pci_find_bus(pci_domain_nr(bus), secondary); |
714 | if (!child) { | 727 | if (!child) { |
715 | child = pci_add_new_bus(bus, dev, busnr); | 728 | child = pci_add_new_bus(bus, dev, secondary); |
716 | if (!child) | 729 | if (!child) |
717 | goto out; | 730 | goto out; |
718 | child->primary = buses & 0xFF; | 731 | child->primary = primary; |
719 | child->subordinate = (buses >> 16) & 0xFF; | 732 | child->subordinate = subordinate; |
720 | child->bridge_ctl = bctl; | 733 | child->bridge_ctl = bctl; |
721 | } | 734 | } |
722 | 735 | ||
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 593bb844b8db..449e890267a2 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/pci.h> | 8 | #include <linux/pci.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/module.h> | 10 | #include <linux/module.h> |
10 | #include <linux/proc_fs.h> | 11 | #include <linux/proc_fs.h> |
11 | #include <linux/seq_file.h> | 12 | #include <linux/seq_file.h> |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 81d19d5683ac..27c0e6eb7136 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -368,8 +368,9 @@ static void __devinit quirk_io_region(struct pci_dev *dev, unsigned region, | |||
368 | bus_region.end = res->end; | 368 | bus_region.end = res->end; |
369 | pcibios_bus_to_resource(dev, res, &bus_region); | 369 | pcibios_bus_to_resource(dev, res, &bus_region); |
370 | 370 | ||
371 | pci_claim_resource(dev, nr); | 371 | if (pci_claim_resource(dev, nr) == 0) |
372 | dev_info(&dev->dev, "quirk: %pR claimed by %s\n", res, name); | 372 | dev_info(&dev->dev, "quirk: %pR claimed by %s\n", |
373 | res, name); | ||
373 | } | 374 | } |
374 | } | 375 | } |
375 | 376 | ||
@@ -1977,11 +1978,25 @@ static void __devinit quirk_via_cx700_pci_parking_caching(struct pci_dev *dev) | |||
1977 | /* | 1978 | /* |
1978 | * Disable PCI Bus Parking and PCI Master read caching on CX700 | 1979 | * Disable PCI Bus Parking and PCI Master read caching on CX700 |
1979 | * which causes unspecified timing errors with a VT6212L on the PCI | 1980 | * which causes unspecified timing errors with a VT6212L on the PCI |
1980 | * bus leading to USB2.0 packet loss. The defaults are that these | 1981 | * bus leading to USB2.0 packet loss. |
1981 | * features are turned off but some BIOSes turn them on. | 1982 | * |
1983 | * This quirk is only enabled if a second (on the external PCI bus) | ||
1984 | * VT6212L is found -- the CX700 core itself also contains a USB | ||
1985 | * host controller with the same PCI ID as the VT6212L. | ||
1982 | */ | 1986 | */ |
1983 | 1987 | ||
1988 | /* Count VT6212L instances */ | ||
1989 | struct pci_dev *p = pci_get_device(PCI_VENDOR_ID_VIA, | ||
1990 | PCI_DEVICE_ID_VIA_8235_USB_2, NULL); | ||
1984 | uint8_t b; | 1991 | uint8_t b; |
1992 | |||
1993 | /* p should contain the first (internal) VT6212L -- see if we have | ||
1994 | an external one by searching again */ | ||
1995 | p = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235_USB_2, p); | ||
1996 | if (!p) | ||
1997 | return; | ||
1998 | pci_dev_put(p); | ||
1999 | |||
1985 | if (pci_read_config_byte(dev, 0x76, &b) == 0) { | 2000 | if (pci_read_config_byte(dev, 0x76, &b) == 0) { |
1986 | if (b & 0x40) { | 2001 | if (b & 0x40) { |
1987 | /* Turn off PCI Bus Parking */ | 2002 | /* Turn off PCI Bus Parking */ |
@@ -2008,7 +2023,7 @@ static void __devinit quirk_via_cx700_pci_parking_caching(struct pci_dev *dev) | |||
2008 | } | 2023 | } |
2009 | } | 2024 | } |
2010 | } | 2025 | } |
2011 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, 0x324e, quirk_via_cx700_pci_parking_caching); | 2026 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, 0x324e, quirk_via_cx700_pci_parking_caching); |
2012 | 2027 | ||
2013 | /* | 2028 | /* |
2014 | * For Broadcom 5706, 5708, 5709 rev. A nics, any read beyond the | 2029 | * For Broadcom 5706, 5708, 5709 rev. A nics, any read beyond the |
@@ -2108,6 +2123,10 @@ static void __devinit quirk_disable_msi(struct pci_dev *dev) | |||
2108 | } | 2123 | } |
2109 | } | 2124 | } |
2110 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_disable_msi); | 2125 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_disable_msi); |
2126 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x9602, quirk_disable_msi); | ||
2127 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASUSTEK, 0x9602, quirk_disable_msi); | ||
2128 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AI, 0x9602, quirk_disable_msi); | ||
2129 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, 0xa238, quirk_disable_msi); | ||
2111 | 2130 | ||
2112 | /* Go through the list of Hypertransport capabilities and | 2131 | /* Go through the list of Hypertransport capabilities and |
2113 | * return 1 if a HT MSI capability is found and enabled */ | 2132 | * return 1 if a HT MSI capability is found and enabled */ |
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index 4a471dc4f4b9..20d03f772289 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
14 | #include "pci.h" | 15 | #include "pci.h" |
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 7d678bb15ffb..17bed18d24ad 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
@@ -93,8 +93,7 @@ void pci_update_resource(struct pci_dev *dev, int resno) | |||
93 | int pci_claim_resource(struct pci_dev *dev, int resource) | 93 | int pci_claim_resource(struct pci_dev *dev, int resource) |
94 | { | 94 | { |
95 | struct resource *res = &dev->resource[resource]; | 95 | struct resource *res = &dev->resource[resource]; |
96 | struct resource *root; | 96 | struct resource *root, *conflict; |
97 | int err; | ||
98 | 97 | ||
99 | root = pci_find_parent_resource(dev, res); | 98 | root = pci_find_parent_resource(dev, res); |
100 | if (!root) { | 99 | if (!root) { |
@@ -103,12 +102,15 @@ int pci_claim_resource(struct pci_dev *dev, int resource) | |||
103 | return -EINVAL; | 102 | return -EINVAL; |
104 | } | 103 | } |
105 | 104 | ||
106 | err = request_resource(root, res); | 105 | conflict = request_resource_conflict(root, res); |
107 | if (err) | 106 | if (conflict) { |
108 | dev_err(&dev->dev, | 107 | dev_err(&dev->dev, |
109 | "address space collision: %pR already in use\n", res); | 108 | "address space collision: %pR conflicts with %s %pR\n", |
109 | res, conflict->name, conflict); | ||
110 | return -EBUSY; | ||
111 | } | ||
110 | 112 | ||
111 | return err; | 113 | return 0; |
112 | } | 114 | } |
113 | EXPORT_SYMBOL(pci_claim_resource); | 115 | EXPORT_SYMBOL(pci_claim_resource); |
114 | 116 | ||
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c index f75a44d37fbe..659eaa0fc48f 100644 --- a/drivers/pci/slot.c +++ b/drivers/pci/slot.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/kobject.h> | 8 | #include <linux/kobject.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
10 | #include <linux/err.h> | 11 | #include <linux/err.h> |
11 | #include "pci.h" | 12 | #include "pci.h" |
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index 5d228071ec69..fb33fa42d249 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include <pcmcia/ss.h> | 20 | #include <pcmcia/ss.h> |
20 | 21 | ||
@@ -361,7 +362,6 @@ static int at91_cf_suspend(struct platform_device *pdev, pm_message_t mesg) | |||
361 | struct at91_cf_socket *cf = platform_get_drvdata(pdev); | 362 | struct at91_cf_socket *cf = platform_get_drvdata(pdev); |
362 | struct at91_cf_data *board = cf->board; | 363 | struct at91_cf_data *board = cf->board; |
363 | 364 | ||
364 | pcmcia_socket_dev_suspend(&pdev->dev); | ||
365 | if (device_may_wakeup(&pdev->dev)) { | 365 | if (device_may_wakeup(&pdev->dev)) { |
366 | enable_irq_wake(board->det_pin); | 366 | enable_irq_wake(board->det_pin); |
367 | if (board->irq_pin) | 367 | if (board->irq_pin) |
@@ -381,7 +381,6 @@ static int at91_cf_resume(struct platform_device *pdev) | |||
381 | disable_irq_wake(board->irq_pin); | 381 | disable_irq_wake(board->irq_pin); |
382 | } | 382 | } |
383 | 383 | ||
384 | pcmcia_socket_dev_resume(&pdev->dev); | ||
385 | return 0; | 384 | return 0; |
386 | } | 385 | } |
387 | 386 | ||
diff --git a/drivers/pcmcia/au1000_generic.c b/drivers/pcmcia/au1000_generic.c index 171c8a654887..88c4c4098789 100644 --- a/drivers/pcmcia/au1000_generic.c +++ b/drivers/pcmcia/au1000_generic.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/spinlock.h> | 43 | #include <linux/spinlock.h> |
44 | #include <linux/mutex.h> | 44 | #include <linux/mutex.h> |
45 | #include <linux/platform_device.h> | 45 | #include <linux/platform_device.h> |
46 | #include <linux/slab.h> | ||
46 | 47 | ||
47 | #include <asm/io.h> | 48 | #include <asm/io.h> |
48 | #include <asm/irq.h> | 49 | #include <asm/irq.h> |
@@ -510,17 +511,6 @@ static int au1x00_drv_pcmcia_probe(struct platform_device *dev) | |||
510 | return ret; | 511 | return ret; |
511 | } | 512 | } |
512 | 513 | ||
513 | static int au1x00_drv_pcmcia_suspend(struct platform_device *dev, | ||
514 | pm_message_t state) | ||
515 | { | ||
516 | return pcmcia_socket_dev_suspend(&dev->dev); | ||
517 | } | ||
518 | |||
519 | static int au1x00_drv_pcmcia_resume(struct platform_device *dev) | ||
520 | { | ||
521 | return pcmcia_socket_dev_resume(&dev->dev); | ||
522 | } | ||
523 | |||
524 | static struct platform_driver au1x00_pcmcia_driver = { | 514 | static struct platform_driver au1x00_pcmcia_driver = { |
525 | .driver = { | 515 | .driver = { |
526 | .name = "au1x00-pcmcia", | 516 | .name = "au1x00-pcmcia", |
@@ -528,8 +518,6 @@ static struct platform_driver au1x00_pcmcia_driver = { | |||
528 | }, | 518 | }, |
529 | .probe = au1x00_drv_pcmcia_probe, | 519 | .probe = au1x00_drv_pcmcia_probe, |
530 | .remove = au1x00_drv_pcmcia_remove, | 520 | .remove = au1x00_drv_pcmcia_remove, |
531 | .suspend = au1x00_drv_pcmcia_suspend, | ||
532 | .resume = au1x00_drv_pcmcia_resume, | ||
533 | }; | 521 | }; |
534 | 522 | ||
535 | 523 | ||
diff --git a/drivers/pcmcia/bcm63xx_pcmcia.c b/drivers/pcmcia/bcm63xx_pcmcia.c index bc88a3b19bb3..693577e0fefc 100644 --- a/drivers/pcmcia/bcm63xx_pcmcia.c +++ b/drivers/pcmcia/bcm63xx_pcmcia.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/ioport.h> | 11 | #include <linux/ioport.h> |
12 | #include <linux/timer.h> | 12 | #include <linux/timer.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
15 | #include <linux/pci.h> | 16 | #include <linux/pci.h> |
16 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
diff --git a/drivers/pcmcia/bfin_cf_pcmcia.c b/drivers/pcmcia/bfin_cf_pcmcia.c index 2482ce7ac6dc..9e84d039de41 100644 --- a/drivers/pcmcia/bfin_cf_pcmcia.c +++ b/drivers/pcmcia/bfin_cf_pcmcia.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
35 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
36 | #include <linux/irq.h> | 37 | #include <linux/irq.h> |
@@ -300,16 +301,6 @@ static int __devexit bfin_cf_remove(struct platform_device *pdev) | |||
300 | return 0; | 301 | return 0; |
301 | } | 302 | } |
302 | 303 | ||
303 | static int bfin_cf_suspend(struct platform_device *pdev, pm_message_t mesg) | ||
304 | { | ||
305 | return pcmcia_socket_dev_suspend(&pdev->dev); | ||
306 | } | ||
307 | |||
308 | static int bfin_cf_resume(struct platform_device *pdev) | ||
309 | { | ||
310 | return pcmcia_socket_dev_resume(&pdev->dev); | ||
311 | } | ||
312 | |||
313 | static struct platform_driver bfin_cf_driver = { | 304 | static struct platform_driver bfin_cf_driver = { |
314 | .driver = { | 305 | .driver = { |
315 | .name = (char *)driver_name, | 306 | .name = (char *)driver_name, |
@@ -317,8 +308,6 @@ static struct platform_driver bfin_cf_driver = { | |||
317 | }, | 308 | }, |
318 | .probe = bfin_cf_probe, | 309 | .probe = bfin_cf_probe, |
319 | .remove = __devexit_p(bfin_cf_remove), | 310 | .remove = __devexit_p(bfin_cf_remove), |
320 | .suspend = bfin_cf_suspend, | ||
321 | .resume = bfin_cf_resume, | ||
322 | }; | 311 | }; |
323 | 312 | ||
324 | static int __init bfin_cf_init(void) | 313 | static int __init bfin_cf_init(void) |
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index e679e708db63..75ed866e6953 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c | |||
@@ -76,65 +76,6 @@ DECLARE_RWSEM(pcmcia_socket_list_rwsem); | |||
76 | EXPORT_SYMBOL(pcmcia_socket_list_rwsem); | 76 | EXPORT_SYMBOL(pcmcia_socket_list_rwsem); |
77 | 77 | ||
78 | 78 | ||
79 | /* | ||
80 | * Low-level PCMCIA socket drivers need to register with the PCCard | ||
81 | * core using pcmcia_register_socket. | ||
82 | * | ||
83 | * socket drivers are expected to use the following callbacks in their | ||
84 | * .drv struct: | ||
85 | * - pcmcia_socket_dev_suspend | ||
86 | * - pcmcia_socket_dev_resume | ||
87 | * These functions check for the appropriate struct pcmcia_soket arrays, | ||
88 | * and pass them to the low-level functions pcmcia_{suspend,resume}_socket | ||
89 | */ | ||
90 | static int socket_early_resume(struct pcmcia_socket *skt); | ||
91 | static int socket_late_resume(struct pcmcia_socket *skt); | ||
92 | static int socket_resume(struct pcmcia_socket *skt); | ||
93 | static int socket_suspend(struct pcmcia_socket *skt); | ||
94 | |||
95 | static void pcmcia_socket_dev_run(struct device *dev, | ||
96 | int (*cb)(struct pcmcia_socket *)) | ||
97 | { | ||
98 | struct pcmcia_socket *socket; | ||
99 | |||
100 | down_read(&pcmcia_socket_list_rwsem); | ||
101 | list_for_each_entry(socket, &pcmcia_socket_list, socket_list) { | ||
102 | if (socket->dev.parent != dev) | ||
103 | continue; | ||
104 | mutex_lock(&socket->skt_mutex); | ||
105 | cb(socket); | ||
106 | mutex_unlock(&socket->skt_mutex); | ||
107 | } | ||
108 | up_read(&pcmcia_socket_list_rwsem); | ||
109 | } | ||
110 | |||
111 | int pcmcia_socket_dev_suspend(struct device *dev) | ||
112 | { | ||
113 | pcmcia_socket_dev_run(dev, socket_suspend); | ||
114 | return 0; | ||
115 | } | ||
116 | EXPORT_SYMBOL(pcmcia_socket_dev_suspend); | ||
117 | |||
118 | void pcmcia_socket_dev_early_resume(struct device *dev) | ||
119 | { | ||
120 | pcmcia_socket_dev_run(dev, socket_early_resume); | ||
121 | } | ||
122 | EXPORT_SYMBOL(pcmcia_socket_dev_early_resume); | ||
123 | |||
124 | void pcmcia_socket_dev_late_resume(struct device *dev) | ||
125 | { | ||
126 | pcmcia_socket_dev_run(dev, socket_late_resume); | ||
127 | } | ||
128 | EXPORT_SYMBOL(pcmcia_socket_dev_late_resume); | ||
129 | |||
130 | int pcmcia_socket_dev_resume(struct device *dev) | ||
131 | { | ||
132 | pcmcia_socket_dev_run(dev, socket_resume); | ||
133 | return 0; | ||
134 | } | ||
135 | EXPORT_SYMBOL(pcmcia_socket_dev_resume); | ||
136 | |||
137 | |||
138 | struct pcmcia_socket *pcmcia_get_socket(struct pcmcia_socket *skt) | 79 | struct pcmcia_socket *pcmcia_get_socket(struct pcmcia_socket *skt) |
139 | { | 80 | { |
140 | struct device *dev = get_device(&skt->dev); | 81 | struct device *dev = get_device(&skt->dev); |
@@ -578,12 +519,18 @@ static int socket_early_resume(struct pcmcia_socket *skt) | |||
578 | 519 | ||
579 | static int socket_late_resume(struct pcmcia_socket *skt) | 520 | static int socket_late_resume(struct pcmcia_socket *skt) |
580 | { | 521 | { |
522 | int ret; | ||
523 | |||
581 | mutex_lock(&skt->ops_mutex); | 524 | mutex_lock(&skt->ops_mutex); |
582 | skt->state &= ~SOCKET_SUSPEND; | 525 | skt->state &= ~SOCKET_SUSPEND; |
583 | mutex_unlock(&skt->ops_mutex); | 526 | mutex_unlock(&skt->ops_mutex); |
584 | 527 | ||
585 | if (!(skt->state & SOCKET_PRESENT)) | 528 | if (!(skt->state & SOCKET_PRESENT)) { |
586 | return socket_insert(skt); | 529 | ret = socket_insert(skt); |
530 | if (ret == -ENODEV) | ||
531 | ret = 0; | ||
532 | return ret; | ||
533 | } | ||
587 | 534 | ||
588 | if (skt->resume_status) { | 535 | if (skt->resume_status) { |
589 | socket_shutdown(skt); | 536 | socket_shutdown(skt); |
@@ -919,11 +866,66 @@ static void pcmcia_release_socket_class(struct class *data) | |||
919 | } | 866 | } |
920 | 867 | ||
921 | 868 | ||
869 | #ifdef CONFIG_PM | ||
870 | |||
871 | static int __pcmcia_pm_op(struct device *dev, | ||
872 | int (*callback) (struct pcmcia_socket *skt)) | ||
873 | { | ||
874 | struct pcmcia_socket *s = container_of(dev, struct pcmcia_socket, dev); | ||
875 | int ret; | ||
876 | |||
877 | mutex_lock(&s->skt_mutex); | ||
878 | ret = callback(s); | ||
879 | mutex_unlock(&s->skt_mutex); | ||
880 | |||
881 | return ret; | ||
882 | } | ||
883 | |||
884 | static int pcmcia_socket_dev_suspend_noirq(struct device *dev) | ||
885 | { | ||
886 | return __pcmcia_pm_op(dev, socket_suspend); | ||
887 | } | ||
888 | |||
889 | static int pcmcia_socket_dev_resume_noirq(struct device *dev) | ||
890 | { | ||
891 | return __pcmcia_pm_op(dev, socket_early_resume); | ||
892 | } | ||
893 | |||
894 | static int pcmcia_socket_dev_resume(struct device *dev) | ||
895 | { | ||
896 | return __pcmcia_pm_op(dev, socket_late_resume); | ||
897 | } | ||
898 | |||
899 | static const struct dev_pm_ops pcmcia_socket_pm_ops = { | ||
900 | /* dev_resume may be called with IRQs enabled */ | ||
901 | SET_SYSTEM_SLEEP_PM_OPS(NULL, | ||
902 | pcmcia_socket_dev_resume) | ||
903 | |||
904 | /* late suspend must be called with IRQs disabled */ | ||
905 | .suspend_noirq = pcmcia_socket_dev_suspend_noirq, | ||
906 | .freeze_noirq = pcmcia_socket_dev_suspend_noirq, | ||
907 | .poweroff_noirq = pcmcia_socket_dev_suspend_noirq, | ||
908 | |||
909 | /* early resume must be called with IRQs disabled */ | ||
910 | .resume_noirq = pcmcia_socket_dev_resume_noirq, | ||
911 | .thaw_noirq = pcmcia_socket_dev_resume_noirq, | ||
912 | .restore_noirq = pcmcia_socket_dev_resume_noirq, | ||
913 | }; | ||
914 | |||
915 | #define PCMCIA_SOCKET_CLASS_PM_OPS (&pcmcia_socket_pm_ops) | ||
916 | |||
917 | #else /* CONFIG_PM */ | ||
918 | |||
919 | #define PCMCIA_SOCKET_CLASS_PM_OPS NULL | ||
920 | |||
921 | #endif /* CONFIG_PM */ | ||
922 | |||
922 | struct class pcmcia_socket_class = { | 923 | struct class pcmcia_socket_class = { |
923 | .name = "pcmcia_socket", | 924 | .name = "pcmcia_socket", |
924 | .dev_uevent = pcmcia_socket_uevent, | 925 | .dev_uevent = pcmcia_socket_uevent, |
925 | .dev_release = pcmcia_release_socket, | 926 | .dev_release = pcmcia_release_socket, |
926 | .class_release = pcmcia_release_socket_class, | 927 | .class_release = pcmcia_release_socket_class, |
928 | .pm = PCMCIA_SOCKET_CLASS_PM_OPS, | ||
927 | }; | 929 | }; |
928 | EXPORT_SYMBOL(pcmcia_socket_class); | 930 | EXPORT_SYMBOL(pcmcia_socket_class); |
929 | 931 | ||
diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c index 9254ab0b29b1..6206408e196c 100644 --- a/drivers/pcmcia/db1xxx_ss.c +++ b/drivers/pcmcia/db1xxx_ss.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/pm.h> | 26 | #include <linux/pm.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/resource.h> | 28 | #include <linux/resource.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
30 | 31 | ||
31 | #include <pcmcia/cs_types.h> | 32 | #include <pcmcia/cs_types.h> |
@@ -558,37 +559,10 @@ static int __devexit db1x_pcmcia_socket_remove(struct platform_device *pdev) | |||
558 | return 0; | 559 | return 0; |
559 | } | 560 | } |
560 | 561 | ||
561 | #ifdef CONFIG_PM | ||
562 | static int db1x_pcmcia_suspend(struct device *dev) | ||
563 | { | ||
564 | return pcmcia_socket_dev_suspend(dev); | ||
565 | } | ||
566 | |||
567 | static int db1x_pcmcia_resume(struct device *dev) | ||
568 | { | ||
569 | return pcmcia_socket_dev_resume(dev); | ||
570 | } | ||
571 | |||
572 | static struct dev_pm_ops db1x_pcmcia_pmops = { | ||
573 | .resume = db1x_pcmcia_resume, | ||
574 | .suspend = db1x_pcmcia_suspend, | ||
575 | .thaw = db1x_pcmcia_resume, | ||
576 | .freeze = db1x_pcmcia_suspend, | ||
577 | }; | ||
578 | |||
579 | #define DB1XXX_SS_PMOPS &db1x_pcmcia_pmops | ||
580 | |||
581 | #else | ||
582 | |||
583 | #define DB1XXX_SS_PMOPS NULL | ||
584 | |||
585 | #endif | ||
586 | |||
587 | static struct platform_driver db1x_pcmcia_socket_driver = { | 562 | static struct platform_driver db1x_pcmcia_socket_driver = { |
588 | .driver = { | 563 | .driver = { |
589 | .name = "db1xxx_pcmcia", | 564 | .name = "db1xxx_pcmcia", |
590 | .owner = THIS_MODULE, | 565 | .owner = THIS_MODULE, |
591 | .pm = DB1XXX_SS_PMOPS | ||
592 | }, | 566 | }, |
593 | .probe = db1x_pcmcia_socket_probe, | 567 | .probe = db1x_pcmcia_socket_probe, |
594 | .remove = __devexit_p(db1x_pcmcia_socket_remove), | 568 | .remove = __devexit_p(db1x_pcmcia_socket_remove), |
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index ad93ebd7b2a2..cb6036d89e59 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/firmware.h> | 24 | #include <linux/firmware.h> |
25 | #include <linux/kref.h> | 25 | #include <linux/kref.h> |
26 | #include <linux/dma-mapping.h> | 26 | #include <linux/dma-mapping.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include <pcmcia/cs_types.h> | 29 | #include <pcmcia/cs_types.h> |
29 | #include <pcmcia/cs.h> | 30 | #include <pcmcia/cs.h> |
@@ -509,8 +510,12 @@ struct pcmcia_device *pcmcia_device_add(struct pcmcia_socket *s, unsigned int fu | |||
509 | p_dev->device_no = (s->device_count++); | 510 | p_dev->device_no = (s->device_count++); |
510 | mutex_unlock(&s->ops_mutex); | 511 | mutex_unlock(&s->ops_mutex); |
511 | 512 | ||
512 | /* max of 2 devices per card */ | 513 | /* max of 2 PFC devices */ |
513 | if (p_dev->device_no >= 2) | 514 | if ((p_dev->device_no >= 2) && (function == 0)) |
515 | goto err_free; | ||
516 | |||
517 | /* max of 4 devices overall */ | ||
518 | if (p_dev->device_no >= 4) | ||
514 | goto err_free; | 519 | goto err_free; |
515 | 520 | ||
516 | p_dev->socket = s; | 521 | p_dev->socket = s; |
diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c index 89cfddca089a..2e59fe947d28 100644 --- a/drivers/pcmcia/electra_cf.c +++ b/drivers/pcmcia/electra_cf.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
32 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
33 | #include <linux/of_platform.h> | 33 | #include <linux/of_platform.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include <pcmcia/ss.h> | 36 | #include <pcmcia/ss.h> |
36 | 37 | ||
diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c index f5da62653313..3003bb3dfcc0 100644 --- a/drivers/pcmcia/i82092.c +++ b/drivers/pcmcia/i82092.c | |||
@@ -39,27 +39,11 @@ static struct pci_device_id i82092aa_pci_ids[] = { | |||
39 | }; | 39 | }; |
40 | MODULE_DEVICE_TABLE(pci, i82092aa_pci_ids); | 40 | MODULE_DEVICE_TABLE(pci, i82092aa_pci_ids); |
41 | 41 | ||
42 | #ifdef CONFIG_PM | ||
43 | static int i82092aa_socket_suspend (struct pci_dev *dev, pm_message_t state) | ||
44 | { | ||
45 | return pcmcia_socket_dev_suspend(&dev->dev); | ||
46 | } | ||
47 | |||
48 | static int i82092aa_socket_resume (struct pci_dev *dev) | ||
49 | { | ||
50 | return pcmcia_socket_dev_resume(&dev->dev); | ||
51 | } | ||
52 | #endif | ||
53 | |||
54 | static struct pci_driver i82092aa_pci_driver = { | 42 | static struct pci_driver i82092aa_pci_driver = { |
55 | .name = "i82092aa", | 43 | .name = "i82092aa", |
56 | .id_table = i82092aa_pci_ids, | 44 | .id_table = i82092aa_pci_ids, |
57 | .probe = i82092aa_pci_probe, | 45 | .probe = i82092aa_pci_probe, |
58 | .remove = __devexit_p(i82092aa_pci_remove), | 46 | .remove = __devexit_p(i82092aa_pci_remove), |
59 | #ifdef CONFIG_PM | ||
60 | .suspend = i82092aa_socket_suspend, | ||
61 | .resume = i82092aa_socket_resume, | ||
62 | #endif | ||
63 | }; | 47 | }; |
64 | 48 | ||
65 | 49 | ||
diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c index c13fd9360511..9e2a15628de5 100644 --- a/drivers/pcmcia/i82365.c +++ b/drivers/pcmcia/i82365.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
41 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
42 | #include <linux/timer.h> | 42 | #include <linux/timer.h> |
43 | #include <linux/slab.h> | ||
44 | #include <linux/ioport.h> | 43 | #include <linux/ioport.h> |
45 | #include <linux/delay.h> | 44 | #include <linux/delay.h> |
46 | #include <linux/workqueue.h> | 45 | #include <linux/workqueue.h> |
@@ -1223,16 +1222,7 @@ static int pcic_init(struct pcmcia_socket *s) | |||
1223 | return 0; | 1222 | return 0; |
1224 | } | 1223 | } |
1225 | 1224 | ||
1226 | static int i82365_drv_pcmcia_suspend(struct platform_device *dev, | ||
1227 | pm_message_t state) | ||
1228 | { | ||
1229 | return pcmcia_socket_dev_suspend(&dev->dev); | ||
1230 | } | ||
1231 | 1225 | ||
1232 | static int i82365_drv_pcmcia_resume(struct platform_device *dev) | ||
1233 | { | ||
1234 | return pcmcia_socket_dev_resume(&dev->dev); | ||
1235 | } | ||
1236 | static struct pccard_operations pcic_operations = { | 1226 | static struct pccard_operations pcic_operations = { |
1237 | .init = pcic_init, | 1227 | .init = pcic_init, |
1238 | .get_status = pcic_get_status, | 1228 | .get_status = pcic_get_status, |
@@ -1248,8 +1238,6 @@ static struct platform_driver i82365_driver = { | |||
1248 | .name = "i82365", | 1238 | .name = "i82365", |
1249 | .owner = THIS_MODULE, | 1239 | .owner = THIS_MODULE, |
1250 | }, | 1240 | }, |
1251 | .suspend = i82365_drv_pcmcia_suspend, | ||
1252 | .resume = i82365_drv_pcmcia_resume, | ||
1253 | }; | 1241 | }; |
1254 | 1242 | ||
1255 | static struct platform_device *i82365_device; | 1243 | static struct platform_device *i82365_device; |
diff --git a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c index 0ece2cd4a85e..7e16ed8eb0a4 100644 --- a/drivers/pcmcia/m32r_cfc.c +++ b/drivers/pcmcia/m32r_cfc.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
21 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
22 | #include <linux/workqueue.h> | 21 | #include <linux/workqueue.h> |
@@ -685,16 +684,7 @@ static struct pccard_operations pcc_operations = { | |||
685 | .set_mem_map = pcc_set_mem_map, | 684 | .set_mem_map = pcc_set_mem_map, |
686 | }; | 685 | }; |
687 | 686 | ||
688 | static int cfc_drv_pcmcia_suspend(struct platform_device *dev, | ||
689 | pm_message_t state) | ||
690 | { | ||
691 | return pcmcia_socket_dev_suspend(&dev->dev); | ||
692 | } | ||
693 | 687 | ||
694 | static int cfc_drv_pcmcia_resume(struct platform_device *dev) | ||
695 | { | ||
696 | return pcmcia_socket_dev_resume(&dev->dev); | ||
697 | } | ||
698 | /*====================================================================*/ | 688 | /*====================================================================*/ |
699 | 689 | ||
700 | static struct platform_driver pcc_driver = { | 690 | static struct platform_driver pcc_driver = { |
@@ -702,8 +692,6 @@ static struct platform_driver pcc_driver = { | |||
702 | .name = "cfc", | 692 | .name = "cfc", |
703 | .owner = THIS_MODULE, | 693 | .owner = THIS_MODULE, |
704 | }, | 694 | }, |
705 | .suspend = cfc_drv_pcmcia_suspend, | ||
706 | .resume = cfc_drv_pcmcia_resume, | ||
707 | }; | 695 | }; |
708 | 696 | ||
709 | static struct platform_device pcc_device = { | 697 | static struct platform_device pcc_device = { |
diff --git a/drivers/pcmcia/m32r_pcc.c b/drivers/pcmcia/m32r_pcc.c index 72844c5a6d05..6c5c3f910d71 100644 --- a/drivers/pcmcia/m32r_pcc.c +++ b/drivers/pcmcia/m32r_pcc.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
21 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
22 | #include <linux/workqueue.h> | 21 | #include <linux/workqueue.h> |
@@ -663,16 +662,6 @@ static struct pccard_operations pcc_operations = { | |||
663 | .set_mem_map = pcc_set_mem_map, | 662 | .set_mem_map = pcc_set_mem_map, |
664 | }; | 663 | }; |
665 | 664 | ||
666 | static int pcc_drv_pcmcia_suspend(struct platform_device *dev, | ||
667 | pm_message_t state) | ||
668 | { | ||
669 | return pcmcia_socket_dev_suspend(&dev->dev); | ||
670 | } | ||
671 | |||
672 | static int pcc_drv_pcmcia_resume(struct platform_device *dev) | ||
673 | { | ||
674 | return pcmcia_socket_dev_resume(&dev->dev); | ||
675 | } | ||
676 | /*====================================================================*/ | 665 | /*====================================================================*/ |
677 | 666 | ||
678 | static struct platform_driver pcc_driver = { | 667 | static struct platform_driver pcc_driver = { |
@@ -680,8 +669,6 @@ static struct platform_driver pcc_driver = { | |||
680 | .name = "pcc", | 669 | .name = "pcc", |
681 | .owner = THIS_MODULE, | 670 | .owner = THIS_MODULE, |
682 | }, | 671 | }, |
683 | .suspend = pcc_drv_pcmcia_suspend, | ||
684 | .resume = pcc_drv_pcmcia_resume, | ||
685 | }; | 672 | }; |
686 | 673 | ||
687 | static struct platform_device pcc_device = { | 674 | static struct platform_device pcc_device = { |
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c index 61c215918128..41cc954a5ffe 100644 --- a/drivers/pcmcia/m8xx_pcmcia.c +++ b/drivers/pcmcia/m8xx_pcmcia.c | |||
@@ -42,7 +42,6 @@ | |||
42 | 42 | ||
43 | #include <linux/kernel.h> | 43 | #include <linux/kernel.h> |
44 | #include <linux/errno.h> | 44 | #include <linux/errno.h> |
45 | #include <linux/slab.h> | ||
46 | #include <linux/timer.h> | 45 | #include <linux/timer.h> |
47 | #include <linux/ioport.h> | 46 | #include <linux/ioport.h> |
48 | #include <linux/delay.h> | 47 | #include <linux/delay.h> |
@@ -1288,21 +1287,6 @@ static int m8xx_remove(struct of_device *ofdev) | |||
1288 | return 0; | 1287 | return 0; |
1289 | } | 1288 | } |
1290 | 1289 | ||
1291 | #ifdef CONFIG_PM | ||
1292 | static int m8xx_suspend(struct platform_device *pdev, pm_message_t state) | ||
1293 | { | ||
1294 | return pcmcia_socket_dev_suspend(&pdev->dev); | ||
1295 | } | ||
1296 | |||
1297 | static int m8xx_resume(struct platform_device *pdev) | ||
1298 | { | ||
1299 | return pcmcia_socket_dev_resume(&pdev->dev); | ||
1300 | } | ||
1301 | #else | ||
1302 | #define m8xx_suspend NULL | ||
1303 | #define m8xx_resume NULL | ||
1304 | #endif | ||
1305 | |||
1306 | static const struct of_device_id m8xx_pcmcia_match[] = { | 1290 | static const struct of_device_id m8xx_pcmcia_match[] = { |
1307 | { | 1291 | { |
1308 | .type = "pcmcia", | 1292 | .type = "pcmcia", |
@@ -1318,8 +1302,6 @@ static struct of_platform_driver m8xx_pcmcia_driver = { | |||
1318 | .match_table = m8xx_pcmcia_match, | 1302 | .match_table = m8xx_pcmcia_match, |
1319 | .probe = m8xx_probe, | 1303 | .probe = m8xx_probe, |
1320 | .remove = m8xx_remove, | 1304 | .remove = m8xx_remove, |
1321 | .suspend = m8xx_suspend, | ||
1322 | .resume = m8xx_resume, | ||
1323 | }; | 1305 | }; |
1324 | 1306 | ||
1325 | static int __init m8xx_init(void) | 1307 | static int __init m8xx_init(void) |
diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c index 3ef991552398..a7cfc7964c7c 100644 --- a/drivers/pcmcia/omap_cf.c +++ b/drivers/pcmcia/omap_cf.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include <pcmcia/ss.h> | 21 | #include <pcmcia/ss.h> |
21 | 22 | ||
@@ -330,24 +331,12 @@ static int __exit omap_cf_remove(struct platform_device *pdev) | |||
330 | return 0; | 331 | return 0; |
331 | } | 332 | } |
332 | 333 | ||
333 | static int omap_cf_suspend(struct platform_device *pdev, pm_message_t mesg) | ||
334 | { | ||
335 | return pcmcia_socket_dev_suspend(&pdev->dev); | ||
336 | } | ||
337 | |||
338 | static int omap_cf_resume(struct platform_device *pdev) | ||
339 | { | ||
340 | return pcmcia_socket_dev_resume(&pdev->dev); | ||
341 | } | ||
342 | |||
343 | static struct platform_driver omap_cf_driver = { | 334 | static struct platform_driver omap_cf_driver = { |
344 | .driver = { | 335 | .driver = { |
345 | .name = (char *) driver_name, | 336 | .name = (char *) driver_name, |
346 | .owner = THIS_MODULE, | 337 | .owner = THIS_MODULE, |
347 | }, | 338 | }, |
348 | .remove = __exit_p(omap_cf_remove), | 339 | .remove = __exit_p(omap_cf_remove), |
349 | .suspend = omap_cf_suspend, | ||
350 | .resume = omap_cf_resume, | ||
351 | }; | 340 | }; |
352 | 341 | ||
353 | static int __init omap_cf_init(void) | 342 | static int __init omap_cf_init(void) |
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index 13a7132cf688..104e73d5d86c 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/proc_fs.h> | 27 | #include <linux/proc_fs.h> |
28 | #include <linux/poll.h> | 28 | #include <linux/poll.h> |
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/seq_file.h> | 31 | #include <linux/seq_file.h> |
31 | #include <linux/smp_lock.h> | 32 | #include <linux/smp_lock.h> |
32 | #include <linux/workqueue.h> | 33 | #include <linux/workqueue.h> |
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index c4612c52e4cb..caec1dee2a4b 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <pcmcia/cs_types.h> | 26 | #include <pcmcia/cs_types.h> |
26 | #include <pcmcia/ss.h> | 27 | #include <pcmcia/ss.h> |
diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c index 7ba57a565cd7..b61a13663a0a 100644 --- a/drivers/pcmcia/pd6729.c +++ b/drivers/pcmcia/pd6729.c | |||
@@ -9,18 +9,19 @@ | |||
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
13 | #include <linux/init.h> | 14 | #include <linux/init.h> |
14 | #include <linux/workqueue.h> | 15 | #include <linux/workqueue.h> |
15 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
16 | #include <linux/device.h> | 17 | #include <linux/device.h> |
18 | #include <linux/io.h> | ||
17 | 19 | ||
18 | #include <pcmcia/cs_types.h> | 20 | #include <pcmcia/cs_types.h> |
19 | #include <pcmcia/ss.h> | 21 | #include <pcmcia/ss.h> |
20 | #include <pcmcia/cs.h> | 22 | #include <pcmcia/cs.h> |
21 | 23 | ||
22 | #include <asm/system.h> | 24 | #include <asm/system.h> |
23 | #include <asm/io.h> | ||
24 | 25 | ||
25 | #include "pd6729.h" | 26 | #include "pd6729.h" |
26 | #include "i82365.h" | 27 | #include "i82365.h" |
@@ -222,9 +223,9 @@ static irqreturn_t pd6729_interrupt(int irq, void *dev) | |||
222 | ? SS_READY : 0; | 223 | ? SS_READY : 0; |
223 | } | 224 | } |
224 | 225 | ||
225 | if (events) { | 226 | if (events) |
226 | pcmcia_parse_events(&socket[i].socket, events); | 227 | pcmcia_parse_events(&socket[i].socket, events); |
227 | } | 228 | |
228 | active |= events; | 229 | active |= events; |
229 | } | 230 | } |
230 | 231 | ||
@@ -256,9 +257,8 @@ static int pd6729_get_status(struct pcmcia_socket *sock, u_int *value) | |||
256 | status = indirect_read(socket, I365_STATUS); | 257 | status = indirect_read(socket, I365_STATUS); |
257 | *value = 0; | 258 | *value = 0; |
258 | 259 | ||
259 | if ((status & I365_CS_DETECT) == I365_CS_DETECT) { | 260 | if ((status & I365_CS_DETECT) == I365_CS_DETECT) |
260 | *value |= SS_DETECT; | 261 | *value |= SS_DETECT; |
261 | } | ||
262 | 262 | ||
263 | /* | 263 | /* |
264 | * IO cards have a different meaning of bits 0,1 | 264 | * IO cards have a different meaning of bits 0,1 |
@@ -308,7 +308,7 @@ static int pd6729_set_socket(struct pcmcia_socket *sock, socket_state_t *state) | |||
308 | socket->card_irq = state->io_irq; | 308 | socket->card_irq = state->io_irq; |
309 | 309 | ||
310 | reg = 0; | 310 | reg = 0; |
311 | /* The reset bit has "inverse" logic */ | 311 | /* The reset bit has "inverse" logic */ |
312 | if (!(state->flags & SS_RESET)) | 312 | if (!(state->flags & SS_RESET)) |
313 | reg |= I365_PC_RESET; | 313 | reg |= I365_PC_RESET; |
314 | if (state->flags & SS_IOCARD) | 314 | if (state->flags & SS_IOCARD) |
@@ -380,7 +380,7 @@ static int pd6729_set_socket(struct pcmcia_socket *sock, socket_state_t *state) | |||
380 | indirect_write(socket, I365_POWER, reg); | 380 | indirect_write(socket, I365_POWER, reg); |
381 | 381 | ||
382 | if (irq_mode == 1) { | 382 | if (irq_mode == 1) { |
383 | /* all interrupts are to be done as PCI interrupts */ | 383 | /* all interrupts are to be done as PCI interrupts */ |
384 | data = PD67_EC1_INV_MGMT_IRQ | PD67_EC1_INV_CARD_IRQ; | 384 | data = PD67_EC1_INV_MGMT_IRQ | PD67_EC1_INV_CARD_IRQ; |
385 | } else | 385 | } else |
386 | data = 0; | 386 | data = 0; |
@@ -391,9 +391,9 @@ static int pd6729_set_socket(struct pcmcia_socket *sock, socket_state_t *state) | |||
391 | /* Enable specific interrupt events */ | 391 | /* Enable specific interrupt events */ |
392 | 392 | ||
393 | reg = 0x00; | 393 | reg = 0x00; |
394 | if (state->csc_mask & SS_DETECT) { | 394 | if (state->csc_mask & SS_DETECT) |
395 | reg |= I365_CSC_DETECT; | 395 | reg |= I365_CSC_DETECT; |
396 | } | 396 | |
397 | if (state->flags & SS_IOCARD) { | 397 | if (state->flags & SS_IOCARD) { |
398 | if (state->csc_mask & SS_STSCHG) | 398 | if (state->csc_mask & SS_STSCHG) |
399 | reg |= I365_CSC_STSCHG; | 399 | reg |= I365_CSC_STSCHG; |
@@ -450,9 +450,12 @@ static int pd6729_set_io_map(struct pcmcia_socket *sock, | |||
450 | 450 | ||
451 | ioctl = indirect_read(socket, I365_IOCTL) & ~I365_IOCTL_MASK(map); | 451 | ioctl = indirect_read(socket, I365_IOCTL) & ~I365_IOCTL_MASK(map); |
452 | 452 | ||
453 | if (io->flags & MAP_0WS) ioctl |= I365_IOCTL_0WS(map); | 453 | if (io->flags & MAP_0WS) |
454 | if (io->flags & MAP_16BIT) ioctl |= I365_IOCTL_16BIT(map); | 454 | ioctl |= I365_IOCTL_0WS(map); |
455 | if (io->flags & MAP_AUTOSZ) ioctl |= I365_IOCTL_IOCS16(map); | 455 | if (io->flags & MAP_16BIT) |
456 | ioctl |= I365_IOCTL_16BIT(map); | ||
457 | if (io->flags & MAP_AUTOSZ) | ||
458 | ioctl |= I365_IOCTL_IOCS16(map); | ||
456 | 459 | ||
457 | indirect_write(socket, I365_IOCTL, ioctl); | 460 | indirect_write(socket, I365_IOCTL, ioctl); |
458 | 461 | ||
@@ -497,7 +500,7 @@ static int pd6729_set_mem_map(struct pcmcia_socket *sock, | |||
497 | 500 | ||
498 | /* write the stop address */ | 501 | /* write the stop address */ |
499 | 502 | ||
500 | i= (mem->res->end >> 12) & 0x0fff; | 503 | i = (mem->res->end >> 12) & 0x0fff; |
501 | switch (to_cycles(mem->speed)) { | 504 | switch (to_cycles(mem->speed)) { |
502 | case 0: | 505 | case 0: |
503 | break; | 506 | break; |
@@ -563,7 +566,7 @@ static int pd6729_init(struct pcmcia_socket *sock) | |||
563 | 566 | ||
564 | /* the pccard structure and its functions */ | 567 | /* the pccard structure and its functions */ |
565 | static struct pccard_operations pd6729_operations = { | 568 | static struct pccard_operations pd6729_operations = { |
566 | .init = pd6729_init, | 569 | .init = pd6729_init, |
567 | .get_status = pd6729_get_status, | 570 | .get_status = pd6729_get_status, |
568 | .set_socket = pd6729_set_socket, | 571 | .set_socket = pd6729_set_socket, |
569 | .set_io_map = pd6729_set_io_map, | 572 | .set_io_map = pd6729_set_io_map, |
@@ -578,8 +581,13 @@ static irqreturn_t pd6729_test(int irq, void *dev) | |||
578 | 581 | ||
579 | static int pd6729_check_irq(int irq) | 582 | static int pd6729_check_irq(int irq) |
580 | { | 583 | { |
581 | if (request_irq(irq, pd6729_test, IRQF_PROBE_SHARED, "x", pd6729_test) | 584 | int ret; |
582 | != 0) return -1; | 585 | |
586 | ret = request_irq(irq, pd6729_test, IRQF_PROBE_SHARED, "x", | ||
587 | pd6729_test); | ||
588 | if (ret) | ||
589 | return -1; | ||
590 | |||
583 | free_irq(irq, pd6729_test); | 591 | free_irq(irq, pd6729_test); |
584 | return 0; | 592 | return 0; |
585 | } | 593 | } |
@@ -591,7 +599,7 @@ static u_int __devinit pd6729_isa_scan(void) | |||
591 | 599 | ||
592 | if (irq_mode == 1) { | 600 | if (irq_mode == 1) { |
593 | printk(KERN_INFO "pd6729: PCI card interrupts, " | 601 | printk(KERN_INFO "pd6729: PCI card interrupts, " |
594 | "PCI status changes\n"); | 602 | "PCI status changes\n"); |
595 | return 0; | 603 | return 0; |
596 | } | 604 | } |
597 | 605 | ||
@@ -607,9 +615,10 @@ static u_int __devinit pd6729_isa_scan(void) | |||
607 | if (mask & (1<<i)) | 615 | if (mask & (1<<i)) |
608 | printk("%s%d", ((mask & ((1<<i)-1)) ? "," : ""), i); | 616 | printk("%s%d", ((mask & ((1<<i)-1)) ? "," : ""), i); |
609 | 617 | ||
610 | if (mask == 0) printk("none!"); | 618 | if (mask == 0) |
611 | 619 | printk("none!"); | |
612 | printk(" polling status changes.\n"); | 620 | else |
621 | printk(" polling status changes.\n"); | ||
613 | 622 | ||
614 | return mask; | 623 | return mask; |
615 | } | 624 | } |
@@ -624,11 +633,16 @@ static int __devinit pd6729_pci_probe(struct pci_dev *dev, | |||
624 | 633 | ||
625 | socket = kzalloc(sizeof(struct pd6729_socket) * MAX_SOCKETS, | 634 | socket = kzalloc(sizeof(struct pd6729_socket) * MAX_SOCKETS, |
626 | GFP_KERNEL); | 635 | GFP_KERNEL); |
627 | if (!socket) | 636 | if (!socket) { |
637 | dev_warn(&dev->dev, "failed to kzalloc socket.\n"); | ||
628 | return -ENOMEM; | 638 | return -ENOMEM; |
639 | } | ||
629 | 640 | ||
630 | if ((ret = pci_enable_device(dev))) | 641 | ret = pci_enable_device(dev); |
642 | if (ret) { | ||
643 | dev_warn(&dev->dev, "failed to enable pci_device.\n"); | ||
631 | goto err_out_free_mem; | 644 | goto err_out_free_mem; |
645 | } | ||
632 | 646 | ||
633 | if (!pci_resource_start(dev, 0)) { | 647 | if (!pci_resource_start(dev, 0)) { |
634 | dev_warn(&dev->dev, "refusing to load the driver as the " | 648 | dev_warn(&dev->dev, "refusing to load the driver as the " |
@@ -639,7 +653,7 @@ static int __devinit pd6729_pci_probe(struct pci_dev *dev, | |||
639 | dev_info(&dev->dev, "Cirrus PD6729 PCI to PCMCIA Bridge at 0x%llx " | 653 | dev_info(&dev->dev, "Cirrus PD6729 PCI to PCMCIA Bridge at 0x%llx " |
640 | "on irq %d\n", | 654 | "on irq %d\n", |
641 | (unsigned long long)pci_resource_start(dev, 0), dev->irq); | 655 | (unsigned long long)pci_resource_start(dev, 0), dev->irq); |
642 | /* | 656 | /* |
643 | * Since we have no memory BARs some firmware may not | 657 | * Since we have no memory BARs some firmware may not |
644 | * have had PCI_COMMAND_MEMORY enabled, yet the device needs it. | 658 | * have had PCI_COMMAND_MEMORY enabled, yet the device needs it. |
645 | */ | 659 | */ |
@@ -685,8 +699,9 @@ static int __devinit pd6729_pci_probe(struct pci_dev *dev, | |||
685 | pci_set_drvdata(dev, socket); | 699 | pci_set_drvdata(dev, socket); |
686 | if (irq_mode == 1) { | 700 | if (irq_mode == 1) { |
687 | /* Register the interrupt handler */ | 701 | /* Register the interrupt handler */ |
688 | if ((ret = request_irq(dev->irq, pd6729_interrupt, IRQF_SHARED, | 702 | ret = request_irq(dev->irq, pd6729_interrupt, IRQF_SHARED, |
689 | "pd6729", socket))) { | 703 | "pd6729", socket); |
704 | if (ret) { | ||
690 | dev_err(&dev->dev, "Failed to register irq %d\n", | 705 | dev_err(&dev->dev, "Failed to register irq %d\n", |
691 | dev->irq); | 706 | dev->irq); |
692 | goto err_out_free_res; | 707 | goto err_out_free_res; |
@@ -750,18 +765,6 @@ static void __devexit pd6729_pci_remove(struct pci_dev *dev) | |||
750 | kfree(socket); | 765 | kfree(socket); |
751 | } | 766 | } |
752 | 767 | ||
753 | #ifdef CONFIG_PM | ||
754 | static int pd6729_socket_suspend(struct pci_dev *dev, pm_message_t state) | ||
755 | { | ||
756 | return pcmcia_socket_dev_suspend(&dev->dev); | ||
757 | } | ||
758 | |||
759 | static int pd6729_socket_resume(struct pci_dev *dev) | ||
760 | { | ||
761 | return pcmcia_socket_dev_resume(&dev->dev); | ||
762 | } | ||
763 | #endif | ||
764 | |||
765 | static struct pci_device_id pd6729_pci_ids[] = { | 768 | static struct pci_device_id pd6729_pci_ids[] = { |
766 | { | 769 | { |
767 | .vendor = PCI_VENDOR_ID_CIRRUS, | 770 | .vendor = PCI_VENDOR_ID_CIRRUS, |
@@ -778,10 +781,6 @@ static struct pci_driver pd6729_pci_driver = { | |||
778 | .id_table = pd6729_pci_ids, | 781 | .id_table = pd6729_pci_ids, |
779 | .probe = pd6729_pci_probe, | 782 | .probe = pd6729_pci_probe, |
780 | .remove = __devexit_p(pd6729_pci_remove), | 783 | .remove = __devexit_p(pd6729_pci_remove), |
781 | #ifdef CONFIG_PM | ||
782 | .suspend = pd6729_socket_suspend, | ||
783 | .resume = pd6729_socket_resume, | ||
784 | #endif | ||
785 | }; | 784 | }; |
786 | 785 | ||
787 | static int pd6729_module_init(void) | 786 | static int pd6729_module_init(void) |
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index 76e640bccde8..df4532e91b1a 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c | |||
@@ -17,6 +17,7 @@ | |||
17 | ======================================================================*/ | 17 | ======================================================================*/ |
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | #include <linux/cpufreq.h> | 22 | #include <linux/cpufreq.h> |
22 | #include <linux/ioport.h> | 23 | #include <linux/ioport.h> |
@@ -325,19 +326,13 @@ static int pxa2xx_drv_pcmcia_remove(struct platform_device *dev) | |||
325 | return 0; | 326 | return 0; |
326 | } | 327 | } |
327 | 328 | ||
328 | static int pxa2xx_drv_pcmcia_suspend(struct device *dev) | ||
329 | { | ||
330 | return pcmcia_socket_dev_suspend(dev); | ||
331 | } | ||
332 | |||
333 | static int pxa2xx_drv_pcmcia_resume(struct device *dev) | 329 | static int pxa2xx_drv_pcmcia_resume(struct device *dev) |
334 | { | 330 | { |
335 | pxa2xx_configure_sockets(dev); | 331 | pxa2xx_configure_sockets(dev); |
336 | return pcmcia_socket_dev_resume(dev); | 332 | return 0; |
337 | } | 333 | } |
338 | 334 | ||
339 | static const struct dev_pm_ops pxa2xx_drv_pcmcia_pm_ops = { | 335 | static const struct dev_pm_ops pxa2xx_drv_pcmcia_pm_ops = { |
340 | .suspend = pxa2xx_drv_pcmcia_suspend, | ||
341 | .resume = pxa2xx_drv_pcmcia_resume, | 336 | .resume = pxa2xx_drv_pcmcia_resume, |
342 | }; | 337 | }; |
343 | 338 | ||
diff --git a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c index 452c83b512c4..ffa5f3cae57b 100644 --- a/drivers/pcmcia/rsrc_mgr.c +++ b/drivers/pcmcia/rsrc_mgr.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * (C) 1999 David A. Hinds | 12 | * (C) 1999 David A. Hinds |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/slab.h> | ||
15 | #include <linux/module.h> | 16 | #include <linux/module.h> |
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
17 | 18 | ||
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index 4663b3fa9f96..559069a80a3b 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c | |||
@@ -596,19 +596,17 @@ struct pcmcia_align_data { | |||
596 | struct resource_map *map; | 596 | struct resource_map *map; |
597 | }; | 597 | }; |
598 | 598 | ||
599 | static resource_size_t | 599 | static resource_size_t pcmcia_common_align(struct pcmcia_align_data *align_data, |
600 | pcmcia_common_align(void *align_data, const struct resource *res, | 600 | resource_size_t start) |
601 | resource_size_t size, resource_size_t align) | ||
602 | { | 601 | { |
603 | struct pcmcia_align_data *data = align_data; | 602 | resource_size_t ret; |
604 | resource_size_t start; | ||
605 | /* | 603 | /* |
606 | * Ensure that we have the correct start address | 604 | * Ensure that we have the correct start address |
607 | */ | 605 | */ |
608 | start = (res->start & ~data->mask) + data->offset; | 606 | ret = (start & ~align_data->mask) + align_data->offset; |
609 | if (start < res->start) | 607 | if (ret < start) |
610 | start += data->mask + 1; | 608 | ret += align_data->mask + 1; |
611 | return start; | 609 | return ret; |
612 | } | 610 | } |
613 | 611 | ||
614 | static resource_size_t | 612 | static resource_size_t |
@@ -619,29 +617,28 @@ pcmcia_align(void *align_data, const struct resource *res, | |||
619 | struct resource_map *m; | 617 | struct resource_map *m; |
620 | resource_size_t start; | 618 | resource_size_t start; |
621 | 619 | ||
622 | start = pcmcia_common_align(data, res, size, align); | 620 | start = pcmcia_common_align(data, res->start); |
623 | 621 | ||
624 | for (m = data->map->next; m != data->map; m = m->next) { | 622 | for (m = data->map->next; m != data->map; m = m->next) { |
625 | unsigned long start = m->base; | 623 | unsigned long map_start = m->base; |
626 | unsigned long end = m->base + m->num - 1; | 624 | unsigned long map_end = m->base + m->num - 1; |
627 | 625 | ||
628 | /* | 626 | /* |
629 | * If the lower resources are not available, try aligning | 627 | * If the lower resources are not available, try aligning |
630 | * to this entry of the resource database to see if it'll | 628 | * to this entry of the resource database to see if it'll |
631 | * fit here. | 629 | * fit here. |
632 | */ | 630 | */ |
633 | if (res->start < start) { | 631 | if (start < map_start) |
634 | start = pcmcia_common_align(data, res, size, align); | 632 | start = pcmcia_common_align(data, map_start); |
635 | } | ||
636 | 633 | ||
637 | /* | 634 | /* |
638 | * If we're above the area which was passed in, there's | 635 | * If we're above the area which was passed in, there's |
639 | * no point proceeding. | 636 | * no point proceeding. |
640 | */ | 637 | */ |
641 | if (res->start >= res->end) | 638 | if (start >= res->end) |
642 | break; | 639 | break; |
643 | 640 | ||
644 | if ((res->start + size - 1) <= end) | 641 | if ((start + size - 1) <= map_end) |
645 | break; | 642 | break; |
646 | } | 643 | } |
647 | 644 | ||
@@ -810,6 +807,13 @@ static int adjust_io(struct pcmcia_socket *s, unsigned int action, unsigned long | |||
810 | unsigned long size = end - start + 1; | 807 | unsigned long size = end - start + 1; |
811 | int ret = 0; | 808 | int ret = 0; |
812 | 809 | ||
810 | #if defined(CONFIG_X86) | ||
811 | /* on x86, avoid anything < 0x100 for it is often used for | ||
812 | * legacy platform devices */ | ||
813 | if (start < 0x100) | ||
814 | start = 0x100; | ||
815 | #endif | ||
816 | |||
813 | if (end < start) | 817 | if (end < start) |
814 | return -EINVAL; | 818 | return -EINVAL; |
815 | 819 | ||
@@ -867,10 +871,8 @@ static int nonstatic_autoadd_resources(struct pcmcia_socket *s) | |||
867 | if (res == &ioport_resource) | 871 | if (res == &ioport_resource) |
868 | continue; | 872 | continue; |
869 | dev_printk(KERN_INFO, &s->cb_dev->dev, | 873 | dev_printk(KERN_INFO, &s->cb_dev->dev, |
870 | "pcmcia: parent PCI bridge I/O " | 874 | "pcmcia: parent PCI bridge window: %pR\n", |
871 | "window: 0x%llx - 0x%llx\n", | 875 | res); |
872 | (unsigned long long)res->start, | ||
873 | (unsigned long long)res->end); | ||
874 | if (!adjust_io(s, ADD_MANAGED_RESOURCE, res->start, res->end)) | 876 | if (!adjust_io(s, ADD_MANAGED_RESOURCE, res->start, res->end)) |
875 | done |= IORESOURCE_IO; | 877 | done |= IORESOURCE_IO; |
876 | 878 | ||
@@ -880,10 +882,8 @@ static int nonstatic_autoadd_resources(struct pcmcia_socket *s) | |||
880 | if (res == &iomem_resource) | 882 | if (res == &iomem_resource) |
881 | continue; | 883 | continue; |
882 | dev_printk(KERN_INFO, &s->cb_dev->dev, | 884 | dev_printk(KERN_INFO, &s->cb_dev->dev, |
883 | "pcmcia: parent PCI bridge Memory " | 885 | "pcmcia: parent PCI bridge window: %pR\n", |
884 | "window: 0x%llx - 0x%llx\n", | 886 | res); |
885 | (unsigned long long)res->start, | ||
886 | (unsigned long long)res->end); | ||
887 | if (!adjust_memory(s, ADD_MANAGED_RESOURCE, res->start, res->end)) | 887 | if (!adjust_memory(s, ADD_MANAGED_RESOURCE, res->start, res->end)) |
888 | done |= IORESOURCE_MEM; | 888 | done |= IORESOURCE_MEM; |
889 | } | 889 | } |
diff --git a/drivers/pcmcia/sa1100_generic.c b/drivers/pcmcia/sa1100_generic.c index 8db86b90c200..edbd8c472628 100644 --- a/drivers/pcmcia/sa1100_generic.c +++ b/drivers/pcmcia/sa1100_generic.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/platform_device.h> | 36 | #include <linux/platform_device.h> |
36 | 37 | ||
37 | #include <pcmcia/cs_types.h> | 38 | #include <pcmcia/cs_types.h> |
@@ -95,17 +96,6 @@ static int sa11x0_drv_pcmcia_remove(struct platform_device *dev) | |||
95 | return 0; | 96 | return 0; |
96 | } | 97 | } |
97 | 98 | ||
98 | static int sa11x0_drv_pcmcia_suspend(struct platform_device *dev, | ||
99 | pm_message_t state) | ||
100 | { | ||
101 | return pcmcia_socket_dev_suspend(&dev->dev); | ||
102 | } | ||
103 | |||
104 | static int sa11x0_drv_pcmcia_resume(struct platform_device *dev) | ||
105 | { | ||
106 | return pcmcia_socket_dev_resume(&dev->dev); | ||
107 | } | ||
108 | |||
109 | static struct platform_driver sa11x0_pcmcia_driver = { | 99 | static struct platform_driver sa11x0_pcmcia_driver = { |
110 | .driver = { | 100 | .driver = { |
111 | .name = "sa11x0-pcmcia", | 101 | .name = "sa11x0-pcmcia", |
@@ -113,8 +103,6 @@ static struct platform_driver sa11x0_pcmcia_driver = { | |||
113 | }, | 103 | }, |
114 | .probe = sa11x0_drv_pcmcia_probe, | 104 | .probe = sa11x0_drv_pcmcia_probe, |
115 | .remove = sa11x0_drv_pcmcia_remove, | 105 | .remove = sa11x0_drv_pcmcia_remove, |
116 | .suspend = sa11x0_drv_pcmcia_suspend, | ||
117 | .resume = sa11x0_drv_pcmcia_resume, | ||
118 | }; | 106 | }; |
119 | 107 | ||
120 | /* sa11x0_pcmcia_init() | 108 | /* sa11x0_pcmcia_init() |
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c index db79ca61cf96..59866905ea37 100644 --- a/drivers/pcmcia/sa1111_generic.c +++ b/drivers/pcmcia/sa1111_generic.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include <pcmcia/ss.h> | 17 | #include <pcmcia/ss.h> |
17 | 18 | ||
@@ -213,16 +214,6 @@ static int __devexit pcmcia_remove(struct sa1111_dev *dev) | |||
213 | return 0; | 214 | return 0; |
214 | } | 215 | } |
215 | 216 | ||
216 | static int pcmcia_suspend(struct sa1111_dev *dev, pm_message_t state) | ||
217 | { | ||
218 | return pcmcia_socket_dev_suspend(&dev->dev); | ||
219 | } | ||
220 | |||
221 | static int pcmcia_resume(struct sa1111_dev *dev) | ||
222 | { | ||
223 | return pcmcia_socket_dev_resume(&dev->dev); | ||
224 | } | ||
225 | |||
226 | static struct sa1111_driver pcmcia_driver = { | 217 | static struct sa1111_driver pcmcia_driver = { |
227 | .drv = { | 218 | .drv = { |
228 | .name = "sa1111-pcmcia", | 219 | .name = "sa1111-pcmcia", |
@@ -230,8 +221,6 @@ static struct sa1111_driver pcmcia_driver = { | |||
230 | .devid = SA1111_DEVID_PCMCIA, | 221 | .devid = SA1111_DEVID_PCMCIA, |
231 | .probe = pcmcia_probe, | 222 | .probe = pcmcia_probe, |
232 | .remove = __devexit_p(pcmcia_remove), | 223 | .remove = __devexit_p(pcmcia_remove), |
233 | .suspend = pcmcia_suspend, | ||
234 | .resume = pcmcia_resume, | ||
235 | }; | 224 | }; |
236 | 225 | ||
237 | static int __init sa1111_drv_pcmcia_init(void) | 226 | static int __init sa1111_drv_pcmcia_init(void) |
diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c index fc9a6527019b..fa28d8911b00 100644 --- a/drivers/pcmcia/sa11xx_base.c +++ b/drivers/pcmcia/sa11xx_base.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
38 | #include <linux/spinlock.h> | 38 | #include <linux/spinlock.h> |
39 | #include <linux/io.h> | 39 | #include <linux/io.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | #include <mach/hardware.h> | 42 | #include <mach/hardware.h> |
42 | #include <asm/irq.h> | 43 | #include <asm/irq.h> |
diff --git a/drivers/pcmcia/socket_sysfs.c b/drivers/pcmcia/socket_sysfs.c index 08278016e58d..80e36bc407da 100644 --- a/drivers/pcmcia/socket_sysfs.c +++ b/drivers/pcmcia/socket_sysfs.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/major.h> | 16 | #include <linux/major.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
20 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
21 | #include <linux/timer.h> | 20 | #include <linux/timer.h> |
diff --git a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c index 12c49ee135e1..56004a1b5bba 100644 --- a/drivers/pcmcia/tcic.c +++ b/drivers/pcmcia/tcic.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/string.h> | 39 | #include <linux/string.h> |
40 | #include <linux/errno.h> | 40 | #include <linux/errno.h> |
41 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
42 | #include <linux/slab.h> | ||
43 | #include <linux/timer.h> | 42 | #include <linux/timer.h> |
44 | #include <linux/ioport.h> | 43 | #include <linux/ioport.h> |
45 | #include <linux/delay.h> | 44 | #include <linux/delay.h> |
@@ -348,16 +347,6 @@ static int __init get_tcic_id(void) | |||
348 | return id; | 347 | return id; |
349 | } | 348 | } |
350 | 349 | ||
351 | static int tcic_drv_pcmcia_suspend(struct platform_device *dev, | ||
352 | pm_message_t state) | ||
353 | { | ||
354 | return pcmcia_socket_dev_suspend(&dev->dev); | ||
355 | } | ||
356 | |||
357 | static int tcic_drv_pcmcia_resume(struct platform_device *dev) | ||
358 | { | ||
359 | return pcmcia_socket_dev_resume(&dev->dev); | ||
360 | } | ||
361 | /*====================================================================*/ | 350 | /*====================================================================*/ |
362 | 351 | ||
363 | static struct platform_driver tcic_driver = { | 352 | static struct platform_driver tcic_driver = { |
@@ -365,8 +354,6 @@ static struct platform_driver tcic_driver = { | |||
365 | .name = "tcic-pcmcia", | 354 | .name = "tcic-pcmcia", |
366 | .owner = THIS_MODULE, | 355 | .owner = THIS_MODULE, |
367 | }, | 356 | }, |
368 | .suspend = tcic_drv_pcmcia_suspend, | ||
369 | .resume = tcic_drv_pcmcia_resume, | ||
370 | }; | 357 | }; |
371 | 358 | ||
372 | static struct platform_device tcic_device = { | 359 | static struct platform_device tcic_device = { |
diff --git a/drivers/pcmcia/vrc4171_card.c b/drivers/pcmcia/vrc4171_card.c index aaccdb9f4ba1..86e4a1a3c642 100644 --- a/drivers/pcmcia/vrc4171_card.c +++ b/drivers/pcmcia/vrc4171_card.c | |||
@@ -705,24 +705,11 @@ static int __devinit vrc4171_card_setup(char *options) | |||
705 | 705 | ||
706 | __setup("vrc4171_card=", vrc4171_card_setup); | 706 | __setup("vrc4171_card=", vrc4171_card_setup); |
707 | 707 | ||
708 | static int vrc4171_card_suspend(struct platform_device *dev, | ||
709 | pm_message_t state) | ||
710 | { | ||
711 | return pcmcia_socket_dev_suspend(&dev->dev); | ||
712 | } | ||
713 | |||
714 | static int vrc4171_card_resume(struct platform_device *dev) | ||
715 | { | ||
716 | return pcmcia_socket_dev_resume(&dev->dev); | ||
717 | } | ||
718 | |||
719 | static struct platform_driver vrc4171_card_driver = { | 708 | static struct platform_driver vrc4171_card_driver = { |
720 | .driver = { | 709 | .driver = { |
721 | .name = vrc4171_card_name, | 710 | .name = vrc4171_card_name, |
722 | .owner = THIS_MODULE, | 711 | .owner = THIS_MODULE, |
723 | }, | 712 | }, |
724 | .suspend = vrc4171_card_suspend, | ||
725 | .resume = vrc4171_card_resume, | ||
726 | }; | 713 | }; |
727 | 714 | ||
728 | static int __devinit vrc4171_card_init(void) | 715 | static int __devinit vrc4171_card_init(void) |
diff --git a/drivers/pcmcia/xxs1500_ss.c b/drivers/pcmcia/xxs1500_ss.c index f9009d34254b..201ccfa1e97b 100644 --- a/drivers/pcmcia/xxs1500_ss.c +++ b/drivers/pcmcia/xxs1500_ss.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/pm.h> | 15 | #include <linux/pm.h> |
16 | #include <linux/resource.h> | 16 | #include <linux/resource.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
18 | 19 | ||
19 | #include <pcmcia/cs_types.h> | 20 | #include <pcmcia/cs_types.h> |
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index 418988ab6edf..83ace277426c 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include <pcmcia/cs_types.h> | 22 | #include <pcmcia/cs_types.h> |
22 | #include <pcmcia/ss.h> | 23 | #include <pcmcia/ss.h> |
@@ -1290,12 +1291,9 @@ static int yenta_dev_suspend_noirq(struct device *dev) | |||
1290 | { | 1291 | { |
1291 | struct pci_dev *pdev = to_pci_dev(dev); | 1292 | struct pci_dev *pdev = to_pci_dev(dev); |
1292 | struct yenta_socket *socket = pci_get_drvdata(pdev); | 1293 | struct yenta_socket *socket = pci_get_drvdata(pdev); |
1293 | int ret; | ||
1294 | |||
1295 | ret = pcmcia_socket_dev_suspend(dev); | ||
1296 | 1294 | ||
1297 | if (!socket) | 1295 | if (!socket) |
1298 | return ret; | 1296 | return 0; |
1299 | 1297 | ||
1300 | if (socket->type && socket->type->save_state) | 1298 | if (socket->type && socket->type->save_state) |
1301 | socket->type->save_state(socket); | 1299 | socket->type->save_state(socket); |
@@ -1312,7 +1310,7 @@ static int yenta_dev_suspend_noirq(struct device *dev) | |||
1312 | */ | 1310 | */ |
1313 | /* pci_set_power_state(dev, 3); */ | 1311 | /* pci_set_power_state(dev, 3); */ |
1314 | 1312 | ||
1315 | return ret; | 1313 | return 0; |
1316 | } | 1314 | } |
1317 | 1315 | ||
1318 | static int yenta_dev_resume_noirq(struct device *dev) | 1316 | static int yenta_dev_resume_noirq(struct device *dev) |
@@ -1336,26 +1334,16 @@ static int yenta_dev_resume_noirq(struct device *dev) | |||
1336 | if (socket->type && socket->type->restore_state) | 1334 | if (socket->type && socket->type->restore_state) |
1337 | socket->type->restore_state(socket); | 1335 | socket->type->restore_state(socket); |
1338 | 1336 | ||
1339 | pcmcia_socket_dev_early_resume(dev); | ||
1340 | return 0; | ||
1341 | } | ||
1342 | |||
1343 | static int yenta_dev_resume(struct device *dev) | ||
1344 | { | ||
1345 | pcmcia_socket_dev_late_resume(dev); | ||
1346 | return 0; | 1337 | return 0; |
1347 | } | 1338 | } |
1348 | 1339 | ||
1349 | static const struct dev_pm_ops yenta_pm_ops = { | 1340 | static const struct dev_pm_ops yenta_pm_ops = { |
1350 | .suspend_noirq = yenta_dev_suspend_noirq, | 1341 | .suspend_noirq = yenta_dev_suspend_noirq, |
1351 | .resume_noirq = yenta_dev_resume_noirq, | 1342 | .resume_noirq = yenta_dev_resume_noirq, |
1352 | .resume = yenta_dev_resume, | ||
1353 | .freeze_noirq = yenta_dev_suspend_noirq, | 1343 | .freeze_noirq = yenta_dev_suspend_noirq, |
1354 | .thaw_noirq = yenta_dev_resume_noirq, | 1344 | .thaw_noirq = yenta_dev_resume_noirq, |
1355 | .thaw = yenta_dev_resume, | ||
1356 | .poweroff_noirq = yenta_dev_suspend_noirq, | 1345 | .poweroff_noirq = yenta_dev_suspend_noirq, |
1357 | .restore_noirq = yenta_dev_resume_noirq, | 1346 | .restore_noirq = yenta_dev_resume_noirq, |
1358 | .restore = yenta_dev_resume, | ||
1359 | }; | 1347 | }; |
1360 | 1348 | ||
1361 | #define YENTA_PM_OPS (¥ta_pm_ops) | 1349 | #define YENTA_PM_OPS (¥ta_pm_ops) |
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index e631dbeafd79..7bec4588c268 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig | |||
@@ -385,6 +385,16 @@ config EEEPC_LAPTOP | |||
385 | 385 | ||
386 | If you have an Eee PC laptop, say Y or M here. | 386 | If you have an Eee PC laptop, say Y or M here. |
387 | 387 | ||
388 | config EEEPC_WMI | ||
389 | tristate "Eee PC WMI Hotkey Driver (EXPERIMENTAL)" | ||
390 | depends on ACPI_WMI | ||
391 | depends on INPUT | ||
392 | depends on EXPERIMENTAL | ||
393 | ---help--- | ||
394 | Say Y here if you want to support WMI-based hotkeys on Eee PC laptops. | ||
395 | |||
396 | To compile this driver as a module, choose M here: the module will | ||
397 | be called eeepc-wmi. | ||
388 | 398 | ||
389 | config ACPI_WMI | 399 | config ACPI_WMI |
390 | tristate "WMI" | 400 | tristate "WMI" |
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile index 9cd9fa0a27e6..a906490e3530 100644 --- a/drivers/platform/x86/Makefile +++ b/drivers/platform/x86/Makefile | |||
@@ -4,6 +4,7 @@ | |||
4 | # | 4 | # |
5 | obj-$(CONFIG_ASUS_LAPTOP) += asus-laptop.o | 5 | obj-$(CONFIG_ASUS_LAPTOP) += asus-laptop.o |
6 | obj-$(CONFIG_EEEPC_LAPTOP) += eeepc-laptop.o | 6 | obj-$(CONFIG_EEEPC_LAPTOP) += eeepc-laptop.o |
7 | obj-$(CONFIG_EEEPC_WMI) += eeepc-wmi.o | ||
7 | obj-$(CONFIG_MSI_LAPTOP) += msi-laptop.o | 8 | obj-$(CONFIG_MSI_LAPTOP) += msi-laptop.o |
8 | obj-$(CONFIG_ACPI_CMPC) += classmate-laptop.o | 9 | obj-$(CONFIG_ACPI_CMPC) += classmate-laptop.o |
9 | obj-$(CONFIG_COMPAL_LAPTOP) += compal-laptop.o | 10 | obj-$(CONFIG_COMPAL_LAPTOP) += compal-laptop.o |
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index cbca40aa4006..1ea6c434d330 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/rfkill.h> | 36 | #include <linux/rfkill.h> |
37 | #include <linux/workqueue.h> | 37 | #include <linux/workqueue.h> |
38 | #include <linux/debugfs.h> | 38 | #include <linux/debugfs.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | #include <acpi/acpi_drivers.h> | 41 | #include <acpi/acpi_drivers.h> |
41 | 42 | ||
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index db5f7db2ba33..52262b012abb 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/input.h> | 49 | #include <linux/input.h> |
50 | #include <linux/input/sparse-keymap.h> | 50 | #include <linux/input/sparse-keymap.h> |
51 | #include <linux/rfkill.h> | 51 | #include <linux/rfkill.h> |
52 | #include <linux/slab.h> | ||
52 | #include <acpi/acpi_drivers.h> | 53 | #include <acpi/acpi_drivers.h> |
53 | #include <acpi/acpi_bus.h> | 54 | #include <acpi/acpi_bus.h> |
54 | 55 | ||
@@ -139,7 +140,7 @@ MODULE_PARM_DESC(bluetooth_status, "Set the wireless status on boot " | |||
139 | 140 | ||
140 | /* Backlight */ | 141 | /* Backlight */ |
141 | static acpi_handle lcd_switch_handle; | 142 | static acpi_handle lcd_switch_handle; |
142 | static const char *lcd_switch_paths[] = { | 143 | static char *lcd_switch_paths[] = { |
143 | "\\_SB.PCI0.SBRG.EC0._Q10", /* All new models */ | 144 | "\\_SB.PCI0.SBRG.EC0._Q10", /* All new models */ |
144 | "\\_SB.PCI0.ISA.EC0._Q10", /* A1x */ | 145 | "\\_SB.PCI0.ISA.EC0._Q10", /* A1x */ |
145 | "\\_SB.PCI0.PX40.ECD0._Q10", /* L3C */ | 146 | "\\_SB.PCI0.PX40.ECD0._Q10", /* L3C */ |
@@ -153,7 +154,7 @@ static const char *lcd_switch_paths[] = { | |||
153 | #define METHOD_SWITCH_DISPLAY "SDSP" | 154 | #define METHOD_SWITCH_DISPLAY "SDSP" |
154 | 155 | ||
155 | static acpi_handle display_get_handle; | 156 | static acpi_handle display_get_handle; |
156 | static const char *display_get_paths[] = { | 157 | static char *display_get_paths[] = { |
157 | /* A6B, A6K A6R A7D F3JM L4R M6R A3G M6A M6V VX-1 V6J V6V W3Z */ | 158 | /* A6B, A6K A6R A7D F3JM L4R M6R A3G M6A M6V VX-1 V6J V6V W3Z */ |
158 | "\\_SB.PCI0.P0P1.VGA.GETD", | 159 | "\\_SB.PCI0.P0P1.VGA.GETD", |
159 | /* A3E A4K, A4D A4L A6J A7J A8J Z71V M9V S5A M5A z33A W1Jc W2V G1 */ | 160 | /* A3E A4K, A4D A4L A6J A7J A8J Z71V M9V S5A M5A z33A W1Jc W2V G1 */ |
diff --git a/drivers/platform/x86/asus_acpi.c b/drivers/platform/x86/asus_acpi.c index ee520357abaa..92fd30c9379c 100644 --- a/drivers/platform/x86/asus_acpi.c +++ b/drivers/platform/x86/asus_acpi.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/init.h> | 36 | #include <linux/init.h> |
36 | #include <linux/types.h> | 37 | #include <linux/types.h> |
37 | #include <linux/proc_fs.h> | 38 | #include <linux/proc_fs.h> |
diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c index c696cf1c2616..7f9e5ddc9498 100644 --- a/drivers/platform/x86/classmate-laptop.c +++ b/drivers/platform/x86/classmate-laptop.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/workqueue.h> | 23 | #include <linux/workqueue.h> |
23 | #include <acpi/acpi_drivers.h> | 24 | #include <acpi/acpi_drivers.h> |
24 | #include <linux/backlight.h> | 25 | #include <linux/backlight.h> |
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index 46435ac4684f..661e3ac4d5b1 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/acpi.h> | 24 | #include <linux/acpi.h> |
25 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
26 | #include <linux/i8042.h> | 26 | #include <linux/i8042.h> |
27 | #include <linux/slab.h> | ||
27 | #include "../../firmware/dcdbas.h" | 28 | #include "../../firmware/dcdbas.h" |
28 | 29 | ||
29 | #define BRIGHTNESS_TOKEN 0x7d | 30 | #define BRIGHTNESS_TOKEN 0x7d |
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index bed764e3ea2a..6ba6c30e5bb6 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/types.h> | 30 | #include <linux/types.h> |
30 | #include <linux/input.h> | 31 | #include <linux/input.h> |
31 | #include <acpi/acpi_drivers.h> | 32 | #include <acpi/acpi_drivers.h> |
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 3fdf21e0052e..54a015785ca8 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/fb.h> | 27 | #include <linux/fb.h> |
28 | #include <linux/hwmon.h> | 28 | #include <linux/hwmon.h> |
29 | #include <linux/hwmon-sysfs.h> | 29 | #include <linux/hwmon-sysfs.h> |
30 | #include <linux/slab.h> | ||
30 | #include <acpi/acpi_drivers.h> | 31 | #include <acpi/acpi_drivers.h> |
31 | #include <acpi/acpi_bus.h> | 32 | #include <acpi/acpi_bus.h> |
32 | #include <linux/uaccess.h> | 33 | #include <linux/uaccess.h> |
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c new file mode 100644 index 000000000000..9f8822658fd7 --- /dev/null +++ b/drivers/platform/x86/eeepc-wmi.c | |||
@@ -0,0 +1,158 @@ | |||
1 | /* | ||
2 | * Eee PC WMI hotkey driver | ||
3 | * | ||
4 | * Copyright(C) 2010 Intel Corporation. | ||
5 | * | ||
6 | * Portions based on wistron_btns.c: | ||
7 | * Copyright (C) 2005 Miloslav Trmac <mitr@volny.cz> | ||
8 | * Copyright (C) 2005 Bernhard Rosenkraenzer <bero@arklinux.org> | ||
9 | * Copyright (C) 2005 Dmitry Torokhov <dtor@mail.ru> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | * This program is distributed in the hope that it will be useful, | ||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | * GNU General Public License for more details. | ||
20 | * | ||
21 | * You should have received a copy of the GNU General Public License | ||
22 | * along with this program; if not, write to the Free Software | ||
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
24 | */ | ||
25 | |||
26 | #include <linux/kernel.h> | ||
27 | #include <linux/module.h> | ||
28 | #include <linux/init.h> | ||
29 | #include <linux/types.h> | ||
30 | #include <linux/slab.h> | ||
31 | #include <linux/input.h> | ||
32 | #include <linux/input/sparse-keymap.h> | ||
33 | #include <acpi/acpi_bus.h> | ||
34 | #include <acpi/acpi_drivers.h> | ||
35 | |||
36 | MODULE_AUTHOR("Yong Wang <yong.y.wang@intel.com>"); | ||
37 | MODULE_DESCRIPTION("Eee PC WMI Hotkey Driver"); | ||
38 | MODULE_LICENSE("GPL"); | ||
39 | |||
40 | #define EEEPC_WMI_EVENT_GUID "ABBC0F72-8EA1-11D1-00A0-C90629100000" | ||
41 | |||
42 | MODULE_ALIAS("wmi:"EEEPC_WMI_EVENT_GUID); | ||
43 | |||
44 | #define NOTIFY_BRNUP_MIN 0x11 | ||
45 | #define NOTIFY_BRNUP_MAX 0x1f | ||
46 | #define NOTIFY_BRNDOWN_MIN 0x20 | ||
47 | #define NOTIFY_BRNDOWN_MAX 0x2e | ||
48 | |||
49 | static const struct key_entry eeepc_wmi_keymap[] = { | ||
50 | /* Sleep already handled via generic ACPI code */ | ||
51 | { KE_KEY, 0x5d, { KEY_WLAN } }, | ||
52 | { KE_KEY, 0x32, { KEY_MUTE } }, | ||
53 | { KE_KEY, 0x31, { KEY_VOLUMEDOWN } }, | ||
54 | { KE_KEY, 0x30, { KEY_VOLUMEUP } }, | ||
55 | { KE_IGNORE, NOTIFY_BRNDOWN_MIN, { KEY_BRIGHTNESSDOWN } }, | ||
56 | { KE_IGNORE, NOTIFY_BRNUP_MIN, { KEY_BRIGHTNESSUP } }, | ||
57 | { KE_KEY, 0xcc, { KEY_SWITCHVIDEOMODE } }, | ||
58 | { KE_END, 0}, | ||
59 | }; | ||
60 | |||
61 | static struct input_dev *eeepc_wmi_input_dev; | ||
62 | |||
63 | static void eeepc_wmi_notify(u32 value, void *context) | ||
64 | { | ||
65 | struct acpi_buffer response = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
66 | union acpi_object *obj; | ||
67 | acpi_status status; | ||
68 | int code; | ||
69 | |||
70 | status = wmi_get_event_data(value, &response); | ||
71 | if (status != AE_OK) { | ||
72 | pr_err("EEEPC WMI: bad event status 0x%x\n", status); | ||
73 | return; | ||
74 | } | ||
75 | |||
76 | obj = (union acpi_object *)response.pointer; | ||
77 | |||
78 | if (obj && obj->type == ACPI_TYPE_INTEGER) { | ||
79 | code = obj->integer.value; | ||
80 | |||
81 | if (code >= NOTIFY_BRNUP_MIN && code <= NOTIFY_BRNUP_MAX) | ||
82 | code = NOTIFY_BRNUP_MIN; | ||
83 | else if (code >= NOTIFY_BRNDOWN_MIN && code <= NOTIFY_BRNDOWN_MAX) | ||
84 | code = NOTIFY_BRNDOWN_MIN; | ||
85 | |||
86 | if (!sparse_keymap_report_event(eeepc_wmi_input_dev, | ||
87 | code, 1, true)) | ||
88 | pr_info("EEEPC WMI: Unknown key %x pressed\n", code); | ||
89 | } | ||
90 | |||
91 | kfree(obj); | ||
92 | } | ||
93 | |||
94 | static int eeepc_wmi_input_setup(void) | ||
95 | { | ||
96 | int err; | ||
97 | |||
98 | eeepc_wmi_input_dev = input_allocate_device(); | ||
99 | if (!eeepc_wmi_input_dev) | ||
100 | return -ENOMEM; | ||
101 | |||
102 | eeepc_wmi_input_dev->name = "Eee PC WMI hotkeys"; | ||
103 | eeepc_wmi_input_dev->phys = "wmi/input0"; | ||
104 | eeepc_wmi_input_dev->id.bustype = BUS_HOST; | ||
105 | |||
106 | err = sparse_keymap_setup(eeepc_wmi_input_dev, eeepc_wmi_keymap, NULL); | ||
107 | if (err) | ||
108 | goto err_free_dev; | ||
109 | |||
110 | err = input_register_device(eeepc_wmi_input_dev); | ||
111 | if (err) | ||
112 | goto err_free_keymap; | ||
113 | |||
114 | return 0; | ||
115 | |||
116 | err_free_keymap: | ||
117 | sparse_keymap_free(eeepc_wmi_input_dev); | ||
118 | err_free_dev: | ||
119 | input_free_device(eeepc_wmi_input_dev); | ||
120 | return err; | ||
121 | } | ||
122 | |||
123 | static int __init eeepc_wmi_init(void) | ||
124 | { | ||
125 | int err; | ||
126 | acpi_status status; | ||
127 | |||
128 | if (!wmi_has_guid(EEEPC_WMI_EVENT_GUID)) { | ||
129 | pr_warning("EEEPC WMI: No known WMI GUID found\n"); | ||
130 | return -ENODEV; | ||
131 | } | ||
132 | |||
133 | err = eeepc_wmi_input_setup(); | ||
134 | if (err) | ||
135 | return err; | ||
136 | |||
137 | status = wmi_install_notify_handler(EEEPC_WMI_EVENT_GUID, | ||
138 | eeepc_wmi_notify, NULL); | ||
139 | if (ACPI_FAILURE(status)) { | ||
140 | sparse_keymap_free(eeepc_wmi_input_dev); | ||
141 | input_unregister_device(eeepc_wmi_input_dev); | ||
142 | pr_err("EEEPC WMI: Unable to register notify handler - %d\n", | ||
143 | status); | ||
144 | return -ENODEV; | ||
145 | } | ||
146 | |||
147 | return 0; | ||
148 | } | ||
149 | |||
150 | static void __exit eeepc_wmi_exit(void) | ||
151 | { | ||
152 | wmi_remove_notify_handler(EEEPC_WMI_EVENT_GUID); | ||
153 | sparse_keymap_free(eeepc_wmi_input_dev); | ||
154 | input_unregister_device(eeepc_wmi_input_dev); | ||
155 | } | ||
156 | |||
157 | module_init(eeepc_wmi_init); | ||
158 | module_exit(eeepc_wmi_exit); | ||
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index c1074b32490e..47b4fd75aa34 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c | |||
@@ -66,6 +66,7 @@ | |||
66 | #include <linux/kfifo.h> | 66 | #include <linux/kfifo.h> |
67 | #include <linux/video_output.h> | 67 | #include <linux/video_output.h> |
68 | #include <linux/platform_device.h> | 68 | #include <linux/platform_device.h> |
69 | #include <linux/slab.h> | ||
69 | #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) | 70 | #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) |
70 | #include <linux/leds.h> | 71 | #include <linux/leds.h> |
71 | #endif | 72 | #endif |
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 56086363becc..51c07a05a7bc 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/types.h> | 30 | #include <linux/types.h> |
30 | #include <linux/input.h> | 31 | #include <linux/input.h> |
31 | #include <acpi/acpi_drivers.h> | 32 | #include <acpi/acpi_drivers.h> |
diff --git a/drivers/platform/x86/intel_menlow.c b/drivers/platform/x86/intel_menlow.c index f0a90a6bf396..2f795ce2b939 100644 --- a/drivers/platform/x86/intel_menlow.c +++ b/drivers/platform/x86/intel_menlow.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/types.h> | 34 | #include <linux/types.h> |
34 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
35 | #include <linux/pm.h> | 36 | #include <linux/pm.h> |
@@ -396,6 +397,7 @@ static int intel_menlow_add_one_attribute(char *name, int mode, void *show, | |||
396 | if (!attr) | 397 | if (!attr) |
397 | return -ENOMEM; | 398 | return -ENOMEM; |
398 | 399 | ||
400 | sysfs_attr_init(&attr->attr.attr); /* That is consistent naming :D */ | ||
399 | attr->attr.attr.name = name; | 401 | attr->attr.attr.name = name; |
400 | attr->attr.attr.mode = mode; | 402 | attr->attr.attr.mode = mode; |
401 | attr->attr.show = show; | 403 | attr->attr.show = show; |
diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c index 367caaae2f3c..d1736009636f 100644 --- a/drivers/platform/x86/msi-wmi.c +++ b/drivers/platform/x86/msi-wmi.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/input/sparse-keymap.h> | 26 | #include <linux/input/sparse-keymap.h> |
27 | #include <linux/acpi.h> | 27 | #include <linux/acpi.h> |
28 | #include <linux/backlight.h> | 28 | #include <linux/backlight.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | MODULE_AUTHOR("Thomas Renninger <trenn@suse.de>"); | 31 | MODULE_AUTHOR("Thomas Renninger <trenn@suse.de>"); |
31 | MODULE_DESCRIPTION("MSI laptop WMI hotkeys driver"); | 32 | MODULE_DESCRIPTION("MSI laptop WMI hotkeys driver"); |
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index 726f02affcb6..2fb9a32926f8 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c | |||
@@ -124,6 +124,7 @@ | |||
124 | #include <linux/ctype.h> | 124 | #include <linux/ctype.h> |
125 | #include <linux/seq_file.h> | 125 | #include <linux/seq_file.h> |
126 | #include <linux/uaccess.h> | 126 | #include <linux/uaccess.h> |
127 | #include <linux/slab.h> | ||
127 | #include <acpi/acpi_bus.h> | 128 | #include <acpi/acpi_bus.h> |
128 | #include <acpi/acpi_drivers.h> | 129 | #include <acpi/acpi_drivers.h> |
129 | #include <linux/input.h> | 130 | #include <linux/input.h> |
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 6553b91caaa4..1387c5f9c24d 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/kfifo.h> | 58 | #include <linux/kfifo.h> |
59 | #include <linux/workqueue.h> | 59 | #include <linux/workqueue.h> |
60 | #include <linux/acpi.h> | 60 | #include <linux/acpi.h> |
61 | #include <linux/slab.h> | ||
61 | #include <acpi/acpi_drivers.h> | 62 | #include <acpi/acpi_drivers.h> |
62 | #include <acpi/acpi_bus.h> | 63 | #include <acpi/acpi_bus.h> |
63 | #include <asm/uaccess.h> | 64 | #include <asm/uaccess.h> |
diff --git a/drivers/platform/x86/tc1100-wmi.c b/drivers/platform/x86/tc1100-wmi.c index dd33b51c3486..1fe0f1feff71 100644 --- a/drivers/platform/x86/tc1100-wmi.c +++ b/drivers/platform/x86/tc1100-wmi.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/init.h> | 31 | #include <linux/init.h> |
31 | #include <linux/types.h> | 32 | #include <linux/types.h> |
32 | #include <acpi/acpi.h> | 33 | #include <acpi/acpi.h> |
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 770b85327f84..63290b33c879 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/kthread.h> | 58 | #include <linux/kthread.h> |
59 | #include <linux/freezer.h> | 59 | #include <linux/freezer.h> |
60 | #include <linux/delay.h> | 60 | #include <linux/delay.h> |
61 | #include <linux/slab.h> | ||
61 | 62 | ||
62 | #include <linux/nvram.h> | 63 | #include <linux/nvram.h> |
63 | #include <linux/proc_fs.h> | 64 | #include <linux/proc_fs.h> |
diff --git a/drivers/platform/x86/topstar-laptop.c b/drivers/platform/x86/topstar-laptop.c index 4d6516fded7e..ff4b476f1950 100644 --- a/drivers/platform/x86/topstar-laptop.c +++ b/drivers/platform/x86/topstar-laptop.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/acpi.h> | 20 | #include <linux/acpi.h> |
20 | #include <linux/input.h> | 21 | #include <linux/input.h> |
21 | 22 | ||
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index def4841183be..37aa14798551 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/platform_device.h> | 47 | #include <linux/platform_device.h> |
48 | #include <linux/rfkill.h> | 48 | #include <linux/rfkill.h> |
49 | #include <linux/input.h> | 49 | #include <linux/input.h> |
50 | #include <linux/slab.h> | ||
50 | 51 | ||
51 | #include <asm/uaccess.h> | 52 | #include <asm/uaccess.h> |
52 | 53 | ||
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 09e9918c69c1..39ec5b6c2e3a 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/device.h> | 33 | #include <linux/device.h> |
34 | #include <linux/list.h> | 34 | #include <linux/list.h> |
35 | #include <linux/acpi.h> | 35 | #include <linux/acpi.h> |
36 | #include <linux/slab.h> | ||
36 | #include <acpi/acpi_bus.h> | 37 | #include <acpi/acpi_bus.h> |
37 | #include <acpi/acpi_drivers.h> | 38 | #include <acpi/acpi_drivers.h> |
38 | 39 | ||
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index e851160e14f0..918d5f044865 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <linux/module.h> | 37 | #include <linux/module.h> |
38 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
39 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
40 | #include <linux/slab.h> | ||
41 | #include <linux/delay.h> | 40 | #include <linux/delay.h> |
42 | #include <linux/init.h> | 41 | #include <linux/init.h> |
43 | #include <linux/isapnp.h> | 42 | #include <linux/isapnp.h> |
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c index 00fd3577b985..0a15664eef1c 100644 --- a/drivers/pnp/manager.c +++ b/drivers/pnp/manager.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/pnp.h> | 14 | #include <linux/pnp.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/bitmap.h> | 15 | #include <linux/bitmap.h> |
17 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
18 | #include "base.h" | 17 | #include "base.h" |
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 5314bf630bc4..f7ff628b7d94 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/acpi.h> | 22 | #include <linux/acpi.h> |
23 | #include <linux/pnp.h> | 23 | #include <linux/pnp.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/mod_devicetable.h> | 25 | #include <linux/mod_devicetable.h> |
25 | #include <acpi/acpi_bus.h> | 26 | #include <acpi/acpi_bus.h> |
26 | 27 | ||
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 54514aa35b09..35bb44af49b3 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/acpi.h> | 24 | #include <linux/acpi.h> |
25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
26 | #include <linux/pnp.h> | 26 | #include <linux/pnp.h> |
27 | #include <linux/slab.h> | ||
27 | #include "../base.h" | 28 | #include "../base.h" |
28 | #include "pnpacpi.h" | 29 | #include "pnpacpi.h" |
29 | 30 | ||
@@ -273,12 +274,33 @@ static void pnpacpi_parse_allocated_busresource(struct pnp_dev *dev, | |||
273 | pnp_add_bus_resource(dev, start, end); | 274 | pnp_add_bus_resource(dev, start, end); |
274 | } | 275 | } |
275 | 276 | ||
277 | static u64 addr_space_length(struct pnp_dev *dev, u64 min, u64 max, u64 len) | ||
278 | { | ||
279 | u64 max_len; | ||
280 | |||
281 | max_len = max - min + 1; | ||
282 | if (len <= max_len) | ||
283 | return len; | ||
284 | |||
285 | /* | ||
286 | * Per 6.4.3.5, _LEN cannot exceed _MAX - _MIN + 1, but some BIOSes | ||
287 | * don't do this correctly, e.g., | ||
288 | * https://bugzilla.kernel.org/show_bug.cgi?id=15480 | ||
289 | */ | ||
290 | dev_info(&dev->dev, | ||
291 | "resource length %#llx doesn't fit in %#llx-%#llx, trimming\n", | ||
292 | (unsigned long long) len, (unsigned long long) min, | ||
293 | (unsigned long long) max); | ||
294 | return max_len; | ||
295 | } | ||
296 | |||
276 | static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev, | 297 | static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev, |
277 | struct acpi_resource *res) | 298 | struct acpi_resource *res) |
278 | { | 299 | { |
279 | struct acpi_resource_address64 addr, *p = &addr; | 300 | struct acpi_resource_address64 addr, *p = &addr; |
280 | acpi_status status; | 301 | acpi_status status; |
281 | int window; | 302 | int window; |
303 | u64 len; | ||
282 | 304 | ||
283 | status = acpi_resource_to_address64(res, p); | 305 | status = acpi_resource_to_address64(res, p); |
284 | if (!ACPI_SUCCESS(status)) { | 306 | if (!ACPI_SUCCESS(status)) { |
@@ -287,20 +309,18 @@ static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev, | |||
287 | return; | 309 | return; |
288 | } | 310 | } |
289 | 311 | ||
312 | len = addr_space_length(dev, p->minimum, p->maximum, p->address_length); | ||
290 | window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0; | 313 | window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0; |
291 | 314 | ||
292 | if (p->resource_type == ACPI_MEMORY_RANGE) | 315 | if (p->resource_type == ACPI_MEMORY_RANGE) |
293 | pnpacpi_parse_allocated_memresource(dev, | 316 | pnpacpi_parse_allocated_memresource(dev, p->minimum, len, |
294 | p->minimum, p->address_length, | ||
295 | p->info.mem.write_protect, window); | 317 | p->info.mem.write_protect, window); |
296 | else if (p->resource_type == ACPI_IO_RANGE) | 318 | else if (p->resource_type == ACPI_IO_RANGE) |
297 | pnpacpi_parse_allocated_ioresource(dev, | 319 | pnpacpi_parse_allocated_ioresource(dev, p->minimum, len, |
298 | p->minimum, p->address_length, | ||
299 | p->granularity == 0xfff ? ACPI_DECODE_10 : | 320 | p->granularity == 0xfff ? ACPI_DECODE_10 : |
300 | ACPI_DECODE_16, window); | 321 | ACPI_DECODE_16, window); |
301 | else if (p->resource_type == ACPI_BUS_NUMBER_RANGE) | 322 | else if (p->resource_type == ACPI_BUS_NUMBER_RANGE) |
302 | pnpacpi_parse_allocated_busresource(dev, p->minimum, | 323 | pnpacpi_parse_allocated_busresource(dev, p->minimum, len); |
303 | p->address_length); | ||
304 | } | 324 | } |
305 | 325 | ||
306 | static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev, | 326 | static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev, |
@@ -308,21 +328,20 @@ static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev, | |||
308 | { | 328 | { |
309 | struct acpi_resource_extended_address64 *p = &res->data.ext_address64; | 329 | struct acpi_resource_extended_address64 *p = &res->data.ext_address64; |
310 | int window; | 330 | int window; |
331 | u64 len; | ||
311 | 332 | ||
333 | len = addr_space_length(dev, p->minimum, p->maximum, p->address_length); | ||
312 | window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0; | 334 | window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0; |
313 | 335 | ||
314 | if (p->resource_type == ACPI_MEMORY_RANGE) | 336 | if (p->resource_type == ACPI_MEMORY_RANGE) |
315 | pnpacpi_parse_allocated_memresource(dev, | 337 | pnpacpi_parse_allocated_memresource(dev, p->minimum, len, |
316 | p->minimum, p->address_length, | ||
317 | p->info.mem.write_protect, window); | 338 | p->info.mem.write_protect, window); |
318 | else if (p->resource_type == ACPI_IO_RANGE) | 339 | else if (p->resource_type == ACPI_IO_RANGE) |
319 | pnpacpi_parse_allocated_ioresource(dev, | 340 | pnpacpi_parse_allocated_ioresource(dev, p->minimum, len, |
320 | p->minimum, p->address_length, | ||
321 | p->granularity == 0xfff ? ACPI_DECODE_10 : | 341 | p->granularity == 0xfff ? ACPI_DECODE_10 : |
322 | ACPI_DECODE_16, window); | 342 | ACPI_DECODE_16, window); |
323 | else if (p->resource_type == ACPI_BUS_NUMBER_RANGE) | 343 | else if (p->resource_type == ACPI_BUS_NUMBER_RANGE) |
324 | pnpacpi_parse_allocated_busresource(dev, p->minimum, | 344 | pnpacpi_parse_allocated_busresource(dev, p->minimum, len); |
325 | p->address_length); | ||
326 | } | 345 | } |
327 | 346 | ||
328 | static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, | 347 | static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, |
diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c index fc83783c3a96..8591f6ab1b35 100644 --- a/drivers/pnp/pnpbios/bioscalls.c +++ b/drivers/pnp/pnpbios/bioscalls.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/pnp.h> | 11 | #include <linux/pnp.h> |
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/kmod.h> | 14 | #include <linux/kmod.h> |
16 | #include <linux/completion.h> | 15 | #include <linux/completion.h> |
17 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c index a5135ebe5f07..cb1f47bfee96 100644 --- a/drivers/pnp/pnpbios/rsparser.c +++ b/drivers/pnp/pnpbios/rsparser.c | |||
@@ -5,7 +5,6 @@ | |||
5 | #include <linux/ctype.h> | 5 | #include <linux/ctype.h> |
6 | #include <linux/pnp.h> | 6 | #include <linux/pnp.h> |
7 | #include <linux/string.h> | 7 | #include <linux/string.h> |
8 | #include <linux/slab.h> | ||
9 | 8 | ||
10 | #ifdef CONFIG_PCI | 9 | #ifdef CONFIG_PCI |
11 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c index 5b277dbaacde..2e54e6a23c72 100644 --- a/drivers/pnp/resource.c +++ b/drivers/pnp/resource.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
12 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c index bece33ed873c..3ec9c6a8896b 100644 --- a/drivers/power/bq27x00_battery.c +++ b/drivers/power/bq27x00_battery.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/power_supply.h> | 24 | #include <linux/power_supply.h> |
25 | #include <linux/idr.h> | 25 | #include <linux/idr.h> |
26 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
27 | #include <linux/slab.h> | ||
27 | #include <asm/unaligned.h> | 28 | #include <asm/unaligned.h> |
28 | 29 | ||
29 | #define DRIVER_VERSION "1.1.0" | 30 | #define DRIVER_VERSION "1.1.0" |
diff --git a/drivers/power/da9030_battery.c b/drivers/power/da9030_battery.c index a2e71f7b27fb..d2c793cf6765 100644 --- a/drivers/power/da9030_battery.c +++ b/drivers/power/da9030_battery.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/init.h> | 14 | #include <linux/init.h> |
14 | #include <linux/types.h> | 15 | #include <linux/types.h> |
15 | #include <linux/device.h> | 16 | #include <linux/device.h> |
diff --git a/drivers/power/ds2760_battery.c b/drivers/power/ds2760_battery.c index 6f1dba5a519d..3bf8d1f622e3 100644 --- a/drivers/power/ds2760_battery.c +++ b/drivers/power/ds2760_battery.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/jiffies.h> | 24 | #include <linux/jiffies.h> |
25 | #include <linux/workqueue.h> | 25 | #include <linux/workqueue.h> |
26 | #include <linux/pm.h> | 26 | #include <linux/pm.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
28 | #include <linux/power_supply.h> | 29 | #include <linux/power_supply.h> |
29 | 30 | ||
diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c index da14f374cb60..99c89976a902 100644 --- a/drivers/power/ds2782_battery.c +++ b/drivers/power/ds2782_battery.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/idr.h> | 20 | #include <linux/idr.h> |
21 | #include <linux/power_supply.h> | 21 | #include <linux/power_supply.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #define DS2782_REG_RARC 0x06 /* Remaining active relative capacity */ | 24 | #define DS2782_REG_RARC 0x06 /* Remaining active relative capacity */ |
24 | 25 | ||
diff --git a/drivers/power/max17040_battery.c b/drivers/power/max17040_battery.c index 87b98bf27ae1..f3e22c9fe20a 100644 --- a/drivers/power/max17040_battery.c +++ b/drivers/power/max17040_battery.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/power_supply.h> | 20 | #include <linux/power_supply.h> |
21 | #include <linux/max17040_battery.h> | 21 | #include <linux/max17040_battery.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #define MAX17040_VCELL_MSB 0x02 | 24 | #define MAX17040_VCELL_MSB 0x02 |
24 | #define MAX17040_VCELL_LSB 0x03 | 25 | #define MAX17040_VCELL_LSB 0x03 |
diff --git a/drivers/power/max8925_power.c b/drivers/power/max8925_power.c index a1b4410544d7..8e5aec260866 100644 --- a/drivers/power/max8925_power.c +++ b/drivers/power/max8925_power.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/err.h> | 13 | #include <linux/err.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/i2c.h> | 15 | #include <linux/i2c.h> |
15 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
diff --git a/drivers/power/pcf50633-charger.c b/drivers/power/pcf50633-charger.c index ea3fdfaca90d..066f994e6fe5 100644 --- a/drivers/power/pcf50633-charger.c +++ b/drivers/power/pcf50633-charger.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/init.h> | 20 | #include <linux/init.h> |
20 | #include <linux/types.h> | 21 | #include <linux/types.h> |
21 | #include <linux/device.h> | 22 | #include <linux/device.h> |
diff --git a/drivers/power/pmu_battery.c b/drivers/power/pmu_battery.c index 9c87ad564803..023d24993b87 100644 --- a/drivers/power/pmu_battery.c +++ b/drivers/power/pmu_battery.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/power_supply.h> | 14 | #include <linux/power_supply.h> |
15 | #include <linux/adb.h> | 15 | #include <linux/adb.h> |
16 | #include <linux/pmu.h> | 16 | #include <linux/pmu.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | static struct pmu_battery_dev { | 19 | static struct pmu_battery_dev { |
19 | struct power_supply bat; | 20 | struct power_supply bat; |
diff --git a/drivers/power/power_supply_leds.c b/drivers/power/power_supply_leds.c index 2dece40c544f..031a554837f7 100644 --- a/drivers/power/power_supply_leds.c +++ b/drivers/power/power_supply_leds.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/power_supply.h> | 14 | #include <linux/power_supply.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include "power_supply.h" | 17 | #include "power_supply.h" |
17 | 18 | ||
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index ff05e6189768..5b6e352ac7c1 100644 --- a/drivers/power/power_supply_sysfs.c +++ b/drivers/power/power_supply_sysfs.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/ctype.h> | 14 | #include <linux/ctype.h> |
15 | #include <linux/power_supply.h> | 15 | #include <linux/power_supply.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #include "power_supply.h" | 18 | #include "power_supply.h" |
18 | 19 | ||
diff --git a/drivers/power/wm831x_backup.c b/drivers/power/wm831x_backup.c index bf4f387a8009..0fd130d80f5d 100644 --- a/drivers/power/wm831x_backup.c +++ b/drivers/power/wm831x_backup.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/err.h> | 12 | #include <linux/err.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/power_supply.h> | 14 | #include <linux/power_supply.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include <linux/mfd/wm831x/core.h> | 17 | #include <linux/mfd/wm831x/core.h> |
17 | #include <linux/mfd/wm831x/auxadc.h> | 18 | #include <linux/mfd/wm831x/auxadc.h> |
diff --git a/drivers/power/wm831x_power.c b/drivers/power/wm831x_power.c index f85e80b1b400..875c4d0f776b 100644 --- a/drivers/power/wm831x_power.c +++ b/drivers/power/wm831x_power.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/err.h> | 12 | #include <linux/err.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/power_supply.h> | 14 | #include <linux/power_supply.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include <linux/mfd/wm831x/core.h> | 17 | #include <linux/mfd/wm831x/core.h> |
17 | #include <linux/mfd/wm831x/auxadc.h> | 18 | #include <linux/mfd/wm831x/auxadc.h> |
diff --git a/drivers/power/wm97xx_battery.c b/drivers/power/wm97xx_battery.c index 23eed356a854..94c70650aafc 100644 --- a/drivers/power/wm97xx_battery.c +++ b/drivers/power/wm97xx_battery.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/irq.h> | 25 | #include <linux/irq.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | static DEFINE_MUTEX(bat_lock); | 28 | static DEFINE_MUTEX(bat_lock); |
28 | static struct work_struct bat_work; | 29 | static struct work_struct bat_work; |
diff --git a/drivers/pps/kapi.c b/drivers/pps/kapi.c index 2d414e23d390..1aa02db3ff4e 100644 --- a/drivers/pps/kapi.c +++ b/drivers/pps/kapi.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/idr.h> | 29 | #include <linux/idr.h> |
30 | #include <linux/fs.h> | 30 | #include <linux/fs.h> |
31 | #include <linux/pps_kernel.h> | 31 | #include <linux/pps_kernel.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | /* | 34 | /* |
34 | * Global variables | 35 | * Global variables |
diff --git a/drivers/ps3/ps3-lpm.c b/drivers/ps3/ps3-lpm.c index fe96793e3f08..8000985d0e8c 100644 --- a/drivers/ps3/ps3-lpm.c +++ b/drivers/ps3/ps3-lpm.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/slab.h> | ||
21 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 23 | #include <linux/module.h> |
23 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
diff --git a/drivers/ps3/ps3-vuart.c b/drivers/ps3/ps3-vuart.c index e4ad5ba5d0a3..d9fb729535a1 100644 --- a/drivers/ps3/ps3-vuart.c +++ b/drivers/ps3/ps3-vuart.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/module.h> | 23 | #include <linux/module.h> |
23 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
24 | #include <linux/workqueue.h> | 25 | #include <linux/workqueue.h> |
diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c index 95a689befc84..a409fa050a1a 100644 --- a/drivers/ps3/ps3av.c +++ b/drivers/ps3/ps3av.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/notifier.h> | 24 | #include <linux/notifier.h> |
25 | #include <linux/ioctl.h> | 25 | #include <linux/ioctl.h> |
26 | #include <linux/fb.h> | 26 | #include <linux/fb.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include <asm/firmware.h> | 29 | #include <asm/firmware.h> |
29 | #include <asm/ps3av.h> | 30 | #include <asm/ps3av.h> |
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index c7bbe30010f7..2b4e40d31190 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/device.h> | 18 | #include <linux/device.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/err.h> | 20 | #include <linux/err.h> |
20 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
21 | #include <linux/suspend.h> | 22 | #include <linux/suspend.h> |
@@ -1038,6 +1039,7 @@ static struct regulator *create_regulator(struct regulator_dev *rdev, | |||
1038 | goto overflow_err; | 1039 | goto overflow_err; |
1039 | 1040 | ||
1040 | regulator->dev = dev; | 1041 | regulator->dev = dev; |
1042 | sysfs_attr_init(®ulator->dev_attr.attr); | ||
1041 | regulator->dev_attr.attr.name = kstrdup(buf, GFP_KERNEL); | 1043 | regulator->dev_attr.attr.name = kstrdup(buf, GFP_KERNEL); |
1042 | if (regulator->dev_attr.attr.name == NULL) | 1044 | if (regulator->dev_attr.attr.name == NULL) |
1043 | goto attr_name_err; | 1045 | goto attr_name_err; |
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index d11f7622430b..2fe9d99c9f23 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/regulator/fixed.h> | 25 | #include <linux/regulator/fixed.h> |
26 | #include <linux/gpio.h> | 26 | #include <linux/gpio.h> |
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | struct fixed_voltage_data { | 30 | struct fixed_voltage_data { |
30 | struct regulator_desc desc; | 31 | struct regulator_desc desc; |
diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c index f5532ed79272..671a7d1f1f0e 100644 --- a/drivers/regulator/lp3971.c +++ b/drivers/regulator/lp3971.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/regulator/driver.h> | 19 | #include <linux/regulator/driver.h> |
20 | #include <linux/regulator/lp3971.h> | 20 | #include <linux/regulator/lp3971.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | struct lp3971 { | 23 | struct lp3971 { |
23 | struct device *dev; | 24 | struct device *dev; |
@@ -45,7 +46,7 @@ static int lp3971_set_bits(struct lp3971 *lp3971, u8 reg, u16 mask, u16 val); | |||
45 | LP3971_BUCK2 -> 4 | 46 | LP3971_BUCK2 -> 4 |
46 | LP3971_BUCK3 -> 6 | 47 | LP3971_BUCK3 -> 6 |
47 | */ | 48 | */ |
48 | #define BUCK_VOL_CHANGE_SHIFT(x) (((1 << x) & ~0x01) << 1) | 49 | #define BUCK_VOL_CHANGE_SHIFT(x) (((!!x) << 2) | (x & ~0x01)) |
49 | #define BUCK_VOL_CHANGE_FLAG_GO 0x01 | 50 | #define BUCK_VOL_CHANGE_FLAG_GO 0x01 |
50 | #define BUCK_VOL_CHANGE_FLAG_TARGET 0x02 | 51 | #define BUCK_VOL_CHANGE_FLAG_TARGET 0x02 |
51 | #define BUCK_VOL_CHANGE_FLAG_MASK 0x03 | 52 | #define BUCK_VOL_CHANGE_FLAG_MASK 0x03 |
@@ -187,7 +188,8 @@ static int lp3971_ldo_set_voltage(struct regulator_dev *dev, | |||
187 | return -EINVAL; | 188 | return -EINVAL; |
188 | 189 | ||
189 | return lp3971_set_bits(lp3971, LP3971_LDO_VOL_CONTR_REG(ldo), | 190 | return lp3971_set_bits(lp3971, LP3971_LDO_VOL_CONTR_REG(ldo), |
190 | LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo), val); | 191 | LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo), |
192 | val << LDO_VOL_CONTR_SHIFT(ldo)); | ||
191 | } | 193 | } |
192 | 194 | ||
193 | static struct regulator_ops lp3971_ldo_ops = { | 195 | static struct regulator_ops lp3971_ldo_ops = { |
@@ -439,6 +441,10 @@ static int __devinit setup_regulators(struct lp3971 *lp3971, | |||
439 | lp3971->num_regulators = pdata->num_regulators; | 441 | lp3971->num_regulators = pdata->num_regulators; |
440 | lp3971->rdev = kcalloc(pdata->num_regulators, | 442 | lp3971->rdev = kcalloc(pdata->num_regulators, |
441 | sizeof(struct regulator_dev *), GFP_KERNEL); | 443 | sizeof(struct regulator_dev *), GFP_KERNEL); |
444 | if (!lp3971->rdev) { | ||
445 | err = -ENOMEM; | ||
446 | goto err_nomem; | ||
447 | } | ||
442 | 448 | ||
443 | /* Instantiate the regulators */ | 449 | /* Instantiate the regulators */ |
444 | for (i = 0; i < pdata->num_regulators; i++) { | 450 | for (i = 0; i < pdata->num_regulators; i++) { |
@@ -461,6 +467,7 @@ error: | |||
461 | regulator_unregister(lp3971->rdev[i]); | 467 | regulator_unregister(lp3971->rdev[i]); |
462 | kfree(lp3971->rdev); | 468 | kfree(lp3971->rdev); |
463 | lp3971->rdev = NULL; | 469 | lp3971->rdev = NULL; |
470 | err_nomem: | ||
464 | return err; | 471 | return err; |
465 | } | 472 | } |
466 | 473 | ||
diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c index a49fc952c9a9..b3c1afc16889 100644 --- a/drivers/regulator/max1586.c +++ b/drivers/regulator/max1586.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/regulator/driver.h> | 24 | #include <linux/regulator/driver.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/regulator/max1586.h> | 26 | #include <linux/regulator/max1586.h> |
26 | 27 | ||
27 | #define MAX1586_V3_MAX_VSEL 31 | 28 | #define MAX1586_V3_MAX_VSEL 31 |
@@ -243,8 +244,8 @@ static int __devexit max1586_pmic_remove(struct i2c_client *client) | |||
243 | for (i = 0; i <= MAX1586_V6; i++) | 244 | for (i = 0; i <= MAX1586_V6; i++) |
244 | if (rdev[i]) | 245 | if (rdev[i]) |
245 | regulator_unregister(rdev[i]); | 246 | regulator_unregister(rdev[i]); |
246 | kfree(rdev); | ||
247 | i2c_set_clientdata(client, NULL); | 247 | i2c_set_clientdata(client, NULL); |
248 | kfree(rdev); | ||
248 | 249 | ||
249 | return 0; | 250 | return 0; |
250 | } | 251 | } |
diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c index 3ebdf698c648..bfc4c5ffdc96 100644 --- a/drivers/regulator/max8649.c +++ b/drivers/regulator/max8649.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/i2c.h> | 14 | #include <linux/i2c.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/regulator/driver.h> | 16 | #include <linux/regulator/driver.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/regulator/max8649.h> | 18 | #include <linux/regulator/max8649.h> |
18 | 19 | ||
19 | #define MAX8649_DCDC_VMIN 750000 /* uV */ | 20 | #define MAX8649_DCDC_VMIN 750000 /* uV */ |
@@ -356,6 +357,7 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client, | |||
356 | dev_info(info->dev, "Max8649 regulator device is detected.\n"); | 357 | dev_info(info->dev, "Max8649 regulator device is detected.\n"); |
357 | return 0; | 358 | return 0; |
358 | out: | 359 | out: |
360 | i2c_set_clientdata(client, NULL); | ||
359 | kfree(info); | 361 | kfree(info); |
360 | return ret; | 362 | return ret; |
361 | } | 363 | } |
@@ -367,9 +369,9 @@ static int __devexit max8649_regulator_remove(struct i2c_client *client) | |||
367 | if (info) { | 369 | if (info) { |
368 | if (info->regulator) | 370 | if (info->regulator) |
369 | regulator_unregister(info->regulator); | 371 | regulator_unregister(info->regulator); |
372 | i2c_set_clientdata(client, NULL); | ||
370 | kfree(info); | 373 | kfree(info); |
371 | } | 374 | } |
372 | i2c_set_clientdata(client, NULL); | ||
373 | 375 | ||
374 | return 0; | 376 | return 0; |
375 | } | 377 | } |
diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c index f12f1bb62138..3790b21879ff 100644 --- a/drivers/regulator/max8660.c +++ b/drivers/regulator/max8660.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/i2c.h> | 42 | #include <linux/i2c.h> |
43 | #include <linux/platform_device.h> | 43 | #include <linux/platform_device.h> |
44 | #include <linux/regulator/driver.h> | 44 | #include <linux/regulator/driver.h> |
45 | #include <linux/slab.h> | ||
45 | #include <linux/regulator/max8660.h> | 46 | #include <linux/regulator/max8660.h> |
46 | 47 | ||
47 | #define MAX8660_DCDC_MIN_UV 725000 | 48 | #define MAX8660_DCDC_MIN_UV 725000 |
@@ -470,8 +471,8 @@ static int __devexit max8660_remove(struct i2c_client *client) | |||
470 | for (i = 0; i < MAX8660_V_END; i++) | 471 | for (i = 0; i < MAX8660_V_END; i++) |
471 | if (rdev[i]) | 472 | if (rdev[i]) |
472 | regulator_unregister(rdev[i]); | 473 | regulator_unregister(rdev[i]); |
473 | kfree(rdev); | ||
474 | i2c_set_clientdata(client, NULL); | 474 | i2c_set_clientdata(client, NULL); |
475 | kfree(rdev); | ||
475 | 476 | ||
476 | return 0; | 477 | return 0; |
477 | } | 478 | } |
diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c index 67873f08ed40..b6218f11c957 100644 --- a/drivers/regulator/max8925-regulator.c +++ b/drivers/regulator/max8925-regulator.c | |||
@@ -230,7 +230,7 @@ static struct max8925_regulator_info max8925_regulator_info[] = { | |||
230 | MAX8925_LDO(20, 750, 3900, 50), | 230 | MAX8925_LDO(20, 750, 3900, 50), |
231 | }; | 231 | }; |
232 | 232 | ||
233 | static inline struct max8925_regulator_info *find_regulator_info(int id) | 233 | static struct max8925_regulator_info * __devinit find_regulator_info(int id) |
234 | { | 234 | { |
235 | struct max8925_regulator_info *ri; | 235 | struct max8925_regulator_info *ri; |
236 | int i; | 236 | int i; |
@@ -247,7 +247,7 @@ static int __devinit max8925_regulator_probe(struct platform_device *pdev) | |||
247 | { | 247 | { |
248 | struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent); | 248 | struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent); |
249 | struct max8925_platform_data *pdata = chip->dev->platform_data; | 249 | struct max8925_platform_data *pdata = chip->dev->platform_data; |
250 | struct max8925_regulator_info *ri = NULL; | 250 | struct max8925_regulator_info *ri; |
251 | struct regulator_dev *rdev; | 251 | struct regulator_dev *rdev; |
252 | 252 | ||
253 | ri = find_regulator_info(pdev->id); | 253 | ri = find_regulator_info(pdev->id); |
@@ -274,7 +274,9 @@ static int __devexit max8925_regulator_remove(struct platform_device *pdev) | |||
274 | { | 274 | { |
275 | struct regulator_dev *rdev = platform_get_drvdata(pdev); | 275 | struct regulator_dev *rdev = platform_get_drvdata(pdev); |
276 | 276 | ||
277 | platform_set_drvdata(pdev, NULL); | ||
277 | regulator_unregister(rdev); | 278 | regulator_unregister(rdev); |
279 | |||
278 | return 0; | 280 | return 0; |
279 | } | 281 | } |
280 | 282 | ||
diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c index f7b81845a196..a681f5e8f786 100644 --- a/drivers/regulator/mc13783-regulator.c +++ b/drivers/regulator/mc13783-regulator.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/regulator/driver.h> | 14 | #include <linux/regulator/driver.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/err.h> | 19 | #include <linux/err.h> |
19 | 20 | ||
diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c index 1f183543bdbd..8e2f2098b005 100644 --- a/drivers/regulator/tps65023-regulator.c +++ b/drivers/regulator/tps65023-regulator.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/regulator/machine.h> | 24 | #include <linux/regulator/machine.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | /* Register definitions */ | 29 | /* Register definitions */ |
29 | #define TPS65023_REG_VERSION 0 | 30 | #define TPS65023_REG_VERSION 0 |
diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x-regulator.c index c2a9539acd72..74841abcc9cc 100644 --- a/drivers/regulator/tps6507x-regulator.c +++ b/drivers/regulator/tps6507x-regulator.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/regulator/machine.h> | 24 | #include <linux/regulator/machine.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | /* Register definitions */ | 29 | /* Register definitions */ |
29 | #define TPS6507X_REG_PPATH1 0X01 | 30 | #define TPS6507X_REG_PPATH1 0X01 |
diff --git a/drivers/regulator/userspace-consumer.c b/drivers/regulator/userspace-consumer.c index 44917da4ac97..9d5ba9357597 100644 --- a/drivers/regulator/userspace-consumer.c +++ b/drivers/regulator/userspace-consumer.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/regulator/consumer.h> | 22 | #include <linux/regulator/consumer.h> |
23 | #include <linux/regulator/userspace-consumer.h> | 23 | #include <linux/regulator/userspace-consumer.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | struct userspace_consumer_data { | 26 | struct userspace_consumer_data { |
26 | const char *name; | 27 | const char *name; |
diff --git a/drivers/regulator/virtual.c b/drivers/regulator/virtual.c index d96cecaac73d..69e550f57638 100644 --- a/drivers/regulator/virtual.c +++ b/drivers/regulator/virtual.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/regulator/consumer.h> | 17 | #include <linux/regulator/consumer.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | struct virtual_consumer_data { | 20 | struct virtual_consumer_data { |
20 | struct mutex lock; | 21 | struct mutex lock; |
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c index 6e18e56d850b..dbfaf5945e48 100644 --- a/drivers/regulator/wm831x-dcdc.c +++ b/drivers/regulator/wm831x-dcdc.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/regulator/driver.h> | 21 | #include <linux/regulator/driver.h> |
22 | #include <linux/regulator/machine.h> | 22 | #include <linux/regulator/machine.h> |
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <linux/mfd/wm831x/core.h> | 26 | #include <linux/mfd/wm831x/core.h> |
26 | #include <linux/mfd/wm831x/regulator.h> | 27 | #include <linux/mfd/wm831x/regulator.h> |
diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c index ca0f6b6c384b..6c446cd6ad54 100644 --- a/drivers/regulator/wm831x-isink.c +++ b/drivers/regulator/wm831x-isink.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/regulator/driver.h> | 21 | #include <linux/regulator/driver.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <linux/mfd/wm831x/core.h> | 24 | #include <linux/mfd/wm831x/core.h> |
24 | #include <linux/mfd/wm831x/regulator.h> | 25 | #include <linux/mfd/wm831x/regulator.h> |
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c index d2406c1519a1..e686cdb61b97 100644 --- a/drivers/regulator/wm831x-ldo.c +++ b/drivers/regulator/wm831x-ldo.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/regulator/driver.h> | 21 | #include <linux/regulator/driver.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <linux/mfd/wm831x/core.h> | 24 | #include <linux/mfd/wm831x/core.h> |
24 | #include <linux/mfd/wm831x/regulator.h> | 25 | #include <linux/mfd/wm831x/regulator.h> |
diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c index 95454a4637b7..5a1dc8a24d35 100644 --- a/drivers/regulator/wm8994-regulator.c +++ b/drivers/regulator/wm8994-regulator.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/regulator/driver.h> | 20 | #include <linux/regulator/driver.h> |
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <linux/mfd/wm8994/core.h> | 24 | #include <linux/mfd/wm8994/core.h> |
24 | #include <linux/mfd/wm8994/registers.h> | 25 | #include <linux/mfd/wm8994/registers.h> |
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 40845c7e9322..565562ba6ac9 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/rtc.h> | 15 | #include <linux/rtc.h> |
16 | #include <linux/kdev_t.h> | 16 | #include <linux/kdev_t.h> |
17 | #include <linux/idr.h> | 17 | #include <linux/idr.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include "rtc-core.h" | 20 | #include "rtc-core.h" |
20 | 21 | ||
diff --git a/drivers/rtc/rtc-at32ap700x.c b/drivers/rtc/rtc-at32ap700x.c index 8825695777df..b2752b6e7a2f 100644 --- a/drivers/rtc/rtc-at32ap700x.c +++ b/drivers/rtc/rtc-at32ap700x.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/rtc.h> | 15 | #include <linux/rtc.h> |
15 | #include <linux/io.h> | 16 | #include <linux/io.h> |
16 | 17 | ||
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c index 78a018b5c941..f677e0710ca1 100644 --- a/drivers/rtc/rtc-at91sam9.c +++ b/drivers/rtc/rtc-at91sam9.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/rtc.h> | 18 | #include <linux/rtc.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/ioctl.h> | 20 | #include <linux/ioctl.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <mach/board.h> | 23 | #include <mach/board.h> |
23 | #include <mach/at91_rtt.h> | 24 | #include <mach/at91_rtt.h> |
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c index b11485b9f21c..72b2bcc2c224 100644 --- a/drivers/rtc/rtc-bfin.c +++ b/drivers/rtc/rtc-bfin.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/platform_device.h> | 51 | #include <linux/platform_device.h> |
52 | #include <linux/rtc.h> | 52 | #include <linux/rtc.h> |
53 | #include <linux/seq_file.h> | 53 | #include <linux/seq_file.h> |
54 | #include <linux/slab.h> | ||
54 | 55 | ||
55 | #include <asm/blackfin.h> | 56 | #include <asm/blackfin.h> |
56 | 57 | ||
diff --git a/drivers/rtc/rtc-bq4802.c b/drivers/rtc/rtc-bq4802.c index 280fe48ada0b..128270ce355d 100644 --- a/drivers/rtc/rtc-bq4802.c +++ b/drivers/rtc/rtc-bq4802.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/platform_device.h> | 10 | #include <linux/platform_device.h> |
11 | #include <linux/rtc.h> | 11 | #include <linux/rtc.h> |
12 | #include <linux/bcd.h> | 12 | #include <linux/bcd.h> |
13 | #include <linux/slab.h> | ||
13 | 14 | ||
14 | MODULE_AUTHOR("David S. Miller <davem@davemloft.net>"); | 15 | MODULE_AUTHOR("David S. Miller <davem@davemloft.net>"); |
15 | MODULE_DESCRIPTION("TI BQ4802 RTC driver"); | 16 | MODULE_DESCRIPTION("TI BQ4802 RTC driver"); |
diff --git a/drivers/rtc/rtc-coh901331.c b/drivers/rtc/rtc-coh901331.c index 44c4399ee714..316f484999b5 100644 --- a/drivers/rtc/rtc-coh901331.c +++ b/drivers/rtc/rtc-coh901331.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/pm.h> | 14 | #include <linux/pm.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | /* | 19 | /* |
19 | * Registers in the COH 901 331 | 20 | * Registers in the COH 901 331 |
diff --git a/drivers/rtc/rtc-ds1216.c b/drivers/rtc/rtc-ds1216.c index 4aedc705518c..45cd8c9f5a39 100644 --- a/drivers/rtc/rtc-ds1216.c +++ b/drivers/rtc/rtc-ds1216.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/rtc.h> | 9 | #include <linux/rtc.h> |
10 | #include <linux/platform_device.h> | 10 | #include <linux/platform_device.h> |
11 | #include <linux/bcd.h> | 11 | #include <linux/bcd.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | #define DRV_VERSION "0.2" | 14 | #define DRV_VERSION "0.2" |
14 | 15 | ||
diff --git a/drivers/rtc/rtc-ds1286.c b/drivers/rtc/rtc-ds1286.c index 4fcb16bbff4a..bf430f9091ed 100644 --- a/drivers/rtc/rtc-ds1286.c +++ b/drivers/rtc/rtc-ds1286.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/bcd.h> | 18 | #include <linux/bcd.h> |
19 | #include <linux/ds1286.h> | 19 | #include <linux/ds1286.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #define DRV_VERSION "1.0" | 23 | #define DRV_VERSION "1.0" |
23 | 24 | ||
diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c index 9630e7d3314e..7836c9cec557 100644 --- a/drivers/rtc/rtc-ds1305.c +++ b/drivers/rtc/rtc-ds1305.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/bcd.h> | 13 | #include <linux/bcd.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/rtc.h> | 15 | #include <linux/rtc.h> |
15 | #include <linux/workqueue.h> | 16 | #include <linux/workqueue.h> |
16 | 17 | ||
diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c index 5317bbcbc7a0..61945734ad00 100644 --- a/drivers/rtc/rtc-ds1374.c +++ b/drivers/rtc/rtc-ds1374.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/rtc.h> | 24 | #include <linux/rtc.h> |
25 | #include <linux/bcd.h> | 25 | #include <linux/bcd.h> |
26 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #define DS1374_REG_TOD0 0x00 /* Time of Day */ | 29 | #define DS1374_REG_TOD0 0x00 /* Time of Day */ |
29 | #define DS1374_REG_TOD1 0x01 | 30 | #define DS1374_REG_TOD1 0x01 |
diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c index cdb705057091..26a86d235051 100644 --- a/drivers/rtc/rtc-ds1390.c +++ b/drivers/rtc/rtc-ds1390.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/rtc.h> | 19 | #include <linux/rtc.h> |
20 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
21 | #include <linux/bcd.h> | 21 | #include <linux/bcd.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #define DS1390_REG_100THS 0x00 | 24 | #define DS1390_REG_100THS 0x00 |
24 | #define DS1390_REG_SECONDS 0x01 | 25 | #define DS1390_REG_SECONDS 0x01 |
diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c index 4166b84cb514..06b8566c4532 100644 --- a/drivers/rtc/rtc-ds1511.c +++ b/drivers/rtc/rtc-ds1511.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/bcd.h> | 17 | #include <linux/bcd.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/gfp.h> | ||
20 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
21 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
22 | #include <linux/rtc.h> | 23 | #include <linux/rtc.h> |
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c index ed1ef7c9cc06..244f9994bcbb 100644 --- a/drivers/rtc/rtc-ds1553.c +++ b/drivers/rtc/rtc-ds1553.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/bcd.h> | 11 | #include <linux/bcd.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/gfp.h> | ||
14 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
15 | #include <linux/jiffies.h> | 16 | #include <linux/jiffies.h> |
16 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c index cad9ceb89baf..2b4b0bc42d6f 100644 --- a/drivers/rtc/rtc-ds1742.c +++ b/drivers/rtc/rtc-ds1742.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/bcd.h> | 15 | #include <linux/bcd.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/gfp.h> | ||
18 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
19 | #include <linux/jiffies.h> | 20 | #include <linux/jiffies.h> |
20 | #include <linux/rtc.h> | 21 | #include <linux/rtc.h> |
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c index 91bde976bc0f..11ae64dcbf3c 100644 --- a/drivers/rtc/rtc-ep93xx.c +++ b/drivers/rtc/rtc-ep93xx.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/rtc.h> | 13 | #include <linux/rtc.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/gfp.h> | ||
16 | 17 | ||
17 | #define EP93XX_RTC_DATA 0x000 | 18 | #define EP93XX_RTC_DATA 0x000 |
18 | #define EP93XX_RTC_MATCH 0x004 | 19 | #define EP93XX_RTC_MATCH 0x004 |
diff --git a/drivers/rtc/rtc-fm3130.c b/drivers/rtc/rtc-fm3130.c index 812c66755083..ff6fce61ea41 100644 --- a/drivers/rtc/rtc-fm3130.c +++ b/drivers/rtc/rtc-fm3130.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/rtc.h> | 14 | #include <linux/rtc.h> |
15 | #include <linux/bcd.h> | 15 | #include <linux/bcd.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #define FM3130_RTC_CONTROL (0x0) | 18 | #define FM3130_RTC_CONTROL (0x0) |
18 | #define FM3130_CAL_CONTROL (0x1) | 19 | #define FM3130_CAL_CONTROL (0x1) |
diff --git a/drivers/rtc/rtc-m48t35.c b/drivers/rtc/rtc-m48t35.c index 8cb5b8959e5b..7410875e5838 100644 --- a/drivers/rtc/rtc-m48t35.c +++ b/drivers/rtc/rtc-m48t35.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/rtc.h> | 18 | #include <linux/rtc.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
20 | #include <linux/bcd.h> | 21 | #include <linux/bcd.h> |
21 | #include <linux/io.h> | 22 | #include <linux/io.h> |
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c index ede43b846859..365ff3ac2348 100644 --- a/drivers/rtc/rtc-m48t59.c +++ b/drivers/rtc/rtc-m48t59.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/rtc.h> | 19 | #include <linux/rtc.h> |
20 | #include <linux/rtc/m48t59.h> | 20 | #include <linux/rtc/m48t59.h> |
21 | #include <linux/bcd.h> | 21 | #include <linux/bcd.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #ifndef NO_IRQ | 24 | #ifndef NO_IRQ |
24 | #define NO_IRQ (-1) | 25 | #define NO_IRQ (-1) |
diff --git a/drivers/rtc/rtc-max8925.c b/drivers/rtc/rtc-max8925.c index acdbb1760187..174036dda786 100644 --- a/drivers/rtc/rtc-max8925.c +++ b/drivers/rtc/rtc-max8925.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/rtc.h> | 15 | #include <linux/rtc.h> |
15 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
16 | #include <linux/mfd/max8925.h> | 17 | #include <linux/mfd/max8925.h> |
diff --git a/drivers/rtc/rtc-mc13783.c b/drivers/rtc/rtc-mc13783.c index d60c81b7b693..675bfb515367 100644 --- a/drivers/rtc/rtc-mc13783.c +++ b/drivers/rtc/rtc-mc13783.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/rtc.h> | 17 | #include <linux/rtc.h> |
17 | 18 | ||
18 | #define DRIVER_NAME "mc13783-rtc" | 19 | #define DRIVER_NAME "mc13783-rtc" |
@@ -319,35 +320,38 @@ static int __devinit mc13783_rtc_probe(struct platform_device *pdev) | |||
319 | { | 320 | { |
320 | int ret; | 321 | int ret; |
321 | struct mc13783_rtc *priv; | 322 | struct mc13783_rtc *priv; |
323 | struct mc13783 *mc13783; | ||
322 | int rtcrst_pending; | 324 | int rtcrst_pending; |
323 | 325 | ||
324 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | 326 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
325 | if (!priv) | 327 | if (!priv) |
326 | return -ENOMEM; | 328 | return -ENOMEM; |
327 | 329 | ||
328 | priv->mc13783 = dev_get_drvdata(pdev->dev.parent); | 330 | mc13783 = dev_get_drvdata(pdev->dev.parent); |
331 | priv->mc13783 = mc13783; | ||
332 | |||
329 | platform_set_drvdata(pdev, priv); | 333 | platform_set_drvdata(pdev, priv); |
330 | 334 | ||
331 | mc13783_lock(priv->mc13783); | 335 | mc13783_lock(mc13783); |
332 | 336 | ||
333 | ret = mc13783_irq_request(priv->mc13783, MC13783_IRQ_RTCRST, | 337 | ret = mc13783_irq_request(mc13783, MC13783_IRQ_RTCRST, |
334 | mc13783_rtc_reset_handler, DRIVER_NAME, priv); | 338 | mc13783_rtc_reset_handler, DRIVER_NAME, priv); |
335 | if (ret) | 339 | if (ret) |
336 | goto err_reset_irq_request; | 340 | goto err_reset_irq_request; |
337 | 341 | ||
338 | ret = mc13783_irq_status(priv->mc13783, MC13783_IRQ_RTCRST, | 342 | ret = mc13783_irq_status(mc13783, MC13783_IRQ_RTCRST, |
339 | NULL, &rtcrst_pending); | 343 | NULL, &rtcrst_pending); |
340 | if (ret) | 344 | if (ret) |
341 | goto err_reset_irq_status; | 345 | goto err_reset_irq_status; |
342 | 346 | ||
343 | priv->valid = !rtcrst_pending; | 347 | priv->valid = !rtcrst_pending; |
344 | 348 | ||
345 | ret = mc13783_irq_request_nounmask(priv->mc13783, MC13783_IRQ_1HZ, | 349 | ret = mc13783_irq_request_nounmask(mc13783, MC13783_IRQ_1HZ, |
346 | mc13783_rtc_update_handler, DRIVER_NAME, priv); | 350 | mc13783_rtc_update_handler, DRIVER_NAME, priv); |
347 | if (ret) | 351 | if (ret) |
348 | goto err_update_irq_request; | 352 | goto err_update_irq_request; |
349 | 353 | ||
350 | ret = mc13783_irq_request_nounmask(priv->mc13783, MC13783_IRQ_TODA, | 354 | ret = mc13783_irq_request_nounmask(mc13783, MC13783_IRQ_TODA, |
351 | mc13783_rtc_alarm_handler, DRIVER_NAME, priv); | 355 | mc13783_rtc_alarm_handler, DRIVER_NAME, priv); |
352 | if (ret) | 356 | if (ret) |
353 | goto err_alarm_irq_request; | 357 | goto err_alarm_irq_request; |
@@ -357,22 +361,22 @@ static int __devinit mc13783_rtc_probe(struct platform_device *pdev) | |||
357 | if (IS_ERR(priv->rtc)) { | 361 | if (IS_ERR(priv->rtc)) { |
358 | ret = PTR_ERR(priv->rtc); | 362 | ret = PTR_ERR(priv->rtc); |
359 | 363 | ||
360 | mc13783_irq_free(priv->mc13783, MC13783_IRQ_TODA, priv); | 364 | mc13783_irq_free(mc13783, MC13783_IRQ_TODA, priv); |
361 | err_alarm_irq_request: | 365 | err_alarm_irq_request: |
362 | 366 | ||
363 | mc13783_irq_free(priv->mc13783, MC13783_IRQ_1HZ, priv); | 367 | mc13783_irq_free(mc13783, MC13783_IRQ_1HZ, priv); |
364 | err_update_irq_request: | 368 | err_update_irq_request: |
365 | 369 | ||
366 | err_reset_irq_status: | 370 | err_reset_irq_status: |
367 | 371 | ||
368 | mc13783_irq_free(priv->mc13783, MC13783_IRQ_RTCRST, priv); | 372 | mc13783_irq_free(mc13783, MC13783_IRQ_RTCRST, priv); |
369 | err_reset_irq_request: | 373 | err_reset_irq_request: |
370 | 374 | ||
371 | platform_set_drvdata(pdev, NULL); | 375 | platform_set_drvdata(pdev, NULL); |
372 | kfree(priv); | 376 | kfree(priv); |
373 | } | 377 | } |
374 | 378 | ||
375 | mc13783_unlock(priv->mc13783); | 379 | mc13783_unlock(mc13783); |
376 | 380 | ||
377 | return ret; | 381 | return ret; |
378 | } | 382 | } |
diff --git a/drivers/rtc/rtc-mpc5121.c b/drivers/rtc/rtc-mpc5121.c index 4313ca03a96d..f0dbf9cb8f9c 100644 --- a/drivers/rtc/rtc-mpc5121.c +++ b/drivers/rtc/rtc-mpc5121.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/of_device.h> | 15 | #include <linux/of_device.h> |
16 | #include <linux/of_platform.h> | 16 | #include <linux/of_platform.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | struct mpc5121_rtc_regs { | 20 | struct mpc5121_rtc_regs { |
20 | u8 set_time; /* RTC + 0x00 */ | 21 | u8 set_time; /* RTC + 0x00 */ |
diff --git a/drivers/rtc/rtc-msm6242.c b/drivers/rtc/rtc-msm6242.c index 5f5968a48925..b2fff0ca49f8 100644 --- a/drivers/rtc/rtc-msm6242.c +++ b/drivers/rtc/rtc-msm6242.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/rtc.h> | 15 | #include <linux/rtc.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | 18 | ||
18 | enum { | 19 | enum { |
diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c index dc052ce6e63a..bcca47298554 100644 --- a/drivers/rtc/rtc-mv.c +++ b/drivers/rtc/rtc-mv.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/gfp.h> | ||
16 | 17 | ||
17 | 18 | ||
18 | #define RTC_TIME_REG_OFFS 0 | 19 | #define RTC_TIME_REG_OFFS 0 |
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index 8710f9415d98..d71fe61db1d6 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers/rtc/rtc-mxc.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
13 | #include <linux/rtc.h> | 13 | #include <linux/rtc.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
@@ -383,21 +384,26 @@ static int __init mxc_rtc_probe(struct platform_device *pdev) | |||
383 | struct rtc_device *rtc; | 384 | struct rtc_device *rtc; |
384 | struct rtc_plat_data *pdata = NULL; | 385 | struct rtc_plat_data *pdata = NULL; |
385 | u32 reg; | 386 | u32 reg; |
386 | int ret, rate; | 387 | unsigned long rate; |
388 | int ret; | ||
387 | 389 | ||
388 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 390 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
389 | if (!res) | 391 | if (!res) |
390 | return -ENODEV; | 392 | return -ENODEV; |
391 | 393 | ||
392 | pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); | 394 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); |
393 | if (!pdata) | 395 | if (!pdata) |
394 | return -ENOMEM; | 396 | return -ENOMEM; |
395 | 397 | ||
396 | pdata->ioaddr = ioremap(res->start, resource_size(res)); | 398 | if (!devm_request_mem_region(&pdev->dev, res->start, |
399 | resource_size(res), pdev->name)) | ||
400 | return -EBUSY; | ||
401 | |||
402 | pdata->ioaddr = devm_ioremap(&pdev->dev, res->start, | ||
403 | resource_size(res)); | ||
397 | 404 | ||
398 | clk = clk_get(&pdev->dev, "ckil"); | 405 | clk = clk_get(&pdev->dev, "ckil"); |
399 | if (IS_ERR(clk)) { | 406 | if (IS_ERR(clk)) { |
400 | iounmap(pdata->ioaddr); | ||
401 | ret = PTR_ERR(clk); | 407 | ret = PTR_ERR(clk); |
402 | goto exit_free_pdata; | 408 | goto exit_free_pdata; |
403 | } | 409 | } |
@@ -412,8 +418,7 @@ static int __init mxc_rtc_probe(struct platform_device *pdev) | |||
412 | else if (rate == 38400) | 418 | else if (rate == 38400) |
413 | reg = RTC_INPUT_CLK_38400HZ; | 419 | reg = RTC_INPUT_CLK_38400HZ; |
414 | else { | 420 | else { |
415 | dev_err(&pdev->dev, "rtc clock is not valid (%lu)\n", | 421 | dev_err(&pdev->dev, "rtc clock is not valid (%lu)\n", rate); |
416 | clk_get_rate(clk)); | ||
417 | ret = -EINVAL; | 422 | ret = -EINVAL; |
418 | goto exit_free_pdata; | 423 | goto exit_free_pdata; |
419 | } | 424 | } |
@@ -449,8 +454,8 @@ static int __init mxc_rtc_probe(struct platform_device *pdev) | |||
449 | pdata->irq = platform_get_irq(pdev, 0); | 454 | pdata->irq = platform_get_irq(pdev, 0); |
450 | 455 | ||
451 | if (pdata->irq >= 0 && | 456 | if (pdata->irq >= 0 && |
452 | request_irq(pdata->irq, mxc_rtc_interrupt, IRQF_SHARED, | 457 | devm_request_irq(&pdev->dev, pdata->irq, mxc_rtc_interrupt, |
453 | pdev->name, pdev) < 0) { | 458 | IRQF_SHARED, pdev->name, pdev) < 0) { |
454 | dev_warn(&pdev->dev, "interrupt not available.\n"); | 459 | dev_warn(&pdev->dev, "interrupt not available.\n"); |
455 | pdata->irq = -1; | 460 | pdata->irq = -1; |
456 | } | 461 | } |
@@ -458,10 +463,10 @@ static int __init mxc_rtc_probe(struct platform_device *pdev) | |||
458 | return 0; | 463 | return 0; |
459 | 464 | ||
460 | exit_put_clk: | 465 | exit_put_clk: |
466 | clk_disable(pdata->clk); | ||
461 | clk_put(pdata->clk); | 467 | clk_put(pdata->clk); |
462 | 468 | ||
463 | exit_free_pdata: | 469 | exit_free_pdata: |
464 | kfree(pdata); | ||
465 | 470 | ||
466 | return ret; | 471 | return ret; |
467 | } | 472 | } |
@@ -472,12 +477,8 @@ static int __exit mxc_rtc_remove(struct platform_device *pdev) | |||
472 | 477 | ||
473 | rtc_device_unregister(pdata->rtc); | 478 | rtc_device_unregister(pdata->rtc); |
474 | 479 | ||
475 | if (pdata->irq >= 0) | ||
476 | free_irq(pdata->irq, pdev); | ||
477 | |||
478 | clk_disable(pdata->clk); | 480 | clk_disable(pdata->clk); |
479 | clk_put(pdata->clk); | 481 | clk_put(pdata->clk); |
480 | kfree(pdata); | ||
481 | platform_set_drvdata(pdev, NULL); | 482 | platform_set_drvdata(pdev, NULL); |
482 | 483 | ||
483 | return 0; | 484 | return 0; |
diff --git a/drivers/rtc/rtc-nuc900.c b/drivers/rtc/rtc-nuc900.c index bf59c9c586b2..a351bd5d8176 100644 --- a/drivers/rtc/rtc-nuc900.c +++ b/drivers/rtc/rtc-nuc900.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/rtc.h> | 16 | #include <linux/rtc.h> |
16 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
17 | #include <linux/io.h> | 18 | #include <linux/io.h> |
diff --git a/drivers/rtc/rtc-pcap.c b/drivers/rtc/rtc-pcap.c index a99c28992d21..25c0b3fd44f1 100644 --- a/drivers/rtc/rtc-pcap.c +++ b/drivers/rtc/rtc-pcap.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/mfd/ezx-pcap.h> | 18 | #include <linux/mfd/ezx-pcap.h> |
19 | #include <linux/rtc.h> | 19 | #include <linux/rtc.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
21 | 22 | ||
22 | struct pcap_rtc { | 23 | struct pcap_rtc { |
diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c index 2ceb365533b2..71bab0ef5443 100644 --- a/drivers/rtc/rtc-pcf2123.c +++ b/drivers/rtc/rtc-pcf2123.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/init.h> | 39 | #include <linux/init.h> |
40 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
41 | #include <linux/string.h> | 41 | #include <linux/string.h> |
42 | #include <linux/slab.h> | ||
42 | #include <linux/rtc.h> | 43 | #include <linux/rtc.h> |
43 | #include <linux/spi/spi.h> | 44 | #include <linux/spi/spi.h> |
44 | 45 | ||
diff --git a/drivers/rtc/rtc-pcf50633.c b/drivers/rtc/rtc-pcf50633.c index 854c3cb365a1..16edf94ab42f 100644 --- a/drivers/rtc/rtc-pcf50633.c +++ b/drivers/rtc/rtc-pcf50633.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
22 | #include <linux/rtc.h> | 23 | #include <linux/rtc.h> |
23 | #include <linux/bcd.h> | 24 | #include <linux/bcd.h> |
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c index 65f346b2fbae..1af42b4a6f59 100644 --- a/drivers/rtc/rtc-pcf8563.c +++ b/drivers/rtc/rtc-pcf8563.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/bcd.h> | 18 | #include <linux/bcd.h> |
19 | #include <linux/rtc.h> | 19 | #include <linux/rtc.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #define DRV_VERSION "0.4.3" | 22 | #define DRV_VERSION "0.4.3" |
22 | 23 | ||
diff --git a/drivers/rtc/rtc-pl030.c b/drivers/rtc/rtc-pl030.c index 457231bb1029..bbdb2f02798a 100644 --- a/drivers/rtc/rtc-pl030.c +++ b/drivers/rtc/rtc-pl030.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/amba/bus.h> | 14 | #include <linux/amba/bus.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #define RTC_DR (0) | 18 | #define RTC_DR (0) |
18 | #define RTC_MR (4) | 19 | #define RTC_MR (4) |
diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c index c256aacfa954..3587d9922f28 100644 --- a/drivers/rtc/rtc-pl031.c +++ b/drivers/rtc/rtc-pl031.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/bcd.h> | 24 | #include <linux/bcd.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/version.h> | 26 | #include <linux/version.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | /* | 29 | /* |
29 | * Register definitions | 30 | * Register definitions |
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c index e6351b743da6..e9c6fa035989 100644 --- a/drivers/rtc/rtc-pxa.c +++ b/drivers/rtc/rtc-pxa.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/seq_file.h> | 26 | #include <linux/seq_file.h> |
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
31 | 32 | ||
diff --git a/drivers/rtc/rtc-rp5c01.c b/drivers/rtc/rtc-rp5c01.c index e1313feb060f..a95f733bb15a 100644 --- a/drivers/rtc/rtc-rp5c01.c +++ b/drivers/rtc/rtc-rp5c01.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/rtc.h> | 14 | #include <linux/rtc.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | 17 | ||
17 | enum { | 18 | enum { |
diff --git a/drivers/rtc/rtc-rs5c348.c b/drivers/rtc/rtc-rs5c348.c index 2099037cb3ea..368d0e63cf83 100644 --- a/drivers/rtc/rtc-rs5c348.c +++ b/drivers/rtc/rtc-rs5c348.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/rtc.h> | 23 | #include <linux/rtc.h> |
23 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
24 | #include <linux/spi/spi.h> | 25 | #include <linux/spi/spi.h> |
diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c index 2f2c68d476da..90cf0a6ff23e 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/rtc.h> | 14 | #include <linux/rtc.h> |
15 | #include <linux/bcd.h> | 15 | #include <linux/bcd.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #define DRV_VERSION "0.6" | 18 | #define DRV_VERSION "0.6" |
18 | 19 | ||
diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c index b1a29bcfdf13..b65c82f792d9 100644 --- a/drivers/rtc/rtc-rx8025.c +++ b/drivers/rtc/rtc-rx8025.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/bcd.h> | 25 | #include <linux/bcd.h> |
25 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index e0d7b9991505..4969b6059c89 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/bcd.h> | 21 | #include <linux/bcd.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/log2.h> | 23 | #include <linux/log2.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
26 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index e95cc6f8d61e..5efbd5990ff8 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/log2.h> | 27 | #include <linux/log2.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/slab.h> | ||
29 | #include <asm/rtc.h> | 30 | #include <asm/rtc.h> |
30 | 31 | ||
31 | #define DRV_NAME "sh-rtc" | 32 | #define DRV_NAME "sh-rtc" |
diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c index 67700831b5c9..875ba099e7a5 100644 --- a/drivers/rtc/rtc-stk17ta8.c +++ b/drivers/rtc/rtc-stk17ta8.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/bcd.h> | 14 | #include <linux/bcd.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/gfp.h> | ||
17 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
18 | #include <linux/jiffies.h> | 19 | #include <linux/jiffies.h> |
19 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
diff --git a/drivers/rtc/rtc-stmp3xxx.c b/drivers/rtc/rtc-stmp3xxx.c index d7ce1a5c857d..7e7d0c806f2d 100644 --- a/drivers/rtc/rtc-stmp3xxx.c +++ b/drivers/rtc/rtc-stmp3xxx.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/rtc.h> | 24 | #include <linux/rtc.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <mach/platform.h> | 27 | #include <mach/platform.h> |
27 | #include <mach/stmp3xxx.h> | 28 | #include <mach/stmp3xxx.h> |
diff --git a/drivers/rtc/rtc-tx4939.c b/drivers/rtc/rtc-tx4939.c index 9ee81d8aa7c0..20bfc64a15c8 100644 --- a/drivers/rtc/rtc-tx4939.c +++ b/drivers/rtc/rtc-tx4939.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/gfp.h> | ||
15 | #include <asm/txx9/tx4939.h> | 16 | #include <asm/txx9/tx4939.h> |
16 | 17 | ||
17 | struct tx4939rtc_plat_data { | 18 | struct tx4939rtc_plat_data { |
diff --git a/drivers/rtc/rtc-v3020.c b/drivers/rtc/rtc-v3020.c index bed4cab07043..f71c3ce18036 100644 --- a/drivers/rtc/rtc-v3020.c +++ b/drivers/rtc/rtc-v3020.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/rtc-v3020.h> | 28 | #include <linux/rtc-v3020.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | #include <linux/io.h> | 33 | #include <linux/io.h> |
33 | 34 | ||
diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c index 000c7e481e59..b16cfe57a484 100644 --- a/drivers/rtc/rtc-wm831x.c +++ b/drivers/rtc/rtc-wm831x.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/time.h> | 17 | #include <linux/time.h> |
18 | #include <linux/rtc.h> | 18 | #include <linux/rtc.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/bcd.h> | 20 | #include <linux/bcd.h> |
20 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
21 | #include <linux/ioctl.h> | 22 | #include <linux/ioctl.h> |
diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c index 51224f76b980..6927e751ce3e 100644 --- a/drivers/s390/block/dasd_3990_erp.c +++ b/drivers/s390/block/dasd_3990_erp.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #define KMSG_COMPONENT "dasd-eckd" | 10 | #define KMSG_COMPONENT "dasd-eckd" |
11 | 11 | ||
12 | #include <linux/timer.h> | 12 | #include <linux/timer.h> |
13 | #include <linux/slab.h> | ||
14 | #include <asm/idals.h> | 13 | #include <asm/idals.h> |
15 | 14 | ||
16 | #define PRINTK_HEADER "dasd_erp(3990): " | 15 | #define PRINTK_HEADER "dasd_erp(3990): " |
@@ -2287,7 +2286,8 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr) | |||
2287 | 2286 | ||
2288 | if (cqr->cpmode == 1) { | 2287 | if (cqr->cpmode == 1) { |
2289 | cplength = 0; | 2288 | cplength = 0; |
2290 | datasize = sizeof(struct tcw) + sizeof(struct tsb); | 2289 | /* TCW needs to be 64 byte aligned, so leave enough room */ |
2290 | datasize = 64 + sizeof(struct tcw) + sizeof(struct tsb); | ||
2291 | } else { | 2291 | } else { |
2292 | cplength = 2; | 2292 | cplength = 2; |
2293 | datasize = 0; | 2293 | datasize = 0; |
@@ -2316,8 +2316,8 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr) | |||
2316 | if (cqr->cpmode == 1) { | 2316 | if (cqr->cpmode == 1) { |
2317 | /* make a shallow copy of the original tcw but set new tsb */ | 2317 | /* make a shallow copy of the original tcw but set new tsb */ |
2318 | erp->cpmode = 1; | 2318 | erp->cpmode = 1; |
2319 | erp->cpaddr = erp->data; | 2319 | erp->cpaddr = PTR_ALIGN(erp->data, 64); |
2320 | tcw = erp->data; | 2320 | tcw = erp->cpaddr; |
2321 | tsb = (struct tsb *) &tcw[1]; | 2321 | tsb = (struct tsb *) &tcw[1]; |
2322 | *tcw = *((struct tcw *)cqr->cpaddr); | 2322 | *tcw = *((struct tcw *)cqr->cpaddr); |
2323 | tcw->tsb = (long)tsb; | 2323 | tcw->tsb = (long)tsb; |
diff --git a/drivers/s390/block/dasd_alias.c b/drivers/s390/block/dasd_alias.c index 148b1dd24070..8c4814258e93 100644 --- a/drivers/s390/block/dasd_alias.c +++ b/drivers/s390/block/dasd_alias.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #define KMSG_COMPONENT "dasd-eckd" | 8 | #define KMSG_COMPONENT "dasd-eckd" |
9 | 9 | ||
10 | #include <linux/list.h> | 10 | #include <linux/list.h> |
11 | #include <linux/slab.h> | ||
11 | #include <asm/ebcdic.h> | 12 | #include <asm/ebcdic.h> |
12 | #include "dasd_int.h" | 13 | #include "dasd_int.h" |
13 | #include "dasd_eckd.h" | 14 | #include "dasd_eckd.h" |
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 8e23919c8704..eff9c812c5c2 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/ctype.h> | 18 | #include <linux/ctype.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <asm/debug.h> | 23 | #include <asm/debug.h> |
23 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 01f4e7a34aa8..0cb233116855 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -3155,11 +3155,11 @@ static void dasd_eckd_dump_sense_tcw(struct dasd_device *device, | |||
3155 | 3155 | ||
3156 | tsb = NULL; | 3156 | tsb = NULL; |
3157 | sense = NULL; | 3157 | sense = NULL; |
3158 | if (irb->scsw.tm.tcw) | 3158 | if (irb->scsw.tm.tcw && (irb->scsw.tm.fcxs == 0x01)) |
3159 | tsb = tcw_get_tsb( | 3159 | tsb = tcw_get_tsb( |
3160 | (struct tcw *)(unsigned long)irb->scsw.tm.tcw); | 3160 | (struct tcw *)(unsigned long)irb->scsw.tm.tcw); |
3161 | 3161 | ||
3162 | if (tsb && (irb->scsw.tm.fcxs == 0x01)) { | 3162 | if (tsb) { |
3163 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | 3163 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER |
3164 | " tsb->length %d\n", tsb->length); | 3164 | " tsb->length %d\n", tsb->length); |
3165 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | 3165 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER |
diff --git a/drivers/s390/block/dasd_eer.c b/drivers/s390/block/dasd_eer.c index 1f3e967aaba8..dd88803e4899 100644 --- a/drivers/s390/block/dasd_eer.c +++ b/drivers/s390/block/dasd_eer.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mutex.h> | 19 | #include <linux/mutex.h> |
20 | #include <linux/smp_lock.h> | 20 | #include <linux/smp_lock.h> |
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
24 | #include <asm/atomic.h> | 25 | #include <asm/atomic.h> |
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index 3479f8158a1b..1557214944f7 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/blkpg.h> | 18 | #include <linux/blkpg.h> |
19 | #include <linux/smp_lock.h> | 19 | #include <linux/smp_lock.h> |
20 | #include <linux/slab.h> | ||
20 | #include <asm/compat.h> | 21 | #include <asm/compat.h> |
21 | #include <asm/ccwdev.h> | 22 | #include <asm/ccwdev.h> |
22 | #include <asm/cmb.h> | 23 | #include <asm/cmb.h> |
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index f13a0bdd148c..2eb025592809 100644 --- a/drivers/s390/block/dasd_proc.c +++ b/drivers/s390/block/dasd_proc.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #define KMSG_COMPONENT "dasd" | 14 | #define KMSG_COMPONENT "dasd" |
15 | 15 | ||
16 | #include <linux/ctype.h> | 16 | #include <linux/ctype.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/string.h> | 18 | #include <linux/string.h> |
18 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
19 | #include <linux/vmalloc.h> | 20 | #include <linux/vmalloc.h> |
diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c index 118de392af63..c881a14fa5dd 100644 --- a/drivers/s390/block/xpram.c +++ b/drivers/s390/block/xpram.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/ctype.h> /* isdigit, isxdigit */ | 33 | #include <linux/ctype.h> /* isdigit, isxdigit */ |
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/slab.h> | ||
37 | #include <linux/blkdev.h> | 36 | #include <linux/blkdev.h> |
38 | #include <linux/blkpg.h> | 37 | #include <linux/blkpg.h> |
39 | #include <linux/hdreg.h> /* HDIO_GETGEO */ | 38 | #include <linux/hdreg.h> /* HDIO_GETGEO */ |
@@ -41,6 +40,7 @@ | |||
41 | #include <linux/bio.h> | 40 | #include <linux/bio.h> |
42 | #include <linux/suspend.h> | 41 | #include <linux/suspend.h> |
43 | #include <linux/platform_device.h> | 42 | #include <linux/platform_device.h> |
43 | #include <linux/gfp.h> | ||
44 | #include <asm/uaccess.h> | 44 | #include <asm/uaccess.h> |
45 | 45 | ||
46 | #define XPRAM_NAME "xpram" | 46 | #define XPRAM_NAME "xpram" |
diff --git a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c index 6bca81aea396..bb07577e8fd4 100644 --- a/drivers/s390/char/con3270.c +++ b/drivers/s390/char/con3270.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/err.h> | 16 | #include <linux/err.h> |
16 | #include <linux/reboot.h> | 17 | #include <linux/reboot.h> |
17 | 18 | ||
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c index 31c59b0d6df0..0eabcca3c92d 100644 --- a/drivers/s390/char/fs3270.c +++ b/drivers/s390/char/fs3270.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/list.h> | 14 | #include <linux/list.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/types.h> | 16 | #include <linux/types.h> |
16 | #include <linux/smp_lock.h> | 17 | #include <linux/smp_lock.h> |
17 | 18 | ||
diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c index cee4d4e42429..cb6bffe7141a 100644 --- a/drivers/s390/char/keyboard.c +++ b/drivers/s390/char/keyboard.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/sysrq.h> | 13 | #include <linux/sysrq.h> |
13 | 14 | ||
14 | #include <linux/consolemap.h> | 15 | #include <linux/consolemap.h> |
diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c index 33e96484d54f..2ed3f82e5c30 100644 --- a/drivers/s390/char/monreader.c +++ b/drivers/s390/char/monreader.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/poll.h> | 22 | #include <linux/poll.h> |
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include <linux/slab.h> | ||
24 | #include <net/iucv/iucv.h> | 25 | #include <net/iucv/iucv.h> |
25 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
26 | #include <asm/ebcdic.h> | 27 | #include <asm/ebcdic.h> |
diff --git a/drivers/s390/char/monwriter.c b/drivers/s390/char/monwriter.c index 668a0579b26b..98a49dfda1de 100644 --- a/drivers/s390/char/monwriter.c +++ b/drivers/s390/char/monwriter.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/poll.h> | 20 | #include <linux/poll.h> |
21 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/slab.h> | ||
23 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
24 | #include <asm/ebcdic.h> | 25 | #include <asm/ebcdic.h> |
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
diff --git a/drivers/s390/char/sclp_async.c b/drivers/s390/char/sclp_async.c index 740fe405c395..7ad30e72f868 100644 --- a/drivers/s390/char/sclp_async.c +++ b/drivers/s390/char/sclp_async.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/stat.h> | 12 | #include <linux/stat.h> |
13 | #include <linux/string.h> | 13 | #include <linux/string.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/ctype.h> | 15 | #include <linux/ctype.h> |
15 | #include <linux/kmod.h> | 16 | #include <linux/kmod.h> |
16 | #include <linux/err.h> | 17 | #include <linux/err.h> |
@@ -84,6 +85,7 @@ static int proc_handler_callhome(struct ctl_table *ctl, int write, | |||
84 | rc = copy_from_user(buf, buffer, sizeof(buf)); | 85 | rc = copy_from_user(buf, buffer, sizeof(buf)); |
85 | if (rc != 0) | 86 | if (rc != 0) |
86 | return -EFAULT; | 87 | return -EFAULT; |
88 | buf[sizeof(buf) - 1] = '\0'; | ||
87 | if (strict_strtoul(buf, 0, &val) != 0) | 89 | if (strict_strtoul(buf, 0, &val) != 0) |
88 | return -EINVAL; | 90 | return -EINVAL; |
89 | if (val != 0 && val != 1) | 91 | if (val != 0 && val != 1) |
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index fc7ae05ce48a..4b60ede07f0e 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c | |||
@@ -308,6 +308,13 @@ struct assign_storage_sccb { | |||
308 | u16 rn; | 308 | u16 rn; |
309 | } __packed; | 309 | } __packed; |
310 | 310 | ||
311 | int arch_get_memory_phys_device(unsigned long start_pfn) | ||
312 | { | ||
313 | if (!rzm) | ||
314 | return 0; | ||
315 | return PFN_PHYS(start_pfn) >> ilog2(rzm); | ||
316 | } | ||
317 | |||
311 | static unsigned long long rn2addr(u16 rn) | 318 | static unsigned long long rn2addr(u16 rn) |
312 | { | 319 | { |
313 | return (unsigned long long) (rn - 1) * rzm; | 320 | return (unsigned long long) (rn - 1) * rzm; |
@@ -704,13 +711,6 @@ int sclp_chp_deconfigure(struct chp_id chpid) | |||
704 | return do_chp_configure(SCLP_CMDW_DECONFIGURE_CHPATH | chpid.id << 8); | 711 | return do_chp_configure(SCLP_CMDW_DECONFIGURE_CHPATH | chpid.id << 8); |
705 | } | 712 | } |
706 | 713 | ||
707 | int arch_get_memory_phys_device(unsigned long start_pfn) | ||
708 | { | ||
709 | if (!rzm) | ||
710 | return 0; | ||
711 | return PFN_PHYS(start_pfn) / rzm; | ||
712 | } | ||
713 | |||
714 | struct chp_info_sccb { | 714 | struct chp_info_sccb { |
715 | struct sccb_header header; | 715 | struct sccb_header header; |
716 | u8 recognized[SCLP_CHP_INFO_MASK_SIZE]; | 716 | u8 recognized[SCLP_CHP_INFO_MASK_SIZE]; |
diff --git a/drivers/s390/char/sclp_con.c b/drivers/s390/char/sclp_con.c index ad698d30cb3b..ecf45c54f8c4 100644 --- a/drivers/s390/char/sclp_con.c +++ b/drivers/s390/char/sclp_con.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/termios.h> | 14 | #include <linux/termios.h> |
15 | #include <linux/err.h> | 15 | #include <linux/err.h> |
16 | #include <linux/reboot.h> | 16 | #include <linux/reboot.h> |
17 | #include <linux/gfp.h> | ||
17 | 18 | ||
18 | #include "sclp.h" | 19 | #include "sclp.h" |
19 | #include "sclp_rw.h" | 20 | #include "sclp_rw.h" |
diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c index 434ba04b1309..8258d590505f 100644 --- a/drivers/s390/char/sclp_tty.c +++ b/drivers/s390/char/sclp_tty.c | |||
@@ -13,10 +13,10 @@ | |||
13 | #include <linux/tty.h> | 13 | #include <linux/tty.h> |
14 | #include <linux/tty_driver.h> | 14 | #include <linux/tty_driver.h> |
15 | #include <linux/tty_flip.h> | 15 | #include <linux/tty_flip.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/err.h> | 16 | #include <linux/err.h> |
18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
19 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/gfp.h> | ||
20 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
21 | 21 | ||
22 | #include "ctrlchar.h" | 22 | #include "ctrlchar.h" |
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index 3796ffdb8479..5d706e6c946f 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/reboot.h> | 25 | #include <linux/reboot.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
28 | #include "sclp.h" | 29 | #include "sclp.h" |
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index cb70fa1cf539..c17f35b6136a 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/bio.h> | 16 | #include <linux/bio.h> |
17 | #include <linux/workqueue.h> | 17 | #include <linux/workqueue.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #define TAPE_DBF_AREA tape_34xx_dbf | 20 | #define TAPE_DBF_AREA tape_34xx_dbf |
20 | 21 | ||
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index 9821c5886613..fc993acf99b6 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
16 | #include <linux/bio.h> | 17 | #include <linux/bio.h> |
17 | #include <asm/ebcdic.h> | 18 | #include <asm/ebcdic.h> |
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index b2864e3edb6d..55343df61edd 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c | |||
@@ -11,6 +11,8 @@ | |||
11 | #define KMSG_COMPONENT "tape" | 11 | #define KMSG_COMPONENT "tape" |
12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
13 | 13 | ||
14 | #include <linux/slab.h> | ||
15 | |||
14 | #include "tape_class.h" | 16 | #include "tape_class.h" |
15 | 17 | ||
16 | MODULE_AUTHOR("Stefan Bader <shbader@de.ibm.com>"); | 18 | MODULE_AUTHOR("Stefan Bader <shbader@de.ibm.com>"); |
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 81b094e480e6..29c2d73d719d 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/spinlock.h> // for locks | 20 | #include <linux/spinlock.h> // for locks |
21 | #include <linux/vmalloc.h> | 21 | #include <linux/vmalloc.h> |
22 | #include <linux/list.h> | 22 | #include <linux/list.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <asm/types.h> // for variable types | 25 | #include <asm/types.h> // for variable types |
25 | 26 | ||
diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c index 921dcda77676..5bb59d36a6d4 100644 --- a/drivers/s390/char/vmcp.c +++ b/drivers/s390/char/vmcp.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/miscdevice.h> | 20 | #include <linux/miscdevice.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
22 | #include <asm/compat.h> | 23 | #include <asm/compat.h> |
23 | #include <asm/cpcmd.h> | 24 | #include <asm/cpcmd.h> |
24 | #include <asm/debug.h> | 25 | #include <asm/debug.h> |
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index 7dfa5412d5a8..e40a1b892866 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
20 | #include <linux/types.h> | 21 | #include <linux/types.h> |
21 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c index cc56fc708bae..1de672f21037 100644 --- a/drivers/s390/char/vmur.c +++ b/drivers/s390/char/vmur.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
13 | 13 | ||
14 | #include <linux/cdev.h> | 14 | #include <linux/cdev.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/smp_lock.h> | 16 | #include <linux/smp_lock.h> |
16 | 17 | ||
17 | #include <asm/uaccess.h> | 18 | #include <asm/uaccess.h> |
diff --git a/drivers/s390/char/vmwatchdog.c b/drivers/s390/char/vmwatchdog.c index c974058e48d2..e13508c98b1a 100644 --- a/drivers/s390/char/vmwatchdog.c +++ b/drivers/s390/char/vmwatchdog.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/miscdevice.h> | 17 | #include <linux/miscdevice.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/moduleparam.h> | 19 | #include <linux/moduleparam.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/suspend.h> | 21 | #include <linux/suspend.h> |
21 | #include <linux/watchdog.h> | 22 | #include <linux/watchdog.h> |
22 | 23 | ||
diff --git a/drivers/s390/char/zcore.c b/drivers/s390/char/zcore.c index 3438658b66b7..18daf16aa357 100644 --- a/drivers/s390/char/zcore.c +++ b/drivers/s390/char/zcore.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 13 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
14 | 14 | ||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/miscdevice.h> | 17 | #include <linux/miscdevice.h> |
17 | #include <linux/debugfs.h> | 18 | #include <linux/debugfs.h> |
18 | #include <asm/asm-offsets.h> | 19 | #include <asm/asm-offsets.h> |
@@ -141,33 +142,6 @@ static int memcpy_hsa_kernel(void *dest, unsigned long src, size_t count) | |||
141 | return memcpy_hsa(dest, src, count, TO_KERNEL); | 142 | return memcpy_hsa(dest, src, count, TO_KERNEL); |
142 | } | 143 | } |
143 | 144 | ||
144 | static int memcpy_real(void *dest, unsigned long src, size_t count) | ||
145 | { | ||
146 | unsigned long flags; | ||
147 | int rc = -EFAULT; | ||
148 | register unsigned long _dest asm("2") = (unsigned long) dest; | ||
149 | register unsigned long _len1 asm("3") = (unsigned long) count; | ||
150 | register unsigned long _src asm("4") = src; | ||
151 | register unsigned long _len2 asm("5") = (unsigned long) count; | ||
152 | |||
153 | if (count == 0) | ||
154 | return 0; | ||
155 | flags = __raw_local_irq_stnsm(0xf8UL); /* switch to real mode */ | ||
156 | asm volatile ( | ||
157 | "0: mvcle %1,%2,0x0\n" | ||
158 | "1: jo 0b\n" | ||
159 | " lhi %0,0x0\n" | ||
160 | "2:\n" | ||
161 | EX_TABLE(1b,2b) | ||
162 | : "+d" (rc), "+d" (_dest), "+d" (_src), "+d" (_len1), | ||
163 | "+d" (_len2), "=m" (*((long*)dest)) | ||
164 | : "m" (*((long*)src)) | ||
165 | : "cc", "memory"); | ||
166 | __raw_local_irq_ssm(flags); | ||
167 | |||
168 | return rc; | ||
169 | } | ||
170 | |||
171 | static int memcpy_real_user(void __user *dest, unsigned long src, size_t count) | 145 | static int memcpy_real_user(void __user *dest, unsigned long src, size_t count) |
172 | { | 146 | { |
173 | static char buf[4096]; | 147 | static char buf[4096]; |
@@ -175,7 +149,7 @@ static int memcpy_real_user(void __user *dest, unsigned long src, size_t count) | |||
175 | 149 | ||
176 | while (offs < count) { | 150 | while (offs < count) { |
177 | size = min(sizeof(buf), count - offs); | 151 | size = min(sizeof(buf), count - offs); |
178 | if (memcpy_real(buf, src + offs, size)) | 152 | if (memcpy_real(buf, (void *) src + offs, size)) |
179 | return -EFAULT; | 153 | return -EFAULT; |
180 | if (copy_to_user(dest + offs, buf, size)) | 154 | if (copy_to_user(dest + offs, buf, size)) |
181 | return -EFAULT; | 155 | return -EFAULT; |
@@ -663,7 +637,7 @@ static int __init zcore_reipl_init(void) | |||
663 | if (ipib_info.ipib < ZFCPDUMP_HSA_SIZE) | 637 | if (ipib_info.ipib < ZFCPDUMP_HSA_SIZE) |
664 | rc = memcpy_hsa_kernel(ipl_block, ipib_info.ipib, PAGE_SIZE); | 638 | rc = memcpy_hsa_kernel(ipl_block, ipib_info.ipib, PAGE_SIZE); |
665 | else | 639 | else |
666 | rc = memcpy_real(ipl_block, ipib_info.ipib, PAGE_SIZE); | 640 | rc = memcpy_real(ipl_block, (void *) ipib_info.ipib, PAGE_SIZE); |
667 | if (rc) { | 641 | if (rc) { |
668 | free_page((unsigned long) ipl_block); | 642 | free_page((unsigned long) ipl_block); |
669 | return rc; | 643 | return rc; |
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c index 7eab9ab9f406..13cb60162e42 100644 --- a/drivers/s390/cio/blacklist.c +++ b/drivers/s390/cio/blacklist.c | |||
@@ -14,7 +14,6 @@ | |||
14 | 14 | ||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/vmalloc.h> | 16 | #include <linux/vmalloc.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
19 | #include <linux/seq_file.h> | 18 | #include <linux/seq_file.h> |
20 | #include <linux/ctype.h> | 19 | #include <linux/ctype.h> |
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c index c268a2e5b7c3..1d16189f2f2d 100644 --- a/drivers/s390/cio/chp.c +++ b/drivers/s390/cio/chp.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/wait.h> | 15 | #include <linux/wait.h> |
16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/slab.h> | ||
18 | #include <asm/chpid.h> | 19 | #include <asm/chpid.h> |
19 | #include <asm/sclp.h> | 20 | #include <asm/sclp.h> |
20 | #include <asm/crw.h> | 21 | #include <asm/crw.h> |
diff --git a/drivers/s390/cio/chsc_sch.c b/drivers/s390/cio/chsc_sch.c index 852612f5dba0..404f630c27ca 100644 --- a/drivers/s390/cio/chsc_sch.c +++ b/drivers/s390/cio/chsc_sch.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/slab.h> | ||
10 | #include <linux/device.h> | 11 | #include <linux/device.h> |
11 | #include <linux/module.h> | 12 | #include <linux/module.h> |
12 | #include <linux/uaccess.h> | 13 | #include <linux/uaccess.h> |
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 4f8f74311778..88be7b9ea6e1 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/timer.h> | 14 | #include <linux/timer.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/gfp.h> | ||
16 | #include <asm/atomic.h> | 17 | #include <asm/atomic.h> |
17 | #include <asm/debug.h> | 18 | #include <asm/debug.h> |
18 | #include <asm/qdio.h> | 19 | #include <asm/qdio.h> |
diff --git a/drivers/s390/cio/qdio_thinint.c b/drivers/s390/cio/qdio_thinint.c index 9942c1031b25..ce5f8910ff83 100644 --- a/drivers/s390/cio/qdio_thinint.c +++ b/drivers/s390/cio/qdio_thinint.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Jan Glauber <jang@linux.vnet.ibm.com> | 7 | * Jan Glauber <jang@linux.vnet.ibm.com> |
8 | */ | 8 | */ |
9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
10 | #include <linux/slab.h> | ||
10 | #include <asm/atomic.h> | 11 | #include <asm/atomic.h> |
11 | #include <asm/debug.h> | 12 | #include <asm/debug.h> |
12 | #include <asm/qdio.h> | 13 | #include <asm/qdio.h> |
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 20836eff88c5..91c6028d7b74 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/err.h> | 33 | #include <linux/err.h> |
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/workqueue.h> | 35 | #include <linux/workqueue.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/notifier.h> | 37 | #include <linux/notifier.h> |
37 | #include <linux/kthread.h> | 38 | #include <linux/kthread.h> |
38 | #include <linux/mutex.h> | 39 | #include <linux/mutex.h> |
diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c index ba50fe02e572..304caf549973 100644 --- a/drivers/s390/crypto/zcrypt_api.c +++ b/drivers/s390/crypto/zcrypt_api.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/seq_file.h> | 36 | #include <linux/seq_file.h> |
37 | #include <linux/compat.h> | 37 | #include <linux/compat.h> |
38 | #include <linux/smp_lock.h> | 38 | #include <linux/smp_lock.h> |
39 | #include <linux/slab.h> | ||
39 | #include <asm/atomic.h> | 40 | #include <asm/atomic.h> |
40 | #include <asm/uaccess.h> | 41 | #include <asm/uaccess.h> |
41 | #include <linux/hw_random.h> | 42 | #include <linux/hw_random.h> |
diff --git a/drivers/s390/crypto/zcrypt_cex2a.c b/drivers/s390/crypto/zcrypt_cex2a.c index c6fb0aa89507..9c409efa1ecf 100644 --- a/drivers/s390/crypto/zcrypt_cex2a.c +++ b/drivers/s390/crypto/zcrypt_cex2a.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/init.h> | 31 | #include <linux/init.h> |
31 | #include <linux/err.h> | 32 | #include <linux/err.h> |
32 | #include <asm/atomic.h> | 33 | #include <asm/atomic.h> |
diff --git a/drivers/s390/crypto/zcrypt_pcica.c b/drivers/s390/crypto/zcrypt_pcica.c index e78df3671caf..09e934b295a0 100644 --- a/drivers/s390/crypto/zcrypt_pcica.c +++ b/drivers/s390/crypto/zcrypt_pcica.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/init.h> | 31 | #include <linux/init.h> |
31 | #include <linux/err.h> | 32 | #include <linux/err.h> |
32 | #include <asm/atomic.h> | 33 | #include <asm/atomic.h> |
diff --git a/drivers/s390/crypto/zcrypt_pcicc.c b/drivers/s390/crypto/zcrypt_pcicc.c index 142f72a2ca5a..9dec5c77cff4 100644 --- a/drivers/s390/crypto/zcrypt_pcicc.c +++ b/drivers/s390/crypto/zcrypt_pcicc.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/gfp.h> | ||
31 | #include <linux/err.h> | 32 | #include <linux/err.h> |
32 | #include <asm/atomic.h> | 33 | #include <asm/atomic.h> |
33 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
diff --git a/drivers/s390/crypto/zcrypt_pcixcc.c b/drivers/s390/crypto/zcrypt_pcixcc.c index 68f3e6204db8..510fab4577d4 100644 --- a/drivers/s390/crypto/zcrypt_pcixcc.c +++ b/drivers/s390/crypto/zcrypt_pcixcc.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/err.h> | 31 | #include <linux/err.h> |
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <linux/slab.h> | ||
33 | #include <asm/atomic.h> | 34 | #include <asm/atomic.h> |
34 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
35 | 36 | ||
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c index b2fc4fd63f7f..4e298bc8949d 100644 --- a/drivers/s390/kvm/kvm_virtio.c +++ b/drivers/s390/kvm/kvm_virtio.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/err.h> | 15 | #include <linux/err.h> |
16 | #include <linux/virtio.h> | 16 | #include <linux/virtio.h> |
17 | #include <linux/virtio_config.h> | 17 | #include <linux/virtio_config.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/virtio_console.h> | 19 | #include <linux/virtio_console.h> |
19 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
20 | #include <linux/virtio_ring.h> | 21 | #include <linux/virtio_ring.h> |
diff --git a/drivers/s390/net/ctcm_dbug.c b/drivers/s390/net/ctcm_dbug.c index 1ca58f153470..d962fd741a23 100644 --- a/drivers/s390/net/ctcm_dbug.c +++ b/drivers/s390/net/ctcm_dbug.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/ctype.h> | 13 | #include <linux/ctype.h> |
15 | #include <linux/sysctl.h> | 14 | #include <linux/sysctl.h> |
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
diff --git a/drivers/s390/net/ctcm_sysfs.c b/drivers/s390/net/ctcm_sysfs.c index 738ad26c74a7..2b24550e865e 100644 --- a/drivers/s390/net/ctcm_sysfs.c +++ b/drivers/s390/net/ctcm_sysfs.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 14 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
15 | 15 | ||
16 | #include <linux/sysfs.h> | 16 | #include <linux/sysfs.h> |
17 | #include <linux/slab.h> | ||
17 | #include "ctcm_main.h" | 18 | #include "ctcm_main.h" |
18 | 19 | ||
19 | /* | 20 | /* |
diff --git a/drivers/s390/net/fsm.c b/drivers/s390/net/fsm.c index cae48cbc5e96..e5dea67f902e 100644 --- a/drivers/s390/net/fsm.c +++ b/drivers/s390/net/fsm.c | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #include "fsm.h" | 6 | #include "fsm.h" |
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/timer.h> | 9 | #include <linux/timer.h> |
9 | 10 | ||
10 | MODULE_AUTHOR("(C) 2000 IBM Corp. by Fritz Elfert (felfert@millenux.com)"); | 11 | MODULE_AUTHOR("(C) 2000 IBM Corp. by Fritz Elfert (felfert@millenux.com)"); |
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index f6cc46dc0501..9b19ea13b4d8 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/igmp.h> | 37 | #include <linux/igmp.h> |
38 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
39 | #include <linux/kthread.h> | 39 | #include <linux/kthread.h> |
40 | #include <linux/slab.h> | ||
40 | #include <net/arp.h> | 41 | #include <net/arp.h> |
41 | #include <net/ip.h> | 42 | #include <net/ip.h> |
42 | 43 | ||
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 3bd4206f3470..3ba738b2e271 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/tcp.h> | 20 | #include <linux/tcp.h> |
21 | #include <linux/mii.h> | 21 | #include <linux/mii.h> |
22 | #include <linux/kthread.h> | 22 | #include <linux/kthread.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <asm/ebcdic.h> | 25 | #include <asm/ebcdic.h> |
25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 945f3e0a9f06..904b1f3567b4 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/etherdevice.h> | 20 | #include <linux/etherdevice.h> |
20 | #include <linux/mii.h> | 21 | #include <linux/mii.h> |
21 | #include <linux/ip.h> | 22 | #include <linux/ip.h> |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 0b06f065b18b..35b6d3d2bd73 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/ipv6.h> | 22 | #include <linux/ipv6.h> |
23 | #include <linux/inetdevice.h> | 23 | #include <linux/inetdevice.h> |
24 | #include <linux/igmp.h> | 24 | #include <linux/igmp.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <net/ip.h> | 27 | #include <net/ip.h> |
27 | #include <net/arp.h> | 28 | #include <net/arp.h> |
diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c index 3f08b11274ae..25b3e7aae44f 100644 --- a/drivers/s390/net/qeth_l3_sys.c +++ b/drivers/s390/net/qeth_l3_sys.c | |||
@@ -8,6 +8,8 @@ | |||
8 | * Frank Blaschka <frank.blaschka@de.ibm.com> | 8 | * Frank Blaschka <frank.blaschka@de.ibm.com> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/slab.h> | ||
12 | |||
11 | #include "qeth_l3.h" | 13 | #include "qeth_l3.h" |
12 | 14 | ||
13 | #define QETH_DEVICE_ATTR(_id, _name, _mode, _show, _store) \ | 15 | #define QETH_DEVICE_ATTR(_id, _name, _mode, _show, _store) \ |
diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c index ecef1edee701..70491274da16 100644 --- a/drivers/s390/net/smsgiucv.c +++ b/drivers/s390/net/smsgiucv.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
26 | #include <linux/device.h> | 26 | #include <linux/device.h> |
27 | #include <linux/slab.h> | ||
27 | #include <net/iucv/iucv.h> | 28 | #include <net/iucv/iucv.h> |
28 | #include <asm/cpcmd.h> | 29 | #include <asm/cpcmd.h> |
29 | #include <asm/ebcdic.h> | 30 | #include <asm/ebcdic.h> |
diff --git a/drivers/s390/net/smsgiucv_app.c b/drivers/s390/net/smsgiucv_app.c index 91579dc6a2b0..137688790207 100644 --- a/drivers/s390/net/smsgiucv_app.c +++ b/drivers/s390/net/smsgiucv_app.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
19 | #include <linux/kobject.h> | 19 | #include <linux/kobject.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
22 | #include <linux/workqueue.h> | 23 | #include <linux/workqueue.h> |
23 | #include <net/iucv/iucv.h> | 24 | #include <net/iucv/iucv.h> |
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 66d6c01fcf3e..1e6183a86ce5 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <linux/miscdevice.h> | 31 | #include <linux/miscdevice.h> |
32 | #include <linux/seq_file.h> | 32 | #include <linux/seq_file.h> |
33 | #include <linux/slab.h> | ||
33 | #include "zfcp_ext.h" | 34 | #include "zfcp_ext.h" |
34 | #include "zfcp_fc.h" | 35 | #include "zfcp_fc.h" |
35 | #include "zfcp_reqlist.h" | 36 | #include "zfcp_reqlist.h" |
diff --git a/drivers/s390/scsi/zfcp_cfdc.c b/drivers/s390/scsi/zfcp_cfdc.c index 0eb6eefd2c1a..25d9e0ae9c57 100644 --- a/drivers/s390/scsi/zfcp_cfdc.c +++ b/drivers/s390/scsi/zfcp_cfdc.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #define KMSG_COMPONENT "zfcp" | 10 | #define KMSG_COMPONENT "zfcp" |
11 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 11 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
12 | 12 | ||
13 | #include <linux/slab.h> | ||
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
14 | #include <linux/miscdevice.h> | 15 | #include <linux/miscdevice.h> |
15 | #include <asm/compat.h> | 16 | #include <asm/compat.h> |
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index 7a149fd85f6d..075852f6968c 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 10 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
11 | 11 | ||
12 | #include <linux/ctype.h> | 12 | #include <linux/ctype.h> |
13 | #include <linux/slab.h> | ||
13 | #include <asm/debug.h> | 14 | #include <asm/debug.h> |
14 | #include "zfcp_dbf.h" | 15 | #include "zfcp_dbf.h" |
15 | #include "zfcp_ext.h" | 16 | #include "zfcp_ext.h" |
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 5219670f0c99..2a1cbb74b99b 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 10 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/slab.h> | ||
13 | #include <scsi/fc/fc_els.h> | 14 | #include <scsi/fc/fc_els.h> |
14 | #include <scsi/libfc.h> | 15 | #include <scsi/libfc.h> |
15 | #include "zfcp_ext.h" | 16 | #include "zfcp_ext.h" |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 6538742b421a..18564891ea61 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 10 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
11 | 11 | ||
12 | #include <linux/blktrace_api.h> | 12 | #include <linux/blktrace_api.h> |
13 | #include <linux/slab.h> | ||
13 | #include <scsi/fc/fc_els.h> | 14 | #include <scsi/fc/fc_els.h> |
14 | #include "zfcp_ext.h" | 15 | #include "zfcp_ext.h" |
15 | #include "zfcp_fc.h" | 16 | #include "zfcp_fc.h" |
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c index 6479273a3094..dbfa312a7f50 100644 --- a/drivers/s390/scsi/zfcp_qdio.c +++ b/drivers/s390/scsi/zfcp_qdio.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #define KMSG_COMPONENT "zfcp" | 9 | #define KMSG_COMPONENT "zfcp" |
10 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 10 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
12 | #include "zfcp_ext.h" | 13 | #include "zfcp_ext.h" |
13 | #include "zfcp_qdio.h" | 14 | #include "zfcp_qdio.h" |
14 | 15 | ||
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index c3c4178888af..174b6d57d576 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 10 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/slab.h> | ||
13 | #include <scsi/fc/fc_fcp.h> | 14 | #include <scsi/fc/fc_fcp.h> |
14 | #include <asm/atomic.h> | 15 | #include <asm/atomic.h> |
15 | #include "zfcp_ext.h" | 16 | #include "zfcp_ext.h" |
diff --git a/drivers/s390/scsi/zfcp_sysfs.c b/drivers/s390/scsi/zfcp_sysfs.c index a43035d4bd70..f5f60698dc4c 100644 --- a/drivers/s390/scsi/zfcp_sysfs.c +++ b/drivers/s390/scsi/zfcp_sysfs.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #define KMSG_COMPONENT "zfcp" | 9 | #define KMSG_COMPONENT "zfcp" |
10 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 10 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
12 | #include "zfcp_ext.h" | 13 | #include "zfcp_ext.h" |
13 | 14 | ||
14 | #define ZFCP_DEV_ATTR(_feat, _name, _mode, _show, _store) \ | 15 | #define ZFCP_DEV_ATTR(_feat, _name, _mode, _show, _store) \ |
diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c index 28d86f9df83c..b4951eb0358e 100644 --- a/drivers/sbus/char/bbc_envctrl.c +++ b/drivers/sbus/char/bbc_envctrl.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/kmod.h> | 8 | #include <linux/kmod.h> |
9 | #include <linux/reboot.h> | 9 | #include <linux/reboot.h> |
10 | #include <linux/of.h> | 10 | #include <linux/of.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/of_device.h> | 12 | #include <linux/of_device.h> |
12 | #include <asm/oplib.h> | 13 | #include <asm/oplib.h> |
13 | 14 | ||
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index 4431578d8c45..3e59189f4137 100644 --- a/drivers/sbus/char/display7seg.c +++ b/drivers/sbus/char/display7seg.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/miscdevice.h> | 13 | #include <linux/miscdevice.h> |
14 | #include <linux/ioport.h> /* request_region */ | 14 | #include <linux/ioport.h> /* request_region */ |
15 | #include <linux/slab.h> | ||
15 | #include <linux/smp_lock.h> | 16 | #include <linux/smp_lock.h> |
16 | #include <linux/of.h> | 17 | #include <linux/of.h> |
17 | #include <linux/of_device.h> | 18 | #include <linux/of_device.h> |
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index aa2b60a868ba..c6e2eff19409 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/miscdevice.h> | 26 | #include <linux/miscdevice.h> |
27 | #include <linux/kmod.h> | 27 | #include <linux/kmod.h> |
28 | #include <linux/reboot.h> | 28 | #include <linux/reboot.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/smp_lock.h> | 30 | #include <linux/smp_lock.h> |
30 | #include <linux/of.h> | 31 | #include <linux/of.h> |
31 | #include <linux/of_device.h> | 32 | #include <linux/of_device.h> |
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index 41083472ff4f..19f255b97c86 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c | |||
@@ -7,7 +7,6 @@ | |||
7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/miscdevice.h> | 9 | #include <linux/miscdevice.h> |
10 | #include <linux/slab.h> | ||
11 | #include <linux/fcntl.h> | 10 | #include <linux/fcntl.h> |
12 | #include <linux/poll.h> | 11 | #include <linux/poll.h> |
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c index 869a30b49edc..4942050dc5b6 100644 --- a/drivers/sbus/char/jsflash.c +++ b/drivers/sbus/char/jsflash.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
33 | #include <linux/miscdevice.h> | 33 | #include <linux/miscdevice.h> |
34 | #include <linux/slab.h> | ||
35 | #include <linux/fcntl.h> | 34 | #include <linux/fcntl.h> |
36 | #include <linux/poll.h> | 35 | #include <linux/poll.h> |
37 | #include <linux/init.h> | 36 | #include <linux/init.h> |
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index 84d3bbaa95e7..e9788f55ab13 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c | |||
@@ -91,6 +91,7 @@ | |||
91 | #include <linux/time.h> | 91 | #include <linux/time.h> |
92 | #include <linux/mutex.h> | 92 | #include <linux/mutex.h> |
93 | #include <linux/smp_lock.h> | 93 | #include <linux/smp_lock.h> |
94 | #include <linux/slab.h> | ||
94 | #include <asm/io.h> | 95 | #include <asm/io.h> |
95 | #include <asm/irq.h> | 96 | #include <asm/irq.h> |
96 | #include <asm/uaccess.h> | 97 | #include <asm/uaccess.h> |
diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c index 4d314d740de4..54c5ffb1eaa1 100644 --- a/drivers/scsi/3w-sas.c +++ b/drivers/scsi/3w-sas.c | |||
@@ -65,6 +65,7 @@ | |||
65 | #include <linux/time.h> | 65 | #include <linux/time.h> |
66 | #include <linux/mutex.h> | 66 | #include <linux/mutex.h> |
67 | #include <linux/smp_lock.h> | 67 | #include <linux/smp_lock.h> |
68 | #include <linux/slab.h> | ||
68 | #include <asm/io.h> | 69 | #include <asm/io.h> |
69 | #include <asm/irq.h> | 70 | #include <asm/irq.h> |
70 | #include <asm/uaccess.h> | 71 | #include <asm/uaccess.h> |
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index f65a1e92340c..5faf903ca8c8 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c | |||
@@ -205,6 +205,7 @@ | |||
205 | #include <linux/errno.h> | 205 | #include <linux/errno.h> |
206 | #include <linux/types.h> | 206 | #include <linux/types.h> |
207 | #include <linux/delay.h> | 207 | #include <linux/delay.h> |
208 | #include <linux/gfp.h> | ||
208 | #include <linux/pci.h> | 209 | #include <linux/pci.h> |
209 | #include <linux/time.h> | 210 | #include <linux/time.h> |
210 | #include <linux/mutex.h> | 211 | #include <linux/mutex.h> |
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 9f4a911a6d8c..80dc3ac12cde 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c | |||
@@ -117,6 +117,7 @@ | |||
117 | #include <linux/kernel.h> | 117 | #include <linux/kernel.h> |
118 | #include <linux/types.h> | 118 | #include <linux/types.h> |
119 | #include <linux/string.h> | 119 | #include <linux/string.h> |
120 | #include <linux/slab.h> | ||
120 | #include <linux/ioport.h> | 121 | #include <linux/ioport.h> |
121 | #include <linux/delay.h> | 122 | #include <linux/delay.h> |
122 | #include <linux/spinlock.h> | 123 | #include <linux/spinlock.h> |
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 1ddcf4031d4c..fc0b4b81d552 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/spinlock.h> | 42 | #include <linux/spinlock.h> |
43 | #include <linux/jiffies.h> | 43 | #include <linux/jiffies.h> |
44 | #include <linux/dma-mapping.h> | 44 | #include <linux/dma-mapping.h> |
45 | #include <linux/slab.h> | ||
45 | #include <scsi/scsicam.h> | 46 | #include <scsi/scsicam.h> |
46 | 47 | ||
47 | #include <asm/dma.h> | 48 | #include <asm/dma.h> |
diff --git a/drivers/scsi/NCR_D700.c b/drivers/scsi/NCR_D700.c index 1cdf09a4779a..8647256ad66d 100644 --- a/drivers/scsi/NCR_D700.c +++ b/drivers/scsi/NCR_D700.c | |||
@@ -97,6 +97,7 @@ | |||
97 | #include <linux/kernel.h> | 97 | #include <linux/kernel.h> |
98 | #include <linux/module.h> | 98 | #include <linux/module.h> |
99 | #include <linux/mca.h> | 99 | #include <linux/mca.h> |
100 | #include <linux/slab.h> | ||
100 | #include <asm/io.h> | 101 | #include <asm/io.h> |
101 | #include <scsi/scsi_host.h> | 102 | #include <scsi/scsi_host.h> |
102 | #include <scsi/scsi_device.h> | 103 | #include <scsi/scsi_device.h> |
diff --git a/drivers/scsi/NCR_Q720.c b/drivers/scsi/NCR_Q720.c index a8bbdc2273b8..afdbb9addf18 100644 --- a/drivers/scsi/NCR_Q720.c +++ b/drivers/scsi/NCR_Q720.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/mca.h> | 12 | #include <linux/mca.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c index ff5716d5f044..dbbc601948e5 100644 --- a/drivers/scsi/a100u2w.c +++ b/drivers/scsi/a100u2w.c | |||
@@ -69,7 +69,6 @@ | |||
69 | #include <linux/kernel.h> | 69 | #include <linux/kernel.h> |
70 | #include <linux/string.h> | 70 | #include <linux/string.h> |
71 | #include <linux/ioport.h> | 71 | #include <linux/ioport.h> |
72 | #include <linux/slab.h> | ||
73 | #include <linux/dma-mapping.h> | 72 | #include <linux/dma-mapping.h> |
74 | 73 | ||
75 | #include <asm/io.h> | 74 | #include <asm/io.h> |
diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c index 4b38c4750f77..d8fe5b76fee0 100644 --- a/drivers/scsi/a2091.c +++ b/drivers/scsi/a2091.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/types.h> | 1 | #include <linux/types.h> |
2 | #include <linux/mm.h> | 2 | #include <linux/mm.h> |
3 | #include <linux/slab.h> | ||
3 | #include <linux/blkdev.h> | 4 | #include <linux/blkdev.h> |
4 | #include <linux/init.h> | 5 | #include <linux/init.h> |
5 | #include <linux/interrupt.h> | 6 | #include <linux/interrupt.h> |
diff --git a/drivers/scsi/a3000.c b/drivers/scsi/a3000.c index 6970ce82c4ac..c35fc55f1c96 100644 --- a/drivers/scsi/a3000.c +++ b/drivers/scsi/a3000.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/types.h> | 1 | #include <linux/types.h> |
2 | #include <linux/mm.h> | 2 | #include <linux/mm.h> |
3 | #include <linux/slab.h> | ||
3 | #include <linux/blkdev.h> | 4 | #include <linux/blkdev.h> |
4 | #include <linux/ioport.h> | 5 | #include <linux/ioport.h> |
5 | #include <linux/init.h> | 6 | #include <linux/init.h> |
diff --git a/drivers/scsi/a4000t.c b/drivers/scsi/a4000t.c index e3519fa5a3ba..11ae6be8aeaf 100644 --- a/drivers/scsi/a4000t.c +++ b/drivers/scsi/a4000t.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/slab.h> | ||
15 | #include <asm/amigahw.h> | 16 | #include <asm/amigahw.h> |
16 | #include <asm/amigaints.h> | 17 | #include <asm/amigaints.h> |
17 | #include <scsi/scsi_host.h> | 18 | #include <scsi/scsi_host.h> |
diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c index f70d9f8e79e5..04057ab72a8b 100644 --- a/drivers/scsi/aacraid/rx.c +++ b/drivers/scsi/aacraid/rx.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
34 | #include <linux/pci.h> | 34 | #include <linux/pci.h> |
35 | #include <linux/spinlock.h> | 35 | #include <linux/spinlock.h> |
36 | #include <linux/slab.h> | ||
37 | #include <linux/blkdev.h> | 36 | #include <linux/blkdev.h> |
38 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
39 | #include <linux/completion.h> | 38 | #include <linux/completion.h> |
diff --git a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c index b6a3c5c187b6..622c21c68e65 100644 --- a/drivers/scsi/aacraid/sa.c +++ b/drivers/scsi/aacraid/sa.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
34 | #include <linux/pci.h> | 34 | #include <linux/pci.h> |
35 | #include <linux/spinlock.h> | 35 | #include <linux/spinlock.h> |
36 | #include <linux/slab.h> | ||
37 | #include <linux/blkdev.h> | 36 | #include <linux/blkdev.h> |
38 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
39 | #include <linux/completion.h> | 38 | #include <linux/completion.h> |
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 22626abdb630..9201afe65609 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
@@ -4781,12 +4781,14 @@ static ushort AscInitAsc1000Driver(ASC_DVC_VAR *asc_dvc) | |||
4781 | if (err) { | 4781 | if (err) { |
4782 | printk(KERN_ERR "Failed to load image \"%s\" err %d\n", | 4782 | printk(KERN_ERR "Failed to load image \"%s\" err %d\n", |
4783 | fwname, err); | 4783 | fwname, err); |
4784 | asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM; | ||
4784 | return err; | 4785 | return err; |
4785 | } | 4786 | } |
4786 | if (fw->size < 4) { | 4787 | if (fw->size < 4) { |
4787 | printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", | 4788 | printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", |
4788 | fw->size, fwname); | 4789 | fw->size, fwname); |
4789 | release_firmware(fw); | 4790 | release_firmware(fw); |
4791 | asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM; | ||
4790 | return -EINVAL; | 4792 | return -EINVAL; |
4791 | } | 4793 | } |
4792 | chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | | 4794 | chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | |
@@ -5110,12 +5112,14 @@ static int AdvInitAsc3550Driver(ADV_DVC_VAR *asc_dvc) | |||
5110 | if (err) { | 5112 | if (err) { |
5111 | printk(KERN_ERR "Failed to load image \"%s\" err %d\n", | 5113 | printk(KERN_ERR "Failed to load image \"%s\" err %d\n", |
5112 | fwname, err); | 5114 | fwname, err); |
5115 | asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM; | ||
5113 | return err; | 5116 | return err; |
5114 | } | 5117 | } |
5115 | if (fw->size < 4) { | 5118 | if (fw->size < 4) { |
5116 | printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", | 5119 | printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", |
5117 | fw->size, fwname); | 5120 | fw->size, fwname); |
5118 | release_firmware(fw); | 5121 | release_firmware(fw); |
5122 | asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM; | ||
5119 | return -EINVAL; | 5123 | return -EINVAL; |
5120 | } | 5124 | } |
5121 | chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | | 5125 | chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | |
@@ -5624,12 +5628,14 @@ static int AdvInitAsc38C0800Driver(ADV_DVC_VAR *asc_dvc) | |||
5624 | if (err) { | 5628 | if (err) { |
5625 | printk(KERN_ERR "Failed to load image \"%s\" err %d\n", | 5629 | printk(KERN_ERR "Failed to load image \"%s\" err %d\n", |
5626 | fwname, err); | 5630 | fwname, err); |
5631 | asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM; | ||
5627 | return err; | 5632 | return err; |
5628 | } | 5633 | } |
5629 | if (fw->size < 4) { | 5634 | if (fw->size < 4) { |
5630 | printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", | 5635 | printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", |
5631 | fw->size, fwname); | 5636 | fw->size, fwname); |
5632 | release_firmware(fw); | 5637 | release_firmware(fw); |
5638 | asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM; | ||
5633 | return -EINVAL; | 5639 | return -EINVAL; |
5634 | } | 5640 | } |
5635 | chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | | 5641 | chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | |
@@ -6124,12 +6130,14 @@ static int AdvInitAsc38C1600Driver(ADV_DVC_VAR *asc_dvc) | |||
6124 | if (err) { | 6130 | if (err) { |
6125 | printk(KERN_ERR "Failed to load image \"%s\" err %d\n", | 6131 | printk(KERN_ERR "Failed to load image \"%s\" err %d\n", |
6126 | fwname, err); | 6132 | fwname, err); |
6133 | asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM; | ||
6127 | return err; | 6134 | return err; |
6128 | } | 6135 | } |
6129 | if (fw->size < 4) { | 6136 | if (fw->size < 4) { |
6130 | printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", | 6137 | printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", |
6131 | fw->size, fwname); | 6138 | fw->size, fwname); |
6132 | release_firmware(fw); | 6139 | release_firmware(fw); |
6140 | asc_dvc->err_code = ASC_IERR_MCODE_CHKSUM; | ||
6133 | return -EINVAL; | 6141 | return -EINVAL; |
6134 | } | 6142 | } |
6135 | chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | | 6143 | chksum = (fw->data[3] << 24) | (fw->data[2] << 16) | |
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index 1e5478abd90e..8eab8587ff21 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c | |||
@@ -254,6 +254,7 @@ | |||
254 | #include <linux/spinlock.h> | 254 | #include <linux/spinlock.h> |
255 | #include <linux/workqueue.h> | 255 | #include <linux/workqueue.h> |
256 | #include <linux/list.h> | 256 | #include <linux/list.h> |
257 | #include <linux/slab.h> | ||
257 | #include <scsi/scsicam.h> | 258 | #include <scsi/scsicam.h> |
258 | 259 | ||
259 | #include "scsi.h" | 260 | #include "scsi.h" |
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c index 80594947c6f6..2a8cf137f609 100644 --- a/drivers/scsi/aha1542.c +++ b/drivers/scsi/aha1542.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/blkdev.h> | 39 | #include <linux/blkdev.h> |
40 | #include <linux/mca.h> | 40 | #include <linux/mca.h> |
41 | #include <linux/mca-legacy.h> | 41 | #include <linux/mca-legacy.h> |
42 | #include <linux/slab.h> | ||
42 | 43 | ||
43 | #include <asm/dma.h> | 44 | #include <asm/dma.h> |
44 | #include <asm/system.h> | 45 | #include <asm/system.h> |
diff --git a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c index 538135783aab..0107a4cc3331 100644 --- a/drivers/scsi/aha1740.c +++ b/drivers/scsi/aha1740.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/device.h> | 50 | #include <linux/device.h> |
51 | #include <linux/eisa.h> | 51 | #include <linux/eisa.h> |
52 | #include <linux/dma-mapping.h> | 52 | #include <linux/dma-mapping.h> |
53 | #include <linux/gfp.h> | ||
53 | 54 | ||
54 | #include <asm/dma.h> | 55 | #include <asm/dma.h> |
55 | #include <asm/system.h> | 56 | #include <asm/system.h> |
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 1222a7ac698a..4c41332a354b 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c | |||
@@ -53,6 +53,7 @@ static struct scsi_transport_template *ahd_linux_transport_template = NULL; | |||
53 | #include <linux/blkdev.h> /* For block_size() */ | 53 | #include <linux/blkdev.h> /* For block_size() */ |
54 | #include <linux/delay.h> /* For ssleep/msleep */ | 54 | #include <linux/delay.h> /* For ssleep/msleep */ |
55 | #include <linux/device.h> | 55 | #include <linux/device.h> |
56 | #include <linux/slab.h> | ||
56 | 57 | ||
57 | /* | 58 | /* |
58 | * Bucket size for counting good commands in between bad ones. | 59 | * Bucket size for counting good commands in between bad ones. |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 8cb05dc8e6a1..5e42dac23505 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c | |||
@@ -129,6 +129,7 @@ static struct scsi_transport_template *ahc_linux_transport_template = NULL; | |||
129 | #include <linux/mm.h> /* For fetching system memory size */ | 129 | #include <linux/mm.h> /* For fetching system memory size */ |
130 | #include <linux/blkdev.h> /* For block_size() */ | 130 | #include <linux/blkdev.h> /* For block_size() */ |
131 | #include <linux/delay.h> /* For ssleep/msleep */ | 131 | #include <linux/delay.h> /* For ssleep/msleep */ |
132 | #include <linux/slab.h> | ||
132 | 133 | ||
133 | 134 | ||
134 | /* | 135 | /* |
diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c index eb9dc3195fdf..81b736c76fff 100644 --- a/drivers/scsi/aic94xx/aic94xx_hwi.c +++ b/drivers/scsi/aic94xx/aic94xx_hwi.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
29 | #include <linux/module.h> | 30 | #include <linux/module.h> |
30 | #include <linux/firmware.h> | 31 | #include <linux/firmware.h> |
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 996f7224f90e..24ac2315c5c7 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/firmware.h> | 32 | #include <linux/firmware.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include <scsi/scsi_host.h> | 35 | #include <scsi/scsi_host.h> |
35 | 36 | ||
diff --git a/drivers/scsi/aic94xx/aic94xx_scb.c b/drivers/scsi/aic94xx/aic94xx_scb.c index ca55013b6ae5..c43698b1cb64 100644 --- a/drivers/scsi/aic94xx/aic94xx_scb.c +++ b/drivers/scsi/aic94xx/aic94xx_scb.c | |||
@@ -24,6 +24,7 @@ | |||
24 | * | 24 | * |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/gfp.h> | ||
27 | #include <scsi/scsi_host.h> | 28 | #include <scsi/scsi_host.h> |
28 | 29 | ||
29 | #include "aic94xx.h" | 30 | #include "aic94xx.h" |
diff --git a/drivers/scsi/aic94xx/aic94xx_sds.c b/drivers/scsi/aic94xx/aic94xx_sds.c index 8630a75b2872..edb43fda9f36 100644 --- a/drivers/scsi/aic94xx/aic94xx_sds.c +++ b/drivers/scsi/aic94xx/aic94xx_sds.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
30 | 31 | ||
31 | #include "aic94xx.h" | 32 | #include "aic94xx.h" |
diff --git a/drivers/scsi/aic94xx/aic94xx_seq.c b/drivers/scsi/aic94xx/aic94xx_seq.c index 8f98e33155e9..d01dcc62b39a 100644 --- a/drivers/scsi/aic94xx/aic94xx_seq.c +++ b/drivers/scsi/aic94xx/aic94xx_seq.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/gfp.h> | ||
30 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
31 | #include <linux/module.h> | 32 | #include <linux/module.h> |
32 | #include <linux/firmware.h> | 33 | #include <linux/firmware.h> |
diff --git a/drivers/scsi/aic94xx/aic94xx_tmf.c b/drivers/scsi/aic94xx/aic94xx_tmf.c index 78eb86fc6276..0add73bdf2a4 100644 --- a/drivers/scsi/aic94xx/aic94xx_tmf.c +++ b/drivers/scsi/aic94xx/aic94xx_tmf.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <linux/gfp.h> | ||
28 | #include "aic94xx.h" | 29 | #include "aic94xx.h" |
29 | #include "aic94xx_sas.h" | 30 | #include "aic94xx_sas.h" |
30 | #include "aic94xx_hwi.h" | 31 | #include "aic94xx_hwi.h" |
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 47d5d19f8c92..ffbe2192da3c 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/timer.h> | 58 | #include <linux/timer.h> |
59 | #include <linux/pci.h> | 59 | #include <linux/pci.h> |
60 | #include <linux/aer.h> | 60 | #include <linux/aer.h> |
61 | #include <linux/slab.h> | ||
61 | #include <asm/dma.h> | 62 | #include <asm/dma.h> |
62 | #include <asm/io.h> | 63 | #include <asm/io.h> |
63 | #include <asm/system.h> | 64 | #include <asm/system.h> |
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c index 4240b05aef6d..158ebc3644d8 100644 --- a/drivers/scsi/atari_NCR5380.c +++ b/drivers/scsi/atari_NCR5380.c | |||
@@ -651,6 +651,7 @@ static inline void NCR5380_print_phase(struct Scsi_Host *instance) | |||
651 | * interrupt or bottom half. | 651 | * interrupt or bottom half. |
652 | */ | 652 | */ |
653 | 653 | ||
654 | #include <linux/gfp.h> | ||
654 | #include <linux/workqueue.h> | 655 | #include <linux/workqueue.h> |
655 | #include <linux/interrupt.h> | 656 | #include <linux/interrupt.h> |
656 | 657 | ||
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c index b137e561f5bc..ab5bdda6903e 100644 --- a/drivers/scsi/atp870u.c +++ b/drivers/scsi/atp870u.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/blkdev.h> | 30 | #include <linux/blkdev.h> |
31 | #include <linux/dma-mapping.h> | 31 | #include <linux/dma-mapping.h> |
32 | #include <linux/slab.h> | ||
32 | #include <asm/system.h> | 33 | #include <asm/system.h> |
33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
34 | 35 | ||
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index fcfb29e02d8a..dd5b105f8f47 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | #include <linux/reboot.h> | 20 | #include <linux/reboot.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
23 | #include <linux/blkdev.h> | 24 | #include <linux/blkdev.h> |
24 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index 6bff08ea4029..13f5feb308c2 100644 --- a/drivers/scsi/bfa/bfad.c +++ b/drivers/scsi/bfa/bfad.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * bfad.c Linux driver PCI interface module. | 19 | * bfad.c Linux driver PCI interface module. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/slab.h> | ||
22 | #include <linux/module.h> | 23 | #include <linux/module.h> |
23 | #include <linux/kthread.h> | 24 | #include <linux/kthread.h> |
24 | #include "bfad_drv.h" | 25 | #include "bfad_drv.h" |
diff --git a/drivers/scsi/bfa/bfad_attr.c b/drivers/scsi/bfa/bfad_attr.c index d97f69191838..6a2efdd5ef24 100644 --- a/drivers/scsi/bfa/bfad_attr.c +++ b/drivers/scsi/bfa/bfad_attr.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * bfa_attr.c Linux driver configuration interface module. | 19 | * bfa_attr.c Linux driver configuration interface module. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/slab.h> | ||
22 | #include "bfad_drv.h" | 23 | #include "bfad_drv.h" |
23 | #include "bfad_im.h" | 24 | #include "bfad_im.h" |
24 | #include "bfad_trcmod.h" | 25 | #include "bfad_trcmod.h" |
diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index f9fc67a25bf2..78f42aa57369 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * bfad_im.c Linux driver IM module. | 19 | * bfad_im.c Linux driver IM module. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/slab.h> | ||
22 | #include "bfad_drv.h" | 23 | #include "bfad_drv.h" |
23 | #include "bfad_im.h" | 24 | #include "bfad_im.h" |
24 | #include "bfad_trcmod.h" | 25 | #include "bfad_trcmod.h" |
diff --git a/drivers/scsi/bfa/rport.c b/drivers/scsi/bfa/rport.c index 8e73dd9a625a..7b096f2e3836 100644 --- a/drivers/scsi/bfa/rport.c +++ b/drivers/scsi/bfa/rport.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * rport.c Remote port implementation. | 19 | * rport.c Remote port implementation. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/slab.h> | ||
22 | #include <bfa.h> | 23 | #include <bfa.h> |
23 | #include <bfa_svc.h> | 24 | #include <bfa_svc.h> |
24 | #include "fcbuild.h" | 25 | #include "fcbuild.h" |
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c index 1af578dec276..18352ff82101 100644 --- a/drivers/scsi/bnx2i/bnx2i_hwi.c +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * Written by: Anil Veerabhadrappa (anilgv@broadcom.com) | 11 | * Written by: Anil Veerabhadrappa (anilgv@broadcom.com) |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/gfp.h> | ||
14 | #include <scsi/scsi_tcq.h> | 15 | #include <scsi/scsi_tcq.h> |
15 | #include <scsi/libiscsi.h> | 16 | #include <scsi/libiscsi.h> |
16 | #include "bnx2i.h" | 17 | #include "bnx2i.h" |
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c index cb71dc984797..f2e9b18fe76c 100644 --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * Written by: Anil Veerabhadrappa (anilgv@broadcom.com) | 12 | * Written by: Anil Veerabhadrappa (anilgv@broadcom.com) |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/slab.h> | ||
15 | #include <scsi/scsi_tcq.h> | 16 | #include <scsi/scsi_tcq.h> |
16 | #include <scsi/libiscsi.h> | 17 | #include <scsi/libiscsi.h> |
17 | #include "bnx2i.h" | 18 | #include "bnx2i.h" |
diff --git a/drivers/scsi/bvme6000_scsi.c b/drivers/scsi/bvme6000_scsi.c index 5799cb5cba6b..d40ea2f5be10 100644 --- a/drivers/scsi/bvme6000_scsi.c +++ b/drivers/scsi/bvme6000_scsi.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/slab.h> | ||
15 | #include <asm/bvme6000hw.h> | 16 | #include <asm/bvme6000hw.h> |
16 | #include <scsi/scsi_host.h> | 17 | #include <scsi/scsi_host.h> |
17 | #include <scsi/scsi_device.h> | 18 | #include <scsi/scsi_device.h> |
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c index fe11c1d4b31d..4799d4391203 100644 --- a/drivers/scsi/ch.c +++ b/drivers/scsi/ch.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/idr.h> | 24 | #include <linux/idr.h> |
25 | #include <linux/smp_lock.h> | 25 | #include <linux/smp_lock.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <scsi/scsi.h> | 28 | #include <scsi/scsi.h> |
28 | #include <scsi/scsi_cmnd.h> | 29 | #include <scsi/scsi_cmnd.h> |
diff --git a/drivers/scsi/cxgb3i/cxgb3i_ddp.c b/drivers/scsi/cxgb3i/cxgb3i_ddp.c index 344fd53b9954..b58d9134ac1b 100644 --- a/drivers/scsi/cxgb3i/cxgb3i_ddp.c +++ b/drivers/scsi/cxgb3i/cxgb3i_ddp.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * Written by: Karen Xie (kxie@chelsio.com) | 10 | * Written by: Karen Xie (kxie@chelsio.com) |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/slab.h> | ||
13 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
14 | #include <linux/scatterlist.h> | 15 | #include <linux/scatterlist.h> |
15 | 16 | ||
diff --git a/drivers/scsi/cxgb3i/cxgb3i_ddp.h b/drivers/scsi/cxgb3i/cxgb3i_ddp.h index 87dd56b422bf..6761b329124d 100644 --- a/drivers/scsi/cxgb3i/cxgb3i_ddp.h +++ b/drivers/scsi/cxgb3i/cxgb3i_ddp.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #ifndef __CXGB3I_ULP2_DDP_H__ | 13 | #ifndef __CXGB3I_ULP2_DDP_H__ |
14 | #define __CXGB3I_ULP2_DDP_H__ | 14 | #define __CXGB3I_ULP2_DDP_H__ |
15 | 15 | ||
16 | #include <linux/slab.h> | ||
16 | #include <linux/vmalloc.h> | 17 | #include <linux/vmalloc.h> |
17 | 18 | ||
18 | /** | 19 | /** |
diff --git a/drivers/scsi/cxgb3i/cxgb3i_iscsi.c b/drivers/scsi/cxgb3i/cxgb3i_iscsi.c index b7c30585dadd..7b686abaae64 100644 --- a/drivers/scsi/cxgb3i/cxgb3i_iscsi.c +++ b/drivers/scsi/cxgb3i/cxgb3i_iscsi.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/inet.h> | 14 | #include <linux/inet.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/crypto.h> | 16 | #include <linux/crypto.h> |
16 | #include <linux/if_vlan.h> | 17 | #include <linux/if_vlan.h> |
17 | #include <net/dst.h> | 18 | #include <net/dst.h> |
diff --git a/drivers/scsi/cxgb3i/cxgb3i_offload.c b/drivers/scsi/cxgb3i/cxgb3i_offload.c index 3e08c430ff29..a175be9c496f 100644 --- a/drivers/scsi/cxgb3i/cxgb3i_offload.c +++ b/drivers/scsi/cxgb3i/cxgb3i_offload.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/if_vlan.h> | 15 | #include <linux/if_vlan.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/version.h> | 17 | #include <linux/version.h> |
17 | 18 | ||
18 | #include "cxgb3_defs.h" | 19 | #include "cxgb3_defs.h" |
diff --git a/drivers/scsi/cxgb3i/cxgb3i_pdu.c b/drivers/scsi/cxgb3i/cxgb3i_pdu.c index 9c38539557fc..dc5e3e77a351 100644 --- a/drivers/scsi/cxgb3i/cxgb3i_pdu.c +++ b/drivers/scsi/cxgb3i/cxgb3i_pdu.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * Written by: Karen Xie (kxie@chelsio.com) | 12 | * Written by: Karen Xie (kxie@chelsio.com) |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/slab.h> | ||
15 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
16 | #include <linux/crypto.h> | 17 | #include <linux/crypto.h> |
17 | #include <scsi/scsi_cmnd.h> | 18 | #include <scsi/scsi_cmnd.h> |
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 6c59c02c1ed9..bd977be7544e 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <linux/pci.h> | 57 | #include <linux/pci.h> |
58 | #include <linux/list.h> | 58 | #include <linux/list.h> |
59 | #include <linux/vmalloc.h> | 59 | #include <linux/vmalloc.h> |
60 | #include <linux/slab.h> | ||
60 | #include <asm/io.h> | 61 | #include <asm/io.h> |
61 | 62 | ||
62 | #include <scsi/scsi.h> | 63 | #include <scsi/scsi.h> |
diff --git a/drivers/scsi/device_handler/scsi_dh.c b/drivers/scsi/device_handler/scsi_dh.c index e19a1a55270c..6fae3d285ae7 100644 --- a/drivers/scsi/device_handler/scsi_dh.c +++ b/drivers/scsi/device_handler/scsi_dh.c | |||
@@ -21,6 +21,7 @@ | |||
21 | * Mike Anderson <andmike@linux.vnet.ibm.com> | 21 | * Mike Anderson <andmike@linux.vnet.ibm.com> |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/slab.h> | ||
24 | #include <scsi/scsi_dh.h> | 25 | #include <scsi/scsi_dh.h> |
25 | #include "../scsi_priv.h" | 26 | #include "../scsi_priv.h" |
26 | 27 | ||
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index bc9e94f5915e..1a970a76b1b9 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | #include <linux/slab.h> | ||
22 | #include <scsi/scsi.h> | 23 | #include <scsi/scsi.h> |
23 | #include <scsi/scsi_eh.h> | 24 | #include <scsi/scsi_eh.h> |
24 | #include <scsi/scsi_dh.h> | 25 | #include <scsi/scsi_dh.h> |
diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c index 63032ec3db92..e8a0bc3efd49 100644 --- a/drivers/scsi/device_handler/scsi_dh_emc.c +++ b/drivers/scsi/device_handler/scsi_dh_emc.c | |||
@@ -20,6 +20,7 @@ | |||
20 | * along with this program; see the file COPYING. If not, write to | 20 | * along with this program; see the file COPYING. If not, write to |
21 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 21 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | */ | 22 | */ |
23 | #include <linux/slab.h> | ||
23 | #include <scsi/scsi.h> | 24 | #include <scsi/scsi.h> |
24 | #include <scsi/scsi_eh.h> | 25 | #include <scsi/scsi_eh.h> |
25 | #include <scsi/scsi_dh.h> | 26 | #include <scsi/scsi_dh.h> |
diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c index 857fdd6032b2..e3916641e627 100644 --- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c +++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c | |||
@@ -21,6 +21,7 @@ | |||
21 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 21 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/slab.h> | ||
24 | #include <scsi/scsi.h> | 25 | #include <scsi/scsi.h> |
25 | #include <scsi/scsi_dbg.h> | 26 | #include <scsi/scsi_dbg.h> |
26 | #include <scsi/scsi_eh.h> | 27 | #include <scsi/scsi_eh.h> |
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c index 1a660191a905..5b683e429542 100644 --- a/drivers/scsi/device_handler/scsi_dh_rdac.c +++ b/drivers/scsi/device_handler/scsi_dh_rdac.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <scsi/scsi_eh.h> | 23 | #include <scsi/scsi_eh.h> |
24 | #include <scsi/scsi_dh.h> | 24 | #include <scsi/scsi_dh.h> |
25 | #include <linux/workqueue.h> | 25 | #include <linux/workqueue.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #define RDAC_NAME "rdac" | 28 | #define RDAC_NAME "rdac" |
28 | #define RDAC_RETRY_COUNT 5 | 29 | #define RDAC_RETRY_COUNT 5 |
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index 3c5abf7cd762..d1c31378f6da 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c | |||
@@ -490,6 +490,7 @@ | |||
490 | #include <linux/ctype.h> | 490 | #include <linux/ctype.h> |
491 | #include <linux/spinlock.h> | 491 | #include <linux/spinlock.h> |
492 | #include <linux/dma-mapping.h> | 492 | #include <linux/dma-mapping.h> |
493 | #include <linux/slab.h> | ||
493 | #include <asm/byteorder.h> | 494 | #include <asm/byteorder.h> |
494 | #include <asm/dma.h> | 495 | #include <asm/dma.h> |
495 | #include <asm/io.h> | 496 | #include <asm/io.h> |
diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c index 152dd15db276..60886c19065e 100644 --- a/drivers/scsi/eata_pio.c +++ b/drivers/scsi/eata_pio.c | |||
@@ -50,7 +50,6 @@ | |||
50 | #include <linux/kernel.h> | 50 | #include <linux/kernel.h> |
51 | #include <linux/string.h> | 51 | #include <linux/string.h> |
52 | #include <linux/ioport.h> | 52 | #include <linux/ioport.h> |
53 | #include <linux/slab.h> | ||
54 | #include <linux/in.h> | 53 | #include <linux/in.h> |
55 | #include <linux/pci.h> | 54 | #include <linux/pci.h> |
56 | #include <linux/proc_fs.h> | 55 | #include <linux/proc_fs.h> |
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 37de40e01684..54c870b8c328 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/if_ether.h> | 26 | #include <linux/if_ether.h> |
27 | #include <linux/if_vlan.h> | 27 | #include <linux/if_vlan.h> |
28 | #include <linux/crc32.h> | 28 | #include <linux/crc32.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/cpu.h> | 30 | #include <linux/cpu.h> |
30 | #include <linux/fs.h> | 31 | #include <linux/fs.h> |
31 | #include <linux/sysfs.h> | 32 | #include <linux/sysfs.h> |
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index 511cb6b371ee..3440da48d169 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/if_vlan.h> | 31 | #include <linux/if_vlan.h> |
32 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
33 | #include <linux/bitops.h> | 33 | #include <linux/bitops.h> |
34 | #include <linux/slab.h> | ||
34 | #include <net/rtnetlink.h> | 35 | #include <net/rtnetlink.h> |
35 | 36 | ||
36 | #include <scsi/fc/fc_els.h> | 37 | #include <scsi/fc/fc_els.h> |
diff --git a/drivers/scsi/fd_mcs.c b/drivers/scsi/fd_mcs.c index 85bd54c77b50..2ad95aa8f585 100644 --- a/drivers/scsi/fd_mcs.c +++ b/drivers/scsi/fd_mcs.c | |||
@@ -88,6 +88,7 @@ | |||
88 | #include <linux/delay.h> | 88 | #include <linux/delay.h> |
89 | #include <linux/mca.h> | 89 | #include <linux/mca.h> |
90 | #include <linux/spinlock.h> | 90 | #include <linux/spinlock.h> |
91 | #include <linux/slab.h> | ||
91 | #include <scsi/scsicam.h> | 92 | #include <scsi/scsicam.h> |
92 | #include <linux/mca-legacy.h> | 93 | #include <linux/mca-legacy.h> |
93 | 94 | ||
diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c index 32eef66114c7..e296bcc57d5c 100644 --- a/drivers/scsi/fdomain.c +++ b/drivers/scsi/fdomain.c | |||
@@ -279,6 +279,7 @@ | |||
279 | #include <linux/stat.h> | 279 | #include <linux/stat.h> |
280 | #include <linux/delay.h> | 280 | #include <linux/delay.h> |
281 | #include <linux/io.h> | 281 | #include <linux/io.h> |
282 | #include <linux/slab.h> | ||
282 | #include <scsi/scsicam.h> | 283 | #include <scsi/scsicam.h> |
283 | 284 | ||
284 | #include <asm/system.h> | 285 | #include <asm/system.h> |
diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c index 54f8d0e5407f..5259888fbfb1 100644 --- a/drivers/scsi/fnic/fnic_fcs.c +++ b/drivers/scsi/fnic/fnic_fcs.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/skbuff.h> | 21 | #include <linux/skbuff.h> |
21 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
22 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index 507e26c1c29f..97b212570bcc 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/mempool.h> | 19 | #include <linux/mempool.h> |
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c index 65a39b0f6dc2..3cc47c6e1ada 100644 --- a/drivers/scsi/fnic/fnic_scsi.c +++ b/drivers/scsi/fnic/fnic_scsi.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/if_ether.h> | 26 | #include <linux/if_ether.h> |
27 | #include <linux/if_vlan.h> | 27 | #include <linux/if_vlan.h> |
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/gfp.h> | ||
29 | #include <scsi/scsi.h> | 30 | #include <scsi/scsi.h> |
30 | #include <scsi/scsi_host.h> | 31 | #include <scsi/scsi_host.h> |
31 | #include <scsi/scsi_device.h> | 32 | #include <scsi/scsi_device.h> |
diff --git a/drivers/scsi/fnic/vnic_dev.c b/drivers/scsi/fnic/vnic_dev.c index 566770645086..db710148d156 100644 --- a/drivers/scsi/fnic/vnic_dev.c +++ b/drivers/scsi/fnic/vnic_dev.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/if_ether.h> | 24 | #include <linux/if_ether.h> |
25 | #include <linux/slab.h> | ||
25 | #include "vnic_resource.h" | 26 | #include "vnic_resource.h" |
26 | #include "vnic_devcmd.h" | 27 | #include "vnic_devcmd.h" |
27 | #include "vnic_dev.h" | 28 | #include "vnic_dev.h" |
diff --git a/drivers/scsi/fnic/vnic_rq.c b/drivers/scsi/fnic/vnic_rq.c index bedd0d285630..fd2068f5ae16 100644 --- a/drivers/scsi/fnic/vnic_rq.c +++ b/drivers/scsi/fnic/vnic_rq.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/slab.h> | ||
23 | #include "vnic_dev.h" | 24 | #include "vnic_dev.h" |
24 | #include "vnic_rq.h" | 25 | #include "vnic_rq.h" |
25 | 26 | ||
diff --git a/drivers/scsi/fnic/vnic_wq.c b/drivers/scsi/fnic/vnic_wq.c index 1f9ea790d130..a414135460db 100644 --- a/drivers/scsi/fnic/vnic_wq.c +++ b/drivers/scsi/fnic/vnic_wq.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/slab.h> | ||
23 | #include "vnic_dev.h" | 24 | #include "vnic_dev.h" |
24 | #include "vnic_wq.h" | 25 | #include "vnic_wq.h" |
25 | 26 | ||
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index ba3c94c9c25f..35a4b3073ec3 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c | |||
@@ -121,6 +121,7 @@ | |||
121 | #include <linux/dma-mapping.h> | 121 | #include <linux/dma-mapping.h> |
122 | #include <linux/list.h> | 122 | #include <linux/list.h> |
123 | #include <linux/smp_lock.h> | 123 | #include <linux/smp_lock.h> |
124 | #include <linux/slab.h> | ||
124 | 125 | ||
125 | #ifdef GDTH_RTC | 126 | #ifdef GDTH_RTC |
126 | #include <linux/mc146818rtc.h> | 127 | #include <linux/mc146818rtc.h> |
diff --git a/drivers/scsi/gdth_proc.c b/drivers/scsi/gdth_proc.c index ffb2b21992ba..0572b9bf4bd6 100644 --- a/drivers/scsi/gdth_proc.c +++ b/drivers/scsi/gdth_proc.c | |||
@@ -3,6 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/completion.h> | 5 | #include <linux/completion.h> |
6 | #include <linux/slab.h> | ||
6 | 7 | ||
7 | int gdth_proc_info(struct Scsi_Host *host, char *buffer,char **start,off_t offset,int length, | 8 | int gdth_proc_info(struct Scsi_Host *host, char *buffer,char **start,off_t offset,int length, |
8 | int inout) | 9 | int inout) |
diff --git a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c index 5d1bf7e3d245..48f406850c65 100644 --- a/drivers/scsi/gvp11.c +++ b/drivers/scsi/gvp11.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/types.h> | 1 | #include <linux/types.h> |
2 | #include <linux/mm.h> | 2 | #include <linux/mm.h> |
3 | #include <linux/slab.h> | ||
3 | #include <linux/blkdev.h> | 4 | #include <linux/blkdev.h> |
4 | #include <linux/init.h> | 5 | #include <linux/init.h> |
5 | #include <linux/interrupt.h> | 6 | #include <linux/interrupt.h> |
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 09dbcb847b73..6660fa92ffa1 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/blkdev.h> | 25 | #include <linux/blkdev.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/kthread.h> | 28 | #include <linux/kthread.h> |
28 | #include <linux/string.h> | 29 | #include <linux/string.h> |
29 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index 4f0556571f80..645f7cdf21ab 100644 --- a/drivers/scsi/hptiop.c +++ b/drivers/scsi/hptiop.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/timer.h> | 26 | #include <linux/timer.h> |
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <linux/gfp.h> | ||
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
30 | #include <asm/div64.h> | 31 | #include <asm/div64.h> |
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 4e577e2fee38..c2eea711a5ce 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
30 | #include <linux/kthread.h> | 30 | #include <linux/kthread.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/of.h> | 32 | #include <linux/of.h> |
32 | #include <linux/pm.h> | 33 | #include <linux/pm.h> |
33 | #include <linux/stringify.h> | 34 | #include <linux/stringify.h> |
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index dc1bcbe3b176..ff5ec5ac1fb5 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c | |||
@@ -70,6 +70,7 @@ | |||
70 | #include <linux/moduleparam.h> | 70 | #include <linux/moduleparam.h> |
71 | #include <linux/dma-mapping.h> | 71 | #include <linux/dma-mapping.h> |
72 | #include <linux/delay.h> | 72 | #include <linux/delay.h> |
73 | #include <linux/slab.h> | ||
73 | #include <linux/of.h> | 74 | #include <linux/of.h> |
74 | #include <linux/pm.h> | 75 | #include <linux/pm.h> |
75 | #include <asm/firmware.h> | 76 | #include <asm/firmware.h> |
diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c index d5eaf9727109..e2056d517e99 100644 --- a/drivers/scsi/ibmvscsi/ibmvstgt.c +++ b/drivers/scsi/ibmvscsi/ibmvstgt.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/slab.h> | ||
26 | #include <scsi/scsi.h> | 27 | #include <scsi/scsi.h> |
27 | #include <scsi/scsi_host.h> | 28 | #include <scsi/scsi_host.h> |
28 | #include <scsi/scsi_transport_srp.h> | 29 | #include <scsi/scsi_transport_srp.h> |
diff --git a/drivers/scsi/ibmvscsi/rpa_vscsi.c b/drivers/scsi/ibmvscsi/rpa_vscsi.c index 63a30cbbf9de..a864ccc0a342 100644 --- a/drivers/scsi/ibmvscsi/rpa_vscsi.c +++ b/drivers/scsi/ibmvscsi/rpa_vscsi.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/iommu.h> | 32 | #include <asm/iommu.h> |
33 | #include <asm/hvcall.h> | 33 | #include <asm/hvcall.h> |
34 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
35 | #include <linux/gfp.h> | ||
35 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
36 | #include "ibmvscsi.h" | 37 | #include "ibmvscsi.h" |
37 | 38 | ||
diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c index c2a9a13d788f..4734ab0b3ff6 100644 --- a/drivers/scsi/imm.c +++ b/drivers/scsi/imm.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/parport.h> | 15 | #include <linux/parport.h> |
16 | #include <linux/workqueue.h> | 16 | #include <linux/workqueue.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/slab.h> | ||
18 | #include <asm/io.h> | 19 | #include <asm/io.h> |
19 | 20 | ||
20 | #include <scsi/scsi.h> | 21 | #include <scsi/scsi.h> |
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index c79cd98eb6bf..520461b9bc09 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -59,6 +59,7 @@ | |||
59 | #include <linux/types.h> | 59 | #include <linux/types.h> |
60 | #include <linux/errno.h> | 60 | #include <linux/errno.h> |
61 | #include <linux/kernel.h> | 61 | #include <linux/kernel.h> |
62 | #include <linux/slab.h> | ||
62 | #include <linux/ioport.h> | 63 | #include <linux/ioport.h> |
63 | #include <linux/delay.h> | 64 | #include <linux/delay.h> |
64 | #include <linux/pci.h> | 65 | #include <linux/pci.h> |
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 249053a9d4fa..0ee725ced511 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #include <linux/inet.h> | 30 | #include <linux/inet.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/file.h> | 32 | #include <linux/file.h> |
32 | #include <linux/blkdev.h> | 33 | #include <linux/blkdev.h> |
33 | #include <linux/crypto.h> | 34 | #include <linux/crypto.h> |
diff --git a/drivers/scsi/jazz_esp.c b/drivers/scsi/jazz_esp.c index b2d481dd3750..08e26d4e3731 100644 --- a/drivers/scsi/jazz_esp.c +++ b/drivers/scsi/jazz_esp.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/gfp.h> | ||
7 | #include <linux/types.h> | 8 | #include <linux/types.h> |
8 | #include <linux/module.h> | 9 | #include <linux/module.h> |
9 | #include <linux/init.h> | 10 | #include <linux/init.h> |
diff --git a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c index b3d31315ac32..23880f8fe7e4 100644 --- a/drivers/scsi/lasi700.c +++ b/drivers/scsi/lasi700.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/blkdev.h> | 40 | #include <linux/blkdev.h> |
41 | #include <linux/ioport.h> | 41 | #include <linux/ioport.h> |
42 | #include <linux/dma-mapping.h> | 42 | #include <linux/dma-mapping.h> |
43 | #include <linux/slab.h> | ||
43 | 44 | ||
44 | #include <asm/page.h> | 45 | #include <asm/page.h> |
45 | #include <asm/pgtable.h> | 46 | #include <asm/pgtable.h> |
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index 9b0a5192a965..1087a7f18e84 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c | |||
@@ -33,6 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/timer.h> | 35 | #include <linux/timer.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/err.h> | 37 | #include <linux/err.h> |
37 | #include <asm/unaligned.h> | 38 | #include <asm/unaligned.h> |
38 | 39 | ||
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 7f4364770e4a..e5df0d4db67e 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c | |||
@@ -24,7 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/timer.h> | 26 | #include <linux/timer.h> |
27 | #include <linux/gfp.h> | 27 | #include <linux/slab.h> |
28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
29 | 29 | ||
30 | #include <scsi/fc/fc_fc2.h> | 30 | #include <scsi/fc/fc_fc2.h> |
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 774e7ac837a5..17396c708b08 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/scatterlist.h> | 27 | #include <linux/scatterlist.h> |
28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
29 | #include <linux/crc32.h> | 29 | #include <linux/crc32.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <scsi/scsi_tcq.h> | 32 | #include <scsi/scsi_tcq.h> |
32 | #include <scsi/scsi.h> | 33 | #include <scsi/scsi.h> |
diff --git a/drivers/scsi/libfc/fc_frame.c b/drivers/scsi/libfc/fc_frame.c index 6da01c616964..981329a17c48 100644 --- a/drivers/scsi/libfc/fc_frame.c +++ b/drivers/scsi/libfc/fc_frame.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/skbuff.h> | 25 | #include <linux/skbuff.h> |
26 | #include <linux/crc32.h> | 26 | #include <linux/crc32.h> |
27 | #include <linux/gfp.h> | ||
27 | 28 | ||
28 | #include <scsi/fc_frame.h> | 29 | #include <scsi/fc_frame.h> |
29 | 30 | ||
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 7ec8ce75007c..d126ecfff704 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c | |||
@@ -88,6 +88,7 @@ | |||
88 | */ | 88 | */ |
89 | 89 | ||
90 | #include <linux/timer.h> | 90 | #include <linux/timer.h> |
91 | #include <linux/slab.h> | ||
91 | #include <asm/unaligned.h> | 92 | #include <asm/unaligned.h> |
92 | 93 | ||
93 | #include <scsi/fc/fc_gs.h> | 94 | #include <scsi/fc/fc_gs.h> |
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 97923bb07765..b37d0ff28b35 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/kernel.h> | 47 | #include <linux/kernel.h> |
48 | #include <linux/spinlock.h> | 48 | #include <linux/spinlock.h> |
49 | #include <linux/interrupt.h> | 49 | #include <linux/interrupt.h> |
50 | #include <linux/slab.h> | ||
50 | #include <linux/rcupdate.h> | 51 | #include <linux/rcupdate.h> |
51 | #include <linux/timer.h> | 52 | #include <linux/timer.h> |
52 | #include <linux/workqueue.h> | 53 | #include <linux/workqueue.h> |
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 685eaec53218..6d5ae4474bb3 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/kfifo.h> | 25 | #include <linux/kfifo.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/log2.h> | 27 | #include <linux/log2.h> |
28 | #include <linux/slab.h> | ||
28 | #include <asm/unaligned.h> | 29 | #include <asm/unaligned.h> |
29 | #include <net/tcp.h> | 30 | #include <net/tcp.h> |
30 | #include <scsi/scsi_cmnd.h> | 31 | #include <scsi/scsi_cmnd.h> |
@@ -3087,14 +3088,15 @@ static void iscsi_start_session_recovery(struct iscsi_session *session, | |||
3087 | session->state = ISCSI_STATE_TERMINATE; | 3088 | session->state = ISCSI_STATE_TERMINATE; |
3088 | else if (conn->stop_stage != STOP_CONN_RECOVER) | 3089 | else if (conn->stop_stage != STOP_CONN_RECOVER) |
3089 | session->state = ISCSI_STATE_IN_RECOVERY; | 3090 | session->state = ISCSI_STATE_IN_RECOVERY; |
3091 | |||
3092 | old_stop_stage = conn->stop_stage; | ||
3093 | conn->stop_stage = flag; | ||
3090 | spin_unlock_bh(&session->lock); | 3094 | spin_unlock_bh(&session->lock); |
3091 | 3095 | ||
3092 | del_timer_sync(&conn->transport_timer); | 3096 | del_timer_sync(&conn->transport_timer); |
3093 | iscsi_suspend_tx(conn); | 3097 | iscsi_suspend_tx(conn); |
3094 | 3098 | ||
3095 | spin_lock_bh(&session->lock); | 3099 | spin_lock_bh(&session->lock); |
3096 | old_stop_stage = conn->stop_stage; | ||
3097 | conn->stop_stage = flag; | ||
3098 | conn->c_stage = ISCSI_CONN_STOPPED; | 3100 | conn->c_stage = ISCSI_CONN_STOPPED; |
3099 | spin_unlock_bh(&session->lock); | 3101 | spin_unlock_bh(&session->lock); |
3100 | 3102 | ||
diff --git a/drivers/scsi/libiscsi_tcp.c b/drivers/scsi/libiscsi_tcp.c index 4ad87fd74ddd..5c92620292fb 100644 --- a/drivers/scsi/libiscsi_tcp.c +++ b/drivers/scsi/libiscsi_tcp.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #include <linux/list.h> | 30 | #include <linux/list.h> |
31 | #include <linux/inet.h> | 31 | #include <linux/inet.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/file.h> | 33 | #include <linux/file.h> |
33 | #include <linux/blkdev.h> | 34 | #include <linux/blkdev.h> |
34 | #include <linux/crypto.h> | 35 | #include <linux/crypto.h> |
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index e15501170698..b00efd19aadb 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/scatterlist.h> | 24 | #include <linux/scatterlist.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <scsi/sas_ata.h> | 27 | #include <scsi/sas_ata.h> |
27 | #include "sas_internal.h" | 28 | #include "sas_internal.h" |
diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/scsi/libsas/sas_discover.c index facc5bfcf7db..f5831930df9b 100644 --- a/drivers/scsi/libsas/sas_discover.c +++ b/drivers/scsi/libsas/sas_discover.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/scatterlist.h> | 25 | #include <linux/scatterlist.h> |
26 | #include <linux/slab.h> | ||
26 | #include <scsi/scsi_host.h> | 27 | #include <scsi/scsi_host.h> |
27 | #include <scsi/scsi_eh.h> | 28 | #include <scsi/scsi_eh.h> |
28 | #include "sas_internal.h" | 29 | #include "sas_internal.h" |
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index 33cf988c8c8a..c65af02dcfe8 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/scatterlist.h> | 25 | #include <linux/scatterlist.h> |
26 | #include <linux/blkdev.h> | 26 | #include <linux/blkdev.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include "sas_internal.h" | 29 | #include "sas_internal.h" |
29 | 30 | ||
diff --git a/drivers/scsi/libsas/sas_host_smp.c b/drivers/scsi/libsas/sas_host_smp.c index 1bc3b7567994..04ad8dd1a74c 100644 --- a/drivers/scsi/libsas/sas_host_smp.c +++ b/drivers/scsi/libsas/sas_host_smp.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/scatterlist.h> | 11 | #include <linux/scatterlist.h> |
12 | #include <linux/blkdev.h> | 12 | #include <linux/blkdev.h> |
13 | #include <linux/slab.h> | ||
13 | 14 | ||
14 | #include "sas_internal.h" | 15 | #include "sas_internal.h" |
15 | 16 | ||
diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c index 9cd5abe9e714..2dc55343f671 100644 --- a/drivers/scsi/libsas/sas_init.c +++ b/drivers/scsi/libsas/sas_init.c | |||
@@ -24,6 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/init.h> | 28 | #include <linux/init.h> |
28 | #include <linux/device.h> | 29 | #include <linux/device.h> |
29 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 14b13196b22d..2660e1b4569a 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/err.h> | 44 | #include <linux/err.h> |
45 | #include <linux/blkdev.h> | 45 | #include <linux/blkdev.h> |
46 | #include <linux/freezer.h> | 46 | #include <linux/freezer.h> |
47 | #include <linux/gfp.h> | ||
47 | #include <linux/scatterlist.h> | 48 | #include <linux/scatterlist.h> |
48 | #include <linux/libata.h> | 49 | #include <linux/libata.h> |
49 | 50 | ||
diff --git a/drivers/scsi/libsrp.c b/drivers/scsi/libsrp.c index 22775165bf6a..ff6a28ce9b69 100644 --- a/drivers/scsi/libsrp.c +++ b/drivers/scsi/libsrp.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * 02110-1301 USA | 19 | * 02110-1301 USA |
20 | */ | 20 | */ |
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/kfifo.h> | 23 | #include <linux/kfifo.h> |
23 | #include <linux/scatterlist.h> | 24 | #include <linux/scatterlist.h> |
24 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 64cd17eedb64..1849e33e68f9 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/aer.h> | 26 | #include <linux/aer.h> |
27 | #include <linux/gfp.h> | ||
27 | 28 | ||
28 | #include <scsi/scsi.h> | 29 | #include <scsi/scsi.h> |
29 | #include <scsi/scsi_device.h> | 30 | #include <scsi/scsi_device.h> |
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index 692c29f6048e..ec3723831e89 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/mempool.h> | 22 | #include <linux/mempool.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
25 | 26 | ||
26 | #include <scsi/scsi.h> | 27 | #include <scsi/scsi.h> |
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index c7e921973f66..463b74902ac4 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/blkdev.h> | 25 | #include <linux/blkdev.h> |
26 | #include <linux/pci.h> | 26 | #include <linux/pci.h> |
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/utsname.h> | 29 | #include <linux/utsname.h> |
29 | 30 | ||
30 | #include <scsi/scsi.h> | 31 | #include <scsi/scsi.h> |
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index 391584183d81..a80d938fafc9 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/idr.h> | 24 | #include <linux/idr.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/kthread.h> | 26 | #include <linux/kthread.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
28 | #include <linux/spinlock.h> | 29 | #include <linux/spinlock.h> |
29 | #include <linux/ctype.h> | 30 | #include <linux/ctype.h> |
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index ee980bd66869..5fbdb22c1899 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -21,6 +21,7 @@ | |||
21 | /* See Fibre Channel protocol T11 FC-LS for details */ | 21 | /* See Fibre Channel protocol T11 FC-LS for details */ |
22 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
25 | 26 | ||
26 | #include <scsi/scsi.h> | 27 | #include <scsi/scsi.h> |
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index c555e3b7f202..e1466eec56b7 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -20,6 +20,7 @@ | |||
20 | *******************************************************************/ | 20 | *******************************************************************/ |
21 | 21 | ||
22 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
24 | #include <linux/kthread.h> | 25 | #include <linux/kthread.h> |
25 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index ea44239eeb33..774663e8e1fe 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/spinlock.h> | 29 | #include <linux/spinlock.h> |
30 | #include <linux/ctype.h> | 30 | #include <linux/ctype.h> |
31 | #include <linux/aer.h> | 31 | #include <linux/aer.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <scsi/scsi.h> | 34 | #include <scsi/scsi.h> |
34 | #include <scsi/scsi_device.h> | 35 | #include <scsi/scsi_device.h> |
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index 1e61ae3bc4eb..72e6adb0643e 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
25 | 26 | ||
26 | #include <scsi/scsi_device.h> | 27 | #include <scsi/scsi_device.h> |
diff --git a/drivers/scsi/lpfc/lpfc_mem.c b/drivers/scsi/lpfc/lpfc_mem.c index a1b6db6016da..8f879e477e9d 100644 --- a/drivers/scsi/lpfc/lpfc_mem.c +++ b/drivers/scsi/lpfc/lpfc_mem.c | |||
@@ -20,6 +20,7 @@ | |||
20 | *******************************************************************/ | 20 | *******************************************************************/ |
21 | 21 | ||
22 | #include <linux/mempool.h> | 22 | #include <linux/mempool.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
25 | 26 | ||
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index d20ae6b3b3cf..e331204a4d56 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
25 | 26 | ||
26 | #include <scsi/scsi.h> | 27 | #include <scsi/scsi.h> |
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index b16bb2c9978b..dccdb822328c 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * included with this package. * | 19 | * included with this package. * |
20 | *******************************************************************/ | 20 | *******************************************************************/ |
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
23 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
24 | #include <asm/unaligned.h> | 25 | #include <asm/unaligned.h> |
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index fe6660ca6452..049fb9a17b3f 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <scsi/scsi.h> | 28 | #include <scsi/scsi.h> |
28 | #include <scsi/scsi_cmnd.h> | 29 | #include <scsi/scsi_cmnd.h> |
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c index 869f76cbc58a..ffd575c379f3 100644 --- a/drivers/scsi/lpfc/lpfc_vport.c +++ b/drivers/scsi/lpfc/lpfc_vport.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/kthread.h> | 27 | #include <linux/kthread.h> |
28 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
30 | 31 | ||
31 | #include <scsi/scsi.h> | 32 | #include <scsi/scsi.h> |
diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c index 4a90eaf7cb63..3893337e3dd3 100644 --- a/drivers/scsi/mac_esp.c +++ b/drivers/scsi/mac_esp.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/nubus.h> | 21 | #include <linux/nubus.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <asm/irq.h> | 24 | #include <asm/irq.h> |
24 | #include <asm/dma.h> | 25 | #include <asm/dma.h> |
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 49eb0612d5af..4bf7edca9e69 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/init.h> | 47 | #include <linux/init.h> |
48 | #include <linux/dma-mapping.h> | 48 | #include <linux/dma-mapping.h> |
49 | #include <linux/smp_lock.h> | 49 | #include <linux/smp_lock.h> |
50 | #include <linux/slab.h> | ||
50 | #include <scsi/scsicam.h> | 51 | #include <scsi/scsicam.h> |
51 | 52 | ||
52 | #include "scsi.h" | 53 | #include "scsi.h" |
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index 7f977967b884..a7810a106b37 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c | |||
@@ -70,6 +70,7 @@ | |||
70 | * For history of changes, see Documentation/ChangeLog.megaraid | 70 | * For history of changes, see Documentation/ChangeLog.megaraid |
71 | */ | 71 | */ |
72 | 72 | ||
73 | #include <linux/slab.h> | ||
73 | #include "megaraid_mbox.h" | 74 | #include "megaraid_mbox.h" |
74 | 75 | ||
75 | static int megaraid_init(void); | 76 | static int megaraid_init(void); |
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c index f680561d2c6f..36e0b7d05c1d 100644 --- a/drivers/scsi/megaraid/megaraid_mm.c +++ b/drivers/scsi/megaraid/megaraid_mm.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * Common management module | 15 | * Common management module |
16 | */ | 16 | */ |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/smp_lock.h> | 19 | #include <linux/smp_lock.h> |
19 | #include "megaraid_mm.h" | 20 | #include "megaraid_mm.h" |
20 | 21 | ||
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index 409648f5845f..99e4478c3f3e 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/smp_lock.h> | 36 | #include <linux/smp_lock.h> |
37 | #include <linux/uio.h> | 37 | #include <linux/uio.h> |
38 | #include <linux/slab.h> | ||
38 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> |
39 | #include <linux/fs.h> | 40 | #include <linux/fs.h> |
40 | #include <linux/compat.h> | 41 | #include <linux/compat.h> |
diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c index 11aa917629ac..a1c97e88068a 100644 --- a/drivers/scsi/mesh.c +++ b/drivers/scsi/mesh.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/blkdev.h> | 26 | #include <linux/blkdev.h> |
28 | #include <linux/proc_fs.h> | 27 | #include <linux/proc_fs.h> |
29 | #include <linux/stat.h> | 28 | #include <linux/stat.h> |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_config.c b/drivers/scsi/mpt2sas/mpt2sas_config.c index 411c27d7f787..cf44b355bc97 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_config.c +++ b/drivers/scsi/mpt2sas/mpt2sas_config.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/workqueue.h> | 51 | #include <linux/workqueue.h> |
52 | #include <linux/delay.h> | 52 | #include <linux/delay.h> |
53 | #include <linux/pci.h> | 53 | #include <linux/pci.h> |
54 | #include <linux/slab.h> | ||
54 | 55 | ||
55 | #include "mpt2sas_base.h" | 56 | #include "mpt2sas_base.h" |
56 | 57 | ||
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index c7ec3f174782..be171ed682e0 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <linux/pci.h> | 53 | #include <linux/pci.h> |
54 | #include <linux/interrupt.h> | 54 | #include <linux/interrupt.h> |
55 | #include <linux/raid_class.h> | 55 | #include <linux/raid_class.h> |
56 | #include <linux/slab.h> | ||
56 | 57 | ||
57 | #include "mpt2sas_base.h" | 58 | #include "mpt2sas_base.h" |
58 | 59 | ||
diff --git a/drivers/scsi/mpt2sas/mpt2sas_transport.c b/drivers/scsi/mpt2sas/mpt2sas_transport.c index 789f9ee7f001..bd7ca2b49f81 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_transport.c +++ b/drivers/scsi/mpt2sas/mpt2sas_transport.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/workqueue.h> | 49 | #include <linux/workqueue.h> |
50 | #include <linux/delay.h> | 50 | #include <linux/delay.h> |
51 | #include <linux/pci.h> | 51 | #include <linux/pci.h> |
52 | #include <linux/slab.h> | ||
52 | 53 | ||
53 | #include <scsi/scsi.h> | 54 | #include <scsi/scsi.h> |
54 | #include <scsi/scsi_cmnd.h> | 55 | #include <scsi/scsi_cmnd.h> |
diff --git a/drivers/scsi/mvme16x_scsi.c b/drivers/scsi/mvme16x_scsi.c index b5fbfd6ce870..39f554f5f261 100644 --- a/drivers/scsi/mvme16x_scsi.c +++ b/drivers/scsi/mvme16x_scsi.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/slab.h> | ||
15 | #include <asm/mvme16xhw.h> | 16 | #include <asm/mvme16xhw.h> |
16 | #include <scsi/scsi_host.h> | 17 | #include <scsi/scsi_host.h> |
17 | #include <scsi/scsi_device.h> | 18 | #include <scsi/scsi_device.h> |
diff --git a/drivers/scsi/mvsas/mv_sas.h b/drivers/scsi/mvsas/mv_sas.h index aa2270af1bac..885858bcc403 100644 --- a/drivers/scsi/mvsas/mv_sas.h +++ b/drivers/scsi/mvsas/mv_sas.h | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/platform_device.h> | 36 | #include <linux/platform_device.h> |
37 | #include <linux/interrupt.h> | 37 | #include <linux/interrupt.h> |
38 | #include <linux/irq.h> | 38 | #include <linux/irq.h> |
39 | #include <linux/slab.h> | ||
39 | #include <linux/vmalloc.h> | 40 | #include <linux/vmalloc.h> |
40 | #include <scsi/libsas.h> | 41 | #include <scsi/libsas.h> |
41 | #include <scsi/scsi_tcq.h> | 42 | #include <scsi/scsi_tcq.h> |
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index a2d569828308..d013a2aa2fd5 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c | |||
@@ -98,6 +98,7 @@ | |||
98 | #include <linux/delay.h> | 98 | #include <linux/delay.h> |
99 | #include <linux/dma-mapping.h> | 99 | #include <linux/dma-mapping.h> |
100 | #include <linux/errno.h> | 100 | #include <linux/errno.h> |
101 | #include <linux/gfp.h> | ||
101 | #include <linux/init.h> | 102 | #include <linux/init.h> |
102 | #include <linux/interrupt.h> | 103 | #include <linux/interrupt.h> |
103 | #include <linux/ioport.h> | 104 | #include <linux/ioport.h> |
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c index 2c98a6ee973b..4c1e54545200 100644 --- a/drivers/scsi/nsp32.c +++ b/drivers/scsi/nsp32.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/string.h> | 29 | #include <linux/string.h> |
31 | #include <linux/timer.h> | 30 | #include <linux/timer.h> |
32 | #include <linux/ioport.h> | 31 | #include <linux/ioport.h> |
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index 60de85091502..ee4b6914667f 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c | |||
@@ -39,6 +39,8 @@ | |||
39 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 39 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include <linux/slab.h> | ||
43 | |||
42 | #include <scsi/osd_initiator.h> | 44 | #include <scsi/osd_initiator.h> |
43 | #include <scsi/osd_sec.h> | 45 | #include <scsi/osd_sec.h> |
44 | #include <scsi/osd_attributes.h> | 46 | #include <scsi/osd_attributes.h> |
diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c index 0a90702b3d71..ffdd9fdb9995 100644 --- a/drivers/scsi/osd/osd_uld.c +++ b/drivers/scsi/osd/osd_uld.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/idr.h> | 50 | #include <linux/idr.h> |
51 | #include <linux/major.h> | 51 | #include <linux/major.h> |
52 | #include <linux/file.h> | 52 | #include <linux/file.h> |
53 | #include <linux/slab.h> | ||
53 | 54 | ||
54 | #include <scsi/scsi.h> | 55 | #include <scsi/scsi.h> |
55 | #include <scsi/scsi_driver.h> | 56 | #include <scsi/scsi_driver.h> |
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index acb835837eec..b219118f8bd6 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c | |||
@@ -38,6 +38,7 @@ static const char * osst_version = "0.99.4"; | |||
38 | #include <linux/sched.h> | 38 | #include <linux/sched.h> |
39 | #include <linux/proc_fs.h> | 39 | #include <linux/proc_fs.h> |
40 | #include <linux/mm.h> | 40 | #include <linux/mm.h> |
41 | #include <linux/slab.h> | ||
41 | #include <linux/init.h> | 42 | #include <linux/init.h> |
42 | #include <linux/string.h> | 43 | #include <linux/string.h> |
43 | #include <linux/errno.h> | 44 | #include <linux/errno.h> |
diff --git a/drivers/scsi/pm8001/pm8001_ctl.c b/drivers/scsi/pm8001/pm8001_ctl.c index 14b13acae6dd..45bc197bc22f 100644 --- a/drivers/scsi/pm8001/pm8001_ctl.c +++ b/drivers/scsi/pm8001/pm8001_ctl.c | |||
@@ -38,6 +38,7 @@ | |||
38 | * | 38 | * |
39 | */ | 39 | */ |
40 | #include <linux/firmware.h> | 40 | #include <linux/firmware.h> |
41 | #include <linux/slab.h> | ||
41 | #include "pm8001_sas.h" | 42 | #include "pm8001_sas.h" |
42 | #include "pm8001_ctl.h" | 43 | #include "pm8001_ctl.h" |
43 | 44 | ||
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index 7985ae45d688..909c00ec044f 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c | |||
@@ -37,6 +37,7 @@ | |||
37 | * POSSIBILITY OF SUCH DAMAGES. | 37 | * POSSIBILITY OF SUCH DAMAGES. |
38 | * | 38 | * |
39 | */ | 39 | */ |
40 | #include <linux/slab.h> | ||
40 | #include "pm8001_sas.h" | 41 | #include "pm8001_sas.h" |
41 | #include "pm8001_hwi.h" | 42 | #include "pm8001_hwi.h" |
42 | #include "pm8001_chips.h" | 43 | #include "pm8001_chips.h" |
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index f80c1da8f6ca..f8c86b28f03f 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c | |||
@@ -38,6 +38,7 @@ | |||
38 | * | 38 | * |
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include <linux/slab.h> | ||
41 | #include "pm8001_sas.h" | 42 | #include "pm8001_sas.h" |
42 | #include "pm8001_chips.h" | 43 | #include "pm8001_chips.h" |
43 | 44 | ||
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c index 3b2c98fba834..bff4f5139b9c 100644 --- a/drivers/scsi/pm8001/pm8001_sas.c +++ b/drivers/scsi/pm8001/pm8001_sas.c | |||
@@ -38,6 +38,7 @@ | |||
38 | * | 38 | * |
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include <linux/slab.h> | ||
41 | #include "pm8001_sas.h" | 42 | #include "pm8001_sas.h" |
42 | 43 | ||
43 | /** | 44 | /** |
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index 9b1c1433c26b..53aefffbaead 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/hdreg.h> | 41 | #include <linux/hdreg.h> |
42 | #include <linux/version.h> | 42 | #include <linux/version.h> |
43 | #include <linux/io.h> | 43 | #include <linux/io.h> |
44 | #include <linux/slab.h> | ||
44 | #include <asm/irq.h> | 45 | #include <asm/irq.h> |
45 | #include <asm/processor.h> | 46 | #include <asm/processor.h> |
46 | #include <linux/libata.h> | 47 | #include <linux/libata.h> |
diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c index 8aa0bd987e29..7bc2d796e403 100644 --- a/drivers/scsi/ppa.c +++ b/drivers/scsi/ppa.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/blkdev.h> | 15 | #include <linux/blkdev.h> |
15 | #include <linux/parport.h> | 16 | #include <linux/parport.h> |
diff --git a/drivers/scsi/ps3rom.c b/drivers/scsi/ps3rom.c index db90caf43f42..92ffbb510498 100644 --- a/drivers/scsi/ps3rom.c +++ b/drivers/scsi/ps3rom.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/cdrom.h> | 21 | #include <linux/cdrom.h> |
22 | #include <linux/highmem.h> | 22 | #include <linux/highmem.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <scsi/scsi.h> | 25 | #include <scsi/scsi.h> |
25 | #include <scsi/scsi_cmnd.h> | 26 | #include <scsi/scsi_cmnd.h> |
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 49ac4148493b..b8166ecfd0e3 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
@@ -17,9 +17,11 @@ | |||
17 | * General Public License for more details. | 17 | * General Public License for more details. |
18 | * | 18 | * |
19 | ******************************************************************************/ | 19 | ******************************************************************************/ |
20 | #define QLA1280_VERSION "3.27" | 20 | #define QLA1280_VERSION "3.27.1" |
21 | /***************************************************************************** | 21 | /***************************************************************************** |
22 | Revision History: | 22 | Revision History: |
23 | Rev 3.27.1, February 8, 2010, Michael Reed | ||
24 | - Retain firmware image for error recovery. | ||
23 | Rev 3.27, February 10, 2009, Michael Reed | 25 | Rev 3.27, February 10, 2009, Michael Reed |
24 | - General code cleanup. | 26 | - General code cleanup. |
25 | - Improve error recovery. | 27 | - Improve error recovery. |
@@ -346,7 +348,6 @@ | |||
346 | #include <linux/pci.h> | 348 | #include <linux/pci.h> |
347 | #include <linux/proc_fs.h> | 349 | #include <linux/proc_fs.h> |
348 | #include <linux/stat.h> | 350 | #include <linux/stat.h> |
349 | #include <linux/slab.h> | ||
350 | #include <linux/pci_ids.h> | 351 | #include <linux/pci_ids.h> |
351 | #include <linux/interrupt.h> | 352 | #include <linux/interrupt.h> |
352 | #include <linux/init.h> | 353 | #include <linux/init.h> |
@@ -538,9 +539,9 @@ __setup("qla1280=", qla1280_setup); | |||
538 | /*****************************************/ | 539 | /*****************************************/ |
539 | 540 | ||
540 | struct qla_boards { | 541 | struct qla_boards { |
541 | unsigned char name[9]; /* Board ID String */ | 542 | char *name; /* Board ID String */ |
542 | int numPorts; /* Number of SCSI ports */ | 543 | int numPorts; /* Number of SCSI ports */ |
543 | char *fwname; /* firmware name */ | 544 | int fw_index; /* index into qla1280_fw_tbl for firmware */ |
544 | }; | 545 | }; |
545 | 546 | ||
546 | /* NOTE: the last argument in each entry is used to index ql1280_board_tbl */ | 547 | /* NOTE: the last argument in each entry is used to index ql1280_board_tbl */ |
@@ -561,15 +562,30 @@ static struct pci_device_id qla1280_pci_tbl[] = { | |||
561 | }; | 562 | }; |
562 | MODULE_DEVICE_TABLE(pci, qla1280_pci_tbl); | 563 | MODULE_DEVICE_TABLE(pci, qla1280_pci_tbl); |
563 | 564 | ||
565 | DEFINE_MUTEX(qla1280_firmware_mutex); | ||
566 | |||
567 | struct qla_fw { | ||
568 | char *fwname; | ||
569 | const struct firmware *fw; | ||
570 | }; | ||
571 | |||
572 | #define QL_NUM_FW_IMAGES 3 | ||
573 | |||
574 | struct qla_fw qla1280_fw_tbl[QL_NUM_FW_IMAGES] = { | ||
575 | {"qlogic/1040.bin", NULL}, /* image 0 */ | ||
576 | {"qlogic/1280.bin", NULL}, /* image 1 */ | ||
577 | {"qlogic/12160.bin", NULL}, /* image 2 */ | ||
578 | }; | ||
579 | |||
580 | /* NOTE: Order of boards in this table must match order in qla1280_pci_tbl */ | ||
564 | static struct qla_boards ql1280_board_tbl[] = { | 581 | static struct qla_boards ql1280_board_tbl[] = { |
565 | /* Name , Number of ports, FW details */ | 582 | {.name = "QLA12160", .numPorts = 2, .fw_index = 2}, |
566 | {"QLA12160", 2, "qlogic/12160.bin"}, | 583 | {.name = "QLA1040" , .numPorts = 1, .fw_index = 0}, |
567 | {"QLA1040", 1, "qlogic/1040.bin"}, | 584 | {.name = "QLA1080" , .numPorts = 1, .fw_index = 1}, |
568 | {"QLA1080", 1, "qlogic/1280.bin"}, | 585 | {.name = "QLA1240" , .numPorts = 2, .fw_index = 1}, |
569 | {"QLA1240", 2, "qlogic/1280.bin"}, | 586 | {.name = "QLA1280" , .numPorts = 2, .fw_index = 1}, |
570 | {"QLA1280", 2, "qlogic/1280.bin"}, | 587 | {.name = "QLA10160", .numPorts = 1, .fw_index = 2}, |
571 | {"QLA10160", 1, "qlogic/12160.bin"}, | 588 | {.name = " ", .numPorts = 0, .fw_index = -1}, |
572 | {" ", 0, " "}, | ||
573 | }; | 589 | }; |
574 | 590 | ||
575 | static int qla1280_verbose = 1; | 591 | static int qla1280_verbose = 1; |
@@ -1512,6 +1528,63 @@ qla1280_initialize_adapter(struct scsi_qla_host *ha) | |||
1512 | } | 1528 | } |
1513 | 1529 | ||
1514 | /* | 1530 | /* |
1531 | * qla1280_request_firmware | ||
1532 | * Acquire firmware for chip. Retain in memory | ||
1533 | * for error recovery. | ||
1534 | * | ||
1535 | * Input: | ||
1536 | * ha = adapter block pointer. | ||
1537 | * | ||
1538 | * Returns: | ||
1539 | * Pointer to firmware image or an error code | ||
1540 | * cast to pointer via ERR_PTR(). | ||
1541 | */ | ||
1542 | static const struct firmware * | ||
1543 | qla1280_request_firmware(struct scsi_qla_host *ha) | ||
1544 | { | ||
1545 | const struct firmware *fw; | ||
1546 | int err; | ||
1547 | int index; | ||
1548 | char *fwname; | ||
1549 | |||
1550 | spin_unlock_irq(ha->host->host_lock); | ||
1551 | mutex_lock(&qla1280_firmware_mutex); | ||
1552 | |||
1553 | index = ql1280_board_tbl[ha->devnum].fw_index; | ||
1554 | fw = qla1280_fw_tbl[index].fw; | ||
1555 | if (fw) | ||
1556 | goto out; | ||
1557 | |||
1558 | fwname = qla1280_fw_tbl[index].fwname; | ||
1559 | err = request_firmware(&fw, fwname, &ha->pdev->dev); | ||
1560 | |||
1561 | if (err) { | ||
1562 | printk(KERN_ERR "Failed to load image \"%s\" err %d\n", | ||
1563 | fwname, err); | ||
1564 | fw = ERR_PTR(err); | ||
1565 | goto unlock; | ||
1566 | } | ||
1567 | if ((fw->size % 2) || (fw->size < 6)) { | ||
1568 | printk(KERN_ERR "Invalid firmware length %zu in image \"%s\"\n", | ||
1569 | fw->size, fwname); | ||
1570 | release_firmware(fw); | ||
1571 | fw = ERR_PTR(-EINVAL); | ||
1572 | goto unlock; | ||
1573 | } | ||
1574 | |||
1575 | qla1280_fw_tbl[index].fw = fw; | ||
1576 | |||
1577 | out: | ||
1578 | ha->fwver1 = fw->data[0]; | ||
1579 | ha->fwver2 = fw->data[1]; | ||
1580 | ha->fwver3 = fw->data[2]; | ||
1581 | unlock: | ||
1582 | mutex_unlock(&qla1280_firmware_mutex); | ||
1583 | spin_lock_irq(ha->host->host_lock); | ||
1584 | return fw; | ||
1585 | } | ||
1586 | |||
1587 | /* | ||
1515 | * Chip diagnostics | 1588 | * Chip diagnostics |
1516 | * Test chip for proper operation. | 1589 | * Test chip for proper operation. |
1517 | * | 1590 | * |
@@ -1634,30 +1707,18 @@ qla1280_chip_diag(struct scsi_qla_host *ha) | |||
1634 | static int | 1707 | static int |
1635 | qla1280_load_firmware_pio(struct scsi_qla_host *ha) | 1708 | qla1280_load_firmware_pio(struct scsi_qla_host *ha) |
1636 | { | 1709 | { |
1710 | /* enter with host_lock acquired */ | ||
1711 | |||
1637 | const struct firmware *fw; | 1712 | const struct firmware *fw; |
1638 | const __le16 *fw_data; | 1713 | const __le16 *fw_data; |
1639 | uint16_t risc_address, risc_code_size; | 1714 | uint16_t risc_address, risc_code_size; |
1640 | uint16_t mb[MAILBOX_REGISTER_COUNT], i; | 1715 | uint16_t mb[MAILBOX_REGISTER_COUNT], i; |
1641 | int err; | 1716 | int err = 0; |
1717 | |||
1718 | fw = qla1280_request_firmware(ha); | ||
1719 | if (IS_ERR(fw)) | ||
1720 | return PTR_ERR(fw); | ||
1642 | 1721 | ||
1643 | spin_unlock_irq(ha->host->host_lock); | ||
1644 | err = request_firmware(&fw, ql1280_board_tbl[ha->devnum].fwname, | ||
1645 | &ha->pdev->dev); | ||
1646 | spin_lock_irq(ha->host->host_lock); | ||
1647 | if (err) { | ||
1648 | printk(KERN_ERR "Failed to load image \"%s\" err %d\n", | ||
1649 | ql1280_board_tbl[ha->devnum].fwname, err); | ||
1650 | return err; | ||
1651 | } | ||
1652 | if ((fw->size % 2) || (fw->size < 6)) { | ||
1653 | printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", | ||
1654 | fw->size, ql1280_board_tbl[ha->devnum].fwname); | ||
1655 | err = -EINVAL; | ||
1656 | goto out; | ||
1657 | } | ||
1658 | ha->fwver1 = fw->data[0]; | ||
1659 | ha->fwver2 = fw->data[1]; | ||
1660 | ha->fwver3 = fw->data[2]; | ||
1661 | fw_data = (const __le16 *)&fw->data[0]; | 1722 | fw_data = (const __le16 *)&fw->data[0]; |
1662 | ha->fwstart = __le16_to_cpu(fw_data[2]); | 1723 | ha->fwstart = __le16_to_cpu(fw_data[2]); |
1663 | 1724 | ||
@@ -1675,11 +1736,10 @@ qla1280_load_firmware_pio(struct scsi_qla_host *ha) | |||
1675 | if (err) { | 1736 | if (err) { |
1676 | printk(KERN_ERR "scsi(%li): Failed to load firmware\n", | 1737 | printk(KERN_ERR "scsi(%li): Failed to load firmware\n", |
1677 | ha->host_no); | 1738 | ha->host_no); |
1678 | goto out; | 1739 | break; |
1679 | } | 1740 | } |
1680 | } | 1741 | } |
1681 | out: | 1742 | |
1682 | release_firmware(fw); | ||
1683 | return err; | 1743 | return err; |
1684 | } | 1744 | } |
1685 | 1745 | ||
@@ -1687,6 +1747,7 @@ out: | |||
1687 | static int | 1747 | static int |
1688 | qla1280_load_firmware_dma(struct scsi_qla_host *ha) | 1748 | qla1280_load_firmware_dma(struct scsi_qla_host *ha) |
1689 | { | 1749 | { |
1750 | /* enter with host_lock acquired */ | ||
1690 | const struct firmware *fw; | 1751 | const struct firmware *fw; |
1691 | const __le16 *fw_data; | 1752 | const __le16 *fw_data; |
1692 | uint16_t risc_address, risc_code_size; | 1753 | uint16_t risc_address, risc_code_size; |
@@ -1701,24 +1762,10 @@ qla1280_load_firmware_dma(struct scsi_qla_host *ha) | |||
1701 | return -ENOMEM; | 1762 | return -ENOMEM; |
1702 | #endif | 1763 | #endif |
1703 | 1764 | ||
1704 | spin_unlock_irq(ha->host->host_lock); | 1765 | fw = qla1280_request_firmware(ha); |
1705 | err = request_firmware(&fw, ql1280_board_tbl[ha->devnum].fwname, | 1766 | if (IS_ERR(fw)) |
1706 | &ha->pdev->dev); | 1767 | return PTR_ERR(fw); |
1707 | spin_lock_irq(ha->host->host_lock); | 1768 | |
1708 | if (err) { | ||
1709 | printk(KERN_ERR "Failed to load image \"%s\" err %d\n", | ||
1710 | ql1280_board_tbl[ha->devnum].fwname, err); | ||
1711 | return err; | ||
1712 | } | ||
1713 | if ((fw->size % 2) || (fw->size < 6)) { | ||
1714 | printk(KERN_ERR "Bogus length %zu in image \"%s\"\n", | ||
1715 | fw->size, ql1280_board_tbl[ha->devnum].fwname); | ||
1716 | err = -EINVAL; | ||
1717 | goto out; | ||
1718 | } | ||
1719 | ha->fwver1 = fw->data[0]; | ||
1720 | ha->fwver2 = fw->data[1]; | ||
1721 | ha->fwver3 = fw->data[2]; | ||
1722 | fw_data = (const __le16 *)&fw->data[0]; | 1769 | fw_data = (const __le16 *)&fw->data[0]; |
1723 | ha->fwstart = __le16_to_cpu(fw_data[2]); | 1770 | ha->fwstart = __le16_to_cpu(fw_data[2]); |
1724 | 1771 | ||
@@ -1803,7 +1850,6 @@ qla1280_load_firmware_dma(struct scsi_qla_host *ha) | |||
1803 | #if DUMP_IT_BACK | 1850 | #if DUMP_IT_BACK |
1804 | pci_free_consistent(ha->pdev, 8000, tbuf, p_tbuf); | 1851 | pci_free_consistent(ha->pdev, 8000, tbuf, p_tbuf); |
1805 | #endif | 1852 | #endif |
1806 | release_firmware(fw); | ||
1807 | return err; | 1853 | return err; |
1808 | } | 1854 | } |
1809 | 1855 | ||
@@ -1842,6 +1888,7 @@ qla1280_start_firmware(struct scsi_qla_host *ha) | |||
1842 | static int | 1888 | static int |
1843 | qla1280_load_firmware(struct scsi_qla_host *ha) | 1889 | qla1280_load_firmware(struct scsi_qla_host *ha) |
1844 | { | 1890 | { |
1891 | /* enter with host_lock taken */ | ||
1845 | int err; | 1892 | int err; |
1846 | 1893 | ||
1847 | err = qla1280_chip_diag(ha); | 1894 | err = qla1280_chip_diag(ha); |
@@ -4420,7 +4467,16 @@ qla1280_init(void) | |||
4420 | static void __exit | 4467 | static void __exit |
4421 | qla1280_exit(void) | 4468 | qla1280_exit(void) |
4422 | { | 4469 | { |
4470 | int i; | ||
4471 | |||
4423 | pci_unregister_driver(&qla1280_pci_driver); | 4472 | pci_unregister_driver(&qla1280_pci_driver); |
4473 | /* release any allocated firmware images */ | ||
4474 | for (i = 0; i < QL_NUM_FW_IMAGES; i++) { | ||
4475 | if (qla1280_fw_tbl[i].fw) { | ||
4476 | release_firmware(qla1280_fw_tbl[i].fw); | ||
4477 | qla1280_fw_tbl[i].fw = NULL; | ||
4478 | } | ||
4479 | } | ||
4424 | } | 4480 | } |
4425 | 4481 | ||
4426 | module_init(qla1280_init); | 4482 | module_init(qla1280_init); |
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 90d1e062ec4f..359e9a71a021 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/kthread.h> | 9 | #include <linux/kthread.h> |
10 | #include <linux/vmalloc.h> | 10 | #include <linux/vmalloc.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
12 | 13 | ||
13 | static int qla24xx_vport_disable(struct fc_vport *, bool); | 14 | static int qla24xx_vport_disable(struct fc_vport *, bool); |
@@ -1274,7 +1275,11 @@ qla2x00_fw_state_show(struct device *dev, struct device_attribute *attr, | |||
1274 | int rval = QLA_FUNCTION_FAILED; | 1275 | int rval = QLA_FUNCTION_FAILED; |
1275 | uint16_t state[5]; | 1276 | uint16_t state[5]; |
1276 | 1277 | ||
1277 | if (!vha->hw->flags.eeh_busy) | 1278 | if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) || |
1279 | test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags)) | ||
1280 | DEBUG2_3_11(printk("%s(%ld): isp reset in progress.\n", | ||
1281 | __func__, vha->host_no)); | ||
1282 | else if (!vha->hw->flags.eeh_busy) | ||
1278 | rval = qla2x00_get_firmware_state(vha, state); | 1283 | rval = qla2x00_get_firmware_state(vha, state); |
1279 | if (rval != QLA_SUCCESS) | 1284 | if (rval != QLA_SUCCESS) |
1280 | memset(state, -1, sizeof(state)); | 1285 | memset(state, -1, sizeof(state)); |
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h index cebf4f1bb7d9..42c5587cc50c 100644 --- a/drivers/scsi/qla2xxx/qla_fw.h +++ b/drivers/scsi/qla2xxx/qla_fw.h | |||
@@ -1592,10 +1592,22 @@ struct nvram_81xx { | |||
1592 | 1592 | ||
1593 | /* Offset 384. */ | 1593 | /* Offset 384. */ |
1594 | uint8_t reserved_21[16]; | 1594 | uint8_t reserved_21[16]; |
1595 | uint16_t reserved_22[8]; | 1595 | uint16_t reserved_22[3]; |
1596 | |||
1597 | /* | ||
1598 | * BIT 0 = Extended BB credits for LR | ||
1599 | * BIT 1 = Virtual Fabric Enable | ||
1600 | * BIT 2 = Enhanced Features Unused | ||
1601 | * BIT 3-7 = Enhanced Features Reserved | ||
1602 | */ | ||
1603 | /* Enhanced Features */ | ||
1604 | uint8_t enhanced_features; | ||
1605 | |||
1606 | uint8_t reserved_23; | ||
1607 | uint16_t reserved_24[4]; | ||
1596 | 1608 | ||
1597 | /* Offset 416. */ | 1609 | /* Offset 416. */ |
1598 | uint16_t reserved_23[32]; | 1610 | uint16_t reserved_25[32]; |
1599 | 1611 | ||
1600 | /* Offset 480. */ | 1612 | /* Offset 480. */ |
1601 | uint8_t model_name[16]; | 1613 | uint8_t model_name[16]; |
@@ -1603,7 +1615,7 @@ struct nvram_81xx { | |||
1603 | /* Offset 496. */ | 1615 | /* Offset 496. */ |
1604 | uint16_t feature_mask_l; | 1616 | uint16_t feature_mask_l; |
1605 | uint16_t feature_mask_h; | 1617 | uint16_t feature_mask_h; |
1606 | uint16_t reserved_24[2]; | 1618 | uint16_t reserved_26[2]; |
1607 | 1619 | ||
1608 | uint16_t subsystem_vendor_id; | 1620 | uint16_t subsystem_vendor_id; |
1609 | uint16_t subsystem_device_id; | 1621 | uint16_t subsystem_device_id; |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index a67b2bafb882..4229bb483c5e 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include "qla_gbl.h" | 8 | #include "qla_gbl.h" |
9 | 9 | ||
10 | #include <linux/delay.h> | 10 | #include <linux/delay.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/vmalloc.h> | 12 | #include <linux/vmalloc.h> |
12 | 13 | ||
13 | #include "qla_devtbl.h" | 14 | #include "qla_devtbl.h" |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index ab90329ff2e4..db539b0c3dae 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "qla_def.h" | 7 | #include "qla_def.h" |
8 | 8 | ||
9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
10 | #include <linux/slab.h> | ||
10 | #include <scsi/scsi_tcq.h> | 11 | #include <scsi/scsi_tcq.h> |
11 | #include <scsi/scsi_bsg_fc.h> | 12 | #include <scsi/scsi_bsg_fc.h> |
12 | 13 | ||
@@ -620,11 +621,10 @@ skip_rio: | |||
620 | * vp_idx does not match | 621 | * vp_idx does not match |
621 | * Event is not global, vp_idx does not match | 622 | * Event is not global, vp_idx does not match |
622 | */ | 623 | */ |
623 | if ((mb[1] == 0xffff && (mb[3] & 0xff) != 0xff) | 624 | if (IS_QLA2XXX_MIDTYPE(ha) && |
624 | || (mb[1] != 0xffff)) { | 625 | ((mb[1] == 0xffff && (mb[3] & 0xff) != 0xff) || |
625 | if (vha->vp_idx != (mb[3] & 0xff)) | 626 | (mb[1] != 0xffff)) && vha->vp_idx != (mb[3] & 0xff)) |
626 | break; | 627 | break; |
627 | } | ||
628 | 628 | ||
629 | /* Global event -- port logout or port unavailable. */ | 629 | /* Global event -- port logout or port unavailable. */ |
630 | if (mb[1] == 0xffff && mb[2] == 0x7) { | 630 | if (mb[1] == 0xffff && mb[2] == 0x7) { |
@@ -2272,30 +2272,28 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp) | |||
2272 | 2272 | ||
2273 | /* If possible, enable MSI-X. */ | 2273 | /* If possible, enable MSI-X. */ |
2274 | if (!IS_QLA2432(ha) && !IS_QLA2532(ha) && | 2274 | if (!IS_QLA2432(ha) && !IS_QLA2532(ha) && |
2275 | !IS_QLA8432(ha) && !IS_QLA8001(ha)) | 2275 | !IS_QLA8432(ha) && !IS_QLA8001(ha)) |
2276 | goto skip_msix; | 2276 | goto skip_msi; |
2277 | |||
2278 | if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP && | ||
2279 | (ha->pdev->subsystem_device == 0x7040 || | ||
2280 | ha->pdev->subsystem_device == 0x7041 || | ||
2281 | ha->pdev->subsystem_device == 0x1705)) { | ||
2282 | DEBUG2(qla_printk(KERN_WARNING, ha, | ||
2283 | "MSI-X: Unsupported ISP2432 SSVID/SSDID (0x%X,0x%X).\n", | ||
2284 | ha->pdev->subsystem_vendor, | ||
2285 | ha->pdev->subsystem_device)); | ||
2286 | goto skip_msi; | ||
2287 | } | ||
2277 | 2288 | ||
2278 | if (IS_QLA2432(ha) && (ha->pdev->revision < QLA_MSIX_CHIP_REV_24XX || | 2289 | if (IS_QLA2432(ha) && (ha->pdev->revision < QLA_MSIX_CHIP_REV_24XX || |
2279 | !QLA_MSIX_FW_MODE_1(ha->fw_attributes))) { | 2290 | !QLA_MSIX_FW_MODE_1(ha->fw_attributes))) { |
2280 | DEBUG2(qla_printk(KERN_WARNING, ha, | 2291 | DEBUG2(qla_printk(KERN_WARNING, ha, |
2281 | "MSI-X: Unsupported ISP2432 (0x%X, 0x%X).\n", | 2292 | "MSI-X: Unsupported ISP2432 (0x%X, 0x%X).\n", |
2282 | ha->pdev->revision, ha->fw_attributes)); | 2293 | ha->pdev->revision, ha->fw_attributes)); |
2283 | |||
2284 | goto skip_msix; | 2294 | goto skip_msix; |
2285 | } | 2295 | } |
2286 | 2296 | ||
2287 | if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP && | ||
2288 | (ha->pdev->subsystem_device == 0x7040 || | ||
2289 | ha->pdev->subsystem_device == 0x7041 || | ||
2290 | ha->pdev->subsystem_device == 0x1705)) { | ||
2291 | DEBUG2(qla_printk(KERN_WARNING, ha, | ||
2292 | "MSI-X: Unsupported ISP2432 SSVID/SSDID (0x%X, 0x%X).\n", | ||
2293 | ha->pdev->subsystem_vendor, | ||
2294 | ha->pdev->subsystem_device)); | ||
2295 | |||
2296 | goto skip_msi; | ||
2297 | } | ||
2298 | |||
2299 | ret = qla24xx_enable_msix(ha, rsp); | 2297 | ret = qla24xx_enable_msix(ha, rsp); |
2300 | if (!ret) { | 2298 | if (!ret) { |
2301 | DEBUG2(qla_printk(KERN_INFO, ha, | 2299 | DEBUG2(qla_printk(KERN_INFO, ha, |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 6e53bdbb1da8..42eb7ffd5942 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "qla_def.h" | 7 | #include "qla_def.h" |
8 | 8 | ||
9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
10 | #include <linux/gfp.h> | ||
10 | 11 | ||
11 | 12 | ||
12 | /* | 13 | /* |
@@ -339,6 +340,7 @@ qla2x00_load_ram(scsi_qla_host_t *vha, dma_addr_t req_dma, uint32_t risc_addr, | |||
339 | return rval; | 340 | return rval; |
340 | } | 341 | } |
341 | 342 | ||
343 | #define EXTENDED_BB_CREDITS BIT_0 | ||
342 | /* | 344 | /* |
343 | * qla2x00_execute_fw | 345 | * qla2x00_execute_fw |
344 | * Start adapter firmware. | 346 | * Start adapter firmware. |
@@ -371,7 +373,12 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr) | |||
371 | mcp->mb[1] = MSW(risc_addr); | 373 | mcp->mb[1] = MSW(risc_addr); |
372 | mcp->mb[2] = LSW(risc_addr); | 374 | mcp->mb[2] = LSW(risc_addr); |
373 | mcp->mb[3] = 0; | 375 | mcp->mb[3] = 0; |
374 | mcp->mb[4] = 0; | 376 | if (IS_QLA81XX(ha)) { |
377 | struct nvram_81xx *nv = ha->nvram; | ||
378 | mcp->mb[4] = (nv->enhanced_features & | ||
379 | EXTENDED_BB_CREDITS); | ||
380 | } else | ||
381 | mcp->mb[4] = 0; | ||
375 | mcp->out_mb |= MBX_4|MBX_3|MBX_2|MBX_1; | 382 | mcp->out_mb |= MBX_4|MBX_3|MBX_2|MBX_1; |
376 | mcp->in_mb |= MBX_1; | 383 | mcp->in_mb |= MBX_1; |
377 | } else { | 384 | } else { |
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index ff17dee28613..8220e7b9799b 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/moduleparam.h> | 10 | #include <linux/moduleparam.h> |
11 | #include <linux/vmalloc.h> | 11 | #include <linux/vmalloc.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/list.h> | 13 | #include <linux/list.h> |
13 | 14 | ||
14 | #include <scsi/scsi_tcq.h> | 15 | #include <scsi/scsi_tcq.h> |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 46720b23028f..48c37e38ed01 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kthread.h> | 12 | #include <linux/kthread.h> |
13 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
14 | #include <linux/kobject.h> | 14 | #include <linux/kobject.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include <scsi/scsi_tcq.h> | 17 | #include <scsi/scsi_tcq.h> |
17 | #include <scsi/scsicam.h> | 18 | #include <scsi/scsicam.h> |
@@ -1676,9 +1677,11 @@ skip_pio: | |||
1676 | 1677 | ||
1677 | /* Determine queue resources */ | 1678 | /* Determine queue resources */ |
1678 | ha->max_req_queues = ha->max_rsp_queues = 1; | 1679 | ha->max_req_queues = ha->max_rsp_queues = 1; |
1679 | if ((ql2xmaxqueues <= 1 || ql2xmultique_tag < 1) && | 1680 | if ((ql2xmaxqueues <= 1 && !ql2xmultique_tag) || |
1681 | (ql2xmaxqueues > 1 && ql2xmultique_tag) || | ||
1680 | (!IS_QLA25XX(ha) && !IS_QLA81XX(ha))) | 1682 | (!IS_QLA25XX(ha) && !IS_QLA81XX(ha))) |
1681 | goto mqiobase_exit; | 1683 | goto mqiobase_exit; |
1684 | |||
1682 | ha->mqiobase = ioremap(pci_resource_start(ha->pdev, 3), | 1685 | ha->mqiobase = ioremap(pci_resource_start(ha->pdev, 3), |
1683 | pci_resource_len(ha->pdev, 3)); | 1686 | pci_resource_len(ha->pdev, 3)); |
1684 | if (ha->mqiobase) { | 1687 | if (ha->mqiobase) { |
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index 371dc895972a..8b3de4e54c28 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "qla_def.h" | 7 | #include "qla_def.h" |
8 | 8 | ||
9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/vmalloc.h> | 11 | #include <linux/vmalloc.h> |
11 | #include <asm/uaccess.h> | 12 | #include <asm/uaccess.h> |
12 | 13 | ||
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 8d2fc2fa7a6b..109068df933f 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++ b/drivers/scsi/qla2xxx/qla_version.h | |||
@@ -7,9 +7,9 @@ | |||
7 | /* | 7 | /* |
8 | * Driver version | 8 | * Driver version |
9 | */ | 9 | */ |
10 | #define QLA2XXX_VERSION "8.03.02-k1" | 10 | #define QLA2XXX_VERSION "8.03.02-k2" |
11 | 11 | ||
12 | #define QLA_DRIVER_MAJOR_VER 8 | 12 | #define QLA_DRIVER_MAJOR_VER 8 |
13 | #define QLA_DRIVER_MINOR_VER 3 | 13 | #define QLA_DRIVER_MINOR_VER 3 |
14 | #define QLA_DRIVER_PATCH_VER 2 | 14 | #define QLA_DRIVER_PATCH_VER 2 |
15 | #define QLA_DRIVER_BETA_VER 1 | 15 | #define QLA_DRIVER_BETA_VER 2 |
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 83c8b5e4fc8b..2ccad36bee9f 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -5,6 +5,7 @@ | |||
5 | * See LICENSE.qla4xxx for copyright and licensing details. | 5 | * See LICENSE.qla4xxx for copyright and licensing details. |
6 | */ | 6 | */ |
7 | #include <linux/moduleparam.h> | 7 | #include <linux/moduleparam.h> |
8 | #include <linux/slab.h> | ||
8 | 9 | ||
9 | #include <scsi/scsi_tcq.h> | 10 | #include <scsi/scsi_tcq.h> |
10 | #include <scsi/scsicam.h> | 11 | #include <scsi/scsicam.h> |
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 1b8217076b0e..aa406497eebc 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/gfp.h> |
20 | #include <linux/blkdev.h> | 20 | #include <linux/blkdev.h> |
21 | #include <linux/proc_fs.h> | 21 | #include <linux/proc_fs.h> |
22 | #include <linux/stat.h> | 22 | #include <linux/stat.h> |
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 0b575c871007..3e10c306de94 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/types.h> | 34 | #include <linux/types.h> |
34 | #include <linux/string.h> | 35 | #include <linux/string.h> |
35 | #include <linux/genhd.h> | 36 | #include <linux/genhd.h> |
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index 37af178b2d17..43fad4c09beb 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/moduleparam.h> | 6 | #include <linux/moduleparam.h> |
7 | #include <linux/proc_fs.h> | 7 | #include <linux/proc_fs.h> |
8 | #include <linux/seq_file.h> | 8 | #include <linux/seq_file.h> |
9 | #include <linux/slab.h> | ||
9 | 10 | ||
10 | #include <scsi/scsi_device.h> | 11 | #include <scsi/scsi_device.h> |
11 | #include <scsi/scsi_devinfo.h> | 12 | #include <scsi/scsi_devinfo.h> |
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 08ed506e6059..d45c69ca5737 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/gfp.h> | ||
19 | #include <linux/timer.h> | 20 | #include <linux/timer.h> |
20 | #include <linux/string.h> | 21 | #include <linux/string.h> |
21 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
diff --git a/drivers/scsi/scsi_netlink.c b/drivers/scsi/scsi_netlink.c index 0fd6ae6911ad..d53e6503c6d5 100644 --- a/drivers/scsi/scsi_netlink.c +++ b/drivers/scsi/scsi_netlink.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/jiffies.h> | 22 | #include <linux/jiffies.h> |
23 | #include <linux/security.h> | 23 | #include <linux/security.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/slab.h> | ||
25 | #include <net/sock.h> | 26 | #include <net/sock.h> |
26 | #include <net/netlink.h> | 27 | #include <net/netlink.h> |
27 | 28 | ||
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c index 77fbddb507fd..c99da926fdac 100644 --- a/drivers/scsi/scsi_proc.c +++ b/drivers/scsi/scsi_proc.c | |||
@@ -20,12 +20,12 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/slab.h> | ||
24 | #include <linux/proc_fs.h> | 23 | #include <linux/proc_fs.h> |
25 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
26 | #include <linux/blkdev.h> | 25 | #include <linux/blkdev.h> |
27 | #include <linux/seq_file.h> | 26 | #include <linux/seq_file.h> |
28 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
28 | #include <linux/gfp.h> | ||
29 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
30 | 30 | ||
31 | #include <scsi/scsi.h> | 31 | #include <scsi/scsi.h> |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 4bc8b77a2ef3..38518b088073 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/kthread.h> | 33 | #include <linux/kthread.h> |
34 | #include <linux/spinlock.h> | 34 | #include <linux/spinlock.h> |
35 | #include <linux/async.h> | 35 | #include <linux/async.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <scsi/scsi.h> | 38 | #include <scsi/scsi.h> |
38 | #include <scsi/scsi_cmnd.h> | 39 | #include <scsi/scsi_cmnd.h> |
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 19ec9e2d3f39..429c9b73e3e4 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/init.h> | 11 | #include <linux/init.h> |
11 | #include <linux/blkdev.h> | 12 | #include <linux/blkdev.h> |
12 | #include <linux/device.h> | 13 | #include <linux/device.h> |
diff --git a/drivers/scsi/scsi_tgt_if.c b/drivers/scsi/scsi_tgt_if.c index 0e9533f7aabc..a87e21c35ef2 100644 --- a/drivers/scsi/scsi_tgt_if.c +++ b/drivers/scsi/scsi_tgt_if.c | |||
@@ -20,6 +20,7 @@ | |||
20 | * 02110-1301 USA | 20 | * 02110-1301 USA |
21 | */ | 21 | */ |
22 | #include <linux/miscdevice.h> | 22 | #include <linux/miscdevice.h> |
23 | #include <linux/gfp.h> | ||
23 | #include <linux/file.h> | 24 | #include <linux/file.h> |
24 | #include <linux/smp_lock.h> | 25 | #include <linux/smp_lock.h> |
25 | #include <net/tcp.h> | 26 | #include <net/tcp.h> |
diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c index 10303272ba45..66241dd525ae 100644 --- a/drivers/scsi/scsi_tgt_lib.c +++ b/drivers/scsi/scsi_tgt_lib.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/hash.h> | 23 | #include <linux/hash.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/pagemap.h> | 25 | #include <linux/pagemap.h> |
26 | #include <linux/slab.h> | ||
26 | #include <scsi/scsi.h> | 27 | #include <scsi/scsi.h> |
27 | #include <scsi/scsi_cmnd.h> | 28 | #include <scsi/scsi_cmnd.h> |
28 | #include <scsi/scsi_device.h> | 29 | #include <scsi/scsi_device.h> |
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 1d5b72173dd8..6cfffc88022a 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
31 | #include <scsi/scsi_device.h> | 32 | #include <scsi/scsi_device.h> |
32 | #include <scsi/scsi_host.h> | 33 | #include <scsi/scsi_host.h> |
@@ -3852,7 +3853,7 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost, | |||
3852 | if (rport && (rport->port_state != FC_PORTSTATE_ONLINE)) { | 3853 | if (rport && (rport->port_state != FC_PORTSTATE_ONLINE)) { |
3853 | req->errors = -ENXIO; | 3854 | req->errors = -ENXIO; |
3854 | spin_unlock_irq(q->queue_lock); | 3855 | spin_unlock_irq(q->queue_lock); |
3855 | blk_end_request(req, -ENXIO, blk_rq_bytes(req)); | 3856 | blk_end_request_all(req, -ENXIO); |
3856 | spin_lock_irq(q->queue_lock); | 3857 | spin_lock_irq(q->queue_lock); |
3857 | continue; | 3858 | continue; |
3858 | } | 3859 | } |
@@ -3862,7 +3863,7 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost, | |||
3862 | ret = fc_req_to_bsgjob(shost, rport, req); | 3863 | ret = fc_req_to_bsgjob(shost, rport, req); |
3863 | if (ret) { | 3864 | if (ret) { |
3864 | req->errors = ret; | 3865 | req->errors = ret; |
3865 | blk_end_request(req, ret, blk_rq_bytes(req)); | 3866 | blk_end_request_all(req, ret); |
3866 | spin_lock_irq(q->queue_lock); | 3867 | spin_lock_irq(q->queue_lock); |
3867 | continue; | 3868 | continue; |
3868 | } | 3869 | } |
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index ea3892e7e0f7..1e6d4793542c 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/mutex.h> | 24 | #include <linux/mutex.h> |
25 | #include <linux/slab.h> | ||
25 | #include <net/tcp.h> | 26 | #include <net/tcp.h> |
26 | #include <scsi/scsi.h> | 27 | #include <scsi/scsi.h> |
27 | #include <scsi/scsi_host.h> | 28 | #include <scsi/scsi_host.h> |
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index c25bd9a34e02..8a172d4f4564 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/blkdev.h> | 25 | #include <linux/blkdev.h> |
26 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
27 | #include <linux/sysfs.h> | 27 | #include <linux/sysfs.h> |
28 | #include <linux/slab.h> | ||
28 | #include <scsi/scsi.h> | 29 | #include <scsi/scsi.h> |
29 | #include "scsi_priv.h" | 30 | #include "scsi_priv.h" |
30 | #include <scsi/scsi_device.h> | 31 | #include <scsi/scsi_device.h> |
diff --git a/drivers/scsi/scsicam.c b/drivers/scsi/scsicam.c index 3f21bc65e8c6..6803b1e26ecc 100644 --- a/drivers/scsi/scsicam.c +++ b/drivers/scsi/scsicam.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
15 | #include <linux/genhd.h> | 16 | #include <linux/genhd.h> |
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 7b75c8a2a49d..8b827f37b03e 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/mutex.h> | 49 | #include <linux/mutex.h> |
50 | #include <linux/string_helpers.h> | 50 | #include <linux/string_helpers.h> |
51 | #include <linux/async.h> | 51 | #include <linux/async.h> |
52 | #include <linux/slab.h> | ||
52 | #include <asm/uaccess.h> | 53 | #include <asm/uaccess.h> |
53 | #include <asm/unaligned.h> | 54 | #include <asm/unaligned.h> |
54 | 55 | ||
@@ -2185,7 +2186,7 @@ static void sd_probe_async(void *data, async_cookie_t cookie) | |||
2185 | blk_queue_prep_rq(sdp->request_queue, sd_prep_fn); | 2186 | blk_queue_prep_rq(sdp->request_queue, sd_prep_fn); |
2186 | 2187 | ||
2187 | gd->driverfs_dev = &sdp->sdev_gendev; | 2188 | gd->driverfs_dev = &sdp->sdev_gendev; |
2188 | gd->flags = GENHD_FL_EXT_DEVT | GENHD_FL_DRIVERFS; | 2189 | gd->flags = GENHD_FL_EXT_DEVT; |
2189 | if (sdp->removable) | 2190 | if (sdp->removable) |
2190 | gd->flags |= GENHD_FL_REMOVABLE; | 2191 | gd->flags |= GENHD_FL_REMOVABLE; |
2191 | 2192 | ||
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index 0d9d6f7567f5..7f5a6a86f820 100644 --- a/drivers/scsi/ses.c +++ b/drivers/scsi/ses.c | |||
@@ -21,6 +21,7 @@ | |||
21 | **----------------------------------------------------------------------------- | 21 | **----------------------------------------------------------------------------- |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/slab.h> | ||
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
25 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
26 | #include <linux/enclosure.h> | 27 | #include <linux/enclosure.h> |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index c996d98636f3..dee1c96288d4 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -38,6 +38,7 @@ static int sg_version_num = 30534; /* 2 digits for each component */ | |||
38 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
39 | #include <linux/mtio.h> | 39 | #include <linux/mtio.h> |
40 | #include <linux/ioctl.h> | 40 | #include <linux/ioctl.h> |
41 | #include <linux/slab.h> | ||
41 | #include <linux/fcntl.h> | 42 | #include <linux/fcntl.h> |
42 | #include <linux/init.h> | 43 | #include <linux/init.h> |
43 | #include <linux/poll.h> | 44 | #include <linux/poll.h> |
diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c index 6dc8b846c112..8ac6ce792b69 100644 --- a/drivers/scsi/sim710.c +++ b/drivers/scsi/sim710.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <linux/blkdev.h> | 32 | #include <linux/blkdev.h> |
32 | #include <linux/device.h> | 33 | #include <linux/device.h> |
diff --git a/drivers/scsi/sni_53c710.c b/drivers/scsi/sni_53c710.c index 56cf0bb4ed1f..9acc2b2a3601 100644 --- a/drivers/scsi/sni_53c710.c +++ b/drivers/scsi/sni_53c710.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/stat.h> | 34 | #include <linux/stat.h> |
34 | #include <linux/mm.h> | 35 | #include <linux/mm.h> |
35 | #include <linux/blkdev.h> | 36 | #include <linux/blkdev.h> |
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index d6f340f48a3b..0a90abc7f140 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/init.h> | 44 | #include <linux/init.h> |
45 | #include <linux/blkdev.h> | 45 | #include <linux/blkdev.h> |
46 | #include <linux/mutex.h> | 46 | #include <linux/mutex.h> |
47 | #include <linux/slab.h> | ||
47 | #include <asm/uaccess.h> | 48 | #include <asm/uaccess.h> |
48 | 49 | ||
49 | #include <scsi/scsi.h> | 50 | #include <scsi/scsi.h> |
diff --git a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c index 291236e6e435..cbb38c5197fa 100644 --- a/drivers/scsi/sr_ioctl.c +++ b/drivers/scsi/sr_ioctl.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/blkpg.h> | 7 | #include <linux/blkpg.h> |
8 | #include <linux/cdrom.h> | 8 | #include <linux/cdrom.h> |
9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
10 | #include <linux/slab.h> | ||
10 | #include <asm/io.h> | 11 | #include <asm/io.h> |
11 | #include <asm/uaccess.h> | 12 | #include <asm/uaccess.h> |
12 | 13 | ||
diff --git a/drivers/scsi/sr_vendor.c b/drivers/scsi/sr_vendor.c index 4ad3e017213f..92cc2efb25d7 100644 --- a/drivers/scsi/sr_vendor.c +++ b/drivers/scsi/sr_vendor.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/string.h> | 39 | #include <linux/string.h> |
40 | #include <linux/bcd.h> | 40 | #include <linux/bcd.h> |
41 | #include <linux/blkdev.h> | 41 | #include <linux/blkdev.h> |
42 | #include <linux/slab.h> | ||
42 | 43 | ||
43 | #include <scsi/scsi.h> | 44 | #include <scsi/scsi.h> |
44 | #include <scsi/scsi_cmnd.h> | 45 | #include <scsi/scsi_cmnd.h> |
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index f67d1a159aad..3ea1a713ef25 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -27,6 +27,7 @@ static const char *verstr = "20081215"; | |||
27 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/string.h> | 29 | #include <linux/string.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
31 | #include <linux/mtio.h> | 32 | #include <linux/mtio.h> |
32 | #include <linux/cdrom.h> | 33 | #include <linux/cdrom.h> |
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index fd7b15be7640..9c73dbda3bbb 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/time.h> | 21 | #include <linux/time.h> |
21 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
22 | #include <linux/blkdev.h> | 23 | #include <linux/blkdev.h> |
diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c index 75da6e58ce55..b5838d547c68 100644 --- a/drivers/scsi/sun3_NCR5380.c +++ b/drivers/scsi/sun3_NCR5380.c | |||
@@ -645,6 +645,7 @@ __inline__ void NCR5380_print_phase(struct Scsi_Host *instance) { }; | |||
645 | * interrupt or bottom half. | 645 | * interrupt or bottom half. |
646 | */ | 646 | */ |
647 | 647 | ||
648 | #include <linux/gfp.h> | ||
648 | #include <linux/workqueue.h> | 649 | #include <linux/workqueue.h> |
649 | #include <linux/interrupt.h> | 650 | #include <linux/interrupt.h> |
650 | 651 | ||
diff --git a/drivers/scsi/sun3x_esp.c b/drivers/scsi/sun3x_esp.c index 34a99620e5bd..0621037f0271 100644 --- a/drivers/scsi/sun3x_esp.c +++ b/drivers/scsi/sun3x_esp.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/gfp.h> | ||
7 | #include <linux/types.h> | 8 | #include <linux/types.h> |
8 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
9 | #include <linux/module.h> | 10 | #include <linux/module.h> |
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c index 3d73aad4bc82..fc23d273fb1a 100644 --- a/drivers/scsi/sun_esp.c +++ b/drivers/scsi/sun_esp.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
13 | #include <linux/of.h> | 13 | #include <linux/of.h> |
14 | #include <linux/of_device.h> | 14 | #include <linux/of_device.h> |
15 | #include <linux/gfp.h> | ||
15 | 16 | ||
16 | #include <asm/irq.h> | 17 | #include <asm/irq.h> |
17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c index 9a4273445c0d..27866b0adfeb 100644 --- a/drivers/scsi/tmscsim.c +++ b/drivers/scsi/tmscsim.c | |||
@@ -233,6 +233,7 @@ | |||
233 | #include <linux/interrupt.h> | 233 | #include <linux/interrupt.h> |
234 | #include <linux/init.h> | 234 | #include <linux/init.h> |
235 | #include <linux/spinlock.h> | 235 | #include <linux/spinlock.h> |
236 | #include <linux/slab.h> | ||
236 | #include <asm/io.h> | 237 | #include <asm/io.h> |
237 | 238 | ||
238 | #include <scsi/scsi.h> | 239 | #include <scsi/scsi.h> |
diff --git a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c index 26e8e0e6b8dd..5d9fdeeb2315 100644 --- a/drivers/scsi/u14-34f.c +++ b/drivers/scsi/u14-34f.c | |||
@@ -420,6 +420,7 @@ | |||
420 | #include <linux/init.h> | 420 | #include <linux/init.h> |
421 | #include <linux/ctype.h> | 421 | #include <linux/ctype.h> |
422 | #include <linux/spinlock.h> | 422 | #include <linux/spinlock.h> |
423 | #include <linux/slab.h> | ||
423 | #include <asm/dma.h> | 424 | #include <asm/dma.h> |
424 | #include <asm/irq.h> | 425 | #include <asm/irq.h> |
425 | 426 | ||
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c index e4ac5829b637..26894459c37f 100644 --- a/drivers/scsi/vmw_pvscsi.c +++ b/drivers/scsi/vmw_pvscsi.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/workqueue.h> | 28 | #include <linux/workqueue.h> |
28 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
29 | 30 | ||
diff --git a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c index 2f6e9d8eaf71..d0b7d2ff9ac5 100644 --- a/drivers/scsi/wd7000.c +++ b/drivers/scsi/wd7000.c | |||
@@ -171,7 +171,6 @@ | |||
171 | #include <linux/kernel.h> | 171 | #include <linux/kernel.h> |
172 | #include <linux/types.h> | 172 | #include <linux/types.h> |
173 | #include <linux/string.h> | 173 | #include <linux/string.h> |
174 | #include <linux/slab.h> | ||
175 | #include <linux/spinlock.h> | 174 | #include <linux/spinlock.h> |
176 | #include <linux/ioport.h> | 175 | #include <linux/ioport.h> |
177 | #include <linux/proc_fs.h> | 176 | #include <linux/proc_fs.h> |
diff --git a/drivers/scsi/zorro7xx.c b/drivers/scsi/zorro7xx.c index 64d40a2d4d4d..105449c15fa9 100644 --- a/drivers/scsi/zorro7xx.c +++ b/drivers/scsi/zorro7xx.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/zorro.h> | 15 | #include <linux/zorro.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #include <asm/amigahw.h> | 18 | #include <asm/amigahw.h> |
18 | #include <asm/amigaints.h> | 19 | #include <asm/amigaints.h> |
diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c index ae0251ef6f4e..78ed24bb6a35 100644 --- a/drivers/serial/68328serial.c +++ b/drivers/serial/68328serial.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/pm.h> | 35 | #include <linux/pm.h> |
36 | #include <linux/bitops.h> | 36 | #include <linux/bitops.h> |
37 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
38 | #include <linux/gfp.h> | ||
38 | 39 | ||
39 | #include <asm/io.h> | 40 | #include <asm/io.h> |
40 | #include <asm/irq.h> | 41 | #include <asm/irq.h> |
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index c3db16b7afa1..2b1ea3d4c4f4 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/serial_8250.h> | 38 | #include <linux/serial_8250.h> |
39 | #include <linux/nmi.h> | 39 | #include <linux/nmi.h> |
40 | #include <linux/mutex.h> | 40 | #include <linux/mutex.h> |
41 | #include <linux/slab.h> | ||
41 | 42 | ||
42 | #include <asm/io.h> | 43 | #include <asm/io.h> |
43 | #include <asm/irq.h> | 44 | #include <asm/irq.h> |
diff --git a/drivers/serial/8250_gsc.c b/drivers/serial/8250_gsc.c index 33149d982e82..d8c0ffbfa6e3 100644 --- a/drivers/serial/8250_gsc.c +++ b/drivers/serial/8250_gsc.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/serial_core.h> | 17 | #include <linux/serial_core.h> |
18 | #include <linux/signal.h> | 18 | #include <linux/signal.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/types.h> | 19 | #include <linux/types.h> |
21 | 20 | ||
22 | #include <asm/hardware.h> | 21 | #include <asm/hardware.h> |
diff --git a/drivers/serial/8250_hp300.c b/drivers/serial/8250_hp300.c index 0e1410f2c033..c13438c93012 100644 --- a/drivers/serial/8250_hp300.c +++ b/drivers/serial/8250_hp300.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/dio.h> | 16 | #include <linux/dio.h> |
17 | #include <linux/console.h> | 17 | #include <linux/console.h> |
18 | #include <linux/slab.h> | ||
18 | #include <asm/io.h> | 19 | #include <asm/io.h> |
19 | 20 | ||
20 | #include "8250.h" | 21 | #include "8250.h" |
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index e4b3c2c88bb6..b09a638d051f 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/amba/bus.h> | 47 | #include <linux/amba/bus.h> |
48 | #include <linux/amba/serial.h> | 48 | #include <linux/amba/serial.h> |
49 | #include <linux/clk.h> | 49 | #include <linux/clk.h> |
50 | #include <linux/slab.h> | ||
50 | 51 | ||
51 | #include <asm/io.h> | 52 | #include <asm/io.h> |
52 | 53 | ||
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index ce6c35333ff7..743ebf5f16da 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/amba/bus.h> | 47 | #include <linux/amba/bus.h> |
48 | #include <linux/amba/serial.h> | 48 | #include <linux/amba/serial.h> |
49 | #include <linux/clk.h> | 49 | #include <linux/clk.h> |
50 | #include <linux/slab.h> | ||
50 | 51 | ||
51 | #include <asm/io.h> | 52 | #include <asm/io.h> |
52 | #include <asm/sizes.h> | 53 | #include <asm/sizes.h> |
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index fcf273e3f48c..96f7e7484fee 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/ioport.h> | 16 | #include <linux/ioport.h> |
17 | #include <linux/gfp.h> | ||
17 | #include <linux/io.h> | 18 | #include <linux/io.h> |
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <linux/console.h> | 20 | #include <linux/console.h> |
diff --git a/drivers/serial/bfin_sport_uart.c b/drivers/serial/bfin_sport_uart.c index 7c72888fbf94..c88f8ad3ff82 100644 --- a/drivers/serial/bfin_sport_uart.c +++ b/drivers/serial/bfin_sport_uart.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/console.h> | 29 | #include <linux/console.h> |
30 | #include <linux/sysrq.h> | 30 | #include <linux/sysrq.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
32 | #include <linux/tty.h> | 33 | #include <linux/tty.h> |
33 | #include <linux/tty_flip.h> | 34 | #include <linux/tty_flip.h> |
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c index 1b94c56ec239..3fc1d66e32c6 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/tty.h> | 31 | #include <linux/tty.h> |
32 | #include <linux/gfp.h> | ||
32 | #include <linux/ioport.h> | 33 | #include <linux/ioport.h> |
33 | #include <linux/init.h> | 34 | #include <linux/init.h> |
34 | #include <linux/serial.h> | 35 | #include <linux/serial.h> |
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c index 722eac18f382..814ac006393f 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/tty.h> | 31 | #include <linux/tty.h> |
32 | #include <linux/ioport.h> | 32 | #include <linux/ioport.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/init.h> | 34 | #include <linux/init.h> |
34 | #include <linux/serial.h> | 35 | #include <linux/serial.h> |
35 | #include <linux/console.h> | 36 | #include <linux/console.h> |
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index e579d7a1807a..4315b23590bd 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/clk.h> | 46 | #include <linux/clk.h> |
47 | #include <linux/delay.h> | 47 | #include <linux/delay.h> |
48 | #include <linux/rational.h> | 48 | #include <linux/rational.h> |
49 | #include <linux/slab.h> | ||
49 | 50 | ||
50 | #include <asm/io.h> | 51 | #include <asm/io.h> |
51 | #include <asm/irq.h> | 52 | #include <asm/irq.h> |
diff --git a/drivers/serial/ioc3_serial.c b/drivers/serial/ioc3_serial.c index 23ba6b40b3ac..f164ba4eba02 100644 --- a/drivers/serial/ioc3_serial.c +++ b/drivers/serial/ioc3_serial.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
21 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
22 | #include <linux/ioc3.h> | 22 | #include <linux/ioc3.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | /* | 25 | /* |
25 | * Interesting things about the ioc3 | 26 | * Interesting things about the ioc3 |
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c index 836d9ab4f729..8ad28fc64926 100644 --- a/drivers/serial/ioc4_serial.c +++ b/drivers/serial/ioc4_serial.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/ioc4.h> | 23 | #include <linux/ioc4.h> |
24 | #include <linux/serial_core.h> | 24 | #include <linux/serial_core.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | /* | 27 | /* |
27 | * interesting things about the ioc4 | 28 | * interesting things about the ioc4 |
diff --git a/drivers/serial/jsm/jsm_driver.c b/drivers/serial/jsm/jsm_driver.c index 12cb5e446a4f..eaf545014119 100644 --- a/drivers/serial/jsm/jsm_driver.c +++ b/drivers/serial/jsm/jsm_driver.c | |||
@@ -26,6 +26,7 @@ | |||
26 | ***********************************************************************/ | 26 | ***********************************************************************/ |
27 | #include <linux/moduleparam.h> | 27 | #include <linux/moduleparam.h> |
28 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include "jsm.h" | 31 | #include "jsm.h" |
31 | 32 | ||
diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c index 5673ca9dfdc8..7a4a914ecff0 100644 --- a/drivers/serial/jsm/jsm_tty.c +++ b/drivers/serial/jsm/jsm_tty.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/serial_reg.h> | 30 | #include <linux/serial_reg.h> |
31 | #include <linux/delay.h> /* For udelay */ | 31 | #include <linux/delay.h> /* For udelay */ |
32 | #include <linux/pci.h> | 32 | #include <linux/pci.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include "jsm.h" | 35 | #include "jsm.h" |
35 | 36 | ||
diff --git a/drivers/serial/max3100.c b/drivers/serial/max3100.c index 3c30c56aa2e1..3351c3bd59e4 100644 --- a/drivers/serial/max3100.c +++ b/drivers/serial/max3100.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #define MAX_MAX3100 4 | 41 | #define MAX_MAX3100 4 |
42 | 42 | ||
43 | #include <linux/delay.h> | 43 | #include <linux/delay.h> |
44 | #include <linux/slab.h> | ||
44 | #include <linux/device.h> | 45 | #include <linux/device.h> |
45 | #include <linux/serial_core.h> | 46 | #include <linux/serial_core.h> |
46 | #include <linux/serial.h> | 47 | #include <linux/serial.h> |
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c index b5496c28e60b..55e113a0be03 100644 --- a/drivers/serial/mpsc.c +++ b/drivers/serial/mpsc.c | |||
@@ -70,6 +70,7 @@ | |||
70 | #include <linux/dma-mapping.h> | 70 | #include <linux/dma-mapping.h> |
71 | #include <linux/mv643xx.h> | 71 | #include <linux/mv643xx.h> |
72 | #include <linux/platform_device.h> | 72 | #include <linux/platform_device.h> |
73 | #include <linux/gfp.h> | ||
73 | 74 | ||
74 | #include <asm/io.h> | 75 | #include <asm/io.h> |
75 | #include <asm/irq.h> | 76 | #include <asm/irq.h> |
diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c index 7571aaa138b0..9711e06a8374 100644 --- a/drivers/serial/mux.c +++ b/drivers/serial/mux.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/serial.h> | 23 | #include <linux/serial.h> |
24 | #include <linux/console.h> | 24 | #include <linux/console.h> |
25 | #include <linux/slab.h> | ||
26 | #include <linux/delay.h> /* for udelay */ | 25 | #include <linux/delay.h> /* for udelay */ |
27 | #include <linux/device.h> | 26 | #include <linux/device.h> |
28 | #include <asm/io.h> | 27 | #include <asm/io.h> |
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c index cdf172eda2e3..4abfebdb0fcc 100644 --- a/drivers/serial/of_serial.c +++ b/drivers/serial/of_serial.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/serial_core.h> | 15 | #include <linux/serial_core.h> |
15 | #include <linux/serial_8250.h> | 16 | #include <linux/serial_8250.h> |
16 | #include <linux/of_platform.h> | 17 | #include <linux/of_platform.h> |
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index f020de1cdd50..4eaa043ca2a8 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
@@ -54,7 +54,6 @@ | |||
54 | #include <linux/delay.h> | 54 | #include <linux/delay.h> |
55 | #include <linux/init.h> | 55 | #include <linux/init.h> |
56 | #include <linux/console.h> | 56 | #include <linux/console.h> |
57 | #include <linux/slab.h> | ||
58 | #include <linux/adb.h> | 57 | #include <linux/adb.h> |
59 | #include <linux/pmu.h> | 58 | #include <linux/pmu.h> |
60 | #include <linux/bitops.h> | 59 | #include <linux/bitops.h> |
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index 56ee082157aa..1102a39b44f5 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/serial_core.h> | 44 | #include <linux/serial_core.h> |
45 | #include <linux/clk.h> | 45 | #include <linux/clk.h> |
46 | #include <linux/io.h> | 46 | #include <linux/io.h> |
47 | #include <linux/slab.h> | ||
47 | 48 | ||
48 | struct uart_pxa_port { | 49 | struct uart_pxa_port { |
49 | struct uart_port port; | 50 | struct uart_port port; |
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index f7b9aff88f4a..8eb094c1f61b 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/list.h> | 50 | #include <linux/list.h> |
51 | #include <linux/dmaengine.h> | 51 | #include <linux/dmaengine.h> |
52 | #include <linux/scatterlist.h> | 52 | #include <linux/scatterlist.h> |
53 | #include <linux/slab.h> | ||
53 | 54 | ||
54 | #ifdef CONFIG_SUPERH | 55 | #ifdef CONFIG_SUPERH |
55 | #include <asm/sh_bios.h> | 56 | #include <asm/sh_bios.h> |
@@ -779,10 +780,6 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr) | |||
779 | if ((ssr_status & SCxSR_BRK(port)) && err_enabled) | 780 | if ((ssr_status & SCxSR_BRK(port)) && err_enabled) |
780 | ret = sci_br_interrupt(irq, ptr); | 781 | ret = sci_br_interrupt(irq, ptr); |
781 | 782 | ||
782 | WARN_ONCE(ret == IRQ_NONE, | ||
783 | "%s: %d IRQ %d, status %x, control %x\n", __func__, | ||
784 | irq, port->line, ssr_status, scr_status); | ||
785 | |||
786 | return ret; | 783 | return ret; |
787 | } | 784 | } |
788 | 785 | ||
diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h index fad67d33b0bd..f70c49f915fa 100644 --- a/drivers/serial/sh-sci.h +++ b/drivers/serial/sh-sci.h | |||
@@ -31,7 +31,9 @@ | |||
31 | # define SCSCR_INIT(port) (port->mapbase == SCIF2) ? 0xF3 : 0xF0 | 31 | # define SCSCR_INIT(port) (port->mapbase == SCIF2) ? 0xF3 : 0xF0 |
32 | #elif defined(CONFIG_CPU_SUBTYPE_SH7720) || \ | 32 | #elif defined(CONFIG_CPU_SUBTYPE_SH7720) || \ |
33 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ | 33 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ |
34 | defined(CONFIG_ARCH_SHMOBILE) | 34 | defined(CONFIG_ARCH_SH7367) || \ |
35 | defined(CONFIG_ARCH_SH7377) || \ | ||
36 | defined(CONFIG_ARCH_SH7372) | ||
35 | # define SCSCR_INIT(port) 0x0030 /* TIE=0,RIE=0,TE=1,RE=1 */ | 37 | # define SCSCR_INIT(port) 0x0030 /* TIE=0,RIE=0,TE=1,RE=1 */ |
36 | # define PORT_PTCR 0xA405011EUL | 38 | # define PORT_PTCR 0xA405011EUL |
37 | # define PORT_PVCR 0xA4050122UL | 39 | # define PORT_PVCR 0xA4050122UL |
@@ -94,7 +96,9 @@ | |||
94 | # define SCSCR_INIT(port) 0x0038 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ | 96 | # define SCSCR_INIT(port) 0x0038 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ |
95 | #elif defined(CONFIG_CPU_SUBTYPE_SH7724) | 97 | #elif defined(CONFIG_CPU_SUBTYPE_SH7724) |
96 | # define SCIF_ORER 0x0001 /* overrun error bit */ | 98 | # define SCIF_ORER 0x0001 /* overrun error bit */ |
97 | # define SCSCR_INIT(port) 0x0038 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ | 99 | # define SCSCR_INIT(port) ((port)->type == PORT_SCIFA ? \ |
100 | 0x30 /* TIE=0,RIE=0,TE=1,RE=1 */ : \ | ||
101 | 0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ ) | ||
98 | #elif defined(CONFIG_CPU_SUBTYPE_SH4_202) | 102 | #elif defined(CONFIG_CPU_SUBTYPE_SH4_202) |
99 | # define SCSPTR2 0xffe80020 /* 16 bit SCIF */ | 103 | # define SCSPTR2 0xffe80020 /* 16 bit SCIF */ |
100 | # define SCIF_ORER 0x0001 /* overrun error bit */ | 104 | # define SCIF_ORER 0x0001 /* overrun error bit */ |
@@ -197,6 +201,8 @@ | |||
197 | defined(CONFIG_CPU_SUBTYPE_SH7786) || \ | 201 | defined(CONFIG_CPU_SUBTYPE_SH7786) || \ |
198 | defined(CONFIG_CPU_SUBTYPE_SHX3) | 202 | defined(CONFIG_CPU_SUBTYPE_SHX3) |
199 | #define SCI_CTRL_FLAGS_REIE 0x08 /* 7750 SCIF */ | 203 | #define SCI_CTRL_FLAGS_REIE 0x08 /* 7750 SCIF */ |
204 | #elif defined(CONFIG_CPU_SUBTYPE_SH7724) | ||
205 | #define SCI_CTRL_FLAGS_REIE ((port)->type == PORT_SCIFA ? 0 : 8) | ||
200 | #else | 206 | #else |
201 | #define SCI_CTRL_FLAGS_REIE 0 | 207 | #define SCI_CTRL_FLAGS_REIE 0 |
202 | #endif | 208 | #endif |
@@ -230,7 +236,9 @@ | |||
230 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ | 236 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ |
231 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ | 237 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ |
232 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ | 238 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ |
233 | defined(CONFIG_ARCH_SHMOBILE) | 239 | defined(CONFIG_ARCH_SH7367) || \ |
240 | defined(CONFIG_ARCH_SH7377) || \ | ||
241 | defined(CONFIG_ARCH_SH7372) | ||
234 | # define SCIF_ORER 0x0200 | 242 | # define SCIF_ORER 0x0200 |
235 | # define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK | SCIF_ORER) | 243 | # define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK | SCIF_ORER) |
236 | # define SCIF_RFDC_MASK 0x007f | 244 | # define SCIF_RFDC_MASK 0x007f |
@@ -264,7 +272,9 @@ | |||
264 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ | 272 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ |
265 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ | 273 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ |
266 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ | 274 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ |
267 | defined(CONFIG_ARCH_SHMOBILE) | 275 | defined(CONFIG_ARCH_SH7367) || \ |
276 | defined(CONFIG_ARCH_SH7377) || \ | ||
277 | defined(CONFIG_ARCH_SH7372) | ||
268 | # define SCxSR_RDxF_CLEAR(port) (sci_in(port, SCxSR) & 0xfffc) | 278 | # define SCxSR_RDxF_CLEAR(port) (sci_in(port, SCxSR) & 0xfffc) |
269 | # define SCxSR_ERROR_CLEAR(port) (sci_in(port, SCxSR) & 0xfd73) | 279 | # define SCxSR_ERROR_CLEAR(port) (sci_in(port, SCxSR) & 0xfd73) |
270 | # define SCxSR_TDxE_CLEAR(port) (sci_in(port, SCxSR) & 0xffdf) | 280 | # define SCxSR_TDxE_CLEAR(port) (sci_in(port, SCxSR) & 0xffdf) |
@@ -359,7 +369,10 @@ | |||
359 | SCI_OUT(sci_size, sci_offset, value); \ | 369 | SCI_OUT(sci_size, sci_offset, value); \ |
360 | } | 370 | } |
361 | 371 | ||
362 | #if defined(CONFIG_CPU_SH3) || defined(CONFIG_ARCH_SHMOBILE) | 372 | #if defined(CONFIG_CPU_SH3) || \ |
373 | defined(CONFIG_ARCH_SH7367) || \ | ||
374 | defined(CONFIG_ARCH_SH7377) || \ | ||
375 | defined(CONFIG_ARCH_SH7372) | ||
363 | #if defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712) | 376 | #if defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712) |
364 | #define SCIx_FNS(name, sh3_sci_offset, sh3_sci_size, sh4_sci_offset, sh4_sci_size, \ | 377 | #define SCIx_FNS(name, sh3_sci_offset, sh3_sci_size, sh4_sci_offset, sh4_sci_size, \ |
365 | sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size, \ | 378 | sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size, \ |
@@ -370,7 +383,9 @@ | |||
370 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ | 383 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ |
371 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ | 384 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ |
372 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ | 385 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ |
373 | defined(CONFIG_ARCH_SHMOBILE) | 386 | defined(CONFIG_ARCH_SH7367) || \ |
387 | defined(CONFIG_ARCH_SH7377) || \ | ||
388 | defined(CONFIG_ARCH_SH7372) | ||
374 | #define SCIF_FNS(name, scif_offset, scif_size) \ | 389 | #define SCIF_FNS(name, scif_offset, scif_size) \ |
375 | CPU_SCIF_FNS(name, scif_offset, scif_size) | 390 | CPU_SCIF_FNS(name, scif_offset, scif_size) |
376 | #else | 391 | #else |
@@ -406,7 +421,9 @@ | |||
406 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ | 421 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ |
407 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ | 422 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ |
408 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ | 423 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ |
409 | defined(CONFIG_ARCH_SHMOBILE) | 424 | defined(CONFIG_ARCH_SH7367) || \ |
425 | defined(CONFIG_ARCH_SH7377) || \ | ||
426 | defined(CONFIG_ARCH_SH7372) | ||
410 | 427 | ||
411 | SCIF_FNS(SCSMR, 0x00, 16) | 428 | SCIF_FNS(SCSMR, 0x00, 16) |
412 | SCIF_FNS(SCBRR, 0x04, 8) | 429 | SCIF_FNS(SCBRR, 0x04, 8) |
@@ -589,7 +606,9 @@ static inline int sci_rxd_in(struct uart_port *port) | |||
589 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ | 606 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ |
590 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ | 607 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ |
591 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ | 608 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ |
592 | defined(CONFIG_ARCH_SHMOBILE) | 609 | defined(CONFIG_ARCH_SH7367) || \ |
610 | defined(CONFIG_ARCH_SH7377) || \ | ||
611 | defined(CONFIG_ARCH_SH7372) | ||
593 | #define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1) | 612 | #define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1) |
594 | #elif defined(CONFIG_CPU_SUBTYPE_SH7723) ||\ | 613 | #elif defined(CONFIG_CPU_SUBTYPE_SH7723) ||\ |
595 | defined(CONFIG_CPU_SUBTYPE_SH7724) | 614 | defined(CONFIG_CPU_SUBTYPE_SH7724) |
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 170d3d68c8f0..01f7731e59b8 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/serial.h> | 29 | #include <linux/serial.h> |
30 | #include <linux/sysrq.h> | 30 | #include <linux/sysrq.h> |
31 | #include <linux/console.h> | 31 | #include <linux/console.h> |
32 | #include <linux/slab.h> | ||
32 | #ifdef CONFIG_SERIO | 33 | #ifdef CONFIG_SERIO |
33 | #include <linux/serio.h> | 34 | #include <linux/serio.h> |
34 | #endif | 35 | #endif |
@@ -1453,8 +1454,10 @@ static int __devinit su_probe(struct of_device *op, const struct of_device_id *m | |||
1453 | if (up->su_type == SU_PORT_KBD || up->su_type == SU_PORT_MS) { | 1454 | if (up->su_type == SU_PORT_KBD || up->su_type == SU_PORT_MS) { |
1454 | err = sunsu_kbd_ms_init(up); | 1455 | err = sunsu_kbd_ms_init(up); |
1455 | if (err) { | 1456 | if (err) { |
1457 | of_iounmap(&op->resource[0], | ||
1458 | up->port.membase, up->reg_size); | ||
1456 | kfree(up); | 1459 | kfree(up); |
1457 | goto out_unmap; | 1460 | return err; |
1458 | } | 1461 | } |
1459 | dev_set_drvdata(&op->dev, up); | 1462 | dev_set_drvdata(&op->dev, up); |
1460 | 1463 | ||
diff --git a/drivers/serial/timbuart.c b/drivers/serial/timbuart.c index 7bf10264a6ac..786ba85c170b 100644 --- a/drivers/serial/timbuart.c +++ b/drivers/serial/timbuart.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/ioport.h> | 28 | #include <linux/ioport.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include "timbuart.h" | 31 | #include "timbuart.h" |
31 | 32 | ||
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c index 465f2fae1025..074904912f64 100644 --- a/drivers/serial/ucc_uart.c +++ b/drivers/serial/ucc_uart.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/serial.h> | 22 | #include <linux/serial.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/serial_core.h> | 24 | #include <linux/serial_core.h> |
24 | #include <linux/io.h> | 25 | #include <linux/io.h> |
25 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
diff --git a/drivers/sh/intc.c b/drivers/sh/intc.c index a3d8677af6a5..94ad6bd86a00 100644 --- a/drivers/sh/intc.c +++ b/drivers/sh/intc.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
24 | #include <linux/sh_intc.h> | 25 | #include <linux/sh_intc.h> |
25 | #include <linux/sysdev.h> | 26 | #include <linux/sysdev.h> |
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c index 66802a4390cc..b3b33fa26acd 100644 --- a/drivers/sn/ioc3.c +++ b/drivers/sn/ioc3.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/ioc3.h> | 17 | #include <linux/ioc3.h> |
18 | #include <linux/rwsem.h> | 18 | #include <linux/rwsem.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #define IOC3_PCI_SIZE 0x100000 | 21 | #define IOC3_PCI_SIZE 0x100000 |
21 | 22 | ||
diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c index 9aeb68113100..e9aeee16d922 100644 --- a/drivers/spi/amba-pl022.c +++ b/drivers/spi/amba-pl022.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/amba/bus.h> | 44 | #include <linux/amba/bus.h> |
45 | #include <linux/amba/pl022.h> | 45 | #include <linux/amba/pl022.h> |
46 | #include <linux/io.h> | 46 | #include <linux/io.h> |
47 | #include <linux/slab.h> | ||
47 | 48 | ||
48 | /* | 49 | /* |
49 | * This macro is used to define some register default values. | 50 | * This macro is used to define some register default values. |
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index d21c24eaf0a9..c4e04428992d 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/err.h> | 18 | #include <linux/err.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
23 | #include <mach/board.h> | 24 | #include <mach/board.h> |
diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c index ba8ac4f599d3..3c9ade69643f 100644 --- a/drivers/spi/au1550_spi.c +++ b/drivers/spi/au1550_spi.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
27 | #include <linux/device.h> | 28 | #include <linux/device.h> |
28 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c index 225ab60b02c4..95afb6b77395 100644 --- a/drivers/spi/davinci_spi.c +++ b/drivers/spi/davinci_spi.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
28 | #include <linux/spi/spi.h> | 28 | #include <linux/spi/spi.h> |
29 | #include <linux/spi/spi_bitbang.h> | 29 | #include <linux/spi/spi_bitbang.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <mach/spi.h> | 32 | #include <mach/spi.h> |
32 | #include <mach/edma.h> | 33 | #include <mach/edma.h> |
diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c index 8ed38f1d6c18..d256cb00604c 100644 --- a/drivers/spi/dw_spi.c +++ b/drivers/spi/dw_spi.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/highmem.h> | 22 | #include <linux/highmem.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <linux/spi/dw_spi.h> | 26 | #include <linux/spi/dw_spi.h> |
26 | #include <linux/spi/spi.h> | 27 | #include <linux/spi/spi.h> |
diff --git a/drivers/spi/dw_spi_mmio.c b/drivers/spi/dw_spi_mmio.c index e35b45ac5174..db35bd9c1b24 100644 --- a/drivers/spi/dw_spi_mmio.c +++ b/drivers/spi/dw_spi_mmio.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/clk.h> | 11 | #include <linux/clk.h> |
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/spi/dw_spi.h> | 15 | #include <linux/spi/dw_spi.h> |
15 | #include <linux/spi/spi.h> | 16 | #include <linux/spi/spi.h> |
16 | 17 | ||
diff --git a/drivers/spi/dw_spi_pci.c b/drivers/spi/dw_spi_pci.c index 1f0735f9cc76..1f52755dc878 100644 --- a/drivers/spi/dw_spi_pci.c +++ b/drivers/spi/dw_spi_pci.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/spi/dw_spi.h> | 23 | #include <linux/spi/dw_spi.h> |
23 | #include <linux/spi/spi.h> | 24 | #include <linux/spi/spi.h> |
24 | 25 | ||
diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c index 04747868d6c4..77d4cc88edea 100644 --- a/drivers/spi/mpc52xx_psc_spi.c +++ b/drivers/spi/mpc52xx_psc_spi.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/spi/spi.h> | 25 | #include <linux/spi/spi.h> |
26 | #include <linux/fsl_devices.h> | 26 | #include <linux/fsl_devices.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include <asm/mpc52xx.h> | 29 | #include <asm/mpc52xx.h> |
29 | #include <asm/mpc52xx_psc.h> | 30 | #include <asm/mpc52xx_psc.h> |
diff --git a/drivers/spi/mpc52xx_spi.c b/drivers/spi/mpc52xx_spi.c index 6eab46537a0a..cd68f1ce5cc3 100644 --- a/drivers/spi/mpc52xx_spi.c +++ b/drivers/spi/mpc52xx_spi.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/of_spi.h> | 21 | #include <linux/of_spi.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/of_gpio.h> | 23 | #include <linux/of_gpio.h> |
24 | #include <linux/slab.h> | ||
24 | #include <asm/time.h> | 25 | #include <asm/time.h> |
25 | #include <asm/mpc52xx.h> | 26 | #include <asm/mpc52xx.h> |
26 | 27 | ||
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index 4dd786b99b8b..d8356af118a8 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/err.h> | 32 | #include <linux/err.h> |
33 | #include <linux/clk.h> | 33 | #include <linux/clk.h> |
34 | #include <linux/io.h> | 34 | #include <linux/io.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #include <linux/spi/spi.h> | 37 | #include <linux/spi/spi.h> |
37 | 38 | ||
diff --git a/drivers/spi/omap_spi_100k.c b/drivers/spi/omap_spi_100k.c index 5355d90d1bee..24668b30a52d 100644 --- a/drivers/spi/omap_spi_100k.c +++ b/drivers/spi/omap_spi_100k.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/clk.h> | 33 | #include <linux/clk.h> |
34 | #include <linux/io.h> | 34 | #include <linux/io.h> |
35 | #include <linux/gpio.h> | 35 | #include <linux/gpio.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <linux/spi/spi.h> | 38 | #include <linux/spi/spi.h> |
38 | 39 | ||
diff --git a/drivers/spi/omap_uwire.c b/drivers/spi/omap_uwire.c index 6c3a8557db27..160d3266205f 100644 --- a/drivers/spi/omap_uwire.c +++ b/drivers/spi/omap_uwire.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
42 | #include <linux/err.h> | 42 | #include <linux/err.h> |
43 | #include <linux/clk.h> | 43 | #include <linux/clk.h> |
44 | #include <linux/slab.h> | ||
44 | 45 | ||
45 | #include <linux/spi/spi.h> | 46 | #include <linux/spi/spi.h> |
46 | #include <linux/spi/spi_bitbang.h> | 47 | #include <linux/spi/spi_bitbang.h> |
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index c2f707e5ce74..36828358a4d8 100644 --- a/drivers/spi/pxa2xx_spi.c +++ b/drivers/spi/pxa2xx_spi.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/clk.h> | 30 | #include <linux/clk.h> |
31 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
34 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index b76f2468a84a..9ffb0fdbd6fe 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/cache.h> | 24 | #include <linux/cache.h> |
25 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/mod_devicetable.h> | 27 | #include <linux/mod_devicetable.h> |
27 | #include <linux/spi/spi.h> | 28 | #include <linux/spi/spi.h> |
28 | 29 | ||
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 1d41058bbab2..10a6dc3d37ac 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/io.h> | 16 | #include <linux/io.h> |
16 | #include <linux/ioport.h> | 17 | #include <linux/ioport.h> |
17 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c index f1db395dd889..5265330a528f 100644 --- a/drivers/spi/spi_bitbang.c +++ b/drivers/spi/spi_bitbang.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <linux/spi/spi.h> | 28 | #include <linux/spi/spi.h> |
28 | #include <linux/spi/spi_bitbang.h> | 29 | #include <linux/spi/spi_bitbang.h> |
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 0ddbbe45e834..7972e9077473 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/spi/spi.h> | 34 | #include <linux/spi/spi.h> |
34 | #include <linux/spi/spi_bitbang.h> | 35 | #include <linux/spi/spi_bitbang.h> |
35 | #include <linux/types.h> | 36 | #include <linux/types.h> |
diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c index 4f0cc9d457e0..14d052316502 100644 --- a/drivers/spi/spi_mpc8xxx.c +++ b/drivers/spi/spi_mpc8xxx.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/gpio.h> | 39 | #include <linux/gpio.h> |
40 | #include <linux/of_gpio.h> | 40 | #include <linux/of_gpio.h> |
41 | #include <linux/of_spi.h> | 41 | #include <linux/of_spi.h> |
42 | #include <linux/slab.h> | ||
42 | 43 | ||
43 | #include <sysdev/fsl_soc.h> | 44 | #include <sysdev/fsl_soc.h> |
44 | #include <asm/cpm.h> | 45 | #include <asm/cpm.h> |
diff --git a/drivers/spi/spi_nuc900.c b/drivers/spi/spi_nuc900.c index b319f9bf9b9b..dff63be0d0a8 100644 --- a/drivers/spi/spi_nuc900.c +++ b/drivers/spi/spi_nuc900.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
26 | #include <linux/spi/spi_bitbang.h> | 27 | #include <linux/spi/spi_bitbang.h> |
diff --git a/drivers/spi/spi_ppc4xx.c b/drivers/spi/spi_ppc4xx.c index 6d8d4026a07a..7cb5ff37f6e2 100644 --- a/drivers/spi/spi_ppc4xx.c +++ b/drivers/spi/spi_ppc4xx.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
30 | #include <linux/wait.h> | 31 | #include <linux/wait.h> |
31 | #include <linux/of_platform.h> | 32 | #include <linux/of_platform.h> |
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index 1fabede9e061..151a95e40653 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
26 | #include <linux/spi/spi_bitbang.h> | 27 | #include <linux/spi/spi_bitbang.h> |
diff --git a/drivers/spi/tle62x0.c b/drivers/spi/tle62x0.c index bf9540f5fb98..a3938958147c 100644 --- a/drivers/spi/tle62x0.c +++ b/drivers/spi/tle62x0.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/slab.h> | ||
14 | 15 | ||
15 | #include <linux/spi/spi.h> | 16 | #include <linux/spi/spi.h> |
16 | #include <linux/spi/tle62x0.h> | 17 | #include <linux/spi/tle62x0.h> |
diff --git a/drivers/spi/xilinx_spi_of.c b/drivers/spi/xilinx_spi_of.c index ed34a8d419c7..748d33a76d29 100644 --- a/drivers/spi/xilinx_spi_of.c +++ b/drivers/spi/xilinx_spi_of.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <linux/of_platform.h> | 32 | #include <linux/of_platform.h> |
32 | #include <linux/of_device.h> | 33 | #include <linux/of_device.h> |
diff --git a/drivers/ssb/driver_gige.c b/drivers/ssb/driver_gige.c index 172f90407b93..5ba92a2719a4 100644 --- a/drivers/ssb/driver_gige.c +++ b/drivers/ssb/driver_gige.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/ssb/ssb_driver_gige.h> | 12 | #include <linux/ssb/ssb_driver_gige.h> |
13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
14 | #include <linux/pci_regs.h> | 14 | #include <linux/pci_regs.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | 17 | ||
17 | /* | 18 | /* |
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 03dfd27c4bfb..80ff7d9e60de 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/dma-mapping.h> | 18 | #include <linux/dma-mapping.h> |
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | #include <linux/mmc/sdio_func.h> | 20 | #include <linux/mmc/sdio_func.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <pcmcia/cs_types.h> | 23 | #include <pcmcia/cs_types.h> |
23 | #include <pcmcia/cs.h> | 24 | #include <pcmcia/cs.h> |
diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c index 9e50896233aa..a8dbb06623c9 100644 --- a/drivers/ssb/pci.c +++ b/drivers/ssb/pci.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/ssb/ssb.h> | 18 | #include <linux/ssb/ssb.h> |
19 | #include <linux/ssb/ssb_regs.h> | 19 | #include <linux/ssb/ssb_regs.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
22 | 23 | ||
diff --git a/drivers/ssb/pcihost_wrapper.c b/drivers/ssb/pcihost_wrapper.c index 26737a010c6d..6536a041d90d 100644 --- a/drivers/ssb/pcihost_wrapper.c +++ b/drivers/ssb/pcihost_wrapper.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/ssb/ssb.h> | 16 | #include <linux/ssb/ssb.h> |
16 | 17 | ||
17 | 18 | ||
diff --git a/drivers/ssb/sprom.c b/drivers/ssb/sprom.c index d0e6762fec50..f2f920fef10d 100644 --- a/drivers/ssb/sprom.c +++ b/drivers/ssb/sprom.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include "ssb_private.h" | 14 | #include "ssb_private.h" |
15 | 15 | ||
16 | #include <linux/ctype.h> | 16 | #include <linux/ctype.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | 19 | ||
19 | static const struct ssb_sprom *fallback_sprom; | 20 | static const struct ssb_sprom *fallback_sprom; |
diff --git a/drivers/staging/batman-adv/device.c b/drivers/staging/batman-adv/device.c index e7f44215b5f3..2f61500186f2 100644 --- a/drivers/staging/batman-adv/device.c +++ b/drivers/staging/batman-adv/device.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/slab.h> | ||
23 | #include "main.h" | 24 | #include "main.h" |
24 | #include "device.h" | 25 | #include "device.h" |
25 | #include "send.h" | 26 | #include "send.h" |
diff --git a/drivers/staging/batman-adv/main.h b/drivers/staging/batman-adv/main.h index deb41f5beda6..2e9bb891a5de 100644 --- a/drivers/staging/batman-adv/main.h +++ b/drivers/staging/batman-adv/main.h | |||
@@ -109,6 +109,7 @@ extern int bat_debug_type(int type); | |||
109 | #include <linux/kthread.h> /* kernel threads */ | 109 | #include <linux/kthread.h> /* kernel threads */ |
110 | #include <linux/pkt_sched.h> /* schedule types */ | 110 | #include <linux/pkt_sched.h> /* schedule types */ |
111 | #include <linux/workqueue.h> /* workqueue */ | 111 | #include <linux/workqueue.h> /* workqueue */ |
112 | #include <linux/slab.h> | ||
112 | #include <net/sock.h> /* struct sock */ | 113 | #include <net/sock.h> /* struct sock */ |
113 | #include <linux/jiffies.h> | 114 | #include <linux/jiffies.h> |
114 | #include "types.h" | 115 | #include "types.h" |
diff --git a/drivers/staging/batman-adv/soft-interface.c b/drivers/staging/batman-adv/soft-interface.c index c9b35d9f7991..0e2307f3cb96 100644 --- a/drivers/staging/batman-adv/soft-interface.c +++ b/drivers/staging/batman-adv/soft-interface.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "translation-table.h" | 26 | #include "translation-table.h" |
27 | #include "types.h" | 27 | #include "types.h" |
28 | #include "hash.h" | 28 | #include "hash.h" |
29 | #include <linux/slab.h> | ||
29 | #include <linux/ethtool.h> | 30 | #include <linux/ethtool.h> |
30 | #include <linux/etherdevice.h> | 31 | #include <linux/etherdevice.h> |
31 | 32 | ||
diff --git a/drivers/staging/comedi/drivers/8255.c b/drivers/staging/comedi/drivers/8255.c index 10f488f0e5ee..2d54993ffb12 100644 --- a/drivers/staging/comedi/drivers/8255.c +++ b/drivers/staging/comedi/drivers/8255.c | |||
@@ -81,6 +81,7 @@ I/O port base address can be found in the output of 'lspci -v'. | |||
81 | #include "../comedidev.h" | 81 | #include "../comedidev.h" |
82 | 82 | ||
83 | #include <linux/ioport.h> | 83 | #include <linux/ioport.h> |
84 | #include <linux/slab.h> | ||
84 | 85 | ||
85 | #define _8255_SIZE 4 | 86 | #define _8255_SIZE 4 |
86 | 87 | ||
diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c index 8db5ab63e363..6625fdc8e903 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c | |||
@@ -50,7 +50,6 @@ You should also find the complete GPL in the COPYING file accompanying this sour | |||
50 | #include <linux/module.h> | 50 | #include <linux/module.h> |
51 | #include <linux/sched.h> | 51 | #include <linux/sched.h> |
52 | #include <linux/mm.h> | 52 | #include <linux/mm.h> |
53 | #include <linux/slab.h> | ||
54 | #include <linux/errno.h> | 53 | #include <linux/errno.h> |
55 | #include <linux/ioport.h> | 54 | #include <linux/ioport.h> |
56 | #include <linux/delay.h> | 55 | #include <linux/delay.h> |
@@ -58,6 +57,7 @@ You should also find the complete GPL in the COPYING file accompanying this sour | |||
58 | #include <linux/timex.h> | 57 | #include <linux/timex.h> |
59 | #include <linux/timer.h> | 58 | #include <linux/timer.h> |
60 | #include <linux/pci.h> | 59 | #include <linux/pci.h> |
60 | #include <linux/gfp.h> | ||
61 | #include "../../comedidev.h" | 61 | #include "../../comedidev.h" |
62 | #include <asm/io.h> | 62 | #include <asm/io.h> |
63 | #if defined(CONFIG_APCI_1710) || defined(CONFIG_APCI_3200) || defined(CONFIG_APCI_3300) | 63 | #if defined(CONFIG_APCI_1710) || defined(CONFIG_APCI_3200) || defined(CONFIG_APCI_3300) |
diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c index 9934a3cf2548..944f20ae5a6a 100644 --- a/drivers/staging/comedi/drivers/adl_pci9118.c +++ b/drivers/staging/comedi/drivers/adl_pci9118.c | |||
@@ -66,6 +66,7 @@ Configuration options: | |||
66 | #include "../pci_ids.h" | 66 | #include "../pci_ids.h" |
67 | 67 | ||
68 | #include <linux/delay.h> | 68 | #include <linux/delay.h> |
69 | #include <linux/gfp.h> | ||
69 | #include <linux/interrupt.h> | 70 | #include <linux/interrupt.h> |
70 | 71 | ||
71 | #include "amcc_s5933.h" | 72 | #include "amcc_s5933.h" |
diff --git a/drivers/staging/comedi/drivers/amplc_dio200.c b/drivers/staging/comedi/drivers/amplc_dio200.c index 204f30ef6e96..92bcc205dd4b 100644 --- a/drivers/staging/comedi/drivers/amplc_dio200.c +++ b/drivers/staging/comedi/drivers/amplc_dio200.c | |||
@@ -206,6 +206,7 @@ order they appear in the channel list. | |||
206 | */ | 206 | */ |
207 | 207 | ||
208 | #include <linux/interrupt.h> | 208 | #include <linux/interrupt.h> |
209 | #include <linux/slab.h> | ||
209 | 210 | ||
210 | #include "../comedidev.h" | 211 | #include "../comedidev.h" |
211 | 212 | ||
diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c index b41e5e5963aa..c54cca8b2565 100644 --- a/drivers/staging/comedi/drivers/amplc_pci224.c +++ b/drivers/staging/comedi/drivers/amplc_pci224.c | |||
@@ -104,6 +104,7 @@ Caveats: | |||
104 | */ | 104 | */ |
105 | 105 | ||
106 | #include <linux/interrupt.h> | 106 | #include <linux/interrupt.h> |
107 | #include <linux/slab.h> | ||
107 | 108 | ||
108 | #include "../comedidev.h" | 109 | #include "../comedidev.h" |
109 | 110 | ||
diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c index bc375e73abc1..5632991760af 100644 --- a/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/drivers/staging/comedi/drivers/cb_das16_cs.c | |||
@@ -32,6 +32,7 @@ Status: experimental | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/slab.h> | ||
35 | #include "../comedidev.h" | 36 | #include "../comedidev.h" |
36 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
37 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index d7260cc86985..41311d99473b 100644 --- a/drivers/staging/comedi/drivers/comedi_bond.c +++ b/drivers/staging/comedi/drivers/comedi_bond.c | |||
@@ -90,6 +90,7 @@ Configuration Options: | |||
90 | #include "../comedilib.h" | 90 | #include "../comedilib.h" |
91 | #include "../comedidev.h" | 91 | #include "../comedidev.h" |
92 | #include <linux/string.h> | 92 | #include <linux/string.h> |
93 | #include <linux/slab.h> | ||
93 | 94 | ||
94 | /* The maxiumum number of channels per subdevice. */ | 95 | /* The maxiumum number of channels per subdevice. */ |
95 | #define MAX_CHANS 256 | 96 | #define MAX_CHANS 256 |
diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c index f12ef1cd6f53..9164ce158dcd 100644 --- a/drivers/staging/comedi/drivers/das08_cs.c +++ b/drivers/staging/comedi/drivers/das08_cs.c | |||
@@ -43,6 +43,7 @@ Command support does not exist, but could be added for this board. | |||
43 | 43 | ||
44 | #include <linux/delay.h> | 44 | #include <linux/delay.h> |
45 | #include <linux/pci.h> | 45 | #include <linux/pci.h> |
46 | #include <linux/slab.h> | ||
46 | 47 | ||
47 | #include "das08.h" | 48 | #include "das08.h" |
48 | 49 | ||
diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c index 10a87e6a8095..f2aadda9b241 100644 --- a/drivers/staging/comedi/drivers/das16.c +++ b/drivers/staging/comedi/drivers/das16.c | |||
@@ -79,6 +79,7 @@ Computer boards manuals also available from their website www.measurementcomputi | |||
79 | */ | 79 | */ |
80 | 80 | ||
81 | #include <linux/pci.h> | 81 | #include <linux/pci.h> |
82 | #include <linux/slab.h> | ||
82 | #include <linux/interrupt.h> | 83 | #include <linux/interrupt.h> |
83 | #include <asm/dma.h> | 84 | #include <asm/dma.h> |
84 | #include "../comedidev.h" | 85 | #include "../comedidev.h" |
diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c index 6ea59cc6b2bb..3c3e0455c7c4 100644 --- a/drivers/staging/comedi/drivers/das1800.c +++ b/drivers/staging/comedi/drivers/das1800.c | |||
@@ -101,6 +101,7 @@ TODO: | |||
101 | */ | 101 | */ |
102 | 102 | ||
103 | #include <linux/interrupt.h> | 103 | #include <linux/interrupt.h> |
104 | #include <linux/slab.h> | ||
104 | #include "../comedidev.h" | 105 | #include "../comedidev.h" |
105 | 106 | ||
106 | #include <linux/ioport.h> | 107 | #include <linux/ioport.h> |
diff --git a/drivers/staging/comedi/drivers/dt282x.c b/drivers/staging/comedi/drivers/dt282x.c index 99ca294b1ec5..e548763cf2f3 100644 --- a/drivers/staging/comedi/drivers/dt282x.c +++ b/drivers/staging/comedi/drivers/dt282x.c | |||
@@ -58,6 +58,7 @@ Notes: | |||
58 | 58 | ||
59 | #include "../comedidev.h" | 59 | #include "../comedidev.h" |
60 | 60 | ||
61 | #include <linux/gfp.h> | ||
61 | #include <linux/ioport.h> | 62 | #include <linux/ioport.h> |
62 | #include <linux/interrupt.h> | 63 | #include <linux/interrupt.h> |
63 | #include <asm/dma.h> | 64 | #include <asm/dma.h> |
diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c index fe5b4953f7ec..d330b1886846 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.c +++ b/drivers/staging/comedi/drivers/jr3_pci.c | |||
@@ -46,6 +46,7 @@ Devices: [JR3] PCI force sensor board (jr3_pci) | |||
46 | #include <linux/ctype.h> | 46 | #include <linux/ctype.h> |
47 | #include <linux/firmware.h> | 47 | #include <linux/firmware.h> |
48 | #include <linux/jiffies.h> | 48 | #include <linux/jiffies.h> |
49 | #include <linux/slab.h> | ||
49 | #include <linux/timer.h> | 50 | #include <linux/timer.h> |
50 | #include "comedi_pci.h" | 51 | #include "comedi_pci.h" |
51 | #include "jr3_pci.h" | 52 | #include "jr3_pci.h" |
diff --git a/drivers/staging/comedi/drivers/ni_65xx.c b/drivers/staging/comedi/drivers/ni_65xx.c index c223f76031f6..9a4fffe5655f 100644 --- a/drivers/staging/comedi/drivers/ni_65xx.c +++ b/drivers/staging/comedi/drivers/ni_65xx.c | |||
@@ -52,6 +52,7 @@ except maybe the 6514. | |||
52 | #define DEBUG 1 | 52 | #define DEBUG 1 |
53 | #define DEBUG_FLAGS | 53 | #define DEBUG_FLAGS |
54 | #include <linux/interrupt.h> | 54 | #include <linux/interrupt.h> |
55 | #include <linux/slab.h> | ||
55 | #include "../comedidev.h" | 56 | #include "../comedidev.h" |
56 | 57 | ||
57 | #include "mite.h" | 58 | #include "mite.h" |
diff --git a/drivers/staging/comedi/drivers/ni_670x.c b/drivers/staging/comedi/drivers/ni_670x.c index 1e792d592f73..68221bfba5dd 100644 --- a/drivers/staging/comedi/drivers/ni_670x.c +++ b/drivers/staging/comedi/drivers/ni_670x.c | |||
@@ -42,6 +42,7 @@ Commands are not supported. | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/interrupt.h> | 44 | #include <linux/interrupt.h> |
45 | #include <linux/slab.h> | ||
45 | #include "../comedidev.h" | 46 | #include "../comedidev.h" |
46 | 47 | ||
47 | #include "mite.h" | 48 | #include "mite.h" |
diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c index dd75dfb34309..9bff34cf06d1 100644 --- a/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c | |||
@@ -65,6 +65,7 @@ TRIG_WAKE_EOS | |||
65 | */ | 65 | */ |
66 | 66 | ||
67 | #include <linux/interrupt.h> | 67 | #include <linux/interrupt.h> |
68 | #include <linux/slab.h> | ||
68 | #include "../comedidev.h" | 69 | #include "../comedidev.h" |
69 | 70 | ||
70 | #include <linux/ioport.h> | 71 | #include <linux/ioport.h> |
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c index c9b0395a6103..7ea64538e055 100644 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c | |||
@@ -42,6 +42,7 @@ IRQ is assigned but not used. | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/interrupt.h> | 44 | #include <linux/interrupt.h> |
45 | #include <linux/slab.h> | ||
45 | #include "../comedidev.h" | 46 | #include "../comedidev.h" |
46 | 47 | ||
47 | #include <linux/ioport.h> | 48 | #include <linux/ioport.h> |
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c index 9017be3a92f1..ddc312b5d20d 100644 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c | |||
@@ -41,6 +41,7 @@ the PCMCIA interface. | |||
41 | #undef LABPC_DEBUG | 41 | #undef LABPC_DEBUG |
42 | 42 | ||
43 | #include <linux/interrupt.h> | 43 | #include <linux/interrupt.h> |
44 | #include <linux/slab.h> | ||
44 | #include "../comedidev.h" | 45 | #include "../comedidev.h" |
45 | 46 | ||
46 | #include <linux/ioport.h> | 47 | #include <linux/ioport.h> |
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 3c88caaa9dab..558e525fed37 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c | |||
@@ -77,6 +77,7 @@ NI manuals: | |||
77 | /* #define LABPC_DEBUG enable debugging messages */ | 77 | /* #define LABPC_DEBUG enable debugging messages */ |
78 | 78 | ||
79 | #include <linux/interrupt.h> | 79 | #include <linux/interrupt.h> |
80 | #include <linux/slab.h> | ||
80 | #include "../comedidev.h" | 81 | #include "../comedidev.h" |
81 | 82 | ||
82 | #include <linux/delay.h> | 83 | #include <linux/delay.h> |
diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c index 0b963bb3328b..8ad1055a5cc1 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_cs.c +++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c | |||
@@ -64,6 +64,7 @@ NI manuals: | |||
64 | #include "../comedidev.h" | 64 | #include "../comedidev.h" |
65 | 65 | ||
66 | #include <linux/delay.h> | 66 | #include <linux/delay.h> |
67 | #include <linux/slab.h> | ||
67 | 68 | ||
68 | #include "8253.h" | 69 | #include "8253.h" |
69 | #include "8255.h" | 70 | #include "8255.h" |
diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c index d4634c4f02dc..1ddc19c705a6 100644 --- a/drivers/staging/comedi/drivers/pcl812.c +++ b/drivers/staging/comedi/drivers/pcl812.c | |||
@@ -108,6 +108,7 @@ Options for ACL-8113, ISO-813: | |||
108 | */ | 108 | */ |
109 | 109 | ||
110 | #include <linux/interrupt.h> | 110 | #include <linux/interrupt.h> |
111 | #include <linux/gfp.h> | ||
111 | #include "../comedidev.h" | 112 | #include "../comedidev.h" |
112 | 113 | ||
113 | #include <linux/delay.h> | 114 | #include <linux/delay.h> |
diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c index 9820759ec54f..71c2a3aa379e 100644 --- a/drivers/staging/comedi/drivers/pcl816.c +++ b/drivers/staging/comedi/drivers/pcl816.c | |||
@@ -36,6 +36,7 @@ Configuration Options: | |||
36 | 36 | ||
37 | #include <linux/ioport.h> | 37 | #include <linux/ioport.h> |
38 | #include <linux/mc146818rtc.h> | 38 | #include <linux/mc146818rtc.h> |
39 | #include <linux/gfp.h> | ||
39 | #include <linux/delay.h> | 40 | #include <linux/delay.h> |
40 | #include <asm/dma.h> | 41 | #include <asm/dma.h> |
41 | 42 | ||
diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c index c9d75385755d..9d6aa393ef13 100644 --- a/drivers/staging/comedi/drivers/pcl818.c +++ b/drivers/staging/comedi/drivers/pcl818.c | |||
@@ -102,6 +102,7 @@ A word or two about DMA. Driver support DMA operations at two ways: | |||
102 | 102 | ||
103 | #include <linux/ioport.h> | 103 | #include <linux/ioport.h> |
104 | #include <linux/mc146818rtc.h> | 104 | #include <linux/mc146818rtc.h> |
105 | #include <linux/gfp.h> | ||
105 | #include <linux/delay.h> | 106 | #include <linux/delay.h> |
106 | #include <asm/dma.h> | 107 | #include <asm/dma.h> |
107 | 108 | ||
diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c index 6ca4105610c1..025a52e8981d 100644 --- a/drivers/staging/comedi/drivers/pcmmio.c +++ b/drivers/staging/comedi/drivers/pcmmio.c | |||
@@ -77,6 +77,7 @@ Configuration Options: | |||
77 | */ | 77 | */ |
78 | 78 | ||
79 | #include <linux/interrupt.h> | 79 | #include <linux/interrupt.h> |
80 | #include <linux/slab.h> | ||
80 | #include "../comedidev.h" | 81 | #include "../comedidev.h" |
81 | #include "pcm_common.h" | 82 | #include "pcm_common.h" |
82 | #include <linux/pci.h> /* for PCI devices */ | 83 | #include <linux/pci.h> /* for PCI devices */ |
diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c index c1ae20ffb379..5af4c8448a3a 100644 --- a/drivers/staging/comedi/drivers/pcmuio.c +++ b/drivers/staging/comedi/drivers/pcmuio.c | |||
@@ -76,6 +76,7 @@ Configuration Options: | |||
76 | */ | 76 | */ |
77 | 77 | ||
78 | #include <linux/interrupt.h> | 78 | #include <linux/interrupt.h> |
79 | #include <linux/slab.h> | ||
79 | #include "../comedidev.h" | 80 | #include "../comedidev.h" |
80 | #include "pcm_common.h" | 81 | #include "pcm_common.h" |
81 | 82 | ||
diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c index dd2b90372794..0792617ebc35 100644 --- a/drivers/staging/comedi/drivers/serial2002.c +++ b/drivers/staging/comedi/drivers/serial2002.c | |||
@@ -36,6 +36,7 @@ Status: in development | |||
36 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
37 | #include <linux/ioport.h> | 37 | #include <linux/ioport.h> |
38 | #include <linux/sched.h> | 38 | #include <linux/sched.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | #include <asm/termios.h> | 41 | #include <asm/termios.h> |
41 | #include <asm/ioctls.h> | 42 | #include <asm/ioctls.h> |
diff --git a/drivers/staging/comedi/drivers/unioxx5.c b/drivers/staging/comedi/drivers/unioxx5.c index 75a9a62e1a70..be1d83df0de5 100644 --- a/drivers/staging/comedi/drivers/unioxx5.c +++ b/drivers/staging/comedi/drivers/unioxx5.c | |||
@@ -44,6 +44,7 @@ Devices: [Fastwel] UNIOxx-5 (unioxx5), | |||
44 | 44 | ||
45 | #include "../comedidev.h" | 45 | #include "../comedidev.h" |
46 | #include <linux/ioport.h> | 46 | #include <linux/ioport.h> |
47 | #include <linux/slab.h> | ||
47 | 48 | ||
48 | #define DRIVER_NAME "unioxx5" | 49 | #define DRIVER_NAME "unioxx5" |
49 | #define UNIOXX5_SIZE 0x10 | 50 | #define UNIOXX5_SIZE 0x10 |
diff --git a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c index 6552ef6d8297..288fef4fcbcc 100644 --- a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c +++ b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/ioport.h> | 32 | #include <linux/ioport.h> |
33 | #include <linux/mm.h> | 33 | #include <linux/mm.h> |
34 | #include <linux/slab.h> | ||
35 | #include <asm/io.h> | 34 | #include <asm/io.h> |
36 | 35 | ||
37 | #include "../comedi.h" | 36 | #include "../comedi.h" |
diff --git a/drivers/staging/comedi/kcomedilib/ksyms.c b/drivers/staging/comedi/kcomedilib/ksyms.c index 19293d1f998d..8bf4471ce6c1 100644 --- a/drivers/staging/comedi/kcomedilib/ksyms.c +++ b/drivers/staging/comedi/kcomedilib/ksyms.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/ioport.h> | 35 | #include <linux/ioport.h> |
36 | #include <linux/mm.h> | 36 | #include <linux/mm.h> |
37 | #include <linux/slab.h> | ||
38 | 37 | ||
39 | /* functions specific to kcomedilib */ | 38 | /* functions specific to kcomedilib */ |
40 | 39 | ||
diff --git a/drivers/staging/crystalhd/crystalhd_hw.c b/drivers/staging/crystalhd/crystalhd_hw.c index 01819d34201a..c438c489aa92 100644 --- a/drivers/staging/crystalhd/crystalhd_hw.c +++ b/drivers/staging/crystalhd/crystalhd_hw.c | |||
@@ -23,6 +23,7 @@ | |||
23 | **********************************************************************/ | 23 | **********************************************************************/ |
24 | 24 | ||
25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
27 | #include "crystalhd_hw.h" | 28 | #include "crystalhd_hw.h" |
28 | 29 | ||
diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c index 3eac70aa213c..54bad652c0c5 100644 --- a/drivers/staging/crystalhd/crystalhd_lnx.c +++ b/drivers/staging/crystalhd/crystalhd_lnx.c | |||
@@ -16,6 +16,7 @@ | |||
16 | ***************************************************************************/ | 16 | ***************************************************************************/ |
17 | 17 | ||
18 | #include <linux/version.h> | 18 | #include <linux/version.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include "crystalhd_lnx.h" | 21 | #include "crystalhd_lnx.h" |
21 | 22 | ||
diff --git a/drivers/staging/crystalhd/crystalhd_misc.c b/drivers/staging/crystalhd/crystalhd_misc.c index 587dcc477865..73593b078b33 100644 --- a/drivers/staging/crystalhd/crystalhd_misc.c +++ b/drivers/staging/crystalhd/crystalhd_misc.c | |||
@@ -24,6 +24,8 @@ | |||
24 | * along with this driver. If not, see <http://www.gnu.org/licenses/>. | 24 | * along with this driver. If not, see <http://www.gnu.org/licenses/>. |
25 | **********************************************************************/ | 25 | **********************************************************************/ |
26 | 26 | ||
27 | #include <linux/slab.h> | ||
28 | |||
27 | #include "crystalhd_misc.h" | 29 | #include "crystalhd_misc.h" |
28 | #include "crystalhd_lnx.h" | 30 | #include "crystalhd_lnx.h" |
29 | 31 | ||
diff --git a/drivers/staging/cx25821/cx25821-alsa.c b/drivers/staging/cx25821/cx25821-alsa.c index e0eef12759e4..061add30ba8a 100644 --- a/drivers/staging/cx25821/cx25821-alsa.c +++ b/drivers/staging/cx25821/cx25821-alsa.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
28 | #include <linux/dma-mapping.h> | 28 | #include <linux/dma-mapping.h> |
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <asm/delay.h> | 32 | #include <asm/delay.h> |
32 | #include <sound/core.h> | 33 | #include <sound/core.h> |
diff --git a/drivers/staging/cx25821/cx25821-audio-upstream.c b/drivers/staging/cx25821/cx25821-audio-upstream.c index ddddf651266b..11c56bdb0ceb 100644 --- a/drivers/staging/cx25821/cx25821-audio-upstream.c +++ b/drivers/staging/cx25821/cx25821-audio-upstream.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/file.h> | 32 | #include <linux/file.h> |
33 | #include <linux/fcntl.h> | 33 | #include <linux/fcntl.h> |
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/slab.h> | ||
35 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
36 | 37 | ||
37 | MODULE_DESCRIPTION("v4l2 driver module for cx25821 based TV cards"); | 38 | MODULE_DESCRIPTION("v4l2 driver module for cx25821 based TV cards"); |
diff --git a/drivers/staging/cx25821/cx25821-audups11.c b/drivers/staging/cx25821/cx25821-audups11.c index 46c7f78bb972..e76451c309f1 100644 --- a/drivers/staging/cx25821/cx25821-audups11.c +++ b/drivers/staging/cx25821/cx25821-audups11.c | |||
@@ -21,6 +21,8 @@ | |||
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/slab.h> | ||
25 | |||
24 | #include "cx25821-video.h" | 26 | #include "cx25821-video.h" |
25 | 27 | ||
26 | static void buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) | 28 | static void buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb) |
diff --git a/drivers/staging/cx25821/cx25821-core.c b/drivers/staging/cx25821/cx25821-core.c index 67f689de4daa..9e9b8c3c9311 100644 --- a/drivers/staging/cx25821/cx25821-core.c +++ b/drivers/staging/cx25821/cx25821-core.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
25 | #include <linux/slab.h> | ||
25 | #include "cx25821.h" | 26 | #include "cx25821.h" |
26 | #include "cx25821-sram.h" | 27 | #include "cx25821-sram.h" |
27 | #include "cx25821-video.h" | 28 | #include "cx25821-video.h" |
diff --git a/drivers/staging/cx25821/cx25821-video-upstream-ch2.c b/drivers/staging/cx25821/cx25821-video-upstream-ch2.c index c8905e0ac509..cc51618cffa9 100644 --- a/drivers/staging/cx25821/cx25821-video-upstream-ch2.c +++ b/drivers/staging/cx25821/cx25821-video-upstream-ch2.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/syscalls.h> | 31 | #include <linux/syscalls.h> |
32 | #include <linux/file.h> | 32 | #include <linux/file.h> |
33 | #include <linux/fcntl.h> | 33 | #include <linux/fcntl.h> |
34 | #include <linux/slab.h> | ||
34 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
35 | 36 | ||
36 | MODULE_DESCRIPTION("v4l2 driver module for cx25821 based TV cards"); | 37 | MODULE_DESCRIPTION("v4l2 driver module for cx25821 based TV cards"); |
diff --git a/drivers/staging/cx25821/cx25821-video-upstream.c b/drivers/staging/cx25821/cx25821-video-upstream.c index 3d7dd3f66541..6d48a1e26d1b 100644 --- a/drivers/staging/cx25821/cx25821-video-upstream.c +++ b/drivers/staging/cx25821/cx25821-video-upstream.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/syscalls.h> | 31 | #include <linux/syscalls.h> |
32 | #include <linux/file.h> | 32 | #include <linux/file.h> |
33 | #include <linux/fcntl.h> | 33 | #include <linux/fcntl.h> |
34 | #include <linux/slab.h> | ||
34 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
35 | 36 | ||
36 | MODULE_DESCRIPTION("v4l2 driver module for cx25821 based TV cards"); | 37 | MODULE_DESCRIPTION("v4l2 driver module for cx25821 based TV cards"); |
diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c index dc7c603625c7..81bd71fd816e 100644 --- a/drivers/staging/dream/camera/msm_camera.c +++ b/drivers/staging/dream/camera/msm_camera.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
16 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
17 | #include <mach/board.h> | 18 | #include <mach/board.h> |
diff --git a/drivers/staging/dream/camera/msm_v4l2.c b/drivers/staging/dream/camera/msm_v4l2.c index 6a7d46cf11eb..c276f2f7583a 100644 --- a/drivers/staging/dream/camera/msm_v4l2.c +++ b/drivers/staging/dream/camera/msm_v4l2.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
13 | #include <linux/videodev2.h> | 13 | #include <linux/videodev2.h> |
14 | #include <linux/proc_fs.h> | 14 | #include <linux/proc_fs.h> |
15 | #include <linux/slab.h> | ||
15 | #include <media/v4l2-dev.h> | 16 | #include <media/v4l2-dev.h> |
16 | #include <media/msm_camera.h> | 17 | #include <media/msm_camera.h> |
17 | #include <mach/camera.h> | 18 | #include <mach/camera.h> |
diff --git a/drivers/staging/dream/camera/msm_vfe7x.c b/drivers/staging/dream/camera/msm_vfe7x.c index 62fd24d632d5..198656ac3de5 100644 --- a/drivers/staging/dream/camera/msm_vfe7x.c +++ b/drivers/staging/dream/camera/msm_vfe7x.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/fs.h> | 7 | #include <linux/fs.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/android_pmem.h> | 9 | #include <linux/android_pmem.h> |
10 | #include <linux/slab.h> | ||
10 | #include <mach/msm_adsp.h> | 11 | #include <mach/msm_adsp.h> |
11 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
12 | #include <linux/wait.h> | 13 | #include <linux/wait.h> |
diff --git a/drivers/staging/dream/camera/msm_vfe8x.c b/drivers/staging/dream/camera/msm_vfe8x.c index 03de6ec2eb44..e61fdba62838 100644 --- a/drivers/staging/dream/camera/msm_vfe8x.c +++ b/drivers/staging/dream/camera/msm_vfe8x.c | |||
@@ -1,6 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2008-2009 QUALCOMM Incorporated. | 2 | * Copyright (C) 2008-2009 QUALCOMM Incorporated. |
3 | */ | 3 | */ |
4 | #include <linux/slab.h> | ||
4 | #include <linux/uaccess.h> | 5 | #include <linux/uaccess.h> |
5 | #include <linux/interrupt.h> | 6 | #include <linux/interrupt.h> |
6 | #include <mach/irqs.h> | 7 | #include <mach/irqs.h> |
diff --git a/drivers/staging/dream/camera/mt9d112.c b/drivers/staging/dream/camera/mt9d112.c index 4f938f9dfc47..e6f2d5124611 100644 --- a/drivers/staging/dream/camera/mt9d112.c +++ b/drivers/staging/dream/camera/mt9d112.c | |||
@@ -3,6 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/delay.h> | 5 | #include <linux/delay.h> |
6 | #include <linux/slab.h> | ||
6 | #include <linux/types.h> | 7 | #include <linux/types.h> |
7 | #include <linux/i2c.h> | 8 | #include <linux/i2c.h> |
8 | #include <linux/uaccess.h> | 9 | #include <linux/uaccess.h> |
diff --git a/drivers/staging/dream/camera/mt9p012_fox.c b/drivers/staging/dream/camera/mt9p012_fox.c index 70119d5e0ab3..791bd6c40615 100644 --- a/drivers/staging/dream/camera/mt9p012_fox.c +++ b/drivers/staging/dream/camera/mt9p012_fox.c | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | #include <linux/delay.h> | 5 | #include <linux/delay.h> |
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/i2c.h> | 8 | #include <linux/i2c.h> |
8 | #include <linux/uaccess.h> | 9 | #include <linux/uaccess.h> |
9 | #include <linux/miscdevice.h> | 10 | #include <linux/miscdevice.h> |
diff --git a/drivers/staging/dream/camera/mt9t013.c b/drivers/staging/dream/camera/mt9t013.c index 88229f2663b5..8fd7727ba234 100644 --- a/drivers/staging/dream/camera/mt9t013.c +++ b/drivers/staging/dream/camera/mt9t013.c | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | #include <linux/delay.h> | 5 | #include <linux/delay.h> |
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/i2c.h> | 8 | #include <linux/i2c.h> |
8 | #include <linux/uaccess.h> | 9 | #include <linux/uaccess.h> |
9 | #include <linux/miscdevice.h> | 10 | #include <linux/miscdevice.h> |
diff --git a/drivers/staging/dream/camera/s5k3e2fx.c b/drivers/staging/dream/camera/s5k3e2fx.c index 841792e2624b..1459903a339d 100644 --- a/drivers/staging/dream/camera/s5k3e2fx.c +++ b/drivers/staging/dream/camera/s5k3e2fx.c | |||
@@ -3,6 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/delay.h> | 5 | #include <linux/delay.h> |
6 | #include <linux/slab.h> | ||
6 | #include <linux/types.h> | 7 | #include <linux/types.h> |
7 | #include <linux/i2c.h> | 8 | #include <linux/i2c.h> |
8 | #include <linux/uaccess.h> | 9 | #include <linux/uaccess.h> |
diff --git a/drivers/staging/dream/gpio_axis.c b/drivers/staging/dream/gpio_axis.c index c801172aa9ee..eb54724b1d3a 100644 --- a/drivers/staging/dream/gpio_axis.c +++ b/drivers/staging/dream/gpio_axis.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
18 | #include <linux/gpio_event.h> | 19 | #include <linux/gpio_event.h> |
19 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
diff --git a/drivers/staging/dream/gpio_event.c b/drivers/staging/dream/gpio_event.c index e60e2c0db9c0..97a511d11f49 100644 --- a/drivers/staging/dream/gpio_event.c +++ b/drivers/staging/dream/gpio_event.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | 16 | ||
17 | #include <linux/slab.h> | ||
17 | #include <linux/module.h> | 18 | #include <linux/module.h> |
18 | #include <linux/input.h> | 19 | #include <linux/input.h> |
19 | #include <linux/gpio_event.h> | 20 | #include <linux/gpio_event.h> |
diff --git a/drivers/staging/dream/gpio_input.c b/drivers/staging/dream/gpio_input.c index 0638ec43601a..ca29e5eb070a 100644 --- a/drivers/staging/dream/gpio_input.c +++ b/drivers/staging/dream/gpio_input.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/hrtimer.h> | 19 | #include <linux/hrtimer.h> |
20 | #include <linux/input.h> | 20 | #include <linux/input.h> |
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | enum { | 24 | enum { |
24 | DEBOUNCE_UNSTABLE = BIT(0), /* Got irq, while debouncing */ | 25 | DEBOUNCE_UNSTABLE = BIT(0), /* Got irq, while debouncing */ |
diff --git a/drivers/staging/dream/gpio_matrix.c b/drivers/staging/dream/gpio_matrix.c index 796de4faf859..b377ee1f5a5f 100644 --- a/drivers/staging/dream/gpio_matrix.c +++ b/drivers/staging/dream/gpio_matrix.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
18 | #include <linux/gpio_event.h> | 19 | #include <linux/gpio_event.h> |
19 | #include <linux/hrtimer.h> | 20 | #include <linux/hrtimer.h> |
diff --git a/drivers/staging/dream/pmem.c b/drivers/staging/dream/pmem.c index 503ba212dc96..6edfdd4ef804 100644 --- a/drivers/staging/dream/pmem.c +++ b/drivers/staging/dream/pmem.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/android_pmem.h> | 23 | #include <linux/android_pmem.h> |
24 | #include <linux/mempolicy.h> | 24 | #include <linux/mempolicy.h> |
25 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
26 | #include <linux/slab.h> | ||
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
27 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
28 | #include <asm/cacheflush.h> | 29 | #include <asm/cacheflush.h> |
diff --git a/drivers/staging/dream/qdsp5/adsp.c b/drivers/staging/dream/qdsp5/adsp.c index 9069535fcaf1..f1e9d81674e8 100644 --- a/drivers/staging/dream/qdsp5/adsp.c +++ b/drivers/staging/dream/qdsp5/adsp.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/kthread.h> | 31 | #include <linux/kthread.h> |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/uaccess.h> | 34 | #include <linux/uaccess.h> |
34 | #include <linux/wait.h> | 35 | #include <linux/wait.h> |
35 | 36 | ||
diff --git a/drivers/staging/dream/qdsp5/adsp_driver.c b/drivers/staging/dream/qdsp5/adsp_driver.c index e55a0db53a93..8197765aae1e 100644 --- a/drivers/staging/dream/qdsp5/adsp_driver.c +++ b/drivers/staging/dream/qdsp5/adsp_driver.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/list.h> | 19 | #include <linux/list.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/uaccess.h> | 23 | #include <linux/uaccess.h> |
23 | 24 | ||
24 | #include "adsp.h" | 25 | #include "adsp.h" |
diff --git a/drivers/staging/dream/qdsp5/audio_aac.c b/drivers/staging/dream/qdsp5/audio_aac.c index ad2390f32a4f..a373f3522384 100644 --- a/drivers/staging/dream/qdsp5/audio_aac.c +++ b/drivers/staging/dream/qdsp5/audio_aac.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/kthread.h> | 24 | #include <linux/kthread.h> |
25 | #include <linux/wait.h> | 25 | #include <linux/wait.h> |
26 | #include <linux/dma-mapping.h> | 26 | #include <linux/dma-mapping.h> |
27 | #include <linux/gfp.h> | ||
27 | 28 | ||
28 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
29 | 30 | ||
diff --git a/drivers/staging/dream/qdsp5/audio_amrnb.c b/drivers/staging/dream/qdsp5/audio_amrnb.c index cd818a526f83..07b79d5836e5 100644 --- a/drivers/staging/dream/qdsp5/audio_amrnb.c +++ b/drivers/staging/dream/qdsp5/audio_amrnb.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/kthread.h> | 32 | #include <linux/kthread.h> |
33 | #include <linux/wait.h> | 33 | #include <linux/wait.h> |
34 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
35 | #include <linux/gfp.h> | ||
35 | 36 | ||
36 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
37 | 38 | ||
diff --git a/drivers/staging/dream/qdsp5/audio_evrc.c b/drivers/staging/dream/qdsp5/audio_evrc.c index 4b43e183f9e8..ad989ee87690 100644 --- a/drivers/staging/dream/qdsp5/audio_evrc.c +++ b/drivers/staging/dream/qdsp5/audio_evrc.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
28 | #include <linux/dma-mapping.h> | 28 | #include <linux/dma-mapping.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/gfp.h> | ||
30 | 31 | ||
31 | #include <asm/atomic.h> | 32 | #include <asm/atomic.h> |
32 | #include <asm/ioctls.h> | 33 | #include <asm/ioctls.h> |
diff --git a/drivers/staging/dream/qdsp5/audio_in.c b/drivers/staging/dream/qdsp5/audio_in.c index 3d950a245895..6ae48e72d145 100644 --- a/drivers/staging/dream/qdsp5/audio_in.c +++ b/drivers/staging/dream/qdsp5/audio_in.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kthread.h> | 23 | #include <linux/kthread.h> |
24 | #include <linux/wait.h> | 24 | #include <linux/wait.h> |
25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
26 | #include <linux/gfp.h> | ||
26 | 27 | ||
27 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
28 | 29 | ||
diff --git a/drivers/staging/dream/qdsp5/audio_mp3.c b/drivers/staging/dream/qdsp5/audio_mp3.c index 7ed6e261d6c9..530e1f35eed3 100644 --- a/drivers/staging/dream/qdsp5/audio_mp3.c +++ b/drivers/staging/dream/qdsp5/audio_mp3.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kthread.h> | 23 | #include <linux/kthread.h> |
24 | #include <linux/wait.h> | 24 | #include <linux/wait.h> |
25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
26 | #include <linux/gfp.h> | ||
26 | 27 | ||
27 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
28 | 29 | ||
diff --git a/drivers/staging/dream/qdsp5/audio_out.c b/drivers/staging/dream/qdsp5/audio_out.c index df87ca337b94..fe7809dd4401 100644 --- a/drivers/staging/dream/qdsp5/audio_out.c +++ b/drivers/staging/dream/qdsp5/audio_out.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/debugfs.h> | 26 | #include <linux/debugfs.h> |
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/wakelock.h> | 28 | #include <linux/wakelock.h> |
29 | #include <linux/gfp.h> | ||
29 | 30 | ||
30 | #include <linux/msm_audio.h> | 31 | #include <linux/msm_audio.h> |
31 | 32 | ||
diff --git a/drivers/staging/dream/qdsp5/audio_qcelp.c b/drivers/staging/dream/qdsp5/audio_qcelp.c index f0f50e36805a..effa96f34fdc 100644 --- a/drivers/staging/dream/qdsp5/audio_qcelp.c +++ b/drivers/staging/dream/qdsp5/audio_qcelp.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/wait.h> | 30 | #include <linux/wait.h> |
31 | #include <linux/dma-mapping.h> | 31 | #include <linux/dma-mapping.h> |
32 | #include <linux/gfp.h> | ||
32 | 33 | ||
33 | #include <asm/ioctls.h> | 34 | #include <asm/ioctls.h> |
34 | #include <mach/msm_adsp.h> | 35 | #include <mach/msm_adsp.h> |
diff --git a/drivers/staging/dream/qdsp5/audmgr.c b/drivers/staging/dream/qdsp5/audmgr.c index 1ad8b82c2570..427ae6c0bea8 100644 --- a/drivers/staging/dream/qdsp5/audmgr.c +++ b/drivers/staging/dream/qdsp5/audmgr.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
20 | #include <linux/uaccess.h> | 20 | #include <linux/uaccess.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/kthread.h> | 22 | #include <linux/kthread.h> |
22 | #include <linux/wait.h> | 23 | #include <linux/wait.h> |
23 | 24 | ||
diff --git a/drivers/staging/dream/smd/smd_rpcrouter.c b/drivers/staging/dream/smd/smd_rpcrouter.c index 69911a7bc87a..8744a6e499cb 100644 --- a/drivers/staging/dream/smd/smd_rpcrouter.c +++ b/drivers/staging/dream/smd/smd_rpcrouter.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/err.h> | 33 | #include <linux/err.h> |
34 | #include <linux/sched.h> | 34 | #include <linux/sched.h> |
35 | #include <linux/poll.h> | 35 | #include <linux/poll.h> |
36 | #include <linux/slab.h> | ||
36 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
37 | #include <asm/byteorder.h> | 38 | #include <asm/byteorder.h> |
38 | #include <linux/platform_device.h> | 39 | #include <linux/platform_device.h> |
diff --git a/drivers/staging/dream/smd/smd_rpcrouter_device.c b/drivers/staging/dream/smd/smd_rpcrouter_device.c index cd3910bcc4ed..e9c28eddce31 100644 --- a/drivers/staging/dream/smd/smd_rpcrouter_device.c +++ b/drivers/staging/dream/smd/smd_rpcrouter_device.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/poll.h> | 29 | #include <linux/poll.h> |
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/msm_rpcrouter.h> | 31 | #include <linux/msm_rpcrouter.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
34 | #include <asm/byteorder.h> | 35 | #include <asm/byteorder.h> |
diff --git a/drivers/staging/dream/smd/smd_rpcrouter_servers.c b/drivers/staging/dream/smd/smd_rpcrouter_servers.c index 2597bbbc6f5e..1b152abb2783 100644 --- a/drivers/staging/dream/smd/smd_rpcrouter_servers.c +++ b/drivers/staging/dream/smd/smd_rpcrouter_servers.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/wakelock.h> | 29 | #include <linux/wakelock.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <linux/msm_rpcrouter.h> | 32 | #include <linux/msm_rpcrouter.h> |
32 | #include <linux/uaccess.h> | 33 | #include <linux/uaccess.h> |
diff --git a/drivers/staging/dream/synaptics_i2c_rmi.c b/drivers/staging/dream/synaptics_i2c_rmi.c index 4de6bc917595..d2ca116a1c25 100644 --- a/drivers/staging/dream/synaptics_i2c_rmi.c +++ b/drivers/staging/dream/synaptics_i2c_rmi.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/slab.h> | ||
21 | #ifdef CONFIG_HAS_EARLYSUSPEND | 22 | #ifdef CONFIG_HAS_EARLYSUSPEND |
22 | #include <linux/earlysuspend.h> | 23 | #include <linux/earlysuspend.h> |
23 | #endif | 24 | #endif |
diff --git a/drivers/staging/dt3155/allocator.c b/drivers/staging/dt3155/allocator.c index c74234c66895..db382ef90217 100644 --- a/drivers/staging/dt3155/allocator.c +++ b/drivers/staging/dt3155/allocator.c | |||
@@ -55,6 +55,7 @@ | |||
55 | #include <linux/types.h> | 55 | #include <linux/types.h> |
56 | #include <linux/mm.h> /* PAGE_ALIGN() */ | 56 | #include <linux/mm.h> /* PAGE_ALIGN() */ |
57 | #include <linux/io.h> | 57 | #include <linux/io.h> |
58 | #include <linux/slab.h> | ||
58 | 59 | ||
59 | #include <asm/page.h> | 60 | #include <asm/page.h> |
60 | 61 | ||
diff --git a/drivers/staging/dt3155/dt3155_isr.c b/drivers/staging/dt3155/dt3155_isr.c index fd7f93d6c33d..09d7d9b8272d 100644 --- a/drivers/staging/dt3155/dt3155_isr.c +++ b/drivers/staging/dt3155/dt3155_isr.c | |||
@@ -45,7 +45,7 @@ Purpose: Buffer management routines, and other routines for the ISR | |||
45 | */ | 45 | */ |
46 | 46 | ||
47 | #include <asm/system.h> | 47 | #include <asm/system.h> |
48 | #include <linux/slab.h> | 48 | #include <linux/gfp.h> |
49 | #include <linux/sched.h> | 49 | #include <linux/sched.h> |
50 | #include <linux/types.h> | 50 | #include <linux/types.h> |
51 | 51 | ||
diff --git a/drivers/staging/et131x/et1310_eeprom.c b/drivers/staging/et131x/et1310_eeprom.c index 3ca253672ba1..e4d095b0b52a 100644 --- a/drivers/staging/et131x/et1310_eeprom.c +++ b/drivers/staging/et131x/et1310_eeprom.c | |||
@@ -66,7 +66,6 @@ | |||
66 | 66 | ||
67 | #include <linux/sched.h> | 67 | #include <linux/sched.h> |
68 | #include <linux/ptrace.h> | 68 | #include <linux/ptrace.h> |
69 | #include <linux/slab.h> | ||
70 | #include <linux/ctype.h> | 69 | #include <linux/ctype.h> |
71 | #include <linux/string.h> | 70 | #include <linux/string.h> |
72 | #include <linux/timer.h> | 71 | #include <linux/timer.h> |
diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index a292b1edc414..16fa13d4821f 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c | |||
@@ -65,7 +65,6 @@ | |||
65 | 65 | ||
66 | #include <linux/sched.h> | 66 | #include <linux/sched.h> |
67 | #include <linux/ptrace.h> | 67 | #include <linux/ptrace.h> |
68 | #include <linux/slab.h> | ||
69 | #include <linux/ctype.h> | 68 | #include <linux/ctype.h> |
70 | #include <linux/string.h> | 69 | #include <linux/string.h> |
71 | #include <linux/timer.h> | 70 | #include <linux/timer.h> |
@@ -226,7 +225,7 @@ void ConfigMACRegs2(struct et131x_adapter *etdev) | |||
226 | } | 225 | } |
227 | 226 | ||
228 | /* Enable TXMAC */ | 227 | /* Enable TXMAC */ |
229 | ctl |= 0x05; /* TX mac enable, FC disable */ | 228 | ctl |= 0x09; /* TX mac enable, FC disable */ |
230 | writel(ctl, &etdev->regs->txmac.ctl); | 229 | writel(ctl, &etdev->regs->txmac.ctl); |
231 | 230 | ||
232 | /* Ready to start the RXDMA/TXDMA engine */ | 231 | /* Ready to start the RXDMA/TXDMA engine */ |
diff --git a/drivers/staging/et131x/et1310_phy.c b/drivers/staging/et131x/et1310_phy.c index 4a55fbfbd59d..34cd5d1b586a 100644 --- a/drivers/staging/et131x/et1310_phy.c +++ b/drivers/staging/et131x/et1310_phy.c | |||
@@ -66,7 +66,6 @@ | |||
66 | 66 | ||
67 | #include <linux/sched.h> | 67 | #include <linux/sched.h> |
68 | #include <linux/ptrace.h> | 68 | #include <linux/ptrace.h> |
69 | #include <linux/slab.h> | ||
70 | #include <linux/ctype.h> | 69 | #include <linux/ctype.h> |
71 | #include <linux/string.h> | 70 | #include <linux/string.h> |
72 | #include <linux/timer.h> | 71 | #include <linux/timer.h> |
diff --git a/drivers/staging/et131x/et1310_pm.c b/drivers/staging/et131x/et1310_pm.c index 41019e390af5..c64bb2c6d0d6 100644 --- a/drivers/staging/et131x/et1310_pm.c +++ b/drivers/staging/et131x/et1310_pm.c | |||
@@ -65,7 +65,6 @@ | |||
65 | 65 | ||
66 | #include <linux/sched.h> | 66 | #include <linux/sched.h> |
67 | #include <linux/ptrace.h> | 67 | #include <linux/ptrace.h> |
68 | #include <linux/slab.h> | ||
69 | #include <linux/ctype.h> | 68 | #include <linux/ctype.h> |
70 | #include <linux/string.h> | 69 | #include <linux/string.h> |
71 | #include <linux/timer.h> | 70 | #include <linux/timer.h> |
diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c index 5ad7e5a6f631..1dd5fa5b888b 100644 --- a/drivers/staging/et131x/et131x_initpci.c +++ b/drivers/staging/et131x/et131x_initpci.c | |||
@@ -68,7 +68,6 @@ | |||
68 | 68 | ||
69 | #include <linux/sched.h> | 69 | #include <linux/sched.h> |
70 | #include <linux/ptrace.h> | 70 | #include <linux/ptrace.h> |
71 | #include <linux/slab.h> | ||
72 | #include <linux/ctype.h> | 71 | #include <linux/ctype.h> |
73 | #include <linux/string.h> | 72 | #include <linux/string.h> |
74 | #include <linux/timer.h> | 73 | #include <linux/timer.h> |
diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c index 8b6e0b7ec568..cb7f6775ce0a 100644 --- a/drivers/staging/et131x/et131x_isr.c +++ b/drivers/staging/et131x/et131x_isr.c | |||
@@ -66,7 +66,6 @@ | |||
66 | 66 | ||
67 | #include <linux/sched.h> | 67 | #include <linux/sched.h> |
68 | #include <linux/ptrace.h> | 68 | #include <linux/ptrace.h> |
69 | #include <linux/slab.h> | ||
70 | #include <linux/ctype.h> | 69 | #include <linux/ctype.h> |
71 | #include <linux/string.h> | 70 | #include <linux/string.h> |
72 | #include <linux/timer.h> | 71 | #include <linux/timer.h> |
diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c index 2fb89cddef16..abc82c3dad21 100644 --- a/drivers/staging/et131x/et131x_netdev.c +++ b/drivers/staging/et131x/et131x_netdev.c | |||
@@ -65,7 +65,6 @@ | |||
65 | 65 | ||
66 | #include <linux/sched.h> | 66 | #include <linux/sched.h> |
67 | #include <linux/ptrace.h> | 67 | #include <linux/ptrace.h> |
68 | #include <linux/slab.h> | ||
69 | #include <linux/ctype.h> | 68 | #include <linux/ctype.h> |
70 | #include <linux/string.h> | 69 | #include <linux/string.h> |
71 | #include <linux/timer.h> | 70 | #include <linux/timer.h> |
diff --git a/drivers/staging/go7007/go7007-driver.c b/drivers/staging/go7007/go7007-driver.c index d42ba1696999..372a7c6791ca 100644 --- a/drivers/staging/go7007/go7007-driver.c +++ b/drivers/staging/go7007/go7007-driver.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/firmware.h> | 29 | #include <linux/firmware.h> |
30 | #include <linux/mutex.h> | 30 | #include <linux/mutex.h> |
31 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
32 | #include <linux/slab.h> | ||
32 | #include <asm/system.h> | 33 | #include <asm/system.h> |
33 | #include <linux/videodev2.h> | 34 | #include <linux/videodev2.h> |
34 | #include <media/tuner.h> | 35 | #include <media/tuner.h> |
diff --git a/drivers/staging/go7007/go7007-fw.c b/drivers/staging/go7007/go7007-fw.c index a8bb264e0074..ee622ff1707e 100644 --- a/drivers/staging/go7007/go7007-fw.c +++ b/drivers/staging/go7007/go7007-fw.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/device.h> | 31 | #include <linux/device.h> |
32 | #include <linux/i2c.h> | 32 | #include <linux/i2c.h> |
33 | #include <linux/firmware.h> | 33 | #include <linux/firmware.h> |
34 | #include <linux/slab.h> | ||
34 | #include <asm/byteorder.h> | 35 | #include <asm/byteorder.h> |
35 | 36 | ||
36 | #include "go7007-priv.h" | 37 | #include "go7007-priv.h" |
diff --git a/drivers/staging/go7007/go7007-v4l2.c b/drivers/staging/go7007/go7007-v4l2.c index 3af79242313e..723c1a64d87f 100644 --- a/drivers/staging/go7007/go7007-v4l2.c +++ b/drivers/staging/go7007/go7007-v4l2.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
25 | #include <linux/unistd.h> | 26 | #include <linux/unistd.h> |
26 | #include <linux/time.h> | 27 | #include <linux/time.h> |
diff --git a/drivers/staging/go7007/s2250-board.c b/drivers/staging/go7007/s2250-board.c index dc89502ea1b7..93f26048e3b4 100644 --- a/drivers/staging/go7007/s2250-board.c +++ b/drivers/staging/go7007/s2250-board.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/usb.h> | 20 | #include <linux/usb.h> |
21 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
22 | #include <linux/videodev2.h> | 22 | #include <linux/videodev2.h> |
23 | #include <linux/slab.h> | ||
23 | #include <media/v4l2-device.h> | 24 | #include <media/v4l2-device.h> |
24 | #include <media/v4l2-common.h> | 25 | #include <media/v4l2-common.h> |
25 | #include <media/v4l2-i2c-drv.h> | 26 | #include <media/v4l2-i2c-drv.h> |
diff --git a/drivers/staging/go7007/s2250-loader.c b/drivers/staging/go7007/s2250-loader.c index 1de2dfb16d3f..7547a8f77345 100644 --- a/drivers/staging/go7007/s2250-loader.c +++ b/drivers/staging/go7007/s2250-loader.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/smp_lock.h> | 21 | #include <linux/smp_lock.h> |
21 | #include <linux/usb.h> | 22 | #include <linux/usb.h> |
22 | #include <dvb-usb.h> | 23 | #include <dvb-usb.h> |
diff --git a/drivers/staging/go7007/snd-go7007.c b/drivers/staging/go7007/snd-go7007.c index 03c4dfc138a1..deac938d8505 100644 --- a/drivers/staging/go7007/snd-go7007.c +++ b/drivers/staging/go7007/snd-go7007.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
29 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
30 | #include <linux/uaccess.h> | 30 | #include <linux/uaccess.h> |
31 | #include <linux/slab.h> | ||
31 | #include <asm/system.h> | 32 | #include <asm/system.h> |
32 | #include <sound/core.h> | 33 | #include <sound/core.h> |
33 | #include <sound/pcm.h> | 34 | #include <sound/pcm.h> |
diff --git a/drivers/staging/go7007/wis-saa7113.c b/drivers/staging/go7007/wis-saa7113.c index d196e16fe72b..5c12b4d38459 100644 --- a/drivers/staging/go7007/wis-saa7113.c +++ b/drivers/staging/go7007/wis-saa7113.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/videodev2.h> | 21 | #include <linux/videodev2.h> |
22 | #include <linux/ioctl.h> | 22 | #include <linux/ioctl.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include "wis-i2c.h" | 25 | #include "wis-i2c.h" |
25 | 26 | ||
diff --git a/drivers/staging/go7007/wis-saa7115.c b/drivers/staging/go7007/wis-saa7115.c index 0f2b4a0ceccf..73f2283a8803 100644 --- a/drivers/staging/go7007/wis-saa7115.c +++ b/drivers/staging/go7007/wis-saa7115.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/videodev2.h> | 21 | #include <linux/videodev2.h> |
22 | #include <linux/ioctl.h> | 22 | #include <linux/ioctl.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include "wis-i2c.h" | 25 | #include "wis-i2c.h" |
25 | 26 | ||
diff --git a/drivers/staging/go7007/wis-sony-tuner.c b/drivers/staging/go7007/wis-sony-tuner.c index c723e4aa7147..b1013291190f 100644 --- a/drivers/staging/go7007/wis-sony-tuner.c +++ b/drivers/staging/go7007/wis-sony-tuner.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/videodev2.h> | 21 | #include <linux/videodev2.h> |
22 | #include <linux/slab.h> | ||
22 | #include <media/tuner.h> | 23 | #include <media/tuner.h> |
23 | #include <media/v4l2-common.h> | 24 | #include <media/v4l2-common.h> |
24 | #include <media/v4l2-ioctl.h> | 25 | #include <media/v4l2-ioctl.h> |
diff --git a/drivers/staging/go7007/wis-tw2804.c b/drivers/staging/go7007/wis-tw2804.c index 1983839f554d..315268d130dd 100644 --- a/drivers/staging/go7007/wis-tw2804.c +++ b/drivers/staging/go7007/wis-tw2804.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/videodev2.h> | 21 | #include <linux/videodev2.h> |
22 | #include <linux/ioctl.h> | 22 | #include <linux/ioctl.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include "wis-i2c.h" | 25 | #include "wis-i2c.h" |
25 | 26 | ||
diff --git a/drivers/staging/go7007/wis-tw9903.c b/drivers/staging/go7007/wis-tw9903.c index f97e2be3c0b5..3ac6f785c4ad 100644 --- a/drivers/staging/go7007/wis-tw9903.c +++ b/drivers/staging/go7007/wis-tw9903.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/videodev2.h> | 21 | #include <linux/videodev2.h> |
22 | #include <linux/ioctl.h> | 22 | #include <linux/ioctl.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include "wis-i2c.h" | 25 | #include "wis-i2c.h" |
25 | 26 | ||
diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c index d46eb145484f..e69e9ee704ac 100644 --- a/drivers/staging/hv/Channel.c +++ b/drivers/staging/hv/Channel.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/slab.h> | ||
23 | #include "osd.h" | 24 | #include "osd.h" |
24 | #include "logging.h" | 25 | #include "logging.h" |
25 | #include "VmbusPrivate.h" | 26 | #include "VmbusPrivate.h" |
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c index ef38467ed4e2..5f92c2102ab4 100644 --- a/drivers/staging/hv/ChannelMgmt.c +++ b/drivers/staging/hv/ChannelMgmt.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/list.h> | 24 | #include <linux/list.h> |
24 | #include "osd.h" | 25 | #include "osd.h" |
25 | #include "logging.h" | 26 | #include "logging.h" |
diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c index 43c2e6855015..e0ea9cf90f03 100644 --- a/drivers/staging/hv/Connection.c +++ b/drivers/staging/hv/Connection.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
26 | #include "osd.h" | 27 | #include "osd.h" |
27 | #include "logging.h" | 28 | #include "logging.h" |
diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c index 51149e69f3e8..5d53889fb4a4 100644 --- a/drivers/staging/hv/Hv.c +++ b/drivers/staging/hv/Hv.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/vmalloc.h> | 25 | #include <linux/vmalloc.h> |
25 | #include "osd.h" | 26 | #include "osd.h" |
26 | #include "logging.h" | 27 | #include "logging.h" |
diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c index 1c717f9a554e..e4bf82297504 100644 --- a/drivers/staging/hv/NetVsc.c +++ b/drivers/staging/hv/NetVsc.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/slab.h> | ||
25 | #include "osd.h" | 26 | #include "osd.h" |
26 | #include "logging.h" | 27 | #include "logging.h" |
27 | #include "NetVsc.h" | 28 | #include "NetVsc.h" |
diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c index 1ab7fa97d373..cd2930de2176 100644 --- a/drivers/staging/hv/RndisFilter.c +++ b/drivers/staging/hv/RndisFilter.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/highmem.h> | 22 | #include <linux/highmem.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
24 | #include "osd.h" | 25 | #include "osd.h" |
25 | #include "logging.h" | 26 | #include "logging.h" |
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c index 38ea1407f222..e426a23ca537 100644 --- a/drivers/staging/hv/StorVsc.c +++ b/drivers/staging/hv/StorVsc.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
24 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
25 | #include "osd.h" | 26 | #include "osd.h" |
diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c index 3d0a240ed664..2f84bf7c0a9f 100644 --- a/drivers/staging/hv/Vmbus.c +++ b/drivers/staging/hv/Vmbus.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/slab.h> | ||
24 | #include "osd.h" | 25 | #include "osd.h" |
25 | #include "logging.h" | 26 | #include "logging.h" |
26 | #include "VersionInfo.h" | 27 | #include "VersionInfo.h" |
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index abeac12c093d..8f1fda3256ad 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/major.h> | 25 | #include <linux/major.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/hdreg.h> | 27 | #include <linux/hdreg.h> |
28 | #include <linux/slab.h> | ||
28 | #include <scsi/scsi.h> | 29 | #include <scsi/scsi.h> |
29 | #include <scsi/scsi_cmnd.h> | 30 | #include <scsi/scsi_cmnd.h> |
30 | #include <scsi/scsi_eh.h> | 31 | #include <scsi/scsi_eh.h> |
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 1af3dcbafd65..2ccb6b93fe47 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/etherdevice.h> | 29 | #include <linux/etherdevice.h> |
30 | #include <linux/skbuff.h> | 30 | #include <linux/skbuff.h> |
31 | #include <linux/in.h> | 31 | #include <linux/in.h> |
32 | #include <linux/slab.h> | ||
32 | #include <net/arp.h> | 33 | #include <net/arp.h> |
33 | #include <net/route.h> | 34 | #include <net/route.h> |
34 | #include <net/sock.h> | 35 | #include <net/sock.h> |
diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c index 3a4793a0fd05..9aea31067295 100644 --- a/drivers/staging/hv/osd.c +++ b/drivers/staging/hv/osd.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/time.h> | 40 | #include <linux/time.h> |
41 | #include <linux/io.h> | 41 | #include <linux/io.h> |
42 | #include <linux/bitops.h> | 42 | #include <linux/bitops.h> |
43 | #include <linux/slab.h> | ||
43 | #include "osd.h" | 44 | #include "osd.h" |
44 | 45 | ||
45 | struct osd_callback_struct { | 46 | struct osd_callback_struct { |
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index 3988f4bec1ce..8a58272b8039 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * Hank Janssen <hjanssen@microsoft.com> | 19 | * Hank Janssen <hjanssen@microsoft.com> |
20 | */ | 20 | */ |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/module.h> | 23 | #include <linux/module.h> |
23 | #include <linux/device.h> | 24 | #include <linux/device.h> |
24 | #include <linux/blkdev.h> | 25 | #include <linux/blkdev.h> |
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 2c906195b9c8..3397ef08e0aa 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/sysctl.h> | 26 | #include <linux/sysctl.h> |
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/dmi.h> | 28 | #include <linux/dmi.h> |
29 | #include <linux/slab.h> | ||
29 | #include "VersionInfo.h" | 30 | #include "VersionInfo.h" |
30 | #include "osd.h" | 31 | #include "osd.h" |
31 | #include "logging.h" | 32 | #include "logging.h" |
diff --git a/drivers/staging/iio/accel/kxsd9.c b/drivers/staging/iio/accel/kxsd9.c index 33d16b6f7b50..db2dd537ffb0 100644 --- a/drivers/staging/iio/accel/kxsd9.c +++ b/drivers/staging/iio/accel/kxsd9.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/sysfs.h> | 25 | #include <linux/sysfs.h> |
26 | #include <linux/rtc.h> | 26 | #include <linux/rtc.h> |
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include "../iio.h" | 30 | #include "../iio.h" |
30 | #include "../sysfs.h" | 31 | #include "../sysfs.h" |
diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c index f008837e5a14..ea76902797bb 100644 --- a/drivers/staging/iio/accel/lis3l02dq_core.c +++ b/drivers/staging/iio/accel/lis3l02dq_core.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <linux/sysfs.h> | 25 | #include <linux/sysfs.h> |
25 | #include <linux/list.h> | 26 | #include <linux/list.h> |
diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c index a6b7c72a86f4..93712430e579 100644 --- a/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/drivers/staging/iio/accel/lis3l02dq_ring.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/spi/spi.h> | 8 | #include <linux/spi/spi.h> |
9 | #include <linux/sysfs.h> | 9 | #include <linux/sysfs.h> |
10 | #include <linux/list.h> | 10 | #include <linux/list.h> |
11 | #include <linux/slab.h> | ||
11 | 12 | ||
12 | #include "../iio.h" | 13 | #include "../iio.h" |
13 | #include "../sysfs.h" | 14 | #include "../sysfs.h" |
diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c index cedcaa2b3d1f..1c229869a22d 100644 --- a/drivers/staging/iio/accel/sca3000_core.c +++ b/drivers/staging/iio/accel/sca3000_core.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/gpio.h> | 14 | #include <linux/gpio.h> |
15 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | #include <linux/spi/spi.h> | 19 | #include <linux/spi/spi.h> |
19 | #include <linux/sysfs.h> | 20 | #include <linux/sysfs.h> |
diff --git a/drivers/staging/iio/accel/sca3000_ring.c b/drivers/staging/iio/accel/sca3000_ring.c index d5ea237793a6..40cbab2a6592 100644 --- a/drivers/staging/iio/accel/sca3000_ring.c +++ b/drivers/staging/iio/accel/sca3000_ring.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/gpio.h> | 13 | #include <linux/gpio.h> |
14 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
17 | #include <linux/spi/spi.h> | 18 | #include <linux/spi/spi.h> |
18 | #include <linux/sysfs.h> | 19 | #include <linux/sysfs.h> |
diff --git a/drivers/staging/iio/adc/max1363_core.c b/drivers/staging/iio/adc/max1363_core.c index 9703881cb3f8..790d1cc9cdc3 100644 --- a/drivers/staging/iio/adc/max1363_core.c +++ b/drivers/staging/iio/adc/max1363_core.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/i2c.h> | 33 | #include <linux/i2c.h> |
34 | #include <linux/rtc.h> | 34 | #include <linux/rtc.h> |
35 | #include <linux/regulator/consumer.h> | 35 | #include <linux/regulator/consumer.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include "../iio.h" | 38 | #include "../iio.h" |
38 | #include "../sysfs.h" | 39 | #include "../sysfs.h" |
diff --git a/drivers/staging/iio/adc/max1363_ring.c b/drivers/staging/iio/adc/max1363_ring.c index a953eac6fd62..f94fe2d38a97 100644 --- a/drivers/staging/iio/adc/max1363_ring.c +++ b/drivers/staging/iio/adc/max1363_ring.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/gpio.h> | 12 | #include <linux/gpio.h> |
13 | #include <linux/workqueue.h> | 13 | #include <linux/workqueue.h> |
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/sysfs.h> | 17 | #include <linux/sysfs.h> |
17 | #include <linux/list.h> | 18 | #include <linux/list.h> |
diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c index b456dfc8fe27..37f58f66e491 100644 --- a/drivers/staging/iio/industrialio-core.c +++ b/drivers/staging/iio/industrialio-core.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/wait.h> | 22 | #include <linux/wait.h> |
23 | #include <linux/cdev.h> | 23 | #include <linux/cdev.h> |
24 | #include <linux/slab.h> | ||
24 | #include "iio.h" | 25 | #include "iio.h" |
25 | #include "trigger_consumer.h" | 26 | #include "trigger_consumer.h" |
26 | 27 | ||
diff --git a/drivers/staging/iio/industrialio-ring.c b/drivers/staging/iio/industrialio-ring.c index ebe5cccb4034..e53e214bfeb0 100644 --- a/drivers/staging/iio/industrialio-ring.c +++ b/drivers/staging/iio/industrialio-ring.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/cdev.h> | 22 | #include <linux/cdev.h> |
23 | #include <linux/idr.h> | 23 | #include <linux/idr.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include "iio.h" | 26 | #include "iio.h" |
26 | #include "ring_generic.h" | 27 | #include "ring_generic.h" |
diff --git a/drivers/staging/iio/industrialio-trigger.c b/drivers/staging/iio/industrialio-trigger.c index 693ebc48597c..35ec80ba444f 100644 --- a/drivers/staging/iio/industrialio-trigger.c +++ b/drivers/staging/iio/industrialio-trigger.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include "iio.h" | 19 | #include "iio.h" |
19 | #include "trigger.h" | 20 | #include "trigger.h" |
diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/iio/light/tsl2563.c index 78b9432c8105..1ba4aa392f6e 100644 --- a/drivers/staging/iio/light/tsl2563.c +++ b/drivers/staging/iio/light/tsl2563.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/pm.h> | 34 | #include <linux/pm.h> |
35 | #include <linux/hwmon.h> | 35 | #include <linux/hwmon.h> |
36 | #include <linux/err.h> | 36 | #include <linux/err.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include "../iio.h" | 39 | #include "../iio.h" |
39 | #include "tsl2563.h" | 40 | #include "tsl2563.h" |
diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio/ring_sw.c index 6f7f4d5a93f3..b104c3d9c35e 100644 --- a/drivers/staging/iio/ring_sw.c +++ b/drivers/staging/iio/ring_sw.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * the Free Software Foundation. | 7 | * the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/slab.h> | ||
10 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
11 | #include <linux/module.h> | 12 | #include <linux/module.h> |
12 | #include <linux/device.h> | 13 | #include <linux/device.h> |
diff --git a/drivers/staging/iio/trigger/iio-trig-gpio.c b/drivers/staging/iio/trigger/iio-trig-gpio.c index 539e4169a02e..0c3bad3187f5 100644 --- a/drivers/staging/iio/trigger/iio-trig-gpio.c +++ b/drivers/staging/iio/trigger/iio-trig-gpio.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include "../iio.h" | 26 | #include "../iio.h" |
26 | #include "../trigger.h" | 27 | #include "../trigger.h" |
diff --git a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c index e310dc009855..4295bbc7b50d 100644 --- a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c +++ b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/rtc.h> | 18 | #include <linux/rtc.h> |
18 | #include "../iio.h" | 19 | #include "../iio.h" |
19 | #include "../trigger.h" | 20 | #include "../trigger.h" |
diff --git a/drivers/staging/line6/capture.c b/drivers/staging/line6/capture.c index fd4890de8dbc..ca092247f363 100644 --- a/drivers/staging/line6/capture.c +++ b/drivers/staging/line6/capture.c | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | #include "driver.h" | 12 | #include "driver.h" |
13 | 13 | ||
14 | #include <linux/slab.h> | ||
15 | |||
14 | #include <sound/core.h> | 16 | #include <sound/core.h> |
15 | #include <sound/pcm.h> | 17 | #include <sound/pcm.h> |
16 | #include <sound/pcm_params.h> | 18 | #include <sound/pcm_params.h> |
diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c index 0392a4bc8cc8..258555417bc7 100644 --- a/drivers/staging/line6/driver.c +++ b/drivers/staging/line6/driver.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/usb.h> | 17 | #include <linux/usb.h> |
17 | 18 | ||
18 | #include "audio.h" | 19 | #include "audio.h" |
diff --git a/drivers/staging/line6/dumprequest.c b/drivers/staging/line6/dumprequest.c index decbaa971b68..bb8c9da5803f 100644 --- a/drivers/staging/line6/dumprequest.c +++ b/drivers/staging/line6/dumprequest.c | |||
@@ -10,6 +10,9 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "driver.h" | 12 | #include "driver.h" |
13 | |||
14 | #include <linux/slab.h> | ||
15 | |||
13 | #include "dumprequest.h" | 16 | #include "dumprequest.h" |
14 | 17 | ||
15 | 18 | ||
diff --git a/drivers/staging/line6/midi.c b/drivers/staging/line6/midi.c index 6ef4455d87d8..32b6ca75cadb 100644 --- a/drivers/staging/line6/midi.c +++ b/drivers/staging/line6/midi.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include "driver.h" | 12 | #include "driver.h" |
13 | 13 | ||
14 | #include <linux/usb.h> | 14 | #include <linux/usb.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include <sound/core.h> | 17 | #include <sound/core.h> |
17 | #include <sound/rawmidi.h> | 18 | #include <sound/rawmidi.h> |
diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c index dd98121eb80b..fbe4b083eac5 100644 --- a/drivers/staging/line6/pcm.c +++ b/drivers/staging/line6/pcm.c | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | #include "driver.h" | 12 | #include "driver.h" |
13 | 13 | ||
14 | #include <linux/slab.h> | ||
15 | |||
14 | #include <sound/core.h> | 16 | #include <sound/core.h> |
15 | #include <sound/control.h> | 17 | #include <sound/control.h> |
16 | #include <sound/pcm.h> | 18 | #include <sound/pcm.h> |
diff --git a/drivers/staging/line6/playback.c b/drivers/staging/line6/playback.c index 3431f5cd2852..fbcd6e150aaf 100644 --- a/drivers/staging/line6/playback.c +++ b/drivers/staging/line6/playback.c | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | #include "driver.h" | 12 | #include "driver.h" |
13 | 13 | ||
14 | #include <linux/slab.h> | ||
15 | |||
14 | #include <sound/core.h> | 16 | #include <sound/core.h> |
15 | #include <sound/pcm.h> | 17 | #include <sound/pcm.h> |
16 | #include <sound/pcm_params.h> | 18 | #include <sound/pcm_params.h> |
diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c index 685c529950eb..4983f2b51cf2 100644 --- a/drivers/staging/line6/pod.c +++ b/drivers/staging/line6/pod.c | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | #include "driver.h" | 12 | #include "driver.h" |
13 | 13 | ||
14 | #include <linux/slab.h> | ||
15 | |||
14 | #include "audio.h" | 16 | #include "audio.h" |
15 | #include "capture.h" | 17 | #include "capture.h" |
16 | #include "control.h" | 18 | #include "control.h" |
diff --git a/drivers/staging/line6/variax.c b/drivers/staging/line6/variax.c index 58fef82c247d..28eb89983f36 100644 --- a/drivers/staging/line6/variax.c +++ b/drivers/staging/line6/variax.c | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | #include "driver.h" | 12 | #include "driver.h" |
13 | 13 | ||
14 | #include <linux/slab.h> | ||
15 | |||
14 | #include "audio.h" | 16 | #include "audio.h" |
15 | #include "control.h" | 17 | #include "control.h" |
16 | #include "variax.h" | 18 | #include "variax.h" |
diff --git a/drivers/staging/netwave/netwave_cs.c b/drivers/staging/netwave/netwave_cs.c index e936717d1f4b..3875a722d12b 100644 --- a/drivers/staging/netwave/netwave_cs.c +++ b/drivers/staging/netwave/netwave_cs.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <linux/ptrace.h> | 46 | #include <linux/ptrace.h> |
47 | #include <linux/ioport.h> | 47 | #include <linux/ioport.h> |
48 | #include <linux/in.h> | 48 | #include <linux/in.h> |
49 | #include <linux/slab.h> | ||
50 | #include <linux/string.h> | 49 | #include <linux/string.h> |
51 | #include <linux/timer.h> | 50 | #include <linux/timer.h> |
52 | #include <linux/errno.h> | 51 | #include <linux/errno.h> |
diff --git a/drivers/staging/octeon/ethernet-mem.c b/drivers/staging/octeon/ethernet-mem.c index 00cc91df6b46..635bb86cdcff 100644 --- a/drivers/staging/octeon/ethernet-mem.c +++ b/drivers/staging/octeon/ethernet-mem.c | |||
@@ -26,6 +26,7 @@ | |||
26 | **********************************************************************/ | 26 | **********************************************************************/ |
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/netdevice.h> | 28 | #include <linux/netdevice.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <asm/octeon/octeon.h> | 31 | #include <asm/octeon/octeon.h> |
31 | 32 | ||
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index 4a2161f70c7f..e50a17d80707 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/netdevice.h> | 30 | #include <linux/netdevice.h> |
31 | #include <linux/etherdevice.h> | 31 | #include <linux/etherdevice.h> |
32 | #include <linux/phy.h> | 32 | #include <linux/phy.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include <net/dst.h> | 35 | #include <net/dst.h> |
35 | 36 | ||
diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c index 8c47b1a68627..84be4b2cd692 100644 --- a/drivers/staging/otus/ioctl.c +++ b/drivers/staging/otus/ioctl.c | |||
@@ -23,6 +23,7 @@ | |||
23 | /* Platform dependent. */ | 23 | /* Platform dependent. */ |
24 | /* */ | 24 | /* */ |
25 | /************************************************************************/ | 25 | /************************************************************************/ |
26 | #include <linux/slab.h> | ||
26 | #include <linux/module.h> | 27 | #include <linux/module.h> |
27 | #include <linux/if_arp.h> | 28 | #include <linux/if_arp.h> |
28 | #include <linux/uaccess.h> | 29 | #include <linux/uaccess.h> |
diff --git a/drivers/staging/otus/usbdrv.c b/drivers/staging/otus/usbdrv.c index 5e6a12037b12..0ce65b5b9456 100644 --- a/drivers/staging/otus/usbdrv.c +++ b/drivers/staging/otus/usbdrv.c | |||
@@ -38,6 +38,7 @@ | |||
38 | 38 | ||
39 | #include "linux/netlink.h" | 39 | #include "linux/netlink.h" |
40 | #include "linux/rtnetlink.h" | 40 | #include "linux/rtnetlink.h" |
41 | #include "linux/slab.h" | ||
41 | 42 | ||
42 | #include <net/iw_handler.h> | 43 | #include <net/iw_handler.h> |
43 | 44 | ||
diff --git a/drivers/staging/otus/usbdrv.h b/drivers/staging/otus/usbdrv.h index 330d1b95cb88..7e66c2d72a69 100644 --- a/drivers/staging/otus/usbdrv.h +++ b/drivers/staging/otus/usbdrv.h | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/uaccess.h> | 38 | #include <linux/uaccess.h> |
39 | #include <linux/wireless.h> | 39 | #include <linux/wireless.h> |
40 | #include <linux/if_arp.h> | 40 | #include <linux/if_arp.h> |
41 | #include <linux/slab.h> | ||
41 | #include <linux/io.h> | 42 | #include <linux/io.h> |
42 | 43 | ||
43 | #include "zdcompat.h" | 44 | #include "zdcompat.h" |
diff --git a/drivers/staging/otus/wrap_mem.c b/drivers/staging/otus/wrap_mem.c index 47cbce1346a9..b0037568e870 100644 --- a/drivers/staging/otus/wrap_mem.c +++ b/drivers/staging/otus/wrap_mem.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "usbdrv.h" | 27 | #include "usbdrv.h" |
28 | 28 | ||
29 | #include <linux/netlink.h> | 29 | #include <linux/netlink.h> |
30 | #include <linux/slab.h> | ||
30 | #include <net/iw_handler.h> | 31 | #include <net/iw_handler.h> |
31 | 32 | ||
32 | /* Memory management */ | 33 | /* Memory management */ |
diff --git a/drivers/staging/otus/wrap_pkt.c b/drivers/staging/otus/wrap_pkt.c index a2f5cb1f5298..5ecf38e355a8 100644 --- a/drivers/staging/otus/wrap_pkt.c +++ b/drivers/staging/otus/wrap_pkt.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "usbdrv.h" | 28 | #include "usbdrv.h" |
29 | 29 | ||
30 | #include <linux/netlink.h> | 30 | #include <linux/netlink.h> |
31 | #include <linux/gfp.h> | ||
31 | #include <net/iw_handler.h> | 32 | #include <net/iw_handler.h> |
32 | 33 | ||
33 | 34 | ||
diff --git a/drivers/staging/otus/wrap_usb.c b/drivers/staging/otus/wrap_usb.c index 6b336ede8867..93459cadc472 100644 --- a/drivers/staging/otus/wrap_usb.c +++ b/drivers/staging/otus/wrap_usb.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "usbdrv.h" | 28 | #include "usbdrv.h" |
29 | 29 | ||
30 | #include <linux/netlink.h> | 30 | #include <linux/netlink.h> |
31 | #include <linux/slab.h> | ||
31 | #include <net/iw_handler.h> | 32 | #include <net/iw_handler.h> |
32 | 33 | ||
33 | extern void zfLnxInitUsbTxQ(zdev_t *dev); | 34 | extern void zfLnxInitUsbTxQ(zdev_t *dev); |
diff --git a/drivers/staging/otus/wwrap.c b/drivers/staging/otus/wwrap.c index 53d2a45d55f9..a74f7eea56e4 100644 --- a/drivers/staging/otus/wwrap.c +++ b/drivers/staging/otus/wwrap.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "usbdrv.h" | 26 | #include "usbdrv.h" |
27 | 27 | ||
28 | #include <linux/netlink.h> | 28 | #include <linux/netlink.h> |
29 | #include <linux/slab.h> | ||
29 | #include <net/iw_handler.h> | 30 | #include <net/iw_handler.h> |
30 | 31 | ||
31 | extern void zfiRecv80211(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* addInfo); | 32 | extern void zfiRecv80211(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* addInfo); |
diff --git a/drivers/staging/otus/zdusb.c b/drivers/staging/otus/zdusb.c index 4cd9b7f5a887..bb89d85a4c7c 100644 --- a/drivers/staging/otus/zdusb.c +++ b/drivers/staging/otus/zdusb.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/usb.h> | 33 | #include <linux/usb.h> |
33 | 34 | ||
34 | #include "usbdrv.h" | 35 | #include "usbdrv.h" |
diff --git a/drivers/staging/poch/poch.c b/drivers/staging/poch/poch.c index 9095158fb1b3..f940a34c1a0c 100644 --- a/drivers/staging/poch/poch.c +++ b/drivers/staging/poch/poch.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/ioctl.h> | 21 | #include <linux/ioctl.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include "poch.h" | 26 | #include "poch.h" |
26 | 27 | ||
diff --git a/drivers/staging/pohmelfs/config.c b/drivers/staging/pohmelfs/config.c index 5d04bf5b021a..eed0e5545a55 100644 --- a/drivers/staging/pohmelfs/config.c +++ b/drivers/staging/pohmelfs/config.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | #include <linux/in.h> | 22 | #include <linux/in.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include "netfs.h" | 25 | #include "netfs.h" |
25 | 26 | ||
diff --git a/drivers/staging/pohmelfs/dir.c b/drivers/staging/pohmelfs/dir.c index aacd25bfb0cb..79819f07bfb9 100644 --- a/drivers/staging/pohmelfs/dir.c +++ b/drivers/staging/pohmelfs/dir.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/jhash.h> | 18 | #include <linux/jhash.h> |
19 | #include <linux/namei.h> | 19 | #include <linux/namei.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/pagemap.h> | 21 | #include <linux/pagemap.h> |
21 | 22 | ||
22 | #include "netfs.h" | 23 | #include "netfs.h" |
diff --git a/drivers/staging/pohmelfs/lock.c b/drivers/staging/pohmelfs/lock.c index 22fef18cae90..6710114cd425 100644 --- a/drivers/staging/pohmelfs/lock.c +++ b/drivers/staging/pohmelfs/lock.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/backing-dev.h> | 17 | #include <linux/backing-dev.h> |
18 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
19 | #include <linux/fsnotify.h> | 19 | #include <linux/fsnotify.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/mempool.h> | 20 | #include <linux/mempool.h> |
22 | 21 | ||
23 | #include "netfs.h" | 22 | #include "netfs.h" |
diff --git a/drivers/staging/pohmelfs/net.c b/drivers/staging/pohmelfs/net.c index af7f262e68c2..4a86f0b1ea88 100644 --- a/drivers/staging/pohmelfs/net.c +++ b/drivers/staging/pohmelfs/net.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/kthread.h> | 20 | #include <linux/kthread.h> |
21 | #include <linux/pagemap.h> | 21 | #include <linux/pagemap.h> |
22 | #include <linux/poll.h> | 22 | #include <linux/poll.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/swap.h> | 24 | #include <linux/swap.h> |
24 | #include <linux/syscalls.h> | 25 | #include <linux/syscalls.h> |
25 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
diff --git a/drivers/staging/pohmelfs/path_entry.c b/drivers/staging/pohmelfs/path_entry.c index 3bad888ced13..cdc4dd50d638 100644 --- a/drivers/staging/pohmelfs/path_entry.c +++ b/drivers/staging/pohmelfs/path_entry.c | |||
@@ -14,7 +14,6 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
19 | #include <linux/ktime.h> | 18 | #include <linux/ktime.h> |
20 | #include <linux/fs_struct.h> | 19 | #include <linux/fs_struct.h> |
diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index 5e422e254ee8..ee5eb12b9285 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include <linux/genhd.h> | 24 | #include <linux/genhd.h> |
25 | #include <linux/highmem.h> | 25 | #include <linux/highmem.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/lzo.h> | 27 | #include <linux/lzo.h> |
27 | #include <linux/string.h> | 28 | #include <linux/string.h> |
28 | #include <linux/swap.h> | 29 | #include <linux/swap.h> |
diff --git a/drivers/staging/rt2860/pci_main_dev.c b/drivers/staging/rt2860/pci_main_dev.c index 6af430419070..e665d862281c 100644 --- a/drivers/staging/rt2860/pci_main_dev.c +++ b/drivers/staging/rt2860/pci_main_dev.c | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | #include "rt_config.h" | 38 | #include "rt_config.h" |
39 | #include <linux/pci.h> | 39 | #include <linux/pci.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | /* Following information will be show when you run 'modinfo' */ | 42 | /* Following information will be show when you run 'modinfo' */ |
42 | /* *** If you have a solution for the bug in current version of driver, please mail to me. */ | 43 | /* *** If you have a solution for the bug in current version of driver, please mail to me. */ |
diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c index b5c78aecf5e3..fd9a2072139b 100644 --- a/drivers/staging/rt2860/rt_linux.c +++ b/drivers/staging/rt2860/rt_linux.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/firmware.h> | 28 | #include <linux/firmware.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/slab.h> | ||
30 | #include "rt_config.h" | 31 | #include "rt_config.h" |
31 | 32 | ||
32 | unsigned long RTDebugLevel = RT_DEBUG_ERROR; | 33 | unsigned long RTDebugLevel = RT_DEBUG_ERROR; |
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c index c2f472ee6eb6..be2d17f60c35 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/random.h> | 19 | #include <linux/random.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/version.h> | 22 | #include <linux/version.h> |
22 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
23 | 24 | ||
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c index bd5e77bf7162..c5b80f9c32c0 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c | |||
@@ -31,6 +31,7 @@ | |||
31 | ******************************************************************************/ | 31 | ******************************************************************************/ |
32 | #include <linux/wireless.h> | 32 | #include <linux/wireless.h> |
33 | #include <linux/kmod.h> | 33 | #include <linux/kmod.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/module.h> | 35 | #include <linux/module.h> |
35 | 36 | ||
36 | #include "ieee80211.h" | 37 | #include "ieee80211.h" |
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index b1757acabedc..55d12e3271de 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #undef RX_DONT_PASS_UL | 30 | #undef RX_DONT_PASS_UL |
31 | #undef DUMMY_RX | 31 | #undef DUMMY_RX |
32 | 32 | ||
33 | #include <linux/slab.h> | ||
33 | #include <linux/syscalls.h> | 34 | #include <linux/syscalls.h> |
34 | #include <linux/eeprom_93cx6.h> | 35 | #include <linux/eeprom_93cx6.h> |
35 | 36 | ||
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c index ea96c4956930..d1d7b0866755 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/random.h> | 19 | #include <linux/random.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/version.h> | 22 | #include <linux/version.h> |
22 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
23 | #ifdef ENABLE_DOT11D | 24 | #ifdef ENABLE_DOT11D |
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c index a3302d5e01ab..de57967b9681 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/wireless.h> | 32 | #include <linux/wireless.h> |
33 | #include <linux/version.h> | 33 | #include <linux/version.h> |
34 | #include <linux/kmod.h> | 34 | #include <linux/kmod.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/module.h> | 36 | #include <linux/module.h> |
36 | 37 | ||
37 | #include "ieee80211.h" | 38 | #include "ieee80211.h" |
diff --git a/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c index e2cbfd3aa00f..e8699616fad4 100644 --- a/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192e/ieee80211/rtl819x_TSProc.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include "ieee80211.h" | 1 | #include "ieee80211.h" |
2 | #include <linux/etherdevice.h> | 2 | #include <linux/etherdevice.h> |
3 | #include <linux/slab.h> | ||
3 | #include "rtl819x_TS.h" | 4 | #include "rtl819x_TS.h" |
4 | 5 | ||
5 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) | 6 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) |
diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index 886105db8b7c..bb7e1ef28d3b 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c | |||
@@ -47,6 +47,7 @@ | |||
47 | 47 | ||
48 | //#define CONFIG_RTL8192_IO_MAP | 48 | //#define CONFIG_RTL8192_IO_MAP |
49 | #include <linux/vmalloc.h> | 49 | #include <linux/vmalloc.h> |
50 | #include <linux/slab.h> | ||
50 | #include <asm/uaccess.h> | 51 | #include <asm/uaccess.h> |
51 | #include "r8192E_hw.h" | 52 | #include "r8192E_hw.h" |
52 | #include "r8192E.h" | 53 | #include "r8192E.h" |
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c index 9d8cb0e575d3..84a4e23b60b3 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/random.h> | 19 | #include <linux/random.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/version.h> | 22 | #include <linux/version.h> |
22 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
23 | #include "dot11d.h" | 24 | #include "dot11d.h" |
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c index 122f8004904b..727cc552c5ee 100644 --- a/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c | |||
@@ -31,6 +31,7 @@ | |||
31 | ******************************************************************************/ | 31 | ******************************************************************************/ |
32 | #include <linux/wireless.h> | 32 | #include <linux/wireless.h> |
33 | #include <linux/kmod.h> | 33 | #include <linux/kmod.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/module.h> | 35 | #include <linux/module.h> |
35 | 36 | ||
36 | #include "ieee80211.h" | 37 | #include "ieee80211.h" |
diff --git a/drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c index 60cf1f8781ce..38468c539675 100644 --- a/drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192su/ieee80211/rtl819x_TSProc.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include "ieee80211.h" | 1 | #include "ieee80211.h" |
2 | #include <linux/etherdevice.h> | 2 | #include <linux/etherdevice.h> |
3 | #include <linux/slab.h> | ||
3 | #include "rtl819x_TS.h" | 4 | #include "rtl819x_TS.h" |
4 | 5 | ||
5 | void TsSetupTimeOut(unsigned long data) | 6 | void TsSetupTimeOut(unsigned long data) |
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c index 7d0305cc2106..e16256fe595a 100644 --- a/drivers/staging/rtl8192su/r8192U_core.c +++ b/drivers/staging/rtl8192su/r8192U_core.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #undef LOOP_TEST | 30 | #undef LOOP_TEST |
30 | #undef DUMP_RX | 31 | #undef DUMP_RX |
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index 27d925712cdd..d54e3a77423f 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/random.h> | 19 | #include <linux/random.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/version.h> | 22 | #include <linux/version.h> |
22 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
23 | #ifdef ENABLE_DOT11D | 24 | #ifdef ENABLE_DOT11D |
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c index c0b2c02b0ac4..750e94e17114 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/wireless.h> | 32 | #include <linux/wireless.h> |
33 | #include <linux/version.h> | 33 | #include <linux/version.h> |
34 | #include <linux/kmod.h> | 34 | #include <linux/kmod.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/module.h> | 36 | #include <linux/module.h> |
36 | 37 | ||
37 | #include "ieee80211.h" | 38 | #include "ieee80211.h" |
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c index d1275e887f0c..451120ff2130 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include "ieee80211.h" | 1 | #include "ieee80211.h" |
2 | #include <linux/etherdevice.h> | 2 | #include <linux/etherdevice.h> |
3 | #include <linux/slab.h> | ||
3 | #include "rtl819x_TS.h" | 4 | #include "rtl819x_TS.h" |
4 | 5 | ||
5 | void TsSetupTimeOut(unsigned long data) | 6 | void TsSetupTimeOut(unsigned long data) |
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index f1e085ba1cf1..68ebb0256771 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c | |||
@@ -70,6 +70,7 @@ double __extendsfdf2(float a) {return a;} | |||
70 | #include "r8192U_dm.h" | 70 | #include "r8192U_dm.h" |
71 | //#include "r8192xU_phyreg.h" | 71 | //#include "r8192xU_phyreg.h" |
72 | #include <linux/usb.h> | 72 | #include <linux/usb.h> |
73 | #include <linux/slab.h> | ||
73 | // FIXME: check if 2.6.7 is ok | 74 | // FIXME: check if 2.6.7 is ok |
74 | 75 | ||
75 | #ifdef CONFIG_RTL8192_PM | 76 | #ifdef CONFIG_RTL8192_PM |
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index 265de7949a78..88880734921a 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/sched.h> | 42 | #include <linux/sched.h> |
43 | #include <linux/pci.h> | 43 | #include <linux/pci.h> |
44 | #include <linux/firmware.h> | 44 | #include <linux/firmware.h> |
45 | #include <linux/slab.h> | ||
45 | #include <asm/ioctl.h> | 46 | #include <asm/ioctl.h> |
46 | #include <linux/ioport.h> | 47 | #include <linux/ioport.h> |
47 | #include <asm/io.h> | 48 | #include <asm/io.h> |
diff --git a/drivers/staging/sm7xx/smtcfb.c b/drivers/staging/sm7xx/smtcfb.c index 9c82a1a81ccc..8d7261c052eb 100644 --- a/drivers/staging/sm7xx/smtcfb.c +++ b/drivers/staging/sm7xx/smtcfb.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/fb.h> | 34 | #include <linux/fb.h> |
35 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
36 | #include <linux/init.h> | 36 | #include <linux/init.h> |
37 | #include <linux/slab.h> | ||
37 | #include <linux/uaccess.h> | 38 | #include <linux/uaccess.h> |
38 | #include <linux/console.h> | 39 | #include <linux/console.h> |
39 | #include <linux/screen_info.h> | 40 | #include <linux/screen_info.h> |
diff --git a/drivers/staging/strip/strip.c b/drivers/staging/strip/strip.c index 698aade79d40..c976c6b4d28a 100644 --- a/drivers/staging/strip/strip.c +++ b/drivers/staging/strip/strip.c | |||
@@ -107,6 +107,7 @@ static const char StripVersion[] = "1.3A-STUART.CHESHIRE"; | |||
107 | #include <linux/serialP.h> | 107 | #include <linux/serialP.h> |
108 | #include <linux/rcupdate.h> | 108 | #include <linux/rcupdate.h> |
109 | #include <linux/compat.h> | 109 | #include <linux/compat.h> |
110 | #include <linux/slab.h> | ||
110 | #include <net/arp.h> | 111 | #include <net/arp.h> |
111 | #include <net/net_namespace.h> | 112 | #include <net/net_namespace.h> |
112 | 113 | ||
diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index 8f6223c8303a..a78ade0dc687 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/fb.h> | 25 | #include <linux/fb.h> |
26 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include "udlfb.h" | 29 | #include "udlfb.h" |
29 | 30 | ||
diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c index 173b018c56d8..3f95605427a7 100644 --- a/drivers/staging/usbip/stub_dev.c +++ b/drivers/staging/usbip/stub_dev.c | |||
@@ -17,6 +17,8 @@ | |||
17 | * USA. | 17 | * USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/slab.h> | ||
21 | |||
20 | #include "usbip_common.h" | 22 | #include "usbip_common.h" |
21 | #include "stub.h" | 23 | #include "stub.h" |
22 | 24 | ||
diff --git a/drivers/staging/usbip/stub_main.c b/drivers/staging/usbip/stub_main.c index ba1678fa6311..6665cefe573b 100644 --- a/drivers/staging/usbip/stub_main.c +++ b/drivers/staging/usbip/stub_main.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * USA. | 17 | * USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include "usbip_common.h" | 22 | #include "usbip_common.h" |
22 | #include "stub.h" | 23 | #include "stub.h" |
diff --git a/drivers/staging/usbip/stub_rx.c b/drivers/staging/usbip/stub_rx.c index 815fb7cc3b23..bc2674086673 100644 --- a/drivers/staging/usbip/stub_rx.c +++ b/drivers/staging/usbip/stub_rx.c | |||
@@ -17,6 +17,8 @@ | |||
17 | * USA. | 17 | * USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/slab.h> | ||
21 | |||
20 | #include "usbip_common.h" | 22 | #include "usbip_common.h" |
21 | #include "stub.h" | 23 | #include "stub.h" |
22 | #include "../../usb/core/hcd.h" | 24 | #include "../../usb/core/hcd.h" |
diff --git a/drivers/staging/usbip/stub_tx.c b/drivers/staging/usbip/stub_tx.c index e2ab4f3fdac2..d7136e2c86fa 100644 --- a/drivers/staging/usbip/stub_tx.c +++ b/drivers/staging/usbip/stub_tx.c | |||
@@ -17,6 +17,8 @@ | |||
17 | * USA. | 17 | * USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/slab.h> | ||
21 | |||
20 | #include "usbip_common.h" | 22 | #include "usbip_common.h" |
21 | #include "stub.h" | 23 | #include "stub.h" |
22 | 24 | ||
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index 7a45da8f9565..e3fa4216c1cd 100644 --- a/drivers/staging/usbip/usbip_common.c +++ b/drivers/staging/usbip/usbip_common.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/tcp.h> | 23 | #include <linux/tcp.h> |
24 | #include <linux/in.h> | 24 | #include <linux/in.h> |
25 | #include <linux/kthread.h> | 25 | #include <linux/kthread.h> |
26 | #include <linux/slab.h> | ||
26 | #include "usbip_common.h" | 27 | #include "usbip_common.h" |
27 | 28 | ||
28 | /* version information */ | 29 | /* version information */ |
diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index ef4371358dbe..0b1766122d38 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * USA. | 17 | * USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include "usbip_common.h" | 22 | #include "usbip_common.h" |
22 | #include "vhci.h" | 23 | #include "vhci.h" |
diff --git a/drivers/staging/usbip/vhci_rx.c b/drivers/staging/usbip/vhci_rx.c index 7636d86c2388..8147d7202b2d 100644 --- a/drivers/staging/usbip/vhci_rx.c +++ b/drivers/staging/usbip/vhci_rx.c | |||
@@ -17,6 +17,8 @@ | |||
17 | * USA. | 17 | * USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/slab.h> | ||
21 | |||
20 | #include "usbip_common.h" | 22 | #include "usbip_common.h" |
21 | #include "vhci.h" | 23 | #include "vhci.h" |
22 | 24 | ||
diff --git a/drivers/staging/usbip/vhci_tx.c b/drivers/staging/usbip/vhci_tx.c index 7a00eb44b795..b71b4c2fbd86 100644 --- a/drivers/staging/usbip/vhci_tx.c +++ b/drivers/staging/usbip/vhci_tx.c | |||
@@ -17,6 +17,8 @@ | |||
17 | * USA. | 17 | * USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/slab.h> | ||
21 | |||
20 | #include "usbip_common.h" | 22 | #include "usbip_common.h" |
21 | #include "vhci.h" | 23 | #include "vhci.h" |
22 | 24 | ||
diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 2795ff2411e0..b159ea58adf7 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/slab.h> | ||
28 | #include <asm/time.h> | 29 | #include <asm/time.h> |
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
30 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index faf652edb70f..68f24425977f 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/slab.h> | ||
28 | #include <asm/time.h> | 29 | #include <asm/time.h> |
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
30 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index c60c80fb241d..1ab9a985dfb9 100644 --- a/drivers/staging/vme/devices/vme_user.c +++ b/drivers/staging/vme/devices/vme_user.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/pagemap.h> | 28 | #include <linux/pagemap.h> |
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/semaphore.h> | 30 | #include <linux/semaphore.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/spinlock.h> | 32 | #include <linux/spinlock.h> |
32 | #include <linux/syscalls.h> | 33 | #include <linux/syscalls.h> |
33 | #include <linux/types.h> | 34 | #include <linux/types.h> |
diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c index d6d84ebeeec0..934283a19ca5 100644 --- a/drivers/staging/vme/vme.c +++ b/drivers/staging/vme/vme.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/syscalls.h> | 29 | #include <linux/syscalls.h> |
30 | #include <linux/mutex.h> | 30 | #include <linux/mutex.h> |
31 | #include <linux/spinlock.h> | 31 | #include <linux/spinlock.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include "vme.h" | 34 | #include "vme.h" |
34 | #include "vme_bridge.h" | 35 | #include "vme_bridge.h" |
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index b698de40a60e..18f4dfed997f 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c | |||
@@ -84,6 +84,7 @@ | |||
84 | #include "iowpa.h" | 84 | #include "iowpa.h" |
85 | #include <linux/delay.h> | 85 | #include <linux/delay.h> |
86 | #include <linux/kthread.h> | 86 | #include <linux/kthread.h> |
87 | #include <linux/slab.h> | ||
87 | 88 | ||
88 | //#define DEBUG | 89 | //#define DEBUG |
89 | /*--------------------- Static Definitions -------------------------*/ | 90 | /*--------------------- Static Definitions -------------------------*/ |
diff --git a/drivers/staging/winbond/wb35reg.c b/drivers/staging/winbond/wb35reg.c index f5608ad9ed00..1b93547ff5bc 100644 --- a/drivers/staging/winbond/wb35reg.c +++ b/drivers/staging/winbond/wb35reg.c | |||
@@ -2,6 +2,7 @@ | |||
2 | #include "wb35reg_f.h" | 2 | #include "wb35reg_f.h" |
3 | 3 | ||
4 | #include <linux/usb.h> | 4 | #include <linux/usb.h> |
5 | #include <linux/slab.h> | ||
5 | 6 | ||
6 | extern void phy_calibration_winbond(struct hw_data *phw_data, u32 frequency); | 7 | extern void phy_calibration_winbond(struct hw_data *phw_data, u32 frequency); |
7 | 8 | ||
diff --git a/drivers/staging/winbond/wb35rx.c b/drivers/staging/winbond/wb35rx.c index 4d41f6c3563c..d7b57e62db08 100644 --- a/drivers/staging/winbond/wb35rx.c +++ b/drivers/staging/winbond/wb35rx.c | |||
@@ -9,6 +9,7 @@ | |||
9 | // | 9 | // |
10 | //============================================================================ | 10 | //============================================================================ |
11 | #include <linux/usb.h> | 11 | #include <linux/usb.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | #include "core.h" | 14 | #include "core.h" |
14 | #include "sysdef.h" | 15 | #include "sysdef.h" |
diff --git a/drivers/staging/winbond/wb35tx.c b/drivers/staging/winbond/wb35tx.c index 5869ef473fcd..bda7a913edf8 100644 --- a/drivers/staging/winbond/wb35tx.c +++ b/drivers/staging/winbond/wb35tx.c | |||
@@ -9,6 +9,7 @@ | |||
9 | // | 9 | // |
10 | //============================================================================ | 10 | //============================================================================ |
11 | #include <linux/usb.h> | 11 | #include <linux/usb.h> |
12 | #include <linux/gfp.h> | ||
12 | 13 | ||
13 | #include "wb35tx_f.h" | 14 | #include "wb35tx_f.h" |
14 | #include "mds_f.h" | 15 | #include "mds_f.h" |
diff --git a/drivers/staging/wlags49_h2/wl_cs.c b/drivers/staging/wlags49_h2/wl_cs.c index 811a8daa660e..9da42e66085e 100644 --- a/drivers/staging/wlags49_h2/wl_cs.c +++ b/drivers/staging/wlags49_h2/wl_cs.c | |||
@@ -67,7 +67,6 @@ | |||
67 | #include <linux/kernel.h> | 67 | #include <linux/kernel.h> |
68 | #include <linux/sched.h> | 68 | #include <linux/sched.h> |
69 | #include <linux/ptrace.h> | 69 | #include <linux/ptrace.h> |
70 | #include <linux/slab.h> | ||
71 | #include <linux/ctype.h> | 70 | #include <linux/ctype.h> |
72 | #include <linux/string.h> | 71 | #include <linux/string.h> |
73 | #include <linux/timer.h> | 72 | #include <linux/timer.h> |
diff --git a/drivers/staging/wlags49_h2/wl_netdev.c b/drivers/staging/wlags49_h2/wl_netdev.c index d7532e89f5fc..ca8c8b134c4e 100644 --- a/drivers/staging/wlags49_h2/wl_netdev.c +++ b/drivers/staging/wlags49_h2/wl_netdev.c | |||
@@ -65,6 +65,7 @@ | |||
65 | #include <wl_version.h> | 65 | #include <wl_version.h> |
66 | 66 | ||
67 | #include <linux/module.h> | 67 | #include <linux/module.h> |
68 | #include <linux/slab.h> | ||
68 | #include <linux/types.h> | 69 | #include <linux/types.h> |
69 | #include <linux/kernel.h> | 70 | #include <linux/kernel.h> |
70 | // #include <linux/sched.h> | 71 | // #include <linux/sched.h> |
diff --git a/drivers/staging/wlags49_h2/wl_pci.c b/drivers/staging/wlags49_h2/wl_pci.c index 01e4bec9fd5b..6751b4bad2e4 100644 --- a/drivers/staging/wlags49_h2/wl_pci.c +++ b/drivers/staging/wlags49_h2/wl_pci.c | |||
@@ -71,7 +71,6 @@ | |||
71 | #include <linux/init.h> | 71 | #include <linux/init.h> |
72 | #include <linux/sched.h> | 72 | #include <linux/sched.h> |
73 | #include <linux/ptrace.h> | 73 | #include <linux/ptrace.h> |
74 | #include <linux/slab.h> | ||
75 | #include <linux/ctype.h> | 74 | #include <linux/ctype.h> |
76 | #include <linux/string.h> | 75 | #include <linux/string.h> |
77 | //#include <linux/timer.h> | 76 | //#include <linux/timer.h> |
diff --git a/drivers/staging/wlags49_h2/wl_priv.c b/drivers/staging/wlags49_h2/wl_priv.c index ee610c76457e..727ea8a483af 100644 --- a/drivers/staging/wlags49_h2/wl_priv.c +++ b/drivers/staging/wlags49_h2/wl_priv.c | |||
@@ -65,6 +65,7 @@ | |||
65 | 65 | ||
66 | #include <linux/if_arp.h> | 66 | #include <linux/if_arp.h> |
67 | #include <linux/ioport.h> | 67 | #include <linux/ioport.h> |
68 | #include <linux/slab.h> | ||
68 | #include <linux/delay.h> | 69 | #include <linux/delay.h> |
69 | #include <asm/uaccess.h> | 70 | #include <asm/uaccess.h> |
70 | 71 | ||
diff --git a/drivers/staging/wlan-ng/p80211req.c b/drivers/staging/wlan-ng/p80211req.c index c2e95f166828..e1e7bf1bf27c 100644 --- a/drivers/staging/wlan-ng/p80211req.c +++ b/drivers/staging/wlan-ng/p80211req.c | |||
@@ -55,7 +55,6 @@ | |||
55 | #include <linux/sched.h> | 55 | #include <linux/sched.h> |
56 | #include <linux/types.h> | 56 | #include <linux/types.h> |
57 | #include <linux/skbuff.h> | 57 | #include <linux/skbuff.h> |
58 | #include <linux/slab.h> | ||
59 | #include <linux/wireless.h> | 58 | #include <linux/wireless.h> |
60 | #include <linux/netdevice.h> | 59 | #include <linux/netdevice.h> |
61 | #include <linux/etherdevice.h> | 60 | #include <linux/etherdevice.h> |
diff --git a/drivers/staging/wlan-ng/p80211wep.c b/drivers/staging/wlan-ng/p80211wep.c index ecbb15b297ae..80c2d3b672bb 100644 --- a/drivers/staging/wlan-ng/p80211wep.c +++ b/drivers/staging/wlan-ng/p80211wep.c | |||
@@ -50,7 +50,6 @@ | |||
50 | 50 | ||
51 | #include <linux/netdevice.h> | 51 | #include <linux/netdevice.h> |
52 | #include <linux/wireless.h> | 52 | #include <linux/wireless.h> |
53 | #include <linux/slab.h> | ||
54 | #include <linux/random.h> | 53 | #include <linux/random.h> |
55 | #include <linux/kernel.h> | 54 | #include <linux/kernel.h> |
56 | 55 | ||
diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 2fa1dfa23783..83f1d6cd7991 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
41 | #include <linux/sched.h> | 41 | #include <linux/sched.h> |
42 | #include <linux/types.h> | 42 | #include <linux/types.h> |
43 | #include <linux/slab.h> | ||
44 | #include <linux/netdevice.h> | 43 | #include <linux/netdevice.h> |
45 | #include <linux/etherdevice.h> | 44 | #include <linux/etherdevice.h> |
46 | #include <linux/wireless.h> | 45 | #include <linux/wireless.h> |
diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index 4be54cea6ad7..d383ea85c9bc 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c | |||
@@ -48,6 +48,7 @@ | |||
48 | /*================================================================*/ | 48 | /*================================================================*/ |
49 | /* System Includes */ | 49 | /* System Includes */ |
50 | #include <linux/ihex.h> | 50 | #include <linux/ihex.h> |
51 | #include <linux/slab.h> | ||
51 | 52 | ||
52 | /*================================================================*/ | 53 | /*================================================================*/ |
53 | /* Local Constants */ | 54 | /* Local Constants */ |
diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index ad163da72ae4..4d1cdfc35420 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c | |||
@@ -63,7 +63,6 @@ | |||
63 | #include <linux/wait.h> | 63 | #include <linux/wait.h> |
64 | #include <linux/sched.h> | 64 | #include <linux/sched.h> |
65 | #include <linux/types.h> | 65 | #include <linux/types.h> |
66 | #include <linux/slab.h> | ||
67 | #include <linux/wireless.h> | 66 | #include <linux/wireless.h> |
68 | #include <linux/netdevice.h> | 67 | #include <linux/netdevice.h> |
69 | #include <linux/delay.h> | 68 | #include <linux/delay.h> |
diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index 98a5d58c3f55..0b0ec9c59a5d 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c | |||
@@ -54,7 +54,6 @@ | |||
54 | #include <linux/kernel.h> | 54 | #include <linux/kernel.h> |
55 | #include <linux/sched.h> | 55 | #include <linux/sched.h> |
56 | #include <linux/types.h> | 56 | #include <linux/types.h> |
57 | #include <linux/slab.h> | ||
58 | #include <linux/wireless.h> | 57 | #include <linux/wireless.h> |
59 | #include <linux/netdevice.h> | 58 | #include <linux/netdevice.h> |
60 | #include <linux/io.h> | 59 | #include <linux/io.h> |
diff --git a/drivers/tc/tc.c b/drivers/tc/tc.c index e5bd4470a570..a8aaf6ac2ae2 100644 --- a/drivers/tc/tc.c +++ b/drivers/tc/tc.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/string.h> | 20 | #include <linux/string.h> |
20 | #include <linux/tc.h> | 21 | #include <linux/tc.h> |
21 | #include <linux/types.h> | 22 | #include <linux/types.h> |
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 5066de5cfc0c..13c72c629329 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/device.h> | 27 | #include <linux/device.h> |
28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/kdev_t.h> | 30 | #include <linux/kdev_t.h> |
30 | #include <linux/idr.h> | 31 | #include <linux/idr.h> |
31 | #include <linux/thermal.h> | 32 | #include <linux/thermal.h> |
@@ -505,6 +506,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) | |||
505 | tz->temp_input.attr.attr.name = tz->temp_input.name; | 506 | tz->temp_input.attr.attr.name = tz->temp_input.name; |
506 | tz->temp_input.attr.attr.mode = 0444; | 507 | tz->temp_input.attr.attr.mode = 0444; |
507 | tz->temp_input.attr.show = temp_input_show; | 508 | tz->temp_input.attr.show = temp_input_show; |
509 | sysfs_attr_init(&tz->temp_input.attr.attr); | ||
508 | result = device_create_file(hwmon->device, &tz->temp_input.attr); | 510 | result = device_create_file(hwmon->device, &tz->temp_input.attr); |
509 | if (result) | 511 | if (result) |
510 | goto unregister_hwmon_device; | 512 | goto unregister_hwmon_device; |
@@ -517,6 +519,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) | |||
517 | tz->temp_crit.attr.attr.name = tz->temp_crit.name; | 519 | tz->temp_crit.attr.attr.name = tz->temp_crit.name; |
518 | tz->temp_crit.attr.attr.mode = 0444; | 520 | tz->temp_crit.attr.attr.mode = 0444; |
519 | tz->temp_crit.attr.show = temp_crit_show; | 521 | tz->temp_crit.attr.show = temp_crit_show; |
522 | sysfs_attr_init(&tz->temp_crit.attr.attr); | ||
520 | result = device_create_file(hwmon->device, | 523 | result = device_create_file(hwmon->device, |
521 | &tz->temp_crit.attr); | 524 | &tz->temp_crit.attr); |
522 | if (result) | 525 | if (result) |
@@ -725,6 +728,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, | |||
725 | goto release_idr; | 728 | goto release_idr; |
726 | 729 | ||
727 | sprintf(dev->attr_name, "cdev%d_trip_point", dev->id); | 730 | sprintf(dev->attr_name, "cdev%d_trip_point", dev->id); |
731 | sysfs_attr_init(&dev->attr.attr); | ||
728 | dev->attr.attr.name = dev->attr_name; | 732 | dev->attr.attr.name = dev->attr_name; |
729 | dev->attr.attr.mode = 0444; | 733 | dev->attr.attr.mode = 0444; |
730 | dev->attr.show = thermal_cooling_device_trip_point_show; | 734 | dev->attr.show = thermal_cooling_device_trip_point_show; |
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 4de382acd8f2..bff1afbde5a4 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/poll.h> | 18 | #include <linux/poll.h> |
19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
21 | #include <linux/idr.h> | 22 | #include <linux/idr.h> |
22 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
diff --git a/drivers/uio/uio_aec.c b/drivers/uio/uio_aec.c index b7830e9a3baa..72b22d44e8b9 100644 --- a/drivers/uio/uio_aec.c +++ b/drivers/uio/uio_aec.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/uaccess.h> | 28 | #include <linux/uaccess.h> |
29 | #include <linux/uio_driver.h> | 29 | #include <linux/uio_driver.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #define PCI_VENDOR_ID_AEC 0xaecb | 32 | #define PCI_VENDOR_ID_AEC 0xaecb |
32 | #define PCI_DEVICE_ID_AEC_VITCLTC 0x6250 | 33 | #define PCI_DEVICE_ID_AEC_VITCLTC 0x6250 |
diff --git a/drivers/uio/uio_cif.c b/drivers/uio/uio_cif.c index 28034c812914..371f87f8bc22 100644 --- a/drivers/uio/uio_cif.c +++ b/drivers/uio/uio_cif.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/uio_driver.h> | 15 | #include <linux/uio_driver.h> |
15 | 16 | ||
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
diff --git a/drivers/uio/uio_netx.c b/drivers/uio/uio_netx.c index afbf0bd55cc9..5a18e9f7b836 100644 --- a/drivers/uio/uio_netx.c +++ b/drivers/uio/uio_netx.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/uio_driver.h> | 17 | #include <linux/uio_driver.h> |
17 | 18 | ||
18 | #define PCI_VENDOR_ID_HILSCHER 0x15CF | 19 | #define PCI_VENDOR_ID_HILSCHER 0x15CF |
diff --git a/drivers/uio/uio_pci_generic.c b/drivers/uio/uio_pci_generic.c index 313da35984af..85c9884a67fd 100644 --- a/drivers/uio/uio_pci_generic.c +++ b/drivers/uio/uio_pci_generic.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/uio_driver.h> | 26 | #include <linux/uio_driver.h> |
26 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
27 | 28 | ||
diff --git a/drivers/uio/uio_pdrv.c b/drivers/uio/uio_pdrv.c index d494ce9288c3..7d3e469b9904 100644 --- a/drivers/uio/uio_pdrv.c +++ b/drivers/uio/uio_pdrv.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <linux/uio_driver.h> | 12 | #include <linux/uio_driver.h> |
13 | #include <linux/stringify.h> | 13 | #include <linux/stringify.h> |
14 | #include <linux/slab.h> | ||
14 | 15 | ||
15 | #define DRIVER_NAME "uio_pdrv" | 16 | #define DRIVER_NAME "uio_pdrv" |
16 | 17 | ||
diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c index 1ef3b8fc50b3..61e569df2bba 100644 --- a/drivers/uio/uio_pdrv_genirq.c +++ b/drivers/uio/uio_pdrv_genirq.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/stringify.h> | 22 | #include <linux/stringify.h> |
23 | #include <linux/pm_runtime.h> | 23 | #include <linux/pm_runtime.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #define DRIVER_NAME "uio_pdrv_genirq" | 26 | #define DRIVER_NAME "uio_pdrv_genirq" |
26 | 27 | ||
diff --git a/drivers/uio/uio_sercos3.c b/drivers/uio/uio_sercos3.c index a6d1b2bc47f3..3d461cd73e6b 100644 --- a/drivers/uio/uio_sercos3.c +++ b/drivers/uio/uio_sercos3.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
29 | #include <linux/uio_driver.h> | 29 | #include <linux/uio_driver.h> |
30 | #include <linux/io.h> | 30 | #include <linux/io.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | /* ID's for SERCOS III PCI card (PLX 9030) */ | 33 | /* ID's for SERCOS III PCI card (PLX 9030) */ |
33 | #define SERCOS_SUB_VENDOR_ID 0x1971 | 34 | #define SERCOS_SUB_VENDOR_ID 0x1971 |
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c index 3e862401a638..1e9ba4bdffef 100644 --- a/drivers/usb/atm/speedtch.c +++ b/drivers/usb/atm/speedtch.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/device.h> | 27 | #include <linux/device.h> |
28 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
29 | #include <linux/firmware.h> | 29 | #include <linux/firmware.h> |
30 | #include <linux/gfp.h> | ||
31 | #include <linux/init.h> | 30 | #include <linux/init.h> |
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index c5395246886d..25f01b536f67 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c | |||
@@ -66,6 +66,7 @@ | |||
66 | #include <linux/kthread.h> | 66 | #include <linux/kthread.h> |
67 | #include <linux/mutex.h> | 67 | #include <linux/mutex.h> |
68 | #include <linux/freezer.h> | 68 | #include <linux/freezer.h> |
69 | #include <linux/slab.h> | ||
69 | 70 | ||
70 | #include <asm/unaligned.h> | 71 | #include <asm/unaligned.h> |
71 | 72 | ||
diff --git a/drivers/usb/c67x00/c67x00-drv.c b/drivers/usb/c67x00/c67x00-drv.c index 029ee4a8a1f3..b6d49234e521 100644 --- a/drivers/usb/c67x00/c67x00-drv.c +++ b/drivers/usb/c67x00/c67x00-drv.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/device.h> | 37 | #include <linux/device.h> |
38 | #include <linux/io.h> | 38 | #include <linux/io.h> |
39 | #include <linux/list.h> | 39 | #include <linux/list.h> |
40 | #include <linux/slab.h> | ||
40 | #include <linux/usb.h> | 41 | #include <linux/usb.h> |
41 | #include <linux/usb/c67x00.h> | 42 | #include <linux/usb/c67x00.h> |
42 | 43 | ||
diff --git a/drivers/usb/c67x00/c67x00-sched.c b/drivers/usb/c67x00/c67x00-sched.c index 85dfe2965661..f6b3c253f3fa 100644 --- a/drivers/usb/c67x00/c67x00-sched.c +++ b/drivers/usb/c67x00/c67x00-sched.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/kthread.h> | 24 | #include <linux/kthread.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "c67x00.h" | 27 | #include "c67x00.h" |
27 | #include "c67x00-hcd.h" | 28 | #include "c67x00-hcd.h" |
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 8588c0937a89..3e7c1b800ebb 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
26 | #include <linux/uaccess.h> | 26 | #include <linux/uaccess.h> |
27 | #include <linux/kref.h> | 27 | #include <linux/kref.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
29 | #include <linux/usb.h> | 30 | #include <linux/usb.h> |
30 | #include <linux/usb/tmc.h> | 31 | #include <linux/usb/tmc.h> |
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c index d41811bfef2a..19bc03a9fecf 100644 --- a/drivers/usb/core/devices.c +++ b/drivers/usb/core/devices.c | |||
@@ -50,7 +50,7 @@ | |||
50 | 50 | ||
51 | #include <linux/fs.h> | 51 | #include <linux/fs.h> |
52 | #include <linux/mm.h> | 52 | #include <linux/mm.h> |
53 | #include <linux/slab.h> | 53 | #include <linux/gfp.h> |
54 | #include <linux/poll.h> | 54 | #include <linux/poll.h> |
55 | #include <linux/usb.h> | 55 | #include <linux/usb.h> |
56 | #include <linux/smp_lock.h> | 56 | #include <linux/smp_lock.h> |
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index f3c233806fa3..6a3b5cae3a6e 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/device.h> | 25 | #include <linux/device.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/usb.h> | 27 | #include <linux/usb.h> |
27 | #include <linux/usb/quirks.h> | 28 | #include <linux/usb/quirks.h> |
28 | #include <linux/pm_runtime.h> | 29 | #include <linux/pm_runtime.h> |
diff --git a/drivers/usb/core/endpoint.c b/drivers/usb/core/endpoint.c index d26b9ea981f9..4f84a41ee7a8 100644 --- a/drivers/usb/core/endpoint.c +++ b/drivers/usb/core/endpoint.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/idr.h> | 15 | #include <linux/idr.h> |
15 | #include <linux/usb.h> | 16 | #include <linux/usb.h> |
16 | #include "usb.h" | 17 | #include "usb.h" |
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c index c3536f151f02..f06f5dbc8cdc 100644 --- a/drivers/usb/core/file.c +++ b/drivers/usb/core/file.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/rwsem.h> | 20 | #include <linux/rwsem.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/smp_lock.h> | 22 | #include <linux/smp_lock.h> |
22 | #include <linux/usb.h> | 23 | #include <linux/usb.h> |
23 | 24 | ||
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index 12ac9cd32a07..df1bae9b048e 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c | |||
@@ -1370,6 +1370,12 @@ static irqreturn_t at91_udc_irq (int irq, void *_udc) | |||
1370 | { | 1370 | { |
1371 | struct at91_udc *udc = _udc; | 1371 | struct at91_udc *udc = _udc; |
1372 | u32 rescans = 5; | 1372 | u32 rescans = 5; |
1373 | int disable_clock = 0; | ||
1374 | |||
1375 | if (!udc->clocked) { | ||
1376 | clk_on(udc); | ||
1377 | disable_clock = 1; | ||
1378 | } | ||
1373 | 1379 | ||
1374 | while (rescans--) { | 1380 | while (rescans--) { |
1375 | u32 status; | 1381 | u32 status; |
@@ -1458,6 +1464,9 @@ static irqreturn_t at91_udc_irq (int irq, void *_udc) | |||
1458 | } | 1464 | } |
1459 | } | 1465 | } |
1460 | 1466 | ||
1467 | if (disable_clock) | ||
1468 | clk_off(udc); | ||
1469 | |||
1461 | return IRQ_HANDLED; | 1470 | return IRQ_HANDLED; |
1462 | } | 1471 | } |
1463 | 1472 | ||
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index f79bdfe4bed9..75a256f3d45b 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/device.h> | 16 | #include <linux/device.h> |
16 | #include <linux/dma-mapping.h> | 17 | #include <linux/dma-mapping.h> |
17 | #include <linux/list.h> | 18 | #include <linux/list.h> |
diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c index c7cb87a6fee2..699695128e33 100644 --- a/drivers/usb/gadget/ci13xxx_udc.c +++ b/drivers/usb/gadget/ci13xxx_udc.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #include <linux/kernel.h> | 62 | #include <linux/kernel.h> |
63 | #include <linux/module.h> | 63 | #include <linux/module.h> |
64 | #include <linux/pci.h> | 64 | #include <linux/pci.h> |
65 | #include <linux/slab.h> | ||
65 | #include <linux/usb/ch9.h> | 66 | #include <linux/usb/ch9.h> |
66 | #include <linux/usb/gadget.h> | 67 | #include <linux/usb/gadget.h> |
67 | 68 | ||
diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c index e1191b9a316a..47e8e722682c 100644 --- a/drivers/usb/gadget/config.c +++ b/drivers/usb/gadget/config.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
23 | #include <linux/list.h> | 24 | #include <linux/list.h> |
24 | #include <linux/string.h> | 25 | #include <linux/string.h> |
diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c index e49c7325dce2..400e1ebe6976 100644 --- a/drivers/usb/gadget/f_acm.c +++ b/drivers/usb/gadget/f_acm.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | /* #define VERBOSE_DEBUG */ | 15 | /* #define VERBOSE_DEBUG */ |
16 | 16 | ||
17 | #include <linux/slab.h> | ||
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | #include <linux/device.h> | 19 | #include <linux/device.h> |
19 | 20 | ||
diff --git a/drivers/usb/gadget/f_audio.c b/drivers/usb/gadget/f_audio.c index f1e3aad76c37..43bf44514c41 100644 --- a/drivers/usb/gadget/f_audio.c +++ b/drivers/usb/gadget/f_audio.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * Licensed under the GPL-2 or later. | 9 | * Licensed under the GPL-2 or later. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
13 | #include <linux/device.h> | 14 | #include <linux/device.h> |
14 | #include <asm/atomic.h> | 15 | #include <asm/atomic.h> |
diff --git a/drivers/usb/gadget/f_ecm.c b/drivers/usb/gadget/f_ecm.c index 2fff530efc19..4e595324c614 100644 --- a/drivers/usb/gadget/f_ecm.c +++ b/drivers/usb/gadget/f_ecm.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | /* #define VERBOSE_DEBUG */ | 22 | /* #define VERBOSE_DEBUG */ |
23 | 23 | ||
24 | #include <linux/slab.h> | ||
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
25 | #include <linux/device.h> | 26 | #include <linux/device.h> |
26 | #include <linux/etherdevice.h> | 27 | #include <linux/etherdevice.h> |
diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c index d4f0db58a8ad..38226e9a371d 100644 --- a/drivers/usb/gadget/f_eem.c +++ b/drivers/usb/gadget/f_eem.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/device.h> | 24 | #include <linux/device.h> |
25 | #include <linux/etherdevice.h> | 25 | #include <linux/etherdevice.h> |
26 | #include <linux/crc32.h> | 26 | #include <linux/crc32.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include "u_ether.h" | 29 | #include "u_ether.h" |
29 | 30 | ||
diff --git a/drivers/usb/gadget/f_loopback.c b/drivers/usb/gadget/f_loopback.c index 6cb29d3df575..e91d1b16d9be 100644 --- a/drivers/usb/gadget/f_loopback.c +++ b/drivers/usb/gadget/f_loopback.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | /* #define VERBOSE_DEBUG */ | 22 | /* #define VERBOSE_DEBUG */ |
23 | 23 | ||
24 | #include <linux/slab.h> | ||
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
25 | #include <linux/device.h> | 26 | #include <linux/device.h> |
26 | 27 | ||
diff --git a/drivers/usb/gadget/f_obex.c b/drivers/usb/gadget/f_obex.c index b4a3ba654ea5..8f8c64371475 100644 --- a/drivers/usb/gadget/f_obex.c +++ b/drivers/usb/gadget/f_obex.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | /* #define VERBOSE_DEBUG */ | 24 | /* #define VERBOSE_DEBUG */ |
25 | 25 | ||
26 | #include <linux/slab.h> | ||
26 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
27 | #include <linux/device.h> | 28 | #include <linux/device.h> |
28 | 29 | ||
diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c index d2de10b9dc4b..3c6e1a058745 100644 --- a/drivers/usb/gadget/f_phonet.c +++ b/drivers/usb/gadget/f_phonet.c | |||
@@ -20,6 +20,7 @@ | |||
20 | * 02110-1301 USA | 20 | * 02110-1301 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/slab.h> | ||
23 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
24 | #include <linux/device.h> | 25 | #include <linux/device.h> |
25 | 26 | ||
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index a30e60c7f129..56b022150f22 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | /* #define VERBOSE_DEBUG */ | 25 | /* #define VERBOSE_DEBUG */ |
26 | 26 | ||
27 | #include <linux/slab.h> | ||
27 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
28 | #include <linux/device.h> | 29 | #include <linux/device.h> |
29 | #include <linux/etherdevice.h> | 30 | #include <linux/etherdevice.h> |
diff --git a/drivers/usb/gadget/f_serial.c b/drivers/usb/gadget/f_serial.c index db0aa93606ef..490b00b01a7d 100644 --- a/drivers/usb/gadget/f_serial.c +++ b/drivers/usb/gadget/f_serial.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * either version 2 of that License or (at your option) any later version. | 10 | * either version 2 of that License or (at your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/slab.h> | ||
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
14 | #include <linux/device.h> | 15 | #include <linux/device.h> |
15 | 16 | ||
diff --git a/drivers/usb/gadget/f_sourcesink.c b/drivers/usb/gadget/f_sourcesink.c index 09cba273d2db..6d3cc443d914 100644 --- a/drivers/usb/gadget/f_sourcesink.c +++ b/drivers/usb/gadget/f_sourcesink.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | /* #define VERBOSE_DEBUG */ | 22 | /* #define VERBOSE_DEBUG */ |
23 | 23 | ||
24 | #include <linux/slab.h> | ||
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
25 | #include <linux/device.h> | 26 | #include <linux/device.h> |
26 | 27 | ||
diff --git a/drivers/usb/gadget/f_subset.c b/drivers/usb/gadget/f_subset.c index a9c98fdb626d..8675ca415329 100644 --- a/drivers/usb/gadget/f_subset.c +++ b/drivers/usb/gadget/f_subset.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/slab.h> | ||
22 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
23 | #include <linux/device.h> | 24 | #include <linux/device.h> |
24 | #include <linux/etherdevice.h> | 25 | #include <linux/etherdevice.h> |
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c index 04f6224b7e06..2b56ce621852 100644 --- a/drivers/usb/gadget/gmidi.c +++ b/drivers/usb/gadget/gmidi.c | |||
@@ -21,6 +21,7 @@ | |||
21 | /* #define VERBOSE_DEBUG */ | 21 | /* #define VERBOSE_DEBUG */ |
22 | 22 | ||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/utsname.h> | 25 | #include <linux/utsname.h> |
25 | #include <linux/device.h> | 26 | #include <linux/device.h> |
26 | 27 | ||
diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index 01ee0b9bc957..e743122fcd93 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/clk.h> | 29 | #include <linux/clk.h> |
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | #include <linux/timer.h> | 31 | #include <linux/timer.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <linux/usb/ch9.h> | 34 | #include <linux/usb/ch9.h> |
34 | #include <linux/usb/gadget.h> | 35 | #include <linux/usb/gadget.h> |
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c index 6cd3d54f5640..fded3fca793b 100644 --- a/drivers/usb/gadget/lh7a40x_udc.c +++ b/drivers/usb/gadget/lh7a40x_udc.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "lh7a40x_udc.h" | 27 | #include "lh7a40x_udc.h" |
27 | 28 | ||
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c index a8c8543d1b08..166bf71fd348 100644 --- a/drivers/usb/gadget/m66592-udc.c +++ b/drivers/usb/gadget/m66592-udc.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/err.h> | 29 | #include <linux/err.h> |
29 | #include <linux/usb/ch9.h> | 30 | #include <linux/usb/ch9.h> |
30 | #include <linux/usb/gadget.h> | 31 | #include <linux/usb/gadget.h> |
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 05b892c3d686..85b0d8921eae 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/clk.h> | 31 | #include <linux/clk.h> |
32 | #include <linux/irq.h> | 32 | #include <linux/irq.h> |
33 | #include <linux/gpio.h> | 33 | #include <linux/gpio.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include <asm/byteorder.h> | 36 | #include <asm/byteorder.h> |
36 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index 5e13d23b5f0c..888d8f166c0b 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c | |||
@@ -23,11 +23,11 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/err.h> | ||
27 | #include <linux/io.h> | 26 | #include <linux/io.h> |
28 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
29 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
30 | #include <linux/err.h> | 29 | #include <linux/err.h> |
30 | #include <linux/slab.h> | ||
31 | 31 | ||
32 | #include <linux/usb/ch9.h> | 32 | #include <linux/usb/ch9.h> |
33 | #include <linux/usb/gadget.h> | 33 | #include <linux/usb/gadget.h> |
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index 48267bc0b2e0..5c0d06c79a81 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/list.h> | 29 | #include <linux/list.h> |
30 | #include <linux/proc_fs.h> | 30 | #include <linux/proc_fs.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/seq_file.h> | 32 | #include <linux/seq_file.h> |
32 | #include <linux/netdevice.h> | 33 | #include <linux/netdevice.h> |
33 | 34 | ||
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index f742c8e7397c..124a8ccfdcda 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <linux/usb/ch9.h> | 27 | #include <linux/usb/ch9.h> |
27 | #include <linux/usb/gadget.h> | 28 | #include <linux/usb/gadget.h> |
diff --git a/drivers/usb/gadget/u_audio.c b/drivers/usb/gadget/u_audio.c index 35e0930f5bbb..7a86d2c9109c 100644 --- a/drivers/usb/gadget/u_audio.c +++ b/drivers/usb/gadget/u_audio.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/device.h> | 14 | #include <linux/device.h> |
14 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
15 | #include <linux/ctype.h> | 16 | #include <linux/ctype.h> |
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index 84ca195c2d10..07f4178ad178 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c | |||
@@ -23,6 +23,7 @@ | |||
23 | /* #define VERBOSE_DEBUG */ | 23 | /* #define VERBOSE_DEBUG */ |
24 | 24 | ||
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/gfp.h> | ||
26 | #include <linux/device.h> | 27 | #include <linux/device.h> |
27 | #include <linux/ctype.h> | 28 | #include <linux/ctype.h> |
28 | #include <linux/etherdevice.h> | 29 | #include <linux/etherdevice.h> |
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c index adf8260c3a6a..16bdf77f582a 100644 --- a/drivers/usb/gadget/u_serial.c +++ b/drivers/usb/gadget/u_serial.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/tty.h> | 24 | #include <linux/tty.h> |
25 | #include <linux/tty_flip.h> | 25 | #include <linux/tty_flip.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "u_serial.h" | 28 | #include "u_serial.h" |
28 | 29 | ||
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index fac81ee193dd..807280d069f9 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c | |||
@@ -50,6 +50,7 @@ | |||
50 | /* #define VERBOSE_DEBUG */ | 50 | /* #define VERBOSE_DEBUG */ |
51 | 51 | ||
52 | #include <linux/kernel.h> | 52 | #include <linux/kernel.h> |
53 | #include <linux/slab.h> | ||
53 | #include <linux/utsname.h> | 54 | #include <linux/utsname.h> |
54 | #include <linux/device.h> | 55 | #include <linux/device.h> |
55 | 56 | ||
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index dc55a62859c6..207e7a85aeb0 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/ioport.h> | 24 | #include <linux/ioport.h> |
25 | #include <linux/sched.h> | 25 | #include <linux/sched.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
28 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
@@ -35,6 +34,7 @@ | |||
35 | #include <linux/moduleparam.h> | 34 | #include <linux/moduleparam.h> |
36 | #include <linux/dma-mapping.h> | 35 | #include <linux/dma-mapping.h> |
37 | #include <linux/debugfs.h> | 36 | #include <linux/debugfs.h> |
37 | #include <linux/slab.h> | ||
38 | 38 | ||
39 | #include "../core/hcd.h" | 39 | #include "../core/hcd.h" |
40 | 40 | ||
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c index 23cd917088b4..ead59f42e69b 100644 --- a/drivers/usb/host/ehci-mxc.c +++ b/drivers/usb/host/ehci-mxc.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/usb/otg.h> | 23 | #include <linux/usb/otg.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <mach/mxc_ehci.h> | 26 | #include <mach/mxc_ehci.h> |
26 | 27 | ||
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index f0282d6bb7aa..a67a0030dd57 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/clk.h> | 37 | #include <linux/clk.h> |
38 | #include <linux/gpio.h> | 38 | #include <linux/gpio.h> |
39 | #include <linux/regulator/consumer.h> | 39 | #include <linux/regulator/consumer.h> |
40 | #include <linux/slab.h> | ||
40 | #include <plat/usb.h> | 41 | #include <plat/usb.h> |
41 | 42 | ||
42 | /* | 43 | /* |
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c index 5dcfb3de9945..15379c636143 100644 --- a/drivers/usb/host/fhci-hcd.c +++ b/drivers/usb/host/fhci-hcd.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/usb.h> | 27 | #include <linux/usb.h> |
28 | #include <linux/of_platform.h> | 28 | #include <linux/of_platform.h> |
29 | #include <linux/of_gpio.h> | 29 | #include <linux/of_gpio.h> |
30 | #include <linux/slab.h> | ||
30 | #include <asm/qe.h> | 31 | #include <asm/qe.h> |
31 | #include <asm/fsl_gtm.h> | 32 | #include <asm/fsl_gtm.h> |
32 | #include "../core/hcd.h" | 33 | #include "../core/hcd.h" |
diff --git a/drivers/usb/host/fhci-mem.c b/drivers/usb/host/fhci-mem.c index 2c0736c99712..5591bfb499d1 100644 --- a/drivers/usb/host/fhci-mem.c +++ b/drivers/usb/host/fhci-mem.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/list.h> | 22 | #include <linux/list.h> |
22 | #include <linux/usb.h> | 23 | #include <linux/usb.h> |
23 | #include "../core/hcd.h" | 24 | #include "../core/hcd.h" |
diff --git a/drivers/usb/host/fhci-q.c b/drivers/usb/host/fhci-q.c index b0a1446ba292..f73c92359beb 100644 --- a/drivers/usb/host/fhci-q.c +++ b/drivers/usb/host/fhci-q.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/list.h> | 23 | #include <linux/list.h> |
23 | #include <linux/usb.h> | 24 | #include <linux/usb.h> |
24 | #include "../core/hcd.h" | 25 | #include "../core/hcd.h" |
diff --git a/drivers/usb/host/fhci-tds.c b/drivers/usb/host/fhci-tds.c index e1232890c78b..57013479d7f7 100644 --- a/drivers/usb/host/fhci-tds.c +++ b/drivers/usb/host/fhci-tds.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/list.h> | 22 | #include <linux/list.h> |
22 | #include <linux/io.h> | 23 | #include <linux/io.h> |
23 | #include <linux/usb.h> | 24 | #include <linux/usb.h> |
diff --git a/drivers/usb/host/hwa-hc.c b/drivers/usb/host/hwa-hc.c index 88b03214622b..35742f8c7cda 100644 --- a/drivers/usb/host/hwa-hc.c +++ b/drivers/usb/host/hwa-hc.c | |||
@@ -55,6 +55,7 @@ | |||
55 | */ | 55 | */ |
56 | #include <linux/kernel.h> | 56 | #include <linux/kernel.h> |
57 | #include <linux/init.h> | 57 | #include <linux/init.h> |
58 | #include <linux/slab.h> | ||
58 | #include <linux/module.h> | 59 | #include <linux/module.h> |
59 | #include <linux/workqueue.h> | 60 | #include <linux/workqueue.h> |
60 | #include <linux/wait.h> | 61 | #include <linux/wait.h> |
diff --git a/drivers/usb/host/imx21-hcd.c b/drivers/usb/host/imx21-hcd.c index 213e270e1c29..8a12f297645f 100644 --- a/drivers/usb/host/imx21-hcd.c +++ b/drivers/usb/host/imx21-hcd.c | |||
@@ -54,6 +54,7 @@ | |||
54 | #include <linux/kernel.h> | 54 | #include <linux/kernel.h> |
55 | #include <linux/list.h> | 55 | #include <linux/list.h> |
56 | #include <linux/platform_device.h> | 56 | #include <linux/platform_device.h> |
57 | #include <linux/slab.h> | ||
57 | #include <linux/usb.h> | 58 | #include <linux/usb.h> |
58 | 59 | ||
59 | #include "../core/hcd.h" | 60 | #include "../core/hcd.h" |
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c index a2b305477afe..92de71dc7729 100644 --- a/drivers/usb/host/isp116x-hcd.c +++ b/drivers/usb/host/isp116x-hcd.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #include <linux/errno.h> | 62 | #include <linux/errno.h> |
63 | #include <linux/init.h> | 63 | #include <linux/init.h> |
64 | #include <linux/list.h> | 64 | #include <linux/list.h> |
65 | #include <linux/slab.h> | ||
65 | #include <linux/usb.h> | 66 | #include <linux/usb.h> |
66 | #include <linux/usb/isp116x.h> | 67 | #include <linux/usb/isp116x.h> |
67 | #include <linux/platform_device.h> | 68 | #include <linux/platform_device.h> |
diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c index 35288bcae0db..83094d067e0f 100644 --- a/drivers/usb/host/ohci-q.c +++ b/drivers/usb/host/ohci-q.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/irq.h> | 10 | #include <linux/irq.h> |
11 | #include <linux/slab.h> | ||
11 | 12 | ||
12 | static void urb_free_priv (struct ohci_hcd *hc, urb_priv_t *urb_priv) | 13 | static void urb_free_priv (struct ohci_hcd *hc, urb_priv_t *urb_priv) |
13 | { | 14 | { |
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index f71a73a93d0c..d478ffad59b4 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/io.h> | 37 | #include <linux/io.h> |
38 | #include <linux/mm.h> | 38 | #include <linux/mm.h> |
39 | #include <linux/irq.h> | 39 | #include <linux/irq.h> |
40 | #include <linux/slab.h> | ||
40 | #include <asm/cacheflush.h> | 41 | #include <asm/cacheflush.h> |
41 | 42 | ||
42 | #include "../core/hcd.h" | 43 | #include "../core/hcd.h" |
diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c index e52b954dda47..98cf0b26b968 100644 --- a/drivers/usb/host/uhci-debug.c +++ b/drivers/usb/host/uhci-debug.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * (C) Copyright 1999-2001 Johannes Erdfelt | 9 | * (C) Copyright 1999-2001 Johannes Erdfelt |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
13 | #include <linux/debugfs.h> | 14 | #include <linux/debugfs.h> |
14 | #include <linux/smp_lock.h> | 15 | #include <linux/smp_lock.h> |
diff --git a/drivers/usb/host/whci/asl.c b/drivers/usb/host/whci/asl.c index 562eba108816..773249306031 100644 --- a/drivers/usb/host/whci/asl.c +++ b/drivers/usb/host/whci/asl.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/gfp.h> | ||
19 | #include <linux/dma-mapping.h> | 20 | #include <linux/dma-mapping.h> |
20 | #include <linux/uwb/umc.h> | 21 | #include <linux/uwb/umc.h> |
21 | #include <linux/usb.h> | 22 | #include <linux/usb.h> |
diff --git a/drivers/usb/host/whci/debug.c b/drivers/usb/host/whci/debug.c index 8c1c610c9513..c5305b599ca0 100644 --- a/drivers/usb/host/whci/debug.c +++ b/drivers/usb/host/whci/debug.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
18 | #include <linux/slab.h> | ||
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
19 | #include <linux/debugfs.h> | 20 | #include <linux/debugfs.h> |
20 | #include <linux/seq_file.h> | 21 | #include <linux/seq_file.h> |
diff --git a/drivers/usb/host/whci/init.c b/drivers/usb/host/whci/init.c index 34a783cb0133..f7582e8e2169 100644 --- a/drivers/usb/host/whci/init.c +++ b/drivers/usb/host/whci/init.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/gfp.h> | ||
19 | #include <linux/dma-mapping.h> | 20 | #include <linux/dma-mapping.h> |
20 | #include <linux/uwb/umc.h> | 21 | #include <linux/uwb/umc.h> |
21 | 22 | ||
diff --git a/drivers/usb/host/whci/pzl.c b/drivers/usb/host/whci/pzl.c index 0db3fb2dc03a..33c5580b4d25 100644 --- a/drivers/usb/host/whci/pzl.c +++ b/drivers/usb/host/whci/pzl.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/gfp.h> | ||
19 | #include <linux/dma-mapping.h> | 20 | #include <linux/dma-mapping.h> |
20 | #include <linux/uwb/umc.h> | 21 | #include <linux/uwb/umc.h> |
21 | #include <linux/usb.h> | 22 | #include <linux/usb.h> |
diff --git a/drivers/usb/host/whci/qset.c b/drivers/usb/host/whci/qset.c index 7d4204db0f61..141d049beb3e 100644 --- a/drivers/usb/host/whci/qset.c +++ b/drivers/usb/host/whci/qset.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/dma-mapping.h> | 19 | #include <linux/dma-mapping.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/uwb/umc.h> | 21 | #include <linux/uwb/umc.h> |
21 | #include <linux/usb.h> | 22 | #include <linux/usb.h> |
22 | 23 | ||
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index bba9b19ed1b9..c09539bad1ee 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/usb.h> | 23 | #include <linux/usb.h> |
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/dmapool.h> | 26 | #include <linux/dmapool.h> |
26 | 27 | ||
27 | #include "xhci.h" | 28 | #include "xhci.h" |
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 6ba841bca4a2..85d7e8f2085e 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -65,6 +65,7 @@ | |||
65 | */ | 65 | */ |
66 | 66 | ||
67 | #include <linux/scatterlist.h> | 67 | #include <linux/scatterlist.h> |
68 | #include <linux/slab.h> | ||
68 | #include "xhci.h" | 69 | #include "xhci.h" |
69 | 70 | ||
70 | /* | 71 | /* |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 492a61c2c79d..7e4277273908 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/moduleparam.h> | 25 | #include <linux/moduleparam.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "xhci.h" | 28 | #include "xhci.h" |
28 | 29 | ||
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c index 3adab041355a..094f91cbc578 100644 --- a/drivers/usb/misc/appledisplay.c +++ b/drivers/usb/misc/appledisplay.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/usb.h> | 28 | #include <linux/usb.h> |
28 | #include <linux/backlight.h> | 29 | #include <linux/backlight.h> |
29 | #include <linux/timer.h> | 30 | #include <linux/timer.h> |
diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c index 1547d8cac5fb..2f43c57743c9 100644 --- a/drivers/usb/misc/cypress_cy7c63.c +++ b/drivers/usb/misc/cypress_cy7c63.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/usb.h> | 36 | #include <linux/usb.h> |
36 | 37 | ||
37 | #define DRIVER_AUTHOR "Oliver Bock (bock@tfh-berlin.de)" | 38 | #define DRIVER_AUTHOR "Oliver Bock (bock@tfh-berlin.de)" |
diff --git a/drivers/usb/misc/cytherm.c b/drivers/usb/misc/cytherm.c index b9cbbbda8245..1d7251bc1b5f 100644 --- a/drivers/usb/misc/cytherm.c +++ b/drivers/usb/misc/cytherm.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/module.h> | 21 | #include <linux/module.h> |
21 | #include <linux/usb.h> | 22 | #include <linux/usb.h> |
22 | 23 | ||
diff --git a/drivers/usb/misc/isight_firmware.c b/drivers/usb/misc/isight_firmware.c index 06e990adc6cd..fe1d44319d0a 100644 --- a/drivers/usb/misc/isight_firmware.c +++ b/drivers/usb/misc/isight_firmware.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/firmware.h> | 25 | #include <linux/firmware.h> |
26 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | static const struct usb_device_id id_table[] = { | 30 | static const struct usb_device_id id_table[] = { |
30 | {USB_DEVICE(0x05ac, 0x8300)}, | 31 | {USB_DEVICE(0x05ac, 0x8300)}, |
diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c index b624320df903..b271b0557a1f 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_con.c +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c | |||
@@ -58,7 +58,6 @@ | |||
58 | #include <linux/string.h> | 58 | #include <linux/string.h> |
59 | #include <linux/kd.h> | 59 | #include <linux/kd.h> |
60 | #include <linux/init.h> | 60 | #include <linux/init.h> |
61 | #include <linux/slab.h> | ||
62 | #include <linux/vt_kern.h> | 61 | #include <linux/vt_kern.h> |
63 | #include <linux/selection.h> | 62 | #include <linux/selection.h> |
64 | #include <linux/spinlock.h> | 63 | #include <linux/spinlock.h> |
diff --git a/drivers/usb/misc/sisusbvga/sisusb_init.c b/drivers/usb/misc/sisusbvga/sisusb_init.c index 0ab990744830..cb8a3d91f970 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_init.c +++ b/drivers/usb/misc/sisusbvga/sisusb_init.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
42 | #include <linux/poll.h> | 42 | #include <linux/poll.h> |
43 | #include <linux/init.h> | 43 | #include <linux/init.h> |
44 | #include <linux/slab.h> | ||
45 | #include <linux/spinlock.h> | 44 | #include <linux/spinlock.h> |
46 | 45 | ||
47 | #include "sisusb.h" | 46 | #include "sisusb.h" |
diff --git a/drivers/usb/misc/trancevibrator.c b/drivers/usb/misc/trancevibrator.c index 5da28eaee314..d77aba46ae85 100644 --- a/drivers/usb/misc/trancevibrator.c +++ b/drivers/usb/misc/trancevibrator.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
26 | #include <linux/usb.h> | 27 | #include <linux/usb.h> |
27 | 28 | ||
diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c index f56fed53f2dd..796e2f68f749 100644 --- a/drivers/usb/misc/uss720.c +++ b/drivers/usb/misc/uss720.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/delay.h> | 49 | #include <linux/delay.h> |
50 | #include <linux/completion.h> | 50 | #include <linux/completion.h> |
51 | #include <linux/kref.h> | 51 | #include <linux/kref.h> |
52 | #include <linux/slab.h> | ||
52 | 53 | ||
53 | /* | 54 | /* |
54 | * Version Information | 55 | * Version Information |
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c index 6dd44bc1f5ff..ddf7f9a1b336 100644 --- a/drivers/usb/mon/mon_bin.c +++ b/drivers/usb/mon/mon_bin.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/smp_lock.h> | 18 | #include <linux/smp_lock.h> |
19 | #include <linux/scatterlist.h> | 19 | #include <linux/scatterlist.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
22 | 23 | ||
diff --git a/drivers/usb/mon/mon_main.c b/drivers/usb/mon/mon_main.c index e0c2db3b767b..e4af18b93c7d 100644 --- a/drivers/usb/mon/mon_main.c +++ b/drivers/usb/mon/mon_main.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/usb.h> | 11 | #include <linux/usb.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/notifier.h> | 13 | #include <linux/notifier.h> |
13 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
14 | 15 | ||
diff --git a/drivers/usb/mon/mon_stat.c b/drivers/usb/mon/mon_stat.c index ac8b0d5ce7f8..1becdc3837e6 100644 --- a/drivers/usb/mon/mon_stat.c +++ b/drivers/usb/mon/mon_stat.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/usb.h> | 12 | #include <linux/usb.h> |
12 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
13 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c index 31c11888ec6a..4d0be130f49b 100644 --- a/drivers/usb/mon/mon_text.c +++ b/drivers/usb/mon/mon_text.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/list.h> | 8 | #include <linux/list.h> |
9 | #include <linux/usb.h> | 9 | #include <linux/usb.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/time.h> | 11 | #include <linux/time.h> |
11 | #include <linux/mutex.h> | 12 | #include <linux/mutex.h> |
12 | #include <linux/debugfs.h> | 13 | #include <linux/debugfs.h> |
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index bcee1339d4fd..719a22d664ef 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/list.h> | 15 | #include <linux/list.h> |
17 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c index 3c69a76ec392..59dc3d351b60 100644 --- a/drivers/usb/musb/cppi_dma.c +++ b/drivers/usb/musb/cppi_dma.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/platform_device.h> | 9 | #include <linux/platform_device.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/usb.h> | 11 | #include <linux/usb.h> |
11 | 12 | ||
12 | #include "musb_core.h" | 13 | #include "musb_core.h" |
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index a883f9dd3f8a..29bce5c0fd10 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/init.h> | 27 | #include <linux/init.h> |
29 | #include <linux/list.h> | 28 | #include <linux/list.h> |
30 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index a9f288cd70ed..6fca870e957e 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/moduleparam.h> | 43 | #include <linux/moduleparam.h> |
44 | #include <linux/stat.h> | 44 | #include <linux/stat.h> |
45 | #include <linux/dma-mapping.h> | 45 | #include <linux/dma-mapping.h> |
46 | #include <linux/slab.h> | ||
46 | 47 | ||
47 | #include "musb_core.h" | 48 | #include "musb_core.h" |
48 | 49 | ||
diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c index bfe5fe4ebfee..7775e1c0a215 100644 --- a/drivers/usb/musb/musb_virthub.c +++ b/drivers/usb/musb/musb_virthub.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
37 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
38 | #include <linux/slab.h> | ||
39 | #include <linux/errno.h> | 38 | #include <linux/errno.h> |
40 | #include <linux/init.h> | 39 | #include <linux/init.h> |
41 | #include <linux/time.h> | 40 | #include <linux/time.h> |
diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c index 2fa7d5c00f31..1008044a3bbc 100644 --- a/drivers/usb/musb/musbhsdma.c +++ b/drivers/usb/musb/musbhsdma.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/device.h> | 33 | #include <linux/device.h> |
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
36 | #include <linux/slab.h> | ||
36 | #include "musb_core.h" | 37 | #include "musb_core.h" |
37 | #include "musbhsdma.h" | 38 | #include "musbhsdma.h" |
38 | 39 | ||
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 3fe16867b5a8..490cdf15ccb6 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/slab.h> | ||
31 | #include <linux/init.h> | 30 | #include <linux/init.h> |
32 | #include <linux/list.h> | 31 | #include <linux/list.h> |
33 | #include <linux/clk.h> | 32 | #include <linux/clk.h> |
diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c index 1c868096bd6f..5afa070d7dc9 100644 --- a/drivers/usb/musb/tusb6010_omap.c +++ b/drivers/usb/musb/tusb6010_omap.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/usb.h> | 15 | #include <linux/usb.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/dma-mapping.h> | 17 | #include <linux/dma-mapping.h> |
18 | #include <linux/slab.h> | ||
18 | #include <plat/dma.h> | 19 | #include <plat/dma.h> |
19 | #include <plat/mux.h> | 20 | #include <plat/mux.h> |
20 | 21 | ||
diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c index 1c26c94513e9..221c44444ec6 100644 --- a/drivers/usb/otg/gpio_vbus.c +++ b/drivers/usb/otg/gpio_vbus.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/gpio.h> | 13 | #include <linux/gpio.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
15 | #include <linux/usb.h> | 16 | #include <linux/usb.h> |
16 | #include <linux/workqueue.h> | 17 | #include <linux/workqueue.h> |
diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c index af456b48985f..e70014ab0976 100644 --- a/drivers/usb/otg/nop-usb-xceiv.c +++ b/drivers/usb/otg/nop-usb-xceiv.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/dma-mapping.h> | 31 | #include <linux/dma-mapping.h> |
32 | #include <linux/usb/otg.h> | 32 | #include <linux/usb/otg.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | struct nop_usb_xceiv { | 35 | struct nop_usb_xceiv { |
35 | struct otg_transceiver otg; | 36 | struct otg_transceiver otg; |
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 3e4e9f434d78..223cdf46ccb7 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/regulator/consumer.h> | 37 | #include <linux/regulator/consumer.h> |
38 | #include <linux/err.h> | 38 | #include <linux/err.h> |
39 | #include <linux/notifier.h> | 39 | #include <linux/notifier.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | /* Register defines */ | 42 | /* Register defines */ |
42 | 43 | ||
diff --git a/drivers/usb/otg/ulpi.c b/drivers/usb/otg/ulpi.c index 896527456b7e..9010225e0d06 100644 --- a/drivers/usb/otg/ulpi.c +++ b/drivers/usb/otg/ulpi.c | |||
@@ -24,6 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/usb.h> | 28 | #include <linux/usb.h> |
28 | #include <linux/usb/otg.h> | 29 | #include <linux/usb/otg.h> |
29 | #include <linux/usb/ulpi.h> | 30 | #include <linux/usb/ulpi.h> |
diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c index 365db1097bfd..4fd7af98b1ae 100644 --- a/drivers/usb/serial/aircable.c +++ b/drivers/usb/serial/aircable.c | |||
@@ -43,6 +43,7 @@ | |||
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/tty.h> | 45 | #include <linux/tty.h> |
46 | #include <linux/slab.h> | ||
46 | #include <linux/tty_flip.h> | 47 | #include <linux/tty_flip.h> |
47 | #include <linux/circ_buf.h> | 48 | #include <linux/circ_buf.h> |
48 | #include <linux/usb.h> | 49 | #include <linux/usb.h> |
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index 547c9448c28c..9b66bf19f751 100644 --- a/drivers/usb/serial/ark3116.c +++ b/drivers/usb/serial/ark3116.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/ioctl.h> | 27 | #include <linux/ioctl.h> |
28 | #include <linux/tty.h> | 28 | #include <linux/tty.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/tty_flip.h> | 30 | #include <linux/tty_flip.h> |
30 | #include <linux/module.h> | 31 | #include <linux/module.h> |
31 | #include <linux/usb.h> | 32 | #include <linux/usb.h> |
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index ba555c528cc6..7f547dc3a590 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/tty.h> | 13 | #include <linux/tty.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/usb.h> | 16 | #include <linux/usb.h> |
16 | #include <linux/usb/serial.h> | 17 | #include <linux/usb/serial.h> |
diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 9f4fed1968b5..7e8e39818414 100644 --- a/drivers/usb/serial/ch341.c +++ b/drivers/usb/serial/ch341.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/tty.h> | 20 | #include <linux/tty.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/usb.h> | 23 | #include <linux/usb.h> |
23 | #include <linux/usb/serial.h> | 24 | #include <linux/usb/serial.h> |
24 | #include <linux/serial.h> | 25 | #include <linux/serial.h> |
diff --git a/drivers/usb/serial/navman.c b/drivers/usb/serial/navman.c index 04a6cbbed2c0..a6b207c84917 100644 --- a/drivers/usb/serial/navman.c +++ b/drivers/usb/serial/navman.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * flags as the navman is rx only so cannot echo. | 12 | * flags as the navman is rx only so cannot echo. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/gfp.h> | ||
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
17 | #include <linux/tty.h> | 18 | #include <linux/tty.h> |
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index 701452ae9197..ed01f3b2de8c 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/tty.h> | 14 | #include <linux/tty.h> |
15 | #include <linux/tty_driver.h> | 15 | #include <linux/tty_driver.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/tty_flip.h> | 17 | #include <linux/tty_flip.h> |
17 | #include <linux/serial.h> | 18 | #include <linux/serial.h> |
18 | #include <linux/module.h> | 19 | #include <linux/module.h> |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 950cb311ca94..ca9d866672aa 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
38 | #include <linux/tty.h> | 38 | #include <linux/tty.h> |
39 | #include <linux/tty_flip.h> | 39 | #include <linux/tty_flip.h> |
40 | #include <linux/slab.h> | ||
40 | #include <linux/module.h> | 41 | #include <linux/module.h> |
41 | #include <linux/bitops.h> | 42 | #include <linux/bitops.h> |
42 | #include <linux/usb.h> | 43 | #include <linux/usb.h> |
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c index 4b463cd140ef..43a0cadd5782 100644 --- a/drivers/usb/serial/safe_serial.c +++ b/drivers/usb/serial/safe_serial.c | |||
@@ -64,8 +64,8 @@ | |||
64 | 64 | ||
65 | #include <linux/kernel.h> | 65 | #include <linux/kernel.h> |
66 | #include <linux/errno.h> | 66 | #include <linux/errno.h> |
67 | #include <linux/gfp.h> | ||
67 | #include <linux/init.h> | 68 | #include <linux/init.h> |
68 | #include <linux/slab.h> | ||
69 | #include <linux/tty.h> | 69 | #include <linux/tty.h> |
70 | #include <linux/tty_driver.h> | 70 | #include <linux/tty_driver.h> |
71 | #include <linux/tty_flip.h> | 71 | #include <linux/tty_flip.h> |
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 34e6f894cba9..9202f94505e6 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/jiffies.h> | 26 | #include <linux/jiffies.h> |
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
28 | #include <linux/tty.h> | 28 | #include <linux/tty.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/tty_flip.h> | 30 | #include <linux/tty_flip.h> |
30 | #include <linux/module.h> | 31 | #include <linux/module.h> |
31 | #include <linux/usb.h> | 32 | #include <linux/usb.h> |
diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c index ee190cc1757c..d9457bd4fe10 100644 --- a/drivers/usb/serial/symbolserial.c +++ b/drivers/usb/serial/symbolserial.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/tty.h> | 14 | #include <linux/tty.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/tty_driver.h> | 16 | #include <linux/tty_driver.h> |
16 | #include <linux/tty_flip.h> | 17 | #include <linux/tty_flip.h> |
17 | #include <linux/module.h> | 18 | #include <linux/module.h> |
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index 252cc2d993b2..28026b47344a 100644 --- a/drivers/usb/serial/usb_debug.c +++ b/drivers/usb/serial/usb_debug.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * 2 as published by the Free Software Foundation. | 8 | * 2 as published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/gfp.h> | ||
11 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
13 | #include <linux/tty.h> | 14 | #include <linux/tty.h> |
diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c index 67edc65acb8e..42d0eaed4a01 100644 --- a/drivers/usb/storage/alauda.c +++ b/drivers/usb/storage/alauda.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #include <scsi/scsi.h> | 37 | #include <scsi/scsi.h> |
37 | #include <scsi/scsi_cmnd.h> | 38 | #include <scsi/scsi_cmnd.h> |
diff --git a/drivers/usb/storage/karma.c b/drivers/usb/storage/karma.c index 7953d93a7739..ba1b78906880 100644 --- a/drivers/usb/storage/karma.c +++ b/drivers/usb/storage/karma.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <scsi/scsi.h> | 24 | #include <scsi/scsi.h> |
24 | #include <scsi/scsi_cmnd.h> | 25 | #include <scsi/scsi_cmnd.h> |
diff --git a/drivers/usb/storage/option_ms.c b/drivers/usb/storage/option_ms.c index 773a5cd38c5a..89460181d122 100644 --- a/drivers/usb/storage/option_ms.c +++ b/drivers/usb/storage/option_ms.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/usb.h> | 23 | #include <linux/usb.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include "usb.h" | 26 | #include "usb.h" |
26 | #include "transport.h" | 27 | #include "transport.h" |
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 4cc035562cc2..d8d98cfecada 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c | |||
@@ -43,7 +43,6 @@ | |||
43 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 43 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
44 | */ | 44 | */ |
45 | 45 | ||
46 | #include <linux/slab.h> | ||
47 | #include <linux/module.h> | 46 | #include <linux/module.h> |
48 | #include <linux/mutex.h> | 47 | #include <linux/mutex.h> |
49 | 48 | ||
diff --git a/drivers/usb/storage/sierra_ms.c b/drivers/usb/storage/sierra_ms.c index 4395c4100ec2..57fc2f532cab 100644 --- a/drivers/usb/storage/sierra_ms.c +++ b/drivers/usb/storage/sierra_ms.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <scsi/scsi_cmnd.h> | 3 | #include <scsi/scsi_cmnd.h> |
4 | #include <scsi/scsi_device.h> | 4 | #include <scsi/scsi_device.h> |
5 | #include <linux/usb.h> | 5 | #include <linux/usb.h> |
6 | #include <linux/slab.h> | ||
6 | 7 | ||
7 | #include "usb.h" | 8 | #include "usb.h" |
8 | #include "transport.h" | 9 | #include "transport.h" |
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index 468038126e5e..f253edec3bb8 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c | |||
@@ -44,8 +44,8 @@ | |||
44 | */ | 44 | */ |
45 | 45 | ||
46 | #include <linux/sched.h> | 46 | #include <linux/sched.h> |
47 | #include <linux/gfp.h> | ||
47 | #include <linux/errno.h> | 48 | #include <linux/errno.h> |
48 | #include <linux/slab.h> | ||
49 | 49 | ||
50 | #include <linux/usb/quirks.h> | 50 | #include <linux/usb/quirks.h> |
51 | 51 | ||
diff --git a/drivers/usb/wusbcore/cbaf.c b/drivers/usb/wusbcore/cbaf.c index 51a8e0d5789d..c0c5665e60a9 100644 --- a/drivers/usb/wusbcore/cbaf.c +++ b/drivers/usb/wusbcore/cbaf.c | |||
@@ -92,6 +92,7 @@ | |||
92 | #include <linux/interrupt.h> | 92 | #include <linux/interrupt.h> |
93 | #include <linux/delay.h> | 93 | #include <linux/delay.h> |
94 | #include <linux/random.h> | 94 | #include <linux/random.h> |
95 | #include <linux/slab.h> | ||
95 | #include <linux/mutex.h> | 96 | #include <linux/mutex.h> |
96 | #include <linux/uwb.h> | 97 | #include <linux/uwb.h> |
97 | #include <linux/usb/wusb.h> | 98 | #include <linux/usb/wusb.h> |
diff --git a/drivers/usb/wusbcore/crypto.c b/drivers/usb/wusbcore/crypto.c index 9579cf4c38bf..827c87f10cc5 100644 --- a/drivers/usb/wusbcore/crypto.c +++ b/drivers/usb/wusbcore/crypto.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/module.h> | 49 | #include <linux/module.h> |
50 | #include <linux/err.h> | 50 | #include <linux/err.h> |
51 | #include <linux/uwb.h> | 51 | #include <linux/uwb.h> |
52 | #include <linux/slab.h> | ||
52 | #include <linux/usb/wusb.h> | 53 | #include <linux/usb/wusb.h> |
53 | #include <linux/scatterlist.h> | 54 | #include <linux/scatterlist.h> |
54 | 55 | ||
diff --git a/drivers/usb/wusbcore/devconnect.c b/drivers/usb/wusbcore/devconnect.c index 1c918286159c..46e79d349498 100644 --- a/drivers/usb/wusbcore/devconnect.c +++ b/drivers/usb/wusbcore/devconnect.c | |||
@@ -88,6 +88,7 @@ | |||
88 | 88 | ||
89 | #include <linux/jiffies.h> | 89 | #include <linux/jiffies.h> |
90 | #include <linux/ctype.h> | 90 | #include <linux/ctype.h> |
91 | #include <linux/slab.h> | ||
91 | #include <linux/workqueue.h> | 92 | #include <linux/workqueue.h> |
92 | #include "wusbhc.h" | 93 | #include "wusbhc.h" |
93 | 94 | ||
diff --git a/drivers/usb/wusbcore/mmc.c b/drivers/usb/wusbcore/mmc.c index 2d827397e30b..0a57ff0a0b0c 100644 --- a/drivers/usb/wusbcore/mmc.c +++ b/drivers/usb/wusbcore/mmc.c | |||
@@ -37,6 +37,7 @@ | |||
37 | * - add timers that autoremove intervalled IEs? | 37 | * - add timers that autoremove intervalled IEs? |
38 | */ | 38 | */ |
39 | #include <linux/usb/wusb.h> | 39 | #include <linux/usb/wusb.h> |
40 | #include <linux/slab.h> | ||
40 | #include "wusbhc.h" | 41 | #include "wusbhc.h" |
41 | 42 | ||
42 | /* Initialize the MMCIEs handling mechanism */ | 43 | /* Initialize the MMCIEs handling mechanism */ |
diff --git a/drivers/usb/wusbcore/rh.c b/drivers/usb/wusbcore/rh.c index 9fe4246cecb9..a68ad7aa0b59 100644 --- a/drivers/usb/wusbcore/rh.c +++ b/drivers/usb/wusbcore/rh.c | |||
@@ -69,6 +69,7 @@ | |||
69 | * | 69 | * |
70 | * wusbhc_rh_start_port_reset() ??? unimplemented | 70 | * wusbhc_rh_start_port_reset() ??? unimplemented |
71 | */ | 71 | */ |
72 | #include <linux/slab.h> | ||
72 | #include "wusbhc.h" | 73 | #include "wusbhc.h" |
73 | 74 | ||
74 | /* | 75 | /* |
diff --git a/drivers/usb/wusbcore/security.c b/drivers/usb/wusbcore/security.c index edcd2d756037..b60799b811c1 100644 --- a/drivers/usb/wusbcore/security.c +++ b/drivers/usb/wusbcore/security.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * FIXME: docs | 23 | * FIXME: docs |
24 | */ | 24 | */ |
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/usb/ch9.h> | 27 | #include <linux/usb/ch9.h> |
27 | #include <linux/random.h> | 28 | #include <linux/random.h> |
28 | #include "wusbhc.h" | 29 | #include "wusbhc.h" |
diff --git a/drivers/usb/wusbcore/wa-hc.c b/drivers/usb/wusbcore/wa-hc.c index 9d04722415bb..59a748a0e5da 100644 --- a/drivers/usb/wusbcore/wa-hc.c +++ b/drivers/usb/wusbcore/wa-hc.c | |||
@@ -22,6 +22,7 @@ | |||
22 | * | 22 | * |
23 | * FIXME: docs | 23 | * FIXME: docs |
24 | */ | 24 | */ |
25 | #include <linux/slab.h> | ||
25 | #include "wusbhc.h" | 26 | #include "wusbhc.h" |
26 | #include "wa-hc.h" | 27 | #include "wa-hc.h" |
27 | 28 | ||
diff --git a/drivers/usb/wusbcore/wa-nep.c b/drivers/usb/wusbcore/wa-nep.c index 17d2626038be..f67f7f1e6df9 100644 --- a/drivers/usb/wusbcore/wa-nep.c +++ b/drivers/usb/wusbcore/wa-nep.c | |||
@@ -51,6 +51,7 @@ | |||
51 | */ | 51 | */ |
52 | #include <linux/workqueue.h> | 52 | #include <linux/workqueue.h> |
53 | #include <linux/ctype.h> | 53 | #include <linux/ctype.h> |
54 | #include <linux/slab.h> | ||
54 | 55 | ||
55 | #include "wa-hc.h" | 56 | #include "wa-hc.h" |
56 | #include "wusbhc.h" | 57 | #include "wusbhc.h" |
diff --git a/drivers/usb/wusbcore/wa-rpipe.c b/drivers/usb/wusbcore/wa-rpipe.c index 7369655f69cd..c7b1d8108de9 100644 --- a/drivers/usb/wusbcore/wa-rpipe.c +++ b/drivers/usb/wusbcore/wa-rpipe.c | |||
@@ -60,6 +60,7 @@ | |||
60 | #include <linux/init.h> | 60 | #include <linux/init.h> |
61 | #include <asm/atomic.h> | 61 | #include <asm/atomic.h> |
62 | #include <linux/bitmap.h> | 62 | #include <linux/bitmap.h> |
63 | #include <linux/slab.h> | ||
63 | 64 | ||
64 | #include "wusbhc.h" | 65 | #include "wusbhc.h" |
65 | #include "wa-hc.h" | 66 | #include "wa-hc.h" |
diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c index 489b47833e2c..112ef7e26f6b 100644 --- a/drivers/usb/wusbcore/wa-xfer.c +++ b/drivers/usb/wusbcore/wa-xfer.c | |||
@@ -81,6 +81,7 @@ | |||
81 | */ | 81 | */ |
82 | #include <linux/init.h> | 82 | #include <linux/init.h> |
83 | #include <linux/spinlock.h> | 83 | #include <linux/spinlock.h> |
84 | #include <linux/slab.h> | ||
84 | #include <linux/hash.h> | 85 | #include <linux/hash.h> |
85 | 86 | ||
86 | #include "wa-hc.h" | 87 | #include "wa-hc.h" |
diff --git a/drivers/uwb/address.c b/drivers/uwb/address.c index ad21b1d7218c..973321327c44 100644 --- a/drivers/uwb/address.c +++ b/drivers/uwb/address.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * FIXME: docs | 23 | * FIXME: docs |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/slab.h> | ||
26 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
27 | #include <linux/module.h> | 28 | #include <linux/module.h> |
28 | #include <linux/device.h> | 29 | #include <linux/device.h> |
diff --git a/drivers/uwb/allocator.c b/drivers/uwb/allocator.c index c13cec7dcbc5..436e4f7110cb 100644 --- a/drivers/uwb/allocator.c +++ b/drivers/uwb/allocator.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/uwb.h> | 20 | #include <linux/uwb.h> |
20 | 21 | ||
21 | #include "uwb-internal.h" | 22 | #include "uwb-internal.h" |
diff --git a/drivers/uwb/beacon.c b/drivers/uwb/beacon.c index 36bc3158006f..dcdd59bfcd09 100644 --- a/drivers/uwb/beacon.c +++ b/drivers/uwb/beacon.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/device.h> | 28 | #include <linux/device.h> |
29 | #include <linux/err.h> | 29 | #include <linux/err.h> |
30 | #include <linux/kdev_t.h> | 30 | #include <linux/kdev_t.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | #include "uwb-internal.h" | 33 | #include "uwb-internal.h" |
33 | 34 | ||
diff --git a/drivers/uwb/drp-ie.c b/drivers/uwb/drp-ie.c index 2840d7bf9e67..520673109a7e 100644 --- a/drivers/uwb/drp-ie.c +++ b/drivers/uwb/drp-ie.c | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/random.h> | 20 | #include <linux/random.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/uwb.h> | 22 | #include <linux/uwb.h> |
22 | 23 | ||
23 | #include "uwb-internal.h" | 24 | #include "uwb-internal.h" |
diff --git a/drivers/uwb/drp.c b/drivers/uwb/drp.c index 4f5ca99a04b9..a8d83e25e3b6 100644 --- a/drivers/uwb/drp.c +++ b/drivers/uwb/drp.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #include <linux/kthread.h> | 21 | #include <linux/kthread.h> |
22 | #include <linux/freezer.h> | 22 | #include <linux/freezer.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
24 | #include "uwb-internal.h" | 25 | #include "uwb-internal.h" |
25 | 26 | ||
diff --git a/drivers/uwb/est.c b/drivers/uwb/est.c index 328fcc2b6099..a2eaa3c33b0b 100644 --- a/drivers/uwb/est.c +++ b/drivers/uwb/est.c | |||
@@ -40,6 +40,7 @@ | |||
40 | * uwb_est_get_size() | 40 | * uwb_est_get_size() |
41 | */ | 41 | */ |
42 | #include <linux/spinlock.h> | 42 | #include <linux/spinlock.h> |
43 | #include <linux/slab.h> | ||
43 | 44 | ||
44 | #include "uwb-internal.h" | 45 | #include "uwb-internal.h" |
45 | 46 | ||
diff --git a/drivers/uwb/hwa-rc.c b/drivers/uwb/hwa-rc.c index b409c228f254..2babcd4fbfc1 100644 --- a/drivers/uwb/hwa-rc.c +++ b/drivers/uwb/hwa-rc.c | |||
@@ -53,6 +53,7 @@ | |||
53 | */ | 53 | */ |
54 | #include <linux/init.h> | 54 | #include <linux/init.h> |
55 | #include <linux/module.h> | 55 | #include <linux/module.h> |
56 | #include <linux/slab.h> | ||
56 | #include <linux/usb.h> | 57 | #include <linux/usb.h> |
57 | #include <linux/usb/wusb.h> | 58 | #include <linux/usb/wusb.h> |
58 | #include <linux/usb/wusb-wa.h> | 59 | #include <linux/usb/wusb-wa.h> |
diff --git a/drivers/uwb/i1480/dfu/mac.c b/drivers/uwb/i1480/dfu/mac.c index 694d0daf88ab..6ec14f5fcde4 100644 --- a/drivers/uwb/i1480/dfu/mac.c +++ b/drivers/uwb/i1480/dfu/mac.c | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/firmware.h> | 30 | #include <linux/firmware.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/uwb.h> | 32 | #include <linux/uwb.h> |
32 | #include "i1480-dfu.h" | 33 | #include "i1480-dfu.h" |
33 | 34 | ||
diff --git a/drivers/uwb/i1480/dfu/usb.c b/drivers/uwb/i1480/dfu/usb.c index a99e211a1b87..ba8664328afa 100644 --- a/drivers/uwb/i1480/dfu/usb.c +++ b/drivers/uwb/i1480/dfu/usb.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/module.h> | 37 | #include <linux/module.h> |
38 | #include <linux/usb.h> | 38 | #include <linux/usb.h> |
39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
40 | #include <linux/slab.h> | ||
40 | #include <linux/delay.h> | 41 | #include <linux/delay.h> |
41 | #include <linux/uwb.h> | 42 | #include <linux/uwb.h> |
42 | #include <linux/usb/wusb.h> | 43 | #include <linux/usb/wusb.h> |
diff --git a/drivers/uwb/i1480/i1480u-wlp/lc.c b/drivers/uwb/i1480/i1480u-wlp/lc.c index f272dfe54d49..def778cf2216 100644 --- a/drivers/uwb/i1480/i1480u-wlp/lc.c +++ b/drivers/uwb/i1480/i1480u-wlp/lc.c | |||
@@ -55,6 +55,7 @@ | |||
55 | * is being removed. | 55 | * is being removed. |
56 | * i1480u_rm() | 56 | * i1480u_rm() |
57 | */ | 57 | */ |
58 | #include <linux/gfp.h> | ||
58 | #include <linux/if_arp.h> | 59 | #include <linux/if_arp.h> |
59 | #include <linux/etherdevice.h> | 60 | #include <linux/etherdevice.h> |
60 | 61 | ||
diff --git a/drivers/uwb/i1480/i1480u-wlp/netdev.c b/drivers/uwb/i1480/i1480u-wlp/netdev.c index b236e6969942..f98f6ce8b9e7 100644 --- a/drivers/uwb/i1480/i1480u-wlp/netdev.c +++ b/drivers/uwb/i1480/i1480u-wlp/netdev.c | |||
@@ -39,6 +39,7 @@ | |||
39 | * i1480u_set_config(): | 39 | * i1480u_set_config(): |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include <linux/slab.h> | ||
42 | #include <linux/if_arp.h> | 43 | #include <linux/if_arp.h> |
43 | #include <linux/etherdevice.h> | 44 | #include <linux/etherdevice.h> |
44 | 45 | ||
diff --git a/drivers/uwb/i1480/i1480u-wlp/rx.c b/drivers/uwb/i1480/i1480u-wlp/rx.c index 25a2758beb61..d4e51e108aa4 100644 --- a/drivers/uwb/i1480/i1480u-wlp/rx.c +++ b/drivers/uwb/i1480/i1480u-wlp/rx.c | |||
@@ -64,6 +64,7 @@ | |||
64 | * | 64 | * |
65 | */ | 65 | */ |
66 | 66 | ||
67 | #include <linux/gfp.h> | ||
67 | #include <linux/netdevice.h> | 68 | #include <linux/netdevice.h> |
68 | #include <linux/etherdevice.h> | 69 | #include <linux/etherdevice.h> |
69 | #include "i1480u-wlp.h" | 70 | #include "i1480u-wlp.h" |
diff --git a/drivers/uwb/i1480/i1480u-wlp/tx.c b/drivers/uwb/i1480/i1480u-wlp/tx.c index 3db3449dbda4..3c117a364564 100644 --- a/drivers/uwb/i1480/i1480u-wlp/tx.c +++ b/drivers/uwb/i1480/i1480u-wlp/tx.c | |||
@@ -54,6 +54,7 @@ | |||
54 | * the times the MTU will be smaller than one page... | 54 | * the times the MTU will be smaller than one page... |
55 | */ | 55 | */ |
56 | 56 | ||
57 | #include <linux/slab.h> | ||
57 | #include "i1480u-wlp.h" | 58 | #include "i1480u-wlp.h" |
58 | 59 | ||
59 | enum { | 60 | enum { |
diff --git a/drivers/uwb/ie.c b/drivers/uwb/ie.c index ab976686175b..30acec740425 100644 --- a/drivers/uwb/ie.c +++ b/drivers/uwb/ie.c | |||
@@ -24,6 +24,7 @@ | |||
24 | * FIXME: docs | 24 | * FIXME: docs |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/slab.h> | ||
27 | #include "uwb-internal.h" | 28 | #include "uwb-internal.h" |
28 | 29 | ||
29 | /** | 30 | /** |
diff --git a/drivers/uwb/lc-dev.c b/drivers/uwb/lc-dev.c index 1097e81b56d0..90113bafefca 100644 --- a/drivers/uwb/lc-dev.c +++ b/drivers/uwb/lc-dev.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * FIXME: docs | 23 | * FIXME: docs |
24 | */ | 24 | */ |
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/device.h> | 27 | #include <linux/device.h> |
27 | #include <linux/err.h> | 28 | #include <linux/err.h> |
28 | #include <linux/kdev_t.h> | 29 | #include <linux/kdev_t.h> |
diff --git a/drivers/uwb/lc-rc.c b/drivers/uwb/lc-rc.c index 9611ef3b787a..b0091c771b9a 100644 --- a/drivers/uwb/lc-rc.c +++ b/drivers/uwb/lc-rc.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/kdev_t.h> | 35 | #include <linux/kdev_t.h> |
36 | #include <linux/etherdevice.h> | 36 | #include <linux/etherdevice.h> |
37 | #include <linux/usb.h> | 37 | #include <linux/usb.h> |
38 | #include <linux/slab.h> | ||
38 | 39 | ||
39 | #include "uwb-internal.h" | 40 | #include "uwb-internal.h" |
40 | 41 | ||
diff --git a/drivers/uwb/neh.c b/drivers/uwb/neh.c index 78510a1f410d..697e56a5bcdd 100644 --- a/drivers/uwb/neh.c +++ b/drivers/uwb/neh.c | |||
@@ -83,6 +83,7 @@ | |||
83 | */ | 83 | */ |
84 | #include <linux/kernel.h> | 84 | #include <linux/kernel.h> |
85 | #include <linux/timer.h> | 85 | #include <linux/timer.h> |
86 | #include <linux/slab.h> | ||
86 | #include <linux/err.h> | 87 | #include <linux/err.h> |
87 | 88 | ||
88 | #include "uwb-internal.h" | 89 | #include "uwb-internal.h" |
diff --git a/drivers/uwb/reset.c b/drivers/uwb/reset.c index 7f0512e43d9d..27849292b552 100644 --- a/drivers/uwb/reset.c +++ b/drivers/uwb/reset.c | |||
@@ -30,6 +30,7 @@ | |||
30 | */ | 30 | */ |
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/err.h> | 32 | #include <linux/err.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
34 | 35 | ||
35 | #include "uwb-internal.h" | 36 | #include "uwb-internal.h" |
diff --git a/drivers/uwb/rsv.c b/drivers/uwb/rsv.c index 6b76f4bb4cc7..78c892233cf1 100644 --- a/drivers/uwb/rsv.c +++ b/drivers/uwb/rsv.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/uwb.h> | 19 | #include <linux/uwb.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/random.h> | 21 | #include <linux/random.h> |
21 | 22 | ||
22 | #include "uwb-internal.h" | 23 | #include "uwb-internal.h" |
diff --git a/drivers/uwb/scan.c b/drivers/uwb/scan.c index 2d270748f32b..76a1a1ed7d3e 100644 --- a/drivers/uwb/scan.c +++ b/drivers/uwb/scan.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include <linux/device.h> | 36 | #include <linux/device.h> |
37 | #include <linux/err.h> | 37 | #include <linux/err.h> |
38 | #include <linux/slab.h> | ||
38 | #include "uwb-internal.h" | 39 | #include "uwb-internal.h" |
39 | 40 | ||
40 | 41 | ||
diff --git a/drivers/uwb/umc-dev.c b/drivers/uwb/umc-dev.c index 1fc7d8270bb8..43ea9982e687 100644 --- a/drivers/uwb/umc-dev.c +++ b/drivers/uwb/umc-dev.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * This file is released under the GNU GPL v2. | 6 | * This file is released under the GNU GPL v2. |
7 | */ | 7 | */ |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/uwb/umc.h> | 10 | #include <linux/uwb/umc.h> |
10 | 11 | ||
11 | static void umc_device_release(struct device *dev) | 12 | static void umc_device_release(struct device *dev) |
diff --git a/drivers/uwb/uwbd.c b/drivers/uwb/uwbd.c index 6210fe1fd1bb..001c8b4020a8 100644 --- a/drivers/uwb/uwbd.c +++ b/drivers/uwb/uwbd.c | |||
@@ -69,6 +69,7 @@ | |||
69 | * Handler functions are called normally uwbd_evt_handle_*(). | 69 | * Handler functions are called normally uwbd_evt_handle_*(). |
70 | */ | 70 | */ |
71 | #include <linux/kthread.h> | 71 | #include <linux/kthread.h> |
72 | #include <linux/slab.h> | ||
72 | #include <linux/module.h> | 73 | #include <linux/module.h> |
73 | #include <linux/freezer.h> | 74 | #include <linux/freezer.h> |
74 | 75 | ||
diff --git a/drivers/uwb/whc-rc.c b/drivers/uwb/whc-rc.c index 01950c62dc8d..73495583c444 100644 --- a/drivers/uwb/whc-rc.c +++ b/drivers/uwb/whc-rc.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/sched.h> | 45 | #include <linux/sched.h> |
46 | #include <linux/dma-mapping.h> | 46 | #include <linux/dma-mapping.h> |
47 | #include <linux/interrupt.h> | 47 | #include <linux/interrupt.h> |
48 | #include <linux/slab.h> | ||
48 | #include <linux/workqueue.h> | 49 | #include <linux/workqueue.h> |
49 | #include <linux/uwb.h> | 50 | #include <linux/uwb.h> |
50 | #include <linux/uwb/whci.h> | 51 | #include <linux/uwb/whci.h> |
diff --git a/drivers/uwb/whci.c b/drivers/uwb/whci.c index 2e2784627ad6..b221142446a2 100644 --- a/drivers/uwb/whci.c +++ b/drivers/uwb/whci.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/pci.h> | 10 | #include <linux/pci.h> |
11 | #include <linux/dma-mapping.h> | 11 | #include <linux/dma-mapping.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/uwb/whci.h> | 13 | #include <linux/uwb/whci.h> |
13 | #include <linux/uwb/umc.h> | 14 | #include <linux/uwb/umc.h> |
14 | 15 | ||
diff --git a/drivers/uwb/wlp/eda.c b/drivers/uwb/wlp/eda.c index 69e020039718..086fc0cf9401 100644 --- a/drivers/uwb/wlp/eda.c +++ b/drivers/uwb/wlp/eda.c | |||
@@ -53,6 +53,7 @@ | |||
53 | 53 | ||
54 | #include <linux/netdevice.h> | 54 | #include <linux/netdevice.h> |
55 | #include <linux/etherdevice.h> | 55 | #include <linux/etherdevice.h> |
56 | #include <linux/slab.h> | ||
56 | #include <linux/wlp.h> | 57 | #include <linux/wlp.h> |
57 | #include "wlp-internal.h" | 58 | #include "wlp-internal.h" |
58 | 59 | ||
diff --git a/drivers/uwb/wlp/messages.c b/drivers/uwb/wlp/messages.c index 75164866c2d8..3a8e033dce21 100644 --- a/drivers/uwb/wlp/messages.c +++ b/drivers/uwb/wlp/messages.c | |||
@@ -24,6 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/wlp.h> | 26 | #include <linux/wlp.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include "wlp-internal.h" | 29 | #include "wlp-internal.h" |
29 | 30 | ||
diff --git a/drivers/uwb/wlp/txrx.c b/drivers/uwb/wlp/txrx.c index 7350ed6909f8..05dde44b3592 100644 --- a/drivers/uwb/wlp/txrx.c +++ b/drivers/uwb/wlp/txrx.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/etherdevice.h> | 27 | #include <linux/etherdevice.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/wlp.h> | 29 | #include <linux/wlp.h> |
29 | 30 | ||
30 | #include "wlp-internal.h" | 31 | #include "wlp-internal.h" |
diff --git a/drivers/uwb/wlp/wlp-lc.c b/drivers/uwb/wlp/wlp-lc.c index 13db739c4e39..7f6a630bf26c 100644 --- a/drivers/uwb/wlp/wlp-lc.c +++ b/drivers/uwb/wlp/wlp-lc.c | |||
@@ -22,6 +22,7 @@ | |||
22 | * FIXME: docs | 22 | * FIXME: docs |
23 | */ | 23 | */ |
24 | #include <linux/wlp.h> | 24 | #include <linux/wlp.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "wlp-internal.h" | 27 | #include "wlp-internal.h" |
27 | 28 | ||
diff --git a/drivers/uwb/wlp/wss-lc.c b/drivers/uwb/wlp/wss-lc.c index 5913c7a5d922..90accdd54c07 100644 --- a/drivers/uwb/wlp/wss-lc.c +++ b/drivers/uwb/wlp/wss-lc.c | |||
@@ -45,6 +45,7 @@ | |||
45 | */ | 45 | */ |
46 | #include <linux/etherdevice.h> /* for is_valid_ether_addr */ | 46 | #include <linux/etherdevice.h> /* for is_valid_ether_addr */ |
47 | #include <linux/skbuff.h> | 47 | #include <linux/skbuff.h> |
48 | #include <linux/slab.h> | ||
48 | #include <linux/wlp.h> | 49 | #include <linux/wlp.h> |
49 | 50 | ||
50 | #include "wlp-internal.h" | 51 | #include "wlp-internal.h" |
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index a6a88dfd5029..9777583218ff 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/workqueue.h> | 17 | #include <linux/workqueue.h> |
18 | #include <linux/rcupdate.h> | 18 | #include <linux/rcupdate.h> |
19 | #include <linux/file.h> | 19 | #include <linux/file.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include <linux/net.h> | 22 | #include <linux/net.h> |
22 | #include <linux/if_packet.h> | 23 | #include <linux/if_packet.h> |
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 7bd7a1e4409d..e69d238c5af0 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/poll.h> | 22 | #include <linux/poll.h> |
23 | #include <linux/file.h> | 23 | #include <linux/file.h> |
24 | #include <linux/highmem.h> | 24 | #include <linux/highmem.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <linux/net.h> | 27 | #include <linux/net.h> |
27 | #include <linux/if_packet.h> | 28 | #include <linux/if_packet.h> |
@@ -235,6 +236,10 @@ static int vq_memory_access_ok(void __user *log_base, struct vhost_memory *mem, | |||
235 | int log_all) | 236 | int log_all) |
236 | { | 237 | { |
237 | int i; | 238 | int i; |
239 | |||
240 | if (!mem) | ||
241 | return 0; | ||
242 | |||
238 | for (i = 0; i < mem->nregions; ++i) { | 243 | for (i = 0; i < mem->nregions; ++i) { |
239 | struct vhost_memory_region *m = mem->regions + i; | 244 | struct vhost_memory_region *m = mem->regions + i; |
240 | unsigned long a = m->userspace_addr; | 245 | unsigned long a = m->userspace_addr; |
diff --git a/drivers/video/68328fb.c b/drivers/video/68328fb.c index 2110556f76b3..75a39eab70c3 100644 --- a/drivers/video/68328fb.c +++ b/drivers/video/68328fb.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
33 | #include <linux/string.h> | 33 | #include <linux/string.h> |
34 | #include <linux/mm.h> | 34 | #include <linux/mm.h> |
35 | #include <linux/slab.h> | ||
36 | #include <linux/vmalloc.h> | 35 | #include <linux/vmalloc.h> |
37 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
38 | #include <linux/interrupt.h> | 37 | #include <linux/interrupt.h> |
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c index 43d7d5067361..82acb8dc4aa1 100644 --- a/drivers/video/acornfb.c +++ b/drivers/video/acornfb.c | |||
@@ -22,13 +22,13 @@ | |||
22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/ctype.h> | 24 | #include <linux/ctype.h> |
25 | #include <linux/slab.h> | ||
26 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
27 | #include <linux/init.h> | 26 | #include <linux/init.h> |
28 | #include <linux/fb.h> | 27 | #include <linux/fb.h> |
29 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
30 | #include <linux/dma-mapping.h> | 29 | #include <linux/dma-mapping.h> |
31 | #include <linux/io.h> | 30 | #include <linux/io.h> |
31 | #include <linux/gfp.h> | ||
32 | 32 | ||
33 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
34 | #include <asm/irq.h> | 34 | #include <asm/irq.h> |
diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c index 82bedd7f7789..dca48df98444 100644 --- a/drivers/video/amifb.c +++ b/drivers/video/amifb.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #include <linux/errno.h> | 45 | #include <linux/errno.h> |
46 | #include <linux/string.h> | 46 | #include <linux/string.h> |
47 | #include <linux/mm.h> | 47 | #include <linux/mm.h> |
48 | #include <linux/slab.h> | ||
49 | #include <linux/delay.h> | 48 | #include <linux/delay.h> |
50 | #include <linux/interrupt.h> | 49 | #include <linux/interrupt.h> |
51 | #include <linux/fb.h> | 50 | #include <linux/fb.h> |
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index 01554d696528..8d406fb689c1 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
40 | #include <linux/string.h> | 40 | #include <linux/string.h> |
41 | #include <linux/mm.h> | 41 | #include <linux/mm.h> |
42 | #include <linux/slab.h> | ||
43 | #include <linux/vmalloc.h> | 42 | #include <linux/vmalloc.h> |
44 | #include <linux/delay.h> | 43 | #include <linux/delay.h> |
45 | #include <linux/interrupt.h> | 44 | #include <linux/interrupt.h> |
diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c index e70bc225fe31..8cdf88e20b4b 100644 --- a/drivers/video/asiliantfb.c +++ b/drivers/video/asiliantfb.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/string.h> | 35 | #include <linux/string.h> |
36 | #include <linux/mm.h> | 36 | #include <linux/mm.h> |
37 | #include <linux/slab.h> | ||
38 | #include <linux/vmalloc.h> | 37 | #include <linux/vmalloc.h> |
39 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
40 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c index b7687c55fe16..f3aada20fa02 100644 --- a/drivers/video/atafb.c +++ b/drivers/video/atafb.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <linux/errno.h> | 52 | #include <linux/errno.h> |
53 | #include <linux/string.h> | 53 | #include <linux/string.h> |
54 | #include <linux/mm.h> | 54 | #include <linux/mm.h> |
55 | #include <linux/slab.h> | ||
56 | #include <linux/delay.h> | 55 | #include <linux/delay.h> |
57 | #include <linux/init.h> | 56 | #include <linux/init.h> |
58 | #include <linux/interrupt.h> | 57 | #include <linux/interrupt.h> |
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 11de3bfd4e54..8dce25126330 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/backlight.h> | 19 | #include <linux/backlight.h> |
20 | #include <linux/gfp.h> | ||
20 | 21 | ||
21 | #include <mach/board.h> | 22 | #include <mach/board.h> |
22 | #include <mach/cpu.h> | 23 | #include <mach/cpu.h> |
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index a489be0c4614..34a0851bcbfa 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <linux/errno.h> | 52 | #include <linux/errno.h> |
53 | #include <linux/string.h> | 53 | #include <linux/string.h> |
54 | #include <linux/mm.h> | 54 | #include <linux/mm.h> |
55 | #include <linux/slab.h> | ||
56 | #include <linux/vmalloc.h> | 55 | #include <linux/vmalloc.h> |
57 | #include <linux/delay.h> | 56 | #include <linux/delay.h> |
58 | #include <linux/interrupt.h> | 57 | #include <linux/interrupt.h> |
diff --git a/drivers/video/aty/mach64_cursor.c b/drivers/video/aty/mach64_cursor.c index 04c710804bb0..2ba8b3c421a1 100644 --- a/drivers/video/aty/mach64_cursor.c +++ b/drivers/video/aty/mach64_cursor.c | |||
@@ -2,7 +2,6 @@ | |||
2 | * ATI Mach64 CT/VT/GT/LT Cursor Support | 2 | * ATI Mach64 CT/VT/GT/LT Cursor Support |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/slab.h> | ||
6 | #include <linux/fb.h> | 5 | #include <linux/fb.h> |
7 | #include <linux/init.h> | 6 | #include <linux/init.h> |
8 | #include <linux/string.h> | 7 | #include <linux/string.h> |
diff --git a/drivers/video/aty/radeon_backlight.c b/drivers/video/aty/radeon_backlight.c index 9fc8c66be3ce..256966e9667d 100644 --- a/drivers/video/aty/radeon_backlight.c +++ b/drivers/video/aty/radeon_backlight.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include "radeonfb.h" | 13 | #include "radeonfb.h" |
14 | #include <linux/backlight.h> | 14 | #include <linux/backlight.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #ifdef CONFIG_PMAC_BACKLIGHT | 17 | #ifdef CONFIG_PMAC_BACKLIGHT |
17 | #include <asm/backlight.h> | 18 | #include <asm/backlight.h> |
diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c index b4d4b88afc09..9261c918fde8 100644 --- a/drivers/video/aty/radeon_monitor.c +++ b/drivers/video/aty/radeon_monitor.c | |||
@@ -1,4 +1,7 @@ | |||
1 | #include "radeonfb.h" | 1 | #include "radeonfb.h" |
2 | |||
3 | #include <linux/slab.h> | ||
4 | |||
2 | #include "../edid.h" | 5 | #include "../edid.h" |
3 | 6 | ||
4 | static struct fb_var_screeninfo radeonfb_default_var = { | 7 | static struct fb_var_screeninfo radeonfb_default_var = { |
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c index a699aab63820..40f61320ce16 100644 --- a/drivers/video/au1100fb.c +++ b/drivers/video/au1100fb.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <linux/ctype.h> | 52 | #include <linux/ctype.h> |
53 | #include <linux/dma-mapping.h> | 53 | #include <linux/dma-mapping.h> |
54 | #include <linux/platform_device.h> | 54 | #include <linux/platform_device.h> |
55 | #include <linux/slab.h> | ||
55 | 56 | ||
56 | #include <asm/mach-au1x00/au1000.h> | 57 | #include <asm/mach-au1x00/au1000.h> |
57 | 58 | ||
diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c index 0d96f1d2d4c5..e77e8e4280fb 100644 --- a/drivers/video/au1200fb.c +++ b/drivers/video/au1200fb.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
42 | #include <linux/ctype.h> | 42 | #include <linux/ctype.h> |
43 | #include <linux/dma-mapping.h> | 43 | #include <linux/dma-mapping.h> |
44 | #include <linux/slab.h> | ||
44 | 45 | ||
45 | #include <asm/mach-au1x00/au1000.h> | 46 | #include <asm/mach-au1x00/au1000.h> |
46 | #include "au1200fb.h" | 47 | #include "au1200fb.h" |
diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c index 93e25c77aeb2..68d2518fadaa 100644 --- a/drivers/video/backlight/88pm860x_bl.c +++ b/drivers/video/backlight/88pm860x_bl.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/backlight.h> | 17 | #include <linux/backlight.h> |
18 | #include <linux/mfd/88pm860x.h> | 18 | #include <linux/mfd/88pm860x.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #define MAX_BRIGHTNESS (0xFF) | 21 | #define MAX_BRIGHTNESS (0xFF) |
21 | #define MIN_BRIGHTNESS (0) | 22 | #define MIN_BRIGHTNESS (0) |
diff --git a/drivers/video/backlight/adp5520_bl.c b/drivers/video/backlight/adp5520_bl.c index 5183f0e4d314..9f436e014f85 100644 --- a/drivers/video/backlight/adp5520_bl.c +++ b/drivers/video/backlight/adp5520_bl.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/fb.h> | 12 | #include <linux/fb.h> |
13 | #include <linux/backlight.h> | 13 | #include <linux/backlight.h> |
14 | #include <linux/mfd/adp5520.h> | 14 | #include <linux/mfd/adp5520.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | struct adp5520_bl { | 17 | struct adp5520_bl { |
17 | struct device *master; | 18 | struct device *master; |
diff --git a/drivers/video/backlight/adx_bl.c b/drivers/video/backlight/adx_bl.c index b0624b983889..7f4a7c30a98b 100644 --- a/drivers/video/backlight/adx_bl.c +++ b/drivers/video/backlight/adx_bl.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/backlight.h> | 13 | #include <linux/backlight.h> |
14 | #include <linux/fb.h> | 14 | #include <linux/fb.h> |
15 | #include <linux/gfp.h> | ||
15 | #include <linux/io.h> | 16 | #include <linux/io.h> |
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
diff --git a/drivers/video/backlight/atmel-pwm-bl.c b/drivers/video/backlight/atmel-pwm-bl.c index 2d9760551a4b..e6a66dab088c 100644 --- a/drivers/video/backlight/atmel-pwm-bl.c +++ b/drivers/video/backlight/atmel-pwm-bl.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/backlight.h> | 17 | #include <linux/backlight.h> |
18 | #include <linux/atmel_pwm.h> | 18 | #include <linux/atmel_pwm.h> |
19 | #include <linux/atmel-pwm-bl.h> | 19 | #include <linux/atmel-pwm-bl.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | struct atmel_pwm_bl { | 22 | struct atmel_pwm_bl { |
22 | const struct atmel_pwm_bl_platform_data *pdata; | 23 | const struct atmel_pwm_bl_platform_data *pdata; |
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 68bb838b9f11..e207810bba3c 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/ctype.h> | 13 | #include <linux/ctype.h> |
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
15 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #ifdef CONFIG_PMAC_BACKLIGHT | 18 | #ifdef CONFIG_PMAC_BACKLIGHT |
18 | #include <asm/backlight.h> | 19 | #include <asm/backlight.h> |
diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c index 73bdd8454c94..1e71c35083bb 100644 --- a/drivers/video/backlight/corgi_lcd.c +++ b/drivers/video/backlight/corgi_lcd.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/lcd.h> | 24 | #include <linux/lcd.h> |
25 | #include <linux/spi/spi.h> | 25 | #include <linux/spi/spi.h> |
26 | #include <linux/spi/corgi_lcd.h> | 26 | #include <linux/spi/corgi_lcd.h> |
27 | #include <linux/slab.h> | ||
27 | #include <asm/mach/sharpsl_param.h> | 28 | #include <asm/mach/sharpsl_param.h> |
28 | 29 | ||
29 | #define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL) | 30 | #define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL) |
diff --git a/drivers/video/backlight/cr_bllcd.c b/drivers/video/backlight/cr_bllcd.c index 1cce6031bff2..a4f4546f0be0 100644 --- a/drivers/video/backlight/cr_bllcd.c +++ b/drivers/video/backlight/cr_bllcd.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/backlight.h> | 36 | #include <linux/backlight.h> |
37 | #include <linux/lcd.h> | 37 | #include <linux/lcd.h> |
38 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | /* The LVDS- and panel power controls sits on the | 41 | /* The LVDS- and panel power controls sits on the |
41 | * GPIO port of the ISA bridge. | 42 | * GPIO port of the ISA bridge. |
diff --git a/drivers/video/backlight/da903x_bl.c b/drivers/video/backlight/da903x_bl.c index 686e4a789238..87659ed79bd7 100644 --- a/drivers/video/backlight/da903x_bl.c +++ b/drivers/video/backlight/da903x_bl.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/fb.h> | 18 | #include <linux/fb.h> |
19 | #include <linux/backlight.h> | 19 | #include <linux/backlight.h> |
20 | #include <linux/mfd/da903x.h> | 20 | #include <linux/mfd/da903x.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #define DA9030_WLED_CONTROL 0x25 | 23 | #define DA9030_WLED_CONTROL 0x25 |
23 | #define DA9030_WLED_CP_EN (1 << 6) | 24 | #define DA9030_WLED_CP_EN (1 << 6) |
diff --git a/drivers/video/backlight/ili9320.c b/drivers/video/backlight/ili9320.c index ba89b41b639c..5118a9f029ab 100644 --- a/drivers/video/backlight/ili9320.c +++ b/drivers/video/backlight/ili9320.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/lcd.h> | 18 | #include <linux/lcd.h> |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
22 | 23 | ||
diff --git a/drivers/video/backlight/l4f00242t03.c b/drivers/video/backlight/l4f00242t03.c index 74abd6994b09..bcdb12c93efd 100644 --- a/drivers/video/backlight/l4f00242t03.c +++ b/drivers/video/backlight/l4f00242t03.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/lcd.h> | 18 | #include <linux/lcd.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/regulator/consumer.h> | 20 | #include <linux/regulator/consumer.h> |
20 | 21 | ||
21 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index 9b3be74cee5a..71a11cadffc4 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/ctype.h> | 13 | #include <linux/ctype.h> |
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
15 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #if defined(CONFIG_FB) || (defined(CONFIG_FB_MODULE) && \ | 18 | #if defined(CONFIG_FB) || (defined(CONFIG_FB_MODULE) && \ |
18 | defined(CONFIG_LCD_CLASS_DEVICE_MODULE)) | 19 | defined(CONFIG_LCD_CLASS_DEVICE_MODULE)) |
diff --git a/drivers/video/backlight/lms283gf05.c b/drivers/video/backlight/lms283gf05.c index 447b542a20ca..abc43a0eb97d 100644 --- a/drivers/video/backlight/lms283gf05.c +++ b/drivers/video/backlight/lms283gf05.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
15 | #include <linux/lcd.h> | 16 | #include <linux/lcd.h> |
16 | 17 | ||
diff --git a/drivers/video/backlight/ltv350qv.c b/drivers/video/backlight/ltv350qv.c index 4631ca8fa4a4..8010aaeb5adb 100644 --- a/drivers/video/backlight/ltv350qv.c +++ b/drivers/video/backlight/ltv350qv.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/lcd.h> | 14 | #include <linux/lcd.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/spi/spi.h> | 17 | #include <linux/spi/spi.h> |
17 | 18 | ||
18 | #include "ltv350qv.h" | 19 | #include "ltv350qv.h" |
diff --git a/drivers/video/backlight/max8925_bl.c b/drivers/video/backlight/max8925_bl.c index c91adaf492cf..b5accc957ad3 100644 --- a/drivers/video/backlight/max8925_bl.c +++ b/drivers/video/backlight/max8925_bl.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/backlight.h> | 17 | #include <linux/backlight.h> |
18 | #include <linux/mfd/max8925.h> | 18 | #include <linux/mfd/max8925.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #define MAX_BRIGHTNESS (0xff) | 21 | #define MAX_BRIGHTNESS (0xff) |
21 | #define MIN_BRIGHTNESS (0) | 22 | #define MIN_BRIGHTNESS (0) |
diff --git a/drivers/video/backlight/omap1_bl.c b/drivers/video/backlight/omap1_bl.c index 333d28e6b062..d3bc56296c8d 100644 --- a/drivers/video/backlight/omap1_bl.c +++ b/drivers/video/backlight/omap1_bl.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/fb.h> | 25 | #include <linux/fb.h> |
26 | #include <linux/backlight.h> | 26 | #include <linux/backlight.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
29 | #include <plat/board.h> | 30 | #include <plat/board.h> |
diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c index 738694d23889..302330acf628 100644 --- a/drivers/video/backlight/platform_lcd.c +++ b/drivers/video/backlight/platform_lcd.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/fb.h> | 16 | #include <linux/fb.h> |
17 | #include <linux/backlight.h> | 17 | #include <linux/backlight.h> |
18 | #include <linux/lcd.h> | 18 | #include <linux/lcd.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include <video/platform_lcd.h> | 21 | #include <video/platform_lcd.h> |
21 | 22 | ||
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index b89eebc3f77d..550443518891 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/err.h> | 19 | #include <linux/err.h> |
20 | #include <linux/pwm.h> | 20 | #include <linux/pwm.h> |
21 | #include <linux/pwm_backlight.h> | 21 | #include <linux/pwm_backlight.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | struct pwm_bl_data { | 24 | struct pwm_bl_data { |
24 | struct pwm_device *pwm; | 25 | struct pwm_device *pwm; |
diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo24m.c index 4a3d46e08016..1997e12a1057 100644 --- a/drivers/video/backlight/tdo24m.c +++ b/drivers/video/backlight/tdo24m.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/spi/tdo24m.h> | 17 | #include <linux/spi/tdo24m.h> |
18 | #include <linux/fb.h> | 18 | #include <linux/fb.h> |
19 | #include <linux/lcd.h> | 19 | #include <linux/lcd.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL) | 22 | #define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL) |
22 | 23 | ||
diff --git a/drivers/video/backlight/tosa_bl.c b/drivers/video/backlight/tosa_bl.c index f57bbf170049..e03e60bbfd85 100644 --- a/drivers/video/backlight/tosa_bl.c +++ b/drivers/video/backlight/tosa_bl.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/fb.h> | 19 | #include <linux/fb.h> |
20 | #include <linux/backlight.h> | 20 | #include <linux/backlight.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <asm/mach/sharpsl_param.h> | 23 | #include <asm/mach/sharpsl_param.h> |
23 | 24 | ||
diff --git a/drivers/video/backlight/tosa_lcd.c b/drivers/video/backlight/tosa_lcd.c index fa32b94a4546..772f6015219a 100644 --- a/drivers/video/backlight/tosa_lcd.c +++ b/drivers/video/backlight/tosa_lcd.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/spi/spi.h> | 16 | #include <linux/spi/spi.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
19 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
20 | #include <linux/lcd.h> | 21 | #include <linux/lcd.h> |
diff --git a/drivers/video/backlight/wm831x_bl.c b/drivers/video/backlight/wm831x_bl.c index a4312709fb1b..08fd87f3aecc 100644 --- a/drivers/video/backlight/wm831x_bl.c +++ b/drivers/video/backlight/wm831x_bl.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/fb.h> | 14 | #include <linux/fb.h> |
15 | #include <linux/backlight.h> | 15 | #include <linux/backlight.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #include <linux/mfd/wm831x/core.h> | 18 | #include <linux/mfd/wm831x/core.h> |
18 | #include <linux/mfd/wm831x/pdata.h> | 19 | #include <linux/mfd/wm831x/pdata.h> |
diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c index 03872365a36d..2baac7cc1425 100644 --- a/drivers/video/bfin-lq035q1-fb.c +++ b/drivers/video/bfin-lq035q1-fb.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
17 | #include <linux/types.h> | 18 | #include <linux/types.h> |
18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c index 31a2dec927bb..44e49c28b2a7 100644 --- a/drivers/video/bfin-t350mcqb-fb.c +++ b/drivers/video/bfin-t350mcqb-fb.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
34 | #include <linux/string.h> | 34 | #include <linux/string.h> |
35 | #include <linux/gfp.h> | ||
35 | #include <linux/fb.h> | 36 | #include <linux/fb.h> |
36 | #include <linux/init.h> | 37 | #include <linux/init.h> |
37 | #include <linux/types.h> | 38 | #include <linux/types.h> |
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c index b0b147cb4cb3..43320925c4ce 100644 --- a/drivers/video/bw2.c +++ b/drivers/video/bw2.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
18 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
diff --git a/drivers/video/carminefb.c b/drivers/video/carminefb.c index 0c02f8ec4bf3..d8345fcc4fe3 100644 --- a/drivers/video/carminefb.c +++ b/drivers/video/carminefb.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/fb.h> | 11 | #include <linux/fb.h> |
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
14 | #include <linux/slab.h> | ||
14 | 15 | ||
15 | #include "carminefb.h" | 16 | #include "carminefb.h" |
16 | #include "carminefb_regs.h" | 17 | #include "carminefb_regs.h" |
diff --git a/drivers/video/cfbcopyarea.c b/drivers/video/cfbcopyarea.c index 79e5f40e6486..bb5a96b1645d 100644 --- a/drivers/video/cfbcopyarea.c +++ b/drivers/video/cfbcopyarea.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/string.h> | 27 | #include <linux/string.h> |
28 | #include <linux/fb.h> | 28 | #include <linux/fb.h> |
29 | #include <linux/slab.h> | ||
30 | #include <asm/types.h> | 29 | #include <asm/types.h> |
31 | #include <asm/io.h> | 30 | #include <asm/io.h> |
32 | #include "fb_draw.h" | 31 | #include "fb_draw.h" |
diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c index fe45a3b8d0e0..77a040af20a7 100644 --- a/drivers/video/cg14.c +++ b/drivers/video/cg14.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/string.h> | 13 | #include <linux/string.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/fb.h> | 16 | #include <linux/fb.h> |
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c index b2319fa7286f..30eedf79322c 100644 --- a/drivers/video/cg3.c +++ b/drivers/video/cg3.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
18 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c index 0d47c6030e3d..6d0fcb43696e 100644 --- a/drivers/video/cg6.c +++ b/drivers/video/cg6.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
18 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c index 57b9d276497e..d637e1f53172 100644 --- a/drivers/video/chipsfb.c +++ b/drivers/video/chipsfb.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/vmalloc.h> | 22 | #include <linux/vmalloc.h> |
24 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
25 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index 4c2bf923418c..8d8dfda2f868 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/errno.h> | 39 | #include <linux/errno.h> |
40 | #include <linux/string.h> | 40 | #include <linux/string.h> |
41 | #include <linux/mm.h> | 41 | #include <linux/mm.h> |
42 | #include <linux/slab.h> | ||
43 | #include <linux/delay.h> | 42 | #include <linux/delay.h> |
44 | #include <linux/fb.h> | 43 | #include <linux/fb.h> |
45 | #include <linux/init.h> | 44 | #include <linux/init.h> |
diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c index 6b7c8fbc5495..af88651b0735 100644 --- a/drivers/video/console/bitblit.c +++ b/drivers/video/console/bitblit.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/string.h> | 15 | #include <linux/string.h> |
15 | #include <linux/fb.h> | 16 | #include <linux/fb.h> |
16 | #include <linux/vt_kern.h> | 17 | #include <linux/vt_kern.h> |
diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/console/fbcon_ccw.c index bdf913ecf001..d135671d9961 100644 --- a/drivers/video/console/fbcon_ccw.c +++ b/drivers/video/console/fbcon_ccw.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/string.h> | 13 | #include <linux/string.h> |
13 | #include <linux/fb.h> | 14 | #include <linux/fb.h> |
14 | #include <linux/vt_kern.h> | 15 | #include <linux/vt_kern.h> |
diff --git a/drivers/video/console/fbcon_cw.c b/drivers/video/console/fbcon_cw.c index a6819b9d1770..126110f8454f 100644 --- a/drivers/video/console/fbcon_cw.c +++ b/drivers/video/console/fbcon_cw.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/string.h> | 13 | #include <linux/string.h> |
13 | #include <linux/fb.h> | 14 | #include <linux/fb.h> |
14 | #include <linux/vt_kern.h> | 15 | #include <linux/vt_kern.h> |
diff --git a/drivers/video/console/fbcon_rotate.c b/drivers/video/console/fbcon_rotate.c index 00884e013f0f..db6528f2d3f2 100644 --- a/drivers/video/console/fbcon_rotate.c +++ b/drivers/video/console/fbcon_rotate.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/string.h> | 13 | #include <linux/string.h> |
13 | #include <linux/fb.h> | 14 | #include <linux/fb.h> |
14 | #include <linux/vt_kern.h> | 15 | #include <linux/vt_kern.h> |
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c index d9b5d6eb68a7..93a3e7381b50 100644 --- a/drivers/video/console/fbcon_ud.c +++ b/drivers/video/console/fbcon_ud.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/string.h> | 13 | #include <linux/string.h> |
13 | #include <linux/fb.h> | 14 | #include <linux/fb.h> |
14 | #include <linux/vt_kern.h> | 15 | #include <linux/vt_kern.h> |
diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c index dd3eaaad4441..0b67866cae10 100644 --- a/drivers/video/console/mdacon.c +++ b/drivers/video/console/mdacon.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/console.h> | 33 | #include <linux/console.h> |
34 | #include <linux/string.h> | 34 | #include <linux/string.h> |
35 | #include <linux/kd.h> | 35 | #include <linux/kd.h> |
36 | #include <linux/slab.h> | ||
37 | #include <linux/vt_kern.h> | 36 | #include <linux/vt_kern.h> |
38 | #include <linux/vt_buffer.h> | 37 | #include <linux/vt_buffer.h> |
39 | #include <linux/selection.h> | 38 | #include <linux/selection.h> |
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index 369a5b3ac649..8d244ba0f601 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/clk.h> | 30 | #include <linux/clk.h> |
31 | #include <linux/cpufreq.h> | 31 | #include <linux/cpufreq.h> |
32 | #include <linux/console.h> | 32 | #include <linux/console.h> |
33 | #include <linux/slab.h> | ||
33 | #include <video/da8xx-fb.h> | 34 | #include <video/da8xx-fb.h> |
34 | 35 | ||
35 | #define DRIVER_NAME "da8xx_lcdc" | 36 | #define DRIVER_NAME "da8xx_lcdc" |
diff --git a/drivers/video/display/display-sysfs.c b/drivers/video/display/display-sysfs.c index 80abbf323b99..f6a09ab0dac6 100644 --- a/drivers/video/display/display-sysfs.c +++ b/drivers/video/display/display-sysfs.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/idr.h> | 27 | #include <linux/idr.h> |
28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
29 | #include <linux/kdev_t.h> | 29 | #include <linux/kdev_t.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | static ssize_t display_show_name(struct device *dev, | 32 | static ssize_t display_show_name(struct device *dev, |
32 | struct device_attribute *attr, char *buf) | 33 | struct device_attribute *attr, char *buf) |
diff --git a/drivers/video/dnfb.c b/drivers/video/dnfb.c index 606da043f4b4..ec56d2544c73 100644 --- a/drivers/video/dnfb.c +++ b/drivers/video/dnfb.c | |||
@@ -2,7 +2,6 @@ | |||
2 | #include <linux/errno.h> | 2 | #include <linux/errno.h> |
3 | #include <linux/string.h> | 3 | #include <linux/string.h> |
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | #include <linux/slab.h> | ||
6 | #include <linux/delay.h> | 5 | #include <linux/delay.h> |
7 | #include <linux/interrupt.h> | 6 | #include <linux/interrupt.h> |
8 | #include <linux/platform_device.h> | 7 | #include <linux/platform_device.h> |
diff --git a/drivers/video/ep93xx-fb.c b/drivers/video/ep93xx-fb.c index 27aab4a06198..0c99de0562ca 100644 --- a/drivers/video/ep93xx-fb.c +++ b/drivers/video/ep93xx-fb.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/dma-mapping.h> | 21 | #include <linux/dma-mapping.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
23 | #include <linux/fb.h> | 24 | #include <linux/fb.h> |
24 | 25 | ||
diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c index 6d755bb3a2bc..db9713b49ce9 100644 --- a/drivers/video/epson1355fb.c +++ b/drivers/video/epson1355fb.c | |||
@@ -48,7 +48,6 @@ | |||
48 | #include <linux/errno.h> | 48 | #include <linux/errno.h> |
49 | #include <linux/string.h> | 49 | #include <linux/string.h> |
50 | #include <linux/mm.h> | 50 | #include <linux/mm.h> |
51 | #include <linux/slab.h> | ||
52 | #include <linux/delay.h> | 51 | #include <linux/delay.h> |
53 | #include <linux/fb.h> | 52 | #include <linux/fb.h> |
54 | #include <linux/init.h> | 53 | #include <linux/init.h> |
diff --git a/drivers/video/fb_ddc.c b/drivers/video/fb_ddc.c index 0cf96eb8a60f..4a874c8d039c 100644 --- a/drivers/video/fb_ddc.c +++ b/drivers/video/fb_ddc.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
13 | #include <linux/fb.h> | 13 | #include <linux/fb.h> |
14 | #include <linux/i2c-algo-bit.h> | 14 | #include <linux/i2c-algo-bit.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include "edid.h" | 17 | #include "edid.h" |
17 | 18 | ||
diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c index 44ce908a478b..6113c47e095a 100644 --- a/drivers/video/fb_defio.c +++ b/drivers/video/fb_defio.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/vmalloc.h> | 16 | #include <linux/vmalloc.h> |
18 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
19 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
diff --git a/drivers/video/fbcvt.c b/drivers/video/fbcvt.c index 0847c5e72cbd..7293eaccd81b 100644 --- a/drivers/video/fbcvt.c +++ b/drivers/video/fbcvt.c | |||
@@ -13,6 +13,7 @@ | |||
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #define FB_CVT_CELLSIZE 8 | 18 | #define FB_CVT_CELLSIZE 8 |
18 | #define FB_CVT_GTF_C 40 | 19 | #define FB_CVT_GTF_C 40 |
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c index 9ae9cd32bd06..563a98b88e9b 100644 --- a/drivers/video/fbmon.c +++ b/drivers/video/fbmon.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/fb.h> | 29 | #include <linux/fb.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
32 | #include <linux/slab.h> | ||
32 | #include <video/edid.h> | 33 | #include <video/edid.h> |
33 | #ifdef CONFIG_PPC_OF | 34 | #ifdef CONFIG_PPC_OF |
34 | #include <asm/prom.h> | 35 | #include <asm/prom.h> |
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c index d4a2c11d9809..81aa3129c17d 100644 --- a/drivers/video/fbsysfs.c +++ b/drivers/video/fbsysfs.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/fb.h> | 20 | #include <linux/fb.h> |
20 | #include <linux/console.h> | 21 | #include <linux/console.h> |
21 | #include <linux/module.h> | 22 | #include <linux/module.h> |
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c index 9dbb9646081f..a42fabab69df 100644 --- a/drivers/video/ffb.c +++ b/drivers/video/ffb.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index 4637bcbe03a4..994358a4f302 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c | |||
@@ -1536,6 +1536,7 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev, | |||
1536 | goto error; | 1536 | goto error; |
1537 | } | 1537 | } |
1538 | 1538 | ||
1539 | sysfs_attr_init(&machine_data->dev_attr.attr); | ||
1539 | machine_data->dev_attr.attr.name = "monitor"; | 1540 | machine_data->dev_attr.attr.name = "monitor"; |
1540 | machine_data->dev_attr.attr.mode = S_IRUGO|S_IWUSR; | 1541 | machine_data->dev_attr.attr.mode = S_IRUGO|S_IWUSR; |
1541 | machine_data->dev_attr.show = show_monitor; | 1542 | machine_data->dev_attr.show = show_monitor; |
diff --git a/drivers/video/g364fb.c b/drivers/video/g364fb.c index b7655c05da53..d662317d85e3 100644 --- a/drivers/video/g364fb.c +++ b/drivers/video/g364fb.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/slab.h> | ||
24 | #include <linux/vmalloc.h> | 23 | #include <linux/vmalloc.h> |
25 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
26 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c index 5643a35c1746..7d8c55d7fd28 100644 --- a/drivers/video/gbefb.c +++ b/drivers/video/gbefb.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/dma-mapping.h> | 14 | #include <linux/dma-mapping.h> |
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/gfp.h> | ||
16 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c index f20eff8c4a81..c6b554f72c6d 100644 --- a/drivers/video/geode/gx1fb_core.c +++ b/drivers/video/geode/gx1fb_core.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
20 | #include <linux/fb.h> | 19 | #include <linux/fb.h> |
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
diff --git a/drivers/video/geode/gxfb_core.c b/drivers/video/geode/gxfb_core.c index b3e639d1e12c..76e7dac6f259 100644 --- a/drivers/video/geode/gxfb_core.c +++ b/drivers/video/geode/gxfb_core.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
26 | #include <linux/string.h> | 26 | #include <linux/string.h> |
27 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
30 | #include <linux/fb.h> | 29 | #include <linux/fb.h> |
31 | #include <linux/console.h> | 30 | #include <linux/console.h> |
diff --git a/drivers/video/geode/lxfb.h b/drivers/video/geode/lxfb.h index cc781c00f75d..e4c4d89b7860 100644 --- a/drivers/video/geode/lxfb.h +++ b/drivers/video/geode/lxfb.h | |||
@@ -365,6 +365,8 @@ enum fp_registers { | |||
365 | FP_CRC, /* 0x458 */ | 365 | FP_CRC, /* 0x458 */ |
366 | }; | 366 | }; |
367 | 367 | ||
368 | #define FP_PT2_HSP (1 << 22) | ||
369 | #define FP_PT2_VSP (1 << 23) | ||
368 | #define FP_PT2_SCRC (1 << 27) /* shfclk free */ | 370 | #define FP_PT2_SCRC (1 << 27) /* shfclk free */ |
369 | 371 | ||
370 | #define FP_PM_P (1 << 24) /* panel power ctl */ | 372 | #define FP_PM_P (1 << 24) /* panel power ctl */ |
diff --git a/drivers/video/geode/lxfb_core.c b/drivers/video/geode/lxfb_core.c index 889cbe39e580..1a18da86d3fa 100644 --- a/drivers/video/geode/lxfb_core.c +++ b/drivers/video/geode/lxfb_core.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/console.h> | 17 | #include <linux/console.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/suspend.h> | 19 | #include <linux/suspend.h> |
21 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
22 | #include <linux/fb.h> | 21 | #include <linux/fb.h> |
diff --git a/drivers/video/geode/lxfb_ops.c b/drivers/video/geode/lxfb_ops.c index 0e5d8c7c3eba..bc35a95e59d4 100644 --- a/drivers/video/geode/lxfb_ops.c +++ b/drivers/video/geode/lxfb_ops.c | |||
@@ -274,7 +274,15 @@ static void lx_graphics_enable(struct fb_info *info) | |||
274 | u32 msrlo, msrhi; | 274 | u32 msrlo, msrhi; |
275 | 275 | ||
276 | write_fp(par, FP_PT1, 0); | 276 | write_fp(par, FP_PT1, 0); |
277 | write_fp(par, FP_PT2, FP_PT2_SCRC); | 277 | temp = FP_PT2_SCRC; |
278 | |||
279 | if (info->var.sync & FB_SYNC_HOR_HIGH_ACT) | ||
280 | temp |= FP_PT2_HSP; | ||
281 | |||
282 | if (info->var.sync & FB_SYNC_VERT_HIGH_ACT) | ||
283 | temp |= FP_PT2_VSP; | ||
284 | |||
285 | write_fp(par, FP_PT2, temp); | ||
278 | write_fp(par, FP_DFC, FP_DFC_BC); | 286 | write_fp(par, FP_DFC, FP_DFC_BC); |
279 | 287 | ||
280 | msrlo = MSR_LX_MSR_PADSEL_TFT_SEL_LOW; | 288 | msrlo = MSR_LX_MSR_PADSEL_TFT_SEL_LOW; |
diff --git a/drivers/video/hecubafb.c b/drivers/video/hecubafb.c index f9d77adf035d..c77bcc6ab463 100644 --- a/drivers/video/hecubafb.c +++ b/drivers/video/hecubafb.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
33 | #include <linux/string.h> | 33 | #include <linux/string.h> |
34 | #include <linux/mm.h> | 34 | #include <linux/mm.h> |
35 | #include <linux/slab.h> | ||
36 | #include <linux/vmalloc.h> | 35 | #include <linux/vmalloc.h> |
37 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
38 | #include <linux/interrupt.h> | 37 | #include <linux/interrupt.h> |
diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c index db9b785b56eb..8bbf251f83d9 100644 --- a/drivers/video/hgafb.c +++ b/drivers/video/hgafb.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/spinlock.h> | 36 | #include <linux/spinlock.h> |
37 | #include <linux/string.h> | 37 | #include <linux/string.h> |
38 | #include <linux/mm.h> | 38 | #include <linux/mm.h> |
39 | #include <linux/slab.h> | ||
40 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
41 | #include <linux/fb.h> | 40 | #include <linux/fb.h> |
42 | #include <linux/init.h> | 41 | #include <linux/init.h> |
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c index bf78779199c6..393f3f3d3dfe 100644 --- a/drivers/video/hitfb.c +++ b/drivers/video/hitfb.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
21 | #include <linux/init.h> | 20 | #include <linux/init.h> |
22 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
diff --git a/drivers/video/hpfb.c b/drivers/video/hpfb.c index b8ebff1e8493..c8e280f1bb0b 100644 --- a/drivers/video/hpfb.c +++ b/drivers/video/hpfb.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
diff --git a/drivers/video/i810/i810-i2c.c b/drivers/video/i810/i810-i2c.c index 9dd55e5324a1..cd2c728a809b 100644 --- a/drivers/video/i810/i810-i2c.c +++ b/drivers/video/i810/i810-i2c.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | #include <linux/gfp.h> | ||
14 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
15 | #include <linux/fb.h> | 16 | #include <linux/fb.h> |
16 | #include "i810.h" | 17 | #include "i810.h" |
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c index 15d50b9906ce..efb2c10656b0 100644 --- a/drivers/video/imsttfb.c +++ b/drivers/video/imsttfb.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/vmalloc.h> | 24 | #include <linux/vmalloc.h> |
26 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
27 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c index 81627466804e..38065cf94ac4 100644 --- a/drivers/video/intelfb/intelfbhw.c +++ b/drivers/video/intelfb/intelfbhw.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
29 | #include <linux/fb.h> | 28 | #include <linux/fb.h> |
30 | #include <linux/ioport.h> | 29 | #include <linux/ioport.h> |
diff --git a/drivers/video/leo.c b/drivers/video/leo.c index e145e2d16fe3..1db55f128490 100644 --- a/drivers/video/leo.c +++ b/drivers/video/leo.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/string.h> | 13 | #include <linux/string.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/fb.h> | 16 | #include <linux/fb.h> |
diff --git a/drivers/video/matrox/i2c-matroxfb.c b/drivers/video/matrox/i2c-matroxfb.c index f3728ab262f8..403b14445a78 100644 --- a/drivers/video/matrox/i2c-matroxfb.c +++ b/drivers/video/matrox/i2c-matroxfb.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include "matroxfb_base.h" | 13 | #include "matroxfb_base.h" |
14 | #include "matroxfb_maven.h" | 14 | #include "matroxfb_maven.h" |
15 | #include <linux/i2c.h> | 15 | #include <linux/i2c.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/i2c-algo-bit.h> | 17 | #include <linux/i2c-algo-bit.h> |
17 | 18 | ||
18 | /* MGA-TVO I2C for G200, G400 */ | 19 | /* MGA-TVO I2C for G200, G400 */ |
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c index 7064fb4427b6..052dd9f0b760 100644 --- a/drivers/video/matrox/matroxfb_base.c +++ b/drivers/video/matrox/matroxfb_base.c | |||
@@ -113,6 +113,7 @@ | |||
113 | #include "matroxfb_g450.h" | 113 | #include "matroxfb_g450.h" |
114 | #include <linux/matroxfb.h> | 114 | #include <linux/matroxfb.h> |
115 | #include <linux/interrupt.h> | 115 | #include <linux/interrupt.h> |
116 | #include <linux/slab.h> | ||
116 | #include <linux/uaccess.h> | 117 | #include <linux/uaccess.h> |
117 | 118 | ||
118 | #ifdef CONFIG_PPC_PMAC | 119 | #ifdef CONFIG_PPC_PMAC |
diff --git a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c index 78414baa5a54..d7112c39614b 100644 --- a/drivers/video/matrox/matroxfb_crtc2.c +++ b/drivers/video/matrox/matroxfb_crtc2.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include "matroxfb_misc.h" | 15 | #include "matroxfb_misc.h" |
16 | #include "matroxfb_DAC1064.h" | 16 | #include "matroxfb_DAC1064.h" |
17 | #include <linux/matroxfb.h> | 17 | #include <linux/matroxfb.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/uaccess.h> | 19 | #include <linux/uaccess.h> |
19 | 20 | ||
20 | /* **************************************************** */ | 21 | /* **************************************************** */ |
diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c index 91af9159111f..1e3e8f19783e 100644 --- a/drivers/video/matrox/matroxfb_maven.c +++ b/drivers/video/matrox/matroxfb_maven.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include "matroxfb_DAC1064.h" | 17 | #include "matroxfb_DAC1064.h" |
18 | #include <linux/i2c.h> | 18 | #include <linux/i2c.h> |
19 | #include <linux/matroxfb.h> | 19 | #include <linux/matroxfb.h> |
20 | #include <linux/slab.h> | ||
20 | #include <asm/div64.h> | 21 | #include <asm/div64.h> |
21 | 22 | ||
22 | #define MGATVO_B 1 | 23 | #define MGATVO_B 1 |
diff --git a/drivers/video/maxinefb.c b/drivers/video/maxinefb.c index 7854c7a37dc5..5cf52d3c8e75 100644 --- a/drivers/video/maxinefb.c +++ b/drivers/video/maxinefb.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
29 | #include <linux/string.h> | 29 | #include <linux/string.h> |
30 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
31 | #include <linux/slab.h> | ||
32 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
34 | #include <linux/fb.h> | 33 | #include <linux/fb.h> |
diff --git a/drivers/video/mb862xx/mb862xxfb_accel.c b/drivers/video/mb862xx/mb862xxfb_accel.c index 049256052b1a..fe92eed6da70 100644 --- a/drivers/video/mb862xx/mb862xxfb_accel.c +++ b/drivers/video/mb862xx/mb862xxfb_accel.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Fujitsu Carmine/Coral-P(A)/Lime framebuffer driver acceleration support | 4 | * Fujitsu Carmine/Coral-P(A)/Lime framebuffer driver acceleration support |
5 | * | 5 | * |
6 | * (C) 2007 Alexander Shishkin <virtuoso@slind.org> | 6 | * (C) 2007 Alexander Shishkin <virtuoso@slind.org> |
7 | * (C) 2009 Valentin Sitdikov <valentin.sitdikov@siemens.com> | 7 | * (C) 2009 Valentin Sitdikov <v.sitdikov@gmail.com> |
8 | * (C) 2009 Siemens AG | 8 | * (C) 2009 Siemens AG |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
@@ -16,7 +16,9 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/module.h> | ||
19 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
21 | #include <linux/slab.h> | ||
20 | #if defined(CONFIG_OF) | 22 | #if defined(CONFIG_OF) |
21 | #include <linux/of_platform.h> | 23 | #include <linux/of_platform.h> |
22 | #endif | 24 | #endif |
@@ -329,3 +331,5 @@ void mb862xxfb_init_accel(struct fb_info *info, int xres) | |||
329 | info->fix.accel = 0xff; /*FIXME: add right define */ | 331 | info->fix.accel = 0xff; /*FIXME: add right define */ |
330 | } | 332 | } |
331 | EXPORT_SYMBOL(mb862xxfb_init_accel); | 333 | EXPORT_SYMBOL(mb862xxfb_init_accel); |
334 | |||
335 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/video/mbx/mbxdebugfs.c b/drivers/video/mbx/mbxdebugfs.c index 15b8b3c4330e..ecad96524570 100644 --- a/drivers/video/mbx/mbxdebugfs.c +++ b/drivers/video/mbx/mbxdebugfs.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/debugfs.h> | 1 | #include <linux/debugfs.h> |
2 | #include <linux/slab.h> | ||
2 | 3 | ||
3 | #define BIG_BUFFER_SIZE (1024) | 4 | #define BIG_BUFFER_SIZE (1024) |
4 | 5 | ||
diff --git a/drivers/video/metronomefb.c b/drivers/video/metronomefb.c index 661bfd20d194..9b3d6e4584cc 100644 --- a/drivers/video/metronomefb.c +++ b/drivers/video/metronomefb.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
24 | #include <linux/string.h> | 24 | #include <linux/string.h> |
25 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
28 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
29 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index b895aae41630..0a4dbdc1693a 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/fb.h> | 16 | #include <linux/fb.h> |
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
17 | 18 | ||
diff --git a/drivers/video/msm/mddi.c b/drivers/video/msm/mddi.c index 474421fe79a6..c1ff271017a9 100644 --- a/drivers/video/msm/mddi.c +++ b/drivers/video/msm/mddi.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/gfp.h> | ||
24 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
25 | #include <linux/clk.h> | 26 | #include <linux/clk.h> |
26 | #include <linux/io.h> | 27 | #include <linux/io.h> |
diff --git a/drivers/video/msm/mddi_client_dummy.c b/drivers/video/msm/mddi_client_dummy.c index ebbae87885b6..d2a091cebe2c 100644 --- a/drivers/video/msm/mddi_client_dummy.c +++ b/drivers/video/msm/mddi_client_dummy.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/slab.h> | ||
18 | #include <linux/module.h> | 19 | #include <linux/module.h> |
19 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
20 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
diff --git a/drivers/video/msm/mddi_client_nt35399.c b/drivers/video/msm/mddi_client_nt35399.c index c9e9349451cb..f239f4a25e01 100644 --- a/drivers/video/msm/mddi_client_nt35399.c +++ b/drivers/video/msm/mddi_client_nt35399.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/slab.h> | ||
24 | #include <mach/msm_fb.h> | 25 | #include <mach/msm_fb.h> |
25 | 26 | ||
26 | static DECLARE_WAIT_QUEUE_HEAD(nt35399_vsync_wait); | 27 | static DECLARE_WAIT_QUEUE_HEAD(nt35399_vsync_wait); |
diff --git a/drivers/video/msm/mddi_client_toshiba.c b/drivers/video/msm/mddi_client_toshiba.c index 71048e78f7f0..f9bc932ac46b 100644 --- a/drivers/video/msm/mddi_client_toshiba.c +++ b/drivers/video/msm/mddi_client_toshiba.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/slab.h> | ||
24 | #include <mach/msm_fb.h> | 25 | #include <mach/msm_fb.h> |
25 | 26 | ||
26 | 27 | ||
diff --git a/drivers/video/msm/mdp.c b/drivers/video/msm/mdp.c index 6c519e2fa2b7..19c01c6208e8 100644 --- a/drivers/video/msm/mdp.c +++ b/drivers/video/msm/mdp.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/file.h> | 24 | #include <linux/file.h> |
25 | #include <linux/major.h> | 25 | #include <linux/major.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include <mach/msm_iomap.h> | 28 | #include <mach/msm_iomap.h> |
28 | #include <mach/msm_fb.h> | 29 | #include <mach/msm_fb.h> |
diff --git a/drivers/video/msm/msm_fb.c b/drivers/video/msm/msm_fb.c index 49101dda45ee..debe5933fd2e 100644 --- a/drivers/video/msm/msm_fb.c +++ b/drivers/video/msm/msm_fb.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/fb.h> | 19 | #include <linux/fb.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
21 | 22 | ||
22 | #include <linux/freezer.h> | 23 | #include <linux/freezer.h> |
diff --git a/drivers/video/nvidia/nv_i2c.c b/drivers/video/nvidia/nv_i2c.c index 6aaddb4f6788..d7994a173245 100644 --- a/drivers/video/nvidia/nv_i2c.c +++ b/drivers/video/nvidia/nv_i2c.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/gfp.h> | ||
16 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
17 | #include <linux/fb.h> | 18 | #include <linux/fb.h> |
18 | 19 | ||
diff --git a/drivers/video/nvidia/nv_of.c b/drivers/video/nvidia/nv_of.c index 73afd7eb9977..3bc13df4b120 100644 --- a/drivers/video/nvidia/nv_of.c +++ b/drivers/video/nvidia/nv_of.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/gfp.h> | ||
16 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
17 | #include <linux/fb.h> | 18 | #include <linux/fb.h> |
18 | 19 | ||
diff --git a/drivers/video/nvidia/nv_setup.c b/drivers/video/nvidia/nv_setup.c index eef2bb298d9f..2f2e162134fa 100644 --- a/drivers/video/nvidia/nv_setup.c +++ b/drivers/video/nvidia/nv_setup.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <video/vga.h> | 50 | #include <video/vga.h> |
51 | #include <linux/delay.h> | 51 | #include <linux/delay.h> |
52 | #include <linux/pci.h> | 52 | #include <linux/pci.h> |
53 | #include <linux/slab.h> | ||
53 | #include "nv_type.h" | 54 | #include "nv_type.h" |
54 | #include "nv_local.h" | 55 | #include "nv_local.h" |
55 | #include "nv_proto.h" | 56 | #include "nv_proto.h" |
diff --git a/drivers/video/offb.c b/drivers/video/offb.c index b043ac83c412..61f8b8f919b0 100644 --- a/drivers/video/offb.c +++ b/drivers/video/offb.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/vmalloc.h> | 20 | #include <linux/vmalloc.h> |
22 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
23 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c index e192b058a688..529483467abf 100644 --- a/drivers/video/omap/dispc.c +++ b/drivers/video/omap/dispc.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include <plat/sram.h> | 30 | #include <plat/sram.h> |
30 | #include <plat/board.h> | 31 | #include <plat/board.h> |
diff --git a/drivers/video/omap/lcd_mipid.c b/drivers/video/omap/lcd_mipid.c index abe1c76a3257..64dcc7439c99 100644 --- a/drivers/video/omap/lcd_mipid.c +++ b/drivers/video/omap/lcd_mipid.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
24 | #include <linux/spi/spi.h> | 25 | #include <linux/spi/spi.h> |
25 | 26 | ||
diff --git a/drivers/video/omap/lcdc.c b/drivers/video/omap/lcdc.c index 9557f963662e..43ab7d8b66b2 100644 --- a/drivers/video/omap/lcdc.c +++ b/drivers/video/omap/lcdc.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/dma-mapping.h> | 28 | #include <linux/dma-mapping.h> |
29 | #include <linux/vmalloc.h> | 29 | #include <linux/vmalloc.h> |
30 | #include <linux/clk.h> | 30 | #include <linux/clk.h> |
31 | #include <linux/gfp.h> | ||
31 | 32 | ||
32 | #include <mach/lcdc.h> | 33 | #include <mach/lcdc.h> |
33 | #include <plat/dma.h> | 34 | #include <plat/dma.h> |
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c index 8ce60e1b220a..e264efd0278f 100644 --- a/drivers/video/omap/omapfb_main.c +++ b/drivers/video/omap/omapfb_main.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/uaccess.h> | 30 | #include <linux/uaccess.h> |
30 | 31 | ||
31 | #include <plat/dma.h> | 32 | #include <plat/dma.h> |
diff --git a/drivers/video/omap2/displays/panel-generic.c b/drivers/video/omap2/displays/panel-generic.c index c59e4baed8b2..300eff5de1b4 100644 --- a/drivers/video/omap2/displays/panel-generic.c +++ b/drivers/video/omap2/displays/panel-generic.c | |||
@@ -116,6 +116,24 @@ static int generic_panel_resume(struct omap_dss_device *dssdev) | |||
116 | return 0; | 116 | return 0; |
117 | } | 117 | } |
118 | 118 | ||
119 | static void generic_panel_set_timings(struct omap_dss_device *dssdev, | ||
120 | struct omap_video_timings *timings) | ||
121 | { | ||
122 | dpi_set_timings(dssdev, timings); | ||
123 | } | ||
124 | |||
125 | static void generic_panel_get_timings(struct omap_dss_device *dssdev, | ||
126 | struct omap_video_timings *timings) | ||
127 | { | ||
128 | *timings = dssdev->panel.timings; | ||
129 | } | ||
130 | |||
131 | static int generic_panel_check_timings(struct omap_dss_device *dssdev, | ||
132 | struct omap_video_timings *timings) | ||
133 | { | ||
134 | return dpi_check_timings(dssdev, timings); | ||
135 | } | ||
136 | |||
119 | static struct omap_dss_driver generic_driver = { | 137 | static struct omap_dss_driver generic_driver = { |
120 | .probe = generic_panel_probe, | 138 | .probe = generic_panel_probe, |
121 | .remove = generic_panel_remove, | 139 | .remove = generic_panel_remove, |
@@ -125,6 +143,10 @@ static struct omap_dss_driver generic_driver = { | |||
125 | .suspend = generic_panel_suspend, | 143 | .suspend = generic_panel_suspend, |
126 | .resume = generic_panel_resume, | 144 | .resume = generic_panel_resume, |
127 | 145 | ||
146 | .set_timings = generic_panel_set_timings, | ||
147 | .get_timings = generic_panel_get_timings, | ||
148 | .check_timings = generic_panel_check_timings, | ||
149 | |||
128 | .driver = { | 150 | .driver = { |
129 | .name = "generic_panel", | 151 | .name = "generic_panel", |
130 | .owner = THIS_MODULE, | 152 | .owner = THIS_MODULE, |
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index 59769e85d41c..4f3988a41082 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
31 | #include <linux/completion.h> | 31 | #include <linux/completion.h> |
32 | #include <linux/workqueue.h> | 32 | #include <linux/workqueue.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include <plat/display.h> | 35 | #include <plat/display.h> |
35 | 36 | ||
diff --git a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c index d578feee3550..e866e76b13d0 100644 --- a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c +++ b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/regulator/consumer.h> | 15 | #include <linux/regulator/consumer.h> |
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include <plat/display.h> | 20 | #include <plat/display.h> |
20 | 21 | ||
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 8254a4232a53..54344184dd73 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c | |||
@@ -590,6 +590,9 @@ int dss_init(bool skip_init) | |||
590 | } | 590 | } |
591 | } | 591 | } |
592 | 592 | ||
593 | dss.dsi_clk_source = DSS_SRC_DSS1_ALWON_FCLK; | ||
594 | dss.dispc_clk_source = DSS_SRC_DSS1_ALWON_FCLK; | ||
595 | |||
593 | dss_save_context(); | 596 | dss_save_context(); |
594 | 597 | ||
595 | rev = dss_read_reg(DSS_REVISION); | 598 | rev = dss_read_reg(DSS_REVISION); |
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index 9acef00c47ea..0820986d4a68 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #define DSS_SUBSYS_NAME "MANAGER" | 23 | #define DSS_SUBSYS_NAME "MANAGER" |
24 | 24 | ||
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/module.h> | 27 | #include <linux/module.h> |
27 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
28 | #include <linux/spinlock.h> | 29 | #include <linux/spinlock.h> |
diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c index aed3f3194347..82336583adef 100644 --- a/drivers/video/omap2/dss/overlay.c +++ b/drivers/video/omap2/dss/overlay.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/kobject.h> | 29 | #include <linux/kobject.h> |
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <plat/display.h> | 34 | #include <plat/display.h> |
34 | #include <plat/cpu.h> | 35 | #include <plat/cpu.h> |
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 4a76917b7cc8..4b4506da96da 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/fb.h> | 26 | #include <linux/fb.h> |
26 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
27 | #include <linux/vmalloc.h> | 28 | #include <linux/vmalloc.h> |
diff --git a/drivers/video/omap2/vram.c b/drivers/video/omap2/vram.c index 55a4de5e5d10..3b1237ad85ed 100644 --- a/drivers/video/omap2/vram.c +++ b/drivers/video/omap2/vram.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/list.h> | 25 | #include <linux/list.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/seq_file.h> | 27 | #include <linux/seq_file.h> |
27 | #include <linux/bootmem.h> | 28 | #include <linux/bootmem.h> |
28 | #include <linux/completion.h> | 29 | #include <linux/completion.h> |
@@ -511,13 +512,14 @@ static u32 omap_vram_sdram_size __initdata; | |||
511 | static u32 omap_vram_def_sdram_size __initdata; | 512 | static u32 omap_vram_def_sdram_size __initdata; |
512 | static u32 omap_vram_def_sdram_start __initdata; | 513 | static u32 omap_vram_def_sdram_start __initdata; |
513 | 514 | ||
514 | static void __init omap_vram_early_vram(char **p) | 515 | static int __init omap_vram_early_vram(char *p) |
515 | { | 516 | { |
516 | omap_vram_def_sdram_size = memparse(*p, p); | 517 | omap_vram_def_sdram_size = memparse(p, &p); |
517 | if (**p == ',') | 518 | if (*p == ',') |
518 | omap_vram_def_sdram_start = simple_strtoul((*p) + 1, p, 16); | 519 | omap_vram_def_sdram_start = simple_strtoul(p + 1, &p, 16); |
520 | return 0; | ||
519 | } | 521 | } |
520 | __early_param("vram=", omap_vram_early_vram); | 522 | early_param("vram", omap_vram_early_vram); |
521 | 523 | ||
522 | /* | 524 | /* |
523 | * Called from map_io. We need to call to this early enough so that we | 525 | * Called from map_io. We need to call to this early enough so that we |
diff --git a/drivers/video/output.c b/drivers/video/output.c index 5137aa016b83..0d6f2cda9369 100644 --- a/drivers/video/output.c +++ b/drivers/video/output.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/video_output.h> | 25 | #include <linux/video_output.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/err.h> | 27 | #include <linux/err.h> |
27 | #include <linux/ctype.h> | 28 | #include <linux/ctype.h> |
28 | 29 | ||
diff --git a/drivers/video/p9100.c b/drivers/video/p9100.c index 7fa4ab01b0d3..81440f2b9091 100644 --- a/drivers/video/p9100.c +++ b/drivers/video/p9100.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c index 0a366d86f08e..8a204e7a5b5b 100644 --- a/drivers/video/platinumfb.c +++ b/drivers/video/platinumfb.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
29 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
30 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
diff --git a/drivers/video/pmag-aa-fb.c b/drivers/video/pmag-aa-fb.c index 6515ec11c16b..838424817de2 100644 --- a/drivers/video/pmag-aa-fb.c +++ b/drivers/video/pmag-aa-fb.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/string.h> | 28 | #include <linux/string.h> |
29 | #include <linux/timer.h> | 29 | #include <linux/timer.h> |
30 | #include <linux/mm.h> | 30 | #include <linux/mm.h> |
31 | #include <linux/slab.h> | ||
32 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
34 | #include <linux/fb.h> | 33 | #include <linux/fb.h> |
diff --git a/drivers/video/pnx4008/pnxrgbfb.c b/drivers/video/pnx4008/pnxrgbfb.c index 4db6b48a8715..b2252fea2858 100644 --- a/drivers/video/pnx4008/pnxrgbfb.c +++ b/drivers/video/pnx4008/pnxrgbfb.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/string.h> | 19 | #include <linux/string.h> |
20 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
21 | #include <linux/slab.h> | ||
22 | #include <linux/vmalloc.h> | 21 | #include <linux/vmalloc.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
24 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
diff --git a/drivers/video/pnx4008/sdum.c b/drivers/video/pnx4008/sdum.c index 2aa09bce3944..5ec4f2d439c9 100644 --- a/drivers/video/pnx4008/sdum.c +++ b/drivers/video/pnx4008/sdum.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/tty.h> | 22 | #include <linux/tty.h> |
23 | #include <linux/slab.h> | ||
24 | #include <linux/vmalloc.h> | 23 | #include <linux/vmalloc.h> |
25 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
26 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
@@ -29,6 +28,7 @@ | |||
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
30 | #include <linux/dma-mapping.h> | 29 | #include <linux/dma-mapping.h> |
31 | #include <linux/clk.h> | 30 | #include <linux/clk.h> |
31 | #include <linux/gfp.h> | ||
32 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
33 | #include <mach/gpio.h> | 33 | #include <mach/gpio.h> |
34 | 34 | ||
diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c index 75285d3f393c..c91a7f70f7b0 100644 --- a/drivers/video/pxa168fb.c +++ b/drivers/video/pxa168fb.c | |||
@@ -668,7 +668,7 @@ static int __init pxa168fb_probe(struct platform_device *pdev) | |||
668 | /* | 668 | /* |
669 | * Map LCD controller registers. | 669 | * Map LCD controller registers. |
670 | */ | 670 | */ |
671 | fbi->reg_base = ioremap_nocache(res->start, res->end - res->start); | 671 | fbi->reg_base = ioremap_nocache(res->start, resource_size(res)); |
672 | if (fbi->reg_base == NULL) { | 672 | if (fbi->reg_base == NULL) { |
673 | ret = -ENOMEM; | 673 | ret = -ENOMEM; |
674 | goto failed; | 674 | goto failed; |
diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c index de40a626dc76..fc32c323a381 100644 --- a/drivers/video/q40fb.c +++ b/drivers/video/q40fb.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
19 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
20 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c index 7b63429f1a7c..a6247fc081ab 100644 --- a/drivers/video/s1d13xxxfb.c +++ b/drivers/video/s1d13xxxfb.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/fb.h> | 31 | #include <linux/fb.h> |
32 | #include <linux/spinlock_types.h> | 32 | #include <linux/spinlock_types.h> |
33 | #include <linux/spinlock.h> | 33 | #include <linux/spinlock.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include <asm/io.h> | 36 | #include <asm/io.h> |
36 | 37 | ||
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 53cb722c45a0..9682ecc60e12 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c | |||
@@ -16,8 +16,8 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/dma-mapping.h> | 18 | #include <linux/dma-mapping.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/init.h> | 20 | #include <linux/init.h> |
20 | #include <linux/gfp.h> | ||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/fb.h> | 22 | #include <linux/fb.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c index c3fad34309ed..d4471b4c0374 100644 --- a/drivers/video/s3fb.c +++ b/drivers/video/s3fb.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/tty.h> | 19 | #include <linux/tty.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
22 | #include <linux/fb.h> | 21 | #include <linux/fb.h> |
23 | #include <linux/svga.h> | 22 | #include <linux/svga.h> |
diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c index 574b29e9f8f2..ed371c868b3a 100644 --- a/drivers/video/savage/savagefb-i2c.c +++ b/drivers/video/savage/savagefb-i2c.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/gfp.h> | ||
16 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
17 | #include <linux/fb.h> | 18 | #include <linux/fb.h> |
18 | 19 | ||
diff --git a/drivers/video/sh7760fb.c b/drivers/video/sh7760fb.c index 9f6d6e61f0cc..bea38fce2470 100644 --- a/drivers/video/sh7760fb.c +++ b/drivers/video/sh7760fb.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <asm/sh7760fb.h> | 31 | #include <asm/sh7760fb.h> |
31 | 32 | ||
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index bbd1dbf4026a..e14bd0749129 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/vmalloc.h> | 21 | #include <linux/vmalloc.h> |
22 | #include <linux/ioctl.h> | 22 | #include <linux/ioctl.h> |
23 | #include <linux/slab.h> | ||
23 | #include <video/sh_mobile_lcdc.h> | 24 | #include <video/sh_mobile_lcdc.h> |
24 | #include <asm/atomic.h> | 25 | #include <asm/atomic.h> |
25 | 26 | ||
diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c index 79840f11fecb..dee64c3b1e67 100644 --- a/drivers/video/sstfb.c +++ b/drivers/video/sstfb.c | |||
@@ -86,7 +86,6 @@ | |||
86 | #include <linux/pci.h> | 86 | #include <linux/pci.h> |
87 | #include <linux/delay.h> | 87 | #include <linux/delay.h> |
88 | #include <linux/init.h> | 88 | #include <linux/init.h> |
89 | #include <linux/slab.h> | ||
90 | #include <asm/io.h> | 89 | #include <asm/io.h> |
91 | #include <linux/uaccess.h> | 90 | #include <linux/uaccess.h> |
92 | #include <video/sstfb.h> | 91 | #include <video/sstfb.h> |
diff --git a/drivers/video/sunxvr1000.c b/drivers/video/sunxvr1000.c index a8248c0b9192..23e69e834a18 100644 --- a/drivers/video/sunxvr1000.c +++ b/drivers/video/sunxvr1000.c | |||
@@ -5,7 +5,6 @@ | |||
5 | 5 | ||
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/slab.h> | ||
9 | #include <linux/fb.h> | 8 | #include <linux/fb.h> |
10 | #include <linux/init.h> | 9 | #include <linux/init.h> |
11 | #include <linux/of_device.h> | 10 | #include <linux/of_device.h> |
diff --git a/drivers/video/sunxvr2500.c b/drivers/video/sunxvr2500.c index b1dde09e7015..5848436c19da 100644 --- a/drivers/video/sunxvr2500.c +++ b/drivers/video/sunxvr2500.c | |||
@@ -5,7 +5,6 @@ | |||
5 | 5 | ||
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/slab.h> | ||
9 | #include <linux/fb.h> | 8 | #include <linux/fb.h> |
10 | #include <linux/pci.h> | 9 | #include <linux/pci.h> |
11 | #include <linux/init.h> | 10 | #include <linux/init.h> |
diff --git a/drivers/video/sunxvr500.c b/drivers/video/sunxvr500.c index 4cd50497264d..b9c2b948d34d 100644 --- a/drivers/video/sunxvr500.c +++ b/drivers/video/sunxvr500.c | |||
@@ -5,7 +5,6 @@ | |||
5 | 5 | ||
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
8 | #include <linux/slab.h> | ||
9 | #include <linux/fb.h> | 8 | #include <linux/fb.h> |
10 | #include <linux/pci.h> | 9 | #include <linux/pci.h> |
11 | #include <linux/init.h> | 10 | #include <linux/init.h> |
@@ -242,11 +241,27 @@ static int __devinit e3d_set_fbinfo(struct e3d_info *ep) | |||
242 | static int __devinit e3d_pci_register(struct pci_dev *pdev, | 241 | static int __devinit e3d_pci_register(struct pci_dev *pdev, |
243 | const struct pci_device_id *ent) | 242 | const struct pci_device_id *ent) |
244 | { | 243 | { |
244 | struct device_node *of_node; | ||
245 | const char *device_type; | ||
245 | struct fb_info *info; | 246 | struct fb_info *info; |
246 | struct e3d_info *ep; | 247 | struct e3d_info *ep; |
247 | unsigned int line_length; | 248 | unsigned int line_length; |
248 | int err; | 249 | int err; |
249 | 250 | ||
251 | of_node = pci_device_to_OF_node(pdev); | ||
252 | if (!of_node) { | ||
253 | printk(KERN_ERR "e3d: Cannot find OF node of %s\n", | ||
254 | pci_name(pdev)); | ||
255 | return -ENODEV; | ||
256 | } | ||
257 | |||
258 | device_type = of_get_property(of_node, "device_type", NULL); | ||
259 | if (!device_type) { | ||
260 | printk(KERN_INFO "e3d: Ignoring secondary output device " | ||
261 | "at %s\n", pci_name(pdev)); | ||
262 | return -ENODEV; | ||
263 | } | ||
264 | |||
250 | err = pci_enable_device(pdev); | 265 | err = pci_enable_device(pdev); |
251 | if (err < 0) { | 266 | if (err < 0) { |
252 | printk(KERN_ERR "e3d: Cannot enable PCI device %s\n", | 267 | printk(KERN_ERR "e3d: Cannot enable PCI device %s\n", |
@@ -265,13 +280,7 @@ static int __devinit e3d_pci_register(struct pci_dev *pdev, | |||
265 | ep->info = info; | 280 | ep->info = info; |
266 | ep->pdev = pdev; | 281 | ep->pdev = pdev; |
267 | spin_lock_init(&ep->lock); | 282 | spin_lock_init(&ep->lock); |
268 | ep->of_node = pci_device_to_OF_node(pdev); | 283 | ep->of_node = of_node; |
269 | if (!ep->of_node) { | ||
270 | printk(KERN_ERR "e3d: Cannot find OF node of %s\n", | ||
271 | pci_name(pdev)); | ||
272 | err = -ENODEV; | ||
273 | goto err_release_fb; | ||
274 | } | ||
275 | 284 | ||
276 | /* Read the PCI base register of the frame buffer, which we | 285 | /* Read the PCI base register of the frame buffer, which we |
277 | * need in order to interpret the RAMDAC_VID_*FB* values in | 286 | * need in order to interpret the RAMDAC_VID_*FB* values in |
diff --git a/drivers/video/svgalib.c b/drivers/video/svgalib.c index 9c7106701572..fdb45674e2f6 100644 --- a/drivers/video/svgalib.c +++ b/drivers/video/svgalib.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/fb.h> | 16 | #include <linux/fb.h> |
17 | #include <linux/svga.h> | 17 | #include <linux/svga.h> |
18 | #include <linux/slab.h> | ||
19 | #include <asm/types.h> | 18 | #include <asm/types.h> |
20 | #include <asm/io.h> | 19 | #include <asm/io.h> |
21 | 20 | ||
diff --git a/drivers/video/syscopyarea.c b/drivers/video/syscopyarea.c index a352d5f46bbf..844a32fd38ed 100644 --- a/drivers/video/syscopyarea.c +++ b/drivers/video/syscopyarea.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/fb.h> | 18 | #include <linux/fb.h> |
19 | #include <linux/slab.h> | ||
20 | #include <asm/types.h> | 19 | #include <asm/types.h> |
21 | #include <asm/io.h> | 20 | #include <asm/io.h> |
22 | #include "fb_draw.h" | 21 | #include "fb_draw.h" |
diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c index 45b883598bf0..c0c2b18fcdcf 100644 --- a/drivers/video/tcx.c +++ b/drivers/video/tcx.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
18 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c index a86046ff60ad..1b3b1c718e80 100644 --- a/drivers/video/tgafb.c +++ b/drivers/video/tgafb.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/pci.h> | 26 | #include <linux/pci.h> |
27 | #include <linux/selection.h> | 27 | #include <linux/selection.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/string.h> | 28 | #include <linux/string.h> |
30 | #include <linux/tc.h> | 29 | #include <linux/tc.h> |
31 | 30 | ||
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c index 03a9c35e9f55..c6c77562839d 100644 --- a/drivers/video/tridentfb.c +++ b/drivers/video/tridentfb.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/fb.h> | 19 | #include <linux/fb.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
24 | #include <video/vga.h> | 25 | #include <video/vga.h> |
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index 54fbb2995a5f..7b8839ebf3c4 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/fb.h> | 18 | #include <linux/fb.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
21 | #include <linux/slab.h> | ||
21 | #include <video/edid.h> | 22 | #include <video/edid.h> |
22 | #include <video/uvesafb.h> | 23 | #include <video/uvesafb.h> |
23 | #ifdef CONFIG_X86 | 24 | #ifdef CONFIG_X86 |
diff --git a/drivers/video/vermilion/vermilion.c b/drivers/video/vermilion/vermilion.c index c18f1884b550..931a567f9aff 100644 --- a/drivers/video/vermilion/vermilion.c +++ b/drivers/video/vermilion/vermilion.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
34 | #include <linux/string.h> | 34 | #include <linux/string.h> |
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/mm.h> | 37 | #include <linux/mm.h> |
37 | #include <linux/fb.h> | 38 | #include <linux/fb.h> |
38 | #include <linux/pci.h> | 39 | #include <linux/pci.h> |
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c index ef4128c8e57a..0cadf7aee27e 100644 --- a/drivers/video/vesafb.c +++ b/drivers/video/vesafb.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
18 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
19 | #include <linux/ioport.h> | 18 | #include <linux/ioport.h> |
@@ -226,7 +225,7 @@ static int __init vesafb_setup(char *options) | |||
226 | return 0; | 225 | return 0; |
227 | } | 226 | } |
228 | 227 | ||
229 | static int __devinit vesafb_probe(struct platform_device *dev) | 228 | static int __init vesafb_probe(struct platform_device *dev) |
230 | { | 229 | { |
231 | struct fb_info *info; | 230 | struct fb_info *info; |
232 | int i, err; | 231 | int i, err; |
@@ -477,7 +476,6 @@ err: | |||
477 | } | 476 | } |
478 | 477 | ||
479 | static struct platform_driver vesafb_driver = { | 478 | static struct platform_driver vesafb_driver = { |
480 | .probe = vesafb_probe, | ||
481 | .driver = { | 479 | .driver = { |
482 | .name = "vesafb", | 480 | .name = "vesafb", |
483 | }, | 481 | }, |
@@ -493,20 +491,21 @@ static int __init vesafb_init(void) | |||
493 | /* ignore error return of fb_get_options */ | 491 | /* ignore error return of fb_get_options */ |
494 | fb_get_options("vesafb", &option); | 492 | fb_get_options("vesafb", &option); |
495 | vesafb_setup(option); | 493 | vesafb_setup(option); |
496 | ret = platform_driver_register(&vesafb_driver); | ||
497 | 494 | ||
498 | if (!ret) { | 495 | vesafb_device = platform_device_alloc("vesafb", 0); |
499 | vesafb_device = platform_device_alloc("vesafb", 0); | 496 | if (!vesafb_device) |
497 | return -ENOMEM; | ||
500 | 498 | ||
501 | if (vesafb_device) | 499 | ret = platform_device_add(vesafb_device); |
502 | ret = platform_device_add(vesafb_device); | 500 | if (!ret) { |
503 | else | 501 | ret = platform_driver_probe(&vesafb_driver, vesafb_probe); |
504 | ret = -ENOMEM; | 502 | if (ret) |
503 | platform_device_del(vesafb_device); | ||
504 | } | ||
505 | 505 | ||
506 | if (ret) { | 506 | if (ret) { |
507 | platform_device_put(vesafb_device); | 507 | platform_device_put(vesafb_device); |
508 | platform_driver_unregister(&vesafb_driver); | 508 | vesafb_device = NULL; |
509 | } | ||
510 | } | 509 | } |
511 | 510 | ||
512 | return ret; | 511 | return ret; |
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c index b8ab995fbda7..9b5532b4de35 100644 --- a/drivers/video/vfb.c +++ b/drivers/video/vfb.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
20 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
21 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c index 76d8dae5b1bb..bf638a47a5b3 100644 --- a/drivers/video/vga16fb.c +++ b/drivers/video/vga16fb.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
20 | #include <linux/fb.h> | 19 | #include <linux/fb.h> |
21 | #include <linux/ioport.h> | 20 | #include <linux/ioport.h> |
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index ce7783b63f6a..777b38a06d40 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/seq_file.h> | 23 | #include <linux/seq_file.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/stat.h> | 25 | #include <linux/stat.h> |
25 | #define _MASTER_FILE | 26 | #define _MASTER_FILE |
26 | 27 | ||
diff --git a/drivers/video/vt8623fb.c b/drivers/video/vt8623fb.c index 65ccd215d496..d31dc96f838a 100644 --- a/drivers/video/vt8623fb.c +++ b/drivers/video/vt8623fb.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/tty.h> | 20 | #include <linux/tty.h> |
21 | #include <linux/slab.h> | ||
22 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
23 | #include <linux/fb.h> | 22 | #include <linux/fb.h> |
24 | #include <linux/svga.h> | 23 | #include <linux/svga.h> |
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c index 5d223959778a..31b0e17ed090 100644 --- a/drivers/video/w100fb.c +++ b/drivers/video/w100fb.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/string.h> | 34 | #include <linux/string.h> |
34 | #include <linux/vmalloc.h> | 35 | #include <linux/vmalloc.h> |
35 | #include <asm/io.h> | 36 | #include <asm/io.h> |
diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c index 603598f4dbb1..fa97d3e7c21a 100644 --- a/drivers/video/xen-fbfront.c +++ b/drivers/video/xen-fbfront.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
24 | #include <linux/fb.h> | 24 | #include <linux/fb.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
27 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
28 | 29 | ||
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c index ed7c8d0ddccb..3fcb83f03881 100644 --- a/drivers/video/xilinxfb.c +++ b/drivers/video/xilinxfb.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/of_platform.h> | 34 | #include <linux/of_platform.h> |
35 | #include <linux/io.h> | 35 | #include <linux/io.h> |
36 | #include <linux/xilinxfb.h> | 36 | #include <linux/xilinxfb.h> |
37 | #include <linux/slab.h> | ||
37 | #include <asm/dcr.h> | 38 | #include <asm/dcr.h> |
38 | 39 | ||
39 | #define DRIVER_NAME "xilinxfb" | 40 | #define DRIVER_NAME "xilinxfb" |
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 369f2eebbad1..3aed38886f94 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/kthread.h> | 24 | #include <linux/kthread.h> |
25 | #include <linux/freezer.h> | 25 | #include <linux/freezer.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | struct virtio_balloon | 29 | struct virtio_balloon |
29 | { | 30 | { |
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 625447f645d9..24747aef1952 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
21 | #include <linux/virtio.h> | 22 | #include <linux/virtio.h> |
22 | #include <linux/virtio_config.h> | 23 | #include <linux/virtio_config.h> |
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 0db906b3c95d..0f90634bcb85 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/virtio_ring.h> | 20 | #include <linux/virtio_ring.h> |
21 | #include <linux/virtio_config.h> | 21 | #include <linux/virtio_config.h> |
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | /* virtio guest is communicating with a virtual "device" that actually runs on | 25 | /* virtio guest is communicating with a virtual "device" that actually runs on |
25 | * a host processor. Memory barriers are used to control SMP effects. */ | 26 | * a host processor. Memory barriers are used to control SMP effects. */ |
diff --git a/drivers/vlynq/vlynq.c b/drivers/vlynq/vlynq.c index 9554ad5f9af7..f2d9e667972d 100644 --- a/drivers/vlynq/vlynq.c +++ b/drivers/vlynq/vlynq.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include <linux/vlynq.h> | 35 | #include <linux/vlynq.h> |
35 | 36 | ||
diff --git a/drivers/w1/masters/ds1wm.c b/drivers/w1/masters/ds1wm.c index 37f08c850608..6b85e7fefa43 100644 --- a/drivers/w1/masters/ds1wm.c +++ b/drivers/w1/masters/ds1wm.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/mfd/core.h> | 21 | #include <linux/mfd/core.h> |
22 | #include <linux/mfd/ds1wm.h> | 22 | #include <linux/mfd/ds1wm.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
25 | 26 | ||
diff --git a/drivers/w1/masters/ds2490.c b/drivers/w1/masters/ds2490.c index 59ad6e95af8f..02bf7bf7160b 100644 --- a/drivers/w1/masters/ds2490.c +++ b/drivers/w1/masters/ds2490.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/mod_devicetable.h> | 24 | #include <linux/mod_devicetable.h> |
25 | #include <linux/usb.h> | 25 | #include <linux/usb.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "../w1_int.h" | 28 | #include "../w1_int.h" |
28 | #include "../w1.h" | 29 | #include "../w1.h" |
diff --git a/drivers/w1/masters/mxc_w1.c b/drivers/w1/masters/mxc_w1.c index 492670358cbf..a3b6a74c67a7 100644 --- a/drivers/w1/masters/mxc_w1.c +++ b/drivers/w1/masters/mxc_w1.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
25 | #include <linux/io.h> | 26 | #include <linux/io.h> |
26 | 27 | ||
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index 22977d30f89e..ef36fca2eed4 100644 --- a/drivers/w1/masters/omap_hdq.c +++ b/drivers/w1/masters/omap_hdq.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/err.h> | 16 | #include <linux/err.h> |
16 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
17 | #include <linux/io.h> | 18 | #include <linux/io.h> |
diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c index 6f8866d6a905..fcbe742188a5 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/w1-gpio.h> | 15 | #include <linux/w1-gpio.h> |
15 | 16 | ||
16 | #include "../w1.h" | 17 | #include "../w1.h" |
diff --git a/drivers/w1/slaves/w1_ds2433.c b/drivers/w1/slaves/w1_ds2433.c index 139447148822..d2bf32118a98 100644 --- a/drivers/w1/slaves/w1_ds2433.c +++ b/drivers/w1/slaves/w1_ds2433.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/slab.h> | ||
16 | #ifdef CONFIG_W1_SLAVE_DS2433_CRC | 17 | #ifdef CONFIG_W1_SLAVE_DS2433_CRC |
17 | #include <linux/crc16.h> | 18 | #include <linux/crc16.h> |
18 | 19 | ||
diff --git a/drivers/w1/slaves/w1_ds2760.c b/drivers/w1/slaves/w1_ds2760.c index 59f708efe25f..6e153343e117 100644 --- a/drivers/w1/slaves/w1_ds2760.c +++ b/drivers/w1/slaves/w1_ds2760.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | #include <linux/idr.h> | 18 | #include <linux/idr.h> |
19 | #include <linux/gfp.h> | ||
19 | 20 | ||
20 | #include "../w1.h" | 21 | #include "../w1.h" |
21 | #include "../w1_int.h" | 22 | #include "../w1_int.h" |
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c index 4a46ed58ece9..b50be3f1073d 100644 --- a/drivers/w1/w1_int.c +++ b/drivers/w1/w1_int.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/list.h> | 23 | #include <linux/list.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/kthread.h> | 25 | #include <linux/kthread.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "w1.h" | 28 | #include "w1.h" |
28 | #include "w1_log.h" | 29 | #include "w1_log.h" |
diff --git a/drivers/w1/w1_netlink.c b/drivers/w1/w1_netlink.c index 45c126fea31d..7e667bc77ef2 100644 --- a/drivers/w1/w1_netlink.c +++ b/drivers/w1/w1_netlink.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/slab.h> | ||
22 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
23 | #include <linux/netlink.h> | 24 | #include <linux/netlink.h> |
24 | #include <linux/connector.h> | 25 | #include <linux/connector.h> |
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index bdcdbd53da89..0e8468ffd100 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
@@ -55,11 +55,6 @@ config SOFT_WATCHDOG | |||
55 | To compile this driver as a module, choose M here: the | 55 | To compile this driver as a module, choose M here: the |
56 | module will be called softdog. | 56 | module will be called softdog. |
57 | 57 | ||
58 | config MAX63XX_WATCHDOG | ||
59 | tristate "Max63xx watchdog" | ||
60 | help | ||
61 | Support for memory mapped max63{69,70,71,72,73,74} watchdog timer. | ||
62 | |||
63 | config WM831X_WATCHDOG | 58 | config WM831X_WATCHDOG |
64 | tristate "WM831x watchdog" | 59 | tristate "WM831x watchdog" |
65 | depends on MFD_WM831X | 60 | depends on MFD_WM831X |
@@ -305,6 +300,12 @@ config TS72XX_WATCHDOG | |||
305 | To compile this driver as a module, choose M here: the | 300 | To compile this driver as a module, choose M here: the |
306 | module will be called ts72xx_wdt. | 301 | module will be called ts72xx_wdt. |
307 | 302 | ||
303 | config MAX63XX_WATCHDOG | ||
304 | tristate "Max63xx watchdog" | ||
305 | depends on ARM | ||
306 | help | ||
307 | Support for memory mapped max63{69,70,71,72,73,74} watchdog timer. | ||
308 | |||
308 | # AVR32 Architecture | 309 | # AVR32 Architecture |
309 | 310 | ||
310 | config AT32AP700X_WDT | 311 | config AT32AP700X_WDT |
diff --git a/drivers/watchdog/adx_wdt.c b/drivers/watchdog/adx_wdt.c index a5ca7a6ee133..af6e6b16475a 100644 --- a/drivers/watchdog/adx_wdt.c +++ b/drivers/watchdog/adx_wdt.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
10 | #include <linux/gfp.h> | ||
10 | #include <linux/io.h> | 11 | #include <linux/io.h> |
11 | #include <linux/miscdevice.h> | 12 | #include <linux/miscdevice.h> |
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
diff --git a/drivers/watchdog/at32ap700x_wdt.c b/drivers/watchdog/at32ap700x_wdt.c index 6873376f986c..1cddf92cb9a6 100644 --- a/drivers/watchdog/at32ap700x_wdt.c +++ b/drivers/watchdog/at32ap700x_wdt.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/uaccess.h> | 32 | #include <linux/uaccess.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <linux/spinlock.h> | 34 | #include <linux/spinlock.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #define TIMEOUT_MIN 1 | 37 | #define TIMEOUT_MIN 1 |
37 | #define TIMEOUT_MAX 2 | 38 | #define TIMEOUT_MAX 2 |
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index 37ea052d4dee..ba2efce4b40e 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/ioport.h> | 25 | #include <linux/ioport.h> |
26 | #include <linux/timer.h> | 26 | #include <linux/timer.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/smp_lock.h> | 28 | #include <linux/smp_lock.h> |
28 | #include <linux/io.h> | 29 | #include <linux/io.h> |
29 | #include <linux/of.h> | 30 | #include <linux/of.h> |
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c index 56162c87f5d8..596ba604e78d 100644 --- a/drivers/watchdog/davinci_wdt.c +++ b/drivers/watchdog/davinci_wdt.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/device.h> | 27 | #include <linux/device.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #define MODULE_NAME "DAVINCI-WDT: " | 31 | #define MODULE_NAME "DAVINCI-WDT: " |
31 | 32 | ||
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 70c2c24660d0..809e7167a624 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <linux/efi.h> | 39 | #include <linux/efi.h> |
40 | #include <linux/string.h> | 40 | #include <linux/string.h> |
41 | #include <linux/bootmem.h> | 41 | #include <linux/bootmem.h> |
42 | #include <linux/slab.h> | ||
43 | #include <asm/desc.h> | 42 | #include <asm/desc.h> |
44 | #include <asm/cacheflush.h> | 43 | #include <asm/cacheflush.h> |
45 | 44 | ||
@@ -443,7 +442,7 @@ static void hpwdt_ping(void) | |||
443 | static int hpwdt_change_timer(int new_margin) | 442 | static int hpwdt_change_timer(int new_margin) |
444 | { | 443 | { |
445 | /* Arbitrary, can't find the card's limits */ | 444 | /* Arbitrary, can't find the card's limits */ |
446 | if (new_margin < 30 || new_margin > 600) { | 445 | if (new_margin < 5 || new_margin > 600) { |
447 | printk(KERN_WARNING | 446 | printk(KERN_WARNING |
448 | "hpwdt: New value passed in is invalid: %d seconds.\n", | 447 | "hpwdt: New value passed in is invalid: %d seconds.\n", |
449 | new_margin); | 448 | new_margin); |
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c index 44bc6aa46edf..8da886035374 100644 --- a/drivers/watchdog/iTCO_wdt.c +++ b/drivers/watchdog/iTCO_wdt.c | |||
@@ -115,8 +115,37 @@ enum iTCO_chipsets { | |||
115 | TCO_3420, /* 3420 */ | 115 | TCO_3420, /* 3420 */ |
116 | TCO_3450, /* 3450 */ | 116 | TCO_3450, /* 3450 */ |
117 | TCO_EP80579, /* EP80579 */ | 117 | TCO_EP80579, /* EP80579 */ |
118 | TCO_CPTD, /* CPT Desktop */ | 118 | TCO_CPT1, /* Cougar Point */ |
119 | TCO_CPTM, /* CPT Mobile */ | 119 | TCO_CPT2, /* Cougar Point Desktop */ |
120 | TCO_CPT3, /* Cougar Point Mobile */ | ||
121 | TCO_CPT4, /* Cougar Point */ | ||
122 | TCO_CPT5, /* Cougar Point */ | ||
123 | TCO_CPT6, /* Cougar Point */ | ||
124 | TCO_CPT7, /* Cougar Point */ | ||
125 | TCO_CPT8, /* Cougar Point */ | ||
126 | TCO_CPT9, /* Cougar Point */ | ||
127 | TCO_CPT10, /* Cougar Point */ | ||
128 | TCO_CPT11, /* Cougar Point */ | ||
129 | TCO_CPT12, /* Cougar Point */ | ||
130 | TCO_CPT13, /* Cougar Point */ | ||
131 | TCO_CPT14, /* Cougar Point */ | ||
132 | TCO_CPT15, /* Cougar Point */ | ||
133 | TCO_CPT16, /* Cougar Point */ | ||
134 | TCO_CPT17, /* Cougar Point */ | ||
135 | TCO_CPT18, /* Cougar Point */ | ||
136 | TCO_CPT19, /* Cougar Point */ | ||
137 | TCO_CPT20, /* Cougar Point */ | ||
138 | TCO_CPT21, /* Cougar Point */ | ||
139 | TCO_CPT22, /* Cougar Point */ | ||
140 | TCO_CPT23, /* Cougar Point */ | ||
141 | TCO_CPT24, /* Cougar Point */ | ||
142 | TCO_CPT25, /* Cougar Point */ | ||
143 | TCO_CPT26, /* Cougar Point */ | ||
144 | TCO_CPT27, /* Cougar Point */ | ||
145 | TCO_CPT28, /* Cougar Point */ | ||
146 | TCO_CPT29, /* Cougar Point */ | ||
147 | TCO_CPT30, /* Cougar Point */ | ||
148 | TCO_CPT31, /* Cougar Point */ | ||
120 | }; | 149 | }; |
121 | 150 | ||
122 | static struct { | 151 | static struct { |
@@ -173,8 +202,37 @@ static struct { | |||
173 | {"3420", 2}, | 202 | {"3420", 2}, |
174 | {"3450", 2}, | 203 | {"3450", 2}, |
175 | {"EP80579", 2}, | 204 | {"EP80579", 2}, |
176 | {"CPT Desktop", 2}, | 205 | {"Cougar Point", 2}, |
177 | {"CPT Mobile", 2}, | 206 | {"Cougar Point", 2}, |
207 | {"Cougar Point", 2}, | ||
208 | {"Cougar Point", 2}, | ||
209 | {"Cougar Point", 2}, | ||
210 | {"Cougar Point", 2}, | ||
211 | {"Cougar Point", 2}, | ||
212 | {"Cougar Point", 2}, | ||
213 | {"Cougar Point", 2}, | ||
214 | {"Cougar Point", 2}, | ||
215 | {"Cougar Point", 2}, | ||
216 | {"Cougar Point", 2}, | ||
217 | {"Cougar Point", 2}, | ||
218 | {"Cougar Point", 2}, | ||
219 | {"Cougar Point", 2}, | ||
220 | {"Cougar Point", 2}, | ||
221 | {"Cougar Point", 2}, | ||
222 | {"Cougar Point", 2}, | ||
223 | {"Cougar Point", 2}, | ||
224 | {"Cougar Point", 2}, | ||
225 | {"Cougar Point", 2}, | ||
226 | {"Cougar Point", 2}, | ||
227 | {"Cougar Point", 2}, | ||
228 | {"Cougar Point", 2}, | ||
229 | {"Cougar Point", 2}, | ||
230 | {"Cougar Point", 2}, | ||
231 | {"Cougar Point", 2}, | ||
232 | {"Cougar Point", 2}, | ||
233 | {"Cougar Point", 2}, | ||
234 | {"Cougar Point", 2}, | ||
235 | {"Cougar Point", 2}, | ||
178 | {NULL, 0} | 236 | {NULL, 0} |
179 | }; | 237 | }; |
180 | 238 | ||
@@ -259,8 +317,37 @@ static struct pci_device_id iTCO_wdt_pci_tbl[] = { | |||
259 | { ITCO_PCI_DEVICE(0x3b14, TCO_3420)}, | 317 | { ITCO_PCI_DEVICE(0x3b14, TCO_3420)}, |
260 | { ITCO_PCI_DEVICE(0x3b16, TCO_3450)}, | 318 | { ITCO_PCI_DEVICE(0x3b16, TCO_3450)}, |
261 | { ITCO_PCI_DEVICE(0x5031, TCO_EP80579)}, | 319 | { ITCO_PCI_DEVICE(0x5031, TCO_EP80579)}, |
262 | { ITCO_PCI_DEVICE(0x1c42, TCO_CPTD)}, | 320 | { ITCO_PCI_DEVICE(0x1c41, TCO_CPT1)}, |
263 | { ITCO_PCI_DEVICE(0x1c43, TCO_CPTM)}, | 321 | { ITCO_PCI_DEVICE(0x1c42, TCO_CPT2)}, |
322 | { ITCO_PCI_DEVICE(0x1c43, TCO_CPT3)}, | ||
323 | { ITCO_PCI_DEVICE(0x1c44, TCO_CPT4)}, | ||
324 | { ITCO_PCI_DEVICE(0x1c45, TCO_CPT5)}, | ||
325 | { ITCO_PCI_DEVICE(0x1c46, TCO_CPT6)}, | ||
326 | { ITCO_PCI_DEVICE(0x1c47, TCO_CPT7)}, | ||
327 | { ITCO_PCI_DEVICE(0x1c48, TCO_CPT8)}, | ||
328 | { ITCO_PCI_DEVICE(0x1c49, TCO_CPT9)}, | ||
329 | { ITCO_PCI_DEVICE(0x1c4a, TCO_CPT10)}, | ||
330 | { ITCO_PCI_DEVICE(0x1c4b, TCO_CPT11)}, | ||
331 | { ITCO_PCI_DEVICE(0x1c4c, TCO_CPT12)}, | ||
332 | { ITCO_PCI_DEVICE(0x1c4d, TCO_CPT13)}, | ||
333 | { ITCO_PCI_DEVICE(0x1c4e, TCO_CPT14)}, | ||
334 | { ITCO_PCI_DEVICE(0x1c4f, TCO_CPT15)}, | ||
335 | { ITCO_PCI_DEVICE(0x1c50, TCO_CPT16)}, | ||
336 | { ITCO_PCI_DEVICE(0x1c51, TCO_CPT17)}, | ||
337 | { ITCO_PCI_DEVICE(0x1c52, TCO_CPT18)}, | ||
338 | { ITCO_PCI_DEVICE(0x1c53, TCO_CPT19)}, | ||
339 | { ITCO_PCI_DEVICE(0x1c54, TCO_CPT20)}, | ||
340 | { ITCO_PCI_DEVICE(0x1c55, TCO_CPT21)}, | ||
341 | { ITCO_PCI_DEVICE(0x1c56, TCO_CPT22)}, | ||
342 | { ITCO_PCI_DEVICE(0x1c57, TCO_CPT23)}, | ||
343 | { ITCO_PCI_DEVICE(0x1c58, TCO_CPT24)}, | ||
344 | { ITCO_PCI_DEVICE(0x1c59, TCO_CPT25)}, | ||
345 | { ITCO_PCI_DEVICE(0x1c5a, TCO_CPT26)}, | ||
346 | { ITCO_PCI_DEVICE(0x1c5b, TCO_CPT27)}, | ||
347 | { ITCO_PCI_DEVICE(0x1c5c, TCO_CPT28)}, | ||
348 | { ITCO_PCI_DEVICE(0x1c5d, TCO_CPT29)}, | ||
349 | { ITCO_PCI_DEVICE(0x1c5e, TCO_CPT30)}, | ||
350 | { ITCO_PCI_DEVICE(0x1c5f, TCO_CPT31)}, | ||
264 | { 0, }, /* End of list */ | 351 | { 0, }, /* End of list */ |
265 | }; | 352 | }; |
266 | MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl); | 353 | MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl); |
diff --git a/drivers/watchdog/ibmasr.c b/drivers/watchdog/ibmasr.c index 89fcefcc8510..195e0f798e76 100644 --- a/drivers/watchdog/ibmasr.c +++ b/drivers/watchdog/ibmasr.c | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
17 | #include <linux/pci.h> | 16 | #include <linux/pci.h> |
18 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
diff --git a/drivers/watchdog/max63xx_wdt.c b/drivers/watchdog/max63xx_wdt.c index 6eb91d757604..75f3a83c0361 100644 --- a/drivers/watchdog/max63xx_wdt.c +++ b/drivers/watchdog/max63xx_wdt.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/uaccess.h> | 28 | #include <linux/uaccess.h> |
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | #define DEFAULT_HEARTBEAT 60 | 33 | #define DEFAULT_HEARTBEAT 60 |
33 | #define MAX_HEARTBEAT 60 | 34 | #define MAX_HEARTBEAT 60 |
diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c index b0646dac924e..016c6a791cab 100644 --- a/drivers/watchdog/mpcore_wdt.c +++ b/drivers/watchdog/mpcore_wdt.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/uaccess.h> | 32 | #include <linux/uaccess.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include <asm/hardware/arm_twd.h> | 35 | #include <asm/hardware/arm_twd.h> |
35 | 36 | ||
diff --git a/drivers/watchdog/nuc900_wdt.c b/drivers/watchdog/nuc900_wdt.c index adefe3a9d510..6cee33d4b161 100644 --- a/drivers/watchdog/nuc900_wdt.c +++ b/drivers/watchdog/nuc900_wdt.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/moduleparam.h> | 21 | #include <linux/moduleparam.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
24 | #include <linux/types.h> | 25 | #include <linux/types.h> |
25 | #include <linux/watchdog.h> | 26 | #include <linux/watchdog.h> |
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index c6aaf2845741..76b58abf4451 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/bitops.h> | 42 | #include <linux/bitops.h> |
43 | #include <linux/io.h> | 43 | #include <linux/io.h> |
44 | #include <linux/uaccess.h> | 44 | #include <linux/uaccess.h> |
45 | #include <linux/slab.h> | ||
45 | #include <mach/hardware.h> | 46 | #include <mach/hardware.h> |
46 | #include <plat/prcm.h> | 47 | #include <plat/prcm.h> |
47 | 48 | ||
diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c index 435ec2aed4fe..2d22e996e996 100644 --- a/drivers/watchdog/pika_wdt.c +++ b/drivers/watchdog/pika_wdt.c | |||
@@ -52,7 +52,7 @@ static struct { | |||
52 | struct timer_list timer; /* The timer that pings the watchdog */ | 52 | struct timer_list timer; /* The timer that pings the watchdog */ |
53 | } pikawdt_private; | 53 | } pikawdt_private; |
54 | 54 | ||
55 | static const struct watchdog_info ident = { | 55 | static struct watchdog_info ident = { |
56 | .identity = DRV_NAME, | 56 | .identity = DRV_NAME, |
57 | .options = WDIOF_CARDRESET | | 57 | .options = WDIOF_CARDRESET | |
58 | WDIOF_SETTIMEOUT | | 58 | WDIOF_SETTIMEOUT | |
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index c7a9479934af..bf5b97c546eb 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
31 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/slab.h> | ||
33 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
34 | 35 | ||
35 | #define MODULE_NAME "PNX4008-WDT: " | 36 | #define MODULE_NAME "PNX4008-WDT: " |
diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c index ae57bf9e1b03..ea7f803f6248 100644 --- a/drivers/watchdog/riowd.c +++ b/drivers/watchdog/riowd.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/of_device.h> | 15 | #include <linux/of_device.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | 20 | ||
20 | /* RIO uses the NatSemi Super I/O power management logical device | 21 | /* RIO uses the NatSemi Super I/O power management logical device |
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index 8760a26ab2a3..e4cebef55177 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/uaccess.h> | 37 | #include <linux/uaccess.h> |
38 | #include <linux/io.h> | 38 | #include <linux/io.h> |
39 | #include <linux/cpufreq.h> | 39 | #include <linux/cpufreq.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | #include <mach/map.h> | 42 | #include <mach/map.h> |
42 | 43 | ||
diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c index 565a2c3321e5..458c499c1223 100644 --- a/drivers/watchdog/ts72xx_wdt.c +++ b/drivers/watchdog/ts72xx_wdt.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/miscdevice.h> | 20 | #include <linux/miscdevice.h> |
21 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/watchdog.h> | 24 | #include <linux/watchdog.h> |
24 | #include <linux/uaccess.h> | 25 | #include <linux/uaccess.h> |
25 | 26 | ||
diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c index 8162a40d1522..dcabe77ad141 100644 --- a/drivers/watchdog/twl4030_wdt.c +++ b/drivers/watchdog/twl4030_wdt.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
24 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
25 | #include <linux/watchdog.h> | 26 | #include <linux/watchdog.h> |
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index f6738d8b02bc..1a0d8c2a0354 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/mutex.h> | 43 | #include <linux/mutex.h> |
44 | #include <linux/list.h> | 44 | #include <linux/list.h> |
45 | #include <linux/sysdev.h> | 45 | #include <linux/sysdev.h> |
46 | #include <linux/gfp.h> | ||
46 | 47 | ||
47 | #include <asm/page.h> | 48 | #include <asm/page.h> |
48 | #include <asm/pgalloc.h> | 49 | #include <asm/pgalloc.h> |
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 2f8413794d05..db8f506817f0 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/string.h> | 28 | #include <linux/string.h> |
29 | #include <linux/bootmem.h> | 29 | #include <linux/bootmem.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <asm/ptrace.h> | 32 | #include <asm/ptrace.h> |
32 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
diff --git a/drivers/xen/evtchn.c b/drivers/xen/evtchn.c index f70a4f4698c5..66e185cfe92f 100644 --- a/drivers/xen/evtchn.c +++ b/drivers/xen/evtchn.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #include <linux/poll.h> | 45 | #include <linux/poll.h> |
46 | #include <linux/irq.h> | 46 | #include <linux/irq.h> |
47 | #include <linux/init.h> | 47 | #include <linux/init.h> |
48 | #include <linux/gfp.h> | ||
49 | #include <linux/mutex.h> | 48 | #include <linux/mutex.h> |
50 | #include <linux/cpu.h> | 49 | #include <linux/cpu.h> |
51 | 50 | ||
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index 4c6c0bd636a8..f66db3b91d61 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
36 | #include <linux/mm.h> | 36 | #include <linux/mm.h> |
37 | #include <linux/slab.h> | ||
37 | #include <linux/vmalloc.h> | 38 | #include <linux/vmalloc.h> |
38 | #include <linux/uaccess.h> | 39 | #include <linux/uaccess.h> |
39 | 40 | ||
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index 5d42d55e299b..2ac4440e7b08 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c | |||
@@ -3,6 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/err.h> | 5 | #include <linux/err.h> |
6 | #include <linux/slab.h> | ||
6 | #include <linux/reboot.h> | 7 | #include <linux/reboot.h> |
7 | #include <linux/sysrq.h> | 8 | #include <linux/sysrq.h> |
8 | #include <linux/stop_machine.h> | 9 | #include <linux/stop_machine.h> |
diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c index bb71ab2336c8..60f1827a32cb 100644 --- a/drivers/xen/sys-hypervisor.c +++ b/drivers/xen/sys-hypervisor.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/slab.h> | ||
10 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
11 | #include <linux/module.h> | 12 | #include <linux/module.h> |
12 | #include <linux/kobject.h> | 13 | #include <linux/kobject.h> |
diff --git a/drivers/xen/xenbus/xenbus_client.c b/drivers/xen/xenbus/xenbus_client.c index 92a1ef80a288..7b3e973a1aee 100644 --- a/drivers/xen/xenbus/xenbus_client.c +++ b/drivers/xen/xenbus/xenbus_client.c | |||
@@ -30,6 +30,7 @@ | |||
30 | * IN THE SOFTWARE. | 30 | * IN THE SOFTWARE. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/slab.h> | ||
33 | #include <linux/types.h> | 34 | #include <linux/types.h> |
34 | #include <linux/vmalloc.h> | 35 | #include <linux/vmalloc.h> |
35 | #include <asm/xen/hypervisor.h> | 36 | #include <asm/xen/hypervisor.h> |
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index 2f7aaa99dc47..3479332113e9 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/kthread.h> | 45 | #include <linux/kthread.h> |
46 | #include <linux/mutex.h> | 46 | #include <linux/mutex.h> |
47 | #include <linux/io.h> | 47 | #include <linux/io.h> |
48 | #include <linux/slab.h> | ||
48 | 49 | ||
49 | #include <asm/page.h> | 50 | #include <asm/page.h> |
50 | #include <asm/pgtable.h> | 51 | #include <asm/pgtable.h> |
diff --git a/drivers/xen/xencomm.c b/drivers/xen/xencomm.c index a240b2c20b99..b91f8ff50d05 100644 --- a/drivers/xen/xencomm.c +++ b/drivers/xen/xencomm.c | |||
@@ -18,8 +18,8 @@ | |||
18 | * Authors: Hollis Blanchard <hollisb@us.ibm.com> | 18 | * Authors: Hollis Blanchard <hollisb@us.ibm.com> |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/gfp.h> | ||
22 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/slab.h> | ||
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | #include <xen/xencomm.h> | 24 | #include <xen/xencomm.h> |
25 | #include <xen/interface/xen.h> | 25 | #include <xen/interface/xen.h> |
diff --git a/drivers/xen/xenfs/xenbus.c b/drivers/xen/xenfs/xenbus.c index 6c4269b836b7..f28ece397361 100644 --- a/drivers/xen/xenfs/xenbus.c +++ b/drivers/xen/xenfs/xenbus.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/init.h> | 51 | #include <linux/init.h> |
52 | #include <linux/namei.h> | 52 | #include <linux/namei.h> |
53 | #include <linux/string.h> | 53 | #include <linux/string.h> |
54 | #include <linux/slab.h> | ||
54 | 55 | ||
55 | #include "xenfs.h" | 56 | #include "xenfs.h" |
56 | #include "../xenbus/xenbus_comms.h" | 57 | #include "../xenbus/xenbus_comms.h" |
diff --git a/fs/9p/cache.c b/fs/9p/cache.c index e777961939f3..0dbe0d139ac2 100644 --- a/fs/9p/cache.c +++ b/fs/9p/cache.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/jiffies.h> | 23 | #include <linux/jiffies.h> |
24 | #include <linux/file.h> | 24 | #include <linux/file.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/stat.h> | 26 | #include <linux/stat.h> |
26 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
27 | #include <linux/fs.h> | 28 | #include <linux/fs.h> |
diff --git a/fs/9p/fid.c b/fs/9p/fid.c index 08b2eb157048..7317b39b2815 100644 --- a/fs/9p/fid.c +++ b/fs/9p/fid.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
28 | #include <linux/idr.h> | 29 | #include <linux/idr.h> |
29 | #include <net/9p/9p.h> | 30 | #include <net/9p/9p.h> |
@@ -110,7 +111,7 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry) | |||
110 | { | 111 | { |
111 | int i, n, l, clone, any, access; | 112 | int i, n, l, clone, any, access; |
112 | u32 uid; | 113 | u32 uid; |
113 | struct p9_fid *fid; | 114 | struct p9_fid *fid, *old_fid = NULL; |
114 | struct dentry *d, *ds; | 115 | struct dentry *d, *ds; |
115 | struct v9fs_session_info *v9ses; | 116 | struct v9fs_session_info *v9ses; |
116 | char **wnames, *uname; | 117 | char **wnames, *uname; |
@@ -183,10 +184,18 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry) | |||
183 | l = min(n - i, P9_MAXWELEM); | 184 | l = min(n - i, P9_MAXWELEM); |
184 | fid = p9_client_walk(fid, l, &wnames[i], clone); | 185 | fid = p9_client_walk(fid, l, &wnames[i], clone); |
185 | if (IS_ERR(fid)) { | 186 | if (IS_ERR(fid)) { |
187 | if (old_fid) { | ||
188 | /* | ||
189 | * If we fail, clunk fid which are mapping | ||
190 | * to path component and not the last component | ||
191 | * of the path. | ||
192 | */ | ||
193 | p9_client_clunk(old_fid); | ||
194 | } | ||
186 | kfree(wnames); | 195 | kfree(wnames); |
187 | return fid; | 196 | return fid; |
188 | } | 197 | } |
189 | 198 | old_fid = fid; | |
190 | i += l; | 199 | i += l; |
191 | clone = 0; | 200 | clone = 0; |
192 | } | 201 | } |
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 6c7f6a251115..5c5bc8480070 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/parser.h> | 30 | #include <linux/parser.h> |
31 | #include <linux/idr.h> | 31 | #include <linux/idr.h> |
32 | #include <linux/slab.h> | ||
32 | #include <net/9p/9p.h> | 33 | #include <net/9p/9p.h> |
33 | #include <net/9p/client.h> | 34 | #include <net/9p/client.h> |
34 | #include <net/9p/transport.h> | 35 | #include <net/9p/transport.h> |
@@ -241,7 +242,7 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses, | |||
241 | list_add(&v9ses->slist, &v9fs_sessionlist); | 242 | list_add(&v9ses->slist, &v9fs_sessionlist); |
242 | spin_unlock(&v9fs_sessionlist_lock); | 243 | spin_unlock(&v9fs_sessionlist_lock); |
243 | 244 | ||
244 | v9ses->flags = V9FS_PROTO_2000U | V9FS_ACCESS_USER; | 245 | v9ses->flags = V9FS_ACCESS_USER; |
245 | strcpy(v9ses->uname, V9FS_DEFUSER); | 246 | strcpy(v9ses->uname, V9FS_DEFUSER); |
246 | strcpy(v9ses->aname, V9FS_DEFANAME); | 247 | strcpy(v9ses->aname, V9FS_DEFANAME); |
247 | v9ses->uid = ~0; | 248 | v9ses->uid = ~0; |
@@ -262,8 +263,10 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses, | |||
262 | goto error; | 263 | goto error; |
263 | } | 264 | } |
264 | 265 | ||
265 | if (!p9_is_proto_dotu(v9ses->clnt)) | 266 | if (p9_is_proto_dotl(v9ses->clnt)) |
266 | v9ses->flags &= ~V9FS_PROTO_2000U; | 267 | v9ses->flags |= V9FS_PROTO_2000L; |
268 | else if (p9_is_proto_dotu(v9ses->clnt)) | ||
269 | v9ses->flags |= V9FS_PROTO_2000U; | ||
267 | 270 | ||
268 | v9ses->maxdata = v9ses->clnt->msize - P9_IOHDRSZ; | 271 | v9ses->maxdata = v9ses->clnt->msize - P9_IOHDRSZ; |
269 | 272 | ||
@@ -340,6 +343,19 @@ void v9fs_session_cancel(struct v9fs_session_info *v9ses) { | |||
340 | p9_client_disconnect(v9ses->clnt); | 343 | p9_client_disconnect(v9ses->clnt); |
341 | } | 344 | } |
342 | 345 | ||
346 | /** | ||
347 | * v9fs_session_begin_cancel - Begin terminate of a session | ||
348 | * @v9ses: session to terminate | ||
349 | * | ||
350 | * After this call we don't allow any request other than clunk. | ||
351 | */ | ||
352 | |||
353 | void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses) | ||
354 | { | ||
355 | P9_DPRINTK(P9_DEBUG_ERROR, "begin cancel session %p\n", v9ses); | ||
356 | p9_client_begin_disconnect(v9ses->clnt); | ||
357 | } | ||
358 | |||
343 | extern int v9fs_error_init(void); | 359 | extern int v9fs_error_init(void); |
344 | 360 | ||
345 | static struct kobject *v9fs_kobj; | 361 | static struct kobject *v9fs_kobj; |
diff --git a/fs/9p/v9fs.h b/fs/9p/v9fs.h index 6b801d1ddf4b..a0a8d3dd1361 100644 --- a/fs/9p/v9fs.h +++ b/fs/9p/v9fs.h | |||
@@ -108,6 +108,7 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *, const char *, | |||
108 | char *); | 108 | char *); |
109 | void v9fs_session_close(struct v9fs_session_info *v9ses); | 109 | void v9fs_session_close(struct v9fs_session_info *v9ses); |
110 | void v9fs_session_cancel(struct v9fs_session_info *v9ses); | 110 | void v9fs_session_cancel(struct v9fs_session_info *v9ses); |
111 | void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses); | ||
111 | 112 | ||
112 | #define V9FS_MAGIC 0x01021997 | 113 | #define V9FS_MAGIC 0x01021997 |
113 | 114 | ||
diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c index d74325295b1e..cbf4e50f3933 100644 --- a/fs/9p/vfs_dentry.c +++ b/fs/9p/vfs_dentry.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/namei.h> | 34 | #include <linux/namei.h> |
35 | #include <linux/idr.h> | 35 | #include <linux/idr.h> |
36 | #include <linux/sched.h> | 36 | #include <linux/sched.h> |
37 | #include <linux/slab.h> | ||
37 | #include <net/9p/9p.h> | 38 | #include <net/9p/9p.h> |
38 | #include <net/9p/client.h> | 39 | #include <net/9p/client.h> |
39 | 40 | ||
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index d8a3afe4ff72..0adfd64dfcee 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
33 | #include <linux/inet.h> | 33 | #include <linux/inet.h> |
34 | #include <linux/idr.h> | 34 | #include <linux/idr.h> |
35 | #include <linux/slab.h> | ||
35 | #include <net/9p/9p.h> | 36 | #include <net/9p/9p.h> |
36 | #include <net/9p/client.h> | 37 | #include <net/9p/client.h> |
37 | 38 | ||
@@ -130,6 +131,8 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
130 | rdir = (struct p9_rdir *) fid->rdir; | 131 | rdir = (struct p9_rdir *) fid->rdir; |
131 | 132 | ||
132 | err = mutex_lock_interruptible(&rdir->mutex); | 133 | err = mutex_lock_interruptible(&rdir->mutex); |
134 | if (err) | ||
135 | return err; | ||
133 | while (err == 0) { | 136 | while (err == 0) { |
134 | if (rdir->tail == rdir->head) { | 137 | if (rdir->tail == rdir->head) { |
135 | err = v9fs_file_readn(filp, rdir->buf, NULL, | 138 | err = v9fs_file_readn(filp, rdir->buf, NULL, |
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 5fe45d692c9f..f2434fc9d2c4 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/namei.h> | 34 | #include <linux/namei.h> |
35 | #include <linux/idr.h> | 35 | #include <linux/idr.h> |
36 | #include <linux/sched.h> | 36 | #include <linux/sched.h> |
37 | #include <linux/slab.h> | ||
37 | #include <net/9p/9p.h> | 38 | #include <net/9p/9p.h> |
38 | #include <net/9p/client.h> | 39 | #include <net/9p/client.h> |
39 | 40 | ||
@@ -431,6 +432,7 @@ error: | |||
431 | 432 | ||
432 | static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir) | 433 | static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir) |
433 | { | 434 | { |
435 | int retval; | ||
434 | struct inode *file_inode; | 436 | struct inode *file_inode; |
435 | struct v9fs_session_info *v9ses; | 437 | struct v9fs_session_info *v9ses; |
436 | struct p9_fid *v9fid; | 438 | struct p9_fid *v9fid; |
@@ -444,7 +446,10 @@ static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir) | |||
444 | if (IS_ERR(v9fid)) | 446 | if (IS_ERR(v9fid)) |
445 | return PTR_ERR(v9fid); | 447 | return PTR_ERR(v9fid); |
446 | 448 | ||
447 | return p9_client_remove(v9fid); | 449 | retval = p9_client_remove(v9fid); |
450 | if (!retval) | ||
451 | drop_nlink(file_inode); | ||
452 | return retval; | ||
448 | } | 453 | } |
449 | 454 | ||
450 | static int | 455 | static int |
@@ -656,6 +661,9 @@ static struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry, | |||
656 | P9_DPRINTK(P9_DEBUG_VFS, "dir: %p dentry: (%s) %p nameidata: %p\n", | 661 | P9_DPRINTK(P9_DEBUG_VFS, "dir: %p dentry: (%s) %p nameidata: %p\n", |
657 | dir, dentry->d_name.name, dentry, nameidata); | 662 | dir, dentry->d_name.name, dentry, nameidata); |
658 | 663 | ||
664 | if (dentry->d_name.len > NAME_MAX) | ||
665 | return ERR_PTR(-ENAMETOOLONG); | ||
666 | |||
659 | sb = dir->i_sb; | 667 | sb = dir->i_sb; |
660 | v9ses = v9fs_inode2v9ses(dir); | 668 | v9ses = v9fs_inode2v9ses(dir); |
661 | dfid = v9fs_fid_lookup(dentry->d_parent); | 669 | dfid = v9fs_fid_lookup(dentry->d_parent); |
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index 69357c0d9899..491108bd6e0d 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/mount.h> | 37 | #include <linux/mount.h> |
38 | #include <linux/idr.h> | 38 | #include <linux/idr.h> |
39 | #include <linux/sched.h> | 39 | #include <linux/sched.h> |
40 | #include <linux/slab.h> | ||
40 | #include <net/9p/9p.h> | 41 | #include <net/9p/9p.h> |
41 | #include <net/9p/client.h> | 42 | #include <net/9p/client.h> |
42 | 43 | ||
@@ -193,6 +194,7 @@ static void v9fs_kill_super(struct super_block *s) | |||
193 | 194 | ||
194 | kill_anon_super(s); | 195 | kill_anon_super(s); |
195 | 196 | ||
197 | v9fs_session_cancel(v9ses); | ||
196 | v9fs_session_close(v9ses); | 198 | v9fs_session_close(v9ses); |
197 | kfree(v9ses); | 199 | kfree(v9ses); |
198 | s->s_fs_info = NULL; | 200 | s->s_fs_info = NULL; |
@@ -205,7 +207,7 @@ v9fs_umount_begin(struct super_block *sb) | |||
205 | struct v9fs_session_info *v9ses; | 207 | struct v9fs_session_info *v9ses; |
206 | 208 | ||
207 | v9ses = sb->s_fs_info; | 209 | v9ses = sb->s_fs_info; |
208 | v9fs_session_cancel(v9ses); | 210 | v9fs_session_begin_cancel(v9ses); |
209 | } | 211 | } |
210 | 212 | ||
211 | static const struct super_operations v9fs_super_ops = { | 213 | static const struct super_operations v9fs_super_ops = { |
diff --git a/fs/adfs/super.c b/fs/adfs/super.c index 6910a98bd73c..4a3af7075c1d 100644 --- a/fs/adfs/super.c +++ b/fs/adfs/super.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/parser.h> | 13 | #include <linux/parser.h> |
14 | #include <linux/mount.h> | 14 | #include <linux/mount.h> |
15 | #include <linux/seq_file.h> | 15 | #include <linux/seq_file.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/smp_lock.h> | 17 | #include <linux/smp_lock.h> |
17 | #include <linux/statfs.h> | 18 | #include <linux/statfs.h> |
18 | #include "adfs.h" | 19 | #include "adfs.h" |
diff --git a/fs/affs/bitmap.c b/fs/affs/bitmap.c index 8306d53307ed..3e262711ae06 100644 --- a/fs/affs/bitmap.c +++ b/fs/affs/bitmap.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * block allocation, deallocation, calculation of free space. | 7 | * block allocation, deallocation, calculation of free space. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/slab.h> | ||
10 | #include "affs.h" | 11 | #include "affs.h" |
11 | 12 | ||
12 | /* This is, of course, shamelessly stolen from fs/minix */ | 13 | /* This is, of course, shamelessly stolen from fs/minix */ |
diff --git a/fs/affs/inode.c b/fs/affs/inode.c index c9744d771d98..f4b2a4ee4f91 100644 --- a/fs/affs/inode.c +++ b/fs/affs/inode.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * (C) 1991 Linus Torvalds - minix filesystem | 10 | * (C) 1991 Linus Torvalds - minix filesystem |
11 | */ | 11 | */ |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/gfp.h> | ||
13 | #include "affs.h" | 14 | #include "affs.h" |
14 | 15 | ||
15 | extern const struct inode_operations affs_symlink_inode_operations; | 16 | extern const struct inode_operations affs_symlink_inode_operations; |
diff --git a/fs/affs/super.c b/fs/affs/super.c index d41e9673cd97..16a3e4765f68 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/magic.h> | 17 | #include <linux/magic.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/smp_lock.h> | 19 | #include <linux/smp_lock.h> |
20 | #include <linux/slab.h> | ||
20 | #include "affs.h" | 21 | #include "affs.h" |
21 | 22 | ||
22 | extern struct timezone sys_tz; | 23 | extern struct timezone sys_tz; |
diff --git a/fs/afs/cache.c b/fs/afs/cache.c index e2b1d3f16519..0fb315dd4d2a 100644 --- a/fs/afs/cache.c +++ b/fs/afs/cache.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
13 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
14 | #include "internal.h" | 13 | #include "internal.h" |
15 | 14 | ||
diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index eb765489164f..a3bcec75c54a 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
15 | #include <linux/ip.h> | 16 | #include <linux/ip.h> |
16 | #include "internal.h" | 17 | #include "internal.h" |
diff --git a/fs/afs/dir.c b/fs/afs/dir.c index 88067f36e5e7..adc1cb771b57 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
17 | #include <linux/pagemap.h> | 16 | #include <linux/pagemap.h> |
18 | #include <linux/ctype.h> | 17 | #include <linux/ctype.h> |
diff --git a/fs/afs/file.c b/fs/afs/file.c index 39b301662f22..0df9bc2b724d 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c | |||
@@ -12,10 +12,10 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
17 | #include <linux/pagemap.h> | 16 | #include <linux/pagemap.h> |
18 | #include <linux/writeback.h> | 17 | #include <linux/writeback.h> |
18 | #include <linux/gfp.h> | ||
19 | #include "internal.h" | 19 | #include "internal.h" |
20 | 20 | ||
21 | static int afs_readpage(struct file *file, struct page *page); | 21 | static int afs_readpage(struct file *file, struct page *page); |
diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c index 023b95b0d9d7..4bd0218473a9 100644 --- a/fs/afs/fsclient.c +++ b/fs/afs/fsclient.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
14 | #include <linux/circ_buf.h> | 15 | #include <linux/circ_buf.h> |
15 | #include "internal.h" | 16 | #include "internal.h" |
diff --git a/fs/afs/inode.c b/fs/afs/inode.c index c048f0658751..d00b312e3110 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/slab.h> | ||
20 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
21 | #include <linux/pagemap.h> | 20 | #include <linux/pagemap.h> |
22 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c index 5ffb570cd3a8..5e813a816ce4 100644 --- a/fs/afs/mntpt.c +++ b/fs/afs/mntpt.c | |||
@@ -12,11 +12,11 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
17 | #include <linux/pagemap.h> | 16 | #include <linux/pagemap.h> |
18 | #include <linux/mount.h> | 17 | #include <linux/mount.h> |
19 | #include <linux/namei.h> | 18 | #include <linux/namei.h> |
19 | #include <linux/gfp.h> | ||
20 | #include "internal.h" | 20 | #include "internal.h" |
21 | 21 | ||
22 | 22 | ||
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index bde3f19c0995..67cf810e0fd6 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
12 | #include <net/sock.h> | 13 | #include <net/sock.h> |
13 | #include <net/af_rxrpc.h> | 14 | #include <net/af_rxrpc.h> |
14 | #include <rxrpc/packet.h> | 15 | #include <rxrpc/packet.h> |
diff --git a/fs/afs/vlclient.c b/fs/afs/vlclient.c index 36c1306e09e0..340afd0cd182 100644 --- a/fs/afs/vlclient.c +++ b/fs/afs/vlclient.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/gfp.h> | ||
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
13 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
14 | #include "internal.h" | 15 | #include "internal.h" |
diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c index 6e689208def2..9ac260d1361d 100644 --- a/fs/afs/vlocation.c +++ b/fs/afs/vlocation.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
16 | #include "internal.h" | 17 | #include "internal.h" |
diff --git a/fs/afs/vnode.c b/fs/afs/vnode.c index 2f05c4fc2a70..25cf4c3f4ff7 100644 --- a/fs/afs/vnode.c +++ b/fs/afs/vnode.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
17 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
18 | #include "internal.h" | 17 | #include "internal.h" |
diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index 2de009565d8e..e4b75d6eda83 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/file.h> | 12 | #include <linux/file.h> |
13 | #include <linux/poll.h> | 13 | #include <linux/poll.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
18 | #include <linux/mount.h> | 17 | #include <linux/mount.h> |
diff --git a/fs/autofs/root.c b/fs/autofs/root.c index 4a1401cea0a1..8713c7cfbc79 100644 --- a/fs/autofs/root.c +++ b/fs/autofs/root.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/capability.h> | 13 | #include <linux/capability.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/stat.h> | 15 | #include <linux/stat.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/param.h> | 17 | #include <linux/param.h> |
17 | #include <linux/time.h> | 18 | #include <linux/time.h> |
18 | #include <linux/smp_lock.h> | 19 | #include <linux/smp_lock.h> |
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index c8a80dffb455..d29b7f6df862 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-ioctl.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/magic.h> | 22 | #include <linux/magic.h> |
23 | #include <linux/dcache.h> | 23 | #include <linux/dcache.h> |
24 | #include <linux/uaccess.h> | 24 | #include <linux/uaccess.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "autofs_i.h" | 27 | #include "autofs_i.h" |
27 | 28 | ||
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index a015b49891df..109a6c606d92 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/capability.h> | 15 | #include <linux/capability.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/stat.h> | 17 | #include <linux/stat.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/param.h> | 19 | #include <linux/param.h> |
19 | #include <linux/time.h> | 20 | #include <linux/time.h> |
20 | #include "autofs_i.h" | 21 | #include "autofs_i.h" |
diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c index e3287d0d1a58..59096b5e0fc7 100644 --- a/fs/befs/datastream.c +++ b/fs/befs/datastream.c | |||
@@ -11,7 +11,6 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/buffer_head.h> | 14 | #include <linux/buffer_head.h> |
16 | #include <linux/string.h> | 15 | #include <linux/string.h> |
17 | 16 | ||
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 15d80bb35d6f..f96eff04e11a 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c | |||
@@ -20,11 +20,11 @@ | |||
20 | #include <linux/fcntl.h> | 20 | #include <linux/fcntl.h> |
21 | #include <linux/ptrace.h> | 21 | #include <linux/ptrace.h> |
22 | #include <linux/user.h> | 22 | #include <linux/user.h> |
23 | #include <linux/slab.h> | ||
24 | #include <linux/binfmts.h> | 23 | #include <linux/binfmts.h> |
25 | #include <linux/personality.h> | 24 | #include <linux/personality.h> |
26 | #include <linux/init.h> | 25 | #include <linux/init.h> |
27 | #include <linux/coredump.h> | 26 | #include <linux/coredump.h> |
27 | #include <linux/slab.h> | ||
28 | 28 | ||
29 | #include <asm/system.h> | 29 | #include <asm/system.h> |
30 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
@@ -75,14 +75,16 @@ static int aout_core_dump(struct coredump_params *cprm) | |||
75 | struct file *file = cprm->file; | 75 | struct file *file = cprm->file; |
76 | mm_segment_t fs; | 76 | mm_segment_t fs; |
77 | int has_dumped = 0; | 77 | int has_dumped = 0; |
78 | unsigned long dump_start, dump_size; | 78 | void __user *dump_start; |
79 | int dump_size; | ||
79 | struct user dump; | 80 | struct user dump; |
80 | #ifdef __alpha__ | 81 | #ifdef __alpha__ |
81 | # define START_DATA(u) (u.start_data) | 82 | # define START_DATA(u) ((void __user *)u.start_data) |
82 | #else | 83 | #else |
83 | # define START_DATA(u) ((u.u_tsize << PAGE_SHIFT) + u.start_code) | 84 | # define START_DATA(u) ((void __user *)((u.u_tsize << PAGE_SHIFT) + \ |
85 | u.start_code)) | ||
84 | #endif | 86 | #endif |
85 | # define START_STACK(u) (u.start_stack) | 87 | # define START_STACK(u) ((void __user *)u.start_stack) |
86 | 88 | ||
87 | fs = get_fs(); | 89 | fs = get_fs(); |
88 | set_fs(KERNEL_DS); | 90 | set_fs(KERNEL_DS); |
@@ -104,9 +106,9 @@ static int aout_core_dump(struct coredump_params *cprm) | |||
104 | 106 | ||
105 | /* make sure we actually have a data and stack area to dump */ | 107 | /* make sure we actually have a data and stack area to dump */ |
106 | set_fs(USER_DS); | 108 | set_fs(USER_DS); |
107 | if (!access_ok(VERIFY_READ, (void __user *)START_DATA(dump), dump.u_dsize << PAGE_SHIFT)) | 109 | if (!access_ok(VERIFY_READ, START_DATA(dump), dump.u_dsize << PAGE_SHIFT)) |
108 | dump.u_dsize = 0; | 110 | dump.u_dsize = 0; |
109 | if (!access_ok(VERIFY_READ, (void __user *)START_STACK(dump), dump.u_ssize << PAGE_SHIFT)) | 111 | if (!access_ok(VERIFY_READ, START_STACK(dump), dump.u_ssize << PAGE_SHIFT)) |
110 | dump.u_ssize = 0; | 112 | dump.u_ssize = 0; |
111 | 113 | ||
112 | set_fs(KERNEL_DS); | 114 | set_fs(KERNEL_DS); |
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index 2c32d00a6690..7ab23e006e4c 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -1590,7 +1590,7 @@ static size_t elf_core_vma_data_size(unsigned long mm_flags) | |||
1590 | struct vm_area_struct *vma; | 1590 | struct vm_area_struct *vma; |
1591 | size_t size = 0; | 1591 | size_t size = 0; |
1592 | 1592 | ||
1593 | for (vma = current->mm->mmap; vma; vma->vm_next) | 1593 | for (vma = current->mm->mmap; vma; vma = vma->vm_next) |
1594 | if (maydump(vma, mm_flags)) | 1594 | if (maydump(vma, mm_flags)) |
1595 | size += vma->vm_end - vma->vm_start; | 1595 | size += vma->vm_end - vma->vm_start; |
1596 | return size; | 1596 | return size; |
diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c index 32fb00b52cd0..b8e8b0acf9bd 100644 --- a/fs/binfmt_em86.c +++ b/fs/binfmt_em86.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/stat.h> | 13 | #include <linux/stat.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/binfmts.h> | 14 | #include <linux/binfmts.h> |
16 | #include <linux/elf.h> | 15 | #include <linux/elf.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c index 08343505e184..aca9d55afb22 100644 --- a/fs/binfmt_script.c +++ b/fs/binfmt_script.c | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/string.h> | 9 | #include <linux/string.h> |
10 | #include <linux/stat.h> | 10 | #include <linux/stat.h> |
11 | #include <linux/slab.h> | ||
12 | #include <linux/binfmts.h> | 11 | #include <linux/binfmts.h> |
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
14 | #include <linux/file.h> | 13 | #include <linux/file.h> |
diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c index a16f29e888cd..612a5c38d3c1 100644 --- a/fs/bio-integrity.c +++ b/fs/bio-integrity.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/mempool.h> | 24 | #include <linux/mempool.h> |
25 | #include <linux/bio.h> | 25 | #include <linux/bio.h> |
26 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | struct integrity_slab { | 29 | struct integrity_slab { |
29 | struct kmem_cache *slab; | 30 | struct kmem_cache *slab; |
@@ -554,7 +554,7 @@ static int __bio_add_page(struct request_queue *q, struct bio *bio, struct page | |||
554 | .bi_rw = bio->bi_rw, | 554 | .bi_rw = bio->bi_rw, |
555 | }; | 555 | }; |
556 | 556 | ||
557 | if (q->merge_bvec_fn(q, &bvm, prev) < len) { | 557 | if (q->merge_bvec_fn(q, &bvm, prev) < prev->bv_len) { |
558 | prev->bv_len -= len; | 558 | prev->bv_len -= len; |
559 | return 0; | 559 | return 0; |
560 | } | 560 | } |
@@ -607,7 +607,7 @@ static int __bio_add_page(struct request_queue *q, struct bio *bio, struct page | |||
607 | * merge_bvec_fn() returns number of bytes it can accept | 607 | * merge_bvec_fn() returns number of bytes it can accept |
608 | * at this offset | 608 | * at this offset |
609 | */ | 609 | */ |
610 | if (q->merge_bvec_fn(q, &bvm, bvec) < len) { | 610 | if (q->merge_bvec_fn(q, &bvm, bvec) < bvec->bv_len) { |
611 | bvec->bv_page = NULL; | 611 | bvec->bv_page = NULL; |
612 | bvec->bv_len = 0; | 612 | bvec->bv_len = 0; |
613 | bvec->bv_offset = 0; | 613 | bvec->bv_offset = 0; |
diff --git a/fs/block_dev.c b/fs/block_dev.c index d11d0289f3d2..2a6d0193f139 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -404,7 +404,7 @@ static loff_t block_llseek(struct file *file, loff_t offset, int origin) | |||
404 | * NULL first argument is nfsd_sync_dir() and that's not a directory. | 404 | * NULL first argument is nfsd_sync_dir() and that's not a directory. |
405 | */ | 405 | */ |
406 | 406 | ||
407 | static int block_fsync(struct file *filp, struct dentry *dentry, int datasync) | 407 | int blkdev_fsync(struct file *filp, struct dentry *dentry, int datasync) |
408 | { | 408 | { |
409 | struct block_device *bdev = I_BDEV(filp->f_mapping->host); | 409 | struct block_device *bdev = I_BDEV(filp->f_mapping->host); |
410 | int error; | 410 | int error; |
@@ -418,6 +418,7 @@ static int block_fsync(struct file *filp, struct dentry *dentry, int datasync) | |||
418 | error = 0; | 418 | error = 0; |
419 | return error; | 419 | return error; |
420 | } | 420 | } |
421 | EXPORT_SYMBOL(blkdev_fsync); | ||
421 | 422 | ||
422 | /* | 423 | /* |
423 | * pseudo-fs | 424 | * pseudo-fs |
@@ -1481,7 +1482,7 @@ const struct file_operations def_blk_fops = { | |||
1481 | .aio_read = generic_file_aio_read, | 1482 | .aio_read = generic_file_aio_read, |
1482 | .aio_write = blkdev_aio_write, | 1483 | .aio_write = blkdev_aio_write, |
1483 | .mmap = generic_file_mmap, | 1484 | .mmap = generic_file_mmap, |
1484 | .fsync = block_fsync, | 1485 | .fsync = blkdev_fsync, |
1485 | .unlocked_ioctl = block_ioctl, | 1486 | .unlocked_ioctl = block_ioctl, |
1486 | #ifdef CONFIG_COMPAT | 1487 | #ifdef CONFIG_COMPAT |
1487 | .compat_ioctl = compat_blkdev_ioctl, | 1488 | .compat_ioctl = compat_blkdev_ioctl, |
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 6df6d6ed74fd..6ef7b26724ec 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/posix_acl_xattr.h> | 22 | #include <linux/posix_acl_xattr.h> |
23 | #include <linux/posix_acl.h> | 23 | #include <linux/posix_acl.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "ctree.h" | 27 | #include "ctree.h" |
27 | #include "btrfs_inode.h" | 28 | #include "btrfs_inode.h" |
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index c0861e781cdb..462859a30141 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/kthread.h> | 19 | #include <linux/kthread.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/list.h> | 21 | #include <linux/list.h> |
21 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
22 | #include <linux/freezer.h> | 23 | #include <linux/freezer.h> |
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 28b92a7218ab..396039b3a8a2 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/swap.h> | 31 | #include <linux/swap.h> |
32 | #include <linux/writeback.h> | 32 | #include <linux/writeback.h> |
33 | #include <linux/bit_spinlock.h> | 33 | #include <linux/bit_spinlock.h> |
34 | #include <linux/pagevec.h> | 34 | #include <linux/slab.h> |
35 | #include "compat.h" | 35 | #include "compat.h" |
36 | #include "ctree.h" | 36 | #include "ctree.h" |
37 | #include "disk-io.h" | 37 | #include "disk-io.h" |
@@ -445,7 +445,6 @@ static noinline int add_ra_bio_pages(struct inode *inode, | |||
445 | unsigned long nr_pages = 0; | 445 | unsigned long nr_pages = 0; |
446 | struct extent_map *em; | 446 | struct extent_map *em; |
447 | struct address_space *mapping = inode->i_mapping; | 447 | struct address_space *mapping = inode->i_mapping; |
448 | struct pagevec pvec; | ||
449 | struct extent_map_tree *em_tree; | 448 | struct extent_map_tree *em_tree; |
450 | struct extent_io_tree *tree; | 449 | struct extent_io_tree *tree; |
451 | u64 end; | 450 | u64 end; |
@@ -461,7 +460,6 @@ static noinline int add_ra_bio_pages(struct inode *inode, | |||
461 | 460 | ||
462 | end_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT; | 461 | end_index = (i_size_read(inode) - 1) >> PAGE_CACHE_SHIFT; |
463 | 462 | ||
464 | pagevec_init(&pvec, 0); | ||
465 | while (last_offset < compressed_end) { | 463 | while (last_offset < compressed_end) { |
466 | page_index = last_offset >> PAGE_CACHE_SHIFT; | 464 | page_index = last_offset >> PAGE_CACHE_SHIFT; |
467 | 465 | ||
@@ -478,26 +476,17 @@ static noinline int add_ra_bio_pages(struct inode *inode, | |||
478 | goto next; | 476 | goto next; |
479 | } | 477 | } |
480 | 478 | ||
481 | page = alloc_page(mapping_gfp_mask(mapping) & ~__GFP_FS); | 479 | page = __page_cache_alloc(mapping_gfp_mask(mapping) & |
480 | ~__GFP_FS); | ||
482 | if (!page) | 481 | if (!page) |
483 | break; | 482 | break; |
484 | 483 | ||
485 | page->index = page_index; | 484 | if (add_to_page_cache_lru(page, mapping, page_index, |
486 | /* | 485 | GFP_NOFS)) { |
487 | * what we want to do here is call add_to_page_cache_lru, | ||
488 | * but that isn't exported, so we reproduce it here | ||
489 | */ | ||
490 | if (add_to_page_cache(page, mapping, | ||
491 | page->index, GFP_NOFS)) { | ||
492 | page_cache_release(page); | 486 | page_cache_release(page); |
493 | goto next; | 487 | goto next; |
494 | } | 488 | } |
495 | 489 | ||
496 | /* open coding of lru_cache_add, also not exported */ | ||
497 | page_cache_get(page); | ||
498 | if (!pagevec_add(&pvec, page)) | ||
499 | __pagevec_lru_add_file(&pvec); | ||
500 | |||
501 | end = last_offset + PAGE_CACHE_SIZE - 1; | 490 | end = last_offset + PAGE_CACHE_SIZE - 1; |
502 | /* | 491 | /* |
503 | * at this point, we have a locked page in the page cache | 492 | * at this point, we have a locked page in the page cache |
@@ -551,8 +540,6 @@ static noinline int add_ra_bio_pages(struct inode *inode, | |||
551 | next: | 540 | next: |
552 | last_offset += PAGE_CACHE_SIZE; | 541 | last_offset += PAGE_CACHE_SIZE; |
553 | } | 542 | } |
554 | if (pagevec_count(&pvec)) | ||
555 | __pagevec_lru_add_file(&pvec); | ||
556 | return 0; | 543 | return 0; |
557 | } | 544 | } |
558 | 545 | ||
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index c4bc570a396e..6795a713b205 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/slab.h> | ||
20 | #include "ctree.h" | 21 | #include "ctree.h" |
21 | #include "disk-io.h" | 22 | #include "disk-io.h" |
22 | #include "transaction.h" | 23 | #include "transaction.h" |
@@ -3040,6 +3041,10 @@ static noinline int setup_leaf_for_split(struct btrfs_trans_handle *trans, | |||
3040 | if (ret > 0 || item_size != btrfs_item_size_nr(leaf, path->slots[0])) | 3041 | if (ret > 0 || item_size != btrfs_item_size_nr(leaf, path->slots[0])) |
3041 | goto err; | 3042 | goto err; |
3042 | 3043 | ||
3044 | /* the leaf has changed, it now has room. return now */ | ||
3045 | if (btrfs_leaf_free_space(root, path->nodes[0]) >= ins_len) | ||
3046 | goto err; | ||
3047 | |||
3043 | if (key.type == BTRFS_EXTENT_DATA_KEY) { | 3048 | if (key.type == BTRFS_EXTENT_DATA_KEY) { |
3044 | fi = btrfs_item_ptr(leaf, path->slots[0], | 3049 | fi = btrfs_item_ptr(leaf, path->slots[0], |
3045 | struct btrfs_file_extent_item); | 3050 | struct btrfs_file_extent_item); |
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 0af2e3868573..746a7248678e 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/completion.h> | 26 | #include <linux/completion.h> |
27 | #include <linux/backing-dev.h> | 27 | #include <linux/backing-dev.h> |
28 | #include <linux/wait.h> | 28 | #include <linux/wait.h> |
29 | #include <linux/slab.h> | ||
29 | #include <asm/kmap_types.h> | 30 | #include <asm/kmap_types.h> |
30 | #include "extent_io.h" | 31 | #include "extent_io.h" |
31 | #include "extent_map.h" | 32 | #include "extent_map.h" |
@@ -834,7 +835,6 @@ struct btrfs_fs_info { | |||
834 | u64 last_trans_log_full_commit; | 835 | u64 last_trans_log_full_commit; |
835 | u64 open_ioctl_trans; | 836 | u64 open_ioctl_trans; |
836 | unsigned long mount_opt; | 837 | unsigned long mount_opt; |
837 | u64 max_extent; | ||
838 | u64 max_inline; | 838 | u64 max_inline; |
839 | u64 alloc_start; | 839 | u64 alloc_start; |
840 | struct btrfs_transaction *running_transaction; | 840 | struct btrfs_transaction *running_transaction; |
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index 84e6781413b1..902ce507c4e3 100644 --- a/fs/btrfs/delayed-ref.c +++ b/fs/btrfs/delayed-ref.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/sort.h> | 21 | #include <linux/sort.h> |
21 | #include "ctree.h" | 22 | #include "ctree.h" |
22 | #include "delayed-ref.h" | 23 | #include "delayed-ref.h" |
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 11d0ad30e203..e7b8f2c89ccb 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/kthread.h> | 27 | #include <linux/kthread.h> |
28 | #include <linux/freezer.h> | 28 | #include <linux/freezer.h> |
29 | #include <linux/crc32c.h> | 29 | #include <linux/crc32c.h> |
30 | #include <linux/slab.h> | ||
30 | #include "compat.h" | 31 | #include "compat.h" |
31 | #include "ctree.h" | 32 | #include "ctree.h" |
32 | #include "disk-io.h" | 33 | #include "disk-io.h" |
@@ -1634,7 +1635,6 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1634 | atomic_set(&fs_info->async_submit_draining, 0); | 1635 | atomic_set(&fs_info->async_submit_draining, 0); |
1635 | atomic_set(&fs_info->nr_async_bios, 0); | 1636 | atomic_set(&fs_info->nr_async_bios, 0); |
1636 | fs_info->sb = sb; | 1637 | fs_info->sb = sb; |
1637 | fs_info->max_extent = (u64)-1; | ||
1638 | fs_info->max_inline = 8192 * 1024; | 1638 | fs_info->max_inline = 8192 * 1024; |
1639 | fs_info->metadata_ratio = 0; | 1639 | fs_info->metadata_ratio = 0; |
1640 | 1640 | ||
@@ -1922,7 +1922,11 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1922 | 1922 | ||
1923 | csum_root->track_dirty = 1; | 1923 | csum_root->track_dirty = 1; |
1924 | 1924 | ||
1925 | btrfs_read_block_groups(extent_root); | 1925 | ret = btrfs_read_block_groups(extent_root); |
1926 | if (ret) { | ||
1927 | printk(KERN_ERR "Failed to read block groups: %d\n", ret); | ||
1928 | goto fail_block_groups; | ||
1929 | } | ||
1926 | 1930 | ||
1927 | fs_info->generation = generation; | 1931 | fs_info->generation = generation; |
1928 | fs_info->last_trans_committed = generation; | 1932 | fs_info->last_trans_committed = generation; |
@@ -1932,7 +1936,7 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1932 | fs_info->cleaner_kthread = kthread_run(cleaner_kthread, tree_root, | 1936 | fs_info->cleaner_kthread = kthread_run(cleaner_kthread, tree_root, |
1933 | "btrfs-cleaner"); | 1937 | "btrfs-cleaner"); |
1934 | if (IS_ERR(fs_info->cleaner_kthread)) | 1938 | if (IS_ERR(fs_info->cleaner_kthread)) |
1935 | goto fail_csum_root; | 1939 | goto fail_block_groups; |
1936 | 1940 | ||
1937 | fs_info->transaction_kthread = kthread_run(transaction_kthread, | 1941 | fs_info->transaction_kthread = kthread_run(transaction_kthread, |
1938 | tree_root, | 1942 | tree_root, |
@@ -2020,7 +2024,8 @@ fail_cleaner: | |||
2020 | filemap_write_and_wait(fs_info->btree_inode->i_mapping); | 2024 | filemap_write_and_wait(fs_info->btree_inode->i_mapping); |
2021 | invalidate_inode_pages2(fs_info->btree_inode->i_mapping); | 2025 | invalidate_inode_pages2(fs_info->btree_inode->i_mapping); |
2022 | 2026 | ||
2023 | fail_csum_root: | 2027 | fail_block_groups: |
2028 | btrfs_free_block_groups(fs_info); | ||
2024 | free_extent_buffer(csum_root->node); | 2029 | free_extent_buffer(csum_root->node); |
2025 | free_extent_buffer(csum_root->commit_root); | 2030 | free_extent_buffer(csum_root->commit_root); |
2026 | fail_dev_root: | 2031 | fail_dev_root: |
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 1727b26fb194..9e23ffea7f54 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/sort.h> | 22 | #include <linux/sort.h> |
23 | #include <linux/rcupdate.h> | 23 | #include <linux/rcupdate.h> |
24 | #include <linux/kthread.h> | 24 | #include <linux/kthread.h> |
25 | #include <linux/slab.h> | ||
25 | #include "compat.h" | 26 | #include "compat.h" |
26 | #include "hash.h" | 27 | #include "hash.h" |
27 | #include "ctree.h" | 28 | #include "ctree.h" |
@@ -2676,6 +2677,8 @@ static int update_space_info(struct btrfs_fs_info *info, u64 flags, | |||
2676 | 2677 | ||
2677 | INIT_LIST_HEAD(&found->block_groups); | 2678 | INIT_LIST_HEAD(&found->block_groups); |
2678 | init_rwsem(&found->groups_sem); | 2679 | init_rwsem(&found->groups_sem); |
2680 | init_waitqueue_head(&found->flush_wait); | ||
2681 | init_waitqueue_head(&found->allocate_wait); | ||
2679 | spin_lock_init(&found->lock); | 2682 | spin_lock_init(&found->lock); |
2680 | found->flags = flags; | 2683 | found->flags = flags; |
2681 | found->total_bytes = total_bytes; | 2684 | found->total_bytes = total_bytes; |
@@ -2846,7 +2849,7 @@ int btrfs_unreserve_metadata_for_delalloc(struct btrfs_root *root, | |||
2846 | } | 2849 | } |
2847 | spin_unlock(&BTRFS_I(inode)->accounting_lock); | 2850 | spin_unlock(&BTRFS_I(inode)->accounting_lock); |
2848 | 2851 | ||
2849 | BTRFS_I(inode)->reserved_extents--; | 2852 | BTRFS_I(inode)->reserved_extents -= num_items; |
2850 | BUG_ON(BTRFS_I(inode)->reserved_extents < 0); | 2853 | BUG_ON(BTRFS_I(inode)->reserved_extents < 0); |
2851 | 2854 | ||
2852 | if (meta_sinfo->bytes_delalloc < num_bytes) { | 2855 | if (meta_sinfo->bytes_delalloc < num_bytes) { |
@@ -2944,12 +2947,10 @@ static void flush_delalloc(struct btrfs_root *root, | |||
2944 | 2947 | ||
2945 | spin_lock(&info->lock); | 2948 | spin_lock(&info->lock); |
2946 | 2949 | ||
2947 | if (!info->flushing) { | 2950 | if (!info->flushing) |
2948 | info->flushing = 1; | 2951 | info->flushing = 1; |
2949 | init_waitqueue_head(&info->flush_wait); | 2952 | else |
2950 | } else { | ||
2951 | wait = true; | 2953 | wait = true; |
2952 | } | ||
2953 | 2954 | ||
2954 | spin_unlock(&info->lock); | 2955 | spin_unlock(&info->lock); |
2955 | 2956 | ||
@@ -3011,7 +3012,6 @@ static int maybe_allocate_chunk(struct btrfs_root *root, | |||
3011 | if (!info->allocating_chunk) { | 3012 | if (!info->allocating_chunk) { |
3012 | info->force_alloc = 1; | 3013 | info->force_alloc = 1; |
3013 | info->allocating_chunk = 1; | 3014 | info->allocating_chunk = 1; |
3014 | init_waitqueue_head(&info->allocate_wait); | ||
3015 | } else { | 3015 | } else { |
3016 | wait = true; | 3016 | wait = true; |
3017 | } | 3017 | } |
@@ -3111,7 +3111,7 @@ again: | |||
3111 | return -ENOSPC; | 3111 | return -ENOSPC; |
3112 | } | 3112 | } |
3113 | 3113 | ||
3114 | BTRFS_I(inode)->reserved_extents++; | 3114 | BTRFS_I(inode)->reserved_extents += num_items; |
3115 | check_force_delalloc(meta_sinfo); | 3115 | check_force_delalloc(meta_sinfo); |
3116 | spin_unlock(&meta_sinfo->lock); | 3116 | spin_unlock(&meta_sinfo->lock); |
3117 | 3117 | ||
@@ -4170,6 +4170,10 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, | |||
4170 | ins->offset = 0; | 4170 | ins->offset = 0; |
4171 | 4171 | ||
4172 | space_info = __find_space_info(root->fs_info, data); | 4172 | space_info = __find_space_info(root->fs_info, data); |
4173 | if (!space_info) { | ||
4174 | printk(KERN_ERR "No space info for %d\n", data); | ||
4175 | return -ENOSPC; | ||
4176 | } | ||
4173 | 4177 | ||
4174 | if (orig_root->ref_cows || empty_size) | 4178 | if (orig_root->ref_cows || empty_size) |
4175 | allowed_chunk_alloc = 1; | 4179 | allowed_chunk_alloc = 1; |
@@ -5205,6 +5209,8 @@ static noinline int do_walk_down(struct btrfs_trans_handle *trans, | |||
5205 | next = btrfs_find_tree_block(root, bytenr, blocksize); | 5209 | next = btrfs_find_tree_block(root, bytenr, blocksize); |
5206 | if (!next) { | 5210 | if (!next) { |
5207 | next = btrfs_find_create_tree_block(root, bytenr, blocksize); | 5211 | next = btrfs_find_create_tree_block(root, bytenr, blocksize); |
5212 | if (!next) | ||
5213 | return -ENOMEM; | ||
5208 | reada = 1; | 5214 | reada = 1; |
5209 | } | 5215 | } |
5210 | btrfs_tree_lock(next); | 5216 | btrfs_tree_lock(next); |
@@ -5417,7 +5423,8 @@ static noinline int walk_down_tree(struct btrfs_trans_handle *trans, | |||
5417 | if (ret > 0) { | 5423 | if (ret > 0) { |
5418 | path->slots[level]++; | 5424 | path->slots[level]++; |
5419 | continue; | 5425 | continue; |
5420 | } | 5426 | } else if (ret < 0) |
5427 | return ret; | ||
5421 | level = wc->level; | 5428 | level = wc->level; |
5422 | } | 5429 | } |
5423 | return 0; | 5430 | return 0; |
@@ -7369,7 +7376,6 @@ static int find_first_block_group(struct btrfs_root *root, | |||
7369 | } | 7376 | } |
7370 | path->slots[0]++; | 7377 | path->slots[0]++; |
7371 | } | 7378 | } |
7372 | ret = -ENOENT; | ||
7373 | out: | 7379 | out: |
7374 | return ret; | 7380 | return ret; |
7375 | } | 7381 | } |
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index c99121ac5d6b..d2d03684fab2 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -2,7 +2,6 @@ | |||
2 | #include <linux/slab.h> | 2 | #include <linux/slab.h> |
3 | #include <linux/bio.h> | 3 | #include <linux/bio.h> |
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | #include <linux/gfp.h> | ||
6 | #include <linux/pagemap.h> | 5 | #include <linux/pagemap.h> |
7 | #include <linux/page-flags.h> | 6 | #include <linux/page-flags.h> |
8 | #include <linux/module.h> | 7 | #include <linux/module.h> |
@@ -2679,33 +2678,20 @@ int extent_readpages(struct extent_io_tree *tree, | |||
2679 | { | 2678 | { |
2680 | struct bio *bio = NULL; | 2679 | struct bio *bio = NULL; |
2681 | unsigned page_idx; | 2680 | unsigned page_idx; |
2682 | struct pagevec pvec; | ||
2683 | unsigned long bio_flags = 0; | 2681 | unsigned long bio_flags = 0; |
2684 | 2682 | ||
2685 | pagevec_init(&pvec, 0); | ||
2686 | for (page_idx = 0; page_idx < nr_pages; page_idx++) { | 2683 | for (page_idx = 0; page_idx < nr_pages; page_idx++) { |
2687 | struct page *page = list_entry(pages->prev, struct page, lru); | 2684 | struct page *page = list_entry(pages->prev, struct page, lru); |
2688 | 2685 | ||
2689 | prefetchw(&page->flags); | 2686 | prefetchw(&page->flags); |
2690 | list_del(&page->lru); | 2687 | list_del(&page->lru); |
2691 | /* | 2688 | if (!add_to_page_cache_lru(page, mapping, |
2692 | * what we want to do here is call add_to_page_cache_lru, | ||
2693 | * but that isn't exported, so we reproduce it here | ||
2694 | */ | ||
2695 | if (!add_to_page_cache(page, mapping, | ||
2696 | page->index, GFP_KERNEL)) { | 2689 | page->index, GFP_KERNEL)) { |
2697 | |||
2698 | /* open coding of lru_cache_add, also not exported */ | ||
2699 | page_cache_get(page); | ||
2700 | if (!pagevec_add(&pvec, page)) | ||
2701 | __pagevec_lru_add_file(&pvec); | ||
2702 | __extent_read_full_page(tree, page, get_extent, | 2690 | __extent_read_full_page(tree, page, get_extent, |
2703 | &bio, 0, &bio_flags); | 2691 | &bio, 0, &bio_flags); |
2704 | } | 2692 | } |
2705 | page_cache_release(page); | 2693 | page_cache_release(page); |
2706 | } | 2694 | } |
2707 | if (pagevec_count(&pvec)) | ||
2708 | __pagevec_lru_add_file(&pvec); | ||
2709 | BUG_ON(!list_empty(pages)); | 2695 | BUG_ON(!list_empty(pages)); |
2710 | if (bio) | 2696 | if (bio) |
2711 | submit_one_bio(READ, bio, 0, bio_flags); | 2697 | submit_one_bio(READ, bio, 0, bio_flags); |
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 28d87ba60ce8..454ca52d6451 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c | |||
@@ -1,5 +1,4 @@ | |||
1 | #include <linux/err.h> | 1 | #include <linux/err.h> |
2 | #include <linux/gfp.h> | ||
3 | #include <linux/slab.h> | 2 | #include <linux/slab.h> |
4 | #include <linux/module.h> | 3 | #include <linux/module.h> |
5 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 9b99886562d0..54a255065aa3 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/bio.h> | 19 | #include <linux/bio.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/pagemap.h> | 21 | #include <linux/pagemap.h> |
21 | #include <linux/highmem.h> | 22 | #include <linux/highmem.h> |
22 | #include "ctree.h" | 23 | #include "ctree.h" |
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index ee3323c7fc1c..29ff749ff4ca 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/writeback.h> | 28 | #include <linux/writeback.h> |
29 | #include <linux/statfs.h> | 29 | #include <linux/statfs.h> |
30 | #include <linux/compat.h> | 30 | #include <linux/compat.h> |
31 | #include <linux/slab.h> | ||
31 | #include "ctree.h" | 32 | #include "ctree.h" |
32 | #include "disk-io.h" | 33 | #include "disk-io.h" |
33 | #include "transaction.h" | 34 | #include "transaction.h" |
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index dd831ed31eea..f488fac04d99 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/pagemap.h> | 19 | #include <linux/pagemap.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/math64.h> | 22 | #include <linux/math64.h> |
22 | #include "ctree.h" | 23 | #include "ctree.h" |
23 | #include "free-space-cache.h" | 24 | #include "free-space-cache.h" |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 02bb099845fd..2bfdc641d4e3 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/xattr.h> | 36 | #include <linux/xattr.h> |
37 | #include <linux/posix_acl.h> | 37 | #include <linux/posix_acl.h> |
38 | #include <linux/falloc.h> | 38 | #include <linux/falloc.h> |
39 | #include <linux/slab.h> | ||
39 | #include "compat.h" | 40 | #include "compat.h" |
40 | #include "ctree.h" | 41 | #include "ctree.h" |
41 | #include "disk-io.h" | 42 | #include "disk-io.h" |
@@ -796,7 +797,7 @@ static noinline int cow_file_range(struct inode *inode, | |||
796 | while (disk_num_bytes > 0) { | 797 | while (disk_num_bytes > 0) { |
797 | unsigned long op; | 798 | unsigned long op; |
798 | 799 | ||
799 | cur_alloc_size = min(disk_num_bytes, root->fs_info->max_extent); | 800 | cur_alloc_size = disk_num_bytes; |
800 | ret = btrfs_reserve_extent(trans, root, cur_alloc_size, | 801 | ret = btrfs_reserve_extent(trans, root, cur_alloc_size, |
801 | root->sectorsize, 0, alloc_hint, | 802 | root->sectorsize, 0, alloc_hint, |
802 | (u64)-1, &ins, 1); | 803 | (u64)-1, &ins, 1); |
@@ -1227,30 +1228,9 @@ static int run_delalloc_range(struct inode *inode, struct page *locked_page, | |||
1227 | static int btrfs_split_extent_hook(struct inode *inode, | 1228 | static int btrfs_split_extent_hook(struct inode *inode, |
1228 | struct extent_state *orig, u64 split) | 1229 | struct extent_state *orig, u64 split) |
1229 | { | 1230 | { |
1230 | struct btrfs_root *root = BTRFS_I(inode)->root; | ||
1231 | u64 size; | ||
1232 | |||
1233 | if (!(orig->state & EXTENT_DELALLOC)) | 1231 | if (!(orig->state & EXTENT_DELALLOC)) |
1234 | return 0; | 1232 | return 0; |
1235 | 1233 | ||
1236 | size = orig->end - orig->start + 1; | ||
1237 | if (size > root->fs_info->max_extent) { | ||
1238 | u64 num_extents; | ||
1239 | u64 new_size; | ||
1240 | |||
1241 | new_size = orig->end - split + 1; | ||
1242 | num_extents = div64_u64(size + root->fs_info->max_extent - 1, | ||
1243 | root->fs_info->max_extent); | ||
1244 | |||
1245 | /* | ||
1246 | * if we break a large extent up then leave oustanding_extents | ||
1247 | * be, since we've already accounted for the large extent. | ||
1248 | */ | ||
1249 | if (div64_u64(new_size + root->fs_info->max_extent - 1, | ||
1250 | root->fs_info->max_extent) < num_extents) | ||
1251 | return 0; | ||
1252 | } | ||
1253 | |||
1254 | spin_lock(&BTRFS_I(inode)->accounting_lock); | 1234 | spin_lock(&BTRFS_I(inode)->accounting_lock); |
1255 | BTRFS_I(inode)->outstanding_extents++; | 1235 | BTRFS_I(inode)->outstanding_extents++; |
1256 | spin_unlock(&BTRFS_I(inode)->accounting_lock); | 1236 | spin_unlock(&BTRFS_I(inode)->accounting_lock); |
@@ -1268,38 +1248,10 @@ static int btrfs_merge_extent_hook(struct inode *inode, | |||
1268 | struct extent_state *new, | 1248 | struct extent_state *new, |
1269 | struct extent_state *other) | 1249 | struct extent_state *other) |
1270 | { | 1250 | { |
1271 | struct btrfs_root *root = BTRFS_I(inode)->root; | ||
1272 | u64 new_size, old_size; | ||
1273 | u64 num_extents; | ||
1274 | |||
1275 | /* not delalloc, ignore it */ | 1251 | /* not delalloc, ignore it */ |
1276 | if (!(other->state & EXTENT_DELALLOC)) | 1252 | if (!(other->state & EXTENT_DELALLOC)) |
1277 | return 0; | 1253 | return 0; |
1278 | 1254 | ||
1279 | old_size = other->end - other->start + 1; | ||
1280 | if (new->start < other->start) | ||
1281 | new_size = other->end - new->start + 1; | ||
1282 | else | ||
1283 | new_size = new->end - other->start + 1; | ||
1284 | |||
1285 | /* we're not bigger than the max, unreserve the space and go */ | ||
1286 | if (new_size <= root->fs_info->max_extent) { | ||
1287 | spin_lock(&BTRFS_I(inode)->accounting_lock); | ||
1288 | BTRFS_I(inode)->outstanding_extents--; | ||
1289 | spin_unlock(&BTRFS_I(inode)->accounting_lock); | ||
1290 | return 0; | ||
1291 | } | ||
1292 | |||
1293 | /* | ||
1294 | * If we grew by another max_extent, just return, we want to keep that | ||
1295 | * reserved amount. | ||
1296 | */ | ||
1297 | num_extents = div64_u64(old_size + root->fs_info->max_extent - 1, | ||
1298 | root->fs_info->max_extent); | ||
1299 | if (div64_u64(new_size + root->fs_info->max_extent - 1, | ||
1300 | root->fs_info->max_extent) > num_extents) | ||
1301 | return 0; | ||
1302 | |||
1303 | spin_lock(&BTRFS_I(inode)->accounting_lock); | 1255 | spin_lock(&BTRFS_I(inode)->accounting_lock); |
1304 | BTRFS_I(inode)->outstanding_extents--; | 1256 | BTRFS_I(inode)->outstanding_extents--; |
1305 | spin_unlock(&BTRFS_I(inode)->accounting_lock); | 1257 | spin_unlock(&BTRFS_I(inode)->accounting_lock); |
@@ -1328,6 +1280,7 @@ static int btrfs_set_bit_hook(struct inode *inode, u64 start, u64 end, | |||
1328 | BTRFS_I(inode)->outstanding_extents++; | 1280 | BTRFS_I(inode)->outstanding_extents++; |
1329 | spin_unlock(&BTRFS_I(inode)->accounting_lock); | 1281 | spin_unlock(&BTRFS_I(inode)->accounting_lock); |
1330 | btrfs_delalloc_reserve_space(root, inode, end - start + 1); | 1282 | btrfs_delalloc_reserve_space(root, inode, end - start + 1); |
1283 | |||
1331 | spin_lock(&root->fs_info->delalloc_lock); | 1284 | spin_lock(&root->fs_info->delalloc_lock); |
1332 | BTRFS_I(inode)->delalloc_bytes += end - start + 1; | 1285 | BTRFS_I(inode)->delalloc_bytes += end - start + 1; |
1333 | root->fs_info->delalloc_bytes += end - start + 1; | 1286 | root->fs_info->delalloc_bytes += end - start + 1; |
@@ -1356,6 +1309,7 @@ static int btrfs_clear_bit_hook(struct inode *inode, | |||
1356 | 1309 | ||
1357 | if (bits & EXTENT_DO_ACCOUNTING) { | 1310 | if (bits & EXTENT_DO_ACCOUNTING) { |
1358 | spin_lock(&BTRFS_I(inode)->accounting_lock); | 1311 | spin_lock(&BTRFS_I(inode)->accounting_lock); |
1312 | WARN_ON(!BTRFS_I(inode)->outstanding_extents); | ||
1359 | BTRFS_I(inode)->outstanding_extents--; | 1313 | BTRFS_I(inode)->outstanding_extents--; |
1360 | spin_unlock(&BTRFS_I(inode)->accounting_lock); | 1314 | spin_unlock(&BTRFS_I(inode)->accounting_lock); |
1361 | btrfs_unreserve_metadata_for_delalloc(root, inode, 1); | 1315 | btrfs_unreserve_metadata_for_delalloc(root, inode, 1); |
@@ -5384,7 +5338,6 @@ free: | |||
5384 | void btrfs_drop_inode(struct inode *inode) | 5338 | void btrfs_drop_inode(struct inode *inode) |
5385 | { | 5339 | { |
5386 | struct btrfs_root *root = BTRFS_I(inode)->root; | 5340 | struct btrfs_root *root = BTRFS_I(inode)->root; |
5387 | |||
5388 | if (inode->i_nlink > 0 && btrfs_root_refs(&root->root_item) == 0) | 5341 | if (inode->i_nlink > 0 && btrfs_root_refs(&root->root_item) == 0) |
5389 | generic_delete_inode(inode); | 5342 | generic_delete_inode(inode); |
5390 | else | 5343 | else |
@@ -5788,18 +5741,15 @@ static int prealloc_file_range(struct inode *inode, u64 start, u64 end, | |||
5788 | struct btrfs_trans_handle *trans; | 5741 | struct btrfs_trans_handle *trans; |
5789 | struct btrfs_root *root = BTRFS_I(inode)->root; | 5742 | struct btrfs_root *root = BTRFS_I(inode)->root; |
5790 | struct btrfs_key ins; | 5743 | struct btrfs_key ins; |
5791 | u64 alloc_size; | ||
5792 | u64 cur_offset = start; | 5744 | u64 cur_offset = start; |
5793 | u64 num_bytes = end - start; | 5745 | u64 num_bytes = end - start; |
5794 | int ret = 0; | 5746 | int ret = 0; |
5795 | u64 i_size; | 5747 | u64 i_size; |
5796 | 5748 | ||
5797 | while (num_bytes > 0) { | 5749 | while (num_bytes > 0) { |
5798 | alloc_size = min(num_bytes, root->fs_info->max_extent); | ||
5799 | |||
5800 | trans = btrfs_start_transaction(root, 1); | 5750 | trans = btrfs_start_transaction(root, 1); |
5801 | 5751 | ||
5802 | ret = btrfs_reserve_extent(trans, root, alloc_size, | 5752 | ret = btrfs_reserve_extent(trans, root, num_bytes, |
5803 | root->sectorsize, 0, alloc_hint, | 5753 | root->sectorsize, 0, alloc_hint, |
5804 | (u64)-1, &ins, 1); | 5754 | (u64)-1, &ins, 1); |
5805 | if (ret) { | 5755 | if (ret) { |
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 2845c6ceecd2..e84ef60ffe35 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/security.h> | 39 | #include <linux/security.h> |
40 | #include <linux/xattr.h> | 40 | #include <linux/xattr.h> |
41 | #include <linux/vmalloc.h> | 41 | #include <linux/vmalloc.h> |
42 | #include <linux/slab.h> | ||
42 | #include "compat.h" | 43 | #include "compat.h" |
43 | #include "ctree.h" | 44 | #include "ctree.h" |
44 | #include "disk-io.h" | 45 | #include "disk-io.h" |
@@ -48,7 +49,6 @@ | |||
48 | #include "print-tree.h" | 49 | #include "print-tree.h" |
49 | #include "volumes.h" | 50 | #include "volumes.h" |
50 | #include "locking.h" | 51 | #include "locking.h" |
51 | #include "ctree.h" | ||
52 | 52 | ||
53 | /* Mask out flags that are inappropriate for the given type of inode. */ | 53 | /* Mask out flags that are inappropriate for the given type of inode. */ |
54 | static inline __u32 btrfs_mask_flags(umode_t mode, __u32 flags) | 54 | static inline __u32 btrfs_mask_flags(umode_t mode, __u32 flags) |
@@ -511,7 +511,7 @@ static int should_defrag_range(struct inode *inode, u64 start, u64 len, | |||
511 | em = btrfs_get_extent(inode, NULL, 0, start, len, 0); | 511 | em = btrfs_get_extent(inode, NULL, 0, start, len, 0); |
512 | unlock_extent(io_tree, start, start + len - 1, GFP_NOFS); | 512 | unlock_extent(io_tree, start, start + len - 1, GFP_NOFS); |
513 | 513 | ||
514 | if (!em) | 514 | if (IS_ERR(em)) |
515 | return 0; | 515 | return 0; |
516 | } | 516 | } |
517 | 517 | ||
@@ -1212,6 +1212,9 @@ static noinline int btrfs_ioctl_ino_lookup(struct file *file, | |||
1212 | return -EPERM; | 1212 | return -EPERM; |
1213 | 1213 | ||
1214 | args = kmalloc(sizeof(*args), GFP_KERNEL); | 1214 | args = kmalloc(sizeof(*args), GFP_KERNEL); |
1215 | if (!args) | ||
1216 | return -ENOMEM; | ||
1217 | |||
1215 | if (copy_from_user(args, argp, sizeof(*args))) { | 1218 | if (copy_from_user(args, argp, sizeof(*args))) { |
1216 | kfree(args); | 1219 | kfree(args); |
1217 | return -EFAULT; | 1220 | return -EFAULT; |
@@ -1375,6 +1378,7 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp) | |||
1375 | sizeof(*range))) { | 1378 | sizeof(*range))) { |
1376 | ret = -EFAULT; | 1379 | ret = -EFAULT; |
1377 | kfree(range); | 1380 | kfree(range); |
1381 | goto out; | ||
1378 | } | 1382 | } |
1379 | /* compression requires us to start the IO */ | 1383 | /* compression requires us to start the IO */ |
1380 | if ((range->flags & BTRFS_DEFRAG_RANGE_COMPRESS)) { | 1384 | if ((range->flags & BTRFS_DEFRAG_RANGE_COMPRESS)) { |
diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c index 1c36e5cd8f55..6151f2ea38bb 100644 --- a/fs/btrfs/locking.c +++ b/fs/btrfs/locking.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * Boston, MA 021110-1307, USA. | 16 | * Boston, MA 021110-1307, USA. |
17 | */ | 17 | */ |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/gfp.h> | ||
20 | #include <linux/pagemap.h> | 19 | #include <linux/pagemap.h> |
21 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
22 | #include <linux/page-flags.h> | 21 | #include <linux/page-flags.h> |
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c index a8ffecd0b491..a127c0ebb2dc 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * Boston, MA 021110-1307, USA. | 16 | * Boston, MA 021110-1307, USA. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/gfp.h> | ||
20 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
21 | #include <linux/blkdev.h> | 20 | #include <linux/blkdev.h> |
22 | #include <linux/writeback.h> | 21 | #include <linux/writeback.h> |
@@ -303,6 +302,7 @@ static int __btrfs_remove_ordered_extent(struct inode *inode, | |||
303 | struct btrfs_ordered_extent *entry) | 302 | struct btrfs_ordered_extent *entry) |
304 | { | 303 | { |
305 | struct btrfs_ordered_inode_tree *tree; | 304 | struct btrfs_ordered_inode_tree *tree; |
305 | struct btrfs_root *root = BTRFS_I(inode)->root; | ||
306 | struct rb_node *node; | 306 | struct rb_node *node; |
307 | 307 | ||
308 | tree = &BTRFS_I(inode)->ordered_tree; | 308 | tree = &BTRFS_I(inode)->ordered_tree; |
@@ -312,12 +312,13 @@ static int __btrfs_remove_ordered_extent(struct inode *inode, | |||
312 | set_bit(BTRFS_ORDERED_COMPLETE, &entry->flags); | 312 | set_bit(BTRFS_ORDERED_COMPLETE, &entry->flags); |
313 | 313 | ||
314 | spin_lock(&BTRFS_I(inode)->accounting_lock); | 314 | spin_lock(&BTRFS_I(inode)->accounting_lock); |
315 | WARN_ON(!BTRFS_I(inode)->outstanding_extents); | ||
315 | BTRFS_I(inode)->outstanding_extents--; | 316 | BTRFS_I(inode)->outstanding_extents--; |
316 | spin_unlock(&BTRFS_I(inode)->accounting_lock); | 317 | spin_unlock(&BTRFS_I(inode)->accounting_lock); |
317 | btrfs_unreserve_metadata_for_delalloc(BTRFS_I(inode)->root, | 318 | btrfs_unreserve_metadata_for_delalloc(BTRFS_I(inode)->root, |
318 | inode, 1); | 319 | inode, 1); |
319 | 320 | ||
320 | spin_lock(&BTRFS_I(inode)->root->fs_info->ordered_extent_lock); | 321 | spin_lock(&root->fs_info->ordered_extent_lock); |
321 | list_del_init(&entry->root_extent_list); | 322 | list_del_init(&entry->root_extent_list); |
322 | 323 | ||
323 | /* | 324 | /* |
@@ -329,7 +330,7 @@ static int __btrfs_remove_ordered_extent(struct inode *inode, | |||
329 | !mapping_tagged(inode->i_mapping, PAGECACHE_TAG_DIRTY)) { | 330 | !mapping_tagged(inode->i_mapping, PAGECACHE_TAG_DIRTY)) { |
330 | list_del_init(&BTRFS_I(inode)->ordered_operations); | 331 | list_del_init(&BTRFS_I(inode)->ordered_operations); |
331 | } | 332 | } |
332 | spin_unlock(&BTRFS_I(inode)->root->fs_info->ordered_extent_lock); | 333 | spin_unlock(&root->fs_info->ordered_extent_lock); |
333 | 334 | ||
334 | return 0; | 335 | return 0; |
335 | } | 336 | } |
diff --git a/fs/btrfs/ref-cache.c b/fs/btrfs/ref-cache.c index d0cc62bccb94..a97314cf6bd6 100644 --- a/fs/btrfs/ref-cache.c +++ b/fs/btrfs/ref-cache.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/sort.h> | 21 | #include <linux/sort.h> |
21 | #include "ctree.h" | 22 | #include "ctree.h" |
22 | #include "ref-cache.h" | 23 | #include "ref-cache.h" |
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 0b23942cbc0d..e558dd941ded 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/writeback.h> | 21 | #include <linux/writeback.h> |
22 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
23 | #include <linux/rbtree.h> | 23 | #include <linux/rbtree.h> |
24 | #include <linux/slab.h> | ||
24 | #include "ctree.h" | 25 | #include "ctree.h" |
25 | #include "disk-io.h" | 26 | #include "disk-io.h" |
26 | #include "transaction.h" | 27 | #include "transaction.h" |
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 9ac612e6ca60..1866dff0538e 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/namei.h> | 38 | #include <linux/namei.h> |
39 | #include <linux/miscdevice.h> | 39 | #include <linux/miscdevice.h> |
40 | #include <linux/magic.h> | 40 | #include <linux/magic.h> |
41 | #include <linux/slab.h> | ||
41 | #include "compat.h" | 42 | #include "compat.h" |
42 | #include "ctree.h" | 43 | #include "ctree.h" |
43 | #include "disk-io.h" | 44 | #include "disk-io.h" |
@@ -64,10 +65,9 @@ static void btrfs_put_super(struct super_block *sb) | |||
64 | 65 | ||
65 | enum { | 66 | enum { |
66 | Opt_degraded, Opt_subvol, Opt_subvolid, Opt_device, Opt_nodatasum, | 67 | Opt_degraded, Opt_subvol, Opt_subvolid, Opt_device, Opt_nodatasum, |
67 | Opt_nodatacow, Opt_max_extent, Opt_max_inline, Opt_alloc_start, | 68 | Opt_nodatacow, Opt_max_inline, Opt_alloc_start, Opt_nobarrier, Opt_ssd, |
68 | Opt_nobarrier, Opt_ssd, Opt_nossd, Opt_ssd_spread, Opt_thread_pool, | 69 | Opt_nossd, Opt_ssd_spread, Opt_thread_pool, Opt_noacl, Opt_compress, |
69 | Opt_noacl, Opt_compress, Opt_compress_force, Opt_notreelog, Opt_ratio, | 70 | Opt_compress_force, Opt_notreelog, Opt_ratio, Opt_flushoncommit, |
70 | Opt_flushoncommit, | ||
71 | Opt_discard, Opt_err, | 71 | Opt_discard, Opt_err, |
72 | }; | 72 | }; |
73 | 73 | ||
@@ -79,7 +79,6 @@ static match_table_t tokens = { | |||
79 | {Opt_nodatasum, "nodatasum"}, | 79 | {Opt_nodatasum, "nodatasum"}, |
80 | {Opt_nodatacow, "nodatacow"}, | 80 | {Opt_nodatacow, "nodatacow"}, |
81 | {Opt_nobarrier, "nobarrier"}, | 81 | {Opt_nobarrier, "nobarrier"}, |
82 | {Opt_max_extent, "max_extent=%s"}, | ||
83 | {Opt_max_inline, "max_inline=%s"}, | 82 | {Opt_max_inline, "max_inline=%s"}, |
84 | {Opt_alloc_start, "alloc_start=%s"}, | 83 | {Opt_alloc_start, "alloc_start=%s"}, |
85 | {Opt_thread_pool, "thread_pool=%d"}, | 84 | {Opt_thread_pool, "thread_pool=%d"}, |
@@ -188,18 +187,6 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) | |||
188 | info->thread_pool_size); | 187 | info->thread_pool_size); |
189 | } | 188 | } |
190 | break; | 189 | break; |
191 | case Opt_max_extent: | ||
192 | num = match_strdup(&args[0]); | ||
193 | if (num) { | ||
194 | info->max_extent = memparse(num, NULL); | ||
195 | kfree(num); | ||
196 | |||
197 | info->max_extent = max_t(u64, | ||
198 | info->max_extent, root->sectorsize); | ||
199 | printk(KERN_INFO "btrfs: max_extent at %llu\n", | ||
200 | (unsigned long long)info->max_extent); | ||
201 | } | ||
202 | break; | ||
203 | case Opt_max_inline: | 190 | case Opt_max_inline: |
204 | num = match_strdup(&args[0]); | 191 | num = match_strdup(&args[0]); |
205 | if (num) { | 192 | if (num) { |
@@ -529,9 +516,6 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
529 | seq_puts(seq, ",nodatacow"); | 516 | seq_puts(seq, ",nodatacow"); |
530 | if (btrfs_test_opt(root, NOBARRIER)) | 517 | if (btrfs_test_opt(root, NOBARRIER)) |
531 | seq_puts(seq, ",nobarrier"); | 518 | seq_puts(seq, ",nobarrier"); |
532 | if (info->max_extent != (u64)-1) | ||
533 | seq_printf(seq, ",max_extent=%llu", | ||
534 | (unsigned long long)info->max_extent); | ||
535 | if (info->max_inline != 8192 * 1024) | 519 | if (info->max_inline != 8192 * 1024) |
536 | seq_printf(seq, ",max_inline=%llu", | 520 | seq_printf(seq, ",max_inline=%llu", |
537 | (unsigned long long)info->max_inline); | 521 | (unsigned long long)info->max_inline); |
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 2d654c1c794d..2cb116099b90 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
21 | #include <linux/writeback.h> | 22 | #include <linux/writeback.h> |
22 | #include <linux/pagemap.h> | 23 | #include <linux/pagemap.h> |
@@ -147,18 +148,13 @@ static void wait_current_trans(struct btrfs_root *root) | |||
147 | while (1) { | 148 | while (1) { |
148 | prepare_to_wait(&root->fs_info->transaction_wait, &wait, | 149 | prepare_to_wait(&root->fs_info->transaction_wait, &wait, |
149 | TASK_UNINTERRUPTIBLE); | 150 | TASK_UNINTERRUPTIBLE); |
150 | if (cur_trans->blocked) { | 151 | if (!cur_trans->blocked) |
151 | mutex_unlock(&root->fs_info->trans_mutex); | ||
152 | schedule(); | ||
153 | mutex_lock(&root->fs_info->trans_mutex); | ||
154 | finish_wait(&root->fs_info->transaction_wait, | ||
155 | &wait); | ||
156 | } else { | ||
157 | finish_wait(&root->fs_info->transaction_wait, | ||
158 | &wait); | ||
159 | break; | 152 | break; |
160 | } | 153 | mutex_unlock(&root->fs_info->trans_mutex); |
154 | schedule(); | ||
155 | mutex_lock(&root->fs_info->trans_mutex); | ||
161 | } | 156 | } |
157 | finish_wait(&root->fs_info->transaction_wait, &wait); | ||
162 | put_transaction(cur_trans); | 158 | put_transaction(cur_trans); |
163 | } | 159 | } |
164 | } | 160 | } |
@@ -760,10 +756,17 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, | |||
760 | struct btrfs_root_item *new_root_item; | 756 | struct btrfs_root_item *new_root_item; |
761 | struct btrfs_root *tree_root = fs_info->tree_root; | 757 | struct btrfs_root *tree_root = fs_info->tree_root; |
762 | struct btrfs_root *root = pending->root; | 758 | struct btrfs_root *root = pending->root; |
759 | struct btrfs_root *parent_root; | ||
760 | struct inode *parent_inode; | ||
763 | struct extent_buffer *tmp; | 761 | struct extent_buffer *tmp; |
764 | struct extent_buffer *old; | 762 | struct extent_buffer *old; |
765 | int ret; | 763 | int ret; |
766 | u64 objectid; | 764 | u64 objectid; |
765 | int namelen; | ||
766 | u64 index = 0; | ||
767 | |||
768 | parent_inode = pending->dentry->d_parent->d_inode; | ||
769 | parent_root = BTRFS_I(parent_inode)->root; | ||
767 | 770 | ||
768 | new_root_item = kmalloc(sizeof(*new_root_item), GFP_NOFS); | 771 | new_root_item = kmalloc(sizeof(*new_root_item), GFP_NOFS); |
769 | if (!new_root_item) { | 772 | if (!new_root_item) { |
@@ -774,79 +777,59 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, | |||
774 | if (ret) | 777 | if (ret) |
775 | goto fail; | 778 | goto fail; |
776 | 779 | ||
777 | record_root_in_trans(trans, root); | ||
778 | btrfs_set_root_last_snapshot(&root->root_item, trans->transid); | ||
779 | memcpy(new_root_item, &root->root_item, sizeof(*new_root_item)); | ||
780 | |||
781 | key.objectid = objectid; | 780 | key.objectid = objectid; |
782 | /* record when the snapshot was created in key.offset */ | 781 | /* record when the snapshot was created in key.offset */ |
783 | key.offset = trans->transid; | 782 | key.offset = trans->transid; |
784 | btrfs_set_key_type(&key, BTRFS_ROOT_ITEM_KEY); | 783 | btrfs_set_key_type(&key, BTRFS_ROOT_ITEM_KEY); |
785 | 784 | ||
786 | old = btrfs_lock_root_node(root); | ||
787 | btrfs_cow_block(trans, root, old, NULL, 0, &old); | ||
788 | btrfs_set_lock_blocking(old); | ||
789 | |||
790 | btrfs_copy_root(trans, root, old, &tmp, objectid); | ||
791 | btrfs_tree_unlock(old); | ||
792 | free_extent_buffer(old); | ||
793 | |||
794 | btrfs_set_root_node(new_root_item, tmp); | ||
795 | ret = btrfs_insert_root(trans, root->fs_info->tree_root, &key, | ||
796 | new_root_item); | ||
797 | btrfs_tree_unlock(tmp); | ||
798 | free_extent_buffer(tmp); | ||
799 | if (ret) | ||
800 | goto fail; | ||
801 | |||
802 | key.offset = (u64)-1; | ||
803 | memcpy(&pending->root_key, &key, sizeof(key)); | 785 | memcpy(&pending->root_key, &key, sizeof(key)); |
804 | fail: | 786 | pending->root_key.offset = (u64)-1; |
805 | kfree(new_root_item); | ||
806 | return ret; | ||
807 | } | ||
808 | |||
809 | static noinline int finish_pending_snapshot(struct btrfs_fs_info *fs_info, | ||
810 | struct btrfs_pending_snapshot *pending) | ||
811 | { | ||
812 | int ret; | ||
813 | int namelen; | ||
814 | u64 index = 0; | ||
815 | struct btrfs_trans_handle *trans; | ||
816 | struct inode *parent_inode; | ||
817 | struct btrfs_root *parent_root; | ||
818 | |||
819 | parent_inode = pending->dentry->d_parent->d_inode; | ||
820 | parent_root = BTRFS_I(parent_inode)->root; | ||
821 | trans = btrfs_join_transaction(parent_root, 1); | ||
822 | 787 | ||
788 | record_root_in_trans(trans, parent_root); | ||
823 | /* | 789 | /* |
824 | * insert the directory item | 790 | * insert the directory item |
825 | */ | 791 | */ |
826 | namelen = strlen(pending->name); | 792 | namelen = strlen(pending->name); |
827 | ret = btrfs_set_inode_index(parent_inode, &index); | 793 | ret = btrfs_set_inode_index(parent_inode, &index); |
794 | BUG_ON(ret); | ||
828 | ret = btrfs_insert_dir_item(trans, parent_root, | 795 | ret = btrfs_insert_dir_item(trans, parent_root, |
829 | pending->name, namelen, | 796 | pending->name, namelen, |
830 | parent_inode->i_ino, | 797 | parent_inode->i_ino, |
831 | &pending->root_key, BTRFS_FT_DIR, index); | 798 | &pending->root_key, BTRFS_FT_DIR, index); |
832 | 799 | BUG_ON(ret); | |
833 | if (ret) | ||
834 | goto fail; | ||
835 | 800 | ||
836 | btrfs_i_size_write(parent_inode, parent_inode->i_size + namelen * 2); | 801 | btrfs_i_size_write(parent_inode, parent_inode->i_size + namelen * 2); |
837 | ret = btrfs_update_inode(trans, parent_root, parent_inode); | 802 | ret = btrfs_update_inode(trans, parent_root, parent_inode); |
838 | BUG_ON(ret); | 803 | BUG_ON(ret); |
839 | 804 | ||
805 | record_root_in_trans(trans, root); | ||
806 | btrfs_set_root_last_snapshot(&root->root_item, trans->transid); | ||
807 | memcpy(new_root_item, &root->root_item, sizeof(*new_root_item)); | ||
808 | |||
809 | old = btrfs_lock_root_node(root); | ||
810 | btrfs_cow_block(trans, root, old, NULL, 0, &old); | ||
811 | btrfs_set_lock_blocking(old); | ||
812 | |||
813 | btrfs_copy_root(trans, root, old, &tmp, objectid); | ||
814 | btrfs_tree_unlock(old); | ||
815 | free_extent_buffer(old); | ||
816 | |||
817 | btrfs_set_root_node(new_root_item, tmp); | ||
818 | ret = btrfs_insert_root(trans, root->fs_info->tree_root, &key, | ||
819 | new_root_item); | ||
820 | BUG_ON(ret); | ||
821 | btrfs_tree_unlock(tmp); | ||
822 | free_extent_buffer(tmp); | ||
823 | |||
840 | ret = btrfs_add_root_ref(trans, parent_root->fs_info->tree_root, | 824 | ret = btrfs_add_root_ref(trans, parent_root->fs_info->tree_root, |
841 | pending->root_key.objectid, | 825 | pending->root_key.objectid, |
842 | parent_root->root_key.objectid, | 826 | parent_root->root_key.objectid, |
843 | parent_inode->i_ino, index, pending->name, | 827 | parent_inode->i_ino, index, pending->name, |
844 | namelen); | 828 | namelen); |
845 | |||
846 | BUG_ON(ret); | 829 | BUG_ON(ret); |
847 | 830 | ||
848 | fail: | 831 | fail: |
849 | btrfs_end_transaction(trans, fs_info->fs_root); | 832 | kfree(new_root_item); |
850 | return ret; | 833 | return ret; |
851 | } | 834 | } |
852 | 835 | ||
@@ -867,25 +850,6 @@ static noinline int create_pending_snapshots(struct btrfs_trans_handle *trans, | |||
867 | return 0; | 850 | return 0; |
868 | } | 851 | } |
869 | 852 | ||
870 | static noinline int finish_pending_snapshots(struct btrfs_trans_handle *trans, | ||
871 | struct btrfs_fs_info *fs_info) | ||
872 | { | ||
873 | struct btrfs_pending_snapshot *pending; | ||
874 | struct list_head *head = &trans->transaction->pending_snapshots; | ||
875 | int ret; | ||
876 | |||
877 | while (!list_empty(head)) { | ||
878 | pending = list_entry(head->next, | ||
879 | struct btrfs_pending_snapshot, list); | ||
880 | ret = finish_pending_snapshot(fs_info, pending); | ||
881 | BUG_ON(ret); | ||
882 | list_del(&pending->list); | ||
883 | kfree(pending->name); | ||
884 | kfree(pending); | ||
885 | } | ||
886 | return 0; | ||
887 | } | ||
888 | |||
889 | static void update_super_roots(struct btrfs_root *root) | 853 | static void update_super_roots(struct btrfs_root *root) |
890 | { | 854 | { |
891 | struct btrfs_root_item *root_item; | 855 | struct btrfs_root_item *root_item; |
@@ -1097,9 +1061,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
1097 | 1061 | ||
1098 | btrfs_finish_extent_commit(trans, root); | 1062 | btrfs_finish_extent_commit(trans, root); |
1099 | 1063 | ||
1100 | /* do the directory inserts of any pending snapshot creations */ | ||
1101 | finish_pending_snapshots(trans, root->fs_info); | ||
1102 | |||
1103 | mutex_lock(&root->fs_info->trans_mutex); | 1064 | mutex_lock(&root->fs_info->trans_mutex); |
1104 | 1065 | ||
1105 | cur_trans->commit_done = 1; | 1066 | cur_trans->commit_done = 1; |
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 1255fcc8ade5..af57dd2b43d4 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
20 | #include <linux/slab.h> | ||
20 | #include "ctree.h" | 21 | #include "ctree.h" |
21 | #include "transaction.h" | 22 | #include "transaction.h" |
22 | #include "disk-io.h" | 23 | #include "disk-io.h" |
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 9df8e3f1ccab..aa7dc36dac78 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/bio.h> | 19 | #include <linux/bio.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/buffer_head.h> | 21 | #include <linux/buffer_head.h> |
21 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
22 | #include <linux/random.h> | 23 | #include <linux/random.h> |
@@ -2198,9 +2199,9 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, | |||
2198 | min_stripes = 2; | 2199 | min_stripes = 2; |
2199 | } | 2200 | } |
2200 | if (type & (BTRFS_BLOCK_GROUP_RAID1)) { | 2201 | if (type & (BTRFS_BLOCK_GROUP_RAID1)) { |
2201 | num_stripes = min_t(u64, 2, fs_devices->rw_devices); | 2202 | if (fs_devices->rw_devices < 2) |
2202 | if (num_stripes < 2) | ||
2203 | return -ENOSPC; | 2203 | return -ENOSPC; |
2204 | num_stripes = 2; | ||
2204 | min_stripes = 2; | 2205 | min_stripes = 2; |
2205 | } | 2206 | } |
2206 | if (type & (BTRFS_BLOCK_GROUP_RAID10)) { | 2207 | if (type & (BTRFS_BLOCK_GROUP_RAID10)) { |
@@ -2244,8 +2245,10 @@ again: | |||
2244 | do_div(calc_size, stripe_len); | 2245 | do_div(calc_size, stripe_len); |
2245 | calc_size *= stripe_len; | 2246 | calc_size *= stripe_len; |
2246 | } | 2247 | } |
2248 | |||
2247 | /* we don't want tiny stripes */ | 2249 | /* we don't want tiny stripes */ |
2248 | calc_size = max_t(u64, min_stripe_size, calc_size); | 2250 | if (!looped) |
2251 | calc_size = max_t(u64, min_stripe_size, calc_size); | ||
2249 | 2252 | ||
2250 | do_div(calc_size, stripe_len); | 2253 | do_div(calc_size, stripe_len); |
2251 | calc_size *= stripe_len; | 2254 | calc_size *= stripe_len; |
@@ -3389,6 +3392,8 @@ int btrfs_read_chunk_tree(struct btrfs_root *root) | |||
3389 | key.type = 0; | 3392 | key.type = 0; |
3390 | again: | 3393 | again: |
3391 | ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); | 3394 | ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); |
3395 | if (ret < 0) | ||
3396 | goto error; | ||
3392 | while (1) { | 3397 | while (1) { |
3393 | leaf = path->nodes[0]; | 3398 | leaf = path->nodes[0]; |
3394 | slot = path->slots[0]; | 3399 | slot = path->slots[0]; |
diff --git a/fs/cachefiles/interface.c b/fs/cachefiles/interface.c index 27089311fbea..37fe101a4e0d 100644 --- a/fs/cachefiles/interface.c +++ b/fs/cachefiles/interface.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * 2 of the Licence, or (at your option) any later version. | 9 | * 2 of the Licence, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
12 | #include <linux/mount.h> | 13 | #include <linux/mount.h> |
13 | #include <linux/buffer_head.h> | 14 | #include <linux/buffer_head.h> |
14 | #include "internal.h" | 15 | #include "internal.h" |
diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index eeb4986ea7db..d5db84a1ee0d 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mount.h> | 19 | #include <linux/mount.h> |
20 | #include <linux/namei.h> | 20 | #include <linux/namei.h> |
21 | #include <linux/security.h> | 21 | #include <linux/security.h> |
22 | #include <linux/slab.h> | ||
22 | #include "internal.h" | 23 | #include "internal.h" |
23 | 24 | ||
24 | #define CACHEFILES_KEYBUF_SIZE 512 | 25 | #define CACHEFILES_KEYBUF_SIZE 512 |
diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c index 1d8332563863..0f0d41fbb03f 100644 --- a/fs/cachefiles/rdwr.c +++ b/fs/cachefiles/rdwr.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/mount.h> | 12 | #include <linux/mount.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/file.h> | 14 | #include <linux/file.h> |
14 | #include "internal.h" | 15 | #include "internal.h" |
15 | 16 | ||
diff --git a/fs/cachefiles/xattr.c b/fs/cachefiles/xattr.c index f3e7a0bf068b..e18b183b47e1 100644 --- a/fs/cachefiles/xattr.c +++ b/fs/cachefiles/xattr.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/fsnotify.h> | 16 | #include <linux/fsnotify.h> |
17 | #include <linux/quotaops.h> | 17 | #include <linux/quotaops.h> |
18 | #include <linux/xattr.h> | 18 | #include <linux/xattr.h> |
19 | #include <linux/slab.h> | ||
19 | #include "internal.h" | 20 | #include "internal.h" |
20 | 21 | ||
21 | static const char cachefiles_xattr_cache[] = | 22 | static const char cachefiles_xattr_cache[] = |
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 23bb0ceabe31..aa3cd7cc3e40 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
6 | #include <linux/pagemap.h> | 6 | #include <linux/pagemap.h> |
7 | #include <linux/writeback.h> /* generic_writepages */ | 7 | #include <linux/writeback.h> /* generic_writepages */ |
8 | #include <linux/slab.h> | ||
8 | #include <linux/pagevec.h> | 9 | #include <linux/pagevec.h> |
9 | #include <linux/task_io_accounting_ops.h> | 10 | #include <linux/task_io_accounting_ops.h> |
10 | 11 | ||
@@ -919,6 +920,10 @@ static int context_is_writeable_or_written(struct inode *inode, | |||
919 | /* | 920 | /* |
920 | * We are only allowed to write into/dirty the page if the page is | 921 | * We are only allowed to write into/dirty the page if the page is |
921 | * clean, or already dirty within the same snap context. | 922 | * clean, or already dirty within the same snap context. |
923 | * | ||
924 | * called with page locked. | ||
925 | * return success with page locked, | ||
926 | * or any failure (incl -EAGAIN) with page unlocked. | ||
922 | */ | 927 | */ |
923 | static int ceph_update_writeable_page(struct file *file, | 928 | static int ceph_update_writeable_page(struct file *file, |
924 | loff_t pos, unsigned len, | 929 | loff_t pos, unsigned len, |
@@ -961,9 +966,11 @@ retry_locked: | |||
961 | snapc = ceph_get_snap_context((void *)page->private); | 966 | snapc = ceph_get_snap_context((void *)page->private); |
962 | unlock_page(page); | 967 | unlock_page(page); |
963 | ceph_queue_writeback(inode); | 968 | ceph_queue_writeback(inode); |
964 | wait_event_interruptible(ci->i_cap_wq, | 969 | r = wait_event_interruptible(ci->i_cap_wq, |
965 | context_is_writeable_or_written(inode, snapc)); | 970 | context_is_writeable_or_written(inode, snapc)); |
966 | ceph_put_snap_context(snapc); | 971 | ceph_put_snap_context(snapc); |
972 | if (r == -ERESTARTSYS) | ||
973 | return r; | ||
967 | return -EAGAIN; | 974 | return -EAGAIN; |
968 | } | 975 | } |
969 | 976 | ||
@@ -1035,7 +1042,7 @@ static int ceph_write_begin(struct file *file, struct address_space *mapping, | |||
1035 | int r; | 1042 | int r; |
1036 | 1043 | ||
1037 | do { | 1044 | do { |
1038 | /* get a page*/ | 1045 | /* get a page */ |
1039 | page = grab_cache_page_write_begin(mapping, index, 0); | 1046 | page = grab_cache_page_write_begin(mapping, index, 0); |
1040 | if (!page) | 1047 | if (!page) |
1041 | return -ENOMEM; | 1048 | return -ENOMEM; |
diff --git a/fs/ceph/auth.c b/fs/ceph/auth.c index abb204fea6c7..f6394b94b866 100644 --- a/fs/ceph/auth.c +++ b/fs/ceph/auth.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "ceph_debug.h" | 1 | #include "ceph_debug.h" |
2 | 2 | ||
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include <linux/slab.h> | ||
4 | #include <linux/err.h> | 5 | #include <linux/err.h> |
5 | 6 | ||
6 | #include "types.h" | 7 | #include "types.h" |
diff --git a/fs/ceph/auth_none.c b/fs/ceph/auth_none.c index b4ef6f0a6c85..8cd9e3af07f7 100644 --- a/fs/ceph/auth_none.c +++ b/fs/ceph/auth_none.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/err.h> | 4 | #include <linux/err.h> |
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/random.h> | 6 | #include <linux/random.h> |
7 | #include <linux/slab.h> | ||
7 | 8 | ||
8 | #include "auth_none.h" | 9 | #include "auth_none.h" |
9 | #include "auth.h" | 10 | #include "auth.h" |
diff --git a/fs/ceph/auth_x.c b/fs/ceph/auth_x.c index f0318427b6da..d9001a4dc8cc 100644 --- a/fs/ceph/auth_x.c +++ b/fs/ceph/auth_x.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/err.h> | 4 | #include <linux/err.h> |
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/random.h> | 6 | #include <linux/random.h> |
7 | #include <linux/slab.h> | ||
7 | 8 | ||
8 | #include "auth_x.h" | 9 | #include "auth_x.h" |
9 | #include "auth_x_protocol.h" | 10 | #include "auth_x_protocol.h" |
@@ -28,6 +29,12 @@ static int ceph_x_is_authenticated(struct ceph_auth_client *ac) | |||
28 | return (ac->want_keys & xi->have_keys) == ac->want_keys; | 29 | return (ac->want_keys & xi->have_keys) == ac->want_keys; |
29 | } | 30 | } |
30 | 31 | ||
32 | static int ceph_x_encrypt_buflen(int ilen) | ||
33 | { | ||
34 | return sizeof(struct ceph_x_encrypt_header) + ilen + 16 + | ||
35 | sizeof(u32); | ||
36 | } | ||
37 | |||
31 | static int ceph_x_encrypt(struct ceph_crypto_key *secret, | 38 | static int ceph_x_encrypt(struct ceph_crypto_key *secret, |
32 | void *ibuf, int ilen, void *obuf, size_t olen) | 39 | void *ibuf, int ilen, void *obuf, size_t olen) |
33 | { | 40 | { |
@@ -150,6 +157,11 @@ static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac, | |||
150 | struct timespec validity; | 157 | struct timespec validity; |
151 | struct ceph_crypto_key old_key; | 158 | struct ceph_crypto_key old_key; |
152 | void *tp, *tpend; | 159 | void *tp, *tpend; |
160 | struct ceph_timespec new_validity; | ||
161 | struct ceph_crypto_key new_session_key; | ||
162 | struct ceph_buffer *new_ticket_blob; | ||
163 | unsigned long new_expires, new_renew_after; | ||
164 | u64 new_secret_id; | ||
153 | 165 | ||
154 | ceph_decode_need(&p, end, sizeof(u32) + 1, bad); | 166 | ceph_decode_need(&p, end, sizeof(u32) + 1, bad); |
155 | 167 | ||
@@ -182,16 +194,16 @@ static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac, | |||
182 | goto bad; | 194 | goto bad; |
183 | 195 | ||
184 | memcpy(&old_key, &th->session_key, sizeof(old_key)); | 196 | memcpy(&old_key, &th->session_key, sizeof(old_key)); |
185 | ret = ceph_crypto_key_decode(&th->session_key, &dp, dend); | 197 | ret = ceph_crypto_key_decode(&new_session_key, &dp, dend); |
186 | if (ret) | 198 | if (ret) |
187 | goto out; | 199 | goto out; |
188 | 200 | ||
189 | ceph_decode_copy(&dp, &th->validity, sizeof(th->validity)); | 201 | ceph_decode_copy(&dp, &new_validity, sizeof(new_validity)); |
190 | ceph_decode_timespec(&validity, &th->validity); | 202 | ceph_decode_timespec(&validity, &new_validity); |
191 | th->expires = get_seconds() + validity.tv_sec; | 203 | new_expires = get_seconds() + validity.tv_sec; |
192 | th->renew_after = th->expires - (validity.tv_sec / 4); | 204 | new_renew_after = new_expires - (validity.tv_sec / 4); |
193 | dout(" expires=%lu renew_after=%lu\n", th->expires, | 205 | dout(" expires=%lu renew_after=%lu\n", new_expires, |
194 | th->renew_after); | 206 | new_renew_after); |
195 | 207 | ||
196 | /* ticket blob for service */ | 208 | /* ticket blob for service */ |
197 | ceph_decode_8_safe(&p, end, is_enc, bad); | 209 | ceph_decode_8_safe(&p, end, is_enc, bad); |
@@ -216,10 +228,21 @@ static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac, | |||
216 | dout(" ticket blob is %d bytes\n", dlen); | 228 | dout(" ticket blob is %d bytes\n", dlen); |
217 | ceph_decode_need(&tp, tpend, 1 + sizeof(u64), bad); | 229 | ceph_decode_need(&tp, tpend, 1 + sizeof(u64), bad); |
218 | struct_v = ceph_decode_8(&tp); | 230 | struct_v = ceph_decode_8(&tp); |
219 | th->secret_id = ceph_decode_64(&tp); | 231 | new_secret_id = ceph_decode_64(&tp); |
220 | ret = ceph_decode_buffer(&th->ticket_blob, &tp, tpend); | 232 | ret = ceph_decode_buffer(&new_ticket_blob, &tp, tpend); |
221 | if (ret) | 233 | if (ret) |
222 | goto out; | 234 | goto out; |
235 | |||
236 | /* all is well, update our ticket */ | ||
237 | ceph_crypto_key_destroy(&th->session_key); | ||
238 | if (th->ticket_blob) | ||
239 | ceph_buffer_put(th->ticket_blob); | ||
240 | th->session_key = new_session_key; | ||
241 | th->ticket_blob = new_ticket_blob; | ||
242 | th->validity = new_validity; | ||
243 | th->secret_id = new_secret_id; | ||
244 | th->expires = new_expires; | ||
245 | th->renew_after = new_renew_after; | ||
223 | dout(" got ticket service %d (%s) secret_id %lld len %d\n", | 246 | dout(" got ticket service %d (%s) secret_id %lld len %d\n", |
224 | type, ceph_entity_type_name(type), th->secret_id, | 247 | type, ceph_entity_type_name(type), th->secret_id, |
225 | (int)th->ticket_blob->vec.iov_len); | 248 | (int)th->ticket_blob->vec.iov_len); |
@@ -242,7 +265,7 @@ static int ceph_x_build_authorizer(struct ceph_auth_client *ac, | |||
242 | struct ceph_x_ticket_handler *th, | 265 | struct ceph_x_ticket_handler *th, |
243 | struct ceph_x_authorizer *au) | 266 | struct ceph_x_authorizer *au) |
244 | { | 267 | { |
245 | int len; | 268 | int maxlen; |
246 | struct ceph_x_authorize_a *msg_a; | 269 | struct ceph_x_authorize_a *msg_a; |
247 | struct ceph_x_authorize_b msg_b; | 270 | struct ceph_x_authorize_b msg_b; |
248 | void *p, *end; | 271 | void *p, *end; |
@@ -253,15 +276,15 @@ static int ceph_x_build_authorizer(struct ceph_auth_client *ac, | |||
253 | dout("build_authorizer for %s %p\n", | 276 | dout("build_authorizer for %s %p\n", |
254 | ceph_entity_type_name(th->service), au); | 277 | ceph_entity_type_name(th->service), au); |
255 | 278 | ||
256 | len = sizeof(*msg_a) + sizeof(msg_b) + sizeof(u32) + | 279 | maxlen = sizeof(*msg_a) + sizeof(msg_b) + |
257 | ticket_blob_len + 16; | 280 | ceph_x_encrypt_buflen(ticket_blob_len); |
258 | dout(" need len %d\n", len); | 281 | dout(" need len %d\n", maxlen); |
259 | if (au->buf && au->buf->alloc_len < len) { | 282 | if (au->buf && au->buf->alloc_len < maxlen) { |
260 | ceph_buffer_put(au->buf); | 283 | ceph_buffer_put(au->buf); |
261 | au->buf = NULL; | 284 | au->buf = NULL; |
262 | } | 285 | } |
263 | if (!au->buf) { | 286 | if (!au->buf) { |
264 | au->buf = ceph_buffer_new(len, GFP_NOFS); | 287 | au->buf = ceph_buffer_new(maxlen, GFP_NOFS); |
265 | if (!au->buf) | 288 | if (!au->buf) |
266 | return -ENOMEM; | 289 | return -ENOMEM; |
267 | } | 290 | } |
@@ -296,6 +319,7 @@ static int ceph_x_build_authorizer(struct ceph_auth_client *ac, | |||
296 | au->buf->vec.iov_len = p - au->buf->vec.iov_base; | 319 | au->buf->vec.iov_len = p - au->buf->vec.iov_base; |
297 | dout(" built authorizer nonce %llx len %d\n", au->nonce, | 320 | dout(" built authorizer nonce %llx len %d\n", au->nonce, |
298 | (int)au->buf->vec.iov_len); | 321 | (int)au->buf->vec.iov_len); |
322 | BUG_ON(au->buf->vec.iov_len > maxlen); | ||
299 | return 0; | 323 | return 0; |
300 | 324 | ||
301 | out_buf: | 325 | out_buf: |
diff --git a/fs/ceph/buffer.c b/fs/ceph/buffer.c index b98086c7aeba..c67535d70aa6 100644 --- a/fs/ceph/buffer.c +++ b/fs/ceph/buffer.c | |||
@@ -1,5 +1,8 @@ | |||
1 | 1 | ||
2 | #include "ceph_debug.h" | 2 | #include "ceph_debug.h" |
3 | |||
4 | #include <linux/slab.h> | ||
5 | |||
3 | #include "buffer.h" | 6 | #include "buffer.h" |
4 | #include "decode.h" | 7 | #include "decode.h" |
5 | 8 | ||
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index db122bb357b8..3710e077a857 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/fs.h> | 3 | #include <linux/fs.h> |
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | #include <linux/slab.h> | ||
6 | #include <linux/vmalloc.h> | 7 | #include <linux/vmalloc.h> |
7 | #include <linux/wait.h> | 8 | #include <linux/wait.h> |
8 | #include <linux/writeback.h> | 9 | #include <linux/writeback.h> |
@@ -1407,6 +1408,7 @@ static int try_nonblocking_invalidate(struct inode *inode) | |||
1407 | */ | 1408 | */ |
1408 | void ceph_check_caps(struct ceph_inode_info *ci, int flags, | 1409 | void ceph_check_caps(struct ceph_inode_info *ci, int flags, |
1409 | struct ceph_mds_session *session) | 1410 | struct ceph_mds_session *session) |
1411 | __releases(session->s_mutex) | ||
1410 | { | 1412 | { |
1411 | struct ceph_client *client = ceph_inode_to_client(&ci->vfs_inode); | 1413 | struct ceph_client *client = ceph_inode_to_client(&ci->vfs_inode); |
1412 | struct ceph_mds_client *mdsc = &client->mdsc; | 1414 | struct ceph_mds_client *mdsc = &client->mdsc; |
@@ -1414,7 +1416,6 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags, | |||
1414 | struct ceph_cap *cap; | 1416 | struct ceph_cap *cap; |
1415 | int file_wanted, used; | 1417 | int file_wanted, used; |
1416 | int took_snap_rwsem = 0; /* true if mdsc->snap_rwsem held */ | 1418 | int took_snap_rwsem = 0; /* true if mdsc->snap_rwsem held */ |
1417 | int drop_session_lock = session ? 0 : 1; | ||
1418 | int issued, implemented, want, retain, revoking, flushing = 0; | 1419 | int issued, implemented, want, retain, revoking, flushing = 0; |
1419 | int mds = -1; /* keep track of how far we've gone through i_caps list | 1420 | int mds = -1; /* keep track of how far we've gone through i_caps list |
1420 | to avoid an infinite loop on retry */ | 1421 | to avoid an infinite loop on retry */ |
@@ -1639,7 +1640,7 @@ ack: | |||
1639 | if (queue_invalidate) | 1640 | if (queue_invalidate) |
1640 | ceph_queue_invalidate(inode); | 1641 | ceph_queue_invalidate(inode); |
1641 | 1642 | ||
1642 | if (session && drop_session_lock) | 1643 | if (session) |
1643 | mutex_unlock(&session->s_mutex); | 1644 | mutex_unlock(&session->s_mutex); |
1644 | if (took_snap_rwsem) | 1645 | if (took_snap_rwsem) |
1645 | up_read(&mdsc->snap_rwsem); | 1646 | up_read(&mdsc->snap_rwsem); |
@@ -2195,18 +2196,19 @@ void ceph_put_wrbuffer_cap_refs(struct ceph_inode_info *ci, int nr, | |||
2195 | * Handle a cap GRANT message from the MDS. (Note that a GRANT may | 2196 | * Handle a cap GRANT message from the MDS. (Note that a GRANT may |
2196 | * actually be a revocation if it specifies a smaller cap set.) | 2197 | * actually be a revocation if it specifies a smaller cap set.) |
2197 | * | 2198 | * |
2198 | * caller holds s_mutex. | 2199 | * caller holds s_mutex and i_lock, we drop both. |
2200 | * | ||
2199 | * return value: | 2201 | * return value: |
2200 | * 0 - ok | 2202 | * 0 - ok |
2201 | * 1 - check_caps on auth cap only (writeback) | 2203 | * 1 - check_caps on auth cap only (writeback) |
2202 | * 2 - check_caps (ack revoke) | 2204 | * 2 - check_caps (ack revoke) |
2203 | */ | 2205 | */ |
2204 | static int handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, | 2206 | static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, |
2205 | struct ceph_mds_session *session, | 2207 | struct ceph_mds_session *session, |
2206 | struct ceph_cap *cap, | 2208 | struct ceph_cap *cap, |
2207 | struct ceph_buffer *xattr_buf) | 2209 | struct ceph_buffer *xattr_buf) |
2208 | __releases(inode->i_lock) | 2210 | __releases(inode->i_lock) |
2209 | 2211 | __releases(session->s_mutex) | |
2210 | { | 2212 | { |
2211 | struct ceph_inode_info *ci = ceph_inode(inode); | 2213 | struct ceph_inode_info *ci = ceph_inode(inode); |
2212 | int mds = session->s_mds; | 2214 | int mds = session->s_mds; |
@@ -2216,7 +2218,7 @@ static int handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, | |||
2216 | u64 size = le64_to_cpu(grant->size); | 2218 | u64 size = le64_to_cpu(grant->size); |
2217 | u64 max_size = le64_to_cpu(grant->max_size); | 2219 | u64 max_size = le64_to_cpu(grant->max_size); |
2218 | struct timespec mtime, atime, ctime; | 2220 | struct timespec mtime, atime, ctime; |
2219 | int reply = 0; | 2221 | int check_caps = 0; |
2220 | int wake = 0; | 2222 | int wake = 0; |
2221 | int writeback = 0; | 2223 | int writeback = 0; |
2222 | int revoked_rdcache = 0; | 2224 | int revoked_rdcache = 0; |
@@ -2329,11 +2331,12 @@ static int handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, | |||
2329 | if ((used & ~newcaps) & CEPH_CAP_FILE_BUFFER) | 2331 | if ((used & ~newcaps) & CEPH_CAP_FILE_BUFFER) |
2330 | writeback = 1; /* will delay ack */ | 2332 | writeback = 1; /* will delay ack */ |
2331 | else if (dirty & ~newcaps) | 2333 | else if (dirty & ~newcaps) |
2332 | reply = 1; /* initiate writeback in check_caps */ | 2334 | check_caps = 1; /* initiate writeback in check_caps */ |
2333 | else if (((used & ~newcaps) & CEPH_CAP_FILE_CACHE) == 0 || | 2335 | else if (((used & ~newcaps) & CEPH_CAP_FILE_CACHE) == 0 || |
2334 | revoked_rdcache) | 2336 | revoked_rdcache) |
2335 | reply = 2; /* send revoke ack in check_caps */ | 2337 | check_caps = 2; /* send revoke ack in check_caps */ |
2336 | cap->issued = newcaps; | 2338 | cap->issued = newcaps; |
2339 | cap->implemented |= newcaps; | ||
2337 | } else if (cap->issued == newcaps) { | 2340 | } else if (cap->issued == newcaps) { |
2338 | dout("caps unchanged: %s -> %s\n", | 2341 | dout("caps unchanged: %s -> %s\n", |
2339 | ceph_cap_string(cap->issued), ceph_cap_string(newcaps)); | 2342 | ceph_cap_string(cap->issued), ceph_cap_string(newcaps)); |
@@ -2346,6 +2349,7 @@ static int handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, | |||
2346 | * pending revocation */ | 2349 | * pending revocation */ |
2347 | wake = 1; | 2350 | wake = 1; |
2348 | } | 2351 | } |
2352 | BUG_ON(cap->issued & ~cap->implemented); | ||
2349 | 2353 | ||
2350 | spin_unlock(&inode->i_lock); | 2354 | spin_unlock(&inode->i_lock); |
2351 | if (writeback) | 2355 | if (writeback) |
@@ -2359,7 +2363,14 @@ static int handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, | |||
2359 | ceph_queue_invalidate(inode); | 2363 | ceph_queue_invalidate(inode); |
2360 | if (wake) | 2364 | if (wake) |
2361 | wake_up(&ci->i_cap_wq); | 2365 | wake_up(&ci->i_cap_wq); |
2362 | return reply; | 2366 | |
2367 | if (check_caps == 1) | ||
2368 | ceph_check_caps(ci, CHECK_CAPS_NODELAY|CHECK_CAPS_AUTHONLY, | ||
2369 | session); | ||
2370 | else if (check_caps == 2) | ||
2371 | ceph_check_caps(ci, CHECK_CAPS_NODELAY, session); | ||
2372 | else | ||
2373 | mutex_unlock(&session->s_mutex); | ||
2363 | } | 2374 | } |
2364 | 2375 | ||
2365 | /* | 2376 | /* |
@@ -2548,9 +2559,8 @@ static void handle_cap_export(struct inode *inode, struct ceph_mds_caps *ex, | |||
2548 | ci->i_cap_exporting_issued = cap->issued; | 2559 | ci->i_cap_exporting_issued = cap->issued; |
2549 | } | 2560 | } |
2550 | __ceph_remove_cap(cap); | 2561 | __ceph_remove_cap(cap); |
2551 | } else { | ||
2552 | WARN_ON(!cap); | ||
2553 | } | 2562 | } |
2563 | /* else, we already released it */ | ||
2554 | 2564 | ||
2555 | spin_unlock(&inode->i_lock); | 2565 | spin_unlock(&inode->i_lock); |
2556 | } | 2566 | } |
@@ -2621,9 +2631,7 @@ void ceph_handle_caps(struct ceph_mds_session *session, | |||
2621 | u64 cap_id; | 2631 | u64 cap_id; |
2622 | u64 size, max_size; | 2632 | u64 size, max_size; |
2623 | u64 tid; | 2633 | u64 tid; |
2624 | int check_caps = 0; | ||
2625 | void *snaptrace; | 2634 | void *snaptrace; |
2626 | int r; | ||
2627 | 2635 | ||
2628 | dout("handle_caps from mds%d\n", mds); | 2636 | dout("handle_caps from mds%d\n", mds); |
2629 | 2637 | ||
@@ -2668,8 +2676,9 @@ void ceph_handle_caps(struct ceph_mds_session *session, | |||
2668 | case CEPH_CAP_OP_IMPORT: | 2676 | case CEPH_CAP_OP_IMPORT: |
2669 | handle_cap_import(mdsc, inode, h, session, | 2677 | handle_cap_import(mdsc, inode, h, session, |
2670 | snaptrace, le32_to_cpu(h->snap_trace_len)); | 2678 | snaptrace, le32_to_cpu(h->snap_trace_len)); |
2671 | check_caps = 1; /* we may have sent a RELEASE to the old auth */ | 2679 | ceph_check_caps(ceph_inode(inode), CHECK_CAPS_NODELAY, |
2672 | goto done; | 2680 | session); |
2681 | goto done_unlocked; | ||
2673 | } | 2682 | } |
2674 | 2683 | ||
2675 | /* the rest require a cap */ | 2684 | /* the rest require a cap */ |
@@ -2686,16 +2695,8 @@ void ceph_handle_caps(struct ceph_mds_session *session, | |||
2686 | switch (op) { | 2695 | switch (op) { |
2687 | case CEPH_CAP_OP_REVOKE: | 2696 | case CEPH_CAP_OP_REVOKE: |
2688 | case CEPH_CAP_OP_GRANT: | 2697 | case CEPH_CAP_OP_GRANT: |
2689 | r = handle_cap_grant(inode, h, session, cap, msg->middle); | 2698 | handle_cap_grant(inode, h, session, cap, msg->middle); |
2690 | if (r == 1) | 2699 | goto done_unlocked; |
2691 | ceph_check_caps(ceph_inode(inode), | ||
2692 | CHECK_CAPS_NODELAY|CHECK_CAPS_AUTHONLY, | ||
2693 | session); | ||
2694 | else if (r == 2) | ||
2695 | ceph_check_caps(ceph_inode(inode), | ||
2696 | CHECK_CAPS_NODELAY, | ||
2697 | session); | ||
2698 | break; | ||
2699 | 2700 | ||
2700 | case CEPH_CAP_OP_FLUSH_ACK: | 2701 | case CEPH_CAP_OP_FLUSH_ACK: |
2701 | handle_cap_flush_ack(inode, tid, h, session, cap); | 2702 | handle_cap_flush_ack(inode, tid, h, session, cap); |
@@ -2713,9 +2714,7 @@ void ceph_handle_caps(struct ceph_mds_session *session, | |||
2713 | 2714 | ||
2714 | done: | 2715 | done: |
2715 | mutex_unlock(&session->s_mutex); | 2716 | mutex_unlock(&session->s_mutex); |
2716 | 2717 | done_unlocked: | |
2717 | if (check_caps) | ||
2718 | ceph_check_caps(ceph_inode(inode), CHECK_CAPS_NODELAY, NULL); | ||
2719 | if (inode) | 2718 | if (inode) |
2720 | iput(inode); | 2719 | iput(inode); |
2721 | return; | 2720 | return; |
@@ -2838,11 +2837,18 @@ int ceph_encode_inode_release(void **p, struct inode *inode, | |||
2838 | struct ceph_cap *cap; | 2837 | struct ceph_cap *cap; |
2839 | struct ceph_mds_request_release *rel = *p; | 2838 | struct ceph_mds_request_release *rel = *p; |
2840 | int ret = 0; | 2839 | int ret = 0; |
2841 | 2840 | int used = 0; | |
2842 | dout("encode_inode_release %p mds%d drop %s unless %s\n", inode, | ||
2843 | mds, ceph_cap_string(drop), ceph_cap_string(unless)); | ||
2844 | 2841 | ||
2845 | spin_lock(&inode->i_lock); | 2842 | spin_lock(&inode->i_lock); |
2843 | used = __ceph_caps_used(ci); | ||
2844 | |||
2845 | dout("encode_inode_release %p mds%d used %s drop %s unless %s\n", inode, | ||
2846 | mds, ceph_cap_string(used), ceph_cap_string(drop), | ||
2847 | ceph_cap_string(unless)); | ||
2848 | |||
2849 | /* only drop unused caps */ | ||
2850 | drop &= ~used; | ||
2851 | |||
2846 | cap = __get_cap_for_mds(ci, mds); | 2852 | cap = __get_cap_for_mds(ci, mds); |
2847 | if (cap && __cap_is_valid(cap)) { | 2853 | if (cap && __cap_is_valid(cap)) { |
2848 | if (force || | 2854 | if (force || |
diff --git a/fs/ceph/crypto.c b/fs/ceph/crypto.c index 291ac288e791..f704b3b62424 100644 --- a/fs/ceph/crypto.c +++ b/fs/ceph/crypto.c | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/err.h> | 4 | #include <linux/err.h> |
5 | #include <linux/scatterlist.h> | 5 | #include <linux/scatterlist.h> |
6 | #include <linux/slab.h> | ||
6 | #include <crypto/hash.h> | 7 | #include <crypto/hash.h> |
7 | 8 | ||
8 | #include "crypto.h" | 9 | #include "crypto.h" |
diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index e159f1415110..f7048da92acc 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "ceph_debug.h" | 1 | #include "ceph_debug.h" |
2 | 2 | ||
3 | #include <linux/device.h> | 3 | #include <linux/device.h> |
4 | #include <linux/slab.h> | ||
4 | #include <linux/module.h> | 5 | #include <linux/module.h> |
5 | #include <linux/ctype.h> | 6 | #include <linux/ctype.h> |
6 | #include <linux/debugfs.h> | 7 | #include <linux/debugfs.h> |
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 5107384ee029..7261dc6c2ead 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/spinlock.h> | 3 | #include <linux/spinlock.h> |
4 | #include <linux/fs_struct.h> | 4 | #include <linux/fs_struct.h> |
5 | #include <linux/namei.h> | 5 | #include <linux/namei.h> |
6 | #include <linux/slab.h> | ||
6 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
7 | 8 | ||
8 | #include "super.h" | 9 | #include "super.h" |
@@ -288,8 +289,10 @@ more: | |||
288 | CEPH_MDS_OP_LSSNAP : CEPH_MDS_OP_READDIR; | 289 | CEPH_MDS_OP_LSSNAP : CEPH_MDS_OP_READDIR; |
289 | 290 | ||
290 | /* discard old result, if any */ | 291 | /* discard old result, if any */ |
291 | if (fi->last_readdir) | 292 | if (fi->last_readdir) { |
292 | ceph_mdsc_put_request(fi->last_readdir); | 293 | ceph_mdsc_put_request(fi->last_readdir); |
294 | fi->last_readdir = NULL; | ||
295 | } | ||
293 | 296 | ||
294 | /* requery frag tree, as the frag topology may have changed */ | 297 | /* requery frag tree, as the frag topology may have changed */ |
295 | frag = ceph_choose_frag(ceph_inode(inode), frag, NULL, NULL); | 298 | frag = ceph_choose_frag(ceph_inode(inode), frag, NULL, NULL); |
diff --git a/fs/ceph/export.c b/fs/ceph/export.c index fc68e39cbad6..9d67572fb328 100644 --- a/fs/ceph/export.c +++ b/fs/ceph/export.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "ceph_debug.h" | 1 | #include "ceph_debug.h" |
2 | 2 | ||
3 | #include <linux/exportfs.h> | 3 | #include <linux/exportfs.h> |
4 | #include <linux/slab.h> | ||
4 | #include <asm/unaligned.h> | 5 | #include <asm/unaligned.h> |
5 | 6 | ||
6 | #include "super.h" | 7 | #include "super.h" |
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 5d2af8464f6a..4add3d5da2c1 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "ceph_debug.h" | 1 | #include "ceph_debug.h" |
2 | 2 | ||
3 | #include <linux/sched.h> | 3 | #include <linux/sched.h> |
4 | #include <linux/slab.h> | ||
4 | #include <linux/file.h> | 5 | #include <linux/file.h> |
5 | #include <linux/namei.h> | 6 | #include <linux/namei.h> |
6 | #include <linux/writeback.h> | 7 | #include <linux/writeback.h> |
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 7abe1aed819b..aca82d55cc53 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -378,6 +378,22 @@ void ceph_destroy_inode(struct inode *inode) | |||
378 | 378 | ||
379 | ceph_queue_caps_release(inode); | 379 | ceph_queue_caps_release(inode); |
380 | 380 | ||
381 | /* | ||
382 | * we may still have a snap_realm reference if there are stray | ||
383 | * caps in i_cap_exporting_issued or i_snap_caps. | ||
384 | */ | ||
385 | if (ci->i_snap_realm) { | ||
386 | struct ceph_mds_client *mdsc = | ||
387 | &ceph_client(ci->vfs_inode.i_sb)->mdsc; | ||
388 | struct ceph_snap_realm *realm = ci->i_snap_realm; | ||
389 | |||
390 | dout(" dropping residual ref to snap realm %p\n", realm); | ||
391 | spin_lock(&realm->inodes_with_caps_lock); | ||
392 | list_del_init(&ci->i_snap_realm_item); | ||
393 | spin_unlock(&realm->inodes_with_caps_lock); | ||
394 | ceph_put_snap_realm(mdsc, realm); | ||
395 | } | ||
396 | |||
381 | kfree(ci->i_symlink); | 397 | kfree(ci->i_symlink); |
382 | while ((n = rb_first(&ci->i_fragtree)) != NULL) { | 398 | while ((n = rb_first(&ci->i_fragtree)) != NULL) { |
383 | frag = rb_entry(n, struct ceph_inode_frag, node); | 399 | frag = rb_entry(n, struct ceph_inode_frag, node); |
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index a2600101ec22..60a9a4ae47be 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "ceph_debug.h" | 1 | #include "ceph_debug.h" |
2 | 2 | ||
3 | #include <linux/wait.h> | 3 | #include <linux/wait.h> |
4 | #include <linux/slab.h> | ||
4 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
5 | 6 | ||
6 | #include "mds_client.h" | 7 | #include "mds_client.h" |
@@ -328,6 +329,8 @@ static struct ceph_mds_session *register_session(struct ceph_mds_client *mdsc, | |||
328 | struct ceph_mds_session *s; | 329 | struct ceph_mds_session *s; |
329 | 330 | ||
330 | s = kzalloc(sizeof(*s), GFP_NOFS); | 331 | s = kzalloc(sizeof(*s), GFP_NOFS); |
332 | if (!s) | ||
333 | return ERR_PTR(-ENOMEM); | ||
331 | s->s_mdsc = mdsc; | 334 | s->s_mdsc = mdsc; |
332 | s->s_mds = mds; | 335 | s->s_mds = mds; |
333 | s->s_state = CEPH_MDS_SESSION_NEW; | 336 | s->s_state = CEPH_MDS_SESSION_NEW; |
@@ -529,7 +532,7 @@ static void __unregister_request(struct ceph_mds_client *mdsc, | |||
529 | { | 532 | { |
530 | dout("__unregister_request %p tid %lld\n", req, req->r_tid); | 533 | dout("__unregister_request %p tid %lld\n", req, req->r_tid); |
531 | rb_erase(&req->r_node, &mdsc->request_tree); | 534 | rb_erase(&req->r_node, &mdsc->request_tree); |
532 | ceph_mdsc_put_request(req); | 535 | RB_CLEAR_NODE(&req->r_node); |
533 | 536 | ||
534 | if (req->r_unsafe_dir) { | 537 | if (req->r_unsafe_dir) { |
535 | struct ceph_inode_info *ci = ceph_inode(req->r_unsafe_dir); | 538 | struct ceph_inode_info *ci = ceph_inode(req->r_unsafe_dir); |
@@ -538,6 +541,8 @@ static void __unregister_request(struct ceph_mds_client *mdsc, | |||
538 | list_del_init(&req->r_unsafe_dir_item); | 541 | list_del_init(&req->r_unsafe_dir_item); |
539 | spin_unlock(&ci->i_unsafe_lock); | 542 | spin_unlock(&ci->i_unsafe_lock); |
540 | } | 543 | } |
544 | |||
545 | ceph_mdsc_put_request(req); | ||
541 | } | 546 | } |
542 | 547 | ||
543 | /* | 548 | /* |
@@ -862,6 +867,7 @@ static int send_renew_caps(struct ceph_mds_client *mdsc, | |||
862 | if (time_after_eq(jiffies, session->s_cap_ttl) && | 867 | if (time_after_eq(jiffies, session->s_cap_ttl) && |
863 | time_after_eq(session->s_cap_ttl, session->s_renew_requested)) | 868 | time_after_eq(session->s_cap_ttl, session->s_renew_requested)) |
864 | pr_info("mds%d caps stale\n", session->s_mds); | 869 | pr_info("mds%d caps stale\n", session->s_mds); |
870 | session->s_renew_requested = jiffies; | ||
865 | 871 | ||
866 | /* do not try to renew caps until a recovering mds has reconnected | 872 | /* do not try to renew caps until a recovering mds has reconnected |
867 | * with its clients. */ | 873 | * with its clients. */ |
@@ -874,7 +880,6 @@ static int send_renew_caps(struct ceph_mds_client *mdsc, | |||
874 | 880 | ||
875 | dout("send_renew_caps to mds%d (%s)\n", session->s_mds, | 881 | dout("send_renew_caps to mds%d (%s)\n", session->s_mds, |
876 | ceph_mds_state_name(state)); | 882 | ceph_mds_state_name(state)); |
877 | session->s_renew_requested = jiffies; | ||
878 | msg = create_session_msg(CEPH_SESSION_REQUEST_RENEWCAPS, | 883 | msg = create_session_msg(CEPH_SESSION_REQUEST_RENEWCAPS, |
879 | ++session->s_renew_seq); | 884 | ++session->s_renew_seq); |
880 | if (IS_ERR(msg)) | 885 | if (IS_ERR(msg)) |
@@ -1566,8 +1571,13 @@ static int __do_request(struct ceph_mds_client *mdsc, | |||
1566 | 1571 | ||
1567 | /* get, open session */ | 1572 | /* get, open session */ |
1568 | session = __ceph_lookup_mds_session(mdsc, mds); | 1573 | session = __ceph_lookup_mds_session(mdsc, mds); |
1569 | if (!session) | 1574 | if (!session) { |
1570 | session = register_session(mdsc, mds); | 1575 | session = register_session(mdsc, mds); |
1576 | if (IS_ERR(session)) { | ||
1577 | err = PTR_ERR(session); | ||
1578 | goto finish; | ||
1579 | } | ||
1580 | } | ||
1571 | dout("do_request mds%d session %p state %s\n", mds, session, | 1581 | dout("do_request mds%d session %p state %s\n", mds, session, |
1572 | session_state_name(session->s_state)); | 1582 | session_state_name(session->s_state)); |
1573 | if (session->s_state != CEPH_MDS_SESSION_OPEN && | 1583 | if (session->s_state != CEPH_MDS_SESSION_OPEN && |
@@ -1770,7 +1780,7 @@ static void handle_reply(struct ceph_mds_session *session, struct ceph_msg *msg) | |||
1770 | dout("handle_reply %p\n", req); | 1780 | dout("handle_reply %p\n", req); |
1771 | 1781 | ||
1772 | /* correct session? */ | 1782 | /* correct session? */ |
1773 | if (!req->r_session && req->r_session != session) { | 1783 | if (req->r_session != session) { |
1774 | pr_err("mdsc_handle_reply got %llu on session mds%d" | 1784 | pr_err("mdsc_handle_reply got %llu on session mds%d" |
1775 | " not mds%d\n", tid, session->s_mds, | 1785 | " not mds%d\n", tid, session->s_mds, |
1776 | req->r_session ? req->r_session->s_mds : -1); | 1786 | req->r_session ? req->r_session->s_mds : -1); |
@@ -2682,29 +2692,41 @@ void ceph_mdsc_pre_umount(struct ceph_mds_client *mdsc) | |||
2682 | */ | 2692 | */ |
2683 | static void wait_unsafe_requests(struct ceph_mds_client *mdsc, u64 want_tid) | 2693 | static void wait_unsafe_requests(struct ceph_mds_client *mdsc, u64 want_tid) |
2684 | { | 2694 | { |
2685 | struct ceph_mds_request *req = NULL; | 2695 | struct ceph_mds_request *req = NULL, *nextreq; |
2686 | struct rb_node *n; | 2696 | struct rb_node *n; |
2687 | 2697 | ||
2688 | mutex_lock(&mdsc->mutex); | 2698 | mutex_lock(&mdsc->mutex); |
2689 | dout("wait_unsafe_requests want %lld\n", want_tid); | 2699 | dout("wait_unsafe_requests want %lld\n", want_tid); |
2700 | restart: | ||
2690 | req = __get_oldest_req(mdsc); | 2701 | req = __get_oldest_req(mdsc); |
2691 | while (req && req->r_tid <= want_tid) { | 2702 | while (req && req->r_tid <= want_tid) { |
2703 | /* find next request */ | ||
2704 | n = rb_next(&req->r_node); | ||
2705 | if (n) | ||
2706 | nextreq = rb_entry(n, struct ceph_mds_request, r_node); | ||
2707 | else | ||
2708 | nextreq = NULL; | ||
2692 | if ((req->r_op & CEPH_MDS_OP_WRITE)) { | 2709 | if ((req->r_op & CEPH_MDS_OP_WRITE)) { |
2693 | /* write op */ | 2710 | /* write op */ |
2694 | ceph_mdsc_get_request(req); | 2711 | ceph_mdsc_get_request(req); |
2712 | if (nextreq) | ||
2713 | ceph_mdsc_get_request(nextreq); | ||
2695 | mutex_unlock(&mdsc->mutex); | 2714 | mutex_unlock(&mdsc->mutex); |
2696 | dout("wait_unsafe_requests wait on %llu (want %llu)\n", | 2715 | dout("wait_unsafe_requests wait on %llu (want %llu)\n", |
2697 | req->r_tid, want_tid); | 2716 | req->r_tid, want_tid); |
2698 | wait_for_completion(&req->r_safe_completion); | 2717 | wait_for_completion(&req->r_safe_completion); |
2699 | mutex_lock(&mdsc->mutex); | 2718 | mutex_lock(&mdsc->mutex); |
2700 | n = rb_next(&req->r_node); | ||
2701 | ceph_mdsc_put_request(req); | 2719 | ceph_mdsc_put_request(req); |
2702 | } else { | 2720 | if (!nextreq) |
2703 | n = rb_next(&req->r_node); | 2721 | break; /* next dne before, so we're done! */ |
2722 | if (RB_EMPTY_NODE(&nextreq->r_node)) { | ||
2723 | /* next request was removed from tree */ | ||
2724 | ceph_mdsc_put_request(nextreq); | ||
2725 | goto restart; | ||
2726 | } | ||
2727 | ceph_mdsc_put_request(nextreq); /* won't go away */ | ||
2704 | } | 2728 | } |
2705 | if (!n) | 2729 | req = nextreq; |
2706 | break; | ||
2707 | req = rb_entry(n, struct ceph_mds_request, r_node); | ||
2708 | } | 2730 | } |
2709 | mutex_unlock(&mdsc->mutex); | 2731 | mutex_unlock(&mdsc->mutex); |
2710 | dout("wait_unsafe_requests done\n"); | 2732 | dout("wait_unsafe_requests done\n"); |
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index 781656a49bf8..8f1715ffbe4b 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/inet.h> | 6 | #include <linux/inet.h> |
7 | #include <linux/kthread.h> | 7 | #include <linux/kthread.h> |
8 | #include <linux/net.h> | 8 | #include <linux/net.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/socket.h> | 10 | #include <linux/socket.h> |
10 | #include <linux/string.h> | 11 | #include <linux/string.h> |
11 | #include <net/tcp.h> | 12 | #include <net/tcp.h> |
@@ -366,6 +367,14 @@ void ceph_con_open(struct ceph_connection *con, struct ceph_entity_addr *addr) | |||
366 | } | 367 | } |
367 | 368 | ||
368 | /* | 369 | /* |
370 | * return true if this connection ever successfully opened | ||
371 | */ | ||
372 | bool ceph_con_opened(struct ceph_connection *con) | ||
373 | { | ||
374 | return con->connect_seq > 0; | ||
375 | } | ||
376 | |||
377 | /* | ||
369 | * generic get/put | 378 | * generic get/put |
370 | */ | 379 | */ |
371 | struct ceph_connection *ceph_con_get(struct ceph_connection *con) | 380 | struct ceph_connection *ceph_con_get(struct ceph_connection *con) |
@@ -830,13 +839,6 @@ static void prepare_read_connect(struct ceph_connection *con) | |||
830 | con->in_base_pos = 0; | 839 | con->in_base_pos = 0; |
831 | } | 840 | } |
832 | 841 | ||
833 | static void prepare_read_connect_retry(struct ceph_connection *con) | ||
834 | { | ||
835 | dout("prepare_read_connect_retry %p\n", con); | ||
836 | con->in_base_pos = strlen(CEPH_BANNER) + sizeof(con->actual_peer_addr) | ||
837 | + sizeof(con->peer_addr_for_me); | ||
838 | } | ||
839 | |||
840 | static void prepare_read_ack(struct ceph_connection *con) | 842 | static void prepare_read_ack(struct ceph_connection *con) |
841 | { | 843 | { |
842 | dout("prepare_read_ack %p\n", con); | 844 | dout("prepare_read_ack %p\n", con); |
@@ -1146,7 +1148,7 @@ static int process_connect(struct ceph_connection *con) | |||
1146 | } | 1148 | } |
1147 | con->auth_retry = 1; | 1149 | con->auth_retry = 1; |
1148 | prepare_write_connect(con->msgr, con, 0); | 1150 | prepare_write_connect(con->msgr, con, 0); |
1149 | prepare_read_connect_retry(con); | 1151 | prepare_read_connect(con); |
1150 | break; | 1152 | break; |
1151 | 1153 | ||
1152 | case CEPH_MSGR_TAG_RESETSESSION: | 1154 | case CEPH_MSGR_TAG_RESETSESSION: |
@@ -1843,8 +1845,6 @@ static void ceph_fault(struct ceph_connection *con) | |||
1843 | goto out; | 1845 | goto out; |
1844 | } | 1846 | } |
1845 | 1847 | ||
1846 | clear_bit(BUSY, &con->state); /* to avoid an improbable race */ | ||
1847 | |||
1848 | mutex_lock(&con->mutex); | 1848 | mutex_lock(&con->mutex); |
1849 | if (test_bit(CLOSED, &con->state)) | 1849 | if (test_bit(CLOSED, &con->state)) |
1850 | goto out_unlock; | 1850 | goto out_unlock; |
diff --git a/fs/ceph/messenger.h b/fs/ceph/messenger.h index 4caaa5911110..a343dae73cdc 100644 --- a/fs/ceph/messenger.h +++ b/fs/ceph/messenger.h | |||
@@ -223,6 +223,7 @@ extern void ceph_con_init(struct ceph_messenger *msgr, | |||
223 | struct ceph_connection *con); | 223 | struct ceph_connection *con); |
224 | extern void ceph_con_open(struct ceph_connection *con, | 224 | extern void ceph_con_open(struct ceph_connection *con, |
225 | struct ceph_entity_addr *addr); | 225 | struct ceph_entity_addr *addr); |
226 | extern bool ceph_con_opened(struct ceph_connection *con); | ||
226 | extern void ceph_con_close(struct ceph_connection *con); | 227 | extern void ceph_con_close(struct ceph_connection *con); |
227 | extern void ceph_con_send(struct ceph_connection *con, struct ceph_msg *msg); | 228 | extern void ceph_con_send(struct ceph_connection *con, struct ceph_msg *msg); |
228 | extern void ceph_con_revoke(struct ceph_connection *con, struct ceph_msg *msg); | 229 | extern void ceph_con_revoke(struct ceph_connection *con, struct ceph_msg *msg); |
diff --git a/fs/ceph/mon_client.c b/fs/ceph/mon_client.c index 890597c09d43..8fdc011ca956 100644 --- a/fs/ceph/mon_client.c +++ b/fs/ceph/mon_client.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "ceph_debug.h" | 1 | #include "ceph_debug.h" |
2 | 2 | ||
3 | #include <linux/types.h> | 3 | #include <linux/types.h> |
4 | #include <linux/slab.h> | ||
4 | #include <linux/random.h> | 5 | #include <linux/random.h> |
5 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
6 | 7 | ||
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c index dbe63db9762f..c7b4dedaace6 100644 --- a/fs/ceph/osd_client.c +++ b/fs/ceph/osd_client.c | |||
@@ -413,11 +413,22 @@ static void remove_old_osds(struct ceph_osd_client *osdc, int remove_all) | |||
413 | */ | 413 | */ |
414 | static int __reset_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd) | 414 | static int __reset_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd) |
415 | { | 415 | { |
416 | struct ceph_osd_request *req; | ||
416 | int ret = 0; | 417 | int ret = 0; |
417 | 418 | ||
418 | dout("__reset_osd %p osd%d\n", osd, osd->o_osd); | 419 | dout("__reset_osd %p osd%d\n", osd, osd->o_osd); |
419 | if (list_empty(&osd->o_requests)) { | 420 | if (list_empty(&osd->o_requests)) { |
420 | __remove_osd(osdc, osd); | 421 | __remove_osd(osdc, osd); |
422 | } else if (memcmp(&osdc->osdmap->osd_addr[osd->o_osd], | ||
423 | &osd->o_con.peer_addr, | ||
424 | sizeof(osd->o_con.peer_addr)) == 0 && | ||
425 | !ceph_con_opened(&osd->o_con)) { | ||
426 | dout(" osd addr hasn't changed and connection never opened," | ||
427 | " letting msgr retry"); | ||
428 | /* touch each r_stamp for handle_timeout()'s benfit */ | ||
429 | list_for_each_entry(req, &osd->o_requests, r_osd_item) | ||
430 | req->r_stamp = jiffies; | ||
431 | ret = -EAGAIN; | ||
421 | } else { | 432 | } else { |
422 | ceph_con_close(&osd->o_con); | 433 | ceph_con_close(&osd->o_con); |
423 | ceph_con_open(&osd->o_con, &osdc->osdmap->osd_addr[osd->o_osd]); | 434 | ceph_con_open(&osd->o_con, &osdc->osdmap->osd_addr[osd->o_osd]); |
@@ -633,7 +644,7 @@ static int __send_request(struct ceph_osd_client *osdc, | |||
633 | reqhead->flags |= cpu_to_le32(req->r_flags); /* e.g., RETRY */ | 644 | reqhead->flags |= cpu_to_le32(req->r_flags); /* e.g., RETRY */ |
634 | reqhead->reassert_version = req->r_reassert_version; | 645 | reqhead->reassert_version = req->r_reassert_version; |
635 | 646 | ||
636 | req->r_sent_stamp = jiffies; | 647 | req->r_stamp = jiffies; |
637 | list_move_tail(&osdc->req_lru, &req->r_req_lru_item); | 648 | list_move_tail(&osdc->req_lru, &req->r_req_lru_item); |
638 | 649 | ||
639 | ceph_msg_get(req->r_request); /* send consumes a ref */ | 650 | ceph_msg_get(req->r_request); /* send consumes a ref */ |
@@ -660,7 +671,7 @@ static void handle_timeout(struct work_struct *work) | |||
660 | unsigned long timeout = osdc->client->mount_args->osd_timeout * HZ; | 671 | unsigned long timeout = osdc->client->mount_args->osd_timeout * HZ; |
661 | unsigned long keepalive = | 672 | unsigned long keepalive = |
662 | osdc->client->mount_args->osd_keepalive_timeout * HZ; | 673 | osdc->client->mount_args->osd_keepalive_timeout * HZ; |
663 | unsigned long last_sent = 0; | 674 | unsigned long last_stamp = 0; |
664 | struct rb_node *p; | 675 | struct rb_node *p; |
665 | struct list_head slow_osds; | 676 | struct list_head slow_osds; |
666 | 677 | ||
@@ -697,12 +708,12 @@ static void handle_timeout(struct work_struct *work) | |||
697 | req = list_entry(osdc->req_lru.next, struct ceph_osd_request, | 708 | req = list_entry(osdc->req_lru.next, struct ceph_osd_request, |
698 | r_req_lru_item); | 709 | r_req_lru_item); |
699 | 710 | ||
700 | if (time_before(jiffies, req->r_sent_stamp + timeout)) | 711 | if (time_before(jiffies, req->r_stamp + timeout)) |
701 | break; | 712 | break; |
702 | 713 | ||
703 | BUG_ON(req == last_req && req->r_sent_stamp == last_sent); | 714 | BUG_ON(req == last_req && req->r_stamp == last_stamp); |
704 | last_req = req; | 715 | last_req = req; |
705 | last_sent = req->r_sent_stamp; | 716 | last_stamp = req->r_stamp; |
706 | 717 | ||
707 | osd = req->r_osd; | 718 | osd = req->r_osd; |
708 | BUG_ON(!osd); | 719 | BUG_ON(!osd); |
@@ -718,7 +729,7 @@ static void handle_timeout(struct work_struct *work) | |||
718 | */ | 729 | */ |
719 | INIT_LIST_HEAD(&slow_osds); | 730 | INIT_LIST_HEAD(&slow_osds); |
720 | list_for_each_entry(req, &osdc->req_lru, r_req_lru_item) { | 731 | list_for_each_entry(req, &osdc->req_lru, r_req_lru_item) { |
721 | if (time_before(jiffies, req->r_sent_stamp + keepalive)) | 732 | if (time_before(jiffies, req->r_stamp + keepalive)) |
722 | break; | 733 | break; |
723 | 734 | ||
724 | osd = req->r_osd; | 735 | osd = req->r_osd; |
@@ -862,7 +873,9 @@ static int __kick_requests(struct ceph_osd_client *osdc, | |||
862 | 873 | ||
863 | dout("kick_requests osd%d\n", kickosd ? kickosd->o_osd : -1); | 874 | dout("kick_requests osd%d\n", kickosd ? kickosd->o_osd : -1); |
864 | if (kickosd) { | 875 | if (kickosd) { |
865 | __reset_osd(osdc, kickosd); | 876 | err = __reset_osd(osdc, kickosd); |
877 | if (err == -EAGAIN) | ||
878 | return 1; | ||
866 | } else { | 879 | } else { |
867 | for (p = rb_first(&osdc->osds); p; p = n) { | 880 | for (p = rb_first(&osdc->osds); p; p = n) { |
868 | struct ceph_osd *osd = | 881 | struct ceph_osd *osd = |
@@ -913,7 +926,7 @@ static int __kick_requests(struct ceph_osd_client *osdc, | |||
913 | 926 | ||
914 | kick: | 927 | kick: |
915 | dout("kicking %p tid %llu osd%d\n", req, req->r_tid, | 928 | dout("kicking %p tid %llu osd%d\n", req, req->r_tid, |
916 | req->r_osd->o_osd); | 929 | req->r_osd ? req->r_osd->o_osd : -1); |
917 | req->r_flags |= CEPH_OSD_FLAG_RETRY; | 930 | req->r_flags |= CEPH_OSD_FLAG_RETRY; |
918 | err = __send_request(osdc, req); | 931 | err = __send_request(osdc, req); |
919 | if (err) { | 932 | if (err) { |
diff --git a/fs/ceph/osd_client.h b/fs/ceph/osd_client.h index 1b1a3ca43afc..b0759911e7c3 100644 --- a/fs/ceph/osd_client.h +++ b/fs/ceph/osd_client.h | |||
@@ -70,7 +70,7 @@ struct ceph_osd_request { | |||
70 | 70 | ||
71 | char r_oid[40]; /* object name */ | 71 | char r_oid[40]; /* object name */ |
72 | int r_oid_len; | 72 | int r_oid_len; |
73 | unsigned long r_sent_stamp; | 73 | unsigned long r_stamp; /* send OR check time */ |
74 | bool r_resend; /* msg send failed, needs retry */ | 74 | bool r_resend; /* msg send failed, needs retry */ |
75 | 75 | ||
76 | struct ceph_file_layout r_file_layout; | 76 | struct ceph_file_layout r_file_layout; |
diff --git a/fs/ceph/osdmap.c b/fs/ceph/osdmap.c index b83f2692b835..21c6623c4b07 100644 --- a/fs/ceph/osdmap.c +++ b/fs/ceph/osdmap.c | |||
@@ -1,4 +1,7 @@ | |||
1 | 1 | ||
2 | #include "ceph_debug.h" | ||
3 | |||
4 | #include <linux/slab.h> | ||
2 | #include <asm/div64.h> | 5 | #include <asm/div64.h> |
3 | 6 | ||
4 | #include "super.h" | 7 | #include "super.h" |
@@ -6,7 +9,6 @@ | |||
6 | #include "crush/hash.h" | 9 | #include "crush/hash.h" |
7 | #include "crush/mapper.h" | 10 | #include "crush/mapper.h" |
8 | #include "decode.h" | 11 | #include "decode.h" |
9 | #include "ceph_debug.h" | ||
10 | 12 | ||
11 | char *ceph_osdmap_state_str(char *str, int len, int state) | 13 | char *ceph_osdmap_state_str(char *str, int len, int state) |
12 | { | 14 | { |
@@ -480,6 +482,14 @@ static struct ceph_pg_pool_info *__lookup_pg_pool(struct rb_root *root, int id) | |||
480 | return NULL; | 482 | return NULL; |
481 | } | 483 | } |
482 | 484 | ||
485 | void __decode_pool(void **p, struct ceph_pg_pool_info *pi) | ||
486 | { | ||
487 | ceph_decode_copy(p, &pi->v, sizeof(pi->v)); | ||
488 | calc_pg_masks(pi); | ||
489 | *p += le32_to_cpu(pi->v.num_snaps) * sizeof(u64); | ||
490 | *p += le32_to_cpu(pi->v.num_removed_snap_intervals) * sizeof(u64) * 2; | ||
491 | } | ||
492 | |||
483 | /* | 493 | /* |
484 | * decode a full map. | 494 | * decode a full map. |
485 | */ | 495 | */ |
@@ -526,12 +536,8 @@ struct ceph_osdmap *osdmap_decode(void **p, void *end) | |||
526 | ev, CEPH_PG_POOL_VERSION); | 536 | ev, CEPH_PG_POOL_VERSION); |
527 | goto bad; | 537 | goto bad; |
528 | } | 538 | } |
529 | ceph_decode_copy(p, &pi->v, sizeof(pi->v)); | 539 | __decode_pool(p, pi); |
530 | __insert_pg_pool(&map->pg_pools, pi); | 540 | __insert_pg_pool(&map->pg_pools, pi); |
531 | calc_pg_masks(pi); | ||
532 | *p += le32_to_cpu(pi->v.num_snaps) * sizeof(u64); | ||
533 | *p += le32_to_cpu(pi->v.num_removed_snap_intervals) | ||
534 | * sizeof(u64) * 2; | ||
535 | } | 541 | } |
536 | ceph_decode_32_safe(p, end, map->pool_max, bad); | 542 | ceph_decode_32_safe(p, end, map->pool_max, bad); |
537 | 543 | ||
@@ -714,8 +720,7 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end, | |||
714 | pi->id = pool; | 720 | pi->id = pool; |
715 | __insert_pg_pool(&map->pg_pools, pi); | 721 | __insert_pg_pool(&map->pg_pools, pi); |
716 | } | 722 | } |
717 | ceph_decode_copy(p, &pi->v, sizeof(pi->v)); | 723 | __decode_pool(p, pi); |
718 | calc_pg_masks(pi); | ||
719 | } | 724 | } |
720 | 725 | ||
721 | /* old_pool */ | 726 | /* old_pool */ |
diff --git a/fs/ceph/pagelist.c b/fs/ceph/pagelist.c index 370e93695474..5f8dbf7c745a 100644 --- a/fs/ceph/pagelist.c +++ b/fs/ceph/pagelist.c | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | #include <linux/gfp.h> | ||
2 | #include <linux/pagemap.h> | 3 | #include <linux/pagemap.h> |
3 | #include <linux/highmem.h> | 4 | #include <linux/highmem.h> |
4 | 5 | ||
diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c index bf2a5f3846a4..e6f9bc57d472 100644 --- a/fs/ceph/snap.c +++ b/fs/ceph/snap.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "ceph_debug.h" | 1 | #include "ceph_debug.h" |
2 | 2 | ||
3 | #include <linux/sort.h> | 3 | #include <linux/sort.h> |
4 | #include <linux/slab.h> | ||
4 | 5 | ||
5 | #include "super.h" | 6 | #include "super.h" |
6 | #include "decode.h" | 7 | #include "decode.h" |
@@ -314,9 +315,9 @@ static int build_snap_context(struct ceph_snap_realm *realm) | |||
314 | because we rebuild_snap_realms() works _downward_ in | 315 | because we rebuild_snap_realms() works _downward_ in |
315 | hierarchy after each update.) */ | 316 | hierarchy after each update.) */ |
316 | if (realm->cached_context && | 317 | if (realm->cached_context && |
317 | realm->cached_context->seq <= realm->seq && | 318 | realm->cached_context->seq == realm->seq && |
318 | (!parent || | 319 | (!parent || |
319 | realm->cached_context->seq <= parent->cached_context->seq)) { | 320 | realm->cached_context->seq >= parent->cached_context->seq)) { |
320 | dout("build_snap_context %llx %p: %p seq %lld (%d snaps)" | 321 | dout("build_snap_context %llx %p: %p seq %lld (%d snaps)" |
321 | " (unchanged)\n", | 322 | " (unchanged)\n", |
322 | realm->ino, realm, realm->cached_context, | 323 | realm->ino, realm, realm->cached_context, |
@@ -818,7 +819,9 @@ void ceph_handle_snap(struct ceph_mds_client *mdsc, | |||
818 | * queued (again) by ceph_update_snap_trace() | 819 | * queued (again) by ceph_update_snap_trace() |
819 | * below. Queue it _now_, under the old context. | 820 | * below. Queue it _now_, under the old context. |
820 | */ | 821 | */ |
822 | spin_lock(&realm->inodes_with_caps_lock); | ||
821 | list_del_init(&ci->i_snap_realm_item); | 823 | list_del_init(&ci->i_snap_realm_item); |
824 | spin_unlock(&realm->inodes_with_caps_lock); | ||
822 | spin_unlock(&inode->i_lock); | 825 | spin_unlock(&inode->i_lock); |
823 | 826 | ||
824 | ceph_queue_cap_snap(ci, | 827 | ceph_queue_cap_snap(ci, |
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 4290a6e860b0..75d02eaa1279 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/rwsem.h> | 11 | #include <linux/rwsem.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/statfs.h> | 15 | #include <linux/statfs.h> |
15 | #include <linux/string.h> | 16 | #include <linux/string.h> |
16 | #include <linux/version.h> | 17 | #include <linux/version.h> |
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 65d12036b670..ca702c67bc66 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/pagemap.h> | 12 | #include <linux/pagemap.h> |
13 | #include <linux/wait.h> | 13 | #include <linux/wait.h> |
14 | #include <linux/writeback.h> | 14 | #include <linux/writeback.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include "types.h" | 17 | #include "types.h" |
17 | #include "messenger.h" | 18 | #include "messenger.h" |
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 37d6ce645691..2845422907fc 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include "decode.h" | 3 | #include "decode.h" |
4 | 4 | ||
5 | #include <linux/xattr.h> | 5 | #include <linux/xattr.h> |
6 | #include <linux/slab.h> | ||
6 | 7 | ||
7 | static bool ceph_is_valid_xattr(const char *name) | 8 | static bool ceph_is_valid_xattr(const char *name) |
8 | { | 9 | { |
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c index b1d61d0bdfc7..78e4d2a3a68b 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/dcache.h> | 15 | #include <linux/dcache.h> |
16 | #include <linux/mount.h> | 16 | #include <linux/mount.h> |
17 | #include <linux/namei.h> | 17 | #include <linux/namei.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/vfs.h> | 19 | #include <linux/vfs.h> |
19 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
20 | #include "cifsglob.h" | 21 | #include "cifsglob.h" |
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c index 8ec7736ce954..310d12f69a92 100644 --- a/fs/cifs/cifs_spnego.c +++ b/fs/cifs/cifs_spnego.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/list.h> | 22 | #include <linux/list.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/string.h> | 24 | #include <linux/string.h> |
24 | #include <keys/user-type.h> | 25 | #include <keys/user-type.h> |
25 | #include <linux/key-type.h> | 26 | #include <linux/key-type.h> |
diff --git a/fs/cifs/cifs_unicode.c b/fs/cifs/cifs_unicode.c index 714a542cbafc..d07676bd76d2 100644 --- a/fs/cifs/cifs_unicode.c +++ b/fs/cifs/cifs_unicode.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
22 | #include <linux/slab.h> | ||
22 | #include "cifs_unicode.h" | 23 | #include "cifs_unicode.h" |
23 | #include "cifs_uniupr.h" | 24 | #include "cifs_uniupr.h" |
24 | #include "cifspdu.h" | 25 | #include "cifspdu.h" |
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 7dfe0842a6f6..9b716d044bbd 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/slab.h> | ||
25 | #include "cifspdu.h" | 26 | #include "cifspdu.h" |
26 | #include "cifsglob.h" | 27 | #include "cifsglob.h" |
27 | #include "cifsacl.h" | 28 | #include "cifsacl.h" |
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index 7efe1745494d..fbe986430d0c 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
23 | #include <linux/slab.h> | ||
23 | #include "cifspdu.h" | 24 | #include "cifspdu.h" |
24 | #include "cifsglob.h" | 25 | #include "cifsglob.h" |
25 | #include "cifs_debug.h" | 26 | #include "cifs_debug.h" |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 5183bc2a1916..ded66be6597c 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -808,6 +808,7 @@ const struct file_operations cifs_file_direct_nobrl_ops = { | |||
808 | .release = cifs_close, | 808 | .release = cifs_close, |
809 | .fsync = cifs_fsync, | 809 | .fsync = cifs_fsync, |
810 | .flush = cifs_flush, | 810 | .flush = cifs_flush, |
811 | .mmap = cifs_file_mmap, | ||
811 | .splice_read = generic_file_splice_read, | 812 | .splice_read = generic_file_splice_read, |
812 | #ifdef CONFIG_CIFS_POSIX | 813 | #ifdef CONFIG_CIFS_POSIX |
813 | .unlocked_ioctl = cifs_ioctl, | 814 | .unlocked_ioctl = cifs_ioctl, |
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 63c89d1d70b5..ecf0ffbe2b64 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | #include <linux/in.h> | 19 | #include <linux/in.h> |
20 | #include <linux/in6.h> | 20 | #include <linux/in6.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/slow-work.h> | 22 | #include <linux/slow-work.h> |
22 | #include "cifs_fs_sb.h" | 23 | #include "cifs_fs_sb.h" |
23 | #include "cifsacl.h" | 24 | #include "cifsacl.h" |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 7cc7f83e9314..5d3f29fef532 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/fs.h> | 30 | #include <linux/fs.h> |
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/vfs.h> | 32 | #include <linux/vfs.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/posix_acl_xattr.h> | 34 | #include <linux/posix_acl_xattr.h> |
34 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
35 | #include "cifspdu.h" | 36 | #include "cifspdu.h" |
@@ -1430,6 +1431,8 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon, | |||
1430 | __u32 bytes_sent; | 1431 | __u32 bytes_sent; |
1431 | __u16 byte_count; | 1432 | __u16 byte_count; |
1432 | 1433 | ||
1434 | *nbytes = 0; | ||
1435 | |||
1433 | /* cFYI(1, ("write at %lld %d bytes", offset, count));*/ | 1436 | /* cFYI(1, ("write at %lld %d bytes", offset, count));*/ |
1434 | if (tcon->ses == NULL) | 1437 | if (tcon->ses == NULL) |
1435 | return -ECONNABORTED; | 1438 | return -ECONNABORTED; |
@@ -1512,11 +1515,18 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon, | |||
1512 | cifs_stats_inc(&tcon->num_writes); | 1515 | cifs_stats_inc(&tcon->num_writes); |
1513 | if (rc) { | 1516 | if (rc) { |
1514 | cFYI(1, ("Send error in write = %d", rc)); | 1517 | cFYI(1, ("Send error in write = %d", rc)); |
1515 | *nbytes = 0; | ||
1516 | } else { | 1518 | } else { |
1517 | *nbytes = le16_to_cpu(pSMBr->CountHigh); | 1519 | *nbytes = le16_to_cpu(pSMBr->CountHigh); |
1518 | *nbytes = (*nbytes) << 16; | 1520 | *nbytes = (*nbytes) << 16; |
1519 | *nbytes += le16_to_cpu(pSMBr->Count); | 1521 | *nbytes += le16_to_cpu(pSMBr->Count); |
1522 | |||
1523 | /* | ||
1524 | * Mask off high 16 bits when bytes written as returned by the | ||
1525 | * server is greater than bytes requested by the client. Some | ||
1526 | * OS/2 servers are known to set incorrect CountHigh values. | ||
1527 | */ | ||
1528 | if (*nbytes > count) | ||
1529 | *nbytes &= 0xFFFF; | ||
1520 | } | 1530 | } |
1521 | 1531 | ||
1522 | cifs_buf_release(pSMB); | 1532 | cifs_buf_release(pSMB); |
@@ -1605,6 +1615,14 @@ CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon, | |||
1605 | *nbytes = le16_to_cpu(pSMBr->CountHigh); | 1615 | *nbytes = le16_to_cpu(pSMBr->CountHigh); |
1606 | *nbytes = (*nbytes) << 16; | 1616 | *nbytes = (*nbytes) << 16; |
1607 | *nbytes += le16_to_cpu(pSMBr->Count); | 1617 | *nbytes += le16_to_cpu(pSMBr->Count); |
1618 | |||
1619 | /* | ||
1620 | * Mask off high 16 bits when bytes written as returned by the | ||
1621 | * server is greater than bytes requested by the client. OS/2 | ||
1622 | * servers are known to set incorrect CountHigh values. | ||
1623 | */ | ||
1624 | if (*nbytes > count) | ||
1625 | *nbytes &= 0xFFFF; | ||
1608 | } | 1626 | } |
1609 | 1627 | ||
1610 | /* cifs_small_buf_release(pSMB); */ /* Freed earlier now in SendReceive2 */ | 1628 | /* cifs_small_buf_release(pSMB); */ /* Freed earlier now in SendReceive2 */ |
@@ -1793,8 +1811,21 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | |||
1793 | } | 1811 | } |
1794 | parm_data = (struct cifs_posix_lock *) | 1812 | parm_data = (struct cifs_posix_lock *) |
1795 | ((char *)&pSMBr->hdr.Protocol + data_offset); | 1813 | ((char *)&pSMBr->hdr.Protocol + data_offset); |
1796 | if (parm_data->lock_type == cpu_to_le16(CIFS_UNLCK)) | 1814 | if (parm_data->lock_type == __constant_cpu_to_le16(CIFS_UNLCK)) |
1797 | pLockData->fl_type = F_UNLCK; | 1815 | pLockData->fl_type = F_UNLCK; |
1816 | else { | ||
1817 | if (parm_data->lock_type == | ||
1818 | __constant_cpu_to_le16(CIFS_RDLCK)) | ||
1819 | pLockData->fl_type = F_RDLCK; | ||
1820 | else if (parm_data->lock_type == | ||
1821 | __constant_cpu_to_le16(CIFS_WRLCK)) | ||
1822 | pLockData->fl_type = F_WRLCK; | ||
1823 | |||
1824 | pLockData->fl_start = parm_data->start; | ||
1825 | pLockData->fl_end = parm_data->start + | ||
1826 | parm_data->length - 1; | ||
1827 | pLockData->fl_pid = parm_data->pid; | ||
1828 | } | ||
1798 | } | 1829 | } |
1799 | 1830 | ||
1800 | plk_err_exit: | 1831 | plk_err_exit: |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 45eb6cba793f..d9566bf8f917 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
25 | #include <linux/wait.h> | 25 | #include <linux/wait.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/pagemap.h> | 27 | #include <linux/pagemap.h> |
27 | #include <linux/ctype.h> | 28 | #include <linux/ctype.h> |
28 | #include <linux/utsname.h> | 29 | #include <linux/utsname.h> |
diff --git a/fs/cifs/dns_resolve.c b/fs/cifs/dns_resolve.c index 87948147d7ec..6f8a0e3fb25b 100644 --- a/fs/cifs/dns_resolve.c +++ b/fs/cifs/dns_resolve.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/slab.h> | ||
26 | #include <keys/user-type.h> | 27 | #include <keys/user-type.h> |
27 | #include "dns_resolve.h" | 28 | #include "dns_resolve.h" |
28 | #include "cifsglob.h" | 29 | #include "cifsglob.h" |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index ca2ba7a0193c..9b11a8f56f3a 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/task_io_accounting_ops.h> | 31 | #include <linux/task_io_accounting_ops.h> |
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <linux/mount.h> | 33 | #include <linux/mount.h> |
34 | #include <linux/slab.h> | ||
34 | #include <asm/div64.h> | 35 | #include <asm/div64.h> |
35 | #include "cifsfs.h" | 36 | #include "cifsfs.h" |
36 | #include "cifspdu.h" | 37 | #include "cifspdu.h" |
@@ -838,8 +839,32 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
838 | 839 | ||
839 | } else { | 840 | } else { |
840 | /* if rc == ERR_SHARING_VIOLATION ? */ | 841 | /* if rc == ERR_SHARING_VIOLATION ? */ |
841 | rc = 0; /* do not change lock type to unlock | 842 | rc = 0; |
842 | since range in use */ | 843 | |
844 | if (lockType & LOCKING_ANDX_SHARED_LOCK) { | ||
845 | pfLock->fl_type = F_WRLCK; | ||
846 | } else { | ||
847 | rc = CIFSSMBLock(xid, tcon, netfid, length, | ||
848 | pfLock->fl_start, 0, 1, | ||
849 | lockType | LOCKING_ANDX_SHARED_LOCK, | ||
850 | 0 /* wait flag */); | ||
851 | if (rc == 0) { | ||
852 | rc = CIFSSMBLock(xid, tcon, netfid, | ||
853 | length, pfLock->fl_start, 1, 0, | ||
854 | lockType | | ||
855 | LOCKING_ANDX_SHARED_LOCK, | ||
856 | 0 /* wait flag */); | ||
857 | pfLock->fl_type = F_RDLCK; | ||
858 | if (rc != 0) | ||
859 | cERROR(1, ("Error unlocking " | ||
860 | "previously locked range %d " | ||
861 | "during test of lock", rc)); | ||
862 | rc = 0; | ||
863 | } else { | ||
864 | pfLock->fl_type = F_WRLCK; | ||
865 | rc = 0; | ||
866 | } | ||
867 | } | ||
843 | } | 868 | } |
844 | 869 | ||
845 | FreeXid(xid); | 870 | FreeXid(xid); |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 723daaccbd0e..35ec11716213 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
22 | #include <linux/stat.h> | 22 | #include <linux/stat.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/pagemap.h> | 24 | #include <linux/pagemap.h> |
24 | #include <asm/div64.h> | 25 | #include <asm/div64.h> |
25 | #include "cifsfs.h" | 26 | #include "cifsfs.h" |
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index fc1e0487eaee..c1a9d4236a8c 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
22 | #include <linux/stat.h> | 22 | #include <linux/stat.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/namei.h> | 24 | #include <linux/namei.h> |
24 | #include "cifsfs.h" | 25 | #include "cifsfs.h" |
25 | #include "cifspdu.h" | 26 | #include "cifspdu.h" |
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index c343b14ba2d3..18e0bc1fb593 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | #include <linux/fs.h> | 23 | #include <linux/fs.h> |
24 | #include <linux/pagemap.h> | 24 | #include <linux/pagemap.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/stat.h> | 26 | #include <linux/stat.h> |
26 | #include "cifspdu.h" | 27 | #include "cifspdu.h" |
27 | #include "cifsglob.h" | 28 | #include "cifsglob.h" |
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index aaa9c1c5a5bd..7c3fd7463f44 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "ntlmssp.h" | 29 | #include "ntlmssp.h" |
30 | #include "nterr.h" | 30 | #include "nterr.h" |
31 | #include <linux/utsname.h> | 31 | #include <linux/utsname.h> |
32 | #include <linux/slab.h> | ||
32 | #include "cifs_spnego.h" | 33 | #include "cifs_spnego.h" |
33 | 34 | ||
34 | extern void SMBNTencrypt(unsigned char *passwd, unsigned char *c8, | 35 | extern void SMBNTencrypt(unsigned char *passwd, unsigned char *c8, |
diff --git a/fs/cifs/smbencrypt.c b/fs/cifs/smbencrypt.c index 93fb09a99c69..192ea51af20f 100644 --- a/fs/cifs/smbencrypt.c +++ b/fs/cifs/smbencrypt.c | |||
@@ -24,6 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/fs.h> | 28 | #include <linux/fs.h> |
28 | #include <linux/string.h> | 29 | #include <linux/string.h> |
29 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 07b8e71544ee..ad081fe7eb18 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/fs.h> | 23 | #include <linux/fs.h> |
24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
25 | #include <linux/gfp.h> | ||
25 | #include <linux/wait.h> | 26 | #include <linux/wait.h> |
26 | #include <linux/net.h> | 27 | #include <linux/net.h> |
27 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c index 3e2ef0de1209..f555ce077d4f 100644 --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
23 | #include <linux/posix_acl_xattr.h> | 23 | #include <linux/posix_acl_xattr.h> |
24 | #include <linux/slab.h> | ||
24 | #include "cifsfs.h" | 25 | #include "cifsfs.h" |
25 | #include "cifspdu.h" | 26 | #include "cifspdu.h" |
26 | #include "cifsglob.h" | 27 | #include "cifsglob.h" |
diff --git a/fs/coda/dir.c b/fs/coda/dir.c index 4bb9d0a5decc..ccd98b0f2b0b 100644 --- a/fs/coda/dir.c +++ b/fs/coda/dir.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/time.h> | 13 | #include <linux/time.h> |
14 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/file.h> | 16 | #include <linux/file.h> |
16 | #include <linux/stat.h> | 17 | #include <linux/stat.h> |
17 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
diff --git a/fs/coda/file.c b/fs/coda/file.c index ffd42815fda1..4c813f2cdc52 100644 --- a/fs/coda/file.c +++ b/fs/coda/file.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/smp_lock.h> | 18 | #include <linux/smp_lock.h> |
19 | #include <linux/string.h> | 19 | #include <linux/string.h> |
20 | #include <linux/slab.h> | ||
20 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
21 | 22 | ||
22 | #include <linux/coda.h> | 23 | #include <linux/coda.h> |
diff --git a/fs/coda/inode.c b/fs/coda/inode.c index 830f51abb971..a1695dcadd99 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/smp_lock.h> | 18 | #include <linux/smp_lock.h> |
19 | #include <linux/file.h> | 19 | #include <linux/file.h> |
20 | #include <linux/vfs.h> | 20 | #include <linux/vfs.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <asm/system.h> | 23 | #include <asm/system.h> |
23 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index c274d949179d..f09c5ed76f6c 100644 --- a/fs/coda/upcall.c +++ b/fs/coda/upcall.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/stat.h> | 26 | #include <linux/stat.h> |
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
28 | #include <linux/string.h> | 28 | #include <linux/string.h> |
29 | #include <linux/slab.h> | ||
29 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
30 | #include <linux/vmalloc.h> | 31 | #include <linux/vmalloc.h> |
31 | #include <linux/vfs.h> | 32 | #include <linux/vfs.h> |
diff --git a/fs/compat.c b/fs/compat.c index 030602d453b7..4b6ed03cc478 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/mm.h> | 49 | #include <linux/mm.h> |
50 | #include <linux/eventpoll.h> | 50 | #include <linux/eventpoll.h> |
51 | #include <linux/fs_struct.h> | 51 | #include <linux/fs_struct.h> |
52 | #include <linux/slab.h> | ||
52 | 53 | ||
53 | #include <asm/uaccess.h> | 54 | #include <asm/uaccess.h> |
54 | #include <asm/mmu_context.h> | 55 | #include <asm/mmu_context.h> |
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 6d55b61bfa79..c32a1b6a856b 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/ioctl.h> | 23 | #include <linux/ioctl.h> |
24 | #include <linux/if.h> | 24 | #include <linux/if.h> |
25 | #include <linux/if_bridge.h> | 25 | #include <linux/if_bridge.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/raid/md_u.h> | 26 | #include <linux/raid/md_u.h> |
28 | #include <linux/kd.h> | 27 | #include <linux/kd.h> |
29 | #include <linux/route.h> | 28 | #include <linux/route.h> |
@@ -60,6 +59,7 @@ | |||
60 | #include <linux/i2c.h> | 59 | #include <linux/i2c.h> |
61 | #include <linux/i2c-dev.h> | 60 | #include <linux/i2c-dev.h> |
62 | #include <linux/atalk.h> | 61 | #include <linux/atalk.h> |
62 | #include <linux/gfp.h> | ||
63 | 63 | ||
64 | #include <net/bluetooth/bluetooth.h> | 64 | #include <net/bluetooth/bluetooth.h> |
65 | #include <net/bluetooth/hci.h> | 65 | #include <net/bluetooth/hci.h> |
diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c index a2f746066c5d..c8af2d91174b 100644 --- a/fs/configfs/inode.c +++ b/fs/configfs/inode.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/capability.h> | 34 | #include <linux/capability.h> |
35 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
36 | #include <linux/lockdep.h> | 36 | #include <linux/lockdep.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include <linux/configfs.h> | 39 | #include <linux/configfs.h> |
39 | #include "configfs_internal.h" | 40 | #include "configfs_internal.h" |
diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c index 8421cea7d8c7..8c8d64230c2d 100644 --- a/fs/configfs/mount.c +++ b/fs/configfs/mount.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/mount.h> | 29 | #include <linux/mount.h> |
30 | #include <linux/pagemap.h> | 30 | #include <linux/pagemap.h> |
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <linux/configfs.h> | 34 | #include <linux/configfs.h> |
34 | #include "configfs_internal.h" | 35 | #include "configfs_internal.h" |
diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c index 32a5f46b1157..0f3eb41d9201 100644 --- a/fs/configfs/symlink.c +++ b/fs/configfs/symlink.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/namei.h> | 29 | #include <linux/namei.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <linux/configfs.h> | 32 | #include <linux/configfs.h> |
32 | #include "configfs_internal.h" | 33 | #include "configfs_internal.h" |
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 049d6c36da09..30a87b3dbcac 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/fsnotify.h> | 27 | #include <linux/fsnotify.h> |
28 | #include <linux/string.h> | 28 | #include <linux/string.h> |
29 | #include <linux/magic.h> | 29 | #include <linux/magic.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | static struct vfsmount *debugfs_mount; | 32 | static struct vfsmount *debugfs_mount; |
32 | static int debugfs_mount_count; | 33 | static int debugfs_mount_count; |
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 8882ecc0f1bf..0120247b41c0 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/namei.h> | 17 | #include <linux/namei.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/mount.h> | 19 | #include <linux/mount.h> |
19 | #include <linux/tty.h> | 20 | #include <linux/tty.h> |
20 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
diff --git a/fs/dlm/config.c b/fs/dlm/config.c index 0df243850818..b54bca03d92f 100644 --- a/fs/dlm/config.c +++ b/fs/dlm/config.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/configfs.h> | 16 | #include <linux/configfs.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/in.h> | 18 | #include <linux/in.h> |
18 | #include <linux/in6.h> | 19 | #include <linux/in6.h> |
19 | #include <net/ipv6.h> | 20 | #include <net/ipv6.h> |
diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c index 29d6139c35fc..c6cf25158746 100644 --- a/fs/dlm/debug_fs.c +++ b/fs/dlm/debug_fs.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/ctype.h> | 16 | #include <linux/ctype.h> |
17 | #include <linux/debugfs.h> | 17 | #include <linux/debugfs.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include "dlm_internal.h" | 20 | #include "dlm_internal.h" |
20 | #include "lock.h" | 21 | #include "lock.h" |
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 46ffd3eeaaf7..17903b491298 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c | |||
@@ -56,6 +56,7 @@ | |||
56 | L: receive_xxxx_reply() <- R: send_xxxx_reply() | 56 | L: receive_xxxx_reply() <- R: send_xxxx_reply() |
57 | */ | 57 | */ |
58 | #include <linux/types.h> | 58 | #include <linux/types.h> |
59 | #include <linux/slab.h> | ||
59 | #include "dlm_internal.h" | 60 | #include "dlm_internal.h" |
60 | #include <linux/dlm_device.h> | 61 | #include <linux/dlm_device.h> |
61 | #include "memory.h" | 62 | #include "memory.h" |
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 52cab160893c..c0d35c620526 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/file.h> | 51 | #include <linux/file.h> |
52 | #include <linux/mutex.h> | 52 | #include <linux/mutex.h> |
53 | #include <linux/sctp.h> | 53 | #include <linux/sctp.h> |
54 | #include <linux/slab.h> | ||
54 | #include <net/sctp/user.h> | 55 | #include <net/sctp/user.h> |
55 | #include <net/ipv6.h> | 56 | #include <net/ipv6.h> |
56 | 57 | ||
diff --git a/fs/dlm/netlink.c b/fs/dlm/netlink.c index 052095cd592f..2c6ad518100d 100644 --- a/fs/dlm/netlink.c +++ b/fs/dlm/netlink.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <net/genetlink.h> | 9 | #include <net/genetlink.h> |
10 | #include <linux/dlm.h> | 10 | #include <linux/dlm.h> |
11 | #include <linux/dlm_netlink.h> | 11 | #include <linux/dlm_netlink.h> |
12 | #include <linux/gfp.h> | ||
12 | 13 | ||
13 | #include "dlm_internal.h" | 14 | #include "dlm_internal.h" |
14 | 15 | ||
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index b5f89aef3b29..d45c02db6943 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/poll.h> | 11 | #include <linux/poll.h> |
12 | #include <linux/dlm.h> | 12 | #include <linux/dlm.h> |
13 | #include <linux/dlm_plock.h> | 13 | #include <linux/dlm_plock.h> |
14 | #include <linux/slab.h> | ||
14 | 15 | ||
15 | #include "dlm_internal.h" | 16 | #include "dlm_internal.h" |
16 | #include "lockspace.h" | 17 | #include "lockspace.h" |
diff --git a/fs/dlm/user.c b/fs/dlm/user.c index a4bfd31ac45b..8b6e73c47435 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <linux/dlm.h> | 18 | #include <linux/dlm.h> |
19 | #include <linux/dlm_device.h> | 19 | #include <linux/dlm_device.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include "dlm_internal.h" | 22 | #include "dlm_internal.h" |
22 | #include "lockspace.h" | 23 | #include "lockspace.h" |
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index 7cb0a59f4b9d..efb2b9400391 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/crypto.h> | 33 | #include <linux/crypto.h> |
34 | #include <linux/file.h> | 34 | #include <linux/file.h> |
35 | #include <linux/scatterlist.h> | 35 | #include <linux/scatterlist.h> |
36 | #include <linux/slab.h> | ||
36 | #include <asm/unaligned.h> | 37 | #include <asm/unaligned.h> |
37 | #include "ecryptfs_kernel.h" | 38 | #include "ecryptfs_kernel.h" |
38 | 39 | ||
diff --git a/fs/ecryptfs/dentry.c b/fs/ecryptfs/dentry.c index 8f006a0d6076..906e803f7f79 100644 --- a/fs/ecryptfs/dentry.c +++ b/fs/ecryptfs/dentry.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/namei.h> | 26 | #include <linux/namei.h> |
27 | #include <linux/mount.h> | 27 | #include <linux/mount.h> |
28 | #include <linux/fs_stack.h> | 28 | #include <linux/fs_stack.h> |
29 | #include <linux/slab.h> | ||
29 | #include "ecryptfs_kernel.h" | 30 | #include "ecryptfs_kernel.h" |
30 | 31 | ||
31 | /** | 32 | /** |
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index 678172b61be2..e7440a6f5ebf 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/file.h> | 26 | #include <linux/file.h> |
27 | #include <linux/poll.h> | 27 | #include <linux/poll.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/mount.h> | 29 | #include <linux/mount.h> |
29 | #include <linux/pagemap.h> | 30 | #include <linux/pagemap.h> |
30 | #include <linux/security.h> | 31 | #include <linux/security.h> |
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 4a430ab4115c..d3362faf3852 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/mount.h> | 31 | #include <linux/mount.h> |
32 | #include <linux/crypto.h> | 32 | #include <linux/crypto.h> |
33 | #include <linux/fs_stack.h> | 33 | #include <linux/fs_stack.h> |
34 | #include <linux/slab.h> | ||
34 | #include <asm/unaligned.h> | 35 | #include <asm/unaligned.h> |
35 | #include "ecryptfs_kernel.h" | 36 | #include "ecryptfs_kernel.h" |
36 | 37 | ||
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c index a0a7847567e9..89c5476506ef 100644 --- a/fs/ecryptfs/keystore.c +++ b/fs/ecryptfs/keystore.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/random.h> | 32 | #include <linux/random.h> |
33 | #include <linux/crypto.h> | 33 | #include <linux/crypto.h> |
34 | #include <linux/scatterlist.h> | 34 | #include <linux/scatterlist.h> |
35 | #include <linux/slab.h> | ||
35 | #include "ecryptfs_kernel.h" | 36 | #include "ecryptfs_kernel.h" |
36 | 37 | ||
37 | /** | 38 | /** |
diff --git a/fs/ecryptfs/kthread.c b/fs/ecryptfs/kthread.c index e14cf7e588db..d8c3a373aafa 100644 --- a/fs/ecryptfs/kthread.c +++ b/fs/ecryptfs/kthread.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/kthread.h> | 23 | #include <linux/kthread.h> |
24 | #include <linux/freezer.h> | 24 | #include <linux/freezer.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/wait.h> | 26 | #include <linux/wait.h> |
26 | #include <linux/mount.h> | 27 | #include <linux/mount.h> |
27 | #include "ecryptfs_kernel.h" | 28 | #include "ecryptfs_kernel.h" |
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index ea2f92101dfe..af1a8f01ebac 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/key.h> | 35 | #include <linux/key.h> |
36 | #include <linux/parser.h> | 36 | #include <linux/parser.h> |
37 | #include <linux/fs_stack.h> | 37 | #include <linux/fs_stack.h> |
38 | #include <linux/slab.h> | ||
38 | #include "ecryptfs_kernel.h" | 39 | #include "ecryptfs_kernel.h" |
39 | 40 | ||
40 | /** | 41 | /** |
diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c index f1c17e87c5fb..2d8dbce9d485 100644 --- a/fs/ecryptfs/messaging.c +++ b/fs/ecryptfs/messaging.c | |||
@@ -20,6 +20,7 @@ | |||
20 | * 02111-1307, USA. | 20 | * 02111-1307, USA. |
21 | */ | 21 | */ |
22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/user_namespace.h> | 24 | #include <linux/user_namespace.h> |
24 | #include <linux/nsproxy.h> | 25 | #include <linux/nsproxy.h> |
25 | #include "ecryptfs_kernel.h" | 26 | #include "ecryptfs_kernel.h" |
diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c index 4ec8f61ccf5a..3745f612bcd4 100644 --- a/fs/ecryptfs/miscdev.c +++ b/fs/ecryptfs/miscdev.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/random.h> | 24 | #include <linux/random.h> |
25 | #include <linux/miscdevice.h> | 25 | #include <linux/miscdevice.h> |
26 | #include <linux/poll.h> | 26 | #include <linux/poll.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/wait.h> | 28 | #include <linux/wait.h> |
28 | #include <linux/module.h> | 29 | #include <linux/module.h> |
29 | #include "ecryptfs_kernel.h" | 30 | #include "ecryptfs_kernel.h" |
diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c index df4ce99d0597..d491237c98e7 100644 --- a/fs/ecryptfs/mmap.c +++ b/fs/ecryptfs/mmap.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/file.h> | 32 | #include <linux/file.h> |
33 | #include <linux/crypto.h> | 33 | #include <linux/crypto.h> |
34 | #include <linux/scatterlist.h> | 34 | #include <linux/scatterlist.h> |
35 | #include <linux/slab.h> | ||
35 | #include <asm/unaligned.h> | 36 | #include <asm/unaligned.h> |
36 | #include "ecryptfs_kernel.h" | 37 | #include "ecryptfs_kernel.h" |
37 | 38 | ||
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c index b15a43a80ab7..fcef41c1d2cf 100644 --- a/fs/ecryptfs/super.c +++ b/fs/ecryptfs/super.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
27 | #include <linux/mount.h> | 27 | #include <linux/mount.h> |
28 | #include <linux/key.h> | 28 | #include <linux/key.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/seq_file.h> | 30 | #include <linux/seq_file.h> |
30 | #include <linux/smp_lock.h> | 31 | #include <linux/smp_lock.h> |
31 | #include <linux/file.h> | 32 | #include <linux/file.h> |
diff --git a/fs/eventfd.c b/fs/eventfd.c index 7758cc382ef0..6bd3f76fdf88 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/list.h> | 15 | #include <linux/list.h> |
15 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
16 | #include <linux/anon_inodes.h> | 17 | #include <linux/anon_inodes.h> |
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index a17e4b733e35..76d2a79ef93e 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 31 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/slab.h> | ||
34 | #include <linux/writeback.h> | 35 | #include <linux/writeback.h> |
35 | #include <linux/buffer_head.h> | 36 | #include <linux/buffer_head.h> |
36 | #include <scsi/scsi_device.h> | 37 | #include <scsi/scsi_device.h> |
diff --git a/fs/exofs/ios.c b/fs/exofs/ios.c index 5293bc411d17..4337cad7777b 100644 --- a/fs/exofs/ios.c +++ b/fs/exofs/ios.c | |||
@@ -22,6 +22,7 @@ | |||
22 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 22 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/slab.h> | ||
25 | #include <scsi/scsi_device.h> | 26 | #include <scsi/scsi_device.h> |
26 | #include <asm/div64.h> | 27 | #include <asm/div64.h> |
27 | 28 | ||
diff --git a/fs/exofs/super.c b/fs/exofs/super.c index 6cf5e4e84d61..18e57ea1e5b4 100644 --- a/fs/exofs/super.c +++ b/fs/exofs/super.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/vfs.h> | 37 | #include <linux/vfs.h> |
38 | #include <linux/random.h> | 38 | #include <linux/random.h> |
39 | #include <linux/exportfs.h> | 39 | #include <linux/exportfs.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | #include "exofs.h" | 42 | #include "exofs.h" |
42 | 43 | ||
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 1d081f0cfec2..3cf038c055d7 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include "ext2.h" | 14 | #include "ext2.h" |
15 | #include <linux/quotaops.h> | 15 | #include <linux/quotaops.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
17 | #include <linux/buffer_head.h> | 18 | #include <linux/buffer_head.h> |
18 | #include <linux/capability.h> | 19 | #include <linux/capability.h> |
diff --git a/fs/ext2/xattr_security.c b/fs/ext2/xattr_security.c index c8155845ac05..b118c6383c6d 100644 --- a/fs/ext2/xattr_security.c +++ b/fs/ext2/xattr_security.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/string.h> | 8 | #include <linux/string.h> |
8 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
9 | #include <linux/ext2_fs.h> | 10 | #include <linux/ext2_fs.h> |
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c index 161da2d3f890..a177122a1b25 100644 --- a/fs/ext3/balloc.c +++ b/fs/ext3/balloc.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/time.h> | 14 | #include <linux/time.h> |
15 | #include <linux/capability.h> | 15 | #include <linux/capability.h> |
16 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/jbd.h> | 18 | #include <linux/jbd.h> |
18 | #include <linux/ext3_fs.h> | 19 | #include <linux/ext3_fs.h> |
19 | #include <linux/ext3_jbd.h> | 20 | #include <linux/ext3_jbd.h> |
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c index ef9008b885b5..0d0e97ed3ff6 100644 --- a/fs/ext3/ialloc.c +++ b/fs/ext3/ialloc.c | |||
@@ -582,7 +582,9 @@ got: | |||
582 | inode->i_generation = sbi->s_next_generation++; | 582 | inode->i_generation = sbi->s_next_generation++; |
583 | spin_unlock(&sbi->s_next_gen_lock); | 583 | spin_unlock(&sbi->s_next_gen_lock); |
584 | 584 | ||
585 | ei->i_state = EXT3_STATE_NEW; | 585 | ei->i_state_flags = 0; |
586 | ext3_set_inode_state(inode, EXT3_STATE_NEW); | ||
587 | |||
586 | ei->i_extra_isize = | 588 | ei->i_extra_isize = |
587 | (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ? | 589 | (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ? |
588 | sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0; | 590 | sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0; |
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 7f920b7263a4..ea33bdf0a300 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c | |||
@@ -2811,7 +2811,7 @@ struct inode *ext3_iget(struct super_block *sb, unsigned long ino) | |||
2811 | inode->i_mtime.tv_sec = (signed)le32_to_cpu(raw_inode->i_mtime); | 2811 | inode->i_mtime.tv_sec = (signed)le32_to_cpu(raw_inode->i_mtime); |
2812 | inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0; | 2812 | inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0; |
2813 | 2813 | ||
2814 | ei->i_state = 0; | 2814 | ei->i_state_flags = 0; |
2815 | ei->i_dir_start_lookup = 0; | 2815 | ei->i_dir_start_lookup = 0; |
2816 | ei->i_dtime = le32_to_cpu(raw_inode->i_dtime); | 2816 | ei->i_dtime = le32_to_cpu(raw_inode->i_dtime); |
2817 | /* We now have enough fields to check if the inode was active or not. | 2817 | /* We now have enough fields to check if the inode was active or not. |
diff --git a/fs/ext3/xattr_security.c b/fs/ext3/xattr_security.c index 474348788dd9..3af91f476dff 100644 --- a/fs/ext3/xattr_security.c +++ b/fs/ext3/xattr_security.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/string.h> | 8 | #include <linux/string.h> |
8 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
9 | #include <linux/ext3_jbd.h> | 10 | #include <linux/ext3_jbd.h> |
diff --git a/fs/ext4/block_validity.c b/fs/ext4/block_validity.c index 983f0e127493..538c48655084 100644 --- a/fs/ext4/block_validity.c +++ b/fs/ext4/block_validity.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/pagemap.h> | 18 | #include <linux/pagemap.h> |
19 | #include <linux/blkdev.h> | 19 | #include <linux/blkdev.h> |
20 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
21 | #include <linux/slab.h> | ||
21 | #include "ext4.h" | 22 | #include "ext4.h" |
22 | 23 | ||
23 | struct ext4_system_zone { | 24 | struct ext4_system_zone { |
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 361c0b9962a8..57f6eef6ccd6 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c | |||
@@ -263,7 +263,7 @@ void ext4_free_inode(handle_t *handle, struct inode *inode) | |||
263 | ext4_group_t f; | 263 | ext4_group_t f; |
264 | 264 | ||
265 | f = ext4_flex_group(sbi, block_group); | 265 | f = ext4_flex_group(sbi, block_group); |
266 | atomic_dec(&sbi->s_flex_groups[f].free_inodes); | 266 | atomic_dec(&sbi->s_flex_groups[f].used_dirs); |
267 | } | 267 | } |
268 | 268 | ||
269 | } | 269 | } |
@@ -773,7 +773,7 @@ static int ext4_claim_inode(struct super_block *sb, | |||
773 | if (sbi->s_log_groups_per_flex) { | 773 | if (sbi->s_log_groups_per_flex) { |
774 | ext4_group_t f = ext4_flex_group(sbi, group); | 774 | ext4_group_t f = ext4_flex_group(sbi, group); |
775 | 775 | ||
776 | atomic_inc(&sbi->s_flex_groups[f].free_inodes); | 776 | atomic_inc(&sbi->s_flex_groups[f].used_dirs); |
777 | } | 777 | } |
778 | } | 778 | } |
779 | gdp->bg_checksum = ext4_group_desc_csum(sbi, group, gdp); | 779 | gdp->bg_checksum = ext4_group_desc_csum(sbi, group, gdp); |
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 986120f30066..5381802d6052 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/bio.h> | 39 | #include <linux/bio.h> |
40 | #include <linux/workqueue.h> | 40 | #include <linux/workqueue.h> |
41 | #include <linux/kernel.h> | 41 | #include <linux/kernel.h> |
42 | #include <linux/slab.h> | ||
42 | 43 | ||
43 | #include "ext4_jbd2.h" | 44 | #include "ext4_jbd2.h" |
44 | #include "xattr.h" | 45 | #include "xattr.h" |
@@ -1035,7 +1036,7 @@ static int ext4_indirect_calc_metadata_amount(struct inode *inode, | |||
1035 | sector_t lblock) | 1036 | sector_t lblock) |
1036 | { | 1037 | { |
1037 | struct ext4_inode_info *ei = EXT4_I(inode); | 1038 | struct ext4_inode_info *ei = EXT4_I(inode); |
1038 | int dind_mask = EXT4_ADDR_PER_BLOCK(inode->i_sb) - 1; | 1039 | sector_t dind_mask = ~((sector_t)EXT4_ADDR_PER_BLOCK(inode->i_sb) - 1); |
1039 | int blk_bits; | 1040 | int blk_bits; |
1040 | 1041 | ||
1041 | if (lblock < EXT4_NDIR_BLOCKS) | 1042 | if (lblock < EXT4_NDIR_BLOCKS) |
@@ -1050,7 +1051,7 @@ static int ext4_indirect_calc_metadata_amount(struct inode *inode, | |||
1050 | } | 1051 | } |
1051 | ei->i_da_metadata_calc_last_lblock = lblock & dind_mask; | 1052 | ei->i_da_metadata_calc_last_lblock = lblock & dind_mask; |
1052 | ei->i_da_metadata_calc_len = 1; | 1053 | ei->i_da_metadata_calc_len = 1; |
1053 | blk_bits = roundup_pow_of_two(lblock + 1); | 1054 | blk_bits = order_base_2(lblock); |
1054 | return (blk_bits / EXT4_ADDR_PER_BLOCK_BITS(inode->i_sb)) + 1; | 1055 | return (blk_bits / EXT4_ADDR_PER_BLOCK_BITS(inode->i_sb)) + 1; |
1055 | } | 1056 | } |
1056 | 1057 | ||
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 54df209d2eed..bde9d0b170c2 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include "mballoc.h" | 24 | #include "mballoc.h" |
25 | #include <linux/debugfs.h> | 25 | #include <linux/debugfs.h> |
26 | #include <linux/slab.h> | ||
26 | #include <trace/events/ext4.h> | 27 | #include <trace/events/ext4.h> |
27 | 28 | ||
28 | /* | 29 | /* |
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index 8b87bd0eac95..34dcfc52ef44 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | ||
16 | #include "ext4_jbd2.h" | 17 | #include "ext4_jbd2.h" |
17 | #include "ext4_extents.h" | 18 | #include "ext4_extents.h" |
18 | 19 | ||
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index aa5fe28d180f..d1fc662cc311 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
17 | #include <linux/quotaops.h> | 17 | #include <linux/quotaops.h> |
18 | #include <linux/slab.h> | ||
18 | #include "ext4_jbd2.h" | 19 | #include "ext4_jbd2.h" |
19 | #include "ext4_extents.h" | 20 | #include "ext4_extents.h" |
20 | #include "ext4.h" | 21 | #include "ext4.h" |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index ba191dae8730..e14d22c170d5 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -68,7 +68,21 @@ static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf); | |||
68 | static int ext4_unfreeze(struct super_block *sb); | 68 | static int ext4_unfreeze(struct super_block *sb); |
69 | static void ext4_write_super(struct super_block *sb); | 69 | static void ext4_write_super(struct super_block *sb); |
70 | static int ext4_freeze(struct super_block *sb); | 70 | static int ext4_freeze(struct super_block *sb); |
71 | static int ext4_get_sb(struct file_system_type *fs_type, int flags, | ||
72 | const char *dev_name, void *data, struct vfsmount *mnt); | ||
71 | 73 | ||
74 | #if !defined(CONFIG_EXT3_FS) && !defined(CONFIG_EXT3_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT23) | ||
75 | static struct file_system_type ext3_fs_type = { | ||
76 | .owner = THIS_MODULE, | ||
77 | .name = "ext3", | ||
78 | .get_sb = ext4_get_sb, | ||
79 | .kill_sb = kill_block_super, | ||
80 | .fs_flags = FS_REQUIRES_DEV, | ||
81 | }; | ||
82 | #define IS_EXT3_SB(sb) ((sb)->s_bdev->bd_holder == &ext3_fs_type) | ||
83 | #else | ||
84 | #define IS_EXT3_SB(sb) (0) | ||
85 | #endif | ||
72 | 86 | ||
73 | ext4_fsblk_t ext4_block_bitmap(struct super_block *sb, | 87 | ext4_fsblk_t ext4_block_bitmap(struct super_block *sb, |
74 | struct ext4_group_desc *bg) | 88 | struct ext4_group_desc *bg) |
@@ -2539,7 +2553,8 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
2539 | * enable delayed allocation by default | 2553 | * enable delayed allocation by default |
2540 | * Use -o nodelalloc to turn it off | 2554 | * Use -o nodelalloc to turn it off |
2541 | */ | 2555 | */ |
2542 | set_opt(sbi->s_mount_opt, DELALLOC); | 2556 | if (!IS_EXT3_SB(sb)) |
2557 | set_opt(sbi->s_mount_opt, DELALLOC); | ||
2543 | 2558 | ||
2544 | if (!parse_options((char *) data, sb, &journal_devnum, | 2559 | if (!parse_options((char *) data, sb, &journal_devnum, |
2545 | &journal_ioprio, NULL, 0)) | 2560 | &journal_ioprio, NULL, 0)) |
@@ -4068,7 +4083,7 @@ static int ext4_get_sb(struct file_system_type *fs_type, int flags, | |||
4068 | return get_sb_bdev(fs_type, flags, dev_name, data, ext4_fill_super,mnt); | 4083 | return get_sb_bdev(fs_type, flags, dev_name, data, ext4_fill_super,mnt); |
4069 | } | 4084 | } |
4070 | 4085 | ||
4071 | #if !defined(CONTIG_EXT2_FS) && !defined(CONFIG_EXT2_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT23) | 4086 | #if !defined(CONFIG_EXT2_FS) && !defined(CONFIG_EXT2_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT23) |
4072 | static struct file_system_type ext2_fs_type = { | 4087 | static struct file_system_type ext2_fs_type = { |
4073 | .owner = THIS_MODULE, | 4088 | .owner = THIS_MODULE, |
4074 | .name = "ext2", | 4089 | .name = "ext2", |
@@ -4095,15 +4110,7 @@ static inline void register_as_ext2(void) { } | |||
4095 | static inline void unregister_as_ext2(void) { } | 4110 | static inline void unregister_as_ext2(void) { } |
4096 | #endif | 4111 | #endif |
4097 | 4112 | ||
4098 | #if !defined(CONTIG_EXT3_FS) && !defined(CONFIG_EXT3_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT23) | 4113 | #if !defined(CONFIG_EXT3_FS) && !defined(CONFIG_EXT3_FS_MODULE) && defined(CONFIG_EXT4_USE_FOR_EXT23) |
4099 | static struct file_system_type ext3_fs_type = { | ||
4100 | .owner = THIS_MODULE, | ||
4101 | .name = "ext3", | ||
4102 | .get_sb = ext4_get_sb, | ||
4103 | .kill_sb = kill_block_super, | ||
4104 | .fs_flags = FS_REQUIRES_DEV, | ||
4105 | }; | ||
4106 | |||
4107 | static inline void register_as_ext3(void) | 4114 | static inline void register_as_ext3(void) |
4108 | { | 4115 | { |
4109 | int err = register_filesystem(&ext3_fs_type); | 4116 | int err = register_filesystem(&ext3_fs_type); |
diff --git a/fs/ext4/xattr_security.c b/fs/ext4/xattr_security.c index 983c253999a7..8b145e98df07 100644 --- a/fs/ext4/xattr_security.c +++ b/fs/ext4/xattr_security.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/string.h> | 7 | #include <linux/string.h> |
8 | #include <linux/fs.h> | 8 | #include <linux/fs.h> |
9 | #include <linux/security.h> | 9 | #include <linux/security.h> |
10 | #include <linux/slab.h> | ||
10 | #include "ext4_jbd2.h" | 11 | #include "ext4_jbd2.h" |
11 | #include "ext4.h" | 12 | #include "ext4.h" |
12 | #include "xattr.h" | 13 | #include "xattr.h" |
diff --git a/fs/fat/cache.c b/fs/fat/cache.c index 923990e4f16e..113f0a1e565d 100644 --- a/fs/fat/cache.c +++ b/fs/fat/cache.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/buffer_head.h> | 13 | #include <linux/buffer_head.h> |
13 | #include "fat.h" | 14 | #include "fat.h" |
14 | 15 | ||
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index c1ef50154868..6fcc7e71fbaa 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c | |||
@@ -309,7 +309,7 @@ static int vfat_create_shortname(struct inode *dir, struct nls_table *nls, | |||
309 | { | 309 | { |
310 | struct fat_mount_options *opts = &MSDOS_SB(dir->i_sb)->options; | 310 | struct fat_mount_options *opts = &MSDOS_SB(dir->i_sb)->options; |
311 | wchar_t *ip, *ext_start, *end, *name_start; | 311 | wchar_t *ip, *ext_start, *end, *name_start; |
312 | unsigned char base[9], ext[4], buf[8], *p; | 312 | unsigned char base[9], ext[4], buf[5], *p; |
313 | unsigned char charbuf[NLS_MAX_CHARSET_SIZE]; | 313 | unsigned char charbuf[NLS_MAX_CHARSET_SIZE]; |
314 | int chl, chi; | 314 | int chl, chi; |
315 | int sz = 0, extlen, baselen, i, numtail_baselen, numtail2_baselen; | 315 | int sz = 0, extlen, baselen, i, numtail_baselen, numtail2_baselen; |
@@ -467,7 +467,7 @@ static int vfat_create_shortname(struct inode *dir, struct nls_table *nls, | |||
467 | return 0; | 467 | return 0; |
468 | } | 468 | } |
469 | 469 | ||
470 | i = jiffies & 0xffff; | 470 | i = jiffies; |
471 | sz = (jiffies >> 16) & 0x7; | 471 | sz = (jiffies >> 16) & 0x7; |
472 | if (baselen > 2) { | 472 | if (baselen > 2) { |
473 | baselen = numtail2_baselen; | 473 | baselen = numtail2_baselen; |
@@ -476,7 +476,7 @@ static int vfat_create_shortname(struct inode *dir, struct nls_table *nls, | |||
476 | name_res[baselen + 4] = '~'; | 476 | name_res[baselen + 4] = '~'; |
477 | name_res[baselen + 5] = '1' + sz; | 477 | name_res[baselen + 5] = '1' + sz; |
478 | while (1) { | 478 | while (1) { |
479 | sprintf(buf, "%04X", i); | 479 | snprintf(buf, sizeof(buf), "%04X", i & 0xffff); |
480 | memcpy(&name_res[baselen], buf, 4); | 480 | memcpy(&name_res[baselen], buf, 4); |
481 | if (vfat_find_form(dir, name_res) < 0) | 481 | if (vfat_find_form(dir, name_res) < 0) |
482 | break; | 482 | break; |
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
15 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
16 | #include <linux/pipe_fs_i.h> | 15 | #include <linux/pipe_fs_i.h> |
diff --git a/fs/filesystems.c b/fs/filesystems.c index a24c58e181db..68ba492d8eef 100644 --- a/fs/filesystems.c +++ b/fs/filesystems.c | |||
@@ -10,10 +10,10 @@ | |||
10 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
11 | #include <linux/proc_fs.h> | 11 | #include <linux/proc_fs.h> |
12 | #include <linux/seq_file.h> | 12 | #include <linux/seq_file.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/kmod.h> | 13 | #include <linux/kmod.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | ||
17 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
18 | 18 | ||
19 | /* | 19 | /* |
diff --git a/fs/freevxfs/vxfs_subr.c b/fs/freevxfs/vxfs_subr.c index ed8f0b0dd880..1429f3ae1e86 100644 --- a/fs/freevxfs/vxfs_subr.c +++ b/fs/freevxfs/vxfs_subr.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/fs.h> | 33 | #include <linux/fs.h> |
34 | #include <linux/buffer_head.h> | 34 | #include <linux/buffer_head.h> |
35 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
36 | #include <linux/slab.h> | ||
37 | #include <linux/pagemap.h> | 36 | #include <linux/pagemap.h> |
38 | 37 | ||
39 | #include "vxfs_extern.h" | 38 | #include "vxfs_extern.h" |
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 76fc4d594acb..4b37f7cea4dd 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
20 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
21 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
@@ -553,108 +554,85 @@ select_queue: | |||
553 | return ret; | 554 | return ret; |
554 | } | 555 | } |
555 | 556 | ||
556 | static void unpin_sb_for_writeback(struct super_block **psb) | 557 | static void unpin_sb_for_writeback(struct super_block *sb) |
557 | { | 558 | { |
558 | struct super_block *sb = *psb; | 559 | up_read(&sb->s_umount); |
559 | 560 | put_super(sb); | |
560 | if (sb) { | ||
561 | up_read(&sb->s_umount); | ||
562 | put_super(sb); | ||
563 | *psb = NULL; | ||
564 | } | ||
565 | } | 561 | } |
566 | 562 | ||
563 | enum sb_pin_state { | ||
564 | SB_PINNED, | ||
565 | SB_NOT_PINNED, | ||
566 | SB_PIN_FAILED | ||
567 | }; | ||
568 | |||
567 | /* | 569 | /* |
568 | * For WB_SYNC_NONE writeback, the caller does not have the sb pinned | 570 | * For WB_SYNC_NONE writeback, the caller does not have the sb pinned |
569 | * before calling writeback. So make sure that we do pin it, so it doesn't | 571 | * before calling writeback. So make sure that we do pin it, so it doesn't |
570 | * go away while we are writing inodes from it. | 572 | * go away while we are writing inodes from it. |
571 | * | ||
572 | * Returns 0 if the super was successfully pinned (or pinning wasn't needed), | ||
573 | * 1 if we failed. | ||
574 | */ | 573 | */ |
575 | static int pin_sb_for_writeback(struct writeback_control *wbc, | 574 | static enum sb_pin_state pin_sb_for_writeback(struct writeback_control *wbc, |
576 | struct inode *inode, struct super_block **psb) | 575 | struct super_block *sb) |
577 | { | 576 | { |
578 | struct super_block *sb = inode->i_sb; | ||
579 | |||
580 | /* | ||
581 | * If this sb is already pinned, nothing more to do. If not and | ||
582 | * *psb is non-NULL, unpin the old one first | ||
583 | */ | ||
584 | if (sb == *psb) | ||
585 | return 0; | ||
586 | else if (*psb) | ||
587 | unpin_sb_for_writeback(psb); | ||
588 | |||
589 | /* | 577 | /* |
590 | * Caller must already hold the ref for this | 578 | * Caller must already hold the ref for this |
591 | */ | 579 | */ |
592 | if (wbc->sync_mode == WB_SYNC_ALL) { | 580 | if (wbc->sync_mode == WB_SYNC_ALL) { |
593 | WARN_ON(!rwsem_is_locked(&sb->s_umount)); | 581 | WARN_ON(!rwsem_is_locked(&sb->s_umount)); |
594 | return 0; | 582 | return SB_NOT_PINNED; |
595 | } | 583 | } |
596 | |||
597 | spin_lock(&sb_lock); | 584 | spin_lock(&sb_lock); |
598 | sb->s_count++; | 585 | sb->s_count++; |
599 | if (down_read_trylock(&sb->s_umount)) { | 586 | if (down_read_trylock(&sb->s_umount)) { |
600 | if (sb->s_root) { | 587 | if (sb->s_root) { |
601 | spin_unlock(&sb_lock); | 588 | spin_unlock(&sb_lock); |
602 | goto pinned; | 589 | return SB_PINNED; |
603 | } | 590 | } |
604 | /* | 591 | /* |
605 | * umounted, drop rwsem again and fall through to failure | 592 | * umounted, drop rwsem again and fall through to failure |
606 | */ | 593 | */ |
607 | up_read(&sb->s_umount); | 594 | up_read(&sb->s_umount); |
608 | } | 595 | } |
609 | |||
610 | sb->s_count--; | 596 | sb->s_count--; |
611 | spin_unlock(&sb_lock); | 597 | spin_unlock(&sb_lock); |
612 | return 1; | 598 | return SB_PIN_FAILED; |
613 | pinned: | ||
614 | *psb = sb; | ||
615 | return 0; | ||
616 | } | 599 | } |
617 | 600 | ||
618 | static void writeback_inodes_wb(struct bdi_writeback *wb, | 601 | /* |
619 | struct writeback_control *wbc) | 602 | * Write a portion of b_io inodes which belong to @sb. |
603 | * If @wbc->sb != NULL, then find and write all such | ||
604 | * inodes. Otherwise write only ones which go sequentially | ||
605 | * in reverse order. | ||
606 | * Return 1, if the caller writeback routine should be | ||
607 | * interrupted. Otherwise return 0. | ||
608 | */ | ||
609 | static int writeback_sb_inodes(struct super_block *sb, | ||
610 | struct bdi_writeback *wb, | ||
611 | struct writeback_control *wbc) | ||
620 | { | 612 | { |
621 | struct super_block *sb = wbc->sb, *pin_sb = NULL; | ||
622 | const unsigned long start = jiffies; /* livelock avoidance */ | ||
623 | |||
624 | spin_lock(&inode_lock); | ||
625 | |||
626 | if (!wbc->for_kupdate || list_empty(&wb->b_io)) | ||
627 | queue_io(wb, wbc->older_than_this); | ||
628 | |||
629 | while (!list_empty(&wb->b_io)) { | 613 | while (!list_empty(&wb->b_io)) { |
630 | struct inode *inode = list_entry(wb->b_io.prev, | ||
631 | struct inode, i_list); | ||
632 | long pages_skipped; | 614 | long pages_skipped; |
633 | 615 | struct inode *inode = list_entry(wb->b_io.prev, | |
634 | /* | 616 | struct inode, i_list); |
635 | * super block given and doesn't match, skip this inode | 617 | if (wbc->sb && sb != inode->i_sb) { |
636 | */ | 618 | /* super block given and doesn't |
637 | if (sb && sb != inode->i_sb) { | 619 | match, skip this inode */ |
638 | redirty_tail(inode); | 620 | redirty_tail(inode); |
639 | continue; | 621 | continue; |
640 | } | 622 | } |
641 | 623 | if (sb != inode->i_sb) | |
624 | /* finish with this superblock */ | ||
625 | return 0; | ||
642 | if (inode->i_state & (I_NEW | I_WILL_FREE)) { | 626 | if (inode->i_state & (I_NEW | I_WILL_FREE)) { |
643 | requeue_io(inode); | 627 | requeue_io(inode); |
644 | continue; | 628 | continue; |
645 | } | 629 | } |
646 | |||
647 | /* | 630 | /* |
648 | * Was this inode dirtied after sync_sb_inodes was called? | 631 | * Was this inode dirtied after sync_sb_inodes was called? |
649 | * This keeps sync from extra jobs and livelock. | 632 | * This keeps sync from extra jobs and livelock. |
650 | */ | 633 | */ |
651 | if (inode_dirtied_after(inode, start)) | 634 | if (inode_dirtied_after(inode, wbc->wb_start)) |
652 | break; | 635 | return 1; |
653 | |||
654 | if (pin_sb_for_writeback(wbc, inode, &pin_sb)) { | ||
655 | requeue_io(inode); | ||
656 | continue; | ||
657 | } | ||
658 | 636 | ||
659 | BUG_ON(inode->i_state & (I_FREEING | I_CLEAR)); | 637 | BUG_ON(inode->i_state & (I_FREEING | I_CLEAR)); |
660 | __iget(inode); | 638 | __iget(inode); |
@@ -673,14 +651,50 @@ static void writeback_inodes_wb(struct bdi_writeback *wb, | |||
673 | spin_lock(&inode_lock); | 651 | spin_lock(&inode_lock); |
674 | if (wbc->nr_to_write <= 0) { | 652 | if (wbc->nr_to_write <= 0) { |
675 | wbc->more_io = 1; | 653 | wbc->more_io = 1; |
676 | break; | 654 | return 1; |
677 | } | 655 | } |
678 | if (!list_empty(&wb->b_more_io)) | 656 | if (!list_empty(&wb->b_more_io)) |
679 | wbc->more_io = 1; | 657 | wbc->more_io = 1; |
680 | } | 658 | } |
659 | /* b_io is empty */ | ||
660 | return 1; | ||
661 | } | ||
662 | |||
663 | static void writeback_inodes_wb(struct bdi_writeback *wb, | ||
664 | struct writeback_control *wbc) | ||
665 | { | ||
666 | int ret = 0; | ||
681 | 667 | ||
682 | unpin_sb_for_writeback(&pin_sb); | 668 | wbc->wb_start = jiffies; /* livelock avoidance */ |
669 | spin_lock(&inode_lock); | ||
670 | if (!wbc->for_kupdate || list_empty(&wb->b_io)) | ||
671 | queue_io(wb, wbc->older_than_this); | ||
672 | |||
673 | while (!list_empty(&wb->b_io)) { | ||
674 | struct inode *inode = list_entry(wb->b_io.prev, | ||
675 | struct inode, i_list); | ||
676 | struct super_block *sb = inode->i_sb; | ||
677 | enum sb_pin_state state; | ||
678 | |||
679 | if (wbc->sb && sb != wbc->sb) { | ||
680 | /* super block given and doesn't | ||
681 | match, skip this inode */ | ||
682 | redirty_tail(inode); | ||
683 | continue; | ||
684 | } | ||
685 | state = pin_sb_for_writeback(wbc, sb); | ||
686 | |||
687 | if (state == SB_PIN_FAILED) { | ||
688 | requeue_io(inode); | ||
689 | continue; | ||
690 | } | ||
691 | ret = writeback_sb_inodes(sb, wb, wbc); | ||
683 | 692 | ||
693 | if (state == SB_PINNED) | ||
694 | unpin_sb_for_writeback(sb); | ||
695 | if (ret) | ||
696 | break; | ||
697 | } | ||
684 | spin_unlock(&inode_lock); | 698 | spin_unlock(&inode_lock); |
685 | /* Leave any unwritten inodes on b_io */ | 699 | /* Leave any unwritten inodes on b_io */ |
686 | } | 700 | } |
diff --git a/fs/fscache/object-list.c b/fs/fscache/object-list.c index 3221a0c7944e..1e1f286dd70e 100644 --- a/fs/fscache/object-list.c +++ b/fs/fscache/object-list.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #define FSCACHE_DEBUG_LEVEL COOKIE | 12 | #define FSCACHE_DEBUG_LEVEL COOKIE |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/seq_file.h> | 14 | #include <linux/seq_file.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/key.h> | 16 | #include <linux/key.h> |
16 | #include <keys/user-type.h> | 17 | #include <keys/user-type.h> |
17 | #include "internal.h" | 18 | #include "internal.h" |
diff --git a/fs/fscache/object.c b/fs/fscache/object.c index e513ac599c8e..0b589a9b4ffc 100644 --- a/fs/fscache/object.c +++ b/fs/fscache/object.c | |||
@@ -53,7 +53,7 @@ const char fscache_object_states_short[FSCACHE_OBJECT__NSTATES][5] = { | |||
53 | static void fscache_object_slow_work_put_ref(struct slow_work *); | 53 | static void fscache_object_slow_work_put_ref(struct slow_work *); |
54 | static int fscache_object_slow_work_get_ref(struct slow_work *); | 54 | static int fscache_object_slow_work_get_ref(struct slow_work *); |
55 | static void fscache_object_slow_work_execute(struct slow_work *); | 55 | static void fscache_object_slow_work_execute(struct slow_work *); |
56 | #ifdef CONFIG_SLOW_WORK_PROC | 56 | #ifdef CONFIG_SLOW_WORK_DEBUG |
57 | static void fscache_object_slow_work_desc(struct slow_work *, struct seq_file *); | 57 | static void fscache_object_slow_work_desc(struct slow_work *, struct seq_file *); |
58 | #endif | 58 | #endif |
59 | static void fscache_initialise_object(struct fscache_object *); | 59 | static void fscache_initialise_object(struct fscache_object *); |
@@ -69,7 +69,7 @@ const struct slow_work_ops fscache_object_slow_work_ops = { | |||
69 | .get_ref = fscache_object_slow_work_get_ref, | 69 | .get_ref = fscache_object_slow_work_get_ref, |
70 | .put_ref = fscache_object_slow_work_put_ref, | 70 | .put_ref = fscache_object_slow_work_put_ref, |
71 | .execute = fscache_object_slow_work_execute, | 71 | .execute = fscache_object_slow_work_execute, |
72 | #ifdef CONFIG_SLOW_WORK_PROC | 72 | #ifdef CONFIG_SLOW_WORK_DEBUG |
73 | .desc = fscache_object_slow_work_desc, | 73 | .desc = fscache_object_slow_work_desc, |
74 | #endif | 74 | #endif |
75 | }; | 75 | }; |
@@ -364,7 +364,7 @@ static void fscache_object_slow_work_execute(struct slow_work *work) | |||
364 | /* | 364 | /* |
365 | * describe an object for slow-work debugging | 365 | * describe an object for slow-work debugging |
366 | */ | 366 | */ |
367 | #ifdef CONFIG_SLOW_WORK_PROC | 367 | #ifdef CONFIG_SLOW_WORK_DEBUG |
368 | static void fscache_object_slow_work_desc(struct slow_work *work, | 368 | static void fscache_object_slow_work_desc(struct slow_work *work, |
369 | struct seq_file *m) | 369 | struct seq_file *m) |
370 | { | 370 | { |
diff --git a/fs/fscache/operation.c b/fs/fscache/operation.c index 313e79a14266..f17cecafae44 100644 --- a/fs/fscache/operation.c +++ b/fs/fscache/operation.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #define FSCACHE_DEBUG_LEVEL OPERATION | 14 | #define FSCACHE_DEBUG_LEVEL OPERATION |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/seq_file.h> | 16 | #include <linux/seq_file.h> |
17 | #include <linux/slab.h> | ||
17 | #include "internal.h" | 18 | #include "internal.h" |
18 | 19 | ||
19 | atomic_t fscache_op_debug_id; | 20 | atomic_t fscache_op_debug_id; |
@@ -500,7 +501,7 @@ static void fscache_op_execute(struct slow_work *work) | |||
500 | /* | 501 | /* |
501 | * describe an operation for slow-work debugging | 502 | * describe an operation for slow-work debugging |
502 | */ | 503 | */ |
503 | #ifdef CONFIG_SLOW_WORK_PROC | 504 | #ifdef CONFIG_SLOW_WORK_DEBUG |
504 | static void fscache_op_desc(struct slow_work *work, struct seq_file *m) | 505 | static void fscache_op_desc(struct slow_work *work, struct seq_file *m) |
505 | { | 506 | { |
506 | struct fscache_operation *op = | 507 | struct fscache_operation *op = |
@@ -517,7 +518,7 @@ const struct slow_work_ops fscache_op_slow_work_ops = { | |||
517 | .get_ref = fscache_op_get_ref, | 518 | .get_ref = fscache_op_get_ref, |
518 | .put_ref = fscache_op_put_ref, | 519 | .put_ref = fscache_op_put_ref, |
519 | .execute = fscache_op_execute, | 520 | .execute = fscache_op_execute, |
520 | #ifdef CONFIG_SLOW_WORK_PROC | 521 | #ifdef CONFIG_SLOW_WORK_DEBUG |
521 | .desc = fscache_op_desc, | 522 | .desc = fscache_op_desc, |
522 | #endif | 523 | #endif |
523 | }; | 524 | }; |
diff --git a/fs/fscache/page.c b/fs/fscache/page.c index c598ea4c4e7d..47aefd376e54 100644 --- a/fs/fscache/page.c +++ b/fs/fscache/page.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/fscache-cache.h> | 14 | #include <linux/fscache-cache.h> |
15 | #include <linux/buffer_head.h> | 15 | #include <linux/buffer_head.h> |
16 | #include <linux/pagevec.h> | 16 | #include <linux/pagevec.h> |
17 | #include <linux/slab.h> | ||
17 | #include "internal.h" | 18 | #include "internal.h" |
18 | 19 | ||
19 | /* | 20 | /* |
@@ -881,6 +882,7 @@ submit_failed: | |||
881 | goto nobufs; | 882 | goto nobufs; |
882 | 883 | ||
883 | nobufs_unlock_obj: | 884 | nobufs_unlock_obj: |
885 | spin_unlock(&cookie->stores_lock); | ||
884 | spin_unlock(&object->lock); | 886 | spin_unlock(&object->lock); |
885 | nobufs: | 887 | nobufs: |
886 | spin_unlock(&cookie->lock); | 888 | spin_unlock(&cookie->lock); |
diff --git a/fs/fscache/stats.c b/fs/fscache/stats.c index 46435f3aae68..4765190d537f 100644 --- a/fs/fscache/stats.c +++ b/fs/fscache/stats.c | |||
@@ -165,8 +165,8 @@ static int fscache_stats_show(struct seq_file *m, void *v) | |||
165 | atomic_read(&fscache_n_object_lookups), | 165 | atomic_read(&fscache_n_object_lookups), |
166 | atomic_read(&fscache_n_object_lookups_negative), | 166 | atomic_read(&fscache_n_object_lookups_negative), |
167 | atomic_read(&fscache_n_object_lookups_positive), | 167 | atomic_read(&fscache_n_object_lookups_positive), |
168 | atomic_read(&fscache_n_object_lookups_timed_out), | 168 | atomic_read(&fscache_n_object_created), |
169 | atomic_read(&fscache_n_object_created)); | 169 | atomic_read(&fscache_n_object_lookups_timed_out)); |
170 | 170 | ||
171 | seq_printf(m, "Updates: n=%u nul=%u run=%u\n", | 171 | seq_printf(m, "Updates: n=%u nul=%u run=%u\n", |
172 | atomic_read(&fscache_n_updates), | 172 | atomic_read(&fscache_n_updates), |
diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c index de792dcf3274..e1f8171278bd 100644 --- a/fs/fuse/cuse.c +++ b/fs/fuse/cuse.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/magic.h> | 44 | #include <linux/magic.h> |
45 | #include <linux/miscdevice.h> | 45 | #include <linux/miscdevice.h> |
46 | #include <linux/mutex.h> | 46 | #include <linux/mutex.h> |
47 | #include <linux/slab.h> | ||
47 | #include <linux/spinlock.h> | 48 | #include <linux/spinlock.h> |
48 | #include <linux/stat.h> | 49 | #include <linux/stat.h> |
49 | 50 | ||
diff --git a/fs/generic_acl.c b/fs/generic_acl.c index 55458031e501..fe5df5457656 100644 --- a/fs/generic_acl.c +++ b/fs/generic_acl.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/gfp.h> | ||
10 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
11 | #include <linux/generic_acl.h> | 12 | #include <linux/generic_acl.h> |
12 | #include <linux/posix_acl.h> | 13 | #include <linux/posix_acl.h> |
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 583e823307ae..5e411d5f4697 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/slab.h> | ||
11 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
12 | #include <linux/completion.h> | 11 | #include <linux/completion.h> |
13 | #include <linux/buffer_head.h> | 12 | #include <linux/buffer_head.h> |
diff --git a/fs/gfs2/dentry.c b/fs/gfs2/dentry.c index 91beddadd388..bb7907bde3d8 100644 --- a/fs/gfs2/dentry.c +++ b/fs/gfs2/dentry.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/slab.h> | ||
11 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
12 | #include <linux/completion.h> | 11 | #include <linux/completion.h> |
13 | #include <linux/buffer_head.h> | 12 | #include <linux/buffer_head.h> |
diff --git a/fs/gfs2/export.c b/fs/gfs2/export.c index d15876e9aa26..c22c21174833 100644 --- a/fs/gfs2/export.c +++ b/fs/gfs2/export.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/slab.h> | ||
11 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
12 | #include <linux/completion.h> | 11 | #include <linux/completion.h> |
13 | #include <linux/buffer_head.h> | 12 | #include <linux/buffer_head.h> |
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 38e3749d476c..49f97d3bb690 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/slab.h> | ||
11 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
12 | #include <linux/completion.h> | 11 | #include <linux/completion.h> |
13 | #include <linux/buffer_head.h> | 12 | #include <linux/buffer_head.h> |
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c index 569b46240f61..0e0470ed34c2 100644 --- a/fs/gfs2/lock_dlm.c +++ b/fs/gfs2/lock_dlm.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
11 | #include <linux/dlm.h> | 11 | #include <linux/dlm.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/types.h> | 13 | #include <linux/types.h> |
13 | #include <linux/gfs2_ondisk.h> | 14 | #include <linux/gfs2_ondisk.h> |
14 | 15 | ||
diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h index b4106ddaaa98..f07119d89557 100644 --- a/fs/gfs2/rgrp.h +++ b/fs/gfs2/rgrp.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #ifndef __RGRP_DOT_H__ | 10 | #ifndef __RGRP_DOT_H__ |
11 | #define __RGRP_DOT_H__ | 11 | #define __RGRP_DOT_H__ |
12 | 12 | ||
13 | #include <linux/slab.h> | ||
14 | |||
13 | struct gfs2_rgrpd; | 15 | struct gfs2_rgrpd; |
14 | struct gfs2_sbd; | 16 | struct gfs2_sbd; |
15 | struct gfs2_holder; | 17 | struct gfs2_holder; |
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index 419042f7f0b6..54fd98425991 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c | |||
@@ -8,7 +8,6 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/slab.h> | ||
12 | #include <linux/spinlock.h> | 11 | #include <linux/spinlock.h> |
13 | #include <linux/completion.h> | 12 | #include <linux/completion.h> |
14 | #include <linux/buffer_head.h> | 13 | #include <linux/buffer_head.h> |
diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c index 226f2bfbf16a..53511291fe36 100644 --- a/fs/gfs2/util.c +++ b/fs/gfs2/util.c | |||
@@ -7,7 +7,6 @@ | |||
7 | * of the GNU General Public License version 2. | 7 | * of the GNU General Public License version 2. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/slab.h> | ||
11 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
12 | #include <linux/completion.h> | 11 | #include <linux/completion.h> |
13 | #include <linux/buffer_head.h> | 12 | #include <linux/buffer_head.h> |
diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c index 0d200068d0af..cdb41a1f6a64 100644 --- a/fs/hfs/bnode.c +++ b/fs/hfs/bnode.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/pagemap.h> | 11 | #include <linux/pagemap.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/swap.h> | 13 | #include <linux/swap.h> |
13 | 14 | ||
14 | #include "btree.h" | 15 | #include "btree.h" |
diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c index 052f214ea6f0..38a0a9917d7f 100644 --- a/fs/hfs/btree.c +++ b/fs/hfs/btree.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/pagemap.h> | 11 | #include <linux/pagemap.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/log2.h> | 13 | #include <linux/log2.h> |
13 | 14 | ||
14 | #include "btree.h" | 15 | #include "btree.h" |
diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c index 8bbe03c3f6d5..86428f5ac991 100644 --- a/fs/hfs/mdb.c +++ b/fs/hfs/mdb.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/cdrom.h> | 11 | #include <linux/cdrom.h> |
12 | #include <linux/genhd.h> | 12 | #include <linux/genhd.h> |
13 | #include <linux/nls.h> | 13 | #include <linux/nls.h> |
14 | #include <linux/slab.h> | ||
14 | 15 | ||
15 | #include "hfs_fs.h" | 16 | #include "hfs_fs.h" |
16 | #include "btree.h" | 17 | #include "btree.h" |
diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 5ed7252b7b23..0a81eb7111f3 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/nls.h> | 19 | #include <linux/nls.h> |
20 | #include <linux/parser.h> | 20 | #include <linux/parser.h> |
21 | #include <linux/seq_file.h> | 21 | #include <linux/seq_file.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/smp_lock.h> | 23 | #include <linux/smp_lock.h> |
23 | #include <linux/vfs.h> | 24 | #include <linux/vfs.h> |
24 | 25 | ||
diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c index 3fcbb0e1f6fc..572628b4b07d 100644 --- a/fs/hfsplus/options.c +++ b/fs/hfsplus/options.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/nls.h> | 15 | #include <linux/nls.h> |
16 | #include <linux/mount.h> | 16 | #include <linux/mount.h> |
17 | #include <linux/seq_file.h> | 17 | #include <linux/seq_file.h> |
18 | #include <linux/slab.h> | ||
18 | #include "hfsplus_fs.h" | 19 | #include "hfsplus_fs.h" |
19 | 20 | ||
20 | enum { | 21 | enum { |
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 032604e5ef2c..3a029d8f4cf1 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
12 | #include <linux/pagemap.h> | 12 | #include <linux/pagemap.h> |
13 | #include <linux/statfs.h> | 13 | #include <linux/statfs.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/seq_file.h> | 15 | #include <linux/seq_file.h> |
15 | #include <linux/mount.h> | 16 | #include <linux/mount.h> |
16 | #include "hostfs.h" | 17 | #include "hostfs.h" |
diff --git a/fs/hpfs/buffer.c b/fs/hpfs/buffer.c index b6fca543544c..eac5f96323e3 100644 --- a/fs/hpfs/buffer.c +++ b/fs/hpfs/buffer.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * general buffer i/o | 6 | * general buffer i/o |
7 | */ | 7 | */ |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/slab.h> | ||
9 | #include "hpfs_fn.h" | 10 | #include "hpfs_fn.h" |
10 | 11 | ||
11 | void hpfs_lock_creation(struct super_block *s) | 12 | void hpfs_lock_creation(struct super_block *s) |
diff --git a/fs/hpfs/dir.c b/fs/hpfs/dir.c index 26e3964a4b8c..2338130cceba 100644 --- a/fs/hpfs/dir.c +++ b/fs/hpfs/dir.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/smp_lock.h> | 9 | #include <linux/smp_lock.h> |
10 | #include <linux/slab.h> | ||
10 | #include "hpfs_fn.h" | 11 | #include "hpfs_fn.h" |
11 | 12 | ||
12 | static int hpfs_dir_release(struct inode *inode, struct file *filp) | 13 | static int hpfs_dir_release(struct inode *inode, struct file *filp) |
diff --git a/fs/hpfs/inode.c b/fs/hpfs/inode.c index ff90affb94e1..1042a9bc97f3 100644 --- a/fs/hpfs/inode.c +++ b/fs/hpfs/inode.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/smp_lock.h> | 9 | #include <linux/smp_lock.h> |
10 | #include <linux/slab.h> | ||
10 | #include "hpfs_fn.h" | 11 | #include "hpfs_fn.h" |
11 | 12 | ||
12 | void hpfs_init_inode(struct inode *i) | 13 | void hpfs_init_inode(struct inode *i) |
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index cadc4ce48656..aa53842c599c 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/smp_lock.h> | 16 | #include <linux/smp_lock.h> |
17 | #include <linux/bitmap.h> | 17 | #include <linux/bitmap.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | /* Mark the filesystem dirty, so that chkdsk checks it when os/2 booted */ | 20 | /* Mark the filesystem dirty, so that chkdsk checks it when os/2 booted */ |
20 | 21 | ||
diff --git a/fs/ioprio.c b/fs/ioprio.c index c7c0b28d7d21..748cfb92dcc6 100644 --- a/fs/ioprio.c +++ b/fs/ioprio.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * See also Documentation/block/ioprio.txt | 19 | * See also Documentation/block/ioprio.txt |
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | #include <linux/gfp.h> | ||
22 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
23 | #include <linux/ioprio.h> | 24 | #include <linux/ioprio.h> |
24 | #include <linux/blkdev.h> | 25 | #include <linux/blkdev.h> |
diff --git a/fs/isofs/dir.c b/fs/isofs/dir.c index 8ba5441063be..b9ab69b3a482 100644 --- a/fs/isofs/dir.c +++ b/fs/isofs/dir.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * isofs directory handling functions | 11 | * isofs directory handling functions |
12 | */ | 12 | */ |
13 | #include <linux/smp_lock.h> | 13 | #include <linux/smp_lock.h> |
14 | #include <linux/gfp.h> | ||
14 | #include "isofs.h" | 15 | #include "isofs.h" |
15 | 16 | ||
16 | int isofs_name_translate(struct iso_directory_record *de, char *new, struct inode *inode) | 17 | int isofs_name_translate(struct iso_directory_record *de, char *new, struct inode *inode) |
diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c index eaa831311c9c..ab438beb867c 100644 --- a/fs/isofs/namei.c +++ b/fs/isofs/namei.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/smp_lock.h> | 9 | #include <linux/smp_lock.h> |
10 | #include <linux/gfp.h> | ||
10 | #include "isofs.h" | 11 | #include "isofs.h" |
11 | 12 | ||
12 | /* | 13 | /* |
diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index 2c90e3ef625f..ecb44c94ba8d 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/jbd.h> | 18 | #include <linux/jbd.h> |
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
22 | #include <linux/pagemap.h> | 21 | #include <linux/pagemap.h> |
23 | #include <linux/bio.h> | 22 | #include <linux/bio.h> |
diff --git a/fs/jbd/recovery.c b/fs/jbd/recovery.c index cb1a49ae605e..54c9bc9e1b17 100644 --- a/fs/jbd/recovery.c +++ b/fs/jbd/recovery.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
21 | #include <linux/jbd.h> | 21 | #include <linux/jbd.h> |
22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
23 | #include <linux/slab.h> | ||
24 | #endif | 23 | #endif |
25 | 24 | ||
26 | /* | 25 | /* |
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c index 73063285b13f..049281b7cb89 100644 --- a/fs/jbd2/recovery.c +++ b/fs/jbd2/recovery.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
21 | #include <linux/jbd2.h> | 21 | #include <linux/jbd2.h> |
22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
23 | #include <linux/slab.h> | ||
24 | #include <linux/crc32.h> | 23 | #include <linux/crc32.h> |
25 | #endif | 24 | #endif |
26 | 25 | ||
diff --git a/fs/jffs2/compr_lzo.c b/fs/jffs2/compr_lzo.c index 90cb60d09787..cd02acafde8a 100644 --- a/fs/jffs2/compr_lzo.c +++ b/fs/jffs2/compr_lzo.c | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/slab.h> | ||
15 | #include <linux/vmalloc.h> | 14 | #include <linux/vmalloc.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/lzo.h> | 16 | #include <linux/lzo.h> |
diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c index cfd301a5edfc..b46661a42758 100644 --- a/fs/jffs2/compr_zlib.c +++ b/fs/jffs2/compr_zlib.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/zlib.h> | 17 | #include <linux/zlib.h> |
19 | #include <linux/zutil.h> | 18 | #include <linux/zutil.h> |
20 | #include "nodelist.h" | 19 | #include "nodelist.h" |
diff --git a/fs/jffs2/debug.c b/fs/jffs2/debug.c index 5544d31c066b..ec3538413926 100644 --- a/fs/jffs2/debug.c +++ b/fs/jffs2/debug.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/crc32.h> | 15 | #include <linux/crc32.h> |
16 | #include <linux/jffs2.h> | 16 | #include <linux/jffs2.h> |
17 | #include <linux/mtd/mtd.h> | 17 | #include <linux/mtd/mtd.h> |
18 | #include <linux/slab.h> | ||
18 | #include "nodelist.h" | 19 | #include "nodelist.h" |
19 | #include "debug.h" | 20 | #include "debug.h" |
20 | 21 | ||
diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c index b7b74e299142..e7291c161a19 100644 --- a/fs/jffs2/file.c +++ b/fs/jffs2/file.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
15 | #include <linux/time.h> | 14 | #include <linux/time.h> |
16 | #include <linux/pagemap.h> | 15 | #include <linux/pagemap.h> |
diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c index 87c6f555e1a0..af02bd138469 100644 --- a/fs/jffs2/nodelist.c +++ b/fs/jffs2/nodelist.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/mtd/mtd.h> | 15 | #include <linux/mtd/mtd.h> |
16 | #include <linux/rbtree.h> | 16 | #include <linux/rbtree.h> |
17 | #include <linux/crc32.h> | 17 | #include <linux/crc32.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/pagemap.h> | 18 | #include <linux/pagemap.h> |
20 | #include "nodelist.h" | 19 | #include "nodelist.h" |
21 | 20 | ||
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c index 21a052915aa9..191359dde4e1 100644 --- a/fs/jffs2/nodemgmt.c +++ b/fs/jffs2/nodemgmt.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/mtd/mtd.h> | 13 | #include <linux/mtd/mtd.h> |
15 | #include <linux/compiler.h> | 14 | #include <linux/compiler.h> |
16 | #include <linux/sched.h> /* For cond_resched() */ | 15 | #include <linux/sched.h> /* For cond_resched() */ |
diff --git a/fs/jffs2/symlink.c b/fs/jffs2/symlink.c index 4ec11e8bda8c..b955626071c2 100644 --- a/fs/jffs2/symlink.c +++ b/fs/jffs2/symlink.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
15 | #include <linux/namei.h> | 14 | #include <linux/namei.h> |
16 | #include "nodelist.h" | 15 | #include "nodelist.h" |
diff --git a/fs/jffs2/write.c b/fs/jffs2/write.c index ca29440e9435..c819eb0e982d 100644 --- a/fs/jffs2/write.c +++ b/fs/jffs2/write.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/crc32.h> | 14 | #include <linux/crc32.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/pagemap.h> | 15 | #include <linux/pagemap.h> |
17 | #include <linux/mtd/mtd.h> | 16 | #include <linux/mtd/mtd.h> |
18 | #include "nodelist.h" | 17 | #include "nodelist.h" |
diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c index 213169780b6c..1057a4998e4e 100644 --- a/fs/jfs/acl.c +++ b/fs/jfs/acl.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/fs.h> | 23 | #include <linux/fs.h> |
23 | #include <linux/posix_acl_xattr.h> | 24 | #include <linux/posix_acl_xattr.h> |
24 | #include "jfs_incore.h" | 25 | #include "jfs_incore.h" |
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index d9b031cf69f5..6c4dfcbf3f55 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
20 | #include <linux/slab.h> | ||
20 | #include "jfs_incore.h" | 21 | #include "jfs_incore.h" |
21 | #include "jfs_superblock.h" | 22 | #include "jfs_superblock.h" |
22 | #include "jfs_dmap.h" | 23 | #include "jfs_dmap.h" |
diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c index 0e4623be70ce..9197a1b0d02d 100644 --- a/fs/jfs/jfs_dtree.c +++ b/fs/jfs/jfs_dtree.c | |||
@@ -102,6 +102,7 @@ | |||
102 | 102 | ||
103 | #include <linux/fs.h> | 103 | #include <linux/fs.h> |
104 | #include <linux/quotaops.h> | 104 | #include <linux/quotaops.h> |
105 | #include <linux/slab.h> | ||
105 | #include "jfs_incore.h" | 106 | #include "jfs_incore.h" |
106 | #include "jfs_superblock.h" | 107 | #include "jfs_superblock.h" |
107 | #include "jfs_filsys.h" | 108 | #include "jfs_filsys.h" |
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index 0fc30407f039..f8332dc8eeb2 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/buffer_head.h> | 45 | #include <linux/buffer_head.h> |
46 | #include <linux/pagemap.h> | 46 | #include <linux/pagemap.h> |
47 | #include <linux/quotaops.h> | 47 | #include <linux/quotaops.h> |
48 | #include <linux/slab.h> | ||
48 | 49 | ||
49 | #include "jfs_incore.h" | 50 | #include "jfs_incore.h" |
50 | #include "jfs_inode.h" | 51 | #include "jfs_inode.h" |
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 335c4de6552d..c51af2a14516 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c | |||
@@ -70,6 +70,7 @@ | |||
70 | #include <linux/delay.h> | 70 | #include <linux/delay.h> |
71 | #include <linux/mutex.h> | 71 | #include <linux/mutex.h> |
72 | #include <linux/seq_file.h> | 72 | #include <linux/seq_file.h> |
73 | #include <linux/slab.h> | ||
73 | #include "jfs_incore.h" | 74 | #include "jfs_incore.h" |
74 | #include "jfs_filsys.h" | 75 | #include "jfs_filsys.h" |
75 | #include "jfs_metapage.h" | 76 | #include "jfs_metapage.h" |
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c index 07b6c5dfb4b6..48b44bd8267b 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/bio.h> | 23 | #include <linux/bio.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/buffer_head.h> | 26 | #include <linux/buffer_head.h> |
26 | #include <linux/mempool.h> | 27 | #include <linux/mempool.h> |
diff --git a/fs/jfs/jfs_unicode.h b/fs/jfs/jfs_unicode.h index 3fbb3a225590..8f0f02cb6ca6 100644 --- a/fs/jfs/jfs_unicode.h +++ b/fs/jfs/jfs_unicode.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #ifndef _H_JFS_UNICODE | 19 | #ifndef _H_JFS_UNICODE |
20 | #define _H_JFS_UNICODE | 20 | #define _H_JFS_UNICODE |
21 | 21 | ||
22 | #include <linux/slab.h> | ||
22 | #include <asm/byteorder.h> | 23 | #include <asm/byteorder.h> |
23 | #include "jfs_types.h" | 24 | #include "jfs_types.h" |
24 | 25 | ||
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 266699deb1c6..157382fa6256 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/buffer_head.h> | 30 | #include <linux/buffer_head.h> |
31 | #include <linux/exportfs.h> | 31 | #include <linux/exportfs.h> |
32 | #include <linux/crc32.h> | 32 | #include <linux/crc32.h> |
33 | #include <linux/slab.h> | ||
33 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
34 | #include <linux/seq_file.h> | 35 | #include <linux/seq_file.h> |
35 | #include <linux/smp_lock.h> | 36 | #include <linux/smp_lock.h> |
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c index 1f594ab21895..fa96bbb26343 100644 --- a/fs/jfs/xattr.c +++ b/fs/jfs/xattr.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
22 | #include <linux/xattr.h> | 22 | #include <linux/xattr.h> |
23 | #include <linux/posix_acl_xattr.h> | 23 | #include <linux/posix_acl_xattr.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/quotaops.h> | 25 | #include <linux/quotaops.h> |
25 | #include <linux/security.h> | 26 | #include <linux/security.h> |
26 | #include "jfs_incore.h" | 27 | #include "jfs_incore.h" |
diff --git a/fs/libfs.c b/fs/libfs.c index 9e50bcf55857..ea9a6cc9b35c 100644 --- a/fs/libfs.c +++ b/fs/libfs.c | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
7 | #include <linux/pagemap.h> | 7 | #include <linux/pagemap.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/mount.h> | 9 | #include <linux/mount.h> |
9 | #include <linux/vfs.h> | 10 | #include <linux/vfs.h> |
10 | #include <linux/mutex.h> | 11 | #include <linux/mutex.h> |
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index fc9032dc8862..64fd427c993c 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/time.h> | 12 | #include <linux/time.h> |
12 | #include <linux/nfs_fs.h> | 13 | #include <linux/nfs_fs.h> |
13 | #include <linux/sunrpc/clnt.h> | 14 | #include <linux/sunrpc/clnt.h> |
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index c81249fef11f..7932c399fab4 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/smp_lock.h> | 10 | #include <linux/smp_lock.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/types.h> | 12 | #include <linux/types.h> |
12 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
13 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index fefa4df3f005..e3015464fbab 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/utsname.h> | 10 | #include <linux/utsname.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/ktime.h> | 12 | #include <linux/ktime.h> |
13 | #include <linux/slab.h> | ||
13 | 14 | ||
14 | #include <linux/sunrpc/clnt.h> | 15 | #include <linux/sunrpc/clnt.h> |
15 | #include <linux/sunrpc/xprtsock.h> | 16 | #include <linux/sunrpc/xprtsock.h> |
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 7d150517ddf0..f1bacf1a0391 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/in.h> | 22 | #include <linux/in.h> |
23 | #include <linux/uio.h> | 23 | #include <linux/uio.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/smp.h> | 24 | #include <linux/smp.h> |
26 | #include <linux/smp_lock.h> | 25 | #include <linux/smp_lock.h> |
27 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c index a7966eed3c17..031c6569a134 100644 --- a/fs/lockd/svc4proc.c +++ b/fs/lockd/svc4proc.c | |||
@@ -9,7 +9,6 @@ | |||
9 | 9 | ||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/time.h> | 11 | #include <linux/time.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/smp_lock.h> | 12 | #include <linux/smp_lock.h> |
14 | #include <linux/lockd/lockd.h> | 13 | #include <linux/lockd/lockd.h> |
15 | #include <linux/lockd/share.h> | 14 | #include <linux/lockd/share.h> |
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index d1001790fa9a..84055d31bfc5 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
25 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
26 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c index 56c9519d900a..0f2ab741ae7c 100644 --- a/fs/lockd/svcproc.c +++ b/fs/lockd/svcproc.c | |||
@@ -9,7 +9,6 @@ | |||
9 | 9 | ||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/time.h> | 11 | #include <linux/time.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/smp_lock.h> | 12 | #include <linux/smp_lock.h> |
14 | #include <linux/lockd/lockd.h> | 13 | #include <linux/lockd/lockd.h> |
15 | #include <linux/lockd/share.h> | 14 | #include <linux/lockd/share.h> |
diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c index ad478da7ca63..d0ef94cfb3da 100644 --- a/fs/lockd/svcsubs.c +++ b/fs/lockd/svcsubs.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/time.h> | 11 | #include <linux/time.h> |
12 | #include <linux/in.h> | 12 | #include <linux/in.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
14 | #include <linux/sunrpc/svc.h> | 15 | #include <linux/sunrpc/svc.h> |
15 | #include <linux/sunrpc/clnt.h> | 16 | #include <linux/sunrpc/clnt.h> |
diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c index 9718c22f186d..243c00071f76 100644 --- a/fs/logfs/dev_bdev.c +++ b/fs/logfs/dev_bdev.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/bio.h> | 9 | #include <linux/bio.h> |
10 | #include <linux/blkdev.h> | 10 | #include <linux/blkdev.h> |
11 | #include <linux/buffer_head.h> | 11 | #include <linux/buffer_head.h> |
12 | #include <linux/gfp.h> | ||
12 | 13 | ||
13 | #define PAGE_OFS(ofs) ((ofs) & (PAGE_SIZE-1)) | 14 | #define PAGE_OFS(ofs) ((ofs) & (PAGE_SIZE-1)) |
14 | 15 | ||
@@ -80,6 +81,7 @@ static void writeseg_end_io(struct bio *bio, int err) | |||
80 | prefetchw(&bvec->bv_page->flags); | 81 | prefetchw(&bvec->bv_page->flags); |
81 | 82 | ||
82 | end_page_writeback(page); | 83 | end_page_writeback(page); |
84 | page_cache_release(page); | ||
83 | } while (bvec >= bio->bi_io_vec); | 85 | } while (bvec >= bio->bi_io_vec); |
84 | bio_put(bio); | 86 | bio_put(bio); |
85 | if (atomic_dec_and_test(&super->s_pending_writes)) | 87 | if (atomic_dec_and_test(&super->s_pending_writes)) |
@@ -97,8 +99,10 @@ static int __bdev_writeseg(struct super_block *sb, u64 ofs, pgoff_t index, | |||
97 | unsigned int max_pages = queue_max_hw_sectors(q) >> (PAGE_SHIFT - 9); | 99 | unsigned int max_pages = queue_max_hw_sectors(q) >> (PAGE_SHIFT - 9); |
98 | int i; | 100 | int i; |
99 | 101 | ||
102 | if (max_pages > BIO_MAX_PAGES) | ||
103 | max_pages = BIO_MAX_PAGES; | ||
100 | bio = bio_alloc(GFP_NOFS, max_pages); | 104 | bio = bio_alloc(GFP_NOFS, max_pages); |
101 | BUG_ON(!bio); /* FIXME: handle this */ | 105 | BUG_ON(!bio); |
102 | 106 | ||
103 | for (i = 0; i < nr_pages; i++) { | 107 | for (i = 0; i < nr_pages; i++) { |
104 | if (i >= max_pages) { | 108 | if (i >= max_pages) { |
@@ -191,8 +195,10 @@ static int do_erase(struct super_block *sb, u64 ofs, pgoff_t index, | |||
191 | unsigned int max_pages = queue_max_hw_sectors(q) >> (PAGE_SHIFT - 9); | 195 | unsigned int max_pages = queue_max_hw_sectors(q) >> (PAGE_SHIFT - 9); |
192 | int i; | 196 | int i; |
193 | 197 | ||
198 | if (max_pages > BIO_MAX_PAGES) | ||
199 | max_pages = BIO_MAX_PAGES; | ||
194 | bio = bio_alloc(GFP_NOFS, max_pages); | 200 | bio = bio_alloc(GFP_NOFS, max_pages); |
195 | BUG_ON(!bio); /* FIXME: handle this */ | 201 | BUG_ON(!bio); |
196 | 202 | ||
197 | for (i = 0; i < nr_pages; i++) { | 203 | for (i = 0; i < nr_pages; i++) { |
198 | if (i >= max_pages) { | 204 | if (i >= max_pages) { |
diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c index 56a8bfbb0120..2396a85c0f55 100644 --- a/fs/logfs/dir.c +++ b/fs/logfs/dir.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Copyright (c) 2005-2008 Joern Engel <joern@logfs.org> | 6 | * Copyright (c) 2005-2008 Joern Engel <joern@logfs.org> |
7 | */ | 7 | */ |
8 | #include "logfs.h" | 8 | #include "logfs.h" |
9 | 9 | #include <linux/slab.h> | |
10 | 10 | ||
11 | /* | 11 | /* |
12 | * Atomic dir operations | 12 | * Atomic dir operations |
@@ -303,12 +303,12 @@ static int __logfs_readdir(struct file *file, void *buf, filldir_t filldir) | |||
303 | (filler_t *)logfs_readpage, NULL); | 303 | (filler_t *)logfs_readpage, NULL); |
304 | if (IS_ERR(page)) | 304 | if (IS_ERR(page)) |
305 | return PTR_ERR(page); | 305 | return PTR_ERR(page); |
306 | dd = kmap_atomic(page, KM_USER0); | 306 | dd = kmap(page); |
307 | BUG_ON(dd->namelen == 0); | 307 | BUG_ON(dd->namelen == 0); |
308 | 308 | ||
309 | full = filldir(buf, (char *)dd->name, be16_to_cpu(dd->namelen), | 309 | full = filldir(buf, (char *)dd->name, be16_to_cpu(dd->namelen), |
310 | pos, be64_to_cpu(dd->ino), dd->type); | 310 | pos, be64_to_cpu(dd->ino), dd->type); |
311 | kunmap_atomic(dd, KM_USER0); | 311 | kunmap(page); |
312 | page_cache_release(page); | 312 | page_cache_release(page); |
313 | if (full) | 313 | if (full) |
314 | break; | 314 | break; |
diff --git a/fs/logfs/gc.c b/fs/logfs/gc.c index 92949f95a901..84e36f52fe95 100644 --- a/fs/logfs/gc.c +++ b/fs/logfs/gc.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | #include "logfs.h" | 8 | #include "logfs.h" |
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/slab.h> | ||
10 | 11 | ||
11 | /* | 12 | /* |
12 | * Wear leveling needs to kick in when the difference between low erase | 13 | * Wear leveling needs to kick in when the difference between low erase |
diff --git a/fs/logfs/inode.c b/fs/logfs/inode.c index 33ec1aeaeec4..14ed27274da2 100644 --- a/fs/logfs/inode.c +++ b/fs/logfs/inode.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Copyright (c) 2005-2008 Joern Engel <joern@logfs.org> | 6 | * Copyright (c) 2005-2008 Joern Engel <joern@logfs.org> |
7 | */ | 7 | */ |
8 | #include "logfs.h" | 8 | #include "logfs.h" |
9 | #include <linux/slab.h> | ||
9 | #include <linux/writeback.h> | 10 | #include <linux/writeback.h> |
10 | #include <linux/backing-dev.h> | 11 | #include <linux/backing-dev.h> |
11 | 12 | ||
diff --git a/fs/logfs/journal.c b/fs/logfs/journal.c index 6ad30a4c9052..33bd260b8309 100644 --- a/fs/logfs/journal.c +++ b/fs/logfs/journal.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Copyright (c) 2005-2008 Joern Engel <joern@logfs.org> | 6 | * Copyright (c) 2005-2008 Joern Engel <joern@logfs.org> |
7 | */ | 7 | */ |
8 | #include "logfs.h" | 8 | #include "logfs.h" |
9 | #include <linux/slab.h> | ||
9 | 10 | ||
10 | static void logfs_calc_free(struct super_block *sb) | 11 | static void logfs_calc_free(struct super_block *sb) |
11 | { | 12 | { |
@@ -800,6 +801,7 @@ void do_logfs_journal_wl_pass(struct super_block *sb) | |||
800 | { | 801 | { |
801 | struct logfs_super *super = logfs_super(sb); | 802 | struct logfs_super *super = logfs_super(sb); |
802 | struct logfs_area *area = super->s_journal_area; | 803 | struct logfs_area *area = super->s_journal_area; |
804 | struct btree_head32 *head = &super->s_reserved_segments; | ||
803 | u32 segno, ec; | 805 | u32 segno, ec; |
804 | int i, err; | 806 | int i, err; |
805 | 807 | ||
@@ -807,6 +809,7 @@ void do_logfs_journal_wl_pass(struct super_block *sb) | |||
807 | /* Drop old segments */ | 809 | /* Drop old segments */ |
808 | journal_for_each(i) | 810 | journal_for_each(i) |
809 | if (super->s_journal_seg[i]) { | 811 | if (super->s_journal_seg[i]) { |
812 | btree_remove32(head, super->s_journal_seg[i]); | ||
810 | logfs_set_segment_unreserved(sb, | 813 | logfs_set_segment_unreserved(sb, |
811 | super->s_journal_seg[i], | 814 | super->s_journal_seg[i], |
812 | super->s_journal_ec[i]); | 815 | super->s_journal_ec[i]); |
@@ -819,8 +822,13 @@ void do_logfs_journal_wl_pass(struct super_block *sb) | |||
819 | super->s_journal_seg[i] = segno; | 822 | super->s_journal_seg[i] = segno; |
820 | super->s_journal_ec[i] = ec; | 823 | super->s_journal_ec[i] = ec; |
821 | logfs_set_segment_reserved(sb, segno); | 824 | logfs_set_segment_reserved(sb, segno); |
825 | err = btree_insert32(head, segno, (void *)1, GFP_KERNEL); | ||
826 | BUG_ON(err); /* mempool should prevent this */ | ||
827 | err = logfs_erase_segment(sb, segno, 1); | ||
828 | BUG_ON(err); /* FIXME: remount-ro would be nicer */ | ||
822 | } | 829 | } |
823 | /* Manually move journal_area */ | 830 | /* Manually move journal_area */ |
831 | freeseg(sb, area->a_segno); | ||
824 | area->a_segno = super->s_journal_seg[0]; | 832 | area->a_segno = super->s_journal_seg[0]; |
825 | area->a_is_open = 0; | 833 | area->a_is_open = 0; |
826 | area->a_used_bytes = 0; | 834 | area->a_used_bytes = 0; |
diff --git a/fs/logfs/logfs.h b/fs/logfs/logfs.h index 129779431373..b84b0eec6024 100644 --- a/fs/logfs/logfs.h +++ b/fs/logfs/logfs.h | |||
@@ -587,6 +587,7 @@ void move_page_to_btree(struct page *page); | |||
587 | int logfs_init_mapping(struct super_block *sb); | 587 | int logfs_init_mapping(struct super_block *sb); |
588 | void logfs_sync_area(struct logfs_area *area); | 588 | void logfs_sync_area(struct logfs_area *area); |
589 | void logfs_sync_segments(struct super_block *sb); | 589 | void logfs_sync_segments(struct super_block *sb); |
590 | void freeseg(struct super_block *sb, u32 segno); | ||
590 | 591 | ||
591 | /* area handling */ | 592 | /* area handling */ |
592 | int logfs_init_areas(struct super_block *sb); | 593 | int logfs_init_areas(struct super_block *sb); |
diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c index 7a23b3e7c0a7..bff40253dfb2 100644 --- a/fs/logfs/readwrite.c +++ b/fs/logfs/readwrite.c | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | #include "logfs.h" | 19 | #include "logfs.h" |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | static u64 adjust_bix(u64 bix, level_t level) | 23 | static u64 adjust_bix(u64 bix, level_t level) |
23 | { | 24 | { |
@@ -1594,7 +1595,6 @@ int logfs_delete(struct inode *inode, pgoff_t index, | |||
1594 | return ret; | 1595 | return ret; |
1595 | } | 1596 | } |
1596 | 1597 | ||
1597 | /* Rewrite cannot mark the inode dirty but has to write it immediatly. */ | ||
1598 | int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs, | 1598 | int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs, |
1599 | gc_level_t gc_level, long flags) | 1599 | gc_level_t gc_level, long flags) |
1600 | { | 1600 | { |
@@ -1611,6 +1611,18 @@ int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs, | |||
1611 | if (level != 0) | 1611 | if (level != 0) |
1612 | alloc_indirect_block(inode, page, 0); | 1612 | alloc_indirect_block(inode, page, 0); |
1613 | err = logfs_write_buf(inode, page, flags); | 1613 | err = logfs_write_buf(inode, page, flags); |
1614 | if (!err && shrink_level(gc_level) == 0) { | ||
1615 | /* Rewrite cannot mark the inode dirty but has to | ||
1616 | * write it immediatly. | ||
1617 | * Q: Can't we just create an alias for the inode | ||
1618 | * instead? And if not, why not? | ||
1619 | */ | ||
1620 | if (inode->i_ino == LOGFS_INO_MASTER) | ||
1621 | logfs_write_anchor(inode->i_sb); | ||
1622 | else { | ||
1623 | err = __logfs_write_inode(inode, flags); | ||
1624 | } | ||
1625 | } | ||
1614 | } | 1626 | } |
1615 | logfs_put_write_page(page); | 1627 | logfs_put_write_page(page); |
1616 | return err; | 1628 | return err; |
diff --git a/fs/logfs/segment.c b/fs/logfs/segment.c index 1a14f9910d55..801a3a141625 100644 --- a/fs/logfs/segment.c +++ b/fs/logfs/segment.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * three kinds of objects: inodes, dentries and blocks, both data and indirect. | 10 | * three kinds of objects: inodes, dentries and blocks, both data and indirect. |
11 | */ | 11 | */ |
12 | #include "logfs.h" | 12 | #include "logfs.h" |
13 | #include <linux/slab.h> | ||
13 | 14 | ||
14 | static int logfs_mark_segment_bad(struct super_block *sb, u32 segno) | 15 | static int logfs_mark_segment_bad(struct super_block *sb, u32 segno) |
15 | { | 16 | { |
@@ -93,50 +94,58 @@ void __logfs_buf_write(struct logfs_area *area, u64 ofs, void *buf, size_t len, | |||
93 | } while (len); | 94 | } while (len); |
94 | } | 95 | } |
95 | 96 | ||
96 | /* | 97 | static void pad_partial_page(struct logfs_area *area) |
97 | * bdev_writeseg will write full pages. Memset the tail to prevent data leaks. | ||
98 | */ | ||
99 | static void pad_wbuf(struct logfs_area *area, int final) | ||
100 | { | 98 | { |
101 | struct super_block *sb = area->a_sb; | 99 | struct super_block *sb = area->a_sb; |
102 | struct logfs_super *super = logfs_super(sb); | ||
103 | struct page *page; | 100 | struct page *page; |
104 | u64 ofs = dev_ofs(sb, area->a_segno, area->a_used_bytes); | 101 | u64 ofs = dev_ofs(sb, area->a_segno, area->a_used_bytes); |
105 | pgoff_t index = ofs >> PAGE_SHIFT; | 102 | pgoff_t index = ofs >> PAGE_SHIFT; |
106 | long offset = ofs & (PAGE_SIZE-1); | 103 | long offset = ofs & (PAGE_SIZE-1); |
107 | u32 len = PAGE_SIZE - offset; | 104 | u32 len = PAGE_SIZE - offset; |
108 | 105 | ||
109 | if (len == PAGE_SIZE) { | 106 | if (len % PAGE_SIZE) { |
110 | /* The math in this function can surely use some love */ | 107 | page = get_mapping_page(sb, index, 0); |
111 | len = 0; | ||
112 | } | ||
113 | if (len) { | ||
114 | BUG_ON(area->a_used_bytes >= super->s_segsize); | ||
115 | |||
116 | page = get_mapping_page(area->a_sb, index, 0); | ||
117 | BUG_ON(!page); /* FIXME: reserve a pool */ | 108 | BUG_ON(!page); /* FIXME: reserve a pool */ |
118 | memset(page_address(page) + offset, 0xff, len); | 109 | memset(page_address(page) + offset, 0xff, len); |
119 | SetPagePrivate(page); | 110 | SetPagePrivate(page); |
120 | page_cache_release(page); | 111 | page_cache_release(page); |
121 | } | 112 | } |
113 | } | ||
122 | 114 | ||
123 | if (!final) | 115 | static void pad_full_pages(struct logfs_area *area) |
124 | return; | 116 | { |
117 | struct super_block *sb = area->a_sb; | ||
118 | struct logfs_super *super = logfs_super(sb); | ||
119 | u64 ofs = dev_ofs(sb, area->a_segno, area->a_used_bytes); | ||
120 | u32 len = super->s_segsize - area->a_used_bytes; | ||
121 | pgoff_t index = PAGE_CACHE_ALIGN(ofs) >> PAGE_CACHE_SHIFT; | ||
122 | pgoff_t no_indizes = len >> PAGE_CACHE_SHIFT; | ||
123 | struct page *page; | ||
125 | 124 | ||
126 | area->a_used_bytes += len; | 125 | while (no_indizes) { |
127 | for ( ; area->a_used_bytes < super->s_segsize; | 126 | page = get_mapping_page(sb, index, 0); |
128 | area->a_used_bytes += PAGE_SIZE) { | ||
129 | /* Memset another page */ | ||
130 | index++; | ||
131 | page = get_mapping_page(area->a_sb, index, 0); | ||
132 | BUG_ON(!page); /* FIXME: reserve a pool */ | 127 | BUG_ON(!page); /* FIXME: reserve a pool */ |
133 | memset(page_address(page), 0xff, PAGE_SIZE); | 128 | SetPageUptodate(page); |
129 | memset(page_address(page), 0xff, PAGE_CACHE_SIZE); | ||
134 | SetPagePrivate(page); | 130 | SetPagePrivate(page); |
135 | page_cache_release(page); | 131 | page_cache_release(page); |
132 | index++; | ||
133 | no_indizes--; | ||
136 | } | 134 | } |
137 | } | 135 | } |
138 | 136 | ||
139 | /* | 137 | /* |
138 | * bdev_writeseg will write full pages. Memset the tail to prevent data leaks. | ||
139 | * Also make sure we allocate (and memset) all pages for final writeout. | ||
140 | */ | ||
141 | static void pad_wbuf(struct logfs_area *area, int final) | ||
142 | { | ||
143 | pad_partial_page(area); | ||
144 | if (final) | ||
145 | pad_full_pages(area); | ||
146 | } | ||
147 | |||
148 | /* | ||
140 | * We have to be careful with the alias tree. Since lookup is done by bix, | 149 | * We have to be careful with the alias tree. Since lookup is done by bix, |
141 | * it needs to be normalized, so 14, 15, 16, etc. all match when dealing with | 150 | * it needs to be normalized, so 14, 15, 16, etc. all match when dealing with |
142 | * indirect blocks. So always use it through accessor functions. | 151 | * indirect blocks. So always use it through accessor functions. |
@@ -683,7 +692,7 @@ int logfs_segment_delete(struct inode *inode, struct logfs_shadow *shadow) | |||
683 | return 0; | 692 | return 0; |
684 | } | 693 | } |
685 | 694 | ||
686 | static void freeseg(struct super_block *sb, u32 segno) | 695 | void freeseg(struct super_block *sb, u32 segno) |
687 | { | 696 | { |
688 | struct logfs_super *super = logfs_super(sb); | 697 | struct logfs_super *super = logfs_super(sb); |
689 | struct address_space *mapping = super->s_mapping_inode->i_mapping; | 698 | struct address_space *mapping = super->s_mapping_inode->i_mapping; |
diff --git a/fs/logfs/super.c b/fs/logfs/super.c index c66beab78dee..b60bfac3263c 100644 --- a/fs/logfs/super.c +++ b/fs/logfs/super.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include "logfs.h" | 12 | #include "logfs.h" |
13 | #include <linux/bio.h> | 13 | #include <linux/bio.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/mtd/mtd.h> | 15 | #include <linux/mtd/mtd.h> |
15 | #include <linux/statfs.h> | 16 | #include <linux/statfs.h> |
16 | #include <linux/buffer_head.h> | 17 | #include <linux/buffer_head.h> |
@@ -277,7 +278,7 @@ static int logfs_recover_sb(struct super_block *sb) | |||
277 | } | 278 | } |
278 | if (valid0 && valid1 && ds_cmp(ds0, ds1)) { | 279 | if (valid0 && valid1 && ds_cmp(ds0, ds1)) { |
279 | printk(KERN_INFO"Superblocks don't match - fixing.\n"); | 280 | printk(KERN_INFO"Superblocks don't match - fixing.\n"); |
280 | return write_one_sb(sb, super->s_devops->find_last_sb); | 281 | return logfs_write_sb(sb); |
281 | } | 282 | } |
282 | /* If neither is valid now, something's wrong. Didn't we properly | 283 | /* If neither is valid now, something's wrong. Didn't we properly |
283 | * check them before?!? */ | 284 | * check them before?!? */ |
@@ -289,6 +290,10 @@ static int logfs_make_writeable(struct super_block *sb) | |||
289 | { | 290 | { |
290 | int err; | 291 | int err; |
291 | 292 | ||
293 | err = logfs_open_segfile(sb); | ||
294 | if (err) | ||
295 | return err; | ||
296 | |||
292 | /* Repair any broken superblock copies */ | 297 | /* Repair any broken superblock copies */ |
293 | err = logfs_recover_sb(sb); | 298 | err = logfs_recover_sb(sb); |
294 | if (err) | 299 | if (err) |
@@ -299,10 +304,6 @@ static int logfs_make_writeable(struct super_block *sb) | |||
299 | if (err) | 304 | if (err) |
300 | return err; | 305 | return err; |
301 | 306 | ||
302 | err = logfs_open_segfile(sb); | ||
303 | if (err) | ||
304 | return err; | ||
305 | |||
306 | /* Do one GC pass before any data gets dirtied */ | 307 | /* Do one GC pass before any data gets dirtied */ |
307 | logfs_gc_pass(sb); | 308 | logfs_gc_pass(sb); |
308 | 309 | ||
@@ -328,7 +329,7 @@ static int logfs_get_sb_final(struct super_block *sb, struct vfsmount *mnt) | |||
328 | 329 | ||
329 | sb->s_root = d_alloc_root(rootdir); | 330 | sb->s_root = d_alloc_root(rootdir); |
330 | if (!sb->s_root) | 331 | if (!sb->s_root) |
331 | goto fail; | 332 | goto fail2; |
332 | 333 | ||
333 | super->s_erase_page = alloc_pages(GFP_KERNEL, 0); | 334 | super->s_erase_page = alloc_pages(GFP_KERNEL, 0); |
334 | if (!super->s_erase_page) | 335 | if (!super->s_erase_page) |
@@ -572,8 +573,7 @@ int logfs_get_sb_device(struct file_system_type *type, int flags, | |||
572 | return 0; | 573 | return 0; |
573 | 574 | ||
574 | err1: | 575 | err1: |
575 | up_write(&sb->s_umount); | 576 | deactivate_locked_super(sb); |
576 | deactivate_super(sb); | ||
577 | return err; | 577 | return err; |
578 | err0: | 578 | err0: |
579 | kfree(super); | 579 | kfree(super); |
diff --git a/fs/minix/itree_v1.c b/fs/minix/itree_v1.c index 82d6554b02fe..282e15ad8cd8 100644 --- a/fs/minix/itree_v1.c +++ b/fs/minix/itree_v1.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/buffer_head.h> | 1 | #include <linux/buffer_head.h> |
2 | #include <linux/slab.h> | ||
2 | #include "minix.h" | 3 | #include "minix.h" |
3 | 4 | ||
4 | enum {DEPTH = 3, DIRECT = 7}; /* Only double indirect */ | 5 | enum {DEPTH = 3, DIRECT = 7}; /* Only double indirect */ |
diff --git a/fs/mpage.c b/fs/mpage.c index 598d54e200eb..fd56ca2ea556 100644 --- a/fs/mpage.c +++ b/fs/mpage.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/kdev_t.h> | 18 | #include <linux/kdev_t.h> |
19 | #include <linux/gfp.h> | ||
19 | #include <linux/bio.h> | 20 | #include <linux/bio.h> |
20 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
21 | #include <linux/buffer_head.h> | 22 | #include <linux/buffer_head.h> |
diff --git a/fs/namei.c b/fs/namei.c index 1c0fca6e899e..a7dce91a7e42 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1610,8 +1610,7 @@ exit: | |||
1610 | 1610 | ||
1611 | static struct file *do_last(struct nameidata *nd, struct path *path, | 1611 | static struct file *do_last(struct nameidata *nd, struct path *path, |
1612 | int open_flag, int acc_mode, | 1612 | int open_flag, int acc_mode, |
1613 | int mode, const char *pathname, | 1613 | int mode, const char *pathname) |
1614 | int *want_dir) | ||
1615 | { | 1614 | { |
1616 | struct dentry *dir = nd->path.dentry; | 1615 | struct dentry *dir = nd->path.dentry; |
1617 | struct file *filp; | 1616 | struct file *filp; |
@@ -1642,7 +1641,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path, | |||
1642 | if (nd->last.name[nd->last.len]) { | 1641 | if (nd->last.name[nd->last.len]) { |
1643 | if (open_flag & O_CREAT) | 1642 | if (open_flag & O_CREAT) |
1644 | goto exit; | 1643 | goto exit; |
1645 | *want_dir = 1; | 1644 | nd->flags |= LOOKUP_DIRECTORY; |
1646 | } | 1645 | } |
1647 | 1646 | ||
1648 | /* just plain open? */ | 1647 | /* just plain open? */ |
@@ -1656,8 +1655,10 @@ static struct file *do_last(struct nameidata *nd, struct path *path, | |||
1656 | if (path->dentry->d_inode->i_op->follow_link) | 1655 | if (path->dentry->d_inode->i_op->follow_link) |
1657 | return NULL; | 1656 | return NULL; |
1658 | error = -ENOTDIR; | 1657 | error = -ENOTDIR; |
1659 | if (*want_dir && !path->dentry->d_inode->i_op->lookup) | 1658 | if (nd->flags & LOOKUP_DIRECTORY) { |
1660 | goto exit_dput; | 1659 | if (!path->dentry->d_inode->i_op->lookup) |
1660 | goto exit_dput; | ||
1661 | } | ||
1661 | path_to_nameidata(path, nd); | 1662 | path_to_nameidata(path, nd); |
1662 | audit_inode(pathname, nd->path.dentry); | 1663 | audit_inode(pathname, nd->path.dentry); |
1663 | goto ok; | 1664 | goto ok; |
@@ -1766,7 +1767,6 @@ struct file *do_filp_open(int dfd, const char *pathname, | |||
1766 | int count = 0; | 1767 | int count = 0; |
1767 | int flag = open_to_namei_flags(open_flag); | 1768 | int flag = open_to_namei_flags(open_flag); |
1768 | int force_reval = 0; | 1769 | int force_reval = 0; |
1769 | int want_dir = open_flag & O_DIRECTORY; | ||
1770 | 1770 | ||
1771 | if (!(open_flag & O_CREAT)) | 1771 | if (!(open_flag & O_CREAT)) |
1772 | mode = 0; | 1772 | mode = 0; |
@@ -1828,7 +1828,9 @@ reval: | |||
1828 | if (open_flag & O_EXCL) | 1828 | if (open_flag & O_EXCL) |
1829 | nd.flags |= LOOKUP_EXCL; | 1829 | nd.flags |= LOOKUP_EXCL; |
1830 | } | 1830 | } |
1831 | filp = do_last(&nd, &path, open_flag, acc_mode, mode, pathname, &want_dir); | 1831 | if (open_flag & O_DIRECTORY) |
1832 | nd.flags |= LOOKUP_DIRECTORY; | ||
1833 | filp = do_last(&nd, &path, open_flag, acc_mode, mode, pathname); | ||
1832 | while (unlikely(!filp)) { /* trailing symlink */ | 1834 | while (unlikely(!filp)) { /* trailing symlink */ |
1833 | struct path holder; | 1835 | struct path holder; |
1834 | struct inode *inode = path.dentry->d_inode; | 1836 | struct inode *inode = path.dentry->d_inode; |
@@ -1866,7 +1868,7 @@ reval: | |||
1866 | } | 1868 | } |
1867 | holder = path; | 1869 | holder = path; |
1868 | nd.flags &= ~LOOKUP_PARENT; | 1870 | nd.flags &= ~LOOKUP_PARENT; |
1869 | filp = do_last(&nd, &path, open_flag, acc_mode, mode, pathname, &want_dir); | 1871 | filp = do_last(&nd, &path, open_flag, acc_mode, mode, pathname); |
1870 | if (inode->i_op->put_link) | 1872 | if (inode->i_op->put_link) |
1871 | inode->i_op->put_link(holder.dentry, &nd, cookie); | 1873 | inode->i_op->put_link(holder.dentry, &nd, cookie); |
1872 | path_put(&holder); | 1874 | path_put(&holder); |
diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index b8b5b30d53f0..7edfcd4d5e52 100644 --- a/fs/ncpfs/dir.c +++ b/fs/ncpfs/dir.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/stat.h> | 16 | #include <linux/stat.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
20 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
21 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
diff --git a/fs/ncpfs/file.c b/fs/ncpfs/file.c index 6a7d901f1936..1daabb90e0a5 100644 --- a/fs/ncpfs/file.c +++ b/fs/ncpfs/file.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/fcntl.h> | 15 | #include <linux/fcntl.h> |
16 | #include <linux/stat.h> | 16 | #include <linux/stat.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
20 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
21 | #include <linux/smp_lock.h> | 20 | #include <linux/smp_lock.h> |
diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c index ec8f45f12e05..60a5e2864ea8 100644 --- a/fs/ncpfs/ioctl.c +++ b/fs/ncpfs/ioctl.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/time.h> | 15 | #include <linux/time.h> |
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <linux/mount.h> | 17 | #include <linux/mount.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/highuid.h> | 19 | #include <linux/highuid.h> |
19 | #include <linux/smp_lock.h> | 20 | #include <linux/smp_lock.h> |
20 | #include <linux/vmalloc.h> | 21 | #include <linux/vmalloc.h> |
diff --git a/fs/ncpfs/mmap.c b/fs/ncpfs/mmap.c index 15458decdb8a..56f5b3a0e1ee 100644 --- a/fs/ncpfs/mmap.c +++ b/fs/ncpfs/mmap.c | |||
@@ -9,12 +9,12 @@ | |||
9 | #include <linux/stat.h> | 9 | #include <linux/stat.h> |
10 | #include <linux/time.h> | 10 | #include <linux/time.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/gfp.h> | ||
12 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
13 | #include <linux/shm.h> | 14 | #include <linux/shm.h> |
14 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
15 | #include <linux/mman.h> | 16 | #include <linux/mman.h> |
16 | #include <linux/string.h> | 17 | #include <linux/string.h> |
17 | #include <linux/slab.h> | ||
18 | #include <linux/fcntl.h> | 18 | #include <linux/fcntl.h> |
19 | #include <linux/ncp_fs.h> | 19 | #include <linux/ncp_fs.h> |
20 | 20 | ||
diff --git a/fs/ncpfs/sock.c b/fs/ncpfs/sock.c index e37df8d5fe70..c7ff6c700a6e 100644 --- a/fs/ncpfs/sock.c +++ b/fs/ncpfs/sock.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/netdevice.h> | 22 | #include <linux/netdevice.h> |
23 | #include <linux/signal.h> | 23 | #include <linux/signal.h> |
24 | #include <linux/slab.h> | ||
24 | #include <net/scm.h> | 25 | #include <net/scm.h> |
25 | #include <net/sock.h> | 26 | #include <net/sock.h> |
26 | #include <linux/ipx.h> | 27 | #include <linux/ipx.h> |
diff --git a/fs/ncpfs/symlink.c b/fs/ncpfs/symlink.c index e3d26c1bd105..c634fd17b337 100644 --- a/fs/ncpfs/symlink.c +++ b/fs/ncpfs/symlink.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
28 | #include <linux/ncp_fs.h> | 28 | #include <linux/ncp_fs.h> |
29 | #include <linux/time.h> | 29 | #include <linux/time.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
31 | #include <linux/stat.h> | 32 | #include <linux/stat.h> |
32 | #include "ncplib_kernel.h" | 33 | #include "ncplib_kernel.h" |
diff --git a/fs/nfs/cache_lib.c b/fs/nfs/cache_lib.c index b4ffd0146ea6..84690319e625 100644 --- a/fs/nfs/cache_lib.c +++ b/fs/nfs/cache_lib.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/moduleparam.h> | 10 | #include <linux/moduleparam.h> |
11 | #include <linux/mount.h> | 11 | #include <linux/mount.h> |
12 | #include <linux/namei.h> | 12 | #include <linux/namei.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/sunrpc/cache.h> | 14 | #include <linux/sunrpc/cache.h> |
14 | #include <linux/sunrpc/rpc_pipe_fs.h> | 15 | #include <linux/sunrpc/rpc_pipe_fs.h> |
15 | 16 | ||
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 84761b5bb8e2..a08770a7e857 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | #include <linux/nfs4.h> | 8 | #include <linux/nfs4.h> |
9 | #include <linux/nfs_fs.h> | 9 | #include <linux/nfs_fs.h> |
10 | #include <linux/slab.h> | ||
10 | #include "nfs4_fs.h" | 11 | #include "nfs4_fs.h" |
11 | #include "callback.h" | 12 | #include "callback.h" |
12 | #include "delegation.h" | 13 | #include "delegation.h" |
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index a2b8b4df125d..05af212f0edf 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/sunrpc/svc.h> | 9 | #include <linux/sunrpc/svc.h> |
10 | #include <linux/nfs4.h> | 10 | #include <linux/nfs4.h> |
11 | #include <linux/nfs_fs.h> | 11 | #include <linux/nfs_fs.h> |
12 | #include <linux/slab.h> | ||
12 | #include "nfs4_fs.h" | 13 | #include "nfs4_fs.h" |
13 | #include "callback.h" | 14 | #include "callback.h" |
14 | 15 | ||
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 2274f1737336..2a3d352c0bff 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/vfs.h> | 35 | #include <linux/vfs.h> |
36 | #include <linux/inet.h> | 36 | #include <linux/inet.h> |
37 | #include <linux/in6.h> | 37 | #include <linux/in6.h> |
38 | #include <linux/slab.h> | ||
38 | #include <net/ipv6.h> | 39 | #include <net/ipv6.h> |
39 | #include <linux/nfs_xdr.h> | 40 | #include <linux/nfs_xdr.h> |
40 | #include <linux/sunrpc/bc_xprt.h> | 41 | #include <linux/sunrpc/bc_xprt.h> |
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 2563bebc4c67..15671245c6ee 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/kthread.h> | 10 | #include <linux/kthread.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/smp_lock.h> | 14 | #include <linux/smp_lock.h> |
14 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
15 | 16 | ||
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 0d289823e856..ad4cd31d6050 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/file.h> | 44 | #include <linux/file.h> |
45 | #include <linux/pagemap.h> | 45 | #include <linux/pagemap.h> |
46 | #include <linux/kref.h> | 46 | #include <linux/kref.h> |
47 | #include <linux/slab.h> | ||
47 | 48 | ||
48 | #include <linux/nfs_fs.h> | 49 | #include <linux/nfs_fs.h> |
49 | #include <linux/nfs_page.h> | 50 | #include <linux/nfs_page.h> |
diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c index 3f0cd4dfddaf..76fd235d0024 100644 --- a/fs/nfs/dns_resolve.c +++ b/fs/nfs/dns_resolve.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/hash.h> | 9 | #include <linux/hash.h> |
10 | #include <linux/string.h> | 10 | #include <linux/string.h> |
11 | #include <linux/kmod.h> | 11 | #include <linux/kmod.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/socket.h> | 14 | #include <linux/socket.h> |
14 | #include <linux/seq_file.h> | 15 | #include <linux/seq_file.h> |
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index ae8d02294e46..8d965bddb87e 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -24,9 +24,9 @@ | |||
24 | #include <linux/nfs_fs.h> | 24 | #include <linux/nfs_fs.h> |
25 | #include <linux/nfs_mount.h> | 25 | #include <linux/nfs_mount.h> |
26 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/pagemap.h> | 27 | #include <linux/pagemap.h> |
29 | #include <linux/aio.h> | 28 | #include <linux/aio.h> |
29 | #include <linux/gfp.h> | ||
30 | 30 | ||
31 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
32 | #include <asm/system.h> | 32 | #include <asm/system.h> |
@@ -491,7 +491,8 @@ static int nfs_release_page(struct page *page, gfp_t gfp) | |||
491 | { | 491 | { |
492 | dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page); | 492 | dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page); |
493 | 493 | ||
494 | if (gfp & __GFP_WAIT) | 494 | /* Only do I/O if gfp is a superset of GFP_KERNEL */ |
495 | if ((gfp & GFP_KERNEL) == GFP_KERNEL) | ||
495 | nfs_wb_page(page->mapping->host, page); | 496 | nfs_wb_page(page->mapping->host, page); |
496 | /* If PagePrivate() is set, then the page is not freeable */ | 497 | /* If PagePrivate() is set, then the page is not freeable */ |
497 | if (PagePrivate(page)) | 498 | if (PagePrivate(page)) |
diff --git a/fs/nfs/fscache.c b/fs/nfs/fscache.c index 237874f1af23..a6b16ed93229 100644 --- a/fs/nfs/fscache.c +++ b/fs/nfs/fscache.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/nfs_fs_sb.h> | 17 | #include <linux/nfs_fs_sb.h> |
18 | #include <linux/in6.h> | 18 | #include <linux/in6.h> |
19 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include "internal.h" | 22 | #include "internal.h" |
22 | #include "iostat.h" | 23 | #include "iostat.h" |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index e358df75a6ad..737128f777f3 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/vfs.h> | 36 | #include <linux/vfs.h> |
37 | #include <linux/inet.h> | 37 | #include <linux/inet.h> |
38 | #include <linux/nfs_xdr.h> | 38 | #include <linux/nfs_xdr.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | #include <asm/system.h> | 41 | #include <asm/system.h> |
41 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c index 40c766782891..7888cf36022d 100644 --- a/fs/nfs/namespace.c +++ b/fs/nfs/namespace.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/dcache.h> | 10 | #include <linux/dcache.h> |
11 | #include <linux/gfp.h> | ||
11 | #include <linux/mount.h> | 12 | #include <linux/mount.h> |
12 | #include <linux/namei.h> | 13 | #include <linux/namei.h> |
13 | #include <linux/nfs_fs.h> | 14 | #include <linux/nfs_fs.h> |
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c index 7bc2da8efd4a..81cf14257916 100644 --- a/fs/nfs/nfs2xdr.c +++ b/fs/nfs/nfs2xdr.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/param.h> | 12 | #include <linux/param.h> |
13 | #include <linux/time.h> | 13 | #include <linux/time.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
17 | #include <linux/string.h> | 16 | #include <linux/string.h> |
18 | #include <linux/in.h> | 17 | #include <linux/in.h> |
diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c index bac60515a4b3..d150ae0c5ecd 100644 --- a/fs/nfs/nfs3acl.c +++ b/fs/nfs/nfs3acl.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/fs.h> | 1 | #include <linux/fs.h> |
2 | #include <linux/gfp.h> | ||
2 | #include <linux/nfs.h> | 3 | #include <linux/nfs.h> |
3 | #include <linux/nfs3.h> | 4 | #include <linux/nfs3.h> |
4 | #include <linux/nfs_fs.h> | 5 | #include <linux/nfs_fs.h> |
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 24992f0a29f2..e701002694e5 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/sunrpc/clnt.h> | 12 | #include <linux/sunrpc/clnt.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/nfs.h> | 14 | #include <linux/nfs.h> |
14 | #include <linux/nfs3.h> | 15 | #include <linux/nfs3.h> |
15 | #include <linux/nfs_fs.h> | 16 | #include <linux/nfs_fs.h> |
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c index 5fe5492fbd29..56a86f6ac8b5 100644 --- a/fs/nfs/nfs3xdr.c +++ b/fs/nfs/nfs3xdr.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/param.h> | 9 | #include <linux/param.h> |
10 | #include <linux/time.h> | 10 | #include <linux/time.h> |
11 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
14 | #include <linux/string.h> | 13 | #include <linux/string.h> |
15 | #include <linux/in.h> | 14 | #include <linux/in.h> |
diff --git a/fs/nfs/nfs4namespace.c b/fs/nfs/nfs4namespace.c index fa3408f20112..f071d12c613b 100644 --- a/fs/nfs/nfs4namespace.c +++ b/fs/nfs/nfs4namespace.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/mount.h> | 11 | #include <linux/mount.h> |
12 | #include <linux/namei.h> | 12 | #include <linux/namei.h> |
13 | #include <linux/nfs_fs.h> | 13 | #include <linux/nfs_fs.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/string.h> | 15 | #include <linux/string.h> |
15 | #include <linux/sunrpc/clnt.h> | 16 | #include <linux/sunrpc/clnt.h> |
16 | #include <linux/vfs.h> | 17 | #include <linux/vfs.h> |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index f9254fb0c9d0..fe0cd9eb1d4d 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
40 | #include <linux/errno.h> | 40 | #include <linux/errno.h> |
41 | #include <linux/string.h> | 41 | #include <linux/string.h> |
42 | #include <linux/slab.h> | ||
42 | #include <linux/sunrpc/clnt.h> | 43 | #include <linux/sunrpc/clnt.h> |
43 | #include <linux/nfs.h> | 44 | #include <linux/nfs.h> |
44 | #include <linux/nfs4.h> | 45 | #include <linux/nfs4.h> |
@@ -2067,8 +2068,7 @@ nfs4_open_revalidate(struct inode *dir, struct dentry *dentry, int openflags, st | |||
2067 | case -EDQUOT: | 2068 | case -EDQUOT: |
2068 | case -ENOSPC: | 2069 | case -ENOSPC: |
2069 | case -EROFS: | 2070 | case -EROFS: |
2070 | lookup_instantiate_filp(nd, (struct dentry *)state, NULL); | 2071 | return PTR_ERR(state); |
2071 | return 1; | ||
2072 | default: | 2072 | default: |
2073 | goto out_drop; | 2073 | goto out_drop; |
2074 | } | 2074 | } |
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 4d338be492cb..38f3b582e7c2 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <linux/param.h> | 38 | #include <linux/param.h> |
39 | #include <linux/time.h> | 39 | #include <linux/time.h> |
40 | #include <linux/mm.h> | 40 | #include <linux/mm.h> |
41 | #include <linux/slab.h> | ||
42 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
43 | #include <linux/string.h> | 42 | #include <linux/string.h> |
44 | #include <linux/in.h> | 43 | #include <linux/in.h> |
@@ -5552,6 +5551,8 @@ static int nfs4_xdr_dec_delegreturn(struct rpc_rqst *rqstp, __be32 *p, struct nf | |||
5552 | if (status != 0) | 5551 | if (status != 0) |
5553 | goto out; | 5552 | goto out; |
5554 | status = decode_delegreturn(&xdr); | 5553 | status = decode_delegreturn(&xdr); |
5554 | if (status != 0) | ||
5555 | goto out; | ||
5555 | decode_getfattr(&xdr, res->fattr, res->server, | 5556 | decode_getfattr(&xdr, res->fattr, res->server, |
5556 | !RPC_IS_ASYNC(rqstp->rq_task)); | 5557 | !RPC_IS_ASYNC(rqstp->rq_task)); |
5557 | out: | 5558 | out: |
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index c752d944fe9e..0288be80444f 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/param.h> | 31 | #include <linux/param.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/time.h> | 32 | #include <linux/time.h> |
34 | #include <linux/mm.h> | 33 | #include <linux/mm.h> |
35 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 6baf9a393466..e01637240eeb 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/vfs.h> | 48 | #include <linux/vfs.h> |
49 | #include <linux/inet.h> | 49 | #include <linux/inet.h> |
50 | #include <linux/in6.h> | 50 | #include <linux/in6.h> |
51 | #include <linux/slab.h> | ||
51 | #include <net/ipv6.h> | 52 | #include <net/ipv6.h> |
52 | #include <linux/netdevice.h> | 53 | #include <linux/netdevice.h> |
53 | #include <linux/nfs_xdr.h> | 54 | #include <linux/nfs_xdr.h> |
diff --git a/fs/nfs/symlink.c b/fs/nfs/symlink.c index 2ea9e5c27e55..05c9e02f4153 100644 --- a/fs/nfs/symlink.c +++ b/fs/nfs/symlink.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/pagemap.h> | 19 | #include <linux/pagemap.h> |
20 | #include <linux/stat.h> | 20 | #include <linux/stat.h> |
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/string.h> | 22 | #include <linux/string.h> |
24 | #include <linux/namei.h> | 23 | #include <linux/namei.h> |
25 | 24 | ||
diff --git a/fs/nfs_common/nfsacl.c b/fs/nfs_common/nfsacl.c index 04133aacb1e5..fc1c52571c03 100644 --- a/fs/nfs_common/nfsacl.c +++ b/fs/nfs_common/nfsacl.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/gfp.h> | ||
25 | #include <linux/sunrpc/xdr.h> | 26 | #include <linux/sunrpc/xdr.h> |
26 | #include <linux/nfsacl.h> | 27 | #include <linux/nfsacl.h> |
27 | #include <linux/nfs3.h> | 28 | #include <linux/nfs3.h> |
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index a0c4016413f1..872a5ef550c7 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * Copyright (C) 1995, 1996 Olaf Kirch, <okir@monad.swb.de> | 12 | * Copyright (C) 1995, 1996 Olaf Kirch, <okir@monad.swb.de> |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/slab.h> | ||
15 | #include <linux/namei.h> | 16 | #include <linux/namei.h> |
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
17 | #include <linux/exportfs.h> | 18 | #include <linux/exportfs.h> |
diff --git a/fs/nfsd/nfs2acl.c b/fs/nfsd/nfs2acl.c index f20589d2ae27..6aa5590c3679 100644 --- a/fs/nfsd/nfs2acl.c +++ b/fs/nfsd/nfs2acl.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "nfsd.h" | 7 | #include "nfsd.h" |
8 | /* FIXME: nfsacl.h is a broken header */ | 8 | /* FIXME: nfsacl.h is a broken header */ |
9 | #include <linux/nfsacl.h> | 9 | #include <linux/nfsacl.h> |
10 | #include <linux/gfp.h> | ||
10 | #include "cache.h" | 11 | #include "cache.h" |
11 | #include "xdr3.h" | 12 | #include "xdr3.h" |
12 | #include "vfs.h" | 13 | #include "vfs.h" |
diff --git a/fs/nfsd/nfs3acl.c b/fs/nfsd/nfs3acl.c index e0c4846bad92..a596e9d987e4 100644 --- a/fs/nfsd/nfs3acl.c +++ b/fs/nfsd/nfs3acl.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "nfsd.h" | 7 | #include "nfsd.h" |
8 | /* FIXME: nfsacl.h is a broken header */ | 8 | /* FIXME: nfsacl.h is a broken header */ |
9 | #include <linux/nfsacl.h> | 9 | #include <linux/nfsacl.h> |
10 | #include <linux/gfp.h> | ||
10 | #include "cache.h" | 11 | #include "cache.h" |
11 | #include "xdr3.h" | 12 | #include "xdr3.h" |
12 | #include "vfs.h" | 13 | #include "vfs.h" |
diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c index 88150685df34..e48052615159 100644 --- a/fs/nfsd/nfs4acl.c +++ b/fs/nfsd/nfs4acl.c | |||
@@ -34,6 +34,7 @@ | |||
34 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 34 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/slab.h> | ||
37 | #include <linux/nfs_fs.h> | 38 | #include <linux/nfs_fs.h> |
38 | #include <linux/nfs4_acl.h> | 39 | #include <linux/nfs4_acl.h> |
39 | 40 | ||
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 4bc22c763de7..7e32bd394e86 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/sunrpc/clnt.h> | 34 | #include <linux/sunrpc/clnt.h> |
35 | #include <linux/slab.h> | ||
35 | #include "nfsd.h" | 36 | #include "nfsd.h" |
36 | #include "state.h" | 37 | #include "state.h" |
37 | 38 | ||
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c index 6e2983b27f3c..c78dbf493424 100644 --- a/fs/nfsd/nfs4idmap.c +++ b/fs/nfsd/nfs4idmap.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/nfsd_idmap.h> | 36 | #include <linux/nfsd_idmap.h> |
37 | #include <linux/seq_file.h> | 37 | #include <linux/seq_file.h> |
38 | #include <linux/sched.h> | 38 | #include <linux/sched.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | /* | 41 | /* |
41 | * Cache entry | 42 | * Cache entry |
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 37514c469846..2ab9e8501bfe 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -33,6 +33,7 @@ | |||
33 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 33 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
34 | */ | 34 | */ |
35 | #include <linux/file.h> | 35 | #include <linux/file.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include "cache.h" | 38 | #include "cache.h" |
38 | #include "xdr4.h" | 39 | #include "xdr4.h" |
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 98fb98e330b4..7a9ae3254a4b 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/file.h> | 34 | #include <linux/file.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/namei.h> | 36 | #include <linux/namei.h> |
36 | #include <linux/crypto.h> | 37 | #include <linux/crypto.h> |
37 | #include <linux/sched.h> | 38 | #include <linux/sched.h> |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index c97fddbd17db..6a8fedaa4f55 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #include <linux/file.h> | 35 | #include <linux/file.h> |
36 | #include <linux/smp_lock.h> | 36 | #include <linux/smp_lock.h> |
37 | #include <linux/slab.h> | ||
37 | #include <linux/namei.h> | 38 | #include <linux/namei.h> |
38 | #include <linux/swap.h> | 39 | #include <linux/swap.h> |
39 | #include <linux/sunrpc/svcauth_gss.h> | 40 | #include <linux/sunrpc/svcauth_gss.h> |
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index c47b4d7bafa7..e1703175ee28 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -40,6 +40,7 @@ | |||
40 | * at the end of nfs4svc_decode_compoundargs. | 40 | * at the end of nfs4svc_decode_compoundargs. |
41 | */ | 41 | */ |
42 | 42 | ||
43 | #include <linux/slab.h> | ||
43 | #include <linux/namei.h> | 44 | #include <linux/namei.h> |
44 | #include <linux/statfs.h> | 45 | #include <linux/statfs.h> |
45 | #include <linux/utsname.h> | 46 | #include <linux/utsname.h> |
diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c index da08560c4818..4666a209678a 100644 --- a/fs/nfsd/nfscache.c +++ b/fs/nfsd/nfscache.c | |||
@@ -8,6 +8,8 @@ | |||
8 | * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> | 8 | * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/slab.h> | ||
12 | |||
11 | #include "nfsd.h" | 13 | #include "nfsd.h" |
12 | #include "cache.h" | 14 | #include "cache.h" |
13 | 15 | ||
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 0f0e77f2012f..e3591073098f 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> | 4 | * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/slab.h> | ||
7 | #include <linux/namei.h> | 8 | #include <linux/namei.h> |
8 | #include <linux/ctype.h> | 9 | #include <linux/ctype.h> |
9 | 10 | ||
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index a11b0e8678ee..6dd5f1970e01 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/xattr.h> | 25 | #include <linux/xattr.h> |
26 | #include <linux/jhash.h> | 26 | #include <linux/jhash.h> |
27 | #include <linux/ima.h> | 27 | #include <linux/ima.h> |
28 | #include <linux/slab.h> | ||
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
29 | #include <linux/exportfs.h> | 30 | #include <linux/exportfs.h> |
30 | #include <linux/writeback.h> | 31 | #include <linux/writeback.h> |
diff --git a/fs/nilfs2/alloc.c b/fs/nilfs2/alloc.c index 3f959f1879d8..8d6356a804f3 100644 --- a/fs/nilfs2/alloc.c +++ b/fs/nilfs2/alloc.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/buffer_head.h> | 26 | #include <linux/buffer_head.h> |
27 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
28 | #include <linux/bitops.h> | 28 | #include <linux/bitops.h> |
29 | #include <linux/slab.h> | ||
29 | #include "mdt.h" | 30 | #include "mdt.h" |
30 | #include "alloc.h" | 31 | #include "alloc.h" |
31 | 32 | ||
diff --git a/fs/nilfs2/btnode.c b/fs/nilfs2/btnode.c index 471e269536ae..447ce47a3306 100644 --- a/fs/nilfs2/btnode.c +++ b/fs/nilfs2/btnode.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/buffer_head.h> | 27 | #include <linux/buffer_head.h> |
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/backing-dev.h> | 29 | #include <linux/backing-dev.h> |
30 | #include <linux/gfp.h> | ||
30 | #include "nilfs.h" | 31 | #include "nilfs.h" |
31 | #include "mdt.h" | 32 | #include "mdt.h" |
32 | #include "dat.h" | 33 | #include "dat.h" |
diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c index 8880a9e281e7..145f03cd7d3e 100644 --- a/fs/nilfs2/gcinode.c +++ b/fs/nilfs2/gcinode.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/buffer_head.h> | 45 | #include <linux/buffer_head.h> |
46 | #include <linux/mpage.h> | 46 | #include <linux/mpage.h> |
47 | #include <linux/hash.h> | 47 | #include <linux/hash.h> |
48 | #include <linux/slab.h> | ||
48 | #include <linux/swap.h> | 49 | #include <linux/swap.h> |
49 | #include "nilfs.h" | 50 | #include "nilfs.h" |
50 | #include "page.h" | 51 | #include "page.h" |
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 7868cc122ac7..0957b58f909d 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/buffer_head.h> | 24 | #include <linux/buffer_head.h> |
25 | #include <linux/gfp.h> | ||
25 | #include <linux/mpage.h> | 26 | #include <linux/mpage.h> |
26 | #include <linux/writeback.h> | 27 | #include <linux/writeback.h> |
27 | #include <linux/uio.h> | 28 | #include <linux/uio.h> |
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index 313d0a21da48..c2ff1b306012 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/nilfs2/ioctl.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/fs.h> | 23 | #include <linux/fs.h> |
24 | #include <linux/wait.h> | 24 | #include <linux/wait.h> |
25 | #include <linux/smp_lock.h> /* lock_kernel(), unlock_kernel() */ | 25 | #include <linux/smp_lock.h> /* lock_kernel(), unlock_kernel() */ |
26 | #include <linux/slab.h> | ||
26 | #include <linux/capability.h> /* capable() */ | 27 | #include <linux/capability.h> /* capable() */ |
27 | #include <linux/uaccess.h> /* copy_from_user(), copy_to_user() */ | 28 | #include <linux/uaccess.h> /* copy_from_user(), copy_to_user() */ |
28 | #include <linux/vmalloc.h> | 29 | #include <linux/vmalloc.h> |
diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c index 06713ffcc7f2..024be8c35bb6 100644 --- a/fs/nilfs2/mdt.c +++ b/fs/nilfs2/mdt.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/writeback.h> | 26 | #include <linux/writeback.h> |
27 | #include <linux/backing-dev.h> | 27 | #include <linux/backing-dev.h> |
28 | #include <linux/swap.h> | 28 | #include <linux/swap.h> |
29 | #include <linux/slab.h> | ||
29 | #include "nilfs.h" | 30 | #include "nilfs.h" |
30 | #include "segment.h" | 31 | #include "segment.h" |
31 | #include "page.h" | 32 | #include "page.h" |
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index fc246dba112a..8de3e1e48130 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/list.h> | 29 | #include <linux/list.h> |
30 | #include <linux/highmem.h> | 30 | #include <linux/highmem.h> |
31 | #include <linux/pagevec.h> | 31 | #include <linux/pagevec.h> |
32 | #include <linux/gfp.h> | ||
32 | #include "nilfs.h" | 33 | #include "nilfs.h" |
33 | #include "page.h" | 34 | #include "page.h" |
34 | #include "mdt.h" | 35 | #include "mdt.h" |
diff --git a/fs/nilfs2/recovery.c b/fs/nilfs2/recovery.c index 017bedc761a0..ba43146f3c30 100644 --- a/fs/nilfs2/recovery.c +++ b/fs/nilfs2/recovery.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/buffer_head.h> | 23 | #include <linux/buffer_head.h> |
24 | #include <linux/blkdev.h> | 24 | #include <linux/blkdev.h> |
25 | #include <linux/swap.h> | 25 | #include <linux/swap.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/crc32.h> | 27 | #include <linux/crc32.h> |
27 | #include "nilfs.h" | 28 | #include "nilfs.h" |
28 | #include "segment.h" | 29 | #include "segment.h" |
diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c index 636eaafd6ea2..17851f77f739 100644 --- a/fs/nilfs2/segbuf.c +++ b/fs/nilfs2/segbuf.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/writeback.h> | 25 | #include <linux/writeback.h> |
26 | #include <linux/crc32.h> | 26 | #include <linux/crc32.h> |
27 | #include <linux/backing-dev.h> | 27 | #include <linux/backing-dev.h> |
28 | #include <linux/slab.h> | ||
28 | #include "page.h" | 29 | #include "page.h" |
29 | #include "segbuf.h" | 30 | #include "segbuf.h" |
30 | 31 | ||
@@ -323,14 +324,14 @@ int nilfs_write_logs(struct list_head *logs, struct the_nilfs *nilfs) | |||
323 | int nilfs_wait_on_logs(struct list_head *logs) | 324 | int nilfs_wait_on_logs(struct list_head *logs) |
324 | { | 325 | { |
325 | struct nilfs_segment_buffer *segbuf; | 326 | struct nilfs_segment_buffer *segbuf; |
326 | int err; | 327 | int err, ret = 0; |
327 | 328 | ||
328 | list_for_each_entry(segbuf, logs, sb_list) { | 329 | list_for_each_entry(segbuf, logs, sb_list) { |
329 | err = nilfs_segbuf_wait(segbuf); | 330 | err = nilfs_segbuf_wait(segbuf); |
330 | if (err) | 331 | if (err && !ret) |
331 | return err; | 332 | ret = err; |
332 | } | 333 | } |
333 | return 0; | 334 | return ret; |
334 | } | 335 | } |
335 | 336 | ||
336 | /* | 337 | /* |
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 69576a95e13f..6a7dbd8451db 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/kthread.h> | 32 | #include <linux/kthread.h> |
33 | #include <linux/crc32.h> | 33 | #include <linux/crc32.h> |
34 | #include <linux/pagevec.h> | 34 | #include <linux/pagevec.h> |
35 | #include <linux/slab.h> | ||
35 | #include "nilfs.h" | 36 | #include "nilfs.h" |
36 | #include "btnode.h" | 37 | #include "btnode.h" |
37 | #include "page.h" | 38 | #include "page.h" |
@@ -1510,6 +1511,12 @@ static int nilfs_segctor_collect(struct nilfs_sc_info *sci, | |||
1510 | if (mode != SC_LSEG_SR || sci->sc_stage.scnt < NILFS_ST_CPFILE) | 1511 | if (mode != SC_LSEG_SR || sci->sc_stage.scnt < NILFS_ST_CPFILE) |
1511 | break; | 1512 | break; |
1512 | 1513 | ||
1514 | nilfs_clear_logs(&sci->sc_segbufs); | ||
1515 | |||
1516 | err = nilfs_segctor_extend_segments(sci, nilfs, nadd); | ||
1517 | if (unlikely(err)) | ||
1518 | return err; | ||
1519 | |||
1513 | if (sci->sc_stage.flags & NILFS_CF_SUFREED) { | 1520 | if (sci->sc_stage.flags & NILFS_CF_SUFREED) { |
1514 | err = nilfs_sufile_cancel_freev(nilfs->ns_sufile, | 1521 | err = nilfs_sufile_cancel_freev(nilfs->ns_sufile, |
1515 | sci->sc_freesegs, | 1522 | sci->sc_freesegs, |
@@ -1517,12 +1524,6 @@ static int nilfs_segctor_collect(struct nilfs_sc_info *sci, | |||
1517 | NULL); | 1524 | NULL); |
1518 | WARN_ON(err); /* do not happen */ | 1525 | WARN_ON(err); /* do not happen */ |
1519 | } | 1526 | } |
1520 | nilfs_clear_logs(&sci->sc_segbufs); | ||
1521 | |||
1522 | err = nilfs_segctor_extend_segments(sci, nilfs, nadd); | ||
1523 | if (unlikely(err)) | ||
1524 | return err; | ||
1525 | |||
1526 | nadd = min_t(int, nadd << 1, SC_MAX_SEGDELTA); | 1527 | nadd = min_t(int, nadd << 1, SC_MAX_SEGDELTA); |
1527 | sci->sc_stage = prev_stage; | 1528 | sci->sc_stage = prev_stage; |
1528 | } | 1529 | } |
@@ -1897,8 +1898,7 @@ static void nilfs_segctor_abort_construction(struct nilfs_sc_info *sci, | |||
1897 | 1898 | ||
1898 | list_splice_tail_init(&sci->sc_write_logs, &logs); | 1899 | list_splice_tail_init(&sci->sc_write_logs, &logs); |
1899 | ret = nilfs_wait_on_logs(&logs); | 1900 | ret = nilfs_wait_on_logs(&logs); |
1900 | if (ret) | 1901 | nilfs_abort_logs(&logs, NULL, sci->sc_super_root, ret ? : err); |
1901 | nilfs_abort_logs(&logs, NULL, sci->sc_super_root, ret); | ||
1902 | 1902 | ||
1903 | list_splice_tail_init(&sci->sc_segbufs, &logs); | 1903 | list_splice_tail_init(&sci->sc_segbufs, &logs); |
1904 | nilfs_cancel_segusage(&logs, nilfs->ns_sufile); | 1904 | nilfs_cancel_segusage(&logs, nilfs->ns_sufile); |
diff --git a/fs/nilfs2/the_nilfs.h b/fs/nilfs2/the_nilfs.h index e9795f1724d7..1ab974533697 100644 --- a/fs/nilfs2/the_nilfs.h +++ b/fs/nilfs2/the_nilfs.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/blkdev.h> | 30 | #include <linux/blkdev.h> |
31 | #include <linux/backing-dev.h> | 31 | #include <linux/backing-dev.h> |
32 | #include <linux/slab.h> | ||
32 | #include "sb.h" | 33 | #include "sb.h" |
33 | 34 | ||
34 | /* the_nilfs struct */ | 35 | /* the_nilfs struct */ |
diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c index 037e878e03fc..fcc2f064af83 100644 --- a/fs/notify/fsnotify.c +++ b/fs/notify/fsnotify.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/dcache.h> | 19 | #include <linux/dcache.h> |
20 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
21 | #include <linux/gfp.h> | ||
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
22 | #include <linux/module.h> | 23 | #include <linux/module.h> |
23 | #include <linux/srcu.h> | 24 | #include <linux/srcu.h> |
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index 3165d85aada2..0399bcbe09c8 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c | |||
@@ -87,7 +87,6 @@ | |||
87 | #include <linux/kernel.h> | 87 | #include <linux/kernel.h> |
88 | #include <linux/module.h> | 88 | #include <linux/module.h> |
89 | #include <linux/mutex.h> | 89 | #include <linux/mutex.h> |
90 | #include <linux/slab.h> | ||
91 | #include <linux/spinlock.h> | 90 | #include <linux/spinlock.h> |
92 | #include <linux/writeback.h> /* for inode_lock */ | 91 | #include <linux/writeback.h> /* for inode_lock */ |
93 | 92 | ||
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c index cfce53cb65d7..c3c2c7ac9020 100644 --- a/fs/ntfs/aops.c +++ b/fs/ntfs/aops.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
26 | #include <linux/gfp.h> | ||
26 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
27 | #include <linux/pagemap.h> | 28 | #include <linux/pagemap.h> |
28 | #include <linux/swap.h> | 29 | #include <linux/swap.h> |
diff --git a/fs/ntfs/attrib.c b/fs/ntfs/attrib.c index 50d3b0c258e3..f5094ee224c1 100644 --- a/fs/ntfs/attrib.c +++ b/fs/ntfs/attrib.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/buffer_head.h> | 23 | #include <linux/buffer_head.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/swap.h> | 26 | #include <linux/swap.h> |
26 | #include <linux/writeback.h> | 27 | #include <linux/writeback.h> |
27 | 28 | ||
diff --git a/fs/ntfs/compress.c b/fs/ntfs/compress.c index 08f7530e9341..6551c7cbad92 100644 --- a/fs/ntfs/compress.c +++ b/fs/ntfs/compress.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/buffer_head.h> | 25 | #include <linux/buffer_head.h> |
26 | #include <linux/blkdev.h> | 26 | #include <linux/blkdev.h> |
27 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include "attrib.h" | 30 | #include "attrib.h" |
30 | #include "inode.h" | 31 | #include "inode.h" |
diff --git a/fs/ntfs/dir.c b/fs/ntfs/dir.c index 9173e82a45d1..fe44d3feee4a 100644 --- a/fs/ntfs/dir.c +++ b/fs/ntfs/dir.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/buffer_head.h> | 23 | #include <linux/buffer_head.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include "dir.h" | 26 | #include "dir.h" |
26 | #include "aops.h" | 27 | #include "aops.h" |
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index b681c71d7069..8804f093ba75 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/buffer_head.h> | 22 | #include <linux/buffer_head.h> |
23 | #include <linux/gfp.h> | ||
23 | #include <linux/pagemap.h> | 24 | #include <linux/pagemap.h> |
24 | #include <linux/pagevec.h> | 25 | #include <linux/pagevec.h> |
25 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
diff --git a/fs/ntfs/index.c b/fs/ntfs/index.c index 2194eff49743..096c135691ae 100644 --- a/fs/ntfs/index.c +++ b/fs/ntfs/index.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/slab.h> | ||
23 | |||
22 | #include "aops.h" | 24 | #include "aops.h" |
23 | #include "collate.h" | 25 | #include "collate.h" |
24 | #include "debug.h" | 26 | #include "debug.h" |
diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c index 1caa0ef0b2bb..b572b6727181 100644 --- a/fs/ntfs/mft.c +++ b/fs/ntfs/mft.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/buffer_head.h> | 23 | #include <linux/buffer_head.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/swap.h> | 25 | #include <linux/swap.h> |
25 | 26 | ||
26 | #include "attrib.h" | 27 | #include "attrib.h" |
diff --git a/fs/ntfs/namei.c b/fs/ntfs/namei.c index 2ca00153b6ec..358273e59ade 100644 --- a/fs/ntfs/namei.c +++ b/fs/ntfs/namei.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/dcache.h> | 23 | #include <linux/dcache.h> |
24 | #include <linux/exportfs.h> | 24 | #include <linux/exportfs.h> |
25 | #include <linux/security.h> | 25 | #include <linux/security.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "attrib.h" | 28 | #include "attrib.h" |
28 | #include "debug.h" | 29 | #include "debug.h" |
diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/acl.c index 0501974bedd0..e13fc9e8fcdc 100644 --- a/fs/ocfs2/acl.c +++ b/fs/ocfs2/acl.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/string.h> | 25 | #include <linux/string.h> |
25 | 26 | ||
26 | #define MLOG_MASK_PREFIX ML_INODE | 27 | #define MLOG_MASK_PREFIX ML_INODE |
@@ -30,6 +31,8 @@ | |||
30 | #include "alloc.h" | 31 | #include "alloc.h" |
31 | #include "dlmglue.h" | 32 | #include "dlmglue.h" |
32 | #include "file.h" | 33 | #include "file.h" |
34 | #include "inode.h" | ||
35 | #include "journal.h" | ||
33 | #include "ocfs2_fs.h" | 36 | #include "ocfs2_fs.h" |
34 | 37 | ||
35 | #include "xattr.h" | 38 | #include "xattr.h" |
@@ -166,6 +169,60 @@ static struct posix_acl *ocfs2_get_acl(struct inode *inode, int type) | |||
166 | } | 169 | } |
167 | 170 | ||
168 | /* | 171 | /* |
172 | * Helper function to set i_mode in memory and disk. Some call paths | ||
173 | * will not have di_bh or a journal handle to pass, in which case it | ||
174 | * will create it's own. | ||
175 | */ | ||
176 | static int ocfs2_acl_set_mode(struct inode *inode, struct buffer_head *di_bh, | ||
177 | handle_t *handle, umode_t new_mode) | ||
178 | { | ||
179 | int ret, commit_handle = 0; | ||
180 | struct ocfs2_dinode *di; | ||
181 | |||
182 | if (di_bh == NULL) { | ||
183 | ret = ocfs2_read_inode_block(inode, &di_bh); | ||
184 | if (ret) { | ||
185 | mlog_errno(ret); | ||
186 | goto out; | ||
187 | } | ||
188 | } else | ||
189 | get_bh(di_bh); | ||
190 | |||
191 | if (handle == NULL) { | ||
192 | handle = ocfs2_start_trans(OCFS2_SB(inode->i_sb), | ||
193 | OCFS2_INODE_UPDATE_CREDITS); | ||
194 | if (IS_ERR(handle)) { | ||
195 | ret = PTR_ERR(handle); | ||
196 | mlog_errno(ret); | ||
197 | goto out_brelse; | ||
198 | } | ||
199 | |||
200 | commit_handle = 1; | ||
201 | } | ||
202 | |||
203 | di = (struct ocfs2_dinode *)di_bh->b_data; | ||
204 | ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, | ||
205 | OCFS2_JOURNAL_ACCESS_WRITE); | ||
206 | if (ret) { | ||
207 | mlog_errno(ret); | ||
208 | goto out_commit; | ||
209 | } | ||
210 | |||
211 | inode->i_mode = new_mode; | ||
212 | di->i_mode = cpu_to_le16(inode->i_mode); | ||
213 | |||
214 | ocfs2_journal_dirty(handle, di_bh); | ||
215 | |||
216 | out_commit: | ||
217 | if (commit_handle) | ||
218 | ocfs2_commit_trans(OCFS2_SB(inode->i_sb), handle); | ||
219 | out_brelse: | ||
220 | brelse(di_bh); | ||
221 | out: | ||
222 | return ret; | ||
223 | } | ||
224 | |||
225 | /* | ||
169 | * Set the access or default ACL of an inode. | 226 | * Set the access or default ACL of an inode. |
170 | */ | 227 | */ |
171 | static int ocfs2_set_acl(handle_t *handle, | 228 | static int ocfs2_set_acl(handle_t *handle, |
@@ -193,9 +250,14 @@ static int ocfs2_set_acl(handle_t *handle, | |||
193 | if (ret < 0) | 250 | if (ret < 0) |
194 | return ret; | 251 | return ret; |
195 | else { | 252 | else { |
196 | inode->i_mode = mode; | ||
197 | if (ret == 0) | 253 | if (ret == 0) |
198 | acl = NULL; | 254 | acl = NULL; |
255 | |||
256 | ret = ocfs2_acl_set_mode(inode, di_bh, | ||
257 | handle, mode); | ||
258 | if (ret) | ||
259 | return ret; | ||
260 | |||
199 | } | 261 | } |
200 | } | 262 | } |
201 | break; | 263 | break; |
@@ -283,6 +345,7 @@ int ocfs2_init_acl(handle_t *handle, | |||
283 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 345 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
284 | struct posix_acl *acl = NULL; | 346 | struct posix_acl *acl = NULL; |
285 | int ret = 0; | 347 | int ret = 0; |
348 | mode_t mode; | ||
286 | 349 | ||
287 | if (!S_ISLNK(inode->i_mode)) { | 350 | if (!S_ISLNK(inode->i_mode)) { |
288 | if (osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) { | 351 | if (osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) { |
@@ -291,12 +354,17 @@ int ocfs2_init_acl(handle_t *handle, | |||
291 | if (IS_ERR(acl)) | 354 | if (IS_ERR(acl)) |
292 | return PTR_ERR(acl); | 355 | return PTR_ERR(acl); |
293 | } | 356 | } |
294 | if (!acl) | 357 | if (!acl) { |
295 | inode->i_mode &= ~current_umask(); | 358 | mode = inode->i_mode & ~current_umask(); |
359 | ret = ocfs2_acl_set_mode(inode, di_bh, handle, mode); | ||
360 | if (ret) { | ||
361 | mlog_errno(ret); | ||
362 | goto cleanup; | ||
363 | } | ||
364 | } | ||
296 | } | 365 | } |
297 | if ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) && acl) { | 366 | if ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) && acl) { |
298 | struct posix_acl *clone; | 367 | struct posix_acl *clone; |
299 | mode_t mode; | ||
300 | 368 | ||
301 | if (S_ISDIR(inode->i_mode)) { | 369 | if (S_ISDIR(inode->i_mode)) { |
302 | ret = ocfs2_set_acl(handle, inode, di_bh, | 370 | ret = ocfs2_set_acl(handle, inode, di_bh, |
@@ -313,7 +381,7 @@ int ocfs2_init_acl(handle_t *handle, | |||
313 | mode = inode->i_mode; | 381 | mode = inode->i_mode; |
314 | ret = posix_acl_create_masq(clone, &mode); | 382 | ret = posix_acl_create_masq(clone, &mode); |
315 | if (ret >= 0) { | 383 | if (ret >= 0) { |
316 | inode->i_mode = mode; | 384 | ret = ocfs2_acl_set_mode(inode, di_bh, handle, mode); |
317 | if (ret > 0) { | 385 | if (ret > 0) { |
318 | ret = ocfs2_set_acl(handle, inode, | 386 | ret = ocfs2_set_acl(handle, inode, |
319 | di_bh, ACL_TYPE_ACCESS, | 387 | di_bh, ACL_TYPE_ACCESS, |
diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c index 21c808f752d8..ecebb2276790 100644 --- a/fs/ocfs2/buffer_head_io.c +++ b/fs/ocfs2/buffer_head_io.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/highmem.h> | 28 | #include <linux/highmem.h> |
30 | 29 | ||
31 | #include <cluster/masklog.h> | 30 | #include <cluster/masklog.h> |
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 5c9890006708..41d5f1f92d56 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/crc32.h> | 34 | #include <linux/crc32.h> |
35 | #include <linux/time.h> | 35 | #include <linux/time.h> |
36 | #include <linux/debugfs.h> | 36 | #include <linux/debugfs.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include "heartbeat.h" | 39 | #include "heartbeat.h" |
39 | #include "tcp.h" | 40 | #include "tcp.h" |
diff --git a/fs/ocfs2/cluster/nodemanager.c b/fs/ocfs2/cluster/nodemanager.c index c81142e3ef84..ed0c9f367fed 100644 --- a/fs/ocfs2/cluster/nodemanager.c +++ b/fs/ocfs2/cluster/nodemanager.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * Boston, MA 021110-1307, USA. | 19 | * Boston, MA 021110-1307, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/slab.h> | ||
22 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
23 | #include <linux/module.h> | 24 | #include <linux/module.h> |
24 | #include <linux/configfs.h> | 25 | #include <linux/configfs.h> |
diff --git a/fs/ocfs2/cluster/quorum.c b/fs/ocfs2/cluster/quorum.c index 639024033fce..cf3e16696216 100644 --- a/fs/ocfs2/cluster/quorum.c +++ b/fs/ocfs2/cluster/quorum.c | |||
@@ -44,7 +44,6 @@ | |||
44 | * and if they're the last, they fire off the decision. | 44 | * and if they're the last, they fire off the decision. |
45 | */ | 45 | */ |
46 | #include <linux/kernel.h> | 46 | #include <linux/kernel.h> |
47 | #include <linux/slab.h> | ||
48 | #include <linux/workqueue.h> | 47 | #include <linux/workqueue.h> |
49 | #include <linux/reboot.h> | 48 | #include <linux/reboot.h> |
50 | 49 | ||
diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c index dccc439fa087..a795eb91f4ea 100644 --- a/fs/ocfs2/dlm/dlmast.c +++ b/fs/ocfs2/dlm/dlmast.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/slab.h> | ||
32 | #include <linux/highmem.h> | 31 | #include <linux/highmem.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
34 | #include <linux/sysctl.h> | 33 | #include <linux/sysctl.h> |
diff --git a/fs/ocfs2/dlm/dlmconvert.c b/fs/ocfs2/dlm/dlmconvert.c index f283bce776b4..90803b47cd8c 100644 --- a/fs/ocfs2/dlm/dlmconvert.c +++ b/fs/ocfs2/dlm/dlmconvert.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/slab.h> | ||
32 | #include <linux/highmem.h> | 31 | #include <linux/highmem.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
34 | #include <linux/sysctl.h> | 33 | #include <linux/sysctl.h> |
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index a659606dcb95..9289b4357d27 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -1875,7 +1875,6 @@ int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data, | |||
1875 | ok: | 1875 | ok: |
1876 | spin_unlock(&res->spinlock); | 1876 | spin_unlock(&res->spinlock); |
1877 | } | 1877 | } |
1878 | spin_unlock(&dlm->spinlock); | ||
1879 | 1878 | ||
1880 | // mlog(0, "woo! got an assert_master from node %u!\n", | 1879 | // mlog(0, "woo! got an assert_master from node %u!\n", |
1881 | // assert->node_idx); | 1880 | // assert->node_idx); |
@@ -1926,7 +1925,6 @@ ok: | |||
1926 | /* master is known, detach if not already detached. | 1925 | /* master is known, detach if not already detached. |
1927 | * ensures that only one assert_master call will happen | 1926 | * ensures that only one assert_master call will happen |
1928 | * on this mle. */ | 1927 | * on this mle. */ |
1929 | spin_lock(&dlm->spinlock); | ||
1930 | spin_lock(&dlm->master_lock); | 1928 | spin_lock(&dlm->master_lock); |
1931 | 1929 | ||
1932 | rr = atomic_read(&mle->mle_refs.refcount); | 1930 | rr = atomic_read(&mle->mle_refs.refcount); |
@@ -1959,7 +1957,6 @@ ok: | |||
1959 | __dlm_put_mle(mle); | 1957 | __dlm_put_mle(mle); |
1960 | } | 1958 | } |
1961 | spin_unlock(&dlm->master_lock); | 1959 | spin_unlock(&dlm->master_lock); |
1962 | spin_unlock(&dlm->spinlock); | ||
1963 | } else if (res) { | 1960 | } else if (res) { |
1964 | if (res->owner != assert->node_idx) { | 1961 | if (res->owner != assert->node_idx) { |
1965 | mlog(0, "assert_master from %u, but current " | 1962 | mlog(0, "assert_master from %u, but current " |
@@ -1967,6 +1964,7 @@ ok: | |||
1967 | res->owner, namelen, name); | 1964 | res->owner, namelen, name); |
1968 | } | 1965 | } |
1969 | } | 1966 | } |
1967 | spin_unlock(&dlm->spinlock); | ||
1970 | 1968 | ||
1971 | done: | 1969 | done: |
1972 | ret = 0; | 1970 | ret = 0; |
diff --git a/fs/ocfs2/dlm/dlmthread.c b/fs/ocfs2/dlm/dlmthread.c index 52ec020ea78b..11a6d1fd1d35 100644 --- a/fs/ocfs2/dlm/dlmthread.c +++ b/fs/ocfs2/dlm/dlmthread.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/slab.h> | ||
32 | #include <linux/highmem.h> | 31 | #include <linux/highmem.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
34 | #include <linux/sysctl.h> | 33 | #include <linux/sysctl.h> |
diff --git a/fs/ocfs2/dlm/dlmunlock.c b/fs/ocfs2/dlm/dlmunlock.c index 49e29ecd0201..b47c1b92b82b 100644 --- a/fs/ocfs2/dlm/dlmunlock.c +++ b/fs/ocfs2/dlm/dlmunlock.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/slab.h> | ||
32 | #include <linux/highmem.h> | 31 | #include <linux/highmem.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
34 | #include <linux/sysctl.h> | 33 | #include <linux/sysctl.h> |
diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c index c562a7581cf9..09e3fdfa6d33 100644 --- a/fs/ocfs2/extent_map.c +++ b/fs/ocfs2/extent_map.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/types.h> | 28 | #include <linux/types.h> |
28 | #include <linux/fiemap.h> | 29 | #include <linux/fiemap.h> |
29 | 30 | ||
diff --git a/fs/ocfs2/heartbeat.c b/fs/ocfs2/heartbeat.c index c6e7213db868..1aa863dd901f 100644 --- a/fs/ocfs2/heartbeat.c +++ b/fs/ocfs2/heartbeat.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/highmem.h> | 29 | #include <linux/highmem.h> |
31 | 30 | ||
32 | #define MLOG_MASK_PREFIX ML_SUPER | 31 | #define MLOG_MASK_PREFIX ML_SUPER |
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 278a223aae14..07cc8bb68b6d 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/highmem.h> | 28 | #include <linux/highmem.h> |
30 | #include <linux/pagemap.h> | 29 | #include <linux/pagemap.h> |
31 | #include <linux/quotaops.h> | 30 | #include <linux/quotaops.h> |
@@ -891,6 +890,21 @@ static int ocfs2_query_inode_wipe(struct inode *inode, | |||
891 | /* Do some basic inode verification... */ | 890 | /* Do some basic inode verification... */ |
892 | di = (struct ocfs2_dinode *) di_bh->b_data; | 891 | di = (struct ocfs2_dinode *) di_bh->b_data; |
893 | if (!(di->i_flags & cpu_to_le32(OCFS2_ORPHANED_FL))) { | 892 | if (!(di->i_flags & cpu_to_le32(OCFS2_ORPHANED_FL))) { |
893 | /* | ||
894 | * Inodes in the orphan dir must have ORPHANED_FL. The only | ||
895 | * inodes that come back out of the orphan dir are reflink | ||
896 | * targets. A reflink target may be moved out of the orphan | ||
897 | * dir between the time we scan the directory and the time we | ||
898 | * process it. This would lead to HAS_REFCOUNT_FL being set but | ||
899 | * ORPHANED_FL not. | ||
900 | */ | ||
901 | if (di->i_dyn_features & cpu_to_le16(OCFS2_HAS_REFCOUNT_FL)) { | ||
902 | mlog(0, "Reflinked inode %llu is no longer orphaned. " | ||
903 | "it shouldn't be deleted\n", | ||
904 | (unsigned long long)oi->ip_blkno); | ||
905 | goto bail; | ||
906 | } | ||
907 | |||
894 | /* for lack of a better error? */ | 908 | /* for lack of a better error? */ |
895 | status = -EEXIST; | 909 | status = -EEXIST; |
896 | mlog(ML_ERROR, | 910 | mlog(ML_ERROR, |
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index ca992d91f511..c983715d8d8c 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c | |||
@@ -872,8 +872,10 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb, | |||
872 | (unsigned long long)la_start_blk, | 872 | (unsigned long long)la_start_blk, |
873 | (unsigned long long)blkno); | 873 | (unsigned long long)blkno); |
874 | 874 | ||
875 | status = ocfs2_free_clusters(handle, main_bm_inode, | 875 | status = ocfs2_release_clusters(handle, |
876 | main_bm_bh, blkno, count); | 876 | main_bm_inode, |
877 | main_bm_bh, blkno, | ||
878 | count); | ||
877 | if (status < 0) { | 879 | if (status < 0) { |
878 | mlog_errno(status); | 880 | mlog_errno(status); |
879 | goto bail; | 881 | goto bail; |
@@ -984,8 +986,7 @@ static int ocfs2_local_alloc_reserve_for_window(struct ocfs2_super *osb, | |||
984 | } | 986 | } |
985 | 987 | ||
986 | retry_enospc: | 988 | retry_enospc: |
987 | (*ac)->ac_bits_wanted = osb->local_alloc_bits; | 989 | (*ac)->ac_bits_wanted = osb->local_alloc_default_bits; |
988 | |||
989 | status = ocfs2_reserve_cluster_bitmap_bits(osb, *ac); | 990 | status = ocfs2_reserve_cluster_bitmap_bits(osb, *ac); |
990 | if (status == -ENOSPC) { | 991 | if (status == -ENOSPC) { |
991 | if (ocfs2_recalc_la_window(osb, OCFS2_LA_EVENT_ENOSPC) == | 992 | if (ocfs2_recalc_la_window(osb, OCFS2_LA_EVENT_ENOSPC) == |
@@ -1061,6 +1062,7 @@ retry_enospc: | |||
1061 | OCFS2_LA_DISABLED) | 1062 | OCFS2_LA_DISABLED) |
1062 | goto bail; | 1063 | goto bail; |
1063 | 1064 | ||
1065 | ac->ac_bits_wanted = osb->local_alloc_default_bits; | ||
1064 | status = ocfs2_claim_clusters(osb, handle, ac, | 1066 | status = ocfs2_claim_clusters(osb, handle, ac, |
1065 | osb->local_alloc_bits, | 1067 | osb->local_alloc_bits, |
1066 | &cluster_off, | 1068 | &cluster_off, |
diff --git a/fs/ocfs2/locks.c b/fs/ocfs2/locks.c index 544ac6245175..b5cb3ede9408 100644 --- a/fs/ocfs2/locks.c +++ b/fs/ocfs2/locks.c | |||
@@ -133,7 +133,7 @@ int ocfs2_lock(struct file *file, int cmd, struct file_lock *fl) | |||
133 | 133 | ||
134 | if (!(fl->fl_flags & FL_POSIX)) | 134 | if (!(fl->fl_flags & FL_POSIX)) |
135 | return -ENOLCK; | 135 | return -ENOLCK; |
136 | if (__mandatory_lock(inode)) | 136 | if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) |
137 | return -ENOLCK; | 137 | return -ENOLCK; |
138 | 138 | ||
139 | return ocfs2_plock(osb->cconn, OCFS2_I(inode)->ip_blkno, file, cmd, fl); | 139 | return ocfs2_plock(osb->cconn, OCFS2_I(inode)->ip_blkno, file, cmd, fl); |
diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c index 39737613424a..7898bd3a99f5 100644 --- a/fs/ocfs2/mmap.c +++ b/fs/ocfs2/mmap.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/highmem.h> | 28 | #include <linux/highmem.h> |
30 | #include <linux/pagemap.h> | 29 | #include <linux/pagemap.h> |
31 | #include <linux/uio.h> | 30 | #include <linux/uio.h> |
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index d9cd4e373a53..b1eb50ae4097 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -84,7 +84,7 @@ static int ocfs2_prepare_orphan_dir(struct ocfs2_super *osb, | |||
84 | static int ocfs2_orphan_add(struct ocfs2_super *osb, | 84 | static int ocfs2_orphan_add(struct ocfs2_super *osb, |
85 | handle_t *handle, | 85 | handle_t *handle, |
86 | struct inode *inode, | 86 | struct inode *inode, |
87 | struct ocfs2_dinode *fe, | 87 | struct buffer_head *fe_bh, |
88 | char *name, | 88 | char *name, |
89 | struct ocfs2_dir_lookup_result *lookup, | 89 | struct ocfs2_dir_lookup_result *lookup, |
90 | struct inode *orphan_dir_inode); | 90 | struct inode *orphan_dir_inode); |
@@ -879,7 +879,7 @@ static int ocfs2_unlink(struct inode *dir, | |||
879 | fe = (struct ocfs2_dinode *) fe_bh->b_data; | 879 | fe = (struct ocfs2_dinode *) fe_bh->b_data; |
880 | 880 | ||
881 | if (inode_is_unlinkable(inode)) { | 881 | if (inode_is_unlinkable(inode)) { |
882 | status = ocfs2_orphan_add(osb, handle, inode, fe, orphan_name, | 882 | status = ocfs2_orphan_add(osb, handle, inode, fe_bh, orphan_name, |
883 | &orphan_insert, orphan_dir); | 883 | &orphan_insert, orphan_dir); |
884 | if (status < 0) { | 884 | if (status < 0) { |
885 | mlog_errno(status); | 885 | mlog_errno(status); |
@@ -1300,7 +1300,7 @@ static int ocfs2_rename(struct inode *old_dir, | |||
1300 | if (S_ISDIR(new_inode->i_mode) || | 1300 | if (S_ISDIR(new_inode->i_mode) || |
1301 | (ocfs2_read_links_count(newfe) == 1)) { | 1301 | (ocfs2_read_links_count(newfe) == 1)) { |
1302 | status = ocfs2_orphan_add(osb, handle, new_inode, | 1302 | status = ocfs2_orphan_add(osb, handle, new_inode, |
1303 | newfe, orphan_name, | 1303 | newfe_bh, orphan_name, |
1304 | &orphan_insert, orphan_dir); | 1304 | &orphan_insert, orphan_dir); |
1305 | if (status < 0) { | 1305 | if (status < 0) { |
1306 | mlog_errno(status); | 1306 | mlog_errno(status); |
@@ -1911,7 +1911,7 @@ leave: | |||
1911 | static int ocfs2_orphan_add(struct ocfs2_super *osb, | 1911 | static int ocfs2_orphan_add(struct ocfs2_super *osb, |
1912 | handle_t *handle, | 1912 | handle_t *handle, |
1913 | struct inode *inode, | 1913 | struct inode *inode, |
1914 | struct ocfs2_dinode *fe, | 1914 | struct buffer_head *fe_bh, |
1915 | char *name, | 1915 | char *name, |
1916 | struct ocfs2_dir_lookup_result *lookup, | 1916 | struct ocfs2_dir_lookup_result *lookup, |
1917 | struct inode *orphan_dir_inode) | 1917 | struct inode *orphan_dir_inode) |
@@ -1919,6 +1919,7 @@ static int ocfs2_orphan_add(struct ocfs2_super *osb, | |||
1919 | struct buffer_head *orphan_dir_bh = NULL; | 1919 | struct buffer_head *orphan_dir_bh = NULL; |
1920 | int status = 0; | 1920 | int status = 0; |
1921 | struct ocfs2_dinode *orphan_fe; | 1921 | struct ocfs2_dinode *orphan_fe; |
1922 | struct ocfs2_dinode *fe = (struct ocfs2_dinode *) fe_bh->b_data; | ||
1922 | 1923 | ||
1923 | mlog_entry("(inode->i_ino = %lu)\n", inode->i_ino); | 1924 | mlog_entry("(inode->i_ino = %lu)\n", inode->i_ino); |
1924 | 1925 | ||
@@ -1959,6 +1960,21 @@ static int ocfs2_orphan_add(struct ocfs2_super *osb, | |||
1959 | goto leave; | 1960 | goto leave; |
1960 | } | 1961 | } |
1961 | 1962 | ||
1963 | /* | ||
1964 | * We're going to journal the change of i_flags and i_orphaned_slot. | ||
1965 | * It's safe anyway, though some callers may duplicate the journaling. | ||
1966 | * Journaling within the func just make the logic look more | ||
1967 | * straightforward. | ||
1968 | */ | ||
1969 | status = ocfs2_journal_access_di(handle, | ||
1970 | INODE_CACHE(inode), | ||
1971 | fe_bh, | ||
1972 | OCFS2_JOURNAL_ACCESS_WRITE); | ||
1973 | if (status < 0) { | ||
1974 | mlog_errno(status); | ||
1975 | goto leave; | ||
1976 | } | ||
1977 | |||
1962 | le32_add_cpu(&fe->i_flags, OCFS2_ORPHANED_FL); | 1978 | le32_add_cpu(&fe->i_flags, OCFS2_ORPHANED_FL); |
1963 | 1979 | ||
1964 | /* Record which orphan dir our inode now resides | 1980 | /* Record which orphan dir our inode now resides |
@@ -1966,6 +1982,8 @@ static int ocfs2_orphan_add(struct ocfs2_super *osb, | |||
1966 | * dir to lock. */ | 1982 | * dir to lock. */ |
1967 | fe->i_orphaned_slot = cpu_to_le16(osb->slot_num); | 1983 | fe->i_orphaned_slot = cpu_to_le16(osb->slot_num); |
1968 | 1984 | ||
1985 | ocfs2_journal_dirty(handle, fe_bh); | ||
1986 | |||
1969 | mlog(0, "Inode %llu orphaned in slot %d\n", | 1987 | mlog(0, "Inode %llu orphaned in slot %d\n", |
1970 | (unsigned long long)OCFS2_I(inode)->ip_blkno, osb->slot_num); | 1988 | (unsigned long long)OCFS2_I(inode)->ip_blkno, osb->slot_num); |
1971 | 1989 | ||
@@ -2123,7 +2141,7 @@ int ocfs2_create_inode_in_orphan(struct inode *dir, | |||
2123 | } | 2141 | } |
2124 | 2142 | ||
2125 | di = (struct ocfs2_dinode *)new_di_bh->b_data; | 2143 | di = (struct ocfs2_dinode *)new_di_bh->b_data; |
2126 | status = ocfs2_orphan_add(osb, handle, inode, di, orphan_name, | 2144 | status = ocfs2_orphan_add(osb, handle, inode, new_di_bh, orphan_name, |
2127 | &orphan_insert, orphan_dir); | 2145 | &orphan_insert, orphan_dir); |
2128 | if (status < 0) { | 2146 | if (status < 0) { |
2129 | mlog_errno(status); | 2147 | mlog_errno(status); |
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index 1238b491db90..adf5e2ebc2c4 100644 --- a/fs/ocfs2/ocfs2.h +++ b/fs/ocfs2/ocfs2.h | |||
@@ -763,8 +763,18 @@ static inline unsigned int ocfs2_megabytes_to_clusters(struct super_block *sb, | |||
763 | return megs << (20 - OCFS2_SB(sb)->s_clustersize_bits); | 763 | return megs << (20 - OCFS2_SB(sb)->s_clustersize_bits); |
764 | } | 764 | } |
765 | 765 | ||
766 | #define ocfs2_set_bit ext2_set_bit | 766 | static inline void _ocfs2_set_bit(unsigned int bit, unsigned long *bitmap) |
767 | #define ocfs2_clear_bit ext2_clear_bit | 767 | { |
768 | ext2_set_bit(bit, bitmap); | ||
769 | } | ||
770 | #define ocfs2_set_bit(bit, addr) _ocfs2_set_bit((bit), (unsigned long *)(addr)) | ||
771 | |||
772 | static inline void _ocfs2_clear_bit(unsigned int bit, unsigned long *bitmap) | ||
773 | { | ||
774 | ext2_clear_bit(bit, bitmap); | ||
775 | } | ||
776 | #define ocfs2_clear_bit(bit, addr) _ocfs2_clear_bit((bit), (unsigned long *)(addr)) | ||
777 | |||
768 | #define ocfs2_test_bit ext2_test_bit | 778 | #define ocfs2_test_bit ext2_test_bit |
769 | #define ocfs2_find_next_zero_bit ext2_find_next_zero_bit | 779 | #define ocfs2_find_next_zero_bit ext2_find_next_zero_bit |
770 | #define ocfs2_find_next_bit ext2_find_next_bit | 780 | #define ocfs2_find_next_bit ext2_find_next_bit |
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index 355f41d1d520..ab42a74c7539 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c | |||
@@ -3,6 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
5 | #include <linux/fs.h> | 5 | #include <linux/fs.h> |
6 | #include <linux/slab.h> | ||
6 | #include <linux/quota.h> | 7 | #include <linux/quota.h> |
7 | #include <linux/quotaops.h> | 8 | #include <linux/quotaops.h> |
8 | #include <linux/dqblk_qtree.h> | 9 | #include <linux/dqblk_qtree.h> |
diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c index a6467f3d262e..9ad49305f450 100644 --- a/fs/ocfs2/quota_local.c +++ b/fs/ocfs2/quota_local.c | |||
@@ -3,6 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/fs.h> | 5 | #include <linux/fs.h> |
6 | #include <linux/slab.h> | ||
6 | #include <linux/quota.h> | 7 | #include <linux/quota.h> |
7 | #include <linux/quotaops.h> | 8 | #include <linux/quotaops.h> |
8 | #include <linux/module.h> | 9 | #include <linux/module.h> |
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 9e96921dffda..bd96f6c7877e 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c | |||
@@ -37,7 +37,6 @@ | |||
37 | 37 | ||
38 | #include <linux/bio.h> | 38 | #include <linux/bio.h> |
39 | #include <linux/blkdev.h> | 39 | #include <linux/blkdev.h> |
40 | #include <linux/gfp.h> | ||
41 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
42 | #include <linux/writeback.h> | 41 | #include <linux/writeback.h> |
43 | #include <linux/pagevec.h> | 42 | #include <linux/pagevec.h> |
@@ -4075,6 +4074,7 @@ static int ocfs2_complete_reflink(struct inode *s_inode, | |||
4075 | OCFS2_I(t_inode)->ip_dyn_features = OCFS2_I(s_inode)->ip_dyn_features; | 4074 | OCFS2_I(t_inode)->ip_dyn_features = OCFS2_I(s_inode)->ip_dyn_features; |
4076 | spin_unlock(&OCFS2_I(t_inode)->ip_lock); | 4075 | spin_unlock(&OCFS2_I(t_inode)->ip_lock); |
4077 | i_size_write(t_inode, size); | 4076 | i_size_write(t_inode, size); |
4077 | t_inode->i_blocks = s_inode->i_blocks; | ||
4078 | 4078 | ||
4079 | di->i_xattr_inline_size = s_di->i_xattr_inline_size; | 4079 | di->i_xattr_inline_size = s_di->i_xattr_inline_size; |
4080 | di->i_clusters = s_di->i_clusters; | 4080 | di->i_clusters = s_di->i_clusters; |
diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c index 7020e1253ffa..0d3049f696c5 100644 --- a/fs/ocfs2/stack_o2cb.c +++ b/fs/ocfs2/stack_o2cb.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/crc32.h> | 21 | #include <linux/crc32.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/module.h> | 23 | #include <linux/module.h> |
23 | 24 | ||
24 | /* Needed for AOP_TRUNCATED_PAGE in mlog_errno() */ | 25 | /* Needed for AOP_TRUNCATED_PAGE in mlog_errno() */ |
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c index 5ae8812b2864..2dc57bca0688 100644 --- a/fs/ocfs2/stack_user.c +++ b/fs/ocfs2/stack_user.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
22 | #include <linux/miscdevice.h> | 22 | #include <linux/miscdevice.h> |
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/smp_lock.h> | 25 | #include <linux/smp_lock.h> |
25 | #include <linux/reboot.h> | 26 | #include <linux/reboot.h> |
26 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index c3c60bc3e072..19ba00f28547 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
@@ -95,13 +95,6 @@ static inline int ocfs2_block_group_set_bits(handle_t *handle, | |||
95 | struct buffer_head *group_bh, | 95 | struct buffer_head *group_bh, |
96 | unsigned int bit_off, | 96 | unsigned int bit_off, |
97 | unsigned int num_bits); | 97 | unsigned int num_bits); |
98 | static inline int ocfs2_block_group_clear_bits(handle_t *handle, | ||
99 | struct inode *alloc_inode, | ||
100 | struct ocfs2_group_desc *bg, | ||
101 | struct buffer_head *group_bh, | ||
102 | unsigned int bit_off, | ||
103 | unsigned int num_bits); | ||
104 | |||
105 | static int ocfs2_relink_block_group(handle_t *handle, | 98 | static int ocfs2_relink_block_group(handle_t *handle, |
106 | struct inode *alloc_inode, | 99 | struct inode *alloc_inode, |
107 | struct buffer_head *fe_bh, | 100 | struct buffer_head *fe_bh, |
@@ -152,7 +145,7 @@ static u32 ocfs2_bits_per_group(struct ocfs2_chain_list *cl) | |||
152 | 145 | ||
153 | #define do_error(fmt, ...) \ | 146 | #define do_error(fmt, ...) \ |
154 | do{ \ | 147 | do{ \ |
155 | if (clean_error) \ | 148 | if (resize) \ |
156 | mlog(ML_ERROR, fmt "\n", ##__VA_ARGS__); \ | 149 | mlog(ML_ERROR, fmt "\n", ##__VA_ARGS__); \ |
157 | else \ | 150 | else \ |
158 | ocfs2_error(sb, fmt, ##__VA_ARGS__); \ | 151 | ocfs2_error(sb, fmt, ##__VA_ARGS__); \ |
@@ -160,7 +153,7 @@ static u32 ocfs2_bits_per_group(struct ocfs2_chain_list *cl) | |||
160 | 153 | ||
161 | static int ocfs2_validate_gd_self(struct super_block *sb, | 154 | static int ocfs2_validate_gd_self(struct super_block *sb, |
162 | struct buffer_head *bh, | 155 | struct buffer_head *bh, |
163 | int clean_error) | 156 | int resize) |
164 | { | 157 | { |
165 | struct ocfs2_group_desc *gd = (struct ocfs2_group_desc *)bh->b_data; | 158 | struct ocfs2_group_desc *gd = (struct ocfs2_group_desc *)bh->b_data; |
166 | 159 | ||
@@ -211,7 +204,7 @@ static int ocfs2_validate_gd_self(struct super_block *sb, | |||
211 | static int ocfs2_validate_gd_parent(struct super_block *sb, | 204 | static int ocfs2_validate_gd_parent(struct super_block *sb, |
212 | struct ocfs2_dinode *di, | 205 | struct ocfs2_dinode *di, |
213 | struct buffer_head *bh, | 206 | struct buffer_head *bh, |
214 | int clean_error) | 207 | int resize) |
215 | { | 208 | { |
216 | unsigned int max_bits; | 209 | unsigned int max_bits; |
217 | struct ocfs2_group_desc *gd = (struct ocfs2_group_desc *)bh->b_data; | 210 | struct ocfs2_group_desc *gd = (struct ocfs2_group_desc *)bh->b_data; |
@@ -233,8 +226,11 @@ static int ocfs2_validate_gd_parent(struct super_block *sb, | |||
233 | return -EINVAL; | 226 | return -EINVAL; |
234 | } | 227 | } |
235 | 228 | ||
236 | if (le16_to_cpu(gd->bg_chain) >= | 229 | /* In resize, we may meet the case bg_chain == cl_next_free_rec. */ |
237 | le16_to_cpu(di->id2.i_chain.cl_next_free_rec)) { | 230 | if ((le16_to_cpu(gd->bg_chain) > |
231 | le16_to_cpu(di->id2.i_chain.cl_next_free_rec)) || | ||
232 | ((le16_to_cpu(gd->bg_chain) == | ||
233 | le16_to_cpu(di->id2.i_chain.cl_next_free_rec)) && !resize)) { | ||
238 | do_error("Group descriptor #%llu has bad chain %u", | 234 | do_error("Group descriptor #%llu has bad chain %u", |
239 | (unsigned long long)bh->b_blocknr, | 235 | (unsigned long long)bh->b_blocknr, |
240 | le16_to_cpu(gd->bg_chain)); | 236 | le16_to_cpu(gd->bg_chain)); |
@@ -1975,18 +1971,18 @@ int ocfs2_claim_clusters(struct ocfs2_super *osb, | |||
1975 | bits_wanted, cluster_start, num_clusters); | 1971 | bits_wanted, cluster_start, num_clusters); |
1976 | } | 1972 | } |
1977 | 1973 | ||
1978 | static inline int ocfs2_block_group_clear_bits(handle_t *handle, | 1974 | static int ocfs2_block_group_clear_bits(handle_t *handle, |
1979 | struct inode *alloc_inode, | 1975 | struct inode *alloc_inode, |
1980 | struct ocfs2_group_desc *bg, | 1976 | struct ocfs2_group_desc *bg, |
1981 | struct buffer_head *group_bh, | 1977 | struct buffer_head *group_bh, |
1982 | unsigned int bit_off, | 1978 | unsigned int bit_off, |
1983 | unsigned int num_bits) | 1979 | unsigned int num_bits, |
1980 | void (*undo_fn)(unsigned int bit, | ||
1981 | unsigned long *bmap)) | ||
1984 | { | 1982 | { |
1985 | int status; | 1983 | int status; |
1986 | unsigned int tmp; | 1984 | unsigned int tmp; |
1987 | int journal_type = OCFS2_JOURNAL_ACCESS_WRITE; | ||
1988 | struct ocfs2_group_desc *undo_bg = NULL; | 1985 | struct ocfs2_group_desc *undo_bg = NULL; |
1989 | int cluster_bitmap = 0; | ||
1990 | 1986 | ||
1991 | mlog_entry_void(); | 1987 | mlog_entry_void(); |
1992 | 1988 | ||
@@ -1996,20 +1992,18 @@ static inline int ocfs2_block_group_clear_bits(handle_t *handle, | |||
1996 | 1992 | ||
1997 | mlog(0, "off = %u, num = %u\n", bit_off, num_bits); | 1993 | mlog(0, "off = %u, num = %u\n", bit_off, num_bits); |
1998 | 1994 | ||
1999 | if (ocfs2_is_cluster_bitmap(alloc_inode)) | 1995 | BUG_ON(undo_fn && !ocfs2_is_cluster_bitmap(alloc_inode)); |
2000 | journal_type = OCFS2_JOURNAL_ACCESS_UNDO; | ||
2001 | |||
2002 | status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode), | 1996 | status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode), |
2003 | group_bh, journal_type); | 1997 | group_bh, |
1998 | undo_fn ? | ||
1999 | OCFS2_JOURNAL_ACCESS_UNDO : | ||
2000 | OCFS2_JOURNAL_ACCESS_WRITE); | ||
2004 | if (status < 0) { | 2001 | if (status < 0) { |
2005 | mlog_errno(status); | 2002 | mlog_errno(status); |
2006 | goto bail; | 2003 | goto bail; |
2007 | } | 2004 | } |
2008 | 2005 | ||
2009 | if (ocfs2_is_cluster_bitmap(alloc_inode)) | 2006 | if (undo_fn) { |
2010 | cluster_bitmap = 1; | ||
2011 | |||
2012 | if (cluster_bitmap) { | ||
2013 | jbd_lock_bh_state(group_bh); | 2007 | jbd_lock_bh_state(group_bh); |
2014 | undo_bg = (struct ocfs2_group_desc *) | 2008 | undo_bg = (struct ocfs2_group_desc *) |
2015 | bh2jh(group_bh)->b_committed_data; | 2009 | bh2jh(group_bh)->b_committed_data; |
@@ -2020,13 +2014,13 @@ static inline int ocfs2_block_group_clear_bits(handle_t *handle, | |||
2020 | while(tmp--) { | 2014 | while(tmp--) { |
2021 | ocfs2_clear_bit((bit_off + tmp), | 2015 | ocfs2_clear_bit((bit_off + tmp), |
2022 | (unsigned long *) bg->bg_bitmap); | 2016 | (unsigned long *) bg->bg_bitmap); |
2023 | if (cluster_bitmap) | 2017 | if (undo_fn) |
2024 | ocfs2_set_bit(bit_off + tmp, | 2018 | undo_fn(bit_off + tmp, |
2025 | (unsigned long *) undo_bg->bg_bitmap); | 2019 | (unsigned long *) undo_bg->bg_bitmap); |
2026 | } | 2020 | } |
2027 | le16_add_cpu(&bg->bg_free_bits_count, num_bits); | 2021 | le16_add_cpu(&bg->bg_free_bits_count, num_bits); |
2028 | 2022 | ||
2029 | if (cluster_bitmap) | 2023 | if (undo_fn) |
2030 | jbd_unlock_bh_state(group_bh); | 2024 | jbd_unlock_bh_state(group_bh); |
2031 | 2025 | ||
2032 | status = ocfs2_journal_dirty(handle, group_bh); | 2026 | status = ocfs2_journal_dirty(handle, group_bh); |
@@ -2039,12 +2033,14 @@ bail: | |||
2039 | /* | 2033 | /* |
2040 | * expects the suballoc inode to already be locked. | 2034 | * expects the suballoc inode to already be locked. |
2041 | */ | 2035 | */ |
2042 | int ocfs2_free_suballoc_bits(handle_t *handle, | 2036 | static int _ocfs2_free_suballoc_bits(handle_t *handle, |
2043 | struct inode *alloc_inode, | 2037 | struct inode *alloc_inode, |
2044 | struct buffer_head *alloc_bh, | 2038 | struct buffer_head *alloc_bh, |
2045 | unsigned int start_bit, | 2039 | unsigned int start_bit, |
2046 | u64 bg_blkno, | 2040 | u64 bg_blkno, |
2047 | unsigned int count) | 2041 | unsigned int count, |
2042 | void (*undo_fn)(unsigned int bit, | ||
2043 | unsigned long *bitmap)) | ||
2048 | { | 2044 | { |
2049 | int status = 0; | 2045 | int status = 0; |
2050 | u32 tmp_used; | 2046 | u32 tmp_used; |
@@ -2079,7 +2075,7 @@ int ocfs2_free_suballoc_bits(handle_t *handle, | |||
2079 | 2075 | ||
2080 | status = ocfs2_block_group_clear_bits(handle, alloc_inode, | 2076 | status = ocfs2_block_group_clear_bits(handle, alloc_inode, |
2081 | group, group_bh, | 2077 | group, group_bh, |
2082 | start_bit, count); | 2078 | start_bit, count, undo_fn); |
2083 | if (status < 0) { | 2079 | if (status < 0) { |
2084 | mlog_errno(status); | 2080 | mlog_errno(status); |
2085 | goto bail; | 2081 | goto bail; |
@@ -2110,6 +2106,17 @@ bail: | |||
2110 | return status; | 2106 | return status; |
2111 | } | 2107 | } |
2112 | 2108 | ||
2109 | int ocfs2_free_suballoc_bits(handle_t *handle, | ||
2110 | struct inode *alloc_inode, | ||
2111 | struct buffer_head *alloc_bh, | ||
2112 | unsigned int start_bit, | ||
2113 | u64 bg_blkno, | ||
2114 | unsigned int count) | ||
2115 | { | ||
2116 | return _ocfs2_free_suballoc_bits(handle, alloc_inode, alloc_bh, | ||
2117 | start_bit, bg_blkno, count, NULL); | ||
2118 | } | ||
2119 | |||
2113 | int ocfs2_free_dinode(handle_t *handle, | 2120 | int ocfs2_free_dinode(handle_t *handle, |
2114 | struct inode *inode_alloc_inode, | 2121 | struct inode *inode_alloc_inode, |
2115 | struct buffer_head *inode_alloc_bh, | 2122 | struct buffer_head *inode_alloc_bh, |
@@ -2123,11 +2130,13 @@ int ocfs2_free_dinode(handle_t *handle, | |||
2123 | inode_alloc_bh, bit, bg_blkno, 1); | 2130 | inode_alloc_bh, bit, bg_blkno, 1); |
2124 | } | 2131 | } |
2125 | 2132 | ||
2126 | int ocfs2_free_clusters(handle_t *handle, | 2133 | static int _ocfs2_free_clusters(handle_t *handle, |
2127 | struct inode *bitmap_inode, | 2134 | struct inode *bitmap_inode, |
2128 | struct buffer_head *bitmap_bh, | 2135 | struct buffer_head *bitmap_bh, |
2129 | u64 start_blk, | 2136 | u64 start_blk, |
2130 | unsigned int num_clusters) | 2137 | unsigned int num_clusters, |
2138 | void (*undo_fn)(unsigned int bit, | ||
2139 | unsigned long *bitmap)) | ||
2131 | { | 2140 | { |
2132 | int status; | 2141 | int status; |
2133 | u16 bg_start_bit; | 2142 | u16 bg_start_bit; |
@@ -2154,9 +2163,9 @@ int ocfs2_free_clusters(handle_t *handle, | |||
2154 | mlog(0, "bg_blkno = %llu, bg_start_bit = %u\n", | 2163 | mlog(0, "bg_blkno = %llu, bg_start_bit = %u\n", |
2155 | (unsigned long long)bg_blkno, bg_start_bit); | 2164 | (unsigned long long)bg_blkno, bg_start_bit); |
2156 | 2165 | ||
2157 | status = ocfs2_free_suballoc_bits(handle, bitmap_inode, bitmap_bh, | 2166 | status = _ocfs2_free_suballoc_bits(handle, bitmap_inode, bitmap_bh, |
2158 | bg_start_bit, bg_blkno, | 2167 | bg_start_bit, bg_blkno, |
2159 | num_clusters); | 2168 | num_clusters, undo_fn); |
2160 | if (status < 0) { | 2169 | if (status < 0) { |
2161 | mlog_errno(status); | 2170 | mlog_errno(status); |
2162 | goto out; | 2171 | goto out; |
@@ -2170,6 +2179,32 @@ out: | |||
2170 | return status; | 2179 | return status; |
2171 | } | 2180 | } |
2172 | 2181 | ||
2182 | int ocfs2_free_clusters(handle_t *handle, | ||
2183 | struct inode *bitmap_inode, | ||
2184 | struct buffer_head *bitmap_bh, | ||
2185 | u64 start_blk, | ||
2186 | unsigned int num_clusters) | ||
2187 | { | ||
2188 | return _ocfs2_free_clusters(handle, bitmap_inode, bitmap_bh, | ||
2189 | start_blk, num_clusters, | ||
2190 | _ocfs2_set_bit); | ||
2191 | } | ||
2192 | |||
2193 | /* | ||
2194 | * Give never-used clusters back to the global bitmap. We don't need | ||
2195 | * to protect these bits in the undo buffer. | ||
2196 | */ | ||
2197 | int ocfs2_release_clusters(handle_t *handle, | ||
2198 | struct inode *bitmap_inode, | ||
2199 | struct buffer_head *bitmap_bh, | ||
2200 | u64 start_blk, | ||
2201 | unsigned int num_clusters) | ||
2202 | { | ||
2203 | return _ocfs2_free_clusters(handle, bitmap_inode, bitmap_bh, | ||
2204 | start_blk, num_clusters, | ||
2205 | _ocfs2_clear_bit); | ||
2206 | } | ||
2207 | |||
2173 | static inline void ocfs2_debug_bg(struct ocfs2_group_desc *bg) | 2208 | static inline void ocfs2_debug_bg(struct ocfs2_group_desc *bg) |
2174 | { | 2209 | { |
2175 | printk("Block Group:\n"); | 2210 | printk("Block Group:\n"); |
diff --git a/fs/ocfs2/suballoc.h b/fs/ocfs2/suballoc.h index fa60723c43e8..e0f46df357e6 100644 --- a/fs/ocfs2/suballoc.h +++ b/fs/ocfs2/suballoc.h | |||
@@ -127,6 +127,11 @@ int ocfs2_free_clusters(handle_t *handle, | |||
127 | struct buffer_head *bitmap_bh, | 127 | struct buffer_head *bitmap_bh, |
128 | u64 start_blk, | 128 | u64 start_blk, |
129 | unsigned int num_clusters); | 129 | unsigned int num_clusters); |
130 | int ocfs2_release_clusters(handle_t *handle, | ||
131 | struct inode *bitmap_inode, | ||
132 | struct buffer_head *bitmap_bh, | ||
133 | u64 start_blk, | ||
134 | unsigned int num_clusters); | ||
130 | 135 | ||
131 | static inline u64 ocfs2_which_suballoc_group(u64 block, unsigned int bit) | 136 | static inline u64 ocfs2_which_suballoc_group(u64 block, unsigned int bit) |
132 | { | 137 | { |
diff --git a/fs/ocfs2/sysfile.c b/fs/ocfs2/sysfile.c index 40e53702948c..bfe7190cdbf1 100644 --- a/fs/ocfs2/sysfile.c +++ b/fs/ocfs2/sysfile.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/highmem.h> | 28 | #include <linux/highmem.h> |
30 | 29 | ||
31 | #define MLOG_MASK_PREFIX ML_INODE | 30 | #define MLOG_MASK_PREFIX ML_INODE |
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index d1b0d386f6d1..3e7773089b96 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c | |||
@@ -1622,7 +1622,7 @@ static void ocfs2_xa_block_wipe_namevalue(struct ocfs2_xa_loc *loc) | |||
1622 | /* Now tell xh->xh_entries about it */ | 1622 | /* Now tell xh->xh_entries about it */ |
1623 | for (i = 0; i < count; i++) { | 1623 | for (i = 0; i < count; i++) { |
1624 | offset = le16_to_cpu(xh->xh_entries[i].xe_name_offset); | 1624 | offset = le16_to_cpu(xh->xh_entries[i].xe_name_offset); |
1625 | if (offset < namevalue_offset) | 1625 | if (offset <= namevalue_offset) |
1626 | le16_add_cpu(&xh->xh_entries[i].xe_name_offset, | 1626 | le16_add_cpu(&xh->xh_entries[i].xe_name_offset, |
1627 | namevalue_size); | 1627 | namevalue_size); |
1628 | } | 1628 | } |
@@ -6528,13 +6528,11 @@ static int ocfs2_create_empty_xattr_block(struct inode *inode, | |||
6528 | int indexed) | 6528 | int indexed) |
6529 | { | 6529 | { |
6530 | int ret; | 6530 | int ret; |
6531 | struct ocfs2_alloc_context *meta_ac; | ||
6532 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 6531 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
6533 | struct ocfs2_xattr_set_ctxt ctxt = { | 6532 | struct ocfs2_xattr_set_ctxt ctxt; |
6534 | .meta_ac = meta_ac, | ||
6535 | }; | ||
6536 | 6533 | ||
6537 | ret = ocfs2_reserve_new_metadata_blocks(osb, 1, &meta_ac); | 6534 | memset(&ctxt, 0, sizeof(ctxt)); |
6535 | ret = ocfs2_reserve_new_metadata_blocks(osb, 1, &ctxt.meta_ac); | ||
6538 | if (ret < 0) { | 6536 | if (ret < 0) { |
6539 | mlog_errno(ret); | 6537 | mlog_errno(ret); |
6540 | return ret; | 6538 | return ret; |
@@ -6556,7 +6554,7 @@ static int ocfs2_create_empty_xattr_block(struct inode *inode, | |||
6556 | 6554 | ||
6557 | ocfs2_commit_trans(osb, ctxt.handle); | 6555 | ocfs2_commit_trans(osb, ctxt.handle); |
6558 | out: | 6556 | out: |
6559 | ocfs2_free_alloc_context(meta_ac); | 6557 | ocfs2_free_alloc_context(ctxt.meta_ac); |
6560 | return ret; | 6558 | return ret; |
6561 | } | 6559 | } |
6562 | 6560 | ||
diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c index 75d9b5ba1d45..c82af6acc2e7 100644 --- a/fs/omfs/inode.c +++ b/fs/omfs/inode.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/version.h> | 6 | #include <linux/version.h> |
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
10 | #include <linux/vfs.h> | 11 | #include <linux/vfs.h> |
11 | #include <linux/parser.h> | 12 | #include <linux/parser.h> |
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/fdtable.h> | 10 | #include <linux/fdtable.h> |
11 | #include <linux/fsnotify.h> | 11 | #include <linux/fsnotify.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/tty.h> | 13 | #include <linux/tty.h> |
15 | #include <linux/namei.h> | 14 | #include <linux/namei.h> |
16 | #include <linux/backing-dev.h> | 15 | #include <linux/backing-dev.h> |
@@ -20,6 +19,7 @@ | |||
20 | #include <linux/mount.h> | 19 | #include <linux/mount.h> |
21 | #include <linux/vfs.h> | 20 | #include <linux/vfs.h> |
22 | #include <linux/fcntl.h> | 21 | #include <linux/fcntl.h> |
22 | #include <linux/slab.h> | ||
23 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/personality.h> | 25 | #include <linux/personality.h> |
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index e8865c11777f..e238ab23a9e7 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/kmod.h> | 20 | #include <linux/kmod.h> |
20 | #include <linux/ctype.h> | 21 | #include <linux/ctype.h> |
21 | #include <linux/genhd.h> | 22 | #include <linux/genhd.h> |
diff --git a/fs/partitions/efi.c b/fs/partitions/efi.c index 49cfd5f54238..91babdae7587 100644 --- a/fs/partitions/efi.c +++ b/fs/partitions/efi.c | |||
@@ -95,6 +95,7 @@ | |||
95 | ************************************************************/ | 95 | ************************************************************/ |
96 | #include <linux/crc32.h> | 96 | #include <linux/crc32.h> |
97 | #include <linux/math64.h> | 97 | #include <linux/math64.h> |
98 | #include <linux/slab.h> | ||
98 | #include "check.h" | 99 | #include "check.h" |
99 | #include "efi.h" | 100 | #include "efi.h" |
100 | 101 | ||
diff --git a/fs/partitions/msdos.c b/fs/partitions/msdos.c index 0028d2ef0662..90be97f1f5a8 100644 --- a/fs/partitions/msdos.c +++ b/fs/partitions/msdos.c | |||
@@ -31,14 +31,17 @@ | |||
31 | */ | 31 | */ |
32 | #include <asm/unaligned.h> | 32 | #include <asm/unaligned.h> |
33 | 33 | ||
34 | #define SYS_IND(p) (get_unaligned(&p->sys_ind)) | 34 | #define SYS_IND(p) get_unaligned(&p->sys_ind) |
35 | #define NR_SECTS(p) ({ __le32 __a = get_unaligned(&p->nr_sects); \ | ||
36 | le32_to_cpu(__a); \ | ||
37 | }) | ||
38 | 35 | ||
39 | #define START_SECT(p) ({ __le32 __a = get_unaligned(&p->start_sect); \ | 36 | static inline sector_t nr_sects(struct partition *p) |
40 | le32_to_cpu(__a); \ | 37 | { |
41 | }) | 38 | return (sector_t)get_unaligned_le32(&p->nr_sects); |
39 | } | ||
40 | |||
41 | static inline sector_t start_sect(struct partition *p) | ||
42 | { | ||
43 | return (sector_t)get_unaligned_le32(&p->start_sect); | ||
44 | } | ||
42 | 45 | ||
43 | static inline int is_extended_partition(struct partition *p) | 46 | static inline int is_extended_partition(struct partition *p) |
44 | { | 47 | { |
@@ -104,13 +107,13 @@ static int aix_magic_present(unsigned char *p, struct block_device *bdev) | |||
104 | 107 | ||
105 | static void | 108 | static void |
106 | parse_extended(struct parsed_partitions *state, struct block_device *bdev, | 109 | parse_extended(struct parsed_partitions *state, struct block_device *bdev, |
107 | u32 first_sector, u32 first_size) | 110 | sector_t first_sector, sector_t first_size) |
108 | { | 111 | { |
109 | struct partition *p; | 112 | struct partition *p; |
110 | Sector sect; | 113 | Sector sect; |
111 | unsigned char *data; | 114 | unsigned char *data; |
112 | u32 this_sector, this_size; | 115 | sector_t this_sector, this_size; |
113 | int sector_size = bdev_logical_block_size(bdev) / 512; | 116 | sector_t sector_size = bdev_logical_block_size(bdev) / 512; |
114 | int loopct = 0; /* number of links followed | 117 | int loopct = 0; /* number of links followed |
115 | without finding a data partition */ | 118 | without finding a data partition */ |
116 | int i; | 119 | int i; |
@@ -145,14 +148,14 @@ parse_extended(struct parsed_partitions *state, struct block_device *bdev, | |||
145 | * First process the data partition(s) | 148 | * First process the data partition(s) |
146 | */ | 149 | */ |
147 | for (i=0; i<4; i++, p++) { | 150 | for (i=0; i<4; i++, p++) { |
148 | u32 offs, size, next; | 151 | sector_t offs, size, next; |
149 | if (!NR_SECTS(p) || is_extended_partition(p)) | 152 | if (!nr_sects(p) || is_extended_partition(p)) |
150 | continue; | 153 | continue; |
151 | 154 | ||
152 | /* Check the 3rd and 4th entries - | 155 | /* Check the 3rd and 4th entries - |
153 | these sometimes contain random garbage */ | 156 | these sometimes contain random garbage */ |
154 | offs = START_SECT(p)*sector_size; | 157 | offs = start_sect(p)*sector_size; |
155 | size = NR_SECTS(p)*sector_size; | 158 | size = nr_sects(p)*sector_size; |
156 | next = this_sector + offs; | 159 | next = this_sector + offs; |
157 | if (i >= 2) { | 160 | if (i >= 2) { |
158 | if (offs + size > this_size) | 161 | if (offs + size > this_size) |
@@ -179,13 +182,13 @@ parse_extended(struct parsed_partitions *state, struct block_device *bdev, | |||
179 | */ | 182 | */ |
180 | p -= 4; | 183 | p -= 4; |
181 | for (i=0; i<4; i++, p++) | 184 | for (i=0; i<4; i++, p++) |
182 | if (NR_SECTS(p) && is_extended_partition(p)) | 185 | if (nr_sects(p) && is_extended_partition(p)) |
183 | break; | 186 | break; |
184 | if (i == 4) | 187 | if (i == 4) |
185 | goto done; /* nothing left to do */ | 188 | goto done; /* nothing left to do */ |
186 | 189 | ||
187 | this_sector = first_sector + START_SECT(p) * sector_size; | 190 | this_sector = first_sector + start_sect(p) * sector_size; |
188 | this_size = NR_SECTS(p) * sector_size; | 191 | this_size = nr_sects(p) * sector_size; |
189 | put_dev_sector(sect); | 192 | put_dev_sector(sect); |
190 | } | 193 | } |
191 | done: | 194 | done: |
@@ -197,7 +200,7 @@ done: | |||
197 | 200 | ||
198 | static void | 201 | static void |
199 | parse_solaris_x86(struct parsed_partitions *state, struct block_device *bdev, | 202 | parse_solaris_x86(struct parsed_partitions *state, struct block_device *bdev, |
200 | u32 offset, u32 size, int origin) | 203 | sector_t offset, sector_t size, int origin) |
201 | { | 204 | { |
202 | #ifdef CONFIG_SOLARIS_X86_PARTITION | 205 | #ifdef CONFIG_SOLARIS_X86_PARTITION |
203 | Sector sect; | 206 | Sector sect; |
@@ -244,7 +247,7 @@ parse_solaris_x86(struct parsed_partitions *state, struct block_device *bdev, | |||
244 | */ | 247 | */ |
245 | static void | 248 | static void |
246 | parse_bsd(struct parsed_partitions *state, struct block_device *bdev, | 249 | parse_bsd(struct parsed_partitions *state, struct block_device *bdev, |
247 | u32 offset, u32 size, int origin, char *flavour, | 250 | sector_t offset, sector_t size, int origin, char *flavour, |
248 | int max_partitions) | 251 | int max_partitions) |
249 | { | 252 | { |
250 | Sector sect; | 253 | Sector sect; |
@@ -263,7 +266,7 @@ parse_bsd(struct parsed_partitions *state, struct block_device *bdev, | |||
263 | if (le16_to_cpu(l->d_npartitions) < max_partitions) | 266 | if (le16_to_cpu(l->d_npartitions) < max_partitions) |
264 | max_partitions = le16_to_cpu(l->d_npartitions); | 267 | max_partitions = le16_to_cpu(l->d_npartitions); |
265 | for (p = l->d_partitions; p - l->d_partitions < max_partitions; p++) { | 268 | for (p = l->d_partitions; p - l->d_partitions < max_partitions; p++) { |
266 | u32 bsd_start, bsd_size; | 269 | sector_t bsd_start, bsd_size; |
267 | 270 | ||
268 | if (state->next == state->limit) | 271 | if (state->next == state->limit) |
269 | break; | 272 | break; |
@@ -290,7 +293,7 @@ parse_bsd(struct parsed_partitions *state, struct block_device *bdev, | |||
290 | 293 | ||
291 | static void | 294 | static void |
292 | parse_freebsd(struct parsed_partitions *state, struct block_device *bdev, | 295 | parse_freebsd(struct parsed_partitions *state, struct block_device *bdev, |
293 | u32 offset, u32 size, int origin) | 296 | sector_t offset, sector_t size, int origin) |
294 | { | 297 | { |
295 | #ifdef CONFIG_BSD_DISKLABEL | 298 | #ifdef CONFIG_BSD_DISKLABEL |
296 | parse_bsd(state, bdev, offset, size, origin, | 299 | parse_bsd(state, bdev, offset, size, origin, |
@@ -300,7 +303,7 @@ parse_freebsd(struct parsed_partitions *state, struct block_device *bdev, | |||
300 | 303 | ||
301 | static void | 304 | static void |
302 | parse_netbsd(struct parsed_partitions *state, struct block_device *bdev, | 305 | parse_netbsd(struct parsed_partitions *state, struct block_device *bdev, |
303 | u32 offset, u32 size, int origin) | 306 | sector_t offset, sector_t size, int origin) |
304 | { | 307 | { |
305 | #ifdef CONFIG_BSD_DISKLABEL | 308 | #ifdef CONFIG_BSD_DISKLABEL |
306 | parse_bsd(state, bdev, offset, size, origin, | 309 | parse_bsd(state, bdev, offset, size, origin, |
@@ -310,7 +313,7 @@ parse_netbsd(struct parsed_partitions *state, struct block_device *bdev, | |||
310 | 313 | ||
311 | static void | 314 | static void |
312 | parse_openbsd(struct parsed_partitions *state, struct block_device *bdev, | 315 | parse_openbsd(struct parsed_partitions *state, struct block_device *bdev, |
313 | u32 offset, u32 size, int origin) | 316 | sector_t offset, sector_t size, int origin) |
314 | { | 317 | { |
315 | #ifdef CONFIG_BSD_DISKLABEL | 318 | #ifdef CONFIG_BSD_DISKLABEL |
316 | parse_bsd(state, bdev, offset, size, origin, | 319 | parse_bsd(state, bdev, offset, size, origin, |
@@ -324,7 +327,7 @@ parse_openbsd(struct parsed_partitions *state, struct block_device *bdev, | |||
324 | */ | 327 | */ |
325 | static void | 328 | static void |
326 | parse_unixware(struct parsed_partitions *state, struct block_device *bdev, | 329 | parse_unixware(struct parsed_partitions *state, struct block_device *bdev, |
327 | u32 offset, u32 size, int origin) | 330 | sector_t offset, sector_t size, int origin) |
328 | { | 331 | { |
329 | #ifdef CONFIG_UNIXWARE_DISKLABEL | 332 | #ifdef CONFIG_UNIXWARE_DISKLABEL |
330 | Sector sect; | 333 | Sector sect; |
@@ -348,7 +351,8 @@ parse_unixware(struct parsed_partitions *state, struct block_device *bdev, | |||
348 | 351 | ||
349 | if (p->s_label != UNIXWARE_FS_UNUSED) | 352 | if (p->s_label != UNIXWARE_FS_UNUSED) |
350 | put_partition(state, state->next++, | 353 | put_partition(state, state->next++, |
351 | START_SECT(p), NR_SECTS(p)); | 354 | le32_to_cpu(p->start_sect), |
355 | le32_to_cpu(p->nr_sects)); | ||
352 | p++; | 356 | p++; |
353 | } | 357 | } |
354 | put_dev_sector(sect); | 358 | put_dev_sector(sect); |
@@ -363,7 +367,7 @@ parse_unixware(struct parsed_partitions *state, struct block_device *bdev, | |||
363 | */ | 367 | */ |
364 | static void | 368 | static void |
365 | parse_minix(struct parsed_partitions *state, struct block_device *bdev, | 369 | parse_minix(struct parsed_partitions *state, struct block_device *bdev, |
366 | u32 offset, u32 size, int origin) | 370 | sector_t offset, sector_t size, int origin) |
367 | { | 371 | { |
368 | #ifdef CONFIG_MINIX_SUBPARTITION | 372 | #ifdef CONFIG_MINIX_SUBPARTITION |
369 | Sector sect; | 373 | Sector sect; |
@@ -390,7 +394,7 @@ parse_minix(struct parsed_partitions *state, struct block_device *bdev, | |||
390 | /* add each partition in use */ | 394 | /* add each partition in use */ |
391 | if (SYS_IND(p) == MINIX_PARTITION) | 395 | if (SYS_IND(p) == MINIX_PARTITION) |
392 | put_partition(state, state->next++, | 396 | put_partition(state, state->next++, |
393 | START_SECT(p), NR_SECTS(p)); | 397 | start_sect(p), nr_sects(p)); |
394 | } | 398 | } |
395 | printk(" >\n"); | 399 | printk(" >\n"); |
396 | } | 400 | } |
@@ -401,7 +405,7 @@ parse_minix(struct parsed_partitions *state, struct block_device *bdev, | |||
401 | static struct { | 405 | static struct { |
402 | unsigned char id; | 406 | unsigned char id; |
403 | void (*parse)(struct parsed_partitions *, struct block_device *, | 407 | void (*parse)(struct parsed_partitions *, struct block_device *, |
404 | u32, u32, int); | 408 | sector_t, sector_t, int); |
405 | } subtypes[] = { | 409 | } subtypes[] = { |
406 | {FREEBSD_PARTITION, parse_freebsd}, | 410 | {FREEBSD_PARTITION, parse_freebsd}, |
407 | {NETBSD_PARTITION, parse_netbsd}, | 411 | {NETBSD_PARTITION, parse_netbsd}, |
@@ -415,7 +419,7 @@ static struct { | |||
415 | 419 | ||
416 | int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) | 420 | int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) |
417 | { | 421 | { |
418 | int sector_size = bdev_logical_block_size(bdev) / 512; | 422 | sector_t sector_size = bdev_logical_block_size(bdev) / 512; |
419 | Sector sect; | 423 | Sector sect; |
420 | unsigned char *data; | 424 | unsigned char *data; |
421 | struct partition *p; | 425 | struct partition *p; |
@@ -483,14 +487,21 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) | |||
483 | 487 | ||
484 | state->next = 5; | 488 | state->next = 5; |
485 | for (slot = 1 ; slot <= 4 ; slot++, p++) { | 489 | for (slot = 1 ; slot <= 4 ; slot++, p++) { |
486 | u32 start = START_SECT(p)*sector_size; | 490 | sector_t start = start_sect(p)*sector_size; |
487 | u32 size = NR_SECTS(p)*sector_size; | 491 | sector_t size = nr_sects(p)*sector_size; |
488 | if (!size) | 492 | if (!size) |
489 | continue; | 493 | continue; |
490 | if (is_extended_partition(p)) { | 494 | if (is_extended_partition(p)) { |
491 | /* prevent someone doing mkfs or mkswap on an | 495 | /* |
492 | extended partition, but leave room for LILO */ | 496 | * prevent someone doing mkfs or mkswap on an |
493 | put_partition(state, slot, start, size == 1 ? 1 : 2); | 497 | * extended partition, but leave room for LILO |
498 | * FIXME: this uses one logical sector for > 512b | ||
499 | * sector, although it may not be enough/proper. | ||
500 | */ | ||
501 | sector_t n = 2; | ||
502 | n = min(size, max(sector_size, n)); | ||
503 | put_partition(state, slot, start, n); | ||
504 | |||
494 | printk(" <"); | 505 | printk(" <"); |
495 | parse_extended(state, bdev, start, size); | 506 | parse_extended(state, bdev, start, size); |
496 | printk(" >"); | 507 | printk(" >"); |
@@ -513,7 +524,7 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) | |||
513 | unsigned char id = SYS_IND(p); | 524 | unsigned char id = SYS_IND(p); |
514 | int n; | 525 | int n; |
515 | 526 | ||
516 | if (!NR_SECTS(p)) | 527 | if (!nr_sects(p)) |
517 | continue; | 528 | continue; |
518 | 529 | ||
519 | for (n = 0; subtypes[n].parse && id != subtypes[n].id; n++) | 530 | for (n = 0; subtypes[n].parse && id != subtypes[n].id; n++) |
@@ -521,8 +532,8 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) | |||
521 | 532 | ||
522 | if (!subtypes[n].parse) | 533 | if (!subtypes[n].parse) |
523 | continue; | 534 | continue; |
524 | subtypes[n].parse(state, bdev, START_SECT(p)*sector_size, | 535 | subtypes[n].parse(state, bdev, start_sect(p)*sector_size, |
525 | NR_SECTS(p)*sector_size, slot); | 536 | nr_sects(p)*sector_size, slot); |
526 | } | 537 | } |
527 | put_dev_sector(sect); | 538 | put_dev_sector(sect); |
528 | return 1; | 539 | return 1; |
diff --git a/fs/proc/array.c b/fs/proc/array.c index aa8637b81028..e51f2ec2c5e5 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -68,7 +68,6 @@ | |||
68 | #include <linux/hugetlb.h> | 68 | #include <linux/hugetlb.h> |
69 | #include <linux/pagemap.h> | 69 | #include <linux/pagemap.h> |
70 | #include <linux/swap.h> | 70 | #include <linux/swap.h> |
71 | #include <linux/slab.h> | ||
72 | #include <linux/smp.h> | 71 | #include <linux/smp.h> |
73 | #include <linux/signal.h> | 72 | #include <linux/signal.h> |
74 | #include <linux/highmem.h> | 73 | #include <linux/highmem.h> |
diff --git a/fs/proc/base.c b/fs/proc/base.c index a7310841c831..7621db800a74 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -81,6 +81,7 @@ | |||
81 | #include <linux/elf.h> | 81 | #include <linux/elf.h> |
82 | #include <linux/pid_namespace.h> | 82 | #include <linux/pid_namespace.h> |
83 | #include <linux/fs_struct.h> | 83 | #include <linux/fs_struct.h> |
84 | #include <linux/slab.h> | ||
84 | #include "internal.h" | 85 | #include "internal.h" |
85 | 86 | ||
86 | /* NOTE: | 87 | /* NOTE: |
@@ -442,12 +443,13 @@ static const struct file_operations proc_lstats_operations = { | |||
442 | unsigned long badness(struct task_struct *p, unsigned long uptime); | 443 | unsigned long badness(struct task_struct *p, unsigned long uptime); |
443 | static int proc_oom_score(struct task_struct *task, char *buffer) | 444 | static int proc_oom_score(struct task_struct *task, char *buffer) |
444 | { | 445 | { |
445 | unsigned long points; | 446 | unsigned long points = 0; |
446 | struct timespec uptime; | 447 | struct timespec uptime; |
447 | 448 | ||
448 | do_posix_clock_monotonic_gettime(&uptime); | 449 | do_posix_clock_monotonic_gettime(&uptime); |
449 | read_lock(&tasklist_lock); | 450 | read_lock(&tasklist_lock); |
450 | points = badness(task->group_leader, uptime.tv_sec); | 451 | if (pid_alive(task)) |
452 | points = badness(task, uptime.tv_sec); | ||
451 | read_unlock(&tasklist_lock); | 453 | read_unlock(&tasklist_lock); |
452 | return sprintf(buffer, "%lu\n", points); | 454 | return sprintf(buffer, "%lu\n", points); |
453 | } | 455 | } |
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 08f4d71dacd7..43c127490606 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
14 | #include <linux/stat.h> | 14 | #include <linux/stat.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/mount.h> | 17 | #include <linux/mount.h> |
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/idr.h> | 19 | #include <linux/idr.h> |
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 445a02bcaab3..d35b23238fb1 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/smp_lock.h> | 19 | #include <linux/smp_lock.h> |
20 | #include <linux/sysctl.h> | 20 | #include <linux/sysctl.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <asm/system.h> | 23 | #include <asm/system.h> |
23 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index a44a7897fd4d..19979a2ce272 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/highmem.h> | 19 | #include <linux/highmem.h> |
20 | #include <linux/bootmem.h> | 20 | #include <linux/bootmem.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/slab.h> | ||
22 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
24 | #include <linux/list.h> | 25 | #include <linux/list.h> |
@@ -490,7 +491,7 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) | |||
490 | } | 491 | } |
491 | read_unlock(&kclist_lock); | 492 | read_unlock(&kclist_lock); |
492 | 493 | ||
493 | if (m == NULL) { | 494 | if (&m->list == &kclist_head) { |
494 | if (clear_user(buffer, tsz)) | 495 | if (clear_user(buffer, tsz)) |
495 | return -EFAULT; | 496 | return -EFAULT; |
496 | } else if (is_vmalloc_or_module_addr((void *)start)) { | 497 | } else if (is_vmalloc_or_module_addr((void *)start)) { |
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c index 9fe7d7ebe115..b1822dde55c2 100644 --- a/fs/proc/nommu.c +++ b/fs/proc/nommu.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/mmzone.h> | 21 | #include <linux/mmzone.h> |
22 | #include <linux/pagemap.h> | 22 | #include <linux/pagemap.h> |
23 | #include <linux/swap.h> | 23 | #include <linux/swap.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/smp.h> | 24 | #include <linux/smp.h> |
26 | #include <linux/seq_file.h> | 25 | #include <linux/seq_file.h> |
27 | #include <linux/hugetlb.h> | 26 | #include <linux/hugetlb.h> |
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c index f8650dce74fb..ce94801f48ca 100644 --- a/fs/proc/proc_devtree.c +++ b/fs/proc/proc_devtree.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/of.h> | 13 | #include <linux/of.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include <asm/prom.h> | 16 | #include <asm/prom.h> |
16 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
17 | #include "internal.h" | 18 | #include "internal.h" |
diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c index 04d1270f1c38..9020ac15baaa 100644 --- a/fs/proc/proc_net.c +++ b/fs/proc/proc_net.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/time.h> | 14 | #include <linux/time.h> |
15 | #include <linux/proc_fs.h> | 15 | #include <linux/proc_fs.h> |
16 | #include <linux/stat.h> | 16 | #include <linux/stat.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
diff --git a/fs/proc/stat.c b/fs/proc/stat.c index b9b7aad2003d..bf31b03fc275 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c | |||
@@ -1,6 +1,5 @@ | |||
1 | #include <linux/cpumask.h> | 1 | #include <linux/cpumask.h> |
2 | #include <linux/fs.h> | 2 | #include <linux/fs.h> |
3 | #include <linux/gfp.h> | ||
4 | #include <linux/init.h> | 3 | #include <linux/init.h> |
5 | #include <linux/interrupt.h> | 4 | #include <linux/interrupt.h> |
6 | #include <linux/kernel_stat.h> | 5 | #include <linux/kernel_stat.h> |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 183f8ff5f400..070553427dd5 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/seq_file.h> | 4 | #include <linux/seq_file.h> |
5 | #include <linux/highmem.h> | 5 | #include <linux/highmem.h> |
6 | #include <linux/ptrace.h> | 6 | #include <linux/ptrace.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/pagemap.h> | 8 | #include <linux/pagemap.h> |
8 | #include <linux/mempolicy.h> | 9 | #include <linux/mempolicy.h> |
9 | #include <linux/swap.h> | 10 | #include <linux/swap.h> |
@@ -406,6 +407,7 @@ static int show_smap(struct seq_file *m, void *v) | |||
406 | 407 | ||
407 | memset(&mss, 0, sizeof mss); | 408 | memset(&mss, 0, sizeof mss); |
408 | mss.vma = vma; | 409 | mss.vma = vma; |
410 | /* mmap_sem is held in m_start */ | ||
409 | if (vma->vm_mm && !is_vm_hugetlb_page(vma)) | 411 | if (vma->vm_mm && !is_vm_hugetlb_page(vma)) |
410 | walk_page_range(vma->vm_start, vma->vm_end, &smaps_walk); | 412 | walk_page_range(vma->vm_start, vma->vm_end, &smaps_walk); |
411 | 413 | ||
@@ -552,7 +554,8 @@ const struct file_operations proc_clear_refs_operations = { | |||
552 | }; | 554 | }; |
553 | 555 | ||
554 | struct pagemapread { | 556 | struct pagemapread { |
555 | u64 __user *out, *end; | 557 | int pos, len; |
558 | u64 *buffer; | ||
556 | }; | 559 | }; |
557 | 560 | ||
558 | #define PM_ENTRY_BYTES sizeof(u64) | 561 | #define PM_ENTRY_BYTES sizeof(u64) |
@@ -575,10 +578,8 @@ struct pagemapread { | |||
575 | static int add_to_pagemap(unsigned long addr, u64 pfn, | 578 | static int add_to_pagemap(unsigned long addr, u64 pfn, |
576 | struct pagemapread *pm) | 579 | struct pagemapread *pm) |
577 | { | 580 | { |
578 | if (put_user(pfn, pm->out)) | 581 | pm->buffer[pm->pos++] = pfn; |
579 | return -EFAULT; | 582 | if (pm->pos >= pm->len) |
580 | pm->out++; | ||
581 | if (pm->out >= pm->end) | ||
582 | return PM_END_OF_BUFFER; | 583 | return PM_END_OF_BUFFER; |
583 | return 0; | 584 | return 0; |
584 | } | 585 | } |
@@ -661,31 +662,18 @@ static u64 huge_pte_to_pagemap_entry(pte_t pte, int offset) | |||
661 | return pme; | 662 | return pme; |
662 | } | 663 | } |
663 | 664 | ||
664 | static int pagemap_hugetlb_range(pte_t *pte, unsigned long addr, | 665 | /* This function walks within one hugetlb entry in the single call */ |
665 | unsigned long end, struct mm_walk *walk) | 666 | static int pagemap_hugetlb_range(pte_t *pte, unsigned long hmask, |
667 | unsigned long addr, unsigned long end, | ||
668 | struct mm_walk *walk) | ||
666 | { | 669 | { |
667 | struct vm_area_struct *vma; | ||
668 | struct pagemapread *pm = walk->private; | 670 | struct pagemapread *pm = walk->private; |
669 | struct hstate *hs = NULL; | ||
670 | int err = 0; | 671 | int err = 0; |
672 | u64 pfn; | ||
671 | 673 | ||
672 | vma = find_vma(walk->mm, addr); | ||
673 | if (vma) | ||
674 | hs = hstate_vma(vma); | ||
675 | for (; addr != end; addr += PAGE_SIZE) { | 674 | for (; addr != end; addr += PAGE_SIZE) { |
676 | u64 pfn = PM_NOT_PRESENT; | 675 | int offset = (addr & ~hmask) >> PAGE_SHIFT; |
677 | 676 | pfn = huge_pte_to_pagemap_entry(*pte, offset); | |
678 | if (vma && (addr >= vma->vm_end)) { | ||
679 | vma = find_vma(walk->mm, addr); | ||
680 | if (vma) | ||
681 | hs = hstate_vma(vma); | ||
682 | } | ||
683 | |||
684 | if (vma && (vma->vm_start <= addr) && is_vm_hugetlb_page(vma)) { | ||
685 | /* calculate pfn of the "raw" page in the hugepage. */ | ||
686 | int offset = (addr & ~huge_page_mask(hs)) >> PAGE_SHIFT; | ||
687 | pfn = huge_pte_to_pagemap_entry(*pte, offset); | ||
688 | } | ||
689 | err = add_to_pagemap(addr, pfn, pm); | 677 | err = add_to_pagemap(addr, pfn, pm); |
690 | if (err) | 678 | if (err) |
691 | return err; | 679 | return err; |
@@ -720,21 +708,20 @@ static int pagemap_hugetlb_range(pte_t *pte, unsigned long addr, | |||
720 | * determine which areas of memory are actually mapped and llseek to | 708 | * determine which areas of memory are actually mapped and llseek to |
721 | * skip over unmapped regions. | 709 | * skip over unmapped regions. |
722 | */ | 710 | */ |
711 | #define PAGEMAP_WALK_SIZE (PMD_SIZE) | ||
723 | static ssize_t pagemap_read(struct file *file, char __user *buf, | 712 | static ssize_t pagemap_read(struct file *file, char __user *buf, |
724 | size_t count, loff_t *ppos) | 713 | size_t count, loff_t *ppos) |
725 | { | 714 | { |
726 | struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode); | 715 | struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode); |
727 | struct page **pages, *page; | ||
728 | unsigned long uaddr, uend; | ||
729 | struct mm_struct *mm; | 716 | struct mm_struct *mm; |
730 | struct pagemapread pm; | 717 | struct pagemapread pm; |
731 | int pagecount; | ||
732 | int ret = -ESRCH; | 718 | int ret = -ESRCH; |
733 | struct mm_walk pagemap_walk = {}; | 719 | struct mm_walk pagemap_walk = {}; |
734 | unsigned long src; | 720 | unsigned long src; |
735 | unsigned long svpfn; | 721 | unsigned long svpfn; |
736 | unsigned long start_vaddr; | 722 | unsigned long start_vaddr; |
737 | unsigned long end_vaddr; | 723 | unsigned long end_vaddr; |
724 | int copied = 0; | ||
738 | 725 | ||
739 | if (!task) | 726 | if (!task) |
740 | goto out; | 727 | goto out; |
@@ -757,35 +744,12 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, | |||
757 | if (!mm) | 744 | if (!mm) |
758 | goto out_task; | 745 | goto out_task; |
759 | 746 | ||
760 | 747 | pm.len = PM_ENTRY_BYTES * (PAGEMAP_WALK_SIZE >> PAGE_SHIFT); | |
761 | uaddr = (unsigned long)buf & PAGE_MASK; | 748 | pm.buffer = kmalloc(pm.len, GFP_TEMPORARY); |
762 | uend = (unsigned long)(buf + count); | ||
763 | pagecount = (PAGE_ALIGN(uend) - uaddr) / PAGE_SIZE; | ||
764 | ret = 0; | ||
765 | if (pagecount == 0) | ||
766 | goto out_mm; | ||
767 | pages = kcalloc(pagecount, sizeof(struct page *), GFP_KERNEL); | ||
768 | ret = -ENOMEM; | 749 | ret = -ENOMEM; |
769 | if (!pages) | 750 | if (!pm.buffer) |
770 | goto out_mm; | 751 | goto out_mm; |
771 | 752 | ||
772 | down_read(¤t->mm->mmap_sem); | ||
773 | ret = get_user_pages(current, current->mm, uaddr, pagecount, | ||
774 | 1, 0, pages, NULL); | ||
775 | up_read(¤t->mm->mmap_sem); | ||
776 | |||
777 | if (ret < 0) | ||
778 | goto out_free; | ||
779 | |||
780 | if (ret != pagecount) { | ||
781 | pagecount = ret; | ||
782 | ret = -EFAULT; | ||
783 | goto out_pages; | ||
784 | } | ||
785 | |||
786 | pm.out = (u64 __user *)buf; | ||
787 | pm.end = (u64 __user *)(buf + count); | ||
788 | |||
789 | pagemap_walk.pmd_entry = pagemap_pte_range; | 753 | pagemap_walk.pmd_entry = pagemap_pte_range; |
790 | pagemap_walk.pte_hole = pagemap_pte_hole; | 754 | pagemap_walk.pte_hole = pagemap_pte_hole; |
791 | pagemap_walk.hugetlb_entry = pagemap_hugetlb_range; | 755 | pagemap_walk.hugetlb_entry = pagemap_hugetlb_range; |
@@ -807,23 +771,36 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, | |||
807 | * user buffer is tracked in "pm", and the walk | 771 | * user buffer is tracked in "pm", and the walk |
808 | * will stop when we hit the end of the buffer. | 772 | * will stop when we hit the end of the buffer. |
809 | */ | 773 | */ |
810 | ret = walk_page_range(start_vaddr, end_vaddr, &pagemap_walk); | 774 | ret = 0; |
811 | if (ret == PM_END_OF_BUFFER) | 775 | while (count && (start_vaddr < end_vaddr)) { |
812 | ret = 0; | 776 | int len; |
813 | /* don't need mmap_sem for these, but this looks cleaner */ | 777 | unsigned long end; |
814 | *ppos += (char __user *)pm.out - buf; | 778 | |
815 | if (!ret) | 779 | pm.pos = 0; |
816 | ret = (char __user *)pm.out - buf; | 780 | end = start_vaddr + PAGEMAP_WALK_SIZE; |
817 | 781 | /* overflow ? */ | |
818 | out_pages: | 782 | if (end < start_vaddr || end > end_vaddr) |
819 | for (; pagecount; pagecount--) { | 783 | end = end_vaddr; |
820 | page = pages[pagecount-1]; | 784 | down_read(&mm->mmap_sem); |
821 | if (!PageReserved(page)) | 785 | ret = walk_page_range(start_vaddr, end, &pagemap_walk); |
822 | SetPageDirty(page); | 786 | up_read(&mm->mmap_sem); |
823 | page_cache_release(page); | 787 | start_vaddr = end; |
788 | |||
789 | len = min(count, PM_ENTRY_BYTES * pm.pos); | ||
790 | if (copy_to_user(buf, pm.buffer, len)) { | ||
791 | ret = -EFAULT; | ||
792 | goto out_free; | ||
793 | } | ||
794 | copied += len; | ||
795 | buf += len; | ||
796 | count -= len; | ||
824 | } | 797 | } |
798 | *ppos += copied; | ||
799 | if (!ret || ret == PM_END_OF_BUFFER) | ||
800 | ret = copied; | ||
801 | |||
825 | out_free: | 802 | out_free: |
826 | kfree(pages); | 803 | kfree(pm.buffer); |
827 | out_mm: | 804 | out_mm: |
828 | mmput(mm); | 805 | mmput(mm); |
829 | out_task: | 806 | out_task: |
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index 5d9fd64ef81a..46d4b5d72bd3 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/fs_struct.h> | 5 | #include <linux/fs_struct.h> |
6 | #include <linux/mount.h> | 6 | #include <linux/mount.h> |
7 | #include <linux/ptrace.h> | 7 | #include <linux/ptrace.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/seq_file.h> | 9 | #include <linux/seq_file.h> |
9 | #include "internal.h" | 10 | #include "internal.h" |
10 | 11 | ||
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index 0872afa58d39..9fbc99ec799a 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/user.h> | 12 | #include <linux/user.h> |
13 | #include <linux/elf.h> | 13 | #include <linux/elf.h> |
14 | #include <linux/elfcore.h> | 14 | #include <linux/elfcore.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/highmem.h> | 16 | #include <linux/highmem.h> |
16 | #include <linux/bootmem.h> | 17 | #include <linux/bootmem.h> |
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
diff --git a/fs/quota/netlink.c b/fs/quota/netlink.c index 2663ed90fb03..d67908b407d9 100644 --- a/fs/quota/netlink.c +++ b/fs/quota/netlink.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/quotaops.h> | 6 | #include <linux/quotaops.h> |
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/slab.h> | ||
8 | #include <net/netlink.h> | 9 | #include <net/netlink.h> |
9 | #include <net/genetlink.h> | 10 | #include <net/genetlink.h> |
10 | 11 | ||
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c index 1739a4aba25f..5ea4ad81a429 100644 --- a/fs/ramfs/file-nommu.c +++ b/fs/ramfs/file-nommu.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/pagevec.h> | 21 | #include <linux/pagevec.h> |
22 | #include <linux/mman.h> | 22 | #include <linux/mman.h> |
23 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
26 | #include "internal.h" | 27 | #include "internal.h" |
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c index a6090aa1a7c1..c94853473ca9 100644 --- a/fs/ramfs/inode.c +++ b/fs/ramfs/inode.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
36 | #include <linux/parser.h> | 36 | #include <linux/parser.h> |
37 | #include <linux/magic.h> | 37 | #include <linux/magic.h> |
38 | #include <linux/slab.h> | ||
38 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> |
39 | #include "internal.h" | 40 | #include "internal.h" |
40 | 41 | ||
diff --git a/fs/read_write.c b/fs/read_write.c index b7f4a1f94d48..113386d6fd2d 100644 --- a/fs/read_write.c +++ b/fs/read_write.c | |||
@@ -258,6 +258,7 @@ ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *pp | |||
258 | init_sync_kiocb(&kiocb, filp); | 258 | init_sync_kiocb(&kiocb, filp); |
259 | kiocb.ki_pos = *ppos; | 259 | kiocb.ki_pos = *ppos; |
260 | kiocb.ki_left = len; | 260 | kiocb.ki_left = len; |
261 | kiocb.ki_nbytes = len; | ||
261 | 262 | ||
262 | for (;;) { | 263 | for (;;) { |
263 | ret = filp->f_op->aio_read(&kiocb, &iov, 1, kiocb.ki_pos); | 264 | ret = filp->f_op->aio_read(&kiocb, &iov, 1, kiocb.ki_pos); |
@@ -313,6 +314,7 @@ ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, lof | |||
313 | init_sync_kiocb(&kiocb, filp); | 314 | init_sync_kiocb(&kiocb, filp); |
314 | kiocb.ki_pos = *ppos; | 315 | kiocb.ki_pos = *ppos; |
315 | kiocb.ki_left = len; | 316 | kiocb.ki_left = len; |
317 | kiocb.ki_nbytes = len; | ||
316 | 318 | ||
317 | for (;;) { | 319 | for (;;) { |
318 | ret = filp->f_op->aio_write(&kiocb, &iov, 1, kiocb.ki_pos); | 320 | ret = filp->f_op->aio_write(&kiocb, &iov, 1, kiocb.ki_pos); |
diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c index c094f58c7448..f8a6075abf50 100644 --- a/fs/reiserfs/dir.c +++ b/fs/reiserfs/dir.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/reiserfs_fs.h> | 8 | #include <linux/reiserfs_fs.h> |
9 | #include <linux/stat.h> | 9 | #include <linux/stat.h> |
10 | #include <linux/buffer_head.h> | 10 | #include <linux/buffer_head.h> |
11 | #include <linux/slab.h> | ||
11 | #include <asm/uaccess.h> | 12 | #include <asm/uaccess.h> |
12 | 13 | ||
13 | extern const struct reiserfs_key MIN_KEY; | 14 | extern const struct reiserfs_key MIN_KEY; |
diff --git a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c index 6591cb21edf6..1e4250bc3a6f 100644 --- a/fs/reiserfs/fix_node.c +++ b/fs/reiserfs/fix_node.c | |||
@@ -35,6 +35,7 @@ | |||
35 | **/ | 35 | **/ |
36 | 36 | ||
37 | #include <linux/time.h> | 37 | #include <linux/time.h> |
38 | #include <linux/slab.h> | ||
38 | #include <linux/string.h> | 39 | #include <linux/string.h> |
39 | #include <linux/reiserfs_fs.h> | 40 | #include <linux/reiserfs_fs.h> |
40 | #include <linux/buffer_head.h> | 41 | #include <linux/buffer_head.h> |
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index d1da94b82d8f..dc2c65e04853 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/smp_lock.h> | 11 | #include <linux/smp_lock.h> |
12 | #include <linux/pagemap.h> | 12 | #include <linux/pagemap.h> |
13 | #include <linux/highmem.h> | 13 | #include <linux/highmem.h> |
14 | #include <linux/slab.h> | ||
14 | #include <asm/uaccess.h> | 15 | #include <asm/uaccess.h> |
15 | #include <asm/unaligned.h> | 16 | #include <asm/unaligned.h> |
16 | #include <linux/buffer_head.h> | 17 | #include <linux/buffer_head.h> |
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index ba98546fabbd..19fbc810e8e7 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/blkdev.h> | 50 | #include <linux/blkdev.h> |
51 | #include <linux/backing-dev.h> | 51 | #include <linux/backing-dev.h> |
52 | #include <linux/uaccess.h> | 52 | #include <linux/uaccess.h> |
53 | #include <linux/slab.h> | ||
53 | 54 | ||
54 | #include <asm/system.h> | 55 | #include <asm/system.h> |
55 | 56 | ||
@@ -2217,6 +2218,15 @@ static int journal_read_transaction(struct super_block *sb, | |||
2217 | brelse(d_bh); | 2218 | brelse(d_bh); |
2218 | return 1; | 2219 | return 1; |
2219 | } | 2220 | } |
2221 | |||
2222 | if (bdev_read_only(sb->s_bdev)) { | ||
2223 | reiserfs_warning(sb, "clm-2076", | ||
2224 | "device is readonly, unable to replay log"); | ||
2225 | brelse(c_bh); | ||
2226 | brelse(d_bh); | ||
2227 | return -EROFS; | ||
2228 | } | ||
2229 | |||
2220 | trans_id = get_desc_trans_id(desc); | 2230 | trans_id = get_desc_trans_id(desc); |
2221 | /* now we know we've got a good transaction, and it was inside the valid time ranges */ | 2231 | /* now we know we've got a good transaction, and it was inside the valid time ranges */ |
2222 | log_blocks = kmalloc(get_desc_trans_len(desc) * | 2232 | log_blocks = kmalloc(get_desc_trans_len(desc) * |
@@ -2459,12 +2469,6 @@ static int journal_read(struct super_block *sb) | |||
2459 | goto start_log_replay; | 2469 | goto start_log_replay; |
2460 | } | 2470 | } |
2461 | 2471 | ||
2462 | if (continue_replay && bdev_read_only(sb->s_bdev)) { | ||
2463 | reiserfs_warning(sb, "clm-2076", | ||
2464 | "device is readonly, unable to replay log"); | ||
2465 | return -1; | ||
2466 | } | ||
2467 | |||
2468 | /* ok, there are transactions that need to be replayed. start with the first log block, find | 2472 | /* ok, there are transactions that need to be replayed. start with the first log block, find |
2469 | ** all the valid transactions, and pick out the oldest. | 2473 | ** all the valid transactions, and pick out the oldest. |
2470 | */ | 2474 | */ |
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index 96e4cbbfaa18..d0c43cb99ffc 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/time.h> | 14 | #include <linux/time.h> |
15 | #include <linux/bitops.h> | 15 | #include <linux/bitops.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/reiserfs_fs.h> | 17 | #include <linux/reiserfs_fs.h> |
17 | #include <linux/reiserfs_acl.h> | 18 | #include <linux/reiserfs_acl.h> |
18 | #include <linux/reiserfs_xattr.h> | 19 | #include <linux/reiserfs_xattr.h> |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 04bf5d791bda..59125fb36d42 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/vmalloc.h> | 16 | #include <linux/vmalloc.h> |
16 | #include <linux/time.h> | 17 | #include <linux/time.h> |
17 | #include <asm/uaccess.h> | 18 | #include <asm/uaccess.h> |
@@ -1618,10 +1619,8 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
1618 | save_mount_options(s, data); | 1619 | save_mount_options(s, data); |
1619 | 1620 | ||
1620 | sbi = kzalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL); | 1621 | sbi = kzalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL); |
1621 | if (!sbi) { | 1622 | if (!sbi) |
1622 | errval = -ENOMEM; | 1623 | return -ENOMEM; |
1623 | goto error_alloc; | ||
1624 | } | ||
1625 | s->s_fs_info = sbi; | 1624 | s->s_fs_info = sbi; |
1626 | /* Set default values for options: non-aggressive tails, RO on errors */ | 1625 | /* Set default values for options: non-aggressive tails, RO on errors */ |
1627 | REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_SMALLTAIL); | 1626 | REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_SMALLTAIL); |
@@ -1878,12 +1877,12 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
1878 | return (0); | 1877 | return (0); |
1879 | 1878 | ||
1880 | error: | 1879 | error: |
1881 | reiserfs_write_unlock(s); | ||
1882 | error_alloc: | ||
1883 | if (jinit_done) { /* kill the commit thread, free journal ram */ | 1880 | if (jinit_done) { /* kill the commit thread, free journal ram */ |
1884 | journal_release_error(NULL, s); | 1881 | journal_release_error(NULL, s); |
1885 | } | 1882 | } |
1886 | 1883 | ||
1884 | reiserfs_write_unlock(s); | ||
1885 | |||
1887 | reiserfs_free_bitmap_cache(s); | 1886 | reiserfs_free_bitmap_cache(s); |
1888 | if (SB_BUFFER_WITH_SB(s)) | 1887 | if (SB_BUFFER_WITH_SB(s)) |
1889 | brelse(SB_BUFFER_WITH_SB(s)); | 1888 | brelse(SB_BUFFER_WITH_SB(s)); |
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 37d034ca7d99..4f9586bb7631 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/dcache.h> | 38 | #include <linux/dcache.h> |
39 | #include <linux/namei.h> | 39 | #include <linux/namei.h> |
40 | #include <linux/errno.h> | 40 | #include <linux/errno.h> |
41 | #include <linux/gfp.h> | ||
41 | #include <linux/fs.h> | 42 | #include <linux/fs.h> |
42 | #include <linux/file.h> | 43 | #include <linux/file.h> |
43 | #include <linux/pagemap.h> | 44 | #include <linux/pagemap.h> |
diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c index dd20a7883f0f..9cdb759645a9 100644 --- a/fs/reiserfs/xattr_acl.c +++ b/fs/reiserfs/xattr_acl.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/errno.h> | 5 | #include <linux/errno.h> |
6 | #include <linux/pagemap.h> | 6 | #include <linux/pagemap.h> |
7 | #include <linux/xattr.h> | 7 | #include <linux/xattr.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/posix_acl_xattr.h> | 9 | #include <linux/posix_acl_xattr.h> |
9 | #include <linux/reiserfs_xattr.h> | 10 | #include <linux/reiserfs_xattr.h> |
10 | #include <linux/reiserfs_acl.h> | 11 | #include <linux/reiserfs_acl.h> |
diff --git a/fs/reiserfs/xattr_security.c b/fs/reiserfs/xattr_security.c index d8b5bfcbdd30..7271a477c041 100644 --- a/fs/reiserfs/xattr_security.c +++ b/fs/reiserfs/xattr_security.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/fs.h> | 3 | #include <linux/fs.h> |
4 | #include <linux/pagemap.h> | 4 | #include <linux/pagemap.h> |
5 | #include <linux/xattr.h> | 5 | #include <linux/xattr.h> |
6 | #include <linux/slab.h> | ||
6 | #include <linux/reiserfs_xattr.h> | 7 | #include <linux/reiserfs_xattr.h> |
7 | #include <linux/security.h> | 8 | #include <linux/security.h> |
8 | #include <asm/uaccess.h> | 9 | #include <asm/uaccess.h> |
@@ -76,7 +77,7 @@ int reiserfs_security_init(struct inode *dir, struct inode *inode, | |||
76 | return error; | 77 | return error; |
77 | } | 78 | } |
78 | 79 | ||
79 | if (sec->length) { | 80 | if (sec->length && reiserfs_xattrs_initialized(inode->i_sb)) { |
80 | blocks = reiserfs_xattr_jcreate_nblocks(inode) + | 81 | blocks = reiserfs_xattr_jcreate_nblocks(inode) + |
81 | reiserfs_xattr_nblocks(inode, sec->length); | 82 | reiserfs_xattr_nblocks(inode, sec->length); |
82 | /* We don't want to count the directories twice if we have | 83 | /* We don't want to count the directories twice if we have |
diff --git a/fs/signalfd.c b/fs/signalfd.c index 1dabe4ee02fe..f329849ce3c0 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/fs.h> | 23 | #include <linux/fs.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
26 | #include <linux/signal.h> | 27 | #include <linux/signal.h> |
27 | #include <linux/list.h> | 28 | #include <linux/list.h> |
diff --git a/fs/smbfs/file.c b/fs/smbfs/file.c index 92d5e8ffb639..dbf6548bbf06 100644 --- a/fs/smbfs/file.c +++ b/fs/smbfs/file.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/fcntl.h> | 13 | #include <linux/fcntl.h> |
14 | #include <linux/stat.h> | 14 | #include <linux/stat.h> |
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/slab.h> | ||
17 | #include <linux/pagemap.h> | 16 | #include <linux/pagemap.h> |
18 | #include <linux/smp_lock.h> | 17 | #include <linux/smp_lock.h> |
19 | #include <linux/net.h> | 18 | #include <linux/net.h> |
diff --git a/fs/smbfs/smbiod.c b/fs/smbfs/smbiod.c index 6bd9b691a463..0e39a924f10a 100644 --- a/fs/smbfs/smbiod.c +++ b/fs/smbfs/smbiod.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/stat.h> | 13 | #include <linux/stat.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/file.h> | 16 | #include <linux/file.h> |
18 | #include <linux/dcache.h> | 17 | #include <linux/dcache.h> |
diff --git a/fs/smbfs/symlink.c b/fs/smbfs/symlink.c index 00b2909bd469..54350b59046b 100644 --- a/fs/smbfs/symlink.c +++ b/fs/smbfs/symlink.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/pagemap.h> | 15 | #include <linux/pagemap.h> |
16 | #include <linux/net.h> | 16 | #include <linux/net.h> |
17 | #include <linux/namei.h> | 17 | #include <linux/namei.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
20 | #include <asm/system.h> | 21 | #include <asm/system.h> |
diff --git a/fs/splice.c b/fs/splice.c index 39208663aaf1..9313b6124a2e 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/syscalls.h> | 30 | #include <linux/syscalls.h> |
31 | #include <linux/uio.h> | 31 | #include <linux/uio.h> |
32 | #include <linux/security.h> | 32 | #include <linux/security.h> |
33 | #include <linux/gfp.h> | ||
33 | 34 | ||
34 | /* | 35 | /* |
35 | * Attempt to steal a page from a pipe buffer. This should perhaps go into | 36 | * Attempt to steal a page from a pipe buffer. This should perhaps go into |
diff --git a/fs/squashfs/symlink.c b/fs/squashfs/symlink.c index e80be2022a7f..32b911f4ee39 100644 --- a/fs/squashfs/symlink.c +++ b/fs/squashfs/symlink.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/fs.h> | 33 | #include <linux/fs.h> |
34 | #include <linux/vfs.h> | 34 | #include <linux/vfs.h> |
35 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
36 | #include <linux/slab.h> | ||
37 | #include <linux/string.h> | 36 | #include <linux/string.h> |
38 | #include <linux/pagemap.h> | 37 | #include <linux/pagemap.h> |
39 | 38 | ||
diff --git a/fs/squashfs/zlib_wrapper.c b/fs/squashfs/zlib_wrapper.c index 4dd70e04333b..15a03d0fb9f3 100644 --- a/fs/squashfs/zlib_wrapper.c +++ b/fs/squashfs/zlib_wrapper.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
26 | #include <linux/buffer_head.h> | 26 | #include <linux/buffer_head.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/zlib.h> | 28 | #include <linux/zlib.h> |
28 | 29 | ||
29 | #include "squashfs_fs.h" | 30 | #include "squashfs_fs.h" |
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/file.h> | 6 | #include <linux/file.h> |
7 | #include <linux/fs.h> | 7 | #include <linux/fs.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/module.h> | 9 | #include <linux/module.h> |
9 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
10 | #include <linux/writeback.h> | 11 | #include <linux/writeback.h> |
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 082daaecac1b..a4a0a9419711 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/capability.h> | 18 | #include <linux/capability.h> |
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/xattr.h> | 22 | #include <linux/xattr.h> |
22 | #include <linux/security.h> | 23 | #include <linux/security.h> |
23 | #include "sysfs.h" | 24 | #include "sysfs.h" |
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 0cb10884a2fc..776137828dca 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/magic.h> | 20 | #include <linux/magic.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include "sysfs.h" | 23 | #include "sysfs.h" |
23 | 24 | ||
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index 1b9a3a1e8a17..b93ec51fa7ac 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/gfp.h> | ||
14 | #include <linux/mount.h> | 15 | #include <linux/mount.h> |
15 | #include <linux/module.h> | 16 | #include <linux/module.h> |
16 | #include <linux/kobject.h> | 17 | #include <linux/kobject.h> |
diff --git a/fs/timerfd.c b/fs/timerfd.c index 1bfc95ad5f71..98158de91d24 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/list.h> | 18 | #include <linux/list.h> |
18 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
19 | #include <linux/time.h> | 20 | #include <linux/time.h> |
diff --git a/fs/ubifs/commit.c b/fs/ubifs/commit.c index 4775af401167..37fa7ed062d8 100644 --- a/fs/ubifs/commit.c +++ b/fs/ubifs/commit.c | |||
@@ -45,6 +45,7 @@ | |||
45 | 45 | ||
46 | #include <linux/freezer.h> | 46 | #include <linux/freezer.h> |
47 | #include <linux/kthread.h> | 47 | #include <linux/kthread.h> |
48 | #include <linux/slab.h> | ||
48 | #include "ubifs.h" | 49 | #include "ubifs.h" |
49 | 50 | ||
50 | /** | 51 | /** |
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index 90492327b383..c2a68baa782f 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/moduleparam.h> | 34 | #include <linux/moduleparam.h> |
35 | #include <linux/debugfs.h> | 35 | #include <linux/debugfs.h> |
36 | #include <linux/math64.h> | 36 | #include <linux/math64.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #ifdef CONFIG_UBIFS_FS_DEBUG | 39 | #ifdef CONFIG_UBIFS_FS_DEBUG |
39 | 40 | ||
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index e26c02ab6cd5..5692cf72b807 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include "ubifs.h" | 52 | #include "ubifs.h" |
53 | #include <linux/mount.h> | 53 | #include <linux/mount.h> |
54 | #include <linux/namei.h> | 54 | #include <linux/namei.h> |
55 | #include <linux/slab.h> | ||
55 | 56 | ||
56 | static int read_block(struct inode *inode, void *addr, unsigned int block, | 57 | static int read_block(struct inode *inode, void *addr, unsigned int block, |
57 | struct ubifs_data_node *dn) | 58 | struct ubifs_data_node *dn) |
diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c index e5a3d8e96bb7..918d1582ca05 100644 --- a/fs/ubifs/gc.c +++ b/fs/ubifs/gc.c | |||
@@ -53,6 +53,7 @@ | |||
53 | * good, and GC takes extra care when moving them. | 53 | * good, and GC takes extra care when moving them. |
54 | */ | 54 | */ |
55 | 55 | ||
56 | #include <linux/slab.h> | ||
56 | #include <linux/pagemap.h> | 57 | #include <linux/pagemap.h> |
57 | #include <linux/list_sort.h> | 58 | #include <linux/list_sort.h> |
58 | #include "ubifs.h" | 59 | #include "ubifs.h" |
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c index e589fedaf1ef..77d5cf4a7547 100644 --- a/fs/ubifs/io.c +++ b/fs/ubifs/io.c | |||
@@ -51,6 +51,7 @@ | |||
51 | */ | 51 | */ |
52 | 52 | ||
53 | #include <linux/crc32.h> | 53 | #include <linux/crc32.h> |
54 | #include <linux/slab.h> | ||
54 | #include "ubifs.h" | 55 | #include "ubifs.h" |
55 | 56 | ||
56 | /** | 57 | /** |
diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c index b2792e84d245..ad7f67b827ea 100644 --- a/fs/ubifs/lpt.c +++ b/fs/ubifs/lpt.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include "ubifs.h" | 46 | #include "ubifs.h" |
47 | #include <linux/crc16.h> | 47 | #include <linux/crc16.h> |
48 | #include <linux/math64.h> | 48 | #include <linux/math64.h> |
49 | #include <linux/slab.h> | ||
49 | 50 | ||
50 | /** | 51 | /** |
51 | * do_calc_lpt_geom - calculate sizes for the LPT area. | 52 | * do_calc_lpt_geom - calculate sizes for the LPT area. |
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c index 8cbfb8248025..13cb7a4237bf 100644 --- a/fs/ubifs/lpt_commit.c +++ b/fs/ubifs/lpt_commit.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/crc16.h> | 28 | #include <linux/crc16.h> |
29 | #include <linux/slab.h> | ||
29 | #include "ubifs.h" | 30 | #include "ubifs.h" |
30 | 31 | ||
31 | /** | 32 | /** |
diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index 868a55ee080f..109c6ea03bb5 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c | |||
@@ -31,6 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/crc32.h> | 33 | #include <linux/crc32.h> |
34 | #include <linux/slab.h> | ||
34 | #include "ubifs.h" | 35 | #include "ubifs.h" |
35 | 36 | ||
36 | /** | 37 | /** |
diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c index 57085e43320f..96cb62c8a9dd 100644 --- a/fs/ubifs/sb.c +++ b/fs/ubifs/sb.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "ubifs.h" | 29 | #include "ubifs.h" |
30 | #include <linux/slab.h> | ||
30 | #include <linux/random.h> | 31 | #include <linux/random.h> |
31 | #include <linux/math64.h> | 32 | #include <linux/math64.h> |
32 | 33 | ||
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c index e5b1a7d00fa0..2194915220e5 100644 --- a/fs/ubifs/tnc.c +++ b/fs/ubifs/tnc.c | |||
@@ -31,6 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/crc32.h> | 33 | #include <linux/crc32.h> |
34 | #include <linux/slab.h> | ||
34 | #include "ubifs.h" | 35 | #include "ubifs.h" |
35 | 36 | ||
36 | /* | 37 | /* |
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index b2d976366a46..bd2542dad014 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/fs.h> | 28 | #include <linux/fs.h> |
29 | #include <linux/err.h> | 29 | #include <linux/err.h> |
30 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
32 | #include <linux/spinlock.h> | 33 | #include <linux/spinlock.h> |
33 | #include <linux/mutex.h> | 34 | #include <linux/mutex.h> |
diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c index 195830f47569..c74400f88fe0 100644 --- a/fs/ubifs/xattr.c +++ b/fs/ubifs/xattr.c | |||
@@ -56,6 +56,7 @@ | |||
56 | */ | 56 | */ |
57 | 57 | ||
58 | #include "ubifs.h" | 58 | #include "ubifs.h" |
59 | #include <linux/slab.h> | ||
59 | #include <linux/xattr.h> | 60 | #include <linux/xattr.h> |
60 | #include <linux/posix_acl_xattr.h> | 61 | #include <linux/posix_acl_xattr.h> |
61 | 62 | ||
diff --git a/fs/udf/partition.c b/fs/udf/partition.c index 4b540ee632d5..745eb209be0c 100644 --- a/fs/udf/partition.c +++ b/fs/udf/partition.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
26 | #include <linux/string.h> | 26 | #include <linux/string.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/buffer_head.h> | 27 | #include <linux/buffer_head.h> |
29 | 28 | ||
30 | uint32_t udf_get_pblock(struct super_block *sb, uint32_t block, | 29 | uint32_t udf_get_pblock(struct super_block *sb, uint32_t block, |
diff --git a/fs/udf/symlink.c b/fs/udf/symlink.c index 852e91845688..16064787d2b7 100644 --- a/fs/udf/symlink.c +++ b/fs/udf/symlink.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/time.h> | 26 | #include <linux/time.h> |
27 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
28 | #include <linux/stat.h> | 28 | #include <linux/stat.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/pagemap.h> | 29 | #include <linux/pagemap.h> |
31 | #include <linux/smp_lock.h> | 30 | #include <linux/smp_lock.h> |
32 | #include <linux/buffer_head.h> | 31 | #include <linux/buffer_head.h> |
diff --git a/fs/udf/unicode.c b/fs/udf/unicode.c index cefa8c8913e6..d03a90b6ad69 100644 --- a/fs/udf/unicode.c +++ b/fs/udf/unicode.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/string.h> /* for memset */ | 24 | #include <linux/string.h> /* for memset */ |
25 | #include <linux/nls.h> | 25 | #include <linux/nls.h> |
26 | #include <linux/crc-itu-t.h> | 26 | #include <linux/crc-itu-t.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | #include "udf_sb.h" | 29 | #include "udf_sb.h" |
29 | 30 | ||
diff --git a/fs/xattr_acl.c b/fs/xattr_acl.c index 05ac0fe9c4d3..8d5a506c82eb 100644 --- a/fs/xattr_acl.c +++ b/fs/xattr_acl.c | |||
@@ -6,9 +6,9 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/slab.h> | ||
10 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
11 | #include <linux/posix_acl_xattr.h> | 10 | #include <linux/posix_acl_xattr.h> |
11 | #include <linux/gfp.h> | ||
12 | 12 | ||
13 | 13 | ||
14 | /* | 14 | /* |
diff --git a/fs/xfs/linux-2.6/kmem.c b/fs/xfs/linux-2.6/kmem.c index bc7405585def..666c9db48eb6 100644 --- a/fs/xfs/linux-2.6/kmem.c +++ b/fs/xfs/linux-2.6/kmem.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/highmem.h> | 19 | #include <linux/highmem.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/swap.h> | 21 | #include <linux/swap.h> |
21 | #include <linux/blkdev.h> | 22 | #include <linux/blkdev.h> |
22 | #include <linux/backing-dev.h> | 23 | #include <linux/backing-dev.h> |
diff --git a/fs/xfs/linux-2.6/xfs_acl.c b/fs/xfs/linux-2.6/xfs_acl.c index bf85bbe4a9ae..a7bc925c4d60 100644 --- a/fs/xfs/linux-2.6/xfs_acl.c +++ b/fs/xfs/linux-2.6/xfs_acl.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include "xfs_inode.h" | 22 | #include "xfs_inode.h" |
23 | #include "xfs_vnodeops.h" | 23 | #include "xfs_vnodeops.h" |
24 | #include "xfs_trace.h" | 24 | #include "xfs_trace.h" |
25 | #include <linux/slab.h> | ||
25 | #include <linux/xattr.h> | 26 | #include <linux/xattr.h> |
26 | #include <linux/posix_acl_xattr.h> | 27 | #include <linux/posix_acl_xattr.h> |
27 | 28 | ||
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 99628508cb11..0f8b9968a803 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "xfs_vnodeops.h" | 40 | #include "xfs_vnodeops.h" |
41 | #include "xfs_trace.h" | 41 | #include "xfs_trace.h" |
42 | #include "xfs_bmap.h" | 42 | #include "xfs_bmap.h" |
43 | #include <linux/gfp.h> | ||
43 | #include <linux/mpage.h> | 44 | #include <linux/mpage.h> |
44 | #include <linux/pagevec.h> | 45 | #include <linux/pagevec.h> |
45 | #include <linux/writeback.h> | 46 | #include <linux/writeback.h> |
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index bd111b7e1daa..44c2b0ef9a41 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include "xfs.h" | 18 | #include "xfs.h" |
19 | #include <linux/stddef.h> | 19 | #include <linux/stddef.h> |
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/gfp.h> |
22 | #include <linux/pagemap.h> | 22 | #include <linux/pagemap.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/vmalloc.h> | 24 | #include <linux/vmalloc.h> |
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index 4ea1ee18aded..7b26cc2fd284 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/mount.h> | 58 | #include <linux/mount.h> |
59 | #include <linux/namei.h> | 59 | #include <linux/namei.h> |
60 | #include <linux/pagemap.h> | 60 | #include <linux/pagemap.h> |
61 | #include <linux/slab.h> | ||
61 | #include <linux/exportfs.h> | 62 | #include <linux/exportfs.h> |
62 | 63 | ||
63 | /* | 64 | /* |
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c index 0bf6d61f0528..593c05b4df8d 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.c +++ b/fs/xfs/linux-2.6/xfs_ioctl32.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/compat.h> | 18 | #include <linux/compat.h> |
19 | #include <linux/ioctl.h> | 19 | #include <linux/ioctl.h> |
20 | #include <linux/mount.h> | 20 | #include <linux/mount.h> |
21 | #include <linux/slab.h> | ||
21 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
22 | #include "xfs.h" | 23 | #include "xfs.h" |
23 | #include "xfs_fs.h" | 24 | #include "xfs_fs.h" |
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 61a99608731e..e65a7937f3a4 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include <linux/security.h> | 56 | #include <linux/security.h> |
57 | #include <linux/falloc.h> | 57 | #include <linux/falloc.h> |
58 | #include <linux/fiemap.h> | 58 | #include <linux/fiemap.h> |
59 | #include <linux/slab.h> | ||
59 | 60 | ||
60 | /* | 61 | /* |
61 | * Bring the timestamps in the XFS inode uptodate. | 62 | * Bring the timestamps in the XFS inode uptodate. |
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 71345a370d9f..52e06b487ced 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -61,6 +61,7 @@ | |||
61 | 61 | ||
62 | #include <linux/namei.h> | 62 | #include <linux/namei.h> |
63 | #include <linux/init.h> | 63 | #include <linux/init.h> |
64 | #include <linux/slab.h> | ||
64 | #include <linux/mount.h> | 65 | #include <linux/mount.h> |
65 | #include <linux/mempool.h> | 66 | #include <linux/mempool.h> |
66 | #include <linux/writeback.h> | 67 | #include <linux/writeback.h> |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 3a4767c01c5f..4f7b44866b76 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -65,6 +65,8 @@ | |||
65 | #define ACPI_VIDEO_HID "LNXVIDEO" | 65 | #define ACPI_VIDEO_HID "LNXVIDEO" |
66 | #define ACPI_BAY_HID "LNXIOBAY" | 66 | #define ACPI_BAY_HID "LNXIOBAY" |
67 | #define ACPI_DOCK_HID "LNXDOCK" | 67 | #define ACPI_DOCK_HID "LNXDOCK" |
68 | /* Quirk for broken IBM BIOSes */ | ||
69 | #define ACPI_SMBUS_IBM_HID "SMBUSIBM" | ||
68 | 70 | ||
69 | /* | 71 | /* |
70 | * For fixed hardware buttons, we fabricate acpi_devices with HID | 72 | * For fixed hardware buttons, we fabricate acpi_devices with HID |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 4a3c4e441027..2f3b3a00b7a3 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -55,6 +55,7 @@ | |||
55 | #include <linux/mm.h> | 55 | #include <linux/mm.h> |
56 | #include <linux/cdev.h> | 56 | #include <linux/cdev.h> |
57 | #include <linux/mutex.h> | 57 | #include <linux/mutex.h> |
58 | #include <linux/slab.h> | ||
58 | #if defined(__alpha__) || defined(__powerpc__) | 59 | #if defined(__alpha__) || defined(__powerpc__) |
59 | #include <asm/pgtable.h> /* For pte_wrprotect */ | 60 | #include <asm/pgtable.h> /* For pte_wrprotect */ |
60 | #endif | 61 | #endif |
@@ -1545,39 +1546,7 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map) | |||
1545 | { | 1546 | { |
1546 | } | 1547 | } |
1547 | 1548 | ||
1548 | 1549 | #include "drm_mem_util.h" | |
1549 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | ||
1550 | { | ||
1551 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
1552 | return NULL; | ||
1553 | |||
1554 | if (size * nmemb <= PAGE_SIZE) | ||
1555 | return kcalloc(nmemb, size, GFP_KERNEL); | ||
1556 | |||
1557 | return __vmalloc(size * nmemb, | ||
1558 | GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL); | ||
1559 | } | ||
1560 | |||
1561 | /* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */ | ||
1562 | static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) | ||
1563 | { | ||
1564 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
1565 | return NULL; | ||
1566 | |||
1567 | if (size * nmemb <= PAGE_SIZE) | ||
1568 | return kmalloc(nmemb * size, GFP_KERNEL); | ||
1569 | |||
1570 | return __vmalloc(size * nmemb, | ||
1571 | GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL); | ||
1572 | } | ||
1573 | |||
1574 | static __inline void drm_free_large(void *ptr) | ||
1575 | { | ||
1576 | if (!is_vmalloc_addr(ptr)) | ||
1577 | return kfree(ptr); | ||
1578 | |||
1579 | vfree(ptr); | ||
1580 | } | ||
1581 | /*@}*/ | 1550 | /*@}*/ |
1582 | 1551 | ||
1583 | #endif /* __KERNEL__ */ | 1552 | #endif /* __KERNEL__ */ |
diff --git a/include/drm/drm_mem_util.h b/include/drm/drm_mem_util.h new file mode 100644 index 000000000000..6bd325fedc87 --- /dev/null +++ b/include/drm/drm_mem_util.h | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | * Copyright © 2008 Intel Corporation | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice (including the next | ||
12 | * paragraph) shall be included in all copies or substantial portions of the | ||
13 | * Software. | ||
14 | * | ||
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
21 | * IN THE SOFTWARE. | ||
22 | * | ||
23 | * Authors: | ||
24 | * Jesse Barnes <jbarnes@virtuousgeek.org> | ||
25 | * | ||
26 | */ | ||
27 | #ifndef _DRM_MEM_UTIL_H_ | ||
28 | #define _DRM_MEM_UTIL_H_ | ||
29 | |||
30 | #include <linux/vmalloc.h> | ||
31 | |||
32 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | ||
33 | { | ||
34 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
35 | return NULL; | ||
36 | |||
37 | if (size * nmemb <= PAGE_SIZE) | ||
38 | return kcalloc(nmemb, size, GFP_KERNEL); | ||
39 | |||
40 | return __vmalloc(size * nmemb, | ||
41 | GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL); | ||
42 | } | ||
43 | |||
44 | /* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */ | ||
45 | static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) | ||
46 | { | ||
47 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
48 | return NULL; | ||
49 | |||
50 | if (size * nmemb <= PAGE_SIZE) | ||
51 | return kmalloc(nmemb * size, GFP_KERNEL); | ||
52 | |||
53 | return __vmalloc(size * nmemb, | ||
54 | GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL); | ||
55 | } | ||
56 | |||
57 | static __inline void drm_free_large(void *ptr) | ||
58 | { | ||
59 | if (!is_vmalloc_addr(ptr)) | ||
60 | return kfree(ptr); | ||
61 | |||
62 | vfree(ptr); | ||
63 | } | ||
64 | |||
65 | #endif | ||
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 676104b7818c..04a6ebc27b96 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -410,6 +410,7 @@ | |||
410 | {0x1002, 0x9712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 410 | {0x1002, 0x9712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
411 | {0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 411 | {0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
412 | {0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 412 | {0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
413 | {0x1002, 0x9715, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
413 | {0, 0, 0} | 414 | {0, 0, 0} |
414 | 415 | ||
415 | #define r128_PCI_IDS \ | 416 | #define r128_PCI_IDS \ |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index e3f1b4a4b601..e929c27ede22 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
@@ -115,7 +115,6 @@ struct ttm_backend { | |||
115 | struct ttm_backend_func *func; | 115 | struct ttm_backend_func *func; |
116 | }; | 116 | }; |
117 | 117 | ||
118 | #define TTM_PAGE_FLAG_VMALLOC (1 << 0) | ||
119 | #define TTM_PAGE_FLAG_USER (1 << 1) | 118 | #define TTM_PAGE_FLAG_USER (1 << 1) |
120 | #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) | 119 | #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) |
121 | #define TTM_PAGE_FLAG_WRITE (1 << 3) | 120 | #define TTM_PAGE_FLAG_WRITE (1 << 3) |
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 6816be6c3f77..8b1038607831 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
@@ -14,6 +14,9 @@ | |||
14 | #ifndef ASMARM_AMBA_H | 14 | #ifndef ASMARM_AMBA_H |
15 | #define ASMARM_AMBA_H | 15 | #define ASMARM_AMBA_H |
16 | 16 | ||
17 | #include <linux/device.h> | ||
18 | #include <linux/resource.h> | ||
19 | |||
17 | #define AMBA_NR_IRQS 2 | 20 | #define AMBA_NR_IRQS 2 |
18 | 21 | ||
19 | struct amba_device { | 22 | struct amba_device { |
diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h index b4fbd9862606..5ddd9ad4b19c 100644 --- a/include/linux/amba/pl061.h +++ b/include/linux/amba/pl061.h | |||
@@ -1,3 +1,5 @@ | |||
1 | #include <linux/types.h> | ||
2 | |||
1 | /* platform data for the PL061 GPIO driver */ | 3 | /* platform data for the PL061 GPIO driver */ |
2 | 4 | ||
3 | struct pl061_platform_data { | 5 | struct pl061_platform_data { |
diff --git a/include/linux/ata.h b/include/linux/ata.h index b4c85e2adef5..700c5b9b3583 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -1025,8 +1025,8 @@ static inline int ata_ok(u8 status) | |||
1025 | 1025 | ||
1026 | static inline int lba_28_ok(u64 block, u32 n_block) | 1026 | static inline int lba_28_ok(u64 block, u32 n_block) |
1027 | { | 1027 | { |
1028 | /* check the ending block number */ | 1028 | /* check the ending block number: must be LESS THAN 0x0fffffff */ |
1029 | return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256); | 1029 | return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256); |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | static inline int lba_48_ok(u64 block, u32 n_block) | 1032 | static inline int lba_48_ok(u64 block, u32 n_block) |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index b79389879238..b796eab5ca75 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -21,9 +21,6 @@ | |||
21 | (bit) < (size); \ | 21 | (bit) < (size); \ |
22 | (bit) = find_next_bit((addr), (size), (bit) + 1)) | 22 | (bit) = find_next_bit((addr), (size), (bit) + 1)) |
23 | 23 | ||
24 | /* Temporary */ | ||
25 | #define for_each_bit(bit, addr, size) for_each_set_bit(bit, addr, size) | ||
26 | |||
27 | static __inline__ int get_bitmask_order(unsigned int count) | 24 | static __inline__ int get_bitmask_order(unsigned int count) |
28 | { | 25 | { |
29 | int order; | 26 | int order; |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ebd22dbed861..6690e8bae7bb 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -158,7 +158,6 @@ enum rq_flag_bits { | |||
158 | struct request { | 158 | struct request { |
159 | struct list_head queuelist; | 159 | struct list_head queuelist; |
160 | struct call_single_data csd; | 160 | struct call_single_data csd; |
161 | int cpu; | ||
162 | 161 | ||
163 | struct request_queue *q; | 162 | struct request_queue *q; |
164 | 163 | ||
@@ -166,9 +165,11 @@ struct request { | |||
166 | enum rq_cmd_type_bits cmd_type; | 165 | enum rq_cmd_type_bits cmd_type; |
167 | unsigned long atomic_flags; | 166 | unsigned long atomic_flags; |
168 | 167 | ||
168 | int cpu; | ||
169 | |||
169 | /* the following two fields are internal, NEVER access directly */ | 170 | /* the following two fields are internal, NEVER access directly */ |
170 | sector_t __sector; /* sector cursor */ | ||
171 | unsigned int __data_len; /* total data len */ | 171 | unsigned int __data_len; /* total data len */ |
172 | sector_t __sector; /* sector cursor */ | ||
172 | 173 | ||
173 | struct bio *bio; | 174 | struct bio *bio; |
174 | struct bio *biotail; | 175 | struct bio *biotail; |
@@ -201,20 +202,20 @@ struct request { | |||
201 | 202 | ||
202 | unsigned short ioprio; | 203 | unsigned short ioprio; |
203 | 204 | ||
205 | int ref_count; | ||
206 | |||
204 | void *special; /* opaque pointer available for LLD use */ | 207 | void *special; /* opaque pointer available for LLD use */ |
205 | char *buffer; /* kaddr of the current segment if available */ | 208 | char *buffer; /* kaddr of the current segment if available */ |
206 | 209 | ||
207 | int tag; | 210 | int tag; |
208 | int errors; | 211 | int errors; |
209 | 212 | ||
210 | int ref_count; | ||
211 | |||
212 | /* | 213 | /* |
213 | * when request is used as a packet command carrier | 214 | * when request is used as a packet command carrier |
214 | */ | 215 | */ |
215 | unsigned short cmd_len; | ||
216 | unsigned char __cmd[BLK_MAX_CDB]; | 216 | unsigned char __cmd[BLK_MAX_CDB]; |
217 | unsigned char *cmd; | 217 | unsigned char *cmd; |
218 | unsigned short cmd_len; | ||
218 | 219 | ||
219 | unsigned int extra_len; /* length of alignment and padding */ | 220 | unsigned int extra_len; /* length of alignment and padding */ |
220 | unsigned int sense_len; | 221 | unsigned int sense_len; |
@@ -921,26 +922,7 @@ extern void blk_cleanup_queue(struct request_queue *); | |||
921 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); | 922 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); |
922 | extern void blk_queue_bounce_limit(struct request_queue *, u64); | 923 | extern void blk_queue_bounce_limit(struct request_queue *, u64); |
923 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); | 924 | extern void blk_queue_max_hw_sectors(struct request_queue *, unsigned int); |
924 | |||
925 | /* Temporary compatibility wrapper */ | ||
926 | static inline void blk_queue_max_sectors(struct request_queue *q, unsigned int max) | ||
927 | { | ||
928 | blk_queue_max_hw_sectors(q, max); | ||
929 | } | ||
930 | |||
931 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); | 925 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); |
932 | |||
933 | static inline void blk_queue_max_phys_segments(struct request_queue *q, unsigned short max) | ||
934 | { | ||
935 | blk_queue_max_segments(q, max); | ||
936 | } | ||
937 | |||
938 | static inline void blk_queue_max_hw_segments(struct request_queue *q, unsigned short max) | ||
939 | { | ||
940 | blk_queue_max_segments(q, max); | ||
941 | } | ||
942 | |||
943 | |||
944 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); | 926 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); |
945 | extern void blk_queue_max_discard_sectors(struct request_queue *q, | 927 | extern void blk_queue_max_discard_sectors(struct request_queue *q, |
946 | unsigned int max_discard_sectors); | 928 | unsigned int max_discard_sectors); |
@@ -1030,11 +1012,6 @@ static inline int sb_issue_discard(struct super_block *sb, | |||
1030 | 1012 | ||
1031 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); | 1013 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); |
1032 | 1014 | ||
1033 | #define MAX_PHYS_SEGMENTS 128 | ||
1034 | #define MAX_HW_SEGMENTS 128 | ||
1035 | #define SAFE_MAX_SECTORS 255 | ||
1036 | #define MAX_SEGMENT_SIZE 65536 | ||
1037 | |||
1038 | enum blk_default_limits { | 1015 | enum blk_default_limits { |
1039 | BLK_MAX_SEGMENTS = 128, | 1016 | BLK_MAX_SEGMENTS = 128, |
1040 | BLK_SAFE_MAX_SECTORS = 255, | 1017 | BLK_SAFE_MAX_SECTORS = 255, |
diff --git a/include/linux/circ_buf.h b/include/linux/circ_buf.h index a2ed0591fb19..90f2471dc6f2 100644 --- a/include/linux/circ_buf.h +++ b/include/linux/circ_buf.h | |||
@@ -1,3 +1,7 @@ | |||
1 | /* | ||
2 | * See Documentation/circular-buffers.txt for more information. | ||
3 | */ | ||
4 | |||
1 | #ifndef _LINUX_CIRC_BUF_H | 5 | #ifndef _LINUX_CIRC_BUF_H |
2 | #define _LINUX_CIRC_BUF_H 1 | 6 | #define _LINUX_CIRC_BUF_H 1 |
3 | 7 | ||
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 0cf725bdd2a1..fc53492b6ad7 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -73,6 +73,7 @@ enum clock_event_nofitiers { | |||
73 | * @list: list head for the management code | 73 | * @list: list head for the management code |
74 | * @mode: operating mode assigned by the management code | 74 | * @mode: operating mode assigned by the management code |
75 | * @next_event: local storage for the next event in oneshot mode | 75 | * @next_event: local storage for the next event in oneshot mode |
76 | * @retries: number of forced programming retries | ||
76 | */ | 77 | */ |
77 | struct clock_event_device { | 78 | struct clock_event_device { |
78 | const char *name; | 79 | const char *name; |
@@ -93,6 +94,7 @@ struct clock_event_device { | |||
93 | struct list_head list; | 94 | struct list_head list; |
94 | enum clock_event_mode mode; | 95 | enum clock_event_mode mode; |
95 | ktime_t next_event; | 96 | ktime_t next_event; |
97 | unsigned long retries; | ||
96 | }; | 98 | }; |
97 | 99 | ||
98 | /* | 100 | /* |
diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h index 5076fe0c8a96..6cee17c22313 100644 --- a/include/linux/delayacct.h +++ b/include/linux/delayacct.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #define _LINUX_DELAYACCT_H | 18 | #define _LINUX_DELAYACCT_H |
19 | 19 | ||
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | /* | 23 | /* |
23 | * Per-task flags relevant to delay accounting | 24 | * Per-task flags relevant to delay accounting |
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 78962272338a..4341b1a97a34 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
@@ -56,7 +56,7 @@ extern const char *drbd_buildtag(void); | |||
56 | #define REL_VERSION "8.3.7" | 56 | #define REL_VERSION "8.3.7" |
57 | #define API_VERSION 88 | 57 | #define API_VERSION 88 |
58 | #define PRO_VERSION_MIN 86 | 58 | #define PRO_VERSION_MIN 86 |
59 | #define PRO_VERSION_MAX 91 | 59 | #define PRO_VERSION_MAX 92 |
60 | 60 | ||
61 | 61 | ||
62 | enum drbd_io_error_p { | 62 | enum drbd_io_error_p { |
diff --git a/include/linux/drbd_nl.h b/include/linux/drbd_nl.h index a4d82f895994..f7431a4ca608 100644 --- a/include/linux/drbd_nl.h +++ b/include/linux/drbd_nl.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #endif | 12 | #endif |
13 | 13 | ||
14 | NL_PACKET(primary, 1, | 14 | NL_PACKET(primary, 1, |
15 | NL_BIT( 1, T_MAY_IGNORE, overwrite_peer) | 15 | NL_BIT( 1, T_MAY_IGNORE, primary_force) |
16 | ) | 16 | ) |
17 | 17 | ||
18 | NL_PACKET(secondary, 2, ) | 18 | NL_PACKET(secondary, 2, ) |
@@ -63,6 +63,7 @@ NL_PACKET(net_conf, 5, | |||
63 | NL_BIT( 41, T_MAY_IGNORE, always_asbp) | 63 | NL_BIT( 41, T_MAY_IGNORE, always_asbp) |
64 | NL_BIT( 61, T_MAY_IGNORE, no_cork) | 64 | NL_BIT( 61, T_MAY_IGNORE, no_cork) |
65 | NL_BIT( 62, T_MANDATORY, auto_sndbuf_size) | 65 | NL_BIT( 62, T_MANDATORY, auto_sndbuf_size) |
66 | NL_BIT( 70, T_MANDATORY, dry_run) | ||
66 | ) | 67 | ) |
67 | 68 | ||
68 | NL_PACKET(disconnect, 6, ) | 69 | NL_PACKET(disconnect, 6, ) |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index cac84b006667..5f494b465097 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -565,17 +565,17 @@ enum { | |||
565 | 565 | ||
566 | static inline int ext3_test_inode_state(struct inode *inode, int bit) | 566 | static inline int ext3_test_inode_state(struct inode *inode, int bit) |
567 | { | 567 | { |
568 | return test_bit(bit, &EXT3_I(inode)->i_state); | 568 | return test_bit(bit, &EXT3_I(inode)->i_state_flags); |
569 | } | 569 | } |
570 | 570 | ||
571 | static inline void ext3_set_inode_state(struct inode *inode, int bit) | 571 | static inline void ext3_set_inode_state(struct inode *inode, int bit) |
572 | { | 572 | { |
573 | set_bit(bit, &EXT3_I(inode)->i_state); | 573 | set_bit(bit, &EXT3_I(inode)->i_state_flags); |
574 | } | 574 | } |
575 | 575 | ||
576 | static inline void ext3_clear_inode_state(struct inode *inode, int bit) | 576 | static inline void ext3_clear_inode_state(struct inode *inode, int bit) |
577 | { | 577 | { |
578 | clear_bit(bit, &EXT3_I(inode)->i_state); | 578 | clear_bit(bit, &EXT3_I(inode)->i_state_flags); |
579 | } | 579 | } |
580 | #else | 580 | #else |
581 | /* Assume that user mode programs are passing in an ext3fs superblock, not | 581 | /* Assume that user mode programs are passing in an ext3fs superblock, not |
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 7679acdb519a..f42c098aed8d 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h | |||
@@ -87,7 +87,7 @@ struct ext3_inode_info { | |||
87 | * near to their parent directory's inode. | 87 | * near to their parent directory's inode. |
88 | */ | 88 | */ |
89 | __u32 i_block_group; | 89 | __u32 i_block_group; |
90 | unsigned long i_state; /* Dynamic state flags for ext3 */ | 90 | unsigned long i_state_flags; /* Dynamic state flags for ext3 */ |
91 | 91 | ||
92 | /* block reservation info */ | 92 | /* block reservation info */ |
93 | struct ext3_block_alloc_info *i_block_alloc_info; | 93 | struct ext3_block_alloc_info *i_block_alloc_info; |
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 5a361f85cfec..da7e52b099f3 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
@@ -64,9 +64,12 @@ extern bool freeze_task(struct task_struct *p, bool sig_only); | |||
64 | extern void cancel_freezing(struct task_struct *p); | 64 | extern void cancel_freezing(struct task_struct *p); |
65 | 65 | ||
66 | #ifdef CONFIG_CGROUP_FREEZER | 66 | #ifdef CONFIG_CGROUP_FREEZER |
67 | extern int cgroup_frozen(struct task_struct *task); | 67 | extern int cgroup_freezing_or_frozen(struct task_struct *task); |
68 | #else /* !CONFIG_CGROUP_FREEZER */ | 68 | #else /* !CONFIG_CGROUP_FREEZER */ |
69 | static inline int cgroup_frozen(struct task_struct *task) { return 0; } | 69 | static inline int cgroup_freezing_or_frozen(struct task_struct *task) |
70 | { | ||
71 | return 0; | ||
72 | } | ||
70 | #endif /* !CONFIG_CGROUP_FREEZER */ | 73 | #endif /* !CONFIG_CGROUP_FREEZER */ |
71 | 74 | ||
72 | /* | 75 | /* |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 10b8dedcd18b..39d57bc6cc71 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2212,6 +2212,7 @@ extern int generic_segment_checks(const struct iovec *iov, | |||
2212 | /* fs/block_dev.c */ | 2212 | /* fs/block_dev.c */ |
2213 | extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, | 2213 | extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, |
2214 | unsigned long nr_segs, loff_t pos); | 2214 | unsigned long nr_segs, loff_t pos); |
2215 | extern int blkdev_fsync(struct file *filp, struct dentry *dentry, int datasync); | ||
2215 | 2216 | ||
2216 | /* fs/splice.c */ | 2217 | /* fs/splice.c */ |
2217 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, | 2218 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, |
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index 7be0c6fbe880..c57db27ac861 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
@@ -105,7 +105,7 @@ struct fscache_operation { | |||
105 | /* operation releaser */ | 105 | /* operation releaser */ |
106 | fscache_operation_release_t release; | 106 | fscache_operation_release_t release; |
107 | 107 | ||
108 | #ifdef CONFIG_SLOW_WORK_PROC | 108 | #ifdef CONFIG_SLOW_WORK_DEBUG |
109 | const char *name; /* operation name */ | 109 | const char *name; /* operation name */ |
110 | const char *state; /* operation state */ | 110 | const char *state; /* operation state */ |
111 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) | 111 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index df8fd9a3b214..01755909ce81 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/inotify.h> | 15 | #include <linux/inotify.h> |
16 | #include <linux/fsnotify_backend.h> | 16 | #include <linux/fsnotify_backend.h> |
17 | #include <linux/audit.h> | 17 | #include <linux/audit.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * fsnotify_d_instantiate - instantiate a dentry for inode | 21 | * fsnotify_d_instantiate - instantiate a dentry for inode |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 48e68da097f6..361d1cc288d0 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
18 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | struct gameport { | 21 | struct gameport { |
21 | 22 | ||
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 56b50514ab25..5f2f4c4d8fb0 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -109,7 +109,7 @@ struct hd_struct { | |||
109 | }; | 109 | }; |
110 | 110 | ||
111 | #define GENHD_FL_REMOVABLE 1 | 111 | #define GENHD_FL_REMOVABLE 1 |
112 | #define GENHD_FL_DRIVERFS 2 | 112 | /* 2 is unused */ |
113 | #define GENHD_FL_MEDIA_CHANGE_NOTIFY 4 | 113 | #define GENHD_FL_MEDIA_CHANGE_NOTIFY 4 |
114 | #define GENHD_FL_CD 8 | 114 | #define GENHD_FL_CD 8 |
115 | #define GENHD_FL_UP 16 | 115 | #define GENHD_FL_UP 16 |
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 87018dc5527d..9e7a12d6385d 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
@@ -782,7 +782,6 @@ extern int i2o_exec_lct_get(struct i2o_controller *); | |||
782 | #define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver) | 782 | #define to_i2o_driver(drv) container_of(drv,struct i2o_driver, driver) |
783 | #define to_i2o_device(dev) container_of(dev, struct i2o_device, device) | 783 | #define to_i2o_device(dev) container_of(dev, struct i2o_device, device) |
784 | #define to_i2o_controller(dev) container_of(dev, struct i2o_controller, device) | 784 | #define to_i2o_controller(dev) container_of(dev, struct i2o_controller, device) |
785 | #define kobj_to_i2o_device(kobj) to_i2o_device(container_of(kobj, struct device, kobj)) | ||
786 | 785 | ||
787 | /** | 786 | /** |
788 | * i2o_out_to_virt - Turn an I2O message to a virtual address | 787 | * i2o_out_to_virt - Turn an I2O message to a virtual address |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 97e6ab435184..3239d1c10acb 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1169,6 +1169,7 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); | |||
1169 | extern void ide_timer_expiry(unsigned long); | 1169 | extern void ide_timer_expiry(unsigned long); |
1170 | extern irqreturn_t ide_intr(int irq, void *dev_id); | 1170 | extern irqreturn_t ide_intr(int irq, void *dev_id); |
1171 | extern void do_ide_request(struct request_queue *); | 1171 | extern void do_ide_request(struct request_queue *); |
1172 | extern void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq); | ||
1172 | 1173 | ||
1173 | void ide_init_disk(struct gendisk *, ide_drive_t *); | 1174 | void ide_init_disk(struct gendisk *, ide_drive_t *); |
1174 | 1175 | ||
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 97eb928b4924..25085ddd955f 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define _LINUX_IO_MAPPING_H | 19 | #define _LINUX_IO_MAPPING_H |
20 | 20 | ||
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/slab.h> | ||
22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
23 | #include <asm/page.h> | 24 | #include <asm/page.h> |
24 | #include <asm/iomap.h> | 25 | #include <asm/iomap.h> |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 71ab79da7e7f..26fad187d661 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -112,12 +112,14 @@ struct resource_list { | |||
112 | extern struct resource ioport_resource; | 112 | extern struct resource ioport_resource; |
113 | extern struct resource iomem_resource; | 113 | extern struct resource iomem_resource; |
114 | 114 | ||
115 | extern struct resource *request_resource_conflict(struct resource *root, struct resource *new); | ||
115 | extern int request_resource(struct resource *root, struct resource *new); | 116 | extern int request_resource(struct resource *root, struct resource *new); |
116 | extern int release_resource(struct resource *new); | 117 | extern int release_resource(struct resource *new); |
117 | void release_child_resources(struct resource *new); | 118 | void release_child_resources(struct resource *new); |
118 | extern void reserve_region_with_split(struct resource *root, | 119 | extern void reserve_region_with_split(struct resource *root, |
119 | resource_size_t start, resource_size_t end, | 120 | resource_size_t start, resource_size_t end, |
120 | const char *name); | 121 | const char *name); |
122 | extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new); | ||
121 | extern int insert_resource(struct resource *parent, struct resource *new); | 123 | extern int insert_resource(struct resource *parent, struct resource *new); |
122 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); | 124 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); |
123 | extern int allocate_resource(struct resource *root, struct resource *new, | 125 | extern int allocate_resource(struct resource *root, struct resource *new, |
diff --git a/include/linux/iscsi_ibft.h b/include/linux/iscsi_ibft.h index 6092487e2950..d2e4042f8f5e 100644 --- a/include/linux/iscsi_ibft.h +++ b/include/linux/iscsi_ibft.h | |||
@@ -42,9 +42,13 @@ extern struct ibft_table_header *ibft_addr; | |||
42 | * mapped address is set in the ibft_addr variable. | 42 | * mapped address is set in the ibft_addr variable. |
43 | */ | 43 | */ |
44 | #ifdef CONFIG_ISCSI_IBFT_FIND | 44 | #ifdef CONFIG_ISCSI_IBFT_FIND |
45 | extern void __init reserve_ibft_region(void); | 45 | unsigned long find_ibft_region(unsigned long *sizep); |
46 | #else | 46 | #else |
47 | static inline void reserve_ibft_region(void) { } | 47 | static inline unsigned long find_ibft_region(unsigned long *sizep) |
48 | { | ||
49 | *sizep = 0; | ||
50 | return 0; | ||
51 | } | ||
48 | #endif | 52 | #endif |
49 | 53 | ||
50 | #endif /* ISCSI_IBFT_H */ | 54 | #endif /* ISCSI_IBFT_H */ |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index f3aa59cb675d..516a2a27e87a 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
33 | #include <linux/lockdep.h> | 33 | #include <linux/lockdep.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #define journal_oom_retry 1 | 36 | #define journal_oom_retry 1 |
36 | 37 | ||
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 1ec876358180..a4d2e9f7088a 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/bit_spinlock.h> | 30 | #include <linux/bit_spinlock.h> |
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
33 | #include <linux/slab.h> | ||
33 | #endif | 34 | #endif |
34 | 35 | ||
35 | #define journal_oom_retry 1 | 36 | #define journal_oom_retry 1 |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7f0707463360..9365227dbaf6 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -426,7 +426,7 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
426 | .burst = DEFAULT_RATELIMIT_BURST, \ | 426 | .burst = DEFAULT_RATELIMIT_BURST, \ |
427 | }; \ | 427 | }; \ |
428 | \ | 428 | \ |
429 | if (!__ratelimit(&_rs)) \ | 429 | if (__ratelimit(&_rs)) \ |
430 | printk(fmt, ##__VA_ARGS__); \ | 430 | printk(fmt, ##__VA_ARGS__); \ |
431 | }) | 431 | }) |
432 | #else | 432 | #else |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index bc0fc795bd35..e117b1aee69c 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
@@ -86,7 +86,8 @@ union { \ | |||
86 | */ | 86 | */ |
87 | #define INIT_KFIFO(name) \ | 87 | #define INIT_KFIFO(name) \ |
88 | name = __kfifo_initializer(sizeof(name##kfifo_buffer) - \ | 88 | name = __kfifo_initializer(sizeof(name##kfifo_buffer) - \ |
89 | sizeof(struct kfifo), name##kfifo_buffer) | 89 | sizeof(struct kfifo), \ |
90 | name##kfifo_buffer + sizeof(struct kfifo)) | ||
90 | 91 | ||
91 | /** | 92 | /** |
92 | * DEFINE_KFIFO - macro to define and initialize a kfifo | 93 | * DEFINE_KFIFO - macro to define and initialize a kfifo |
@@ -102,8 +103,6 @@ union { \ | |||
102 | unsigned char name##kfifo_buffer[size]; \ | 103 | unsigned char name##kfifo_buffer[size]; \ |
103 | struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) | 104 | struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) |
104 | 105 | ||
105 | #undef __kfifo_initializer | ||
106 | |||
107 | extern void kfifo_init(struct kfifo *fifo, void *buffer, | 106 | extern void kfifo_init(struct kfifo *fifo, void *buffer, |
108 | unsigned int size); | 107 | unsigned int size); |
109 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, | 108 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, |
diff --git a/include/linux/lcm.h b/include/linux/lcm.h new file mode 100644 index 000000000000..7bf01d779b45 --- /dev/null +++ b/include/linux/lcm.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _LCM_H | ||
2 | #define _LCM_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | |||
6 | unsigned long lcm(unsigned long a, unsigned long b) __attribute_const__; | ||
7 | |||
8 | #endif /* _LCM_H */ | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index f8ea71e6d0e2..b2f2003b92e5 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -146,6 +146,7 @@ enum { | |||
146 | ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ | 146 | ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */ |
147 | ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */ | 147 | ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */ |
148 | ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */ | 148 | ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */ |
149 | ATA_DFLAG_UNLOCK_HPA = (1 << 18), /* unlock HPA */ | ||
149 | ATA_DFLAG_INIT_MASK = (1 << 24) - 1, | 150 | ATA_DFLAG_INIT_MASK = (1 << 24) - 1, |
150 | 151 | ||
151 | ATA_DFLAG_DETACH = (1 << 24), | 152 | ATA_DFLAG_DETACH = (1 << 24), |
diff --git a/include/linux/mm.h b/include/linux/mm.h index e70f21beb4b4..462acaf36f3a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -783,8 +783,8 @@ struct mm_walk { | |||
783 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); | 783 | int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); |
784 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); | 784 | int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); |
785 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); | 785 | int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); |
786 | int (*hugetlb_entry)(pte_t *, unsigned long, unsigned long, | 786 | int (*hugetlb_entry)(pte_t *, unsigned long, |
787 | struct mm_walk *); | 787 | unsigned long, unsigned long, struct mm_walk *); |
788 | struct mm_struct *mm; | 788 | struct mm_struct *mm; |
789 | void *private; | 789 | void *private; |
790 | }; | 790 | }; |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index c02c8db73701..8a49cbf0376d 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -268,6 +268,7 @@ struct _mmc_csd { | |||
268 | 268 | ||
269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ | 269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ |
270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ | 270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ |
271 | #define EXT_CSD_CARD_TYPE_MASK 0x3 /* Mask out reserved and DDR bits */ | ||
271 | 272 | ||
272 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ | 273 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ |
273 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ | 274 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ |
diff --git a/include/linux/module.h b/include/linux/module.h index 5e869ffd34aa..515d53ae6a79 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -330,8 +330,11 @@ struct module | |||
330 | struct module_notes_attrs *notes_attrs; | 330 | struct module_notes_attrs *notes_attrs; |
331 | #endif | 331 | #endif |
332 | 332 | ||
333 | #ifdef CONFIG_SMP | ||
333 | /* Per-cpu data. */ | 334 | /* Per-cpu data. */ |
334 | void *percpu; | 335 | void __percpu *percpu; |
336 | unsigned int percpu_size; | ||
337 | #endif | ||
335 | 338 | ||
336 | /* The command line arguments (may be mangled). People like | 339 | /* The command line arguments (may be mangled). People like |
337 | keeping pointers to this stuff */ | 340 | keeping pointers to this stuff */ |
@@ -365,7 +368,8 @@ struct module | |||
365 | void (*exit)(void); | 368 | void (*exit)(void); |
366 | 369 | ||
367 | struct module_ref { | 370 | struct module_ref { |
368 | int count; | 371 | unsigned int incs; |
372 | unsigned int decs; | ||
369 | } __percpu *refptr; | 373 | } __percpu *refptr; |
370 | #endif | 374 | #endif |
371 | 375 | ||
@@ -392,6 +396,7 @@ static inline int module_is_live(struct module *mod) | |||
392 | struct module *__module_text_address(unsigned long addr); | 396 | struct module *__module_text_address(unsigned long addr); |
393 | struct module *__module_address(unsigned long addr); | 397 | struct module *__module_address(unsigned long addr); |
394 | bool is_module_address(unsigned long addr); | 398 | bool is_module_address(unsigned long addr); |
399 | bool is_module_percpu_address(unsigned long addr); | ||
395 | bool is_module_text_address(unsigned long addr); | 400 | bool is_module_text_address(unsigned long addr); |
396 | 401 | ||
397 | static inline int within_module_core(unsigned long addr, struct module *mod) | 402 | static inline int within_module_core(unsigned long addr, struct module *mod) |
@@ -459,9 +464,9 @@ static inline void __module_get(struct module *module) | |||
459 | { | 464 | { |
460 | if (module) { | 465 | if (module) { |
461 | preempt_disable(); | 466 | preempt_disable(); |
462 | __this_cpu_inc(module->refptr->count); | 467 | __this_cpu_inc(module->refptr->incs); |
463 | trace_module_get(module, _THIS_IP_, | 468 | trace_module_get(module, _THIS_IP_, |
464 | __this_cpu_read(module->refptr->count)); | 469 | __this_cpu_read(module->refptr->incs)); |
465 | preempt_enable(); | 470 | preempt_enable(); |
466 | } | 471 | } |
467 | } | 472 | } |
@@ -474,11 +479,10 @@ static inline int try_module_get(struct module *module) | |||
474 | preempt_disable(); | 479 | preempt_disable(); |
475 | 480 | ||
476 | if (likely(module_is_live(module))) { | 481 | if (likely(module_is_live(module))) { |
477 | __this_cpu_inc(module->refptr->count); | 482 | __this_cpu_inc(module->refptr->incs); |
478 | trace_module_get(module, _THIS_IP_, | 483 | trace_module_get(module, _THIS_IP_, |
479 | __this_cpu_read(module->refptr->count)); | 484 | __this_cpu_read(module->refptr->incs)); |
480 | } | 485 | } else |
481 | else | ||
482 | ret = 0; | 486 | ret = 0; |
483 | 487 | ||
484 | preempt_enable(); | 488 | preempt_enable(); |
@@ -563,6 +567,11 @@ static inline bool is_module_address(unsigned long addr) | |||
563 | return false; | 567 | return false; |
564 | } | 568 | } |
565 | 569 | ||
570 | static inline bool is_module_percpu_address(unsigned long addr) | ||
571 | { | ||
572 | return false; | ||
573 | } | ||
574 | |||
566 | static inline bool is_module_text_address(unsigned long addr) | 575 | static inline bool is_module_text_address(unsigned long addr) |
567 | { | 576 | { |
568 | return false; | 577 | return false; |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index 30b08136fdf3..aef22ae2af47 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
@@ -39,6 +39,7 @@ enum { | |||
39 | PCG_CACHE, /* charged as cache */ | 39 | PCG_CACHE, /* charged as cache */ |
40 | PCG_USED, /* this object is in use. */ | 40 | PCG_USED, /* this object is in use. */ |
41 | PCG_ACCT_LRU, /* page has been accounted for */ | 41 | PCG_ACCT_LRU, /* page has been accounted for */ |
42 | PCG_FILE_MAPPED, /* page is accounted as "mapped" */ | ||
42 | }; | 43 | }; |
43 | 44 | ||
44 | #define TESTPCGFLAG(uname, lname) \ | 45 | #define TESTPCGFLAG(uname, lname) \ |
@@ -73,6 +74,11 @@ CLEARPCGFLAG(AcctLRU, ACCT_LRU) | |||
73 | TESTPCGFLAG(AcctLRU, ACCT_LRU) | 74 | TESTPCGFLAG(AcctLRU, ACCT_LRU) |
74 | TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU) | 75 | TESTCLEARPCGFLAG(AcctLRU, ACCT_LRU) |
75 | 76 | ||
77 | |||
78 | SETPCGFLAG(FileMapped, FILE_MAPPED) | ||
79 | CLEARPCGFLAG(FileMapped, FILE_MAPPED) | ||
80 | TESTPCGFLAG(FileMapped, FILE_MAPPED) | ||
81 | |||
76 | static inline int page_cgroup_nid(struct page_cgroup *pc) | 82 | static inline int page_cgroup_nid(struct page_cgroup *pc) |
77 | { | 83 | { |
78 | return page_to_nid(pc->page); | 84 | return page_to_nid(pc->page); |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index a93e5bfdccb8..d3a38d687104 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -2,10 +2,10 @@ | |||
2 | #define __LINUX_PERCPU_H | 2 | #define __LINUX_PERCPU_H |
3 | 3 | ||
4 | #include <linux/preempt.h> | 4 | #include <linux/preempt.h> |
5 | #include <linux/slab.h> /* For kmalloc() */ | ||
6 | #include <linux/smp.h> | 5 | #include <linux/smp.h> |
7 | #include <linux/cpumask.h> | 6 | #include <linux/cpumask.h> |
8 | #include <linux/pfn.h> | 7 | #include <linux/pfn.h> |
8 | #include <linux/init.h> | ||
9 | 9 | ||
10 | #include <asm/percpu.h> | 10 | #include <asm/percpu.h> |
11 | 11 | ||
@@ -135,9 +135,7 @@ extern int __init pcpu_page_first_chunk(size_t reserved_size, | |||
135 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) | 135 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) |
136 | 136 | ||
137 | extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); | 137 | extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); |
138 | extern void __percpu *__alloc_percpu(size_t size, size_t align); | 138 | extern bool is_kernel_percpu_address(unsigned long addr); |
139 | extern void free_percpu(void __percpu *__pdata); | ||
140 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); | ||
141 | 139 | ||
142 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA | 140 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA |
143 | extern void __init setup_per_cpu_areas(void); | 141 | extern void __init setup_per_cpu_areas(void); |
@@ -147,25 +145,10 @@ extern void __init setup_per_cpu_areas(void); | |||
147 | 145 | ||
148 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) | 146 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) |
149 | 147 | ||
150 | static inline void __percpu *__alloc_percpu(size_t size, size_t align) | 148 | /* can't distinguish from other static vars, always false */ |
149 | static inline bool is_kernel_percpu_address(unsigned long addr) | ||
151 | { | 150 | { |
152 | /* | 151 | return false; |
153 | * Can't easily make larger alignment work with kmalloc. WARN | ||
154 | * on it. Larger alignment should only be used for module | ||
155 | * percpu sections on SMP for which this path isn't used. | ||
156 | */ | ||
157 | WARN_ON_ONCE(align > SMP_CACHE_BYTES); | ||
158 | return kzalloc(size, GFP_KERNEL); | ||
159 | } | ||
160 | |||
161 | static inline void free_percpu(void __percpu *p) | ||
162 | { | ||
163 | kfree(p); | ||
164 | } | ||
165 | |||
166 | static inline phys_addr_t per_cpu_ptr_to_phys(void *addr) | ||
167 | { | ||
168 | return __pa(addr); | ||
169 | } | 152 | } |
170 | 153 | ||
171 | static inline void __init setup_per_cpu_areas(void) { } | 154 | static inline void __init setup_per_cpu_areas(void) { } |
@@ -177,6 +160,10 @@ static inline void *pcpu_lpage_remapped(void *kaddr) | |||
177 | 160 | ||
178 | #endif /* CONFIG_SMP */ | 161 | #endif /* CONFIG_SMP */ |
179 | 162 | ||
163 | extern void __percpu *__alloc_percpu(size_t size, size_t align); | ||
164 | extern void free_percpu(void __percpu *__pdata); | ||
165 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); | ||
166 | |||
180 | #define alloc_percpu(type) \ | 167 | #define alloc_percpu(type) \ |
181 | (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type)) | 168 | (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type)) |
182 | 169 | ||
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 95477038a72a..c8e375440403 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -842,13 +842,6 @@ extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX]; | |||
842 | 842 | ||
843 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); | 843 | extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64); |
844 | 844 | ||
845 | static inline void | ||
846 | perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | ||
847 | { | ||
848 | if (atomic_read(&perf_swevent_enabled[event_id])) | ||
849 | __perf_sw_event(event_id, nr, nmi, regs, addr); | ||
850 | } | ||
851 | |||
852 | extern void | 845 | extern void |
853 | perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); | 846 | perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); |
854 | 847 | ||
@@ -887,6 +880,20 @@ static inline void perf_fetch_caller_regs(struct pt_regs *regs, int skip) | |||
887 | return perf_arch_fetch_caller_regs(regs, ip, skip); | 880 | return perf_arch_fetch_caller_regs(regs, ip, skip); |
888 | } | 881 | } |
889 | 882 | ||
883 | static inline void | ||
884 | perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | ||
885 | { | ||
886 | if (atomic_read(&perf_swevent_enabled[event_id])) { | ||
887 | struct pt_regs hot_regs; | ||
888 | |||
889 | if (!regs) { | ||
890 | perf_fetch_caller_regs(&hot_regs, 1); | ||
891 | regs = &hot_regs; | ||
892 | } | ||
893 | __perf_sw_event(event_id, nr, nmi, regs, addr); | ||
894 | } | ||
895 | } | ||
896 | |||
890 | extern void __perf_event_mmap(struct vm_area_struct *vma); | 897 | extern void __perf_event_mmap(struct vm_area_struct *vma); |
891 | 898 | ||
892 | static inline void perf_event_mmap(struct vm_area_struct *vma) | 899 | static inline void perf_event_mmap(struct vm_area_struct *vma) |
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index c5da74918096..55ca73cf25e5 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
@@ -121,6 +121,13 @@ do { \ | |||
121 | * (Note, rcu_assign_pointer and rcu_dereference are not needed to control | 121 | * (Note, rcu_assign_pointer and rcu_dereference are not needed to control |
122 | * access to data items when inserting into or looking up from the radix tree) | 122 | * access to data items when inserting into or looking up from the radix tree) |
123 | * | 123 | * |
124 | * Note that the value returned by radix_tree_tag_get() may not be relied upon | ||
125 | * if only the RCU read lock is held. Functions to set/clear tags and to | ||
126 | * delete nodes running concurrently with it may affect its result such that | ||
127 | * two consecutive reads in the same locked section may return different | ||
128 | * values. If reliability is required, modification functions must also be | ||
129 | * excluded from concurrency. | ||
130 | * | ||
124 | * radix_tree_tagged is able to be called without locking or RCU. | 131 | * radix_tree_tagged is able to be called without locking or RCU. |
125 | */ | 132 | */ |
126 | 133 | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 3024050c82a1..872a98e13d6a 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -123,22 +123,11 @@ static inline int rcu_read_lock_held(void) | |||
123 | return lock_is_held(&rcu_lock_map); | 123 | return lock_is_held(&rcu_lock_map); |
124 | } | 124 | } |
125 | 125 | ||
126 | /** | 126 | /* |
127 | * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? | 127 | * rcu_read_lock_bh_held() is defined out of line to avoid #include-file |
128 | * | 128 | * hell. |
129 | * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in | ||
130 | * an RCU-bh read-side critical section. In absence of CONFIG_PROVE_LOCKING, | ||
131 | * this assumes we are in an RCU-bh read-side critical section unless it can | ||
132 | * prove otherwise. | ||
133 | * | ||
134 | * Check rcu_scheduler_active to prevent false positives during boot. | ||
135 | */ | 129 | */ |
136 | static inline int rcu_read_lock_bh_held(void) | 130 | extern int rcu_read_lock_bh_held(void); |
137 | { | ||
138 | if (!debug_lockdep_rcu_enabled()) | ||
139 | return 1; | ||
140 | return lock_is_held(&rcu_bh_lock_map); | ||
141 | } | ||
142 | 131 | ||
143 | /** | 132 | /** |
144 | * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? | 133 | * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? |
@@ -160,7 +149,7 @@ static inline int rcu_read_lock_sched_held(void) | |||
160 | return 1; | 149 | return 1; |
161 | if (debug_locks) | 150 | if (debug_locks) |
162 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); | 151 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); |
163 | return lockdep_opinion || preempt_count() != 0; | 152 | return lockdep_opinion || preempt_count() != 0 || irqs_disabled(); |
164 | } | 153 | } |
165 | #else /* #ifdef CONFIG_PREEMPT */ | 154 | #else /* #ifdef CONFIG_PREEMPT */ |
166 | static inline int rcu_read_lock_sched_held(void) | 155 | static inline int rcu_read_lock_sched_held(void) |
@@ -191,7 +180,7 @@ static inline int rcu_read_lock_bh_held(void) | |||
191 | #ifdef CONFIG_PREEMPT | 180 | #ifdef CONFIG_PREEMPT |
192 | static inline int rcu_read_lock_sched_held(void) | 181 | static inline int rcu_read_lock_sched_held(void) |
193 | { | 182 | { |
194 | return !rcu_scheduler_active || preempt_count() != 0; | 183 | return !rcu_scheduler_active || preempt_count() != 0 || irqs_disabled(); |
195 | } | 184 | } |
196 | #else /* #ifdef CONFIG_PREEMPT */ | 185 | #else /* #ifdef CONFIG_PREEMPT */ |
197 | static inline int rcu_read_lock_sched_held(void) | 186 | static inline int rcu_read_lock_sched_held(void) |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 99928dce37ea..7fa02b4af838 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -70,6 +70,11 @@ int reiserfs_security_write(struct reiserfs_transaction_handle *th, | |||
70 | void reiserfs_security_free(struct reiserfs_security_handle *sec); | 70 | void reiserfs_security_free(struct reiserfs_security_handle *sec); |
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | static inline int reiserfs_xattrs_initialized(struct super_block *sb) | ||
74 | { | ||
75 | return REISERFS_SB(sb)->priv_root != NULL; | ||
76 | } | ||
77 | |||
73 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) | 78 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) |
74 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) | 79 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) |
75 | { | 80 | { |
diff --git a/include/linux/security.h b/include/linux/security.h index 233d20b52c1b..3158dd982d27 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
34 | #include <linux/key.h> | 34 | #include <linux/key.h> |
35 | #include <linux/xfrm.h> | 35 | #include <linux/xfrm.h> |
36 | #include <linux/gfp.h> | 36 | #include <linux/slab.h> |
37 | #include <net/flow.h> | 37 | #include <net/flow.h> |
38 | 38 | ||
39 | /* Maximum number of letters for an LSM name string */ | 39 | /* Maximum number of letters for an LSM name string */ |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 488446289cab..49d1247cd6d9 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -106,6 +106,7 @@ int kmem_cache_shrink(struct kmem_cache *); | |||
106 | void kmem_cache_free(struct kmem_cache *, void *); | 106 | void kmem_cache_free(struct kmem_cache *, void *); |
107 | unsigned int kmem_cache_size(struct kmem_cache *); | 107 | unsigned int kmem_cache_size(struct kmem_cache *); |
108 | const char *kmem_cache_name(struct kmem_cache *); | 108 | const char *kmem_cache_name(struct kmem_cache *); |
109 | int kern_ptr_validate(const void *ptr, unsigned long size); | ||
109 | int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); | 110 | int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); |
110 | 111 | ||
111 | /* | 112 | /* |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 97b60b37f445..af56071b06f9 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/mod_devicetable.h> | 23 | #include <linux/mod_devicetable.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * INTERFACES between SPI master-side drivers and SPI infrastructure. | 27 | * INTERFACES between SPI master-side drivers and SPI infrastructure. |
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index d7152b451e21..7c91260c44a9 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
@@ -36,7 +36,6 @@ struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); | |||
36 | void xprt_free_bc_request(struct rpc_rqst *req); | 36 | void xprt_free_bc_request(struct rpc_rqst *req); |
37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); | 37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); |
38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); | 38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); |
39 | void bc_release_request(struct rpc_task *); | ||
40 | int bc_send(struct rpc_rqst *req); | 39 | int bc_send(struct rpc_rqst *req); |
41 | 40 | ||
42 | /* | 41 | /* |
@@ -59,6 +58,10 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
59 | { | 58 | { |
60 | return 0; | 59 | return 0; |
61 | } | 60 | } |
61 | |||
62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) | ||
63 | { | ||
64 | } | ||
62 | #endif /* CONFIG_NFS_V4_1 */ | 65 | #endif /* CONFIG_NFS_V4_1 */ |
63 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ | 66 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ |
64 | 67 | ||
diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h index b6523c1427ce..58de6edf751f 100644 --- a/include/linux/taskstats_kern.h +++ b/include/linux/taskstats_kern.h | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/taskstats.h> | 10 | #include <linux/taskstats.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | #ifdef CONFIG_TASKSTATS | 14 | #ifdef CONFIG_TASKSTATS |
14 | extern struct kmem_cache *taskstats_cache; | 15 | extern struct kmem_cache *taskstats_cache; |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index f59604ed0ec6..78b4bd3be496 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -49,7 +49,7 @@ struct tracepoint { | |||
49 | void **it_func; \ | 49 | void **it_func; \ |
50 | \ | 50 | \ |
51 | rcu_read_lock_sched_notrace(); \ | 51 | rcu_read_lock_sched_notrace(); \ |
52 | it_func = rcu_dereference((tp)->funcs); \ | 52 | it_func = rcu_dereference_sched((tp)->funcs); \ |
53 | if (it_func) { \ | 53 | if (it_func) { \ |
54 | do { \ | 54 | do { \ |
55 | ((void(*)(proto))(*it_func))(args); \ | 55 | ((void(*)(proto))(*it_func))(args); \ |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index bbf45d500b6d..f4b7ca516cdd 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #ifndef __LINUX_USB_GADGET_H | 15 | #ifndef __LINUX_USB_GADGET_H |
16 | #define __LINUX_USB_GADGET_H | 16 | #define __LINUX_USB_GADGET_H |
17 | 17 | ||
18 | #include <linux/slab.h> | ||
19 | |||
18 | struct usb_ep; | 20 | struct usb_ep; |
19 | 21 | ||
20 | /** | 22 | /** |
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index ae4f039515b4..92228a8fbcbc 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h | |||
@@ -12,37 +12,14 @@ | |||
12 | 12 | ||
13 | /* Feature bits */ | 13 | /* Feature bits */ |
14 | #define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */ | 14 | #define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */ |
15 | #define VIRTIO_CONSOLE_F_MULTIPORT 1 /* Does host provide multiple ports? */ | ||
16 | 15 | ||
17 | struct virtio_console_config { | 16 | struct virtio_console_config { |
18 | /* colums of the screens */ | 17 | /* colums of the screens */ |
19 | __u16 cols; | 18 | __u16 cols; |
20 | /* rows of the screens */ | 19 | /* rows of the screens */ |
21 | __u16 rows; | 20 | __u16 rows; |
22 | /* max. number of ports this device can hold */ | ||
23 | __u32 max_nr_ports; | ||
24 | /* number of ports added so far */ | ||
25 | __u32 nr_ports; | ||
26 | } __attribute__((packed)); | 21 | } __attribute__((packed)); |
27 | 22 | ||
28 | /* | ||
29 | * A message that's passed between the Host and the Guest for a | ||
30 | * particular port. | ||
31 | */ | ||
32 | struct virtio_console_control { | ||
33 | __u32 id; /* Port number */ | ||
34 | __u16 event; /* The kind of control event (see below) */ | ||
35 | __u16 value; /* Extra information for the key */ | ||
36 | }; | ||
37 | |||
38 | /* Some events for control messages */ | ||
39 | #define VIRTIO_CONSOLE_PORT_READY 0 | ||
40 | #define VIRTIO_CONSOLE_CONSOLE_PORT 1 | ||
41 | #define VIRTIO_CONSOLE_RESIZE 2 | ||
42 | #define VIRTIO_CONSOLE_PORT_OPEN 3 | ||
43 | #define VIRTIO_CONSOLE_PORT_NAME 4 | ||
44 | #define VIRTIO_CONSOLE_PORT_REMOVE 5 | ||
45 | |||
46 | #ifdef __KERNEL__ | 23 | #ifdef __KERNEL__ |
47 | int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int)); | 24 | int __init virtio_cons_early_init(int (*put_chars)(u32, const char *, int)); |
48 | #endif /* __KERNEL__ */ | 25 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/wimax/debug.h b/include/linux/wimax/debug.h index db8096e88533..57031b4d12f2 100644 --- a/include/linux/wimax/debug.h +++ b/include/linux/wimax/debug.h | |||
@@ -155,6 +155,7 @@ | |||
155 | 155 | ||
156 | #include <linux/types.h> | 156 | #include <linux/types.h> |
157 | #include <linux/device.h> | 157 | #include <linux/device.h> |
158 | #include <linux/slab.h> | ||
158 | 159 | ||
159 | 160 | ||
160 | /* Backend stuff */ | 161 | /* Backend stuff */ |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 76e8903cd204..36520ded3e06 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -34,6 +34,9 @@ struct writeback_control { | |||
34 | enum writeback_sync_modes sync_mode; | 34 | enum writeback_sync_modes sync_mode; |
35 | unsigned long *older_than_this; /* If !NULL, only write back inodes | 35 | unsigned long *older_than_this; /* If !NULL, only write back inodes |
36 | older than this */ | 36 | older than this */ |
37 | unsigned long wb_start; /* Time writeback_inodes_wb was | ||
38 | called. This is needed to avoid | ||
39 | extra jobs and livelock */ | ||
37 | long nr_to_write; /* Write this many pages, and decrement | 40 | long nr_to_write; /* Write this many pages, and decrement |
38 | this for each page written */ | 41 | this for each page written */ |
39 | long pages_skipped; /* Pages which were not written */ | 42 | long pages_skipped; /* Pages which were not written */ |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index f076dfa75ae8..4f3760afc20f 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -54,6 +54,7 @@ enum p9_proto_versions{ | |||
54 | 54 | ||
55 | enum p9_trans_status { | 55 | enum p9_trans_status { |
56 | Connected, | 56 | Connected, |
57 | BeginDisconnect, | ||
57 | Disconnected, | 58 | Disconnected, |
58 | Hung, | 59 | Hung, |
59 | }; | 60 | }; |
@@ -198,6 +199,7 @@ int p9_client_version(struct p9_client *); | |||
198 | struct p9_client *p9_client_create(const char *dev_name, char *options); | 199 | struct p9_client *p9_client_create(const char *dev_name, char *options); |
199 | void p9_client_destroy(struct p9_client *clnt); | 200 | void p9_client_destroy(struct p9_client *clnt); |
200 | void p9_client_disconnect(struct p9_client *clnt); | 201 | void p9_client_disconnect(struct p9_client *clnt); |
202 | void p9_client_begin_disconnect(struct p9_client *clnt); | ||
201 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, | 203 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, |
202 | char *uname, u32 n_uname, char *aname); | 204 | char *uname, u32 n_uname, char *aname); |
203 | struct p9_fid *p9_client_auth(struct p9_client *clnt, char *uname, | 205 | struct p9_fid *p9_client_auth(struct p9_client *clnt, char *uname, |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 717e2192d521..206d22297ac3 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
11 | #include <linux/timer.h> | 11 | #include <linux/timer.h> |
12 | #include <linux/list.h> | 12 | #include <linux/list.h> |
13 | #include <linux/slab.h> | ||
13 | #include <asm/atomic.h> | 14 | #include <asm/atomic.h> |
14 | 15 | ||
15 | #define AX25_T1CLAMPLO 1 | 16 | #define AX25_T1CLAMPLO 1 |
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index c07ac9650ebc..c49086d2bc7d 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __NET_FIB_RULES_H | 2 | #define __NET_FIB_RULES_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/slab.h> | ||
5 | #include <linux/netdevice.h> | 6 | #include <linux/netdevice.h> |
6 | #include <linux/fib_rules.h> | 7 | #include <linux/fib_rules.h> |
7 | #include <net/flow.h> | 8 | #include <net/flow.h> |
diff --git a/include/net/ipx.h b/include/net/ipx.h index a14121dd1932..ef51a668ba19 100644 --- a/include/net/ipx.h +++ b/include/net/ipx.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <net/datalink.h> | 13 | #include <net/datalink.h> |
14 | #include <linux/ipx.h> | 14 | #include <linux/ipx.h> |
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | struct ipx_address { | 18 | struct ipx_address { |
18 | __be32 net; | 19 | __be32 net; |
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h index 5e310c8d8e2f..205a3360156e 100644 --- a/include/net/iucv/iucv.h +++ b/include/net/iucv/iucv.h | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/slab.h> | ||
31 | #include <asm/debug.h> | 32 | #include <asm/debug.h> |
32 | 33 | ||
33 | /* | 34 | /* |
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h index 2d2a1f9a61d8..32d15bd6efa3 100644 --- a/include/net/netfilter/nf_conntrack_extend.h +++ b/include/net/netfilter/nf_conntrack_extend.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _NF_CONNTRACK_EXTEND_H | 1 | #ifndef _NF_CONNTRACK_EXTEND_H |
2 | #define _NF_CONNTRACK_EXTEND_H | 2 | #define _NF_CONNTRACK_EXTEND_H |
3 | 3 | ||
4 | #include <linux/slab.h> | ||
5 | |||
4 | #include <net/netfilter/nf_conntrack.h> | 6 | #include <net/netfilter/nf_conntrack.h> |
5 | 7 | ||
6 | enum nf_ct_ext_id { | 8 | enum nf_ct_ext_id { |
diff --git a/include/net/netlabel.h b/include/net/netlabel.h index 60ebbc1fef46..9db401a8b4d9 100644 --- a/include/net/netlabel.h +++ b/include/net/netlabel.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #define _NETLABEL_H | 31 | #define _NETLABEL_H |
32 | 32 | ||
33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/net.h> | 35 | #include <linux/net.h> |
35 | #include <linux/skbuff.h> | 36 | #include <linux/skbuff.h> |
36 | #include <linux/in.h> | 37 | #include <linux/in.h> |
diff --git a/include/net/netrom.h b/include/net/netrom.h index ab170a60e7d3..f0793c1cb5f8 100644 --- a/include/net/netrom.h +++ b/include/net/netrom.h | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/netrom.h> | 10 | #include <linux/netrom.h> |
11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
12 | #include <linux/slab.h> | ||
12 | #include <net/sock.h> | 13 | #include <net/sock.h> |
13 | 14 | ||
14 | #define NR_NETWORK_LEN 15 | 15 | #define NR_NETWORK_LEN 15 |
diff --git a/include/net/sock.h b/include/net/sock.h index 092b0551e77f..b4603cd54fcd 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/skbuff.h> /* struct sk_buff */ | 51 | #include <linux/skbuff.h> /* struct sk_buff */ |
52 | #include <linux/mm.h> | 52 | #include <linux/mm.h> |
53 | #include <linux/security.h> | 53 | #include <linux/security.h> |
54 | #include <linux/slab.h> | ||
54 | 55 | ||
55 | #include <linux/filter.h> | 56 | #include <linux/filter.h> |
56 | #include <linux/rculist_nulls.h> | 57 | #include <linux/rculist_nulls.h> |
diff --git a/include/net/x25.h b/include/net/x25.h index 9baa07dc7d17..468551ea4f1d 100644 --- a/include/net/x25.h +++ b/include/net/x25.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #ifndef _X25_H | 10 | #ifndef _X25_H |
11 | #define _X25_H | 11 | #define _X25_H |
12 | #include <linux/x25.h> | 12 | #include <linux/x25.h> |
13 | #include <linux/slab.h> | ||
13 | #include <net/sock.h> | 14 | #include <net/sock.h> |
14 | 15 | ||
15 | #define X25_ADDR_LEN 16 | 16 | #define X25_ADDR_LEN 16 |
@@ -182,6 +183,10 @@ extern int sysctl_x25_clear_request_timeout; | |||
182 | extern int sysctl_x25_ack_holdback_timeout; | 183 | extern int sysctl_x25_ack_holdback_timeout; |
183 | extern int sysctl_x25_forward; | 184 | extern int sysctl_x25_forward; |
184 | 185 | ||
186 | extern int x25_parse_address_block(struct sk_buff *skb, | ||
187 | struct x25_address *called_addr, | ||
188 | struct x25_address *calling_addr); | ||
189 | |||
185 | extern int x25_addr_ntoa(unsigned char *, struct x25_address *, | 190 | extern int x25_addr_ntoa(unsigned char *, struct x25_address *, |
186 | struct x25_address *); | 191 | struct x25_address *); |
187 | extern int x25_addr_aton(unsigned char *, struct x25_address *, | 192 | extern int x25_addr_aton(unsigned char *, struct x25_address *, |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index cccb049991a9..1913af67c43d 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/in6.h> | 12 | #include <linux/in6.h> |
13 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
14 | #include <linux/audit.h> | 14 | #include <linux/audit.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include <net/sock.h> | 17 | #include <net/sock.h> |
17 | #include <net/dst.h> | 18 | #include <net/dst.h> |
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index 32896a773910..2e488b60bc76 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h | |||
@@ -277,12 +277,6 @@ extern struct pccard_resource_ops pccard_nonstatic_ops; | |||
277 | #endif | 277 | #endif |
278 | 278 | ||
279 | 279 | ||
280 | /* socket drivers are expected to use these callbacks in their .drv struct */ | ||
281 | extern int pcmcia_socket_dev_suspend(struct device *dev); | ||
282 | extern void pcmcia_socket_dev_early_resume(struct device *dev); | ||
283 | extern void pcmcia_socket_dev_late_resume(struct device *dev); | ||
284 | extern int pcmcia_socket_dev_resume(struct device *dev); | ||
285 | |||
286 | /* socket drivers use this callback in their IRQ handler */ | 280 | /* socket drivers use this callback in their IRQ handler */ |
287 | extern void pcmcia_parse_events(struct pcmcia_socket *socket, | 281 | extern void pcmcia_parse_events(struct pcmcia_socket *socket, |
288 | unsigned int events); | 282 | unsigned int events); |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 9eaa3f05f954..3b586859669c 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <scsi/scsi_cmnd.h> | 36 | #include <scsi/scsi_cmnd.h> |
37 | #include <scsi/scsi_transport_sas.h> | 37 | #include <scsi/scsi_transport_sas.h> |
38 | #include <linux/scatterlist.h> | 38 | #include <linux/scatterlist.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | struct block_device; | 41 | struct block_device; |
41 | 42 | ||
diff --git a/include/sound/ak4113.h b/include/sound/ak4113.h index 8988edae1609..2609048c1d44 100644 --- a/include/sound/ak4113.h +++ b/include/sound/ak4113.h | |||
@@ -307,7 +307,7 @@ struct ak4113 { | |||
307 | 307 | ||
308 | int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read, | 308 | int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read, |
309 | ak4113_write_t *write, | 309 | ak4113_write_t *write, |
310 | const unsigned char pgm[AK4113_WRITABLE_REGS], | 310 | const unsigned char *pgm, |
311 | void *private_data, struct ak4113 **r_ak4113); | 311 | void *private_data, struct ak4113 **r_ak4113); |
312 | void snd_ak4113_reg_write(struct ak4113 *ak4113, unsigned char reg, | 312 | void snd_ak4113_reg_write(struct ak4113 *ak4113, unsigned char reg, |
313 | unsigned char mask, unsigned char val); | 313 | unsigned char mask, unsigned char val); |
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 061f16d4c878..0a0b019d41ad 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
@@ -219,7 +219,6 @@ struct snd_soc_dai { | |||
219 | struct snd_soc_codec *codec; | 219 | struct snd_soc_codec *codec; |
220 | unsigned int active; | 220 | unsigned int active; |
221 | unsigned char pop_wait:1; | 221 | unsigned char pop_wait:1; |
222 | void *dma_data; | ||
223 | 222 | ||
224 | /* DAI private data */ | 223 | /* DAI private data */ |
225 | void *private_data; | 224 | void *private_data; |
@@ -230,4 +229,21 @@ struct snd_soc_dai { | |||
230 | struct list_head list; | 229 | struct list_head list; |
231 | }; | 230 | }; |
232 | 231 | ||
232 | static inline void *snd_soc_dai_get_dma_data(const struct snd_soc_dai *dai, | ||
233 | const struct snd_pcm_substream *ss) | ||
234 | { | ||
235 | return (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) ? | ||
236 | dai->playback.dma_data : dai->capture.dma_data; | ||
237 | } | ||
238 | |||
239 | static inline void snd_soc_dai_set_dma_data(struct snd_soc_dai *dai, | ||
240 | const struct snd_pcm_substream *ss, | ||
241 | void *data) | ||
242 | { | ||
243 | if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) | ||
244 | dai->playback.dma_data = data; | ||
245 | else | ||
246 | dai->capture.dma_data = data; | ||
247 | } | ||
248 | |||
233 | #endif | 249 | #endif |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 5d234a8c2506..a57fbfcd4c8f 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -375,6 +375,7 @@ struct snd_soc_pcm_stream { | |||
375 | unsigned int channels_min; /* min channels */ | 375 | unsigned int channels_min; /* min channels */ |
376 | unsigned int channels_max; /* max channels */ | 376 | unsigned int channels_max; /* max channels */ |
377 | unsigned int active:1; /* stream is in use */ | 377 | unsigned int active:1; /* stream is in use */ |
378 | void *dma_data; /* used by platform code */ | ||
378 | }; | 379 | }; |
379 | 380 | ||
380 | /* SoC audio ops */ | 381 | /* SoC audio ops */ |
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 5fb72733331e..d870a918559c 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -40,6 +40,16 @@ DECLARE_EVENT_CLASS(block_rq_with_error, | |||
40 | __entry->nr_sector, __entry->errors) | 40 | __entry->nr_sector, __entry->errors) |
41 | ); | 41 | ); |
42 | 42 | ||
43 | /** | ||
44 | * block_rq_abort - abort block operation request | ||
45 | * @q: queue containing the block operation request | ||
46 | * @rq: block IO operation request | ||
47 | * | ||
48 | * Called immediately after pending block IO operation request @rq in | ||
49 | * queue @q is aborted. The fields in the operation request @rq | ||
50 | * can be examined to determine which device and sectors the pending | ||
51 | * operation would access. | ||
52 | */ | ||
43 | DEFINE_EVENT(block_rq_with_error, block_rq_abort, | 53 | DEFINE_EVENT(block_rq_with_error, block_rq_abort, |
44 | 54 | ||
45 | TP_PROTO(struct request_queue *q, struct request *rq), | 55 | TP_PROTO(struct request_queue *q, struct request *rq), |
@@ -47,6 +57,15 @@ DEFINE_EVENT(block_rq_with_error, block_rq_abort, | |||
47 | TP_ARGS(q, rq) | 57 | TP_ARGS(q, rq) |
48 | ); | 58 | ); |
49 | 59 | ||
60 | /** | ||
61 | * block_rq_requeue - place block IO request back on a queue | ||
62 | * @q: queue holding operation | ||
63 | * @rq: block IO operation request | ||
64 | * | ||
65 | * The block operation request @rq is being placed back into queue | ||
66 | * @q. For some reason the request was not completed and needs to be | ||
67 | * put back in the queue. | ||
68 | */ | ||
50 | DEFINE_EVENT(block_rq_with_error, block_rq_requeue, | 69 | DEFINE_EVENT(block_rq_with_error, block_rq_requeue, |
51 | 70 | ||
52 | TP_PROTO(struct request_queue *q, struct request *rq), | 71 | TP_PROTO(struct request_queue *q, struct request *rq), |
@@ -54,6 +73,17 @@ DEFINE_EVENT(block_rq_with_error, block_rq_requeue, | |||
54 | TP_ARGS(q, rq) | 73 | TP_ARGS(q, rq) |
55 | ); | 74 | ); |
56 | 75 | ||
76 | /** | ||
77 | * block_rq_complete - block IO operation completed by device driver | ||
78 | * @q: queue containing the block operation request | ||
79 | * @rq: block operations request | ||
80 | * | ||
81 | * The block_rq_complete tracepoint event indicates that some portion | ||
82 | * of operation request has been completed by the device driver. If | ||
83 | * the @rq->bio is %NULL, then there is absolutely no additional work to | ||
84 | * do for the request. If @rq->bio is non-NULL then there is | ||
85 | * additional work required to complete the request. | ||
86 | */ | ||
57 | DEFINE_EVENT(block_rq_with_error, block_rq_complete, | 87 | DEFINE_EVENT(block_rq_with_error, block_rq_complete, |
58 | 88 | ||
59 | TP_PROTO(struct request_queue *q, struct request *rq), | 89 | TP_PROTO(struct request_queue *q, struct request *rq), |
@@ -95,6 +125,16 @@ DECLARE_EVENT_CLASS(block_rq, | |||
95 | __entry->nr_sector, __entry->comm) | 125 | __entry->nr_sector, __entry->comm) |
96 | ); | 126 | ); |
97 | 127 | ||
128 | /** | ||
129 | * block_rq_insert - insert block operation request into queue | ||
130 | * @q: target queue | ||
131 | * @rq: block IO operation request | ||
132 | * | ||
133 | * Called immediately before block operation request @rq is inserted | ||
134 | * into queue @q. The fields in the operation request @rq struct can | ||
135 | * be examined to determine which device and sectors the pending | ||
136 | * operation would access. | ||
137 | */ | ||
98 | DEFINE_EVENT(block_rq, block_rq_insert, | 138 | DEFINE_EVENT(block_rq, block_rq_insert, |
99 | 139 | ||
100 | TP_PROTO(struct request_queue *q, struct request *rq), | 140 | TP_PROTO(struct request_queue *q, struct request *rq), |
@@ -102,6 +142,14 @@ DEFINE_EVENT(block_rq, block_rq_insert, | |||
102 | TP_ARGS(q, rq) | 142 | TP_ARGS(q, rq) |
103 | ); | 143 | ); |
104 | 144 | ||
145 | /** | ||
146 | * block_rq_issue - issue pending block IO request operation to device driver | ||
147 | * @q: queue holding operation | ||
148 | * @rq: block IO operation operation request | ||
149 | * | ||
150 | * Called when block operation request @rq from queue @q is sent to a | ||
151 | * device driver for processing. | ||
152 | */ | ||
105 | DEFINE_EVENT(block_rq, block_rq_issue, | 153 | DEFINE_EVENT(block_rq, block_rq_issue, |
106 | 154 | ||
107 | TP_PROTO(struct request_queue *q, struct request *rq), | 155 | TP_PROTO(struct request_queue *q, struct request *rq), |
@@ -109,6 +157,17 @@ DEFINE_EVENT(block_rq, block_rq_issue, | |||
109 | TP_ARGS(q, rq) | 157 | TP_ARGS(q, rq) |
110 | ); | 158 | ); |
111 | 159 | ||
160 | /** | ||
161 | * block_bio_bounce - used bounce buffer when processing block operation | ||
162 | * @q: queue holding the block operation | ||
163 | * @bio: block operation | ||
164 | * | ||
165 | * A bounce buffer was used to handle the block operation @bio in @q. | ||
166 | * This occurs when hardware limitations prevent a direct transfer of | ||
167 | * data between the @bio data memory area and the IO device. Use of a | ||
168 | * bounce buffer requires extra copying of data and decreases | ||
169 | * performance. | ||
170 | */ | ||
112 | TRACE_EVENT(block_bio_bounce, | 171 | TRACE_EVENT(block_bio_bounce, |
113 | 172 | ||
114 | TP_PROTO(struct request_queue *q, struct bio *bio), | 173 | TP_PROTO(struct request_queue *q, struct bio *bio), |
@@ -138,6 +197,14 @@ TRACE_EVENT(block_bio_bounce, | |||
138 | __entry->nr_sector, __entry->comm) | 197 | __entry->nr_sector, __entry->comm) |
139 | ); | 198 | ); |
140 | 199 | ||
200 | /** | ||
201 | * block_bio_complete - completed all work on the block operation | ||
202 | * @q: queue holding the block operation | ||
203 | * @bio: block operation completed | ||
204 | * | ||
205 | * This tracepoint indicates there is no further work to do on this | ||
206 | * block IO operation @bio. | ||
207 | */ | ||
141 | TRACE_EVENT(block_bio_complete, | 208 | TRACE_EVENT(block_bio_complete, |
142 | 209 | ||
143 | TP_PROTO(struct request_queue *q, struct bio *bio), | 210 | TP_PROTO(struct request_queue *q, struct bio *bio), |
@@ -193,6 +260,14 @@ DECLARE_EVENT_CLASS(block_bio, | |||
193 | __entry->nr_sector, __entry->comm) | 260 | __entry->nr_sector, __entry->comm) |
194 | ); | 261 | ); |
195 | 262 | ||
263 | /** | ||
264 | * block_bio_backmerge - merging block operation to the end of an existing operation | ||
265 | * @q: queue holding operation | ||
266 | * @bio: new block operation to merge | ||
267 | * | ||
268 | * Merging block request @bio to the end of an existing block request | ||
269 | * in queue @q. | ||
270 | */ | ||
196 | DEFINE_EVENT(block_bio, block_bio_backmerge, | 271 | DEFINE_EVENT(block_bio, block_bio_backmerge, |
197 | 272 | ||
198 | TP_PROTO(struct request_queue *q, struct bio *bio), | 273 | TP_PROTO(struct request_queue *q, struct bio *bio), |
@@ -200,6 +275,14 @@ DEFINE_EVENT(block_bio, block_bio_backmerge, | |||
200 | TP_ARGS(q, bio) | 275 | TP_ARGS(q, bio) |
201 | ); | 276 | ); |
202 | 277 | ||
278 | /** | ||
279 | * block_bio_frontmerge - merging block operation to the beginning of an existing operation | ||
280 | * @q: queue holding operation | ||
281 | * @bio: new block operation to merge | ||
282 | * | ||
283 | * Merging block IO operation @bio to the beginning of an existing block | ||
284 | * operation in queue @q. | ||
285 | */ | ||
203 | DEFINE_EVENT(block_bio, block_bio_frontmerge, | 286 | DEFINE_EVENT(block_bio, block_bio_frontmerge, |
204 | 287 | ||
205 | TP_PROTO(struct request_queue *q, struct bio *bio), | 288 | TP_PROTO(struct request_queue *q, struct bio *bio), |
@@ -207,6 +290,13 @@ DEFINE_EVENT(block_bio, block_bio_frontmerge, | |||
207 | TP_ARGS(q, bio) | 290 | TP_ARGS(q, bio) |
208 | ); | 291 | ); |
209 | 292 | ||
293 | /** | ||
294 | * block_bio_queue - putting new block IO operation in queue | ||
295 | * @q: queue holding operation | ||
296 | * @bio: new block operation | ||
297 | * | ||
298 | * About to place the block IO operation @bio into queue @q. | ||
299 | */ | ||
210 | DEFINE_EVENT(block_bio, block_bio_queue, | 300 | DEFINE_EVENT(block_bio, block_bio_queue, |
211 | 301 | ||
212 | TP_PROTO(struct request_queue *q, struct bio *bio), | 302 | TP_PROTO(struct request_queue *q, struct bio *bio), |
@@ -243,6 +333,15 @@ DECLARE_EVENT_CLASS(block_get_rq, | |||
243 | __entry->nr_sector, __entry->comm) | 333 | __entry->nr_sector, __entry->comm) |
244 | ); | 334 | ); |
245 | 335 | ||
336 | /** | ||
337 | * block_getrq - get a free request entry in queue for block IO operations | ||
338 | * @q: queue for operations | ||
339 | * @bio: pending block IO operation | ||
340 | * @rw: low bit indicates a read (%0) or a write (%1) | ||
341 | * | ||
342 | * A request struct for queue @q has been allocated to handle the | ||
343 | * block IO operation @bio. | ||
344 | */ | ||
246 | DEFINE_EVENT(block_get_rq, block_getrq, | 345 | DEFINE_EVENT(block_get_rq, block_getrq, |
247 | 346 | ||
248 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), | 347 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), |
@@ -250,6 +349,17 @@ DEFINE_EVENT(block_get_rq, block_getrq, | |||
250 | TP_ARGS(q, bio, rw) | 349 | TP_ARGS(q, bio, rw) |
251 | ); | 350 | ); |
252 | 351 | ||
352 | /** | ||
353 | * block_sleeprq - waiting to get a free request entry in queue for block IO operation | ||
354 | * @q: queue for operation | ||
355 | * @bio: pending block IO operation | ||
356 | * @rw: low bit indicates a read (%0) or a write (%1) | ||
357 | * | ||
358 | * In the case where a request struct cannot be provided for queue @q | ||
359 | * the process needs to wait for an request struct to become | ||
360 | * available. This tracepoint event is generated each time the | ||
361 | * process goes to sleep waiting for request struct become available. | ||
362 | */ | ||
253 | DEFINE_EVENT(block_get_rq, block_sleeprq, | 363 | DEFINE_EVENT(block_get_rq, block_sleeprq, |
254 | 364 | ||
255 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), | 365 | TP_PROTO(struct request_queue *q, struct bio *bio, int rw), |
@@ -257,6 +367,14 @@ DEFINE_EVENT(block_get_rq, block_sleeprq, | |||
257 | TP_ARGS(q, bio, rw) | 367 | TP_ARGS(q, bio, rw) |
258 | ); | 368 | ); |
259 | 369 | ||
370 | /** | ||
371 | * block_plug - keep operations requests in request queue | ||
372 | * @q: request queue to plug | ||
373 | * | ||
374 | * Plug the request queue @q. Do not allow block operation requests | ||
375 | * to be sent to the device driver. Instead, accumulate requests in | ||
376 | * the queue to improve throughput performance of the block device. | ||
377 | */ | ||
260 | TRACE_EVENT(block_plug, | 378 | TRACE_EVENT(block_plug, |
261 | 379 | ||
262 | TP_PROTO(struct request_queue *q), | 380 | TP_PROTO(struct request_queue *q), |
@@ -293,6 +411,13 @@ DECLARE_EVENT_CLASS(block_unplug, | |||
293 | TP_printk("[%s] %d", __entry->comm, __entry->nr_rq) | 411 | TP_printk("[%s] %d", __entry->comm, __entry->nr_rq) |
294 | ); | 412 | ); |
295 | 413 | ||
414 | /** | ||
415 | * block_unplug_timer - timed release of operations requests in queue to device driver | ||
416 | * @q: request queue to unplug | ||
417 | * | ||
418 | * Unplug the request queue @q because a timer expired and allow block | ||
419 | * operation requests to be sent to the device driver. | ||
420 | */ | ||
296 | DEFINE_EVENT(block_unplug, block_unplug_timer, | 421 | DEFINE_EVENT(block_unplug, block_unplug_timer, |
297 | 422 | ||
298 | TP_PROTO(struct request_queue *q), | 423 | TP_PROTO(struct request_queue *q), |
@@ -300,6 +425,13 @@ DEFINE_EVENT(block_unplug, block_unplug_timer, | |||
300 | TP_ARGS(q) | 425 | TP_ARGS(q) |
301 | ); | 426 | ); |
302 | 427 | ||
428 | /** | ||
429 | * block_unplug_io - release of operations requests in request queue | ||
430 | * @q: request queue to unplug | ||
431 | * | ||
432 | * Unplug request queue @q because device driver is scheduled to work | ||
433 | * on elements in the request queue. | ||
434 | */ | ||
303 | DEFINE_EVENT(block_unplug, block_unplug_io, | 435 | DEFINE_EVENT(block_unplug, block_unplug_io, |
304 | 436 | ||
305 | TP_PROTO(struct request_queue *q), | 437 | TP_PROTO(struct request_queue *q), |
@@ -307,6 +439,17 @@ DEFINE_EVENT(block_unplug, block_unplug_io, | |||
307 | TP_ARGS(q) | 439 | TP_ARGS(q) |
308 | ); | 440 | ); |
309 | 441 | ||
442 | /** | ||
443 | * block_split - split a single bio struct into two bio structs | ||
444 | * @q: queue containing the bio | ||
445 | * @bio: block operation being split | ||
446 | * @new_sector: The starting sector for the new bio | ||
447 | * | ||
448 | * The bio request @bio in request queue @q needs to be split into two | ||
449 | * bio requests. The newly created @bio request starts at | ||
450 | * @new_sector. This split may be required due to hardware limitation | ||
451 | * such as operation crossing device boundaries in a RAID system. | ||
452 | */ | ||
310 | TRACE_EVENT(block_split, | 453 | TRACE_EVENT(block_split, |
311 | 454 | ||
312 | TP_PROTO(struct request_queue *q, struct bio *bio, | 455 | TP_PROTO(struct request_queue *q, struct bio *bio, |
@@ -337,6 +480,16 @@ TRACE_EVENT(block_split, | |||
337 | __entry->comm) | 480 | __entry->comm) |
338 | ); | 481 | ); |
339 | 482 | ||
483 | /** | ||
484 | * block_remap - map request for a partition to the raw device | ||
485 | * @q: queue holding the operation | ||
486 | * @bio: revised operation | ||
487 | * @dev: device for the operation | ||
488 | * @from: original sector for the operation | ||
489 | * | ||
490 | * An operation for a partition on a block device has been mapped to the | ||
491 | * raw block device. | ||
492 | */ | ||
340 | TRACE_EVENT(block_remap, | 493 | TRACE_EVENT(block_remap, |
341 | 494 | ||
342 | TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev, | 495 | TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev, |
@@ -370,6 +523,17 @@ TRACE_EVENT(block_remap, | |||
370 | (unsigned long long)__entry->old_sector) | 523 | (unsigned long long)__entry->old_sector) |
371 | ); | 524 | ); |
372 | 525 | ||
526 | /** | ||
527 | * block_rq_remap - map request for a block operation request | ||
528 | * @q: queue holding the operation | ||
529 | * @rq: block IO operation request | ||
530 | * @dev: device for the operation | ||
531 | * @from: original sector for the operation | ||
532 | * | ||
533 | * The block operation request @rq in @q has been remapped. The block | ||
534 | * operation request @rq holds the current information and @from hold | ||
535 | * the original sector. | ||
536 | */ | ||
373 | TRACE_EVENT(block_rq_remap, | 537 | TRACE_EVENT(block_rq_remap, |
374 | 538 | ||
375 | TP_PROTO(struct request_queue *q, struct request *rq, dev_t dev, | 539 | TP_PROTO(struct request_queue *q, struct request *rq, dev_t dev, |
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h index b9763badbd77..43e2d7d33976 100644 --- a/include/xen/xenbus.h +++ b/include/xen/xenbus.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/mutex.h> | 39 | #include <linux/mutex.h> |
40 | #include <linux/completion.h> | 40 | #include <linux/completion.h> |
41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
42 | #include <linux/slab.h> | ||
42 | #include <xen/interface/xen.h> | 43 | #include <xen/interface/xen.h> |
43 | #include <xen/interface/grant_table.h> | 44 | #include <xen/interface/grant_table.h> |
44 | #include <xen/interface/io/xenbus.h> | 45 | #include <xen/interface/io/xenbus.h> |
diff --git a/init/do_mounts.c b/init/do_mounts.c index bb008d064c1a..02e3ca4fc527 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/initrd.h> | 15 | #include <linux/initrd.h> |
16 | #include <linux/async.h> | 16 | #include <linux/async.h> |
17 | #include <linux/fs_struct.h> | 17 | #include <linux/fs_struct.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include <linux/nfs_fs.h> | 20 | #include <linux/nfs_fs.h> |
20 | #include <linux/nfs_fs_sb.h> | 21 | #include <linux/nfs_fs_sb.h> |
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index 027a402708de..bf3ef667bf36 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/cramfs_fs.h> | 7 | #include <linux/cramfs_fs.h> |
8 | #include <linux/initrd.h> | 8 | #include <linux/initrd.h> |
9 | #include <linux/string.h> | 9 | #include <linux/string.h> |
10 | #include <linux/slab.h> | ||
10 | 11 | ||
11 | #include "do_mounts.h" | 12 | #include "do_mounts.h" |
12 | #include "../fs/squashfs/squashfs_fs.h" | 13 | #include "../fs/squashfs/squashfs_fs.h" |
diff --git a/init/main.c b/init/main.c index a1ab78ceb4b6..5c8540271529 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/bootmem.h> | 25 | #include <linux/bootmem.h> |
26 | #include <linux/acpi.h> | 26 | #include <linux/acpi.h> |
27 | #include <linux/tty.h> | 27 | #include <linux/tty.h> |
28 | #include <linux/gfp.h> | ||
29 | #include <linux/percpu.h> | 28 | #include <linux/percpu.h> |
30 | #include <linux/kmod.h> | 29 | #include <linux/kmod.h> |
31 | #include <linux/vmalloc.h> | 30 | #include <linux/vmalloc.h> |
@@ -69,6 +68,7 @@ | |||
69 | #include <linux/kmemtrace.h> | 68 | #include <linux/kmemtrace.h> |
70 | #include <linux/sfi.h> | 69 | #include <linux/sfi.h> |
71 | #include <linux/shmem_fs.h> | 70 | #include <linux/shmem_fs.h> |
71 | #include <linux/slab.h> | ||
72 | #include <trace/boot.h> | 72 | #include <trace/boot.h> |
73 | 73 | ||
74 | #include <asm/io.h> | 74 | #include <asm/io.h> |
@@ -858,7 +858,7 @@ static int __init kernel_init(void * unused) | |||
858 | /* | 858 | /* |
859 | * init can allocate pages on any node | 859 | * init can allocate pages on any node |
860 | */ | 860 | */ |
861 | set_mems_allowed(node_possible_map); | 861 | set_mems_allowed(node_states[N_HIGH_MEMORY]); |
862 | /* | 862 | /* |
863 | * init can run on any cpu. | 863 | * init can run on any cpu. |
864 | */ | 864 | */ |
diff --git a/ipc/compat.c b/ipc/compat.c index ab76fb0ef844..9dc2c7d3c9e6 100644 --- a/ipc/compat.c +++ b/ipc/compat.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/msg.h> | 27 | #include <linux/msg.h> |
28 | #include <linux/shm.h> | 28 | #include <linux/shm.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/syscalls.h> | 29 | #include <linux/syscalls.h> |
31 | 30 | ||
32 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index e4e3f04803ca..722b0130aa94 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/nsproxy.h> | 32 | #include <linux/nsproxy.h> |
33 | #include <linux/pid.h> | 33 | #include <linux/pid.h> |
34 | #include <linux/ipc_namespace.h> | 34 | #include <linux/ipc_namespace.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #include <net/sock.h> | 37 | #include <net/sock.h> |
37 | #include "util.h" | 38 | #include "util.h" |
@@ -23,7 +23,6 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/capability.h> | 25 | #include <linux/capability.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/msg.h> | 26 | #include <linux/msg.h> |
28 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
diff --git a/kernel/async.c b/kernel/async.c index 27235f5de198..15319d6c18fe 100644 --- a/kernel/async.c +++ b/kernel/async.c | |||
@@ -56,6 +56,7 @@ asynchronous and synchronous parts of the kernel. | |||
56 | #include <linux/init.h> | 56 | #include <linux/init.h> |
57 | #include <linux/kthread.h> | 57 | #include <linux/kthread.h> |
58 | #include <linux/delay.h> | 58 | #include <linux/delay.h> |
59 | #include <linux/slab.h> | ||
59 | #include <asm/atomic.h> | 60 | #include <asm/atomic.h> |
60 | 61 | ||
61 | static async_cookie_t next_cookie = 1; | 62 | static async_cookie_t next_cookie = 1; |
diff --git a/kernel/audit.c b/kernel/audit.c index 78f7f86aa238..c71bd26631a2 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <asm/atomic.h> | 46 | #include <asm/atomic.h> |
47 | #include <linux/mm.h> | 47 | #include <linux/mm.h> |
48 | #include <linux/module.h> | 48 | #include <linux/module.h> |
49 | #include <linux/slab.h> | ||
49 | #include <linux/err.h> | 50 | #include <linux/err.h> |
50 | #include <linux/kthread.h> | 51 | #include <linux/kthread.h> |
51 | 52 | ||
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index 028e85663f27..46a57b57a335 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/namei.h> | 3 | #include <linux/namei.h> |
4 | #include <linux/mount.h> | 4 | #include <linux/mount.h> |
5 | #include <linux/kthread.h> | 5 | #include <linux/kthread.h> |
6 | #include <linux/slab.h> | ||
6 | 7 | ||
7 | struct audit_tree; | 8 | struct audit_tree; |
8 | struct audit_chunk; | 9 | struct audit_chunk; |
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index cc7e87936cbc..8df43696f4ba 100644 --- a/kernel/audit_watch.c +++ b/kernel/audit_watch.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/namei.h> | 27 | #include <linux/namei.h> |
28 | #include <linux/netlink.h> | 28 | #include <linux/netlink.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/inotify.h> | 31 | #include <linux/inotify.h> |
31 | #include <linux/security.h> | 32 | #include <linux/security.h> |
32 | #include "audit.h" | 33 | #include "audit.h" |
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index a70604047f3c..ce08041f578d 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/namei.h> | 27 | #include <linux/namei.h> |
28 | #include <linux/netlink.h> | 28 | #include <linux/netlink.h> |
29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/security.h> | 31 | #include <linux/security.h> |
31 | #include "audit.h" | 32 | #include "audit.h" |
32 | 33 | ||
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index f3a461c0970a..3828ad5fb8f1 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/namei.h> | 49 | #include <linux/namei.h> |
50 | #include <linux/mm.h> | 50 | #include <linux/mm.h> |
51 | #include <linux/module.h> | 51 | #include <linux/module.h> |
52 | #include <linux/slab.h> | ||
52 | #include <linux/mount.h> | 53 | #include <linux/mount.h> |
53 | #include <linux/socket.h> | 54 | #include <linux/socket.h> |
54 | #include <linux/mqueue.h> | 55 | #include <linux/mqueue.h> |
@@ -1893,7 +1894,7 @@ static int audit_inc_name_count(struct audit_context *context, | |||
1893 | { | 1894 | { |
1894 | if (context->name_count >= AUDIT_NAMES) { | 1895 | if (context->name_count >= AUDIT_NAMES) { |
1895 | if (inode) | 1896 | if (inode) |
1896 | printk(KERN_DEBUG "name_count maxed, losing inode data: " | 1897 | printk(KERN_DEBUG "audit: name_count maxed, losing inode data: " |
1897 | "dev=%02x:%02x, inode=%lu\n", | 1898 | "dev=%02x:%02x, inode=%lu\n", |
1898 | MAJOR(inode->i_sb->s_dev), | 1899 | MAJOR(inode->i_sb->s_dev), |
1899 | MINOR(inode->i_sb->s_dev), | 1900 | MINOR(inode->i_sb->s_dev), |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index ef909a329750..e2769e13980c 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -27,7 +27,6 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/cgroup.h> | 29 | #include <linux/cgroup.h> |
30 | #include <linux/module.h> | ||
31 | #include <linux/ctype.h> | 30 | #include <linux/ctype.h> |
32 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
33 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c index 59e9ef6aab40..da5e13975531 100644 --- a/kernel/cgroup_freezer.c +++ b/kernel/cgroup_freezer.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/cgroup.h> | 19 | #include <linux/cgroup.h> |
19 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
20 | #include <linux/uaccess.h> | 21 | #include <linux/uaccess.h> |
@@ -47,17 +48,20 @@ static inline struct freezer *task_freezer(struct task_struct *task) | |||
47 | struct freezer, css); | 48 | struct freezer, css); |
48 | } | 49 | } |
49 | 50 | ||
50 | int cgroup_frozen(struct task_struct *task) | 51 | int cgroup_freezing_or_frozen(struct task_struct *task) |
51 | { | 52 | { |
52 | struct freezer *freezer; | 53 | struct freezer *freezer; |
53 | enum freezer_state state; | 54 | enum freezer_state state; |
54 | 55 | ||
55 | task_lock(task); | 56 | task_lock(task); |
56 | freezer = task_freezer(task); | 57 | freezer = task_freezer(task); |
57 | state = freezer->state; | 58 | if (!freezer->css.cgroup->parent) |
59 | state = CGROUP_THAWED; /* root cgroup can't be frozen */ | ||
60 | else | ||
61 | state = freezer->state; | ||
58 | task_unlock(task); | 62 | task_unlock(task); |
59 | 63 | ||
60 | return state == CGROUP_FROZEN; | 64 | return (state == CGROUP_FREEZING) || (state == CGROUP_FROZEN); |
61 | } | 65 | } |
62 | 66 | ||
63 | /* | 67 | /* |
diff --git a/kernel/compat.c b/kernel/compat.c index f6c204f07ea6..7f40e9275fd9 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/posix-timers.h> | 25 | #include <linux/posix-timers.h> |
26 | #include <linux/times.h> | 26 | #include <linux/times.h> |
27 | #include <linux/ptrace.h> | 27 | #include <linux/ptrace.h> |
28 | #include <linux/gfp.h> | ||
28 | 29 | ||
29 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
30 | 31 | ||
diff --git a/kernel/cpu.c b/kernel/cpu.c index f8cced2692b3..25bba73b1be3 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kthread.h> | 14 | #include <linux/kthread.h> |
15 | #include <linux/stop_machine.h> | 15 | #include <linux/stop_machine.h> |
16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
17 | #include <linux/gfp.h> | ||
17 | 18 | ||
18 | #ifdef CONFIG_SMP | 19 | #ifdef CONFIG_SMP |
19 | /* Serializes the updates to cpu_online_mask, cpu_present_mask */ | 20 | /* Serializes the updates to cpu_online_mask, cpu_present_mask */ |
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index ba401fab459f..d10946748ec2 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -920,9 +920,6 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs, | |||
920 | * call to guarantee_online_mems(), as we know no one is changing | 920 | * call to guarantee_online_mems(), as we know no one is changing |
921 | * our task's cpuset. | 921 | * our task's cpuset. |
922 | * | 922 | * |
923 | * Hold callback_mutex around the two modifications of our tasks | ||
924 | * mems_allowed to synchronize with cpuset_mems_allowed(). | ||
925 | * | ||
926 | * While the mm_struct we are migrating is typically from some | 923 | * While the mm_struct we are migrating is typically from some |
927 | * other task, the task_struct mems_allowed that we are hacking | 924 | * other task, the task_struct mems_allowed that we are hacking |
928 | * is for our current task, which must allocate new pages for that | 925 | * is for our current task, which must allocate new pages for that |
@@ -973,15 +970,20 @@ static void cpuset_change_nodemask(struct task_struct *p, | |||
973 | struct cpuset *cs; | 970 | struct cpuset *cs; |
974 | int migrate; | 971 | int migrate; |
975 | const nodemask_t *oldmem = scan->data; | 972 | const nodemask_t *oldmem = scan->data; |
976 | nodemask_t newmems; | 973 | NODEMASK_ALLOC(nodemask_t, newmems, GFP_KERNEL); |
974 | |||
975 | if (!newmems) | ||
976 | return; | ||
977 | 977 | ||
978 | cs = cgroup_cs(scan->cg); | 978 | cs = cgroup_cs(scan->cg); |
979 | guarantee_online_mems(cs, &newmems); | 979 | guarantee_online_mems(cs, newmems); |
980 | 980 | ||
981 | task_lock(p); | 981 | task_lock(p); |
982 | cpuset_change_task_nodemask(p, &newmems); | 982 | cpuset_change_task_nodemask(p, newmems); |
983 | task_unlock(p); | 983 | task_unlock(p); |
984 | 984 | ||
985 | NODEMASK_FREE(newmems); | ||
986 | |||
985 | mm = get_task_mm(p); | 987 | mm = get_task_mm(p); |
986 | if (!mm) | 988 | if (!mm) |
987 | return; | 989 | return; |
@@ -1051,16 +1053,21 @@ static void update_tasks_nodemask(struct cpuset *cs, const nodemask_t *oldmem, | |||
1051 | static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, | 1053 | static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, |
1052 | const char *buf) | 1054 | const char *buf) |
1053 | { | 1055 | { |
1054 | nodemask_t oldmem; | 1056 | NODEMASK_ALLOC(nodemask_t, oldmem, GFP_KERNEL); |
1055 | int retval; | 1057 | int retval; |
1056 | struct ptr_heap heap; | 1058 | struct ptr_heap heap; |
1057 | 1059 | ||
1060 | if (!oldmem) | ||
1061 | return -ENOMEM; | ||
1062 | |||
1058 | /* | 1063 | /* |
1059 | * top_cpuset.mems_allowed tracks node_stats[N_HIGH_MEMORY]; | 1064 | * top_cpuset.mems_allowed tracks node_stats[N_HIGH_MEMORY]; |
1060 | * it's read-only | 1065 | * it's read-only |
1061 | */ | 1066 | */ |
1062 | if (cs == &top_cpuset) | 1067 | if (cs == &top_cpuset) { |
1063 | return -EACCES; | 1068 | retval = -EACCES; |
1069 | goto done; | ||
1070 | } | ||
1064 | 1071 | ||
1065 | /* | 1072 | /* |
1066 | * An empty mems_allowed is ok iff there are no tasks in the cpuset. | 1073 | * An empty mems_allowed is ok iff there are no tasks in the cpuset. |
@@ -1076,11 +1083,13 @@ static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, | |||
1076 | goto done; | 1083 | goto done; |
1077 | 1084 | ||
1078 | if (!nodes_subset(trialcs->mems_allowed, | 1085 | if (!nodes_subset(trialcs->mems_allowed, |
1079 | node_states[N_HIGH_MEMORY])) | 1086 | node_states[N_HIGH_MEMORY])) { |
1080 | return -EINVAL; | 1087 | retval = -EINVAL; |
1088 | goto done; | ||
1089 | } | ||
1081 | } | 1090 | } |
1082 | oldmem = cs->mems_allowed; | 1091 | *oldmem = cs->mems_allowed; |
1083 | if (nodes_equal(oldmem, trialcs->mems_allowed)) { | 1092 | if (nodes_equal(*oldmem, trialcs->mems_allowed)) { |
1084 | retval = 0; /* Too easy - nothing to do */ | 1093 | retval = 0; /* Too easy - nothing to do */ |
1085 | goto done; | 1094 | goto done; |
1086 | } | 1095 | } |
@@ -1096,10 +1105,11 @@ static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, | |||
1096 | cs->mems_allowed = trialcs->mems_allowed; | 1105 | cs->mems_allowed = trialcs->mems_allowed; |
1097 | mutex_unlock(&callback_mutex); | 1106 | mutex_unlock(&callback_mutex); |
1098 | 1107 | ||
1099 | update_tasks_nodemask(cs, &oldmem, &heap); | 1108 | update_tasks_nodemask(cs, oldmem, &heap); |
1100 | 1109 | ||
1101 | heap_free(&heap); | 1110 | heap_free(&heap); |
1102 | done: | 1111 | done: |
1112 | NODEMASK_FREE(oldmem); | ||
1103 | return retval; | 1113 | return retval; |
1104 | } | 1114 | } |
1105 | 1115 | ||
@@ -1384,40 +1394,47 @@ static void cpuset_attach(struct cgroup_subsys *ss, struct cgroup *cont, | |||
1384 | struct cgroup *oldcont, struct task_struct *tsk, | 1394 | struct cgroup *oldcont, struct task_struct *tsk, |
1385 | bool threadgroup) | 1395 | bool threadgroup) |
1386 | { | 1396 | { |
1387 | nodemask_t from, to; | ||
1388 | struct mm_struct *mm; | 1397 | struct mm_struct *mm; |
1389 | struct cpuset *cs = cgroup_cs(cont); | 1398 | struct cpuset *cs = cgroup_cs(cont); |
1390 | struct cpuset *oldcs = cgroup_cs(oldcont); | 1399 | struct cpuset *oldcs = cgroup_cs(oldcont); |
1400 | NODEMASK_ALLOC(nodemask_t, from, GFP_KERNEL); | ||
1401 | NODEMASK_ALLOC(nodemask_t, to, GFP_KERNEL); | ||
1402 | |||
1403 | if (from == NULL || to == NULL) | ||
1404 | goto alloc_fail; | ||
1391 | 1405 | ||
1392 | if (cs == &top_cpuset) { | 1406 | if (cs == &top_cpuset) { |
1393 | cpumask_copy(cpus_attach, cpu_possible_mask); | 1407 | cpumask_copy(cpus_attach, cpu_possible_mask); |
1394 | to = node_possible_map; | ||
1395 | } else { | 1408 | } else { |
1396 | guarantee_online_cpus(cs, cpus_attach); | 1409 | guarantee_online_cpus(cs, cpus_attach); |
1397 | guarantee_online_mems(cs, &to); | ||
1398 | } | 1410 | } |
1411 | guarantee_online_mems(cs, to); | ||
1399 | 1412 | ||
1400 | /* do per-task migration stuff possibly for each in the threadgroup */ | 1413 | /* do per-task migration stuff possibly for each in the threadgroup */ |
1401 | cpuset_attach_task(tsk, &to, cs); | 1414 | cpuset_attach_task(tsk, to, cs); |
1402 | if (threadgroup) { | 1415 | if (threadgroup) { |
1403 | struct task_struct *c; | 1416 | struct task_struct *c; |
1404 | rcu_read_lock(); | 1417 | rcu_read_lock(); |
1405 | list_for_each_entry_rcu(c, &tsk->thread_group, thread_group) { | 1418 | list_for_each_entry_rcu(c, &tsk->thread_group, thread_group) { |
1406 | cpuset_attach_task(c, &to, cs); | 1419 | cpuset_attach_task(c, to, cs); |
1407 | } | 1420 | } |
1408 | rcu_read_unlock(); | 1421 | rcu_read_unlock(); |
1409 | } | 1422 | } |
1410 | 1423 | ||
1411 | /* change mm; only needs to be done once even if threadgroup */ | 1424 | /* change mm; only needs to be done once even if threadgroup */ |
1412 | from = oldcs->mems_allowed; | 1425 | *from = oldcs->mems_allowed; |
1413 | to = cs->mems_allowed; | 1426 | *to = cs->mems_allowed; |
1414 | mm = get_task_mm(tsk); | 1427 | mm = get_task_mm(tsk); |
1415 | if (mm) { | 1428 | if (mm) { |
1416 | mpol_rebind_mm(mm, &to); | 1429 | mpol_rebind_mm(mm, to); |
1417 | if (is_memory_migrate(cs)) | 1430 | if (is_memory_migrate(cs)) |
1418 | cpuset_migrate_mm(mm, &from, &to); | 1431 | cpuset_migrate_mm(mm, from, to); |
1419 | mmput(mm); | 1432 | mmput(mm); |
1420 | } | 1433 | } |
1434 | |||
1435 | alloc_fail: | ||
1436 | NODEMASK_FREE(from); | ||
1437 | NODEMASK_FREE(to); | ||
1421 | } | 1438 | } |
1422 | 1439 | ||
1423 | /* The various types of files and directories in a cpuset file system */ | 1440 | /* The various types of files and directories in a cpuset file system */ |
@@ -1562,13 +1579,21 @@ static int cpuset_sprintf_cpulist(char *page, struct cpuset *cs) | |||
1562 | 1579 | ||
1563 | static int cpuset_sprintf_memlist(char *page, struct cpuset *cs) | 1580 | static int cpuset_sprintf_memlist(char *page, struct cpuset *cs) |
1564 | { | 1581 | { |
1565 | nodemask_t mask; | 1582 | NODEMASK_ALLOC(nodemask_t, mask, GFP_KERNEL); |
1583 | int retval; | ||
1584 | |||
1585 | if (mask == NULL) | ||
1586 | return -ENOMEM; | ||
1566 | 1587 | ||
1567 | mutex_lock(&callback_mutex); | 1588 | mutex_lock(&callback_mutex); |
1568 | mask = cs->mems_allowed; | 1589 | *mask = cs->mems_allowed; |
1569 | mutex_unlock(&callback_mutex); | 1590 | mutex_unlock(&callback_mutex); |
1570 | 1591 | ||
1571 | return nodelist_scnprintf(page, PAGE_SIZE, mask); | 1592 | retval = nodelist_scnprintf(page, PAGE_SIZE, *mask); |
1593 | |||
1594 | NODEMASK_FREE(mask); | ||
1595 | |||
1596 | return retval; | ||
1572 | } | 1597 | } |
1573 | 1598 | ||
1574 | static ssize_t cpuset_common_file_read(struct cgroup *cont, | 1599 | static ssize_t cpuset_common_file_read(struct cgroup *cont, |
@@ -1997,7 +2022,10 @@ static void scan_for_empty_cpusets(struct cpuset *root) | |||
1997 | struct cpuset *cp; /* scans cpusets being updated */ | 2022 | struct cpuset *cp; /* scans cpusets being updated */ |
1998 | struct cpuset *child; /* scans child cpusets of cp */ | 2023 | struct cpuset *child; /* scans child cpusets of cp */ |
1999 | struct cgroup *cont; | 2024 | struct cgroup *cont; |
2000 | nodemask_t oldmems; | 2025 | NODEMASK_ALLOC(nodemask_t, oldmems, GFP_KERNEL); |
2026 | |||
2027 | if (oldmems == NULL) | ||
2028 | return; | ||
2001 | 2029 | ||
2002 | list_add_tail((struct list_head *)&root->stack_list, &queue); | 2030 | list_add_tail((struct list_head *)&root->stack_list, &queue); |
2003 | 2031 | ||
@@ -2014,7 +2042,7 @@ static void scan_for_empty_cpusets(struct cpuset *root) | |||
2014 | nodes_subset(cp->mems_allowed, node_states[N_HIGH_MEMORY])) | 2042 | nodes_subset(cp->mems_allowed, node_states[N_HIGH_MEMORY])) |
2015 | continue; | 2043 | continue; |
2016 | 2044 | ||
2017 | oldmems = cp->mems_allowed; | 2045 | *oldmems = cp->mems_allowed; |
2018 | 2046 | ||
2019 | /* Remove offline cpus and mems from this cpuset. */ | 2047 | /* Remove offline cpus and mems from this cpuset. */ |
2020 | mutex_lock(&callback_mutex); | 2048 | mutex_lock(&callback_mutex); |
@@ -2030,9 +2058,10 @@ static void scan_for_empty_cpusets(struct cpuset *root) | |||
2030 | remove_tasks_in_empty_cpuset(cp); | 2058 | remove_tasks_in_empty_cpuset(cp); |
2031 | else { | 2059 | else { |
2032 | update_tasks_cpumask(cp, NULL); | 2060 | update_tasks_cpumask(cp, NULL); |
2033 | update_tasks_nodemask(cp, &oldmems, NULL); | 2061 | update_tasks_nodemask(cp, oldmems, NULL); |
2034 | } | 2062 | } |
2035 | } | 2063 | } |
2064 | NODEMASK_FREE(oldmems); | ||
2036 | } | 2065 | } |
2037 | 2066 | ||
2038 | /* | 2067 | /* |
@@ -2090,20 +2119,33 @@ static int cpuset_track_online_cpus(struct notifier_block *unused_nb, | |||
2090 | static int cpuset_track_online_nodes(struct notifier_block *self, | 2119 | static int cpuset_track_online_nodes(struct notifier_block *self, |
2091 | unsigned long action, void *arg) | 2120 | unsigned long action, void *arg) |
2092 | { | 2121 | { |
2122 | NODEMASK_ALLOC(nodemask_t, oldmems, GFP_KERNEL); | ||
2123 | |||
2124 | if (oldmems == NULL) | ||
2125 | return NOTIFY_DONE; | ||
2126 | |||
2093 | cgroup_lock(); | 2127 | cgroup_lock(); |
2094 | switch (action) { | 2128 | switch (action) { |
2095 | case MEM_ONLINE: | 2129 | case MEM_ONLINE: |
2096 | case MEM_OFFLINE: | 2130 | *oldmems = top_cpuset.mems_allowed; |
2097 | mutex_lock(&callback_mutex); | 2131 | mutex_lock(&callback_mutex); |
2098 | top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY]; | 2132 | top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY]; |
2099 | mutex_unlock(&callback_mutex); | 2133 | mutex_unlock(&callback_mutex); |
2100 | if (action == MEM_OFFLINE) | 2134 | update_tasks_nodemask(&top_cpuset, oldmems, NULL); |
2101 | scan_for_empty_cpusets(&top_cpuset); | 2135 | break; |
2136 | case MEM_OFFLINE: | ||
2137 | /* | ||
2138 | * needn't update top_cpuset.mems_allowed explicitly because | ||
2139 | * scan_for_empty_cpusets() will update it. | ||
2140 | */ | ||
2141 | scan_for_empty_cpusets(&top_cpuset); | ||
2102 | break; | 2142 | break; |
2103 | default: | 2143 | default: |
2104 | break; | 2144 | break; |
2105 | } | 2145 | } |
2106 | cgroup_unlock(); | 2146 | cgroup_unlock(); |
2147 | |||
2148 | NODEMASK_FREE(oldmems); | ||
2107 | return NOTIFY_OK; | 2149 | return NOTIFY_OK; |
2108 | } | 2150 | } |
2109 | #endif | 2151 | #endif |
diff --git a/kernel/cred.c b/kernel/cred.c index 1ed8ca18790c..e1dbe9eef800 100644 --- a/kernel/cred.c +++ b/kernel/cred.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/cred.h> | 12 | #include <linux/cred.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
14 | #include <linux/key.h> | 15 | #include <linux/key.h> |
15 | #include <linux/keyctl.h> | 16 | #include <linux/keyctl.h> |
@@ -364,7 +365,7 @@ struct cred *prepare_usermodehelper_creds(void) | |||
364 | 365 | ||
365 | new = kmem_cache_alloc(cred_jar, GFP_ATOMIC); | 366 | new = kmem_cache_alloc(cred_jar, GFP_ATOMIC); |
366 | if (!new) | 367 | if (!new) |
367 | return NULL; | 368 | goto free_tgcred; |
368 | 369 | ||
369 | kdebug("prepare_usermodehelper_creds() alloc %p", new); | 370 | kdebug("prepare_usermodehelper_creds() alloc %p", new); |
370 | 371 | ||
@@ -397,6 +398,10 @@ struct cred *prepare_usermodehelper_creds(void) | |||
397 | 398 | ||
398 | error: | 399 | error: |
399 | put_cred(new); | 400 | put_cred(new); |
401 | free_tgcred: | ||
402 | #ifdef CONFIG_KEYS | ||
403 | kfree(tgcred); | ||
404 | #endif | ||
400 | return NULL; | 405 | return NULL; |
401 | } | 406 | } |
402 | 407 | ||
diff --git a/kernel/early_res.c b/kernel/early_res.c index 3cb2c661bb78..31aa9332ef3f 100644 --- a/kernel/early_res.c +++ b/kernel/early_res.c | |||
@@ -333,6 +333,12 @@ void __init free_early_partial(u64 start, u64 end) | |||
333 | struct early_res *r; | 333 | struct early_res *r; |
334 | int i; | 334 | int i; |
335 | 335 | ||
336 | if (start == end) | ||
337 | return; | ||
338 | |||
339 | if (WARN_ONCE(start > end, " wrong range [%#llx, %#llx]\n", start, end)) | ||
340 | return; | ||
341 | |||
336 | try_next: | 342 | try_next: |
337 | i = find_overlapped_early(start, end); | 343 | i = find_overlapped_early(start, end); |
338 | if (i >= max_early_res) | 344 | if (i >= max_early_res) |
diff --git a/kernel/exit.c b/kernel/exit.c index cce59cb5ee6a..7f2683a10ac4 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -953,7 +953,8 @@ NORET_TYPE void do_exit(long code) | |||
953 | 953 | ||
954 | acct_update_integrals(tsk); | 954 | acct_update_integrals(tsk); |
955 | /* sync mm's RSS info before statistics gathering */ | 955 | /* sync mm's RSS info before statistics gathering */ |
956 | sync_mm_rss(tsk, tsk->mm); | 956 | if (tsk->mm) |
957 | sync_mm_rss(tsk, tsk->mm); | ||
957 | group_dead = atomic_dec_and_test(&tsk->signal->live); | 958 | group_dead = atomic_dec_and_test(&tsk->signal->live); |
958 | if (group_dead) { | 959 | if (group_dead) { |
959 | hrtimer_cancel(&tsk->signal->real_timer); | 960 | hrtimer_cancel(&tsk->signal->real_timer); |
diff --git a/kernel/fork.c b/kernel/fork.c index 4799c5f0e6d0..44b0791b0a2e 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1052,6 +1052,9 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1052 | p->prev_utime = cputime_zero; | 1052 | p->prev_utime = cputime_zero; |
1053 | p->prev_stime = cputime_zero; | 1053 | p->prev_stime = cputime_zero; |
1054 | #endif | 1054 | #endif |
1055 | #if defined(SPLIT_RSS_COUNTING) | ||
1056 | memset(&p->rss_stat, 0, sizeof(p->rss_stat)); | ||
1057 | #endif | ||
1055 | 1058 | ||
1056 | p->default_timer_slack_ns = current->timer_slack_ns; | 1059 | p->default_timer_slack_ns = current->timer_slack_ns; |
1057 | 1060 | ||
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 42ec11b2af8a..b7091d5ca2f8 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -359,6 +359,23 @@ static inline void mask_ack_irq(struct irq_desc *desc, int irq) | |||
359 | if (desc->chip->ack) | 359 | if (desc->chip->ack) |
360 | desc->chip->ack(irq); | 360 | desc->chip->ack(irq); |
361 | } | 361 | } |
362 | desc->status |= IRQ_MASKED; | ||
363 | } | ||
364 | |||
365 | static inline void mask_irq(struct irq_desc *desc, int irq) | ||
366 | { | ||
367 | if (desc->chip->mask) { | ||
368 | desc->chip->mask(irq); | ||
369 | desc->status |= IRQ_MASKED; | ||
370 | } | ||
371 | } | ||
372 | |||
373 | static inline void unmask_irq(struct irq_desc *desc, int irq) | ||
374 | { | ||
375 | if (desc->chip->unmask) { | ||
376 | desc->chip->unmask(irq); | ||
377 | desc->status &= ~IRQ_MASKED; | ||
378 | } | ||
362 | } | 379 | } |
363 | 380 | ||
364 | /* | 381 | /* |
@@ -484,10 +501,8 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc) | |||
484 | raw_spin_lock(&desc->lock); | 501 | raw_spin_lock(&desc->lock); |
485 | desc->status &= ~IRQ_INPROGRESS; | 502 | desc->status &= ~IRQ_INPROGRESS; |
486 | 503 | ||
487 | if (unlikely(desc->status & IRQ_ONESHOT)) | 504 | if (!(desc->status & (IRQ_DISABLED | IRQ_ONESHOT))) |
488 | desc->status |= IRQ_MASKED; | 505 | unmask_irq(desc, irq); |
489 | else if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) | ||
490 | desc->chip->unmask(irq); | ||
491 | out_unlock: | 506 | out_unlock: |
492 | raw_spin_unlock(&desc->lock); | 507 | raw_spin_unlock(&desc->lock); |
493 | } | 508 | } |
@@ -524,8 +539,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) | |||
524 | action = desc->action; | 539 | action = desc->action; |
525 | if (unlikely(!action || (desc->status & IRQ_DISABLED))) { | 540 | if (unlikely(!action || (desc->status & IRQ_DISABLED))) { |
526 | desc->status |= IRQ_PENDING; | 541 | desc->status |= IRQ_PENDING; |
527 | if (desc->chip->mask) | 542 | mask_irq(desc, irq); |
528 | desc->chip->mask(irq); | ||
529 | goto out; | 543 | goto out; |
530 | } | 544 | } |
531 | 545 | ||
@@ -593,7 +607,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) | |||
593 | irqreturn_t action_ret; | 607 | irqreturn_t action_ret; |
594 | 608 | ||
595 | if (unlikely(!action)) { | 609 | if (unlikely(!action)) { |
596 | desc->chip->mask(irq); | 610 | mask_irq(desc, irq); |
597 | goto out_unlock; | 611 | goto out_unlock; |
598 | } | 612 | } |
599 | 613 | ||
@@ -605,8 +619,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) | |||
605 | if (unlikely((desc->status & | 619 | if (unlikely((desc->status & |
606 | (IRQ_PENDING | IRQ_MASKED | IRQ_DISABLED)) == | 620 | (IRQ_PENDING | IRQ_MASKED | IRQ_DISABLED)) == |
607 | (IRQ_PENDING | IRQ_MASKED))) { | 621 | (IRQ_PENDING | IRQ_MASKED))) { |
608 | desc->chip->unmask(irq); | 622 | unmask_irq(desc, irq); |
609 | desc->status &= ~IRQ_MASKED; | ||
610 | } | 623 | } |
611 | 624 | ||
612 | desc->status &= ~IRQ_PENDING; | 625 | desc->status &= ~IRQ_PENDING; |
@@ -716,7 +729,7 @@ set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, | |||
716 | __set_irq_handler(irq, handle, 0, name); | 729 | __set_irq_handler(irq, handle, 0, name); |
717 | } | 730 | } |
718 | 731 | ||
719 | void __init set_irq_noprobe(unsigned int irq) | 732 | void set_irq_noprobe(unsigned int irq) |
720 | { | 733 | { |
721 | struct irq_desc *desc = irq_to_desc(irq); | 734 | struct irq_desc *desc = irq_to_desc(irq); |
722 | unsigned long flags; | 735 | unsigned long flags; |
@@ -731,7 +744,7 @@ void __init set_irq_noprobe(unsigned int irq) | |||
731 | raw_spin_unlock_irqrestore(&desc->lock, flags); | 744 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
732 | } | 745 | } |
733 | 746 | ||
734 | void __init set_irq_probe(unsigned int irq) | 747 | void set_irq_probe(unsigned int irq) |
735 | { | 748 | { |
736 | struct irq_desc *desc = irq_to_desc(irq); | 749 | struct irq_desc *desc = irq_to_desc(irq); |
737 | unsigned long flags; | 750 | unsigned long flags; |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index eb6078ca60c7..704e488730a5 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -382,6 +382,7 @@ int can_request_irq(unsigned int irq, unsigned long irqflags) | |||
382 | { | 382 | { |
383 | struct irq_desc *desc = irq_to_desc(irq); | 383 | struct irq_desc *desc = irq_to_desc(irq); |
384 | struct irqaction *action; | 384 | struct irqaction *action; |
385 | unsigned long flags; | ||
385 | 386 | ||
386 | if (!desc) | 387 | if (!desc) |
387 | return 0; | 388 | return 0; |
@@ -389,11 +390,14 @@ int can_request_irq(unsigned int irq, unsigned long irqflags) | |||
389 | if (desc->status & IRQ_NOREQUEST) | 390 | if (desc->status & IRQ_NOREQUEST) |
390 | return 0; | 391 | return 0; |
391 | 392 | ||
393 | raw_spin_lock_irqsave(&desc->lock, flags); | ||
392 | action = desc->action; | 394 | action = desc->action; |
393 | if (action) | 395 | if (action) |
394 | if (irqflags & action->flags & IRQF_SHARED) | 396 | if (irqflags & action->flags & IRQF_SHARED) |
395 | action = NULL; | 397 | action = NULL; |
396 | 398 | ||
399 | raw_spin_unlock_irqrestore(&desc->lock, flags); | ||
400 | |||
397 | return !action; | 401 | return !action; |
398 | } | 402 | } |
399 | 403 | ||
@@ -483,8 +487,26 @@ static int irq_wait_for_interrupt(struct irqaction *action) | |||
483 | */ | 487 | */ |
484 | static void irq_finalize_oneshot(unsigned int irq, struct irq_desc *desc) | 488 | static void irq_finalize_oneshot(unsigned int irq, struct irq_desc *desc) |
485 | { | 489 | { |
490 | again: | ||
486 | chip_bus_lock(irq, desc); | 491 | chip_bus_lock(irq, desc); |
487 | raw_spin_lock_irq(&desc->lock); | 492 | raw_spin_lock_irq(&desc->lock); |
493 | |||
494 | /* | ||
495 | * Implausible though it may be we need to protect us against | ||
496 | * the following scenario: | ||
497 | * | ||
498 | * The thread is faster done than the hard interrupt handler | ||
499 | * on the other CPU. If we unmask the irq line then the | ||
500 | * interrupt can come in again and masks the line, leaves due | ||
501 | * to IRQ_INPROGRESS and the irq line is masked forever. | ||
502 | */ | ||
503 | if (unlikely(desc->status & IRQ_INPROGRESS)) { | ||
504 | raw_spin_unlock_irq(&desc->lock); | ||
505 | chip_bus_sync_unlock(irq, desc); | ||
506 | cpu_relax(); | ||
507 | goto again; | ||
508 | } | ||
509 | |||
488 | if (!(desc->status & IRQ_DISABLED) && (desc->status & IRQ_MASKED)) { | 510 | if (!(desc->status & IRQ_DISABLED) && (desc->status & IRQ_MASKED)) { |
489 | desc->status &= ~IRQ_MASKED; | 511 | desc->status &= ~IRQ_MASKED; |
490 | desc->chip->unmask(irq); | 512 | desc->chip->unmask(irq); |
@@ -735,6 +757,16 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | |||
735 | if (new->flags & IRQF_ONESHOT) | 757 | if (new->flags & IRQF_ONESHOT) |
736 | desc->status |= IRQ_ONESHOT; | 758 | desc->status |= IRQ_ONESHOT; |
737 | 759 | ||
760 | /* | ||
761 | * Force MSI interrupts to run with interrupts | ||
762 | * disabled. The multi vector cards can cause stack | ||
763 | * overflows due to nested interrupts when enough of | ||
764 | * them are directed to a core and fire at the same | ||
765 | * time. | ||
766 | */ | ||
767 | if (desc->msi_desc) | ||
768 | new->flags |= IRQF_DISABLED; | ||
769 | |||
738 | if (!(desc->status & IRQ_NOAUTOEN)) { | 770 | if (!(desc->status & IRQ_NOAUTOEN)) { |
739 | desc->depth = 0; | 771 | desc->depth = 0; |
740 | desc->status &= ~IRQ_DISABLED; | 772 | desc->status &= ~IRQ_DISABLED; |
diff --git a/kernel/irq/numa_migrate.c b/kernel/irq/numa_migrate.c index 963559dbd858..65d3845665ac 100644 --- a/kernel/irq/numa_migrate.c +++ b/kernel/irq/numa_migrate.c | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/irq.h> | 8 | #include <linux/irq.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/module.h> | 10 | #include <linux/module.h> |
10 | #include <linux/random.h> | 11 | #include <linux/random.h> |
11 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 6f50eccc79c0..7a6eb04ef6b5 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/irq.h> | 9 | #include <linux/irq.h> |
10 | #include <linux/gfp.h> | ||
10 | #include <linux/proc_fs.h> | 11 | #include <linux/proc_fs.h> |
11 | #include <linux/seq_file.h> | 12 | #include <linux/seq_file.h> |
12 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index 8e5288a8a355..13aff293f4de 100644 --- a/kernel/kallsyms.c +++ b/kernel/kallsyms.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/sched.h> /* for cond_resched */ | 21 | #include <linux/sched.h> /* for cond_resched */ |
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/ctype.h> | 23 | #include <linux/ctype.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <asm/sections.h> | 26 | #include <asm/sections.h> |
26 | 27 | ||
diff --git a/kernel/kgdb.c b/kernel/kgdb.c index 761fdd2b3034..11f3515ca83f 100644 --- a/kernel/kgdb.c +++ b/kernel/kgdb.c | |||
@@ -69,9 +69,16 @@ struct kgdb_state { | |||
69 | struct pt_regs *linux_regs; | 69 | struct pt_regs *linux_regs; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | /* Exception state values */ | ||
73 | #define DCPU_WANT_MASTER 0x1 /* Waiting to become a master kgdb cpu */ | ||
74 | #define DCPU_NEXT_MASTER 0x2 /* Transition from one master cpu to another */ | ||
75 | #define DCPU_IS_SLAVE 0x4 /* Slave cpu enter exception */ | ||
76 | #define DCPU_SSTEP 0x8 /* CPU is single stepping */ | ||
77 | |||
72 | static struct debuggerinfo_struct { | 78 | static struct debuggerinfo_struct { |
73 | void *debuggerinfo; | 79 | void *debuggerinfo; |
74 | struct task_struct *task; | 80 | struct task_struct *task; |
81 | int exception_state; | ||
75 | } kgdb_info[NR_CPUS]; | 82 | } kgdb_info[NR_CPUS]; |
76 | 83 | ||
77 | /** | 84 | /** |
@@ -391,27 +398,22 @@ int kgdb_mem2hex(char *mem, char *buf, int count) | |||
391 | 398 | ||
392 | /* | 399 | /* |
393 | * Copy the binary array pointed to by buf into mem. Fix $, #, and | 400 | * Copy the binary array pointed to by buf into mem. Fix $, #, and |
394 | * 0x7d escaped with 0x7d. Return a pointer to the character after | 401 | * 0x7d escaped with 0x7d. Return -EFAULT on failure or 0 on success. |
395 | * the last byte written. | 402 | * The input buf is overwitten with the result to write to mem. |
396 | */ | 403 | */ |
397 | static int kgdb_ebin2mem(char *buf, char *mem, int count) | 404 | static int kgdb_ebin2mem(char *buf, char *mem, int count) |
398 | { | 405 | { |
399 | int err = 0; | 406 | int size = 0; |
400 | char c; | 407 | char *c = buf; |
401 | 408 | ||
402 | while (count-- > 0) { | 409 | while (count-- > 0) { |
403 | c = *buf++; | 410 | c[size] = *buf++; |
404 | if (c == 0x7d) | 411 | if (c[size] == 0x7d) |
405 | c = *buf++ ^ 0x20; | 412 | c[size] = *buf++ ^ 0x20; |
406 | 413 | size++; | |
407 | err = probe_kernel_write(mem, &c, 1); | ||
408 | if (err) | ||
409 | break; | ||
410 | |||
411 | mem++; | ||
412 | } | 414 | } |
413 | 415 | ||
414 | return err; | 416 | return probe_kernel_write(mem, c, size); |
415 | } | 417 | } |
416 | 418 | ||
417 | /* | 419 | /* |
@@ -563,49 +565,6 @@ static struct task_struct *getthread(struct pt_regs *regs, int tid) | |||
563 | } | 565 | } |
564 | 566 | ||
565 | /* | 567 | /* |
566 | * CPU debug state control: | ||
567 | */ | ||
568 | |||
569 | #ifdef CONFIG_SMP | ||
570 | static void kgdb_wait(struct pt_regs *regs) | ||
571 | { | ||
572 | unsigned long flags; | ||
573 | int cpu; | ||
574 | |||
575 | local_irq_save(flags); | ||
576 | cpu = raw_smp_processor_id(); | ||
577 | kgdb_info[cpu].debuggerinfo = regs; | ||
578 | kgdb_info[cpu].task = current; | ||
579 | /* | ||
580 | * Make sure the above info reaches the primary CPU before | ||
581 | * our cpu_in_kgdb[] flag setting does: | ||
582 | */ | ||
583 | smp_wmb(); | ||
584 | atomic_set(&cpu_in_kgdb[cpu], 1); | ||
585 | |||
586 | /* Disable any cpu specific hw breakpoints */ | ||
587 | kgdb_disable_hw_debug(regs); | ||
588 | |||
589 | /* Wait till primary CPU is done with debugging */ | ||
590 | while (atomic_read(&passive_cpu_wait[cpu])) | ||
591 | cpu_relax(); | ||
592 | |||
593 | kgdb_info[cpu].debuggerinfo = NULL; | ||
594 | kgdb_info[cpu].task = NULL; | ||
595 | |||
596 | /* fix up hardware debug registers on local cpu */ | ||
597 | if (arch_kgdb_ops.correct_hw_break) | ||
598 | arch_kgdb_ops.correct_hw_break(); | ||
599 | |||
600 | /* Signal the primary CPU that we are done: */ | ||
601 | atomic_set(&cpu_in_kgdb[cpu], 0); | ||
602 | touch_softlockup_watchdog_sync(); | ||
603 | clocksource_touch_watchdog(); | ||
604 | local_irq_restore(flags); | ||
605 | } | ||
606 | #endif | ||
607 | |||
608 | /* | ||
609 | * Some architectures need cache flushes when we set/clear a | 568 | * Some architectures need cache flushes when we set/clear a |
610 | * breakpoint: | 569 | * breakpoint: |
611 | */ | 570 | */ |
@@ -1400,34 +1359,13 @@ static int kgdb_reenter_check(struct kgdb_state *ks) | |||
1400 | return 1; | 1359 | return 1; |
1401 | } | 1360 | } |
1402 | 1361 | ||
1403 | /* | 1362 | static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs) |
1404 | * kgdb_handle_exception() - main entry point from a kernel exception | ||
1405 | * | ||
1406 | * Locking hierarchy: | ||
1407 | * interface locks, if any (begin_session) | ||
1408 | * kgdb lock (kgdb_active) | ||
1409 | */ | ||
1410 | int | ||
1411 | kgdb_handle_exception(int evector, int signo, int ecode, struct pt_regs *regs) | ||
1412 | { | 1363 | { |
1413 | struct kgdb_state kgdb_var; | ||
1414 | struct kgdb_state *ks = &kgdb_var; | ||
1415 | unsigned long flags; | 1364 | unsigned long flags; |
1416 | int sstep_tries = 100; | 1365 | int sstep_tries = 100; |
1417 | int error = 0; | 1366 | int error = 0; |
1418 | int i, cpu; | 1367 | int i, cpu; |
1419 | 1368 | int trace_on = 0; | |
1420 | ks->cpu = raw_smp_processor_id(); | ||
1421 | ks->ex_vector = evector; | ||
1422 | ks->signo = signo; | ||
1423 | ks->ex_vector = evector; | ||
1424 | ks->err_code = ecode; | ||
1425 | ks->kgdb_usethreadid = 0; | ||
1426 | ks->linux_regs = regs; | ||
1427 | |||
1428 | if (kgdb_reenter_check(ks)) | ||
1429 | return 0; /* Ouch, double exception ! */ | ||
1430 | |||
1431 | acquirelock: | 1369 | acquirelock: |
1432 | /* | 1370 | /* |
1433 | * Interrupts will be restored by the 'trap return' code, except when | 1371 | * Interrupts will be restored by the 'trap return' code, except when |
@@ -1435,13 +1373,43 @@ acquirelock: | |||
1435 | */ | 1373 | */ |
1436 | local_irq_save(flags); | 1374 | local_irq_save(flags); |
1437 | 1375 | ||
1438 | cpu = raw_smp_processor_id(); | 1376 | cpu = ks->cpu; |
1377 | kgdb_info[cpu].debuggerinfo = regs; | ||
1378 | kgdb_info[cpu].task = current; | ||
1379 | /* | ||
1380 | * Make sure the above info reaches the primary CPU before | ||
1381 | * our cpu_in_kgdb[] flag setting does: | ||
1382 | */ | ||
1383 | atomic_inc(&cpu_in_kgdb[cpu]); | ||
1439 | 1384 | ||
1440 | /* | 1385 | /* |
1441 | * Acquire the kgdb_active lock: | 1386 | * CPU will loop if it is a slave or request to become a kgdb |
1387 | * master cpu and acquire the kgdb_active lock: | ||
1442 | */ | 1388 | */ |
1443 | while (atomic_cmpxchg(&kgdb_active, -1, cpu) != -1) | 1389 | while (1) { |
1390 | if (kgdb_info[cpu].exception_state & DCPU_WANT_MASTER) { | ||
1391 | if (atomic_cmpxchg(&kgdb_active, -1, cpu) == cpu) | ||
1392 | break; | ||
1393 | } else if (kgdb_info[cpu].exception_state & DCPU_IS_SLAVE) { | ||
1394 | if (!atomic_read(&passive_cpu_wait[cpu])) | ||
1395 | goto return_normal; | ||
1396 | } else { | ||
1397 | return_normal: | ||
1398 | /* Return to normal operation by executing any | ||
1399 | * hw breakpoint fixup. | ||
1400 | */ | ||
1401 | if (arch_kgdb_ops.correct_hw_break) | ||
1402 | arch_kgdb_ops.correct_hw_break(); | ||
1403 | if (trace_on) | ||
1404 | tracing_on(); | ||
1405 | atomic_dec(&cpu_in_kgdb[cpu]); | ||
1406 | touch_softlockup_watchdog_sync(); | ||
1407 | clocksource_touch_watchdog(); | ||
1408 | local_irq_restore(flags); | ||
1409 | return 0; | ||
1410 | } | ||
1444 | cpu_relax(); | 1411 | cpu_relax(); |
1412 | } | ||
1445 | 1413 | ||
1446 | /* | 1414 | /* |
1447 | * For single stepping, try to only enter on the processor | 1415 | * For single stepping, try to only enter on the processor |
@@ -1475,9 +1443,6 @@ acquirelock: | |||
1475 | if (kgdb_io_ops->pre_exception) | 1443 | if (kgdb_io_ops->pre_exception) |
1476 | kgdb_io_ops->pre_exception(); | 1444 | kgdb_io_ops->pre_exception(); |
1477 | 1445 | ||
1478 | kgdb_info[ks->cpu].debuggerinfo = ks->linux_regs; | ||
1479 | kgdb_info[ks->cpu].task = current; | ||
1480 | |||
1481 | kgdb_disable_hw_debug(ks->linux_regs); | 1446 | kgdb_disable_hw_debug(ks->linux_regs); |
1482 | 1447 | ||
1483 | /* | 1448 | /* |
@@ -1486,15 +1451,9 @@ acquirelock: | |||
1486 | */ | 1451 | */ |
1487 | if (!kgdb_single_step) { | 1452 | if (!kgdb_single_step) { |
1488 | for (i = 0; i < NR_CPUS; i++) | 1453 | for (i = 0; i < NR_CPUS; i++) |
1489 | atomic_set(&passive_cpu_wait[i], 1); | 1454 | atomic_inc(&passive_cpu_wait[i]); |
1490 | } | 1455 | } |
1491 | 1456 | ||
1492 | /* | ||
1493 | * spin_lock code is good enough as a barrier so we don't | ||
1494 | * need one here: | ||
1495 | */ | ||
1496 | atomic_set(&cpu_in_kgdb[ks->cpu], 1); | ||
1497 | |||
1498 | #ifdef CONFIG_SMP | 1457 | #ifdef CONFIG_SMP |
1499 | /* Signal the other CPUs to enter kgdb_wait() */ | 1458 | /* Signal the other CPUs to enter kgdb_wait() */ |
1500 | if ((!kgdb_single_step) && kgdb_do_roundup) | 1459 | if ((!kgdb_single_step) && kgdb_do_roundup) |
@@ -1518,6 +1477,9 @@ acquirelock: | |||
1518 | kgdb_single_step = 0; | 1477 | kgdb_single_step = 0; |
1519 | kgdb_contthread = current; | 1478 | kgdb_contthread = current; |
1520 | exception_level = 0; | 1479 | exception_level = 0; |
1480 | trace_on = tracing_is_on(); | ||
1481 | if (trace_on) | ||
1482 | tracing_off(); | ||
1521 | 1483 | ||
1522 | /* Talk to debugger with gdbserial protocol */ | 1484 | /* Talk to debugger with gdbserial protocol */ |
1523 | error = gdb_serial_stub(ks); | 1485 | error = gdb_serial_stub(ks); |
@@ -1526,13 +1488,11 @@ acquirelock: | |||
1526 | if (kgdb_io_ops->post_exception) | 1488 | if (kgdb_io_ops->post_exception) |
1527 | kgdb_io_ops->post_exception(); | 1489 | kgdb_io_ops->post_exception(); |
1528 | 1490 | ||
1529 | kgdb_info[ks->cpu].debuggerinfo = NULL; | 1491 | atomic_dec(&cpu_in_kgdb[ks->cpu]); |
1530 | kgdb_info[ks->cpu].task = NULL; | ||
1531 | atomic_set(&cpu_in_kgdb[ks->cpu], 0); | ||
1532 | 1492 | ||
1533 | if (!kgdb_single_step) { | 1493 | if (!kgdb_single_step) { |
1534 | for (i = NR_CPUS-1; i >= 0; i--) | 1494 | for (i = NR_CPUS-1; i >= 0; i--) |
1535 | atomic_set(&passive_cpu_wait[i], 0); | 1495 | atomic_dec(&passive_cpu_wait[i]); |
1536 | /* | 1496 | /* |
1537 | * Wait till all the CPUs have quit | 1497 | * Wait till all the CPUs have quit |
1538 | * from the debugger. | 1498 | * from the debugger. |
@@ -1551,6 +1511,8 @@ kgdb_restore: | |||
1551 | else | 1511 | else |
1552 | kgdb_sstep_pid = 0; | 1512 | kgdb_sstep_pid = 0; |
1553 | } | 1513 | } |
1514 | if (trace_on) | ||
1515 | tracing_on(); | ||
1554 | /* Free kgdb_active */ | 1516 | /* Free kgdb_active */ |
1555 | atomic_set(&kgdb_active, -1); | 1517 | atomic_set(&kgdb_active, -1); |
1556 | touch_softlockup_watchdog_sync(); | 1518 | touch_softlockup_watchdog_sync(); |
@@ -1560,13 +1522,52 @@ kgdb_restore: | |||
1560 | return error; | 1522 | return error; |
1561 | } | 1523 | } |
1562 | 1524 | ||
1525 | /* | ||
1526 | * kgdb_handle_exception() - main entry point from a kernel exception | ||
1527 | * | ||
1528 | * Locking hierarchy: | ||
1529 | * interface locks, if any (begin_session) | ||
1530 | * kgdb lock (kgdb_active) | ||
1531 | */ | ||
1532 | int | ||
1533 | kgdb_handle_exception(int evector, int signo, int ecode, struct pt_regs *regs) | ||
1534 | { | ||
1535 | struct kgdb_state kgdb_var; | ||
1536 | struct kgdb_state *ks = &kgdb_var; | ||
1537 | int ret; | ||
1538 | |||
1539 | ks->cpu = raw_smp_processor_id(); | ||
1540 | ks->ex_vector = evector; | ||
1541 | ks->signo = signo; | ||
1542 | ks->ex_vector = evector; | ||
1543 | ks->err_code = ecode; | ||
1544 | ks->kgdb_usethreadid = 0; | ||
1545 | ks->linux_regs = regs; | ||
1546 | |||
1547 | if (kgdb_reenter_check(ks)) | ||
1548 | return 0; /* Ouch, double exception ! */ | ||
1549 | kgdb_info[ks->cpu].exception_state |= DCPU_WANT_MASTER; | ||
1550 | ret = kgdb_cpu_enter(ks, regs); | ||
1551 | kgdb_info[ks->cpu].exception_state &= ~DCPU_WANT_MASTER; | ||
1552 | return ret; | ||
1553 | } | ||
1554 | |||
1563 | int kgdb_nmicallback(int cpu, void *regs) | 1555 | int kgdb_nmicallback(int cpu, void *regs) |
1564 | { | 1556 | { |
1565 | #ifdef CONFIG_SMP | 1557 | #ifdef CONFIG_SMP |
1558 | struct kgdb_state kgdb_var; | ||
1559 | struct kgdb_state *ks = &kgdb_var; | ||
1560 | |||
1561 | memset(ks, 0, sizeof(struct kgdb_state)); | ||
1562 | ks->cpu = cpu; | ||
1563 | ks->linux_regs = regs; | ||
1564 | |||
1566 | if (!atomic_read(&cpu_in_kgdb[cpu]) && | 1565 | if (!atomic_read(&cpu_in_kgdb[cpu]) && |
1567 | atomic_read(&kgdb_active) != cpu && | 1566 | atomic_read(&kgdb_active) != -1 && |
1568 | atomic_read(&cpu_in_kgdb[atomic_read(&kgdb_active)])) { | 1567 | atomic_read(&kgdb_active) != cpu) { |
1569 | kgdb_wait((struct pt_regs *)regs); | 1568 | kgdb_info[cpu].exception_state |= DCPU_IS_SLAVE; |
1569 | kgdb_cpu_enter(ks, regs); | ||
1570 | kgdb_info[cpu].exception_state &= ~DCPU_IS_SLAVE; | ||
1570 | return 0; | 1571 | return 0; |
1571 | } | 1572 | } |
1572 | #endif | 1573 | #endif |
@@ -1742,11 +1743,11 @@ EXPORT_SYMBOL_GPL(kgdb_unregister_io_module); | |||
1742 | */ | 1743 | */ |
1743 | void kgdb_breakpoint(void) | 1744 | void kgdb_breakpoint(void) |
1744 | { | 1745 | { |
1745 | atomic_set(&kgdb_setting_breakpoint, 1); | 1746 | atomic_inc(&kgdb_setting_breakpoint); |
1746 | wmb(); /* Sync point before breakpoint */ | 1747 | wmb(); /* Sync point before breakpoint */ |
1747 | arch_kgdb_breakpoint(); | 1748 | arch_kgdb_breakpoint(); |
1748 | wmb(); /* Sync point after breakpoint */ | 1749 | wmb(); /* Sync point after breakpoint */ |
1749 | atomic_set(&kgdb_setting_breakpoint, 0); | 1750 | atomic_dec(&kgdb_setting_breakpoint); |
1750 | } | 1751 | } |
1751 | EXPORT_SYMBOL_GPL(kgdb_breakpoint); | 1752 | EXPORT_SYMBOL_GPL(kgdb_breakpoint); |
1752 | 1753 | ||
diff --git a/kernel/kthread.c b/kernel/kthread.c index 82ed0ea15194..83911c780175 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c | |||
@@ -219,7 +219,7 @@ int kthreadd(void *unused) | |||
219 | set_task_comm(tsk, "kthreadd"); | 219 | set_task_comm(tsk, "kthreadd"); |
220 | ignore_signals(tsk); | 220 | ignore_signals(tsk); |
221 | set_cpus_allowed_ptr(tsk, cpu_all_mask); | 221 | set_cpus_allowed_ptr(tsk, cpu_all_mask); |
222 | set_mems_allowed(node_possible_map); | 222 | set_mems_allowed(node_states[N_HIGH_MEMORY]); |
223 | 223 | ||
224 | current->flags |= PF_NOFREEZE | PF_FREEZER_NOSIG; | 224 | current->flags |= PF_NOFREEZE | PF_FREEZER_NOSIG; |
225 | 225 | ||
diff --git a/kernel/latencytop.c b/kernel/latencytop.c index ca07c5c0c914..877fb306d415 100644 --- a/kernel/latencytop.c +++ b/kernel/latencytop.c | |||
@@ -56,7 +56,6 @@ | |||
56 | #include <linux/module.h> | 56 | #include <linux/module.h> |
57 | #include <linux/sched.h> | 57 | #include <linux/sched.h> |
58 | #include <linux/list.h> | 58 | #include <linux/list.h> |
59 | #include <linux/slab.h> | ||
60 | #include <linux/stacktrace.h> | 59 | #include <linux/stacktrace.h> |
61 | 60 | ||
62 | static DEFINE_SPINLOCK(latency_lock); | 61 | static DEFINE_SPINLOCK(latency_lock); |
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index c927a549db2c..2594e1ce41cb 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/ftrace.h> | 43 | #include <linux/ftrace.h> |
44 | #include <linux/stringify.h> | 44 | #include <linux/stringify.h> |
45 | #include <linux/bitops.h> | 45 | #include <linux/bitops.h> |
46 | #include <linux/gfp.h> | ||
46 | 47 | ||
47 | #include <asm/sections.h> | 48 | #include <asm/sections.h> |
48 | 49 | ||
@@ -582,9 +583,6 @@ static int static_obj(void *obj) | |||
582 | unsigned long start = (unsigned long) &_stext, | 583 | unsigned long start = (unsigned long) &_stext, |
583 | end = (unsigned long) &_end, | 584 | end = (unsigned long) &_end, |
584 | addr = (unsigned long) obj; | 585 | addr = (unsigned long) obj; |
585 | #ifdef CONFIG_SMP | ||
586 | int i; | ||
587 | #endif | ||
588 | 586 | ||
589 | /* | 587 | /* |
590 | * static variable? | 588 | * static variable? |
@@ -595,24 +593,16 @@ static int static_obj(void *obj) | |||
595 | if (arch_is_kernel_data(addr)) | 593 | if (arch_is_kernel_data(addr)) |
596 | return 1; | 594 | return 1; |
597 | 595 | ||
598 | #ifdef CONFIG_SMP | ||
599 | /* | 596 | /* |
600 | * percpu var? | 597 | * in-kernel percpu var? |
601 | */ | 598 | */ |
602 | for_each_possible_cpu(i) { | 599 | if (is_kernel_percpu_address(addr)) |
603 | start = (unsigned long) &__per_cpu_start + per_cpu_offset(i); | 600 | return 1; |
604 | end = (unsigned long) &__per_cpu_start + PERCPU_ENOUGH_ROOM | ||
605 | + per_cpu_offset(i); | ||
606 | |||
607 | if ((addr >= start) && (addr < end)) | ||
608 | return 1; | ||
609 | } | ||
610 | #endif | ||
611 | 601 | ||
612 | /* | 602 | /* |
613 | * module var? | 603 | * module static or percpu var? |
614 | */ | 604 | */ |
615 | return is_module_address(addr); | 605 | return is_module_address(addr) || is_module_percpu_address(addr); |
616 | } | 606 | } |
617 | 607 | ||
618 | /* | 608 | /* |
diff --git a/kernel/module.c b/kernel/module.c index c968d3606dca..1016b75b026a 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -370,27 +370,33 @@ EXPORT_SYMBOL_GPL(find_module); | |||
370 | 370 | ||
371 | #ifdef CONFIG_SMP | 371 | #ifdef CONFIG_SMP |
372 | 372 | ||
373 | static void *percpu_modalloc(unsigned long size, unsigned long align, | 373 | static inline void __percpu *mod_percpu(struct module *mod) |
374 | const char *name) | ||
375 | { | 374 | { |
376 | void *ptr; | 375 | return mod->percpu; |
376 | } | ||
377 | 377 | ||
378 | static int percpu_modalloc(struct module *mod, | ||
379 | unsigned long size, unsigned long align) | ||
380 | { | ||
378 | if (align > PAGE_SIZE) { | 381 | if (align > PAGE_SIZE) { |
379 | printk(KERN_WARNING "%s: per-cpu alignment %li > %li\n", | 382 | printk(KERN_WARNING "%s: per-cpu alignment %li > %li\n", |
380 | name, align, PAGE_SIZE); | 383 | mod->name, align, PAGE_SIZE); |
381 | align = PAGE_SIZE; | 384 | align = PAGE_SIZE; |
382 | } | 385 | } |
383 | 386 | ||
384 | ptr = __alloc_reserved_percpu(size, align); | 387 | mod->percpu = __alloc_reserved_percpu(size, align); |
385 | if (!ptr) | 388 | if (!mod->percpu) { |
386 | printk(KERN_WARNING | 389 | printk(KERN_WARNING |
387 | "Could not allocate %lu bytes percpu data\n", size); | 390 | "Could not allocate %lu bytes percpu data\n", size); |
388 | return ptr; | 391 | return -ENOMEM; |
392 | } | ||
393 | mod->percpu_size = size; | ||
394 | return 0; | ||
389 | } | 395 | } |
390 | 396 | ||
391 | static void percpu_modfree(void *freeme) | 397 | static void percpu_modfree(struct module *mod) |
392 | { | 398 | { |
393 | free_percpu(freeme); | 399 | free_percpu(mod->percpu); |
394 | } | 400 | } |
395 | 401 | ||
396 | static unsigned int find_pcpusec(Elf_Ehdr *hdr, | 402 | static unsigned int find_pcpusec(Elf_Ehdr *hdr, |
@@ -400,24 +406,62 @@ static unsigned int find_pcpusec(Elf_Ehdr *hdr, | |||
400 | return find_sec(hdr, sechdrs, secstrings, ".data.percpu"); | 406 | return find_sec(hdr, sechdrs, secstrings, ".data.percpu"); |
401 | } | 407 | } |
402 | 408 | ||
403 | static void percpu_modcopy(void *pcpudest, const void *from, unsigned long size) | 409 | static void percpu_modcopy(struct module *mod, |
410 | const void *from, unsigned long size) | ||
404 | { | 411 | { |
405 | int cpu; | 412 | int cpu; |
406 | 413 | ||
407 | for_each_possible_cpu(cpu) | 414 | for_each_possible_cpu(cpu) |
408 | memcpy(pcpudest + per_cpu_offset(cpu), from, size); | 415 | memcpy(per_cpu_ptr(mod->percpu, cpu), from, size); |
416 | } | ||
417 | |||
418 | /** | ||
419 | * is_module_percpu_address - test whether address is from module static percpu | ||
420 | * @addr: address to test | ||
421 | * | ||
422 | * Test whether @addr belongs to module static percpu area. | ||
423 | * | ||
424 | * RETURNS: | ||
425 | * %true if @addr is from module static percpu area | ||
426 | */ | ||
427 | bool is_module_percpu_address(unsigned long addr) | ||
428 | { | ||
429 | struct module *mod; | ||
430 | unsigned int cpu; | ||
431 | |||
432 | preempt_disable(); | ||
433 | |||
434 | list_for_each_entry_rcu(mod, &modules, list) { | ||
435 | if (!mod->percpu_size) | ||
436 | continue; | ||
437 | for_each_possible_cpu(cpu) { | ||
438 | void *start = per_cpu_ptr(mod->percpu, cpu); | ||
439 | |||
440 | if ((void *)addr >= start && | ||
441 | (void *)addr < start + mod->percpu_size) { | ||
442 | preempt_enable(); | ||
443 | return true; | ||
444 | } | ||
445 | } | ||
446 | } | ||
447 | |||
448 | preempt_enable(); | ||
449 | return false; | ||
409 | } | 450 | } |
410 | 451 | ||
411 | #else /* ... !CONFIG_SMP */ | 452 | #else /* ... !CONFIG_SMP */ |
412 | 453 | ||
413 | static inline void *percpu_modalloc(unsigned long size, unsigned long align, | 454 | static inline void __percpu *mod_percpu(struct module *mod) |
414 | const char *name) | ||
415 | { | 455 | { |
416 | return NULL; | 456 | return NULL; |
417 | } | 457 | } |
418 | static inline void percpu_modfree(void *pcpuptr) | 458 | static inline int percpu_modalloc(struct module *mod, |
459 | unsigned long size, unsigned long align) | ||
460 | { | ||
461 | return -ENOMEM; | ||
462 | } | ||
463 | static inline void percpu_modfree(struct module *mod) | ||
419 | { | 464 | { |
420 | BUG(); | ||
421 | } | 465 | } |
422 | static inline unsigned int find_pcpusec(Elf_Ehdr *hdr, | 466 | static inline unsigned int find_pcpusec(Elf_Ehdr *hdr, |
423 | Elf_Shdr *sechdrs, | 467 | Elf_Shdr *sechdrs, |
@@ -425,12 +469,16 @@ static inline unsigned int find_pcpusec(Elf_Ehdr *hdr, | |||
425 | { | 469 | { |
426 | return 0; | 470 | return 0; |
427 | } | 471 | } |
428 | static inline void percpu_modcopy(void *pcpudst, const void *src, | 472 | static inline void percpu_modcopy(struct module *mod, |
429 | unsigned long size) | 473 | const void *from, unsigned long size) |
430 | { | 474 | { |
431 | /* pcpusec should be 0, and size of that section should be 0. */ | 475 | /* pcpusec should be 0, and size of that section should be 0. */ |
432 | BUG_ON(size != 0); | 476 | BUG_ON(size != 0); |
433 | } | 477 | } |
478 | bool is_module_percpu_address(unsigned long addr) | ||
479 | { | ||
480 | return false; | ||
481 | } | ||
434 | 482 | ||
435 | #endif /* CONFIG_SMP */ | 483 | #endif /* CONFIG_SMP */ |
436 | 484 | ||
@@ -473,11 +521,13 @@ static void module_unload_init(struct module *mod) | |||
473 | int cpu; | 521 | int cpu; |
474 | 522 | ||
475 | INIT_LIST_HEAD(&mod->modules_which_use_me); | 523 | INIT_LIST_HEAD(&mod->modules_which_use_me); |
476 | for_each_possible_cpu(cpu) | 524 | for_each_possible_cpu(cpu) { |
477 | per_cpu_ptr(mod->refptr, cpu)->count = 0; | 525 | per_cpu_ptr(mod->refptr, cpu)->incs = 0; |
526 | per_cpu_ptr(mod->refptr, cpu)->decs = 0; | ||
527 | } | ||
478 | 528 | ||
479 | /* Hold reference count during initialization. */ | 529 | /* Hold reference count during initialization. */ |
480 | __this_cpu_write(mod->refptr->count, 1); | 530 | __this_cpu_write(mod->refptr->incs, 1); |
481 | /* Backwards compatibility macros put refcount during init. */ | 531 | /* Backwards compatibility macros put refcount during init. */ |
482 | mod->waiter = current; | 532 | mod->waiter = current; |
483 | } | 533 | } |
@@ -616,12 +666,28 @@ static int try_stop_module(struct module *mod, int flags, int *forced) | |||
616 | 666 | ||
617 | unsigned int module_refcount(struct module *mod) | 667 | unsigned int module_refcount(struct module *mod) |
618 | { | 668 | { |
619 | unsigned int total = 0; | 669 | unsigned int incs = 0, decs = 0; |
620 | int cpu; | 670 | int cpu; |
621 | 671 | ||
622 | for_each_possible_cpu(cpu) | 672 | for_each_possible_cpu(cpu) |
623 | total += per_cpu_ptr(mod->refptr, cpu)->count; | 673 | decs += per_cpu_ptr(mod->refptr, cpu)->decs; |
624 | return total; | 674 | /* |
675 | * ensure the incs are added up after the decs. | ||
676 | * module_put ensures incs are visible before decs with smp_wmb. | ||
677 | * | ||
678 | * This 2-count scheme avoids the situation where the refcount | ||
679 | * for CPU0 is read, then CPU0 increments the module refcount, | ||
680 | * then CPU1 drops that refcount, then the refcount for CPU1 is | ||
681 | * read. We would record a decrement but not its corresponding | ||
682 | * increment so we would see a low count (disaster). | ||
683 | * | ||
684 | * Rare situation? But module_refcount can be preempted, and we | ||
685 | * might be tallying up 4096+ CPUs. So it is not impossible. | ||
686 | */ | ||
687 | smp_rmb(); | ||
688 | for_each_possible_cpu(cpu) | ||
689 | incs += per_cpu_ptr(mod->refptr, cpu)->incs; | ||
690 | return incs - decs; | ||
625 | } | 691 | } |
626 | EXPORT_SYMBOL(module_refcount); | 692 | EXPORT_SYMBOL(module_refcount); |
627 | 693 | ||
@@ -798,10 +864,11 @@ void module_put(struct module *module) | |||
798 | { | 864 | { |
799 | if (module) { | 865 | if (module) { |
800 | preempt_disable(); | 866 | preempt_disable(); |
801 | __this_cpu_dec(module->refptr->count); | 867 | smp_wmb(); /* see comment in module_refcount */ |
868 | __this_cpu_inc(module->refptr->decs); | ||
802 | 869 | ||
803 | trace_module_put(module, _RET_IP_, | 870 | trace_module_put(module, _RET_IP_, |
804 | __this_cpu_read(module->refptr->count)); | 871 | __this_cpu_read(module->refptr->decs)); |
805 | /* Maybe they're waiting for us to drop reference? */ | 872 | /* Maybe they're waiting for us to drop reference? */ |
806 | if (unlikely(!module_is_live(module))) | 873 | if (unlikely(!module_is_live(module))) |
807 | wake_up_process(module->waiter); | 874 | wake_up_process(module->waiter); |
@@ -1400,8 +1467,7 @@ static void free_module(struct module *mod) | |||
1400 | /* This may be NULL, but that's OK */ | 1467 | /* This may be NULL, but that's OK */ |
1401 | module_free(mod, mod->module_init); | 1468 | module_free(mod, mod->module_init); |
1402 | kfree(mod->args); | 1469 | kfree(mod->args); |
1403 | if (mod->percpu) | 1470 | percpu_modfree(mod); |
1404 | percpu_modfree(mod->percpu); | ||
1405 | #if defined(CONFIG_MODULE_UNLOAD) | 1471 | #if defined(CONFIG_MODULE_UNLOAD) |
1406 | if (mod->refptr) | 1472 | if (mod->refptr) |
1407 | free_percpu(mod->refptr); | 1473 | free_percpu(mod->refptr); |
@@ -1520,7 +1586,7 @@ static int simplify_symbols(Elf_Shdr *sechdrs, | |||
1520 | default: | 1586 | default: |
1521 | /* Divert to percpu allocation if a percpu var. */ | 1587 | /* Divert to percpu allocation if a percpu var. */ |
1522 | if (sym[i].st_shndx == pcpuindex) | 1588 | if (sym[i].st_shndx == pcpuindex) |
1523 | secbase = (unsigned long)mod->percpu; | 1589 | secbase = (unsigned long)mod_percpu(mod); |
1524 | else | 1590 | else |
1525 | secbase = sechdrs[sym[i].st_shndx].sh_addr; | 1591 | secbase = sechdrs[sym[i].st_shndx].sh_addr; |
1526 | sym[i].st_value += secbase; | 1592 | sym[i].st_value += secbase; |
@@ -1954,7 +2020,7 @@ static noinline struct module *load_module(void __user *umod, | |||
1954 | unsigned int modindex, versindex, infoindex, pcpuindex; | 2020 | unsigned int modindex, versindex, infoindex, pcpuindex; |
1955 | struct module *mod; | 2021 | struct module *mod; |
1956 | long err = 0; | 2022 | long err = 0; |
1957 | void *percpu = NULL, *ptr = NULL; /* Stops spurious gcc warning */ | 2023 | void *ptr = NULL; /* Stops spurious gcc warning */ |
1958 | unsigned long symoffs, stroffs, *strmap; | 2024 | unsigned long symoffs, stroffs, *strmap; |
1959 | 2025 | ||
1960 | mm_segment_t old_fs; | 2026 | mm_segment_t old_fs; |
@@ -2094,15 +2160,11 @@ static noinline struct module *load_module(void __user *umod, | |||
2094 | 2160 | ||
2095 | if (pcpuindex) { | 2161 | if (pcpuindex) { |
2096 | /* We have a special allocation for this section. */ | 2162 | /* We have a special allocation for this section. */ |
2097 | percpu = percpu_modalloc(sechdrs[pcpuindex].sh_size, | 2163 | err = percpu_modalloc(mod, sechdrs[pcpuindex].sh_size, |
2098 | sechdrs[pcpuindex].sh_addralign, | 2164 | sechdrs[pcpuindex].sh_addralign); |
2099 | mod->name); | 2165 | if (err) |
2100 | if (!percpu) { | ||
2101 | err = -ENOMEM; | ||
2102 | goto free_mod; | 2166 | goto free_mod; |
2103 | } | ||
2104 | sechdrs[pcpuindex].sh_flags &= ~(unsigned long)SHF_ALLOC; | 2167 | sechdrs[pcpuindex].sh_flags &= ~(unsigned long)SHF_ALLOC; |
2105 | mod->percpu = percpu; | ||
2106 | } | 2168 | } |
2107 | 2169 | ||
2108 | /* Determine total sizes, and put offsets in sh_entsize. For now | 2170 | /* Determine total sizes, and put offsets in sh_entsize. For now |
@@ -2317,7 +2379,7 @@ static noinline struct module *load_module(void __user *umod, | |||
2317 | sort_extable(mod->extable, mod->extable + mod->num_exentries); | 2379 | sort_extable(mod->extable, mod->extable + mod->num_exentries); |
2318 | 2380 | ||
2319 | /* Finally, copy percpu area over. */ | 2381 | /* Finally, copy percpu area over. */ |
2320 | percpu_modcopy(mod->percpu, (void *)sechdrs[pcpuindex].sh_addr, | 2382 | percpu_modcopy(mod, (void *)sechdrs[pcpuindex].sh_addr, |
2321 | sechdrs[pcpuindex].sh_size); | 2383 | sechdrs[pcpuindex].sh_size); |
2322 | 2384 | ||
2323 | add_kallsyms(mod, sechdrs, hdr->e_shnum, symindex, strindex, | 2385 | add_kallsyms(mod, sechdrs, hdr->e_shnum, symindex, strindex, |
@@ -2409,8 +2471,7 @@ static noinline struct module *load_module(void __user *umod, | |||
2409 | module_free(mod, mod->module_core); | 2471 | module_free(mod, mod->module_core); |
2410 | /* mod will be freed with core. Don't access it beyond this line! */ | 2472 | /* mod will be freed with core. Don't access it beyond this line! */ |
2411 | free_percpu: | 2473 | free_percpu: |
2412 | if (percpu) | 2474 | percpu_modfree(mod); |
2413 | percpu_modfree(percpu); | ||
2414 | free_mod: | 2475 | free_mod: |
2415 | kfree(args); | 2476 | kfree(args); |
2416 | kfree(strmap); | 2477 | kfree(strmap); |
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c index 2ab67233ee8f..f74e6c00e26d 100644 --- a/kernel/nsproxy.c +++ b/kernel/nsproxy.c | |||
@@ -13,6 +13,7 @@ | |||
13 | * Pavel Emelianov <xemul@openvz.org> | 13 | * Pavel Emelianov <xemul@openvz.org> |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/slab.h> | ||
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
17 | #include <linux/nsproxy.h> | 18 | #include <linux/nsproxy.h> |
18 | #include <linux/init_task.h> | 19 | #include <linux/init_task.h> |
diff --git a/kernel/padata.c b/kernel/padata.c index 93caf65ff57c..fd03513c7327 100644 --- a/kernel/padata.c +++ b/kernel/padata.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/padata.h> | 25 | #include <linux/padata.h> |
26 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/rcupdate.h> | 29 | #include <linux/rcupdate.h> |
29 | 30 | ||
30 | #define MAX_SEQ_NR INT_MAX - NR_CPUS | 31 | #define MAX_SEQ_NR INT_MAX - NR_CPUS |
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 574ee58a3046..2f3fbf84215a 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
16 | #include <linux/file.h> | 16 | #include <linux/file.h> |
17 | #include <linux/poll.h> | 17 | #include <linux/poll.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/sysfs.h> | 19 | #include <linux/sysfs.h> |
19 | #include <linux/dcache.h> | 20 | #include <linux/dcache.h> |
20 | #include <linux/percpu.h> | 21 | #include <linux/percpu.h> |
@@ -1164,11 +1165,9 @@ void perf_event_task_sched_out(struct task_struct *task, | |||
1164 | struct perf_event_context *ctx = task->perf_event_ctxp; | 1165 | struct perf_event_context *ctx = task->perf_event_ctxp; |
1165 | struct perf_event_context *next_ctx; | 1166 | struct perf_event_context *next_ctx; |
1166 | struct perf_event_context *parent; | 1167 | struct perf_event_context *parent; |
1167 | struct pt_regs *regs; | ||
1168 | int do_switch = 1; | 1168 | int do_switch = 1; |
1169 | 1169 | ||
1170 | regs = task_pt_regs(task); | 1170 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); |
1171 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, regs, 0); | ||
1172 | 1171 | ||
1173 | if (likely(!ctx || !cpuctx->task_ctx)) | 1172 | if (likely(!ctx || !cpuctx->task_ctx)) |
1174 | return; | 1173 | return; |
@@ -2786,12 +2785,11 @@ __weak struct perf_callchain_entry *perf_callchain(struct pt_regs *regs) | |||
2786 | return NULL; | 2785 | return NULL; |
2787 | } | 2786 | } |
2788 | 2787 | ||
2789 | #ifdef CONFIG_EVENT_TRACING | ||
2790 | __weak | 2788 | __weak |
2791 | void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip) | 2789 | void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip) |
2792 | { | 2790 | { |
2793 | } | 2791 | } |
2794 | #endif | 2792 | |
2795 | 2793 | ||
2796 | /* | 2794 | /* |
2797 | * Output | 2795 | * Output |
@@ -3378,15 +3376,23 @@ static void perf_event_task_output(struct perf_event *event, | |||
3378 | struct perf_task_event *task_event) | 3376 | struct perf_task_event *task_event) |
3379 | { | 3377 | { |
3380 | struct perf_output_handle handle; | 3378 | struct perf_output_handle handle; |
3381 | int size; | ||
3382 | struct task_struct *task = task_event->task; | 3379 | struct task_struct *task = task_event->task; |
3383 | int ret; | 3380 | unsigned long flags; |
3381 | int size, ret; | ||
3382 | |||
3383 | /* | ||
3384 | * If this CPU attempts to acquire an rq lock held by a CPU spinning | ||
3385 | * in perf_output_lock() from interrupt context, it's game over. | ||
3386 | */ | ||
3387 | local_irq_save(flags); | ||
3384 | 3388 | ||
3385 | size = task_event->event_id.header.size; | 3389 | size = task_event->event_id.header.size; |
3386 | ret = perf_output_begin(&handle, event, size, 0, 0); | 3390 | ret = perf_output_begin(&handle, event, size, 0, 0); |
3387 | 3391 | ||
3388 | if (ret) | 3392 | if (ret) { |
3393 | local_irq_restore(flags); | ||
3389 | return; | 3394 | return; |
3395 | } | ||
3390 | 3396 | ||
3391 | task_event->event_id.pid = perf_event_pid(event, task); | 3397 | task_event->event_id.pid = perf_event_pid(event, task); |
3392 | task_event->event_id.ppid = perf_event_pid(event, current); | 3398 | task_event->event_id.ppid = perf_event_pid(event, current); |
@@ -3397,6 +3403,7 @@ static void perf_event_task_output(struct perf_event *event, | |||
3397 | perf_output_put(&handle, task_event->event_id); | 3403 | perf_output_put(&handle, task_event->event_id); |
3398 | 3404 | ||
3399 | perf_output_end(&handle); | 3405 | perf_output_end(&handle); |
3406 | local_irq_restore(flags); | ||
3400 | } | 3407 | } |
3401 | 3408 | ||
3402 | static int perf_event_task_match(struct perf_event *event) | 3409 | static int perf_event_task_match(struct perf_event *event) |
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index 79aac93acf99..a5aff94e1f0b 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/syscalls.h> | 13 | #include <linux/syscalls.h> |
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
15 | #include <linux/acct.h> | 15 | #include <linux/acct.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #define BITS_PER_PAGE (PAGE_SIZE*8) | 18 | #define BITS_PER_PAGE (PAGE_SIZE*8) |
18 | 19 | ||
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index 1a22dfd42df9..bc7704b3a443 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c | |||
@@ -1061,9 +1061,9 @@ static void check_thread_timers(struct task_struct *tsk, | |||
1061 | } | 1061 | } |
1062 | } | 1062 | } |
1063 | 1063 | ||
1064 | static void stop_process_timers(struct task_struct *tsk) | 1064 | static void stop_process_timers(struct signal_struct *sig) |
1065 | { | 1065 | { |
1066 | struct thread_group_cputimer *cputimer = &tsk->signal->cputimer; | 1066 | struct thread_group_cputimer *cputimer = &sig->cputimer; |
1067 | unsigned long flags; | 1067 | unsigned long flags; |
1068 | 1068 | ||
1069 | if (!cputimer->running) | 1069 | if (!cputimer->running) |
@@ -1072,6 +1072,10 @@ static void stop_process_timers(struct task_struct *tsk) | |||
1072 | spin_lock_irqsave(&cputimer->lock, flags); | 1072 | spin_lock_irqsave(&cputimer->lock, flags); |
1073 | cputimer->running = 0; | 1073 | cputimer->running = 0; |
1074 | spin_unlock_irqrestore(&cputimer->lock, flags); | 1074 | spin_unlock_irqrestore(&cputimer->lock, flags); |
1075 | |||
1076 | sig->cputime_expires.prof_exp = cputime_zero; | ||
1077 | sig->cputime_expires.virt_exp = cputime_zero; | ||
1078 | sig->cputime_expires.sched_exp = 0; | ||
1075 | } | 1079 | } |
1076 | 1080 | ||
1077 | static u32 onecputick; | 1081 | static u32 onecputick; |
@@ -1133,7 +1137,7 @@ static void check_process_timers(struct task_struct *tsk, | |||
1133 | list_empty(&timers[CPUCLOCK_VIRT]) && | 1137 | list_empty(&timers[CPUCLOCK_VIRT]) && |
1134 | cputime_eq(sig->it[CPUCLOCK_VIRT].expires, cputime_zero) && | 1138 | cputime_eq(sig->it[CPUCLOCK_VIRT].expires, cputime_zero) && |
1135 | list_empty(&timers[CPUCLOCK_SCHED])) { | 1139 | list_empty(&timers[CPUCLOCK_SCHED])) { |
1136 | stop_process_timers(tsk); | 1140 | stop_process_timers(sig); |
1137 | return; | 1141 | return; |
1138 | } | 1142 | } |
1139 | 1143 | ||
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index da5288ec2392..aa9e916da4d5 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/console.h> | 22 | #include <linux/console.h> |
23 | #include <linux/cpu.h> | 23 | #include <linux/cpu.h> |
24 | #include <linux/freezer.h> | 24 | #include <linux/freezer.h> |
25 | #include <linux/gfp.h> | ||
25 | #include <scsi/scsi_scan.h> | 26 | #include <scsi/scsi_scan.h> |
26 | #include <asm/suspend.h> | 27 | #include <asm/suspend.h> |
27 | 28 | ||
diff --git a/kernel/power/hibernate_nvs.c b/kernel/power/hibernate_nvs.c index 39ac698ef836..fdcad9ed5a7b 100644 --- a/kernel/power/hibernate_nvs.c +++ b/kernel/power/hibernate_nvs.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/suspend.h> | 14 | #include <linux/suspend.h> |
14 | 15 | ||
15 | /* | 16 | /* |
diff --git a/kernel/power/process.c b/kernel/power/process.c index 5ade1bdcf366..71ae29052ab6 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c | |||
@@ -88,12 +88,11 @@ static int try_to_freeze_tasks(bool sig_only) | |||
88 | printk(KERN_ERR "Freezing of tasks failed after %d.%02d seconds " | 88 | printk(KERN_ERR "Freezing of tasks failed after %d.%02d seconds " |
89 | "(%d tasks refusing to freeze):\n", | 89 | "(%d tasks refusing to freeze):\n", |
90 | elapsed_csecs / 100, elapsed_csecs % 100, todo); | 90 | elapsed_csecs / 100, elapsed_csecs % 100, todo); |
91 | show_state(); | ||
92 | read_lock(&tasklist_lock); | 91 | read_lock(&tasklist_lock); |
93 | do_each_thread(g, p) { | 92 | do_each_thread(g, p) { |
94 | task_lock(p); | 93 | task_lock(p); |
95 | if (freezing(p) && !freezer_should_skip(p)) | 94 | if (freezing(p) && !freezer_should_skip(p)) |
96 | printk(KERN_ERR " %s\n", p->comm); | 95 | sched_show_task(p); |
97 | cancel_freezing(p); | 96 | cancel_freezing(p); |
98 | task_unlock(p); | 97 | task_unlock(p); |
99 | } while_each_thread(g, p); | 98 | } while_each_thread(g, p); |
@@ -145,7 +144,7 @@ static void thaw_tasks(bool nosig_only) | |||
145 | if (nosig_only && should_send_signal(p)) | 144 | if (nosig_only && should_send_signal(p)) |
146 | continue; | 145 | continue; |
147 | 146 | ||
148 | if (cgroup_frozen(p)) | 147 | if (cgroup_freezing_or_frozen(p)) |
149 | continue; | 148 | continue; |
150 | 149 | ||
151 | thaw_process(p); | 150 | thaw_process(p); |
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 830cadecbdfc..be861c26dda7 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/console.h> | 26 | #include <linux/console.h> |
27 | #include <linux/highmem.h> | 27 | #include <linux/highmem.h> |
28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
31 | #include <asm/mmu_context.h> | 32 | #include <asm/mmu_context.h> |
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index 44cce10b582d..56e7dbb8b996 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/console.h> | 15 | #include <linux/console.h> |
16 | #include <linux/cpu.h> | 16 | #include <linux/cpu.h> |
17 | #include <linux/syscalls.h> | 17 | #include <linux/syscalls.h> |
18 | #include <linux/gfp.h> | ||
18 | 19 | ||
19 | #include "power.h" | 20 | #include "power.h" |
20 | 21 | ||
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 1d575733d4e1..66824d71983a 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/swap.h> | 23 | #include <linux/swap.h> |
24 | #include <linux/swapops.h> | 24 | #include <linux/swapops.h> |
25 | #include <linux/pm.h> | 25 | #include <linux/pm.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | #include "power.h" | 28 | #include "power.h" |
28 | 29 | ||
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index f1125c1a6321..63fe25433980 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/mutex.h> | 45 | #include <linux/mutex.h> |
46 | #include <linux/module.h> | 46 | #include <linux/module.h> |
47 | #include <linux/kernel_stat.h> | 47 | #include <linux/kernel_stat.h> |
48 | #include <linux/hardirq.h> | ||
48 | 49 | ||
49 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 50 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
50 | static struct lock_class_key rcu_lock_key; | 51 | static struct lock_class_key rcu_lock_key; |
@@ -66,6 +67,28 @@ EXPORT_SYMBOL_GPL(rcu_sched_lock_map); | |||
66 | int rcu_scheduler_active __read_mostly; | 67 | int rcu_scheduler_active __read_mostly; |
67 | EXPORT_SYMBOL_GPL(rcu_scheduler_active); | 68 | EXPORT_SYMBOL_GPL(rcu_scheduler_active); |
68 | 69 | ||
70 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
71 | |||
72 | /** | ||
73 | * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? | ||
74 | * | ||
75 | * Check for bottom half being disabled, which covers both the | ||
76 | * CONFIG_PROVE_RCU and not cases. Note that if someone uses | ||
77 | * rcu_read_lock_bh(), but then later enables BH, lockdep (if enabled) | ||
78 | * will show the situation. | ||
79 | * | ||
80 | * Check debug_lockdep_rcu_enabled() to prevent false positives during boot. | ||
81 | */ | ||
82 | int rcu_read_lock_bh_held(void) | ||
83 | { | ||
84 | if (!debug_lockdep_rcu_enabled()) | ||
85 | return 1; | ||
86 | return in_softirq(); | ||
87 | } | ||
88 | EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held); | ||
89 | |||
90 | #endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | ||
91 | |||
69 | /* | 92 | /* |
70 | * This function is invoked towards the end of the scheduler's initialization | 93 | * This function is invoked towards the end of the scheduler's initialization |
71 | * process. Before this is called, the idle task might contain | 94 | * process. Before this is called, the idle task might contain |
diff --git a/kernel/res_counter.c b/kernel/res_counter.c index bcdabf37c40b..c7eaa37a768b 100644 --- a/kernel/res_counter.c +++ b/kernel/res_counter.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/parser.h> | 11 | #include <linux/parser.h> |
12 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/res_counter.h> | 13 | #include <linux/res_counter.h> |
15 | #include <linux/uaccess.h> | 14 | #include <linux/uaccess.h> |
16 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
diff --git a/kernel/resource.c b/kernel/resource.c index 2d5be5d9bf5f..9c358e263534 100644 --- a/kernel/resource.c +++ b/kernel/resource.c | |||
@@ -219,19 +219,34 @@ void release_child_resources(struct resource *r) | |||
219 | } | 219 | } |
220 | 220 | ||
221 | /** | 221 | /** |
222 | * request_resource - request and reserve an I/O or memory resource | 222 | * request_resource_conflict - request and reserve an I/O or memory resource |
223 | * @root: root resource descriptor | 223 | * @root: root resource descriptor |
224 | * @new: resource descriptor desired by caller | 224 | * @new: resource descriptor desired by caller |
225 | * | 225 | * |
226 | * Returns 0 for success, negative error code on error. | 226 | * Returns 0 for success, conflict resource on error. |
227 | */ | 227 | */ |
228 | int request_resource(struct resource *root, struct resource *new) | 228 | struct resource *request_resource_conflict(struct resource *root, struct resource *new) |
229 | { | 229 | { |
230 | struct resource *conflict; | 230 | struct resource *conflict; |
231 | 231 | ||
232 | write_lock(&resource_lock); | 232 | write_lock(&resource_lock); |
233 | conflict = __request_resource(root, new); | 233 | conflict = __request_resource(root, new); |
234 | write_unlock(&resource_lock); | 234 | write_unlock(&resource_lock); |
235 | return conflict; | ||
236 | } | ||
237 | |||
238 | /** | ||
239 | * request_resource - request and reserve an I/O or memory resource | ||
240 | * @root: root resource descriptor | ||
241 | * @new: resource descriptor desired by caller | ||
242 | * | ||
243 | * Returns 0 for success, negative error code on error. | ||
244 | */ | ||
245 | int request_resource(struct resource *root, struct resource *new) | ||
246 | { | ||
247 | struct resource *conflict; | ||
248 | |||
249 | conflict = request_resource_conflict(root, new); | ||
235 | return conflict ? -EBUSY : 0; | 250 | return conflict ? -EBUSY : 0; |
236 | } | 251 | } |
237 | 252 | ||
@@ -474,25 +489,40 @@ static struct resource * __insert_resource(struct resource *parent, struct resou | |||
474 | } | 489 | } |
475 | 490 | ||
476 | /** | 491 | /** |
477 | * insert_resource - Inserts a resource in the resource tree | 492 | * insert_resource_conflict - Inserts resource in the resource tree |
478 | * @parent: parent of the new resource | 493 | * @parent: parent of the new resource |
479 | * @new: new resource to insert | 494 | * @new: new resource to insert |
480 | * | 495 | * |
481 | * Returns 0 on success, -EBUSY if the resource can't be inserted. | 496 | * Returns 0 on success, conflict resource if the resource can't be inserted. |
482 | * | 497 | * |
483 | * This function is equivalent to request_resource when no conflict | 498 | * This function is equivalent to request_resource_conflict when no conflict |
484 | * happens. If a conflict happens, and the conflicting resources | 499 | * happens. If a conflict happens, and the conflicting resources |
485 | * entirely fit within the range of the new resource, then the new | 500 | * entirely fit within the range of the new resource, then the new |
486 | * resource is inserted and the conflicting resources become children of | 501 | * resource is inserted and the conflicting resources become children of |
487 | * the new resource. | 502 | * the new resource. |
488 | */ | 503 | */ |
489 | int insert_resource(struct resource *parent, struct resource *new) | 504 | struct resource *insert_resource_conflict(struct resource *parent, struct resource *new) |
490 | { | 505 | { |
491 | struct resource *conflict; | 506 | struct resource *conflict; |
492 | 507 | ||
493 | write_lock(&resource_lock); | 508 | write_lock(&resource_lock); |
494 | conflict = __insert_resource(parent, new); | 509 | conflict = __insert_resource(parent, new); |
495 | write_unlock(&resource_lock); | 510 | write_unlock(&resource_lock); |
511 | return conflict; | ||
512 | } | ||
513 | |||
514 | /** | ||
515 | * insert_resource - Inserts a resource in the resource tree | ||
516 | * @parent: parent of the new resource | ||
517 | * @new: new resource to insert | ||
518 | * | ||
519 | * Returns 0 on success, -EBUSY if the resource can't be inserted. | ||
520 | */ | ||
521 | int insert_resource(struct resource *parent, struct resource *new) | ||
522 | { | ||
523 | struct resource *conflict; | ||
524 | |||
525 | conflict = insert_resource_conflict(parent, new); | ||
496 | return conflict ? -EBUSY : 0; | 526 | return conflict ? -EBUSY : 0; |
497 | } | 527 | } |
498 | 528 | ||
diff --git a/kernel/sched.c b/kernel/sched.c index 9ab3cd7858d3..6af210a7de70 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -71,6 +71,7 @@ | |||
71 | #include <linux/debugfs.h> | 71 | #include <linux/debugfs.h> |
72 | #include <linux/ctype.h> | 72 | #include <linux/ctype.h> |
73 | #include <linux/ftrace.h> | 73 | #include <linux/ftrace.h> |
74 | #include <linux/slab.h> | ||
74 | 75 | ||
75 | #include <asm/tlb.h> | 76 | #include <asm/tlb.h> |
76 | #include <asm/irq_regs.h> | 77 | #include <asm/irq_regs.h> |
@@ -2650,7 +2651,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags) | |||
2650 | { | 2651 | { |
2651 | unsigned long flags; | 2652 | unsigned long flags; |
2652 | struct rq *rq; | 2653 | struct rq *rq; |
2653 | int cpu = get_cpu(); | 2654 | int cpu __maybe_unused = get_cpu(); |
2654 | 2655 | ||
2655 | #ifdef CONFIG_SMP | 2656 | #ifdef CONFIG_SMP |
2656 | /* | 2657 | /* |
@@ -4902,7 +4903,9 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len, | |||
4902 | int ret; | 4903 | int ret; |
4903 | cpumask_var_t mask; | 4904 | cpumask_var_t mask; |
4904 | 4905 | ||
4905 | if (len < cpumask_size()) | 4906 | if ((len * BITS_PER_BYTE) < nr_cpu_ids) |
4907 | return -EINVAL; | ||
4908 | if (len & (sizeof(unsigned long)-1)) | ||
4906 | return -EINVAL; | 4909 | return -EINVAL; |
4907 | 4910 | ||
4908 | if (!alloc_cpumask_var(&mask, GFP_KERNEL)) | 4911 | if (!alloc_cpumask_var(&mask, GFP_KERNEL)) |
@@ -4910,10 +4913,12 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len, | |||
4910 | 4913 | ||
4911 | ret = sched_getaffinity(pid, mask); | 4914 | ret = sched_getaffinity(pid, mask); |
4912 | if (ret == 0) { | 4915 | if (ret == 0) { |
4913 | if (copy_to_user(user_mask_ptr, mask, cpumask_size())) | 4916 | size_t retlen = min_t(size_t, len, cpumask_size()); |
4917 | |||
4918 | if (copy_to_user(user_mask_ptr, mask, retlen)) | ||
4914 | ret = -EFAULT; | 4919 | ret = -EFAULT; |
4915 | else | 4920 | else |
4916 | ret = cpumask_size(); | 4921 | ret = retlen; |
4917 | } | 4922 | } |
4918 | free_cpumask_var(mask); | 4923 | free_cpumask_var(mask); |
4919 | 4924 | ||
@@ -5383,7 +5388,7 @@ int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask) | |||
5383 | 5388 | ||
5384 | get_task_struct(mt); | 5389 | get_task_struct(mt); |
5385 | task_rq_unlock(rq, &flags); | 5390 | task_rq_unlock(rq, &flags); |
5386 | wake_up_process(rq->migration_thread); | 5391 | wake_up_process(mt); |
5387 | put_task_struct(mt); | 5392 | put_task_struct(mt); |
5388 | wait_for_completion(&req.done); | 5393 | wait_for_completion(&req.done); |
5389 | tlb_migrate_finish(p->mm); | 5394 | tlb_migrate_finish(p->mm); |
diff --git a/kernel/sched_cpupri.c b/kernel/sched_cpupri.c index fccf9fbb0d7b..e6871cb3fc83 100644 --- a/kernel/sched_cpupri.c +++ b/kernel/sched_cpupri.c | |||
@@ -27,6 +27,7 @@ | |||
27 | * of the License. | 27 | * of the License. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/gfp.h> | ||
30 | #include "sched_cpupri.h" | 31 | #include "sched_cpupri.h" |
31 | 32 | ||
32 | /* Convert between a 140 based task->prio, and our 102 based cpupri */ | 33 | /* Convert between a 140 based task->prio, and our 102 based cpupri */ |
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c index 67f95aada4b9..9b49db144037 100644 --- a/kernel/sched_debug.c +++ b/kernel/sched_debug.c | |||
@@ -518,8 +518,4 @@ void proc_sched_set_task(struct task_struct *p) | |||
518 | p->se.nr_wakeups_idle = 0; | 518 | p->se.nr_wakeups_idle = 0; |
519 | p->sched_info.bkl_count = 0; | 519 | p->sched_info.bkl_count = 0; |
520 | #endif | 520 | #endif |
521 | p->se.sum_exec_runtime = 0; | ||
522 | p->se.prev_sum_exec_runtime = 0; | ||
523 | p->nvcsw = 0; | ||
524 | p->nivcsw = 0; | ||
525 | } | 521 | } |
diff --git a/kernel/slow-work.c b/kernel/slow-work.c index 7494bbf5a270..7d3f4fa9ef4f 100644 --- a/kernel/slow-work.c +++ b/kernel/slow-work.c | |||
@@ -637,7 +637,7 @@ int delayed_slow_work_enqueue(struct delayed_slow_work *dwork, | |||
637 | goto cancelled; | 637 | goto cancelled; |
638 | 638 | ||
639 | /* the timer holds a reference whilst it is pending */ | 639 | /* the timer holds a reference whilst it is pending */ |
640 | ret = work->ops->get_ref(work); | 640 | ret = slow_work_get_ref(work); |
641 | if (ret < 0) | 641 | if (ret < 0) |
642 | goto cant_get_ref; | 642 | goto cant_get_ref; |
643 | 643 | ||
diff --git a/kernel/slow-work.h b/kernel/slow-work.h index 321f3c59d732..a29ebd1ef41d 100644 --- a/kernel/slow-work.h +++ b/kernel/slow-work.h | |||
@@ -43,28 +43,28 @@ extern void slow_work_new_thread_desc(struct slow_work *, struct seq_file *); | |||
43 | */ | 43 | */ |
44 | static inline void slow_work_set_thread_pid(int id, pid_t pid) | 44 | static inline void slow_work_set_thread_pid(int id, pid_t pid) |
45 | { | 45 | { |
46 | #ifdef CONFIG_SLOW_WORK_PROC | 46 | #ifdef CONFIG_SLOW_WORK_DEBUG |
47 | slow_work_pids[id] = pid; | 47 | slow_work_pids[id] = pid; |
48 | #endif | 48 | #endif |
49 | } | 49 | } |
50 | 50 | ||
51 | static inline void slow_work_mark_time(struct slow_work *work) | 51 | static inline void slow_work_mark_time(struct slow_work *work) |
52 | { | 52 | { |
53 | #ifdef CONFIG_SLOW_WORK_PROC | 53 | #ifdef CONFIG_SLOW_WORK_DEBUG |
54 | work->mark = CURRENT_TIME; | 54 | work->mark = CURRENT_TIME; |
55 | #endif | 55 | #endif |
56 | } | 56 | } |
57 | 57 | ||
58 | static inline void slow_work_begin_exec(int id, struct slow_work *work) | 58 | static inline void slow_work_begin_exec(int id, struct slow_work *work) |
59 | { | 59 | { |
60 | #ifdef CONFIG_SLOW_WORK_PROC | 60 | #ifdef CONFIG_SLOW_WORK_DEBUG |
61 | slow_work_execs[id] = work; | 61 | slow_work_execs[id] = work; |
62 | #endif | 62 | #endif |
63 | } | 63 | } |
64 | 64 | ||
65 | static inline void slow_work_end_exec(int id, struct slow_work *work) | 65 | static inline void slow_work_end_exec(int id, struct slow_work *work) |
66 | { | 66 | { |
67 | #ifdef CONFIG_SLOW_WORK_PROC | 67 | #ifdef CONFIG_SLOW_WORK_DEBUG |
68 | write_lock(&slow_work_execs_lock); | 68 | write_lock(&slow_work_execs_lock); |
69 | slow_work_execs[id] = NULL; | 69 | slow_work_execs[id] = NULL; |
70 | write_unlock(&slow_work_execs_lock); | 70 | write_unlock(&slow_work_execs_lock); |
diff --git a/kernel/smp.c b/kernel/smp.c index 9867b6bfefce..3fc697336183 100644 --- a/kernel/smp.c +++ b/kernel/smp.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/percpu.h> | 10 | #include <linux/percpu.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/gfp.h> | ||
12 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
13 | #include <linux/cpu.h> | 14 | #include <linux/cpu.h> |
14 | 15 | ||
diff --git a/kernel/softlockup.c b/kernel/softlockup.c index 0d4c7898ab80..4b493f67dcb5 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c | |||
@@ -155,11 +155,11 @@ void softlockup_tick(void) | |||
155 | * Wake up the high-prio watchdog task twice per | 155 | * Wake up the high-prio watchdog task twice per |
156 | * threshold timespan. | 156 | * threshold timespan. |
157 | */ | 157 | */ |
158 | if (now > touch_ts + softlockup_thresh/2) | 158 | if (time_after(now - softlockup_thresh/2, touch_ts)) |
159 | wake_up_process(per_cpu(softlockup_watchdog, this_cpu)); | 159 | wake_up_process(per_cpu(softlockup_watchdog, this_cpu)); |
160 | 160 | ||
161 | /* Warn about unreasonable delays: */ | 161 | /* Warn about unreasonable delays: */ |
162 | if (now <= (touch_ts + softlockup_thresh)) | 162 | if (time_before_eq(now - softlockup_thresh, touch_ts)) |
163 | return; | 163 | return; |
164 | 164 | ||
165 | per_cpu(softlockup_print_ts, this_cpu) = touch_ts; | 165 | per_cpu(softlockup_print_ts, this_cpu) = touch_ts; |
diff --git a/kernel/srcu.c b/kernel/srcu.c index bde4295774c8..2980da3fd509 100644 --- a/kernel/srcu.c +++ b/kernel/srcu.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/preempt.h> | 30 | #include <linux/preempt.h> |
31 | #include <linux/rcupdate.h> | 31 | #include <linux/rcupdate.h> |
32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
33 | #include <linux/slab.h> | ||
34 | #include <linux/smp.h> | 33 | #include <linux/smp.h> |
35 | #include <linux/srcu.h> | 34 | #include <linux/srcu.h> |
36 | 35 | ||
diff --git a/kernel/sys.c b/kernel/sys.c index 8298878f4f71..6d1a7e0f9d5b 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/personality.h> | 36 | #include <linux/personality.h> |
37 | #include <linux/ptrace.h> | 37 | #include <linux/ptrace.h> |
38 | #include <linux/fs_struct.h> | 38 | #include <linux/fs_struct.h> |
39 | #include <linux/gfp.h> | ||
39 | 40 | ||
40 | #include <linux/compat.h> | 41 | #include <linux/compat.h> |
41 | #include <linux/syscalls.h> | 42 | #include <linux/syscalls.h> |
diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c index 8cd50d8f9bde..59030570f5ca 100644 --- a/kernel/sysctl_binary.c +++ b/kernel/sysctl_binary.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/file.h> | 13 | #include <linux/file.h> |
14 | #include <linux/ctype.h> | 14 | #include <linux/ctype.h> |
15 | #include <linux/netdevice.h> | 15 | #include <linux/netdevice.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #ifdef CONFIG_SYSCTL_SYSCALL | 18 | #ifdef CONFIG_SYSCTL_SYSCALL |
18 | 19 | ||
diff --git a/kernel/taskstats.c b/kernel/taskstats.c index 899ca51be5e8..11281d5792bd 100644 --- a/kernel/taskstats.c +++ b/kernel/taskstats.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/delayacct.h> | 22 | #include <linux/delayacct.h> |
23 | #include <linux/cpumask.h> | 23 | #include <linux/cpumask.h> |
24 | #include <linux/percpu.h> | 24 | #include <linux/percpu.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/cgroupstats.h> | 26 | #include <linux/cgroupstats.h> |
26 | #include <linux/cgroup.h> | 27 | #include <linux/cgroup.h> |
27 | #include <linux/fs.h> | 28 | #include <linux/fs.h> |
diff --git a/kernel/time.c b/kernel/time.c index 804798005d19..656dccfe1cbb 100644 --- a/kernel/time.c +++ b/kernel/time.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/syscalls.h> | 35 | #include <linux/syscalls.h> |
36 | #include <linux/security.h> | 36 | #include <linux/security.h> |
37 | #include <linux/fs.h> | 37 | #include <linux/fs.h> |
38 | #include <linux/slab.h> | ||
39 | #include <linux/math64.h> | 38 | #include <linux/math64.h> |
40 | #include <linux/ptrace.h> | 39 | #include <linux/ptrace.h> |
41 | 40 | ||
diff --git a/kernel/time/tick-oneshot.c b/kernel/time/tick-oneshot.c index 0a8a213016f0..aada0e52680a 100644 --- a/kernel/time/tick-oneshot.c +++ b/kernel/time/tick-oneshot.c | |||
@@ -22,6 +22,29 @@ | |||
22 | 22 | ||
23 | #include "tick-internal.h" | 23 | #include "tick-internal.h" |
24 | 24 | ||
25 | /* Limit min_delta to a jiffie */ | ||
26 | #define MIN_DELTA_LIMIT (NSEC_PER_SEC / HZ) | ||
27 | |||
28 | static int tick_increase_min_delta(struct clock_event_device *dev) | ||
29 | { | ||
30 | /* Nothing to do if we already reached the limit */ | ||
31 | if (dev->min_delta_ns >= MIN_DELTA_LIMIT) | ||
32 | return -ETIME; | ||
33 | |||
34 | if (dev->min_delta_ns < 5000) | ||
35 | dev->min_delta_ns = 5000; | ||
36 | else | ||
37 | dev->min_delta_ns += dev->min_delta_ns >> 1; | ||
38 | |||
39 | if (dev->min_delta_ns > MIN_DELTA_LIMIT) | ||
40 | dev->min_delta_ns = MIN_DELTA_LIMIT; | ||
41 | |||
42 | printk(KERN_WARNING "CE: %s increased min_delta_ns to %llu nsec\n", | ||
43 | dev->name ? dev->name : "?", | ||
44 | (unsigned long long) dev->min_delta_ns); | ||
45 | return 0; | ||
46 | } | ||
47 | |||
25 | /** | 48 | /** |
26 | * tick_program_event internal worker function | 49 | * tick_program_event internal worker function |
27 | */ | 50 | */ |
@@ -37,23 +60,28 @@ int tick_dev_program_event(struct clock_event_device *dev, ktime_t expires, | |||
37 | if (!ret || !force) | 60 | if (!ret || !force) |
38 | return ret; | 61 | return ret; |
39 | 62 | ||
63 | dev->retries++; | ||
40 | /* | 64 | /* |
41 | * We tried 2 times to program the device with the given | 65 | * We tried 3 times to program the device with the given |
42 | * min_delta_ns. If that's not working then we double it | 66 | * min_delta_ns. If that's not working then we increase it |
43 | * and emit a warning. | 67 | * and emit a warning. |
44 | */ | 68 | */ |
45 | if (++i > 2) { | 69 | if (++i > 2) { |
46 | /* Increase the min. delta and try again */ | 70 | /* Increase the min. delta and try again */ |
47 | if (!dev->min_delta_ns) | 71 | if (tick_increase_min_delta(dev)) { |
48 | dev->min_delta_ns = 5000; | 72 | /* |
49 | else | 73 | * Get out of the loop if min_delta_ns |
50 | dev->min_delta_ns += dev->min_delta_ns >> 1; | 74 | * hit the limit already. That's |
51 | 75 | * better than staying here forever. | |
52 | printk(KERN_WARNING | 76 | * |
53 | "CE: %s increasing min_delta_ns to %llu nsec\n", | 77 | * We clear next_event so we have a |
54 | dev->name ? dev->name : "?", | 78 | * chance that the box survives. |
55 | (unsigned long long) dev->min_delta_ns << 1); | 79 | */ |
56 | 80 | printk(KERN_WARNING | |
81 | "CE: Reprogramming failure. Giving up\n"); | ||
82 | dev->next_event.tv64 = KTIME_MAX; | ||
83 | return -ETIME; | ||
84 | } | ||
57 | i = 0; | 85 | i = 0; |
58 | } | 86 | } |
59 | 87 | ||
diff --git a/kernel/time/timecompare.c b/kernel/time/timecompare.c index 12f5c55090be..ac38fbb176cc 100644 --- a/kernel/time/timecompare.c +++ b/kernel/time/timecompare.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/timecompare.h> | 20 | #include <linux/timecompare.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/math64.h> | 23 | #include <linux/math64.h> |
23 | 24 | ||
24 | /* | 25 | /* |
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 16736379a9ca..39f6177fafac 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -818,7 +818,8 @@ void update_wall_time(void) | |||
818 | shift = min(shift, maxshift); | 818 | shift = min(shift, maxshift); |
819 | while (offset >= timekeeper.cycle_interval) { | 819 | while (offset >= timekeeper.cycle_interval) { |
820 | offset = logarithmic_accumulation(offset, shift); | 820 | offset = logarithmic_accumulation(offset, shift); |
821 | shift--; | 821 | if(offset < timekeeper.cycle_interval<<shift) |
822 | shift--; | ||
822 | } | 823 | } |
823 | 824 | ||
824 | /* correct the clock when NTP error is too big */ | 825 | /* correct the clock when NTP error is too big */ |
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index bdfb8dd1050c..1a4a7dd78777 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c | |||
@@ -228,6 +228,7 @@ print_tickdevice(struct seq_file *m, struct tick_device *td, int cpu) | |||
228 | SEQ_printf(m, " event_handler: "); | 228 | SEQ_printf(m, " event_handler: "); |
229 | print_name_offset(m, dev->event_handler); | 229 | print_name_offset(m, dev->event_handler); |
230 | SEQ_printf(m, "\n"); | 230 | SEQ_printf(m, "\n"); |
231 | SEQ_printf(m, " retries: %lu\n", dev->retries); | ||
231 | } | 232 | } |
232 | 233 | ||
233 | static void timer_list_show_tickdevices(struct seq_file *m) | 234 | static void timer_list_show_tickdevices(struct seq_file *m) |
@@ -257,7 +258,7 @@ static int timer_list_show(struct seq_file *m, void *v) | |||
257 | u64 now = ktime_to_ns(ktime_get()); | 258 | u64 now = ktime_to_ns(ktime_get()); |
258 | int cpu; | 259 | int cpu; |
259 | 260 | ||
260 | SEQ_printf(m, "Timer List Version: v0.5\n"); | 261 | SEQ_printf(m, "Timer List Version: v0.6\n"); |
261 | SEQ_printf(m, "HRTIMER_MAX_CLOCK_BASES: %d\n", HRTIMER_MAX_CLOCK_BASES); | 262 | SEQ_printf(m, "HRTIMER_MAX_CLOCK_BASES: %d\n", HRTIMER_MAX_CLOCK_BASES); |
262 | SEQ_printf(m, "now at %Ld nsecs\n", (unsigned long long)now); | 263 | SEQ_printf(m, "now at %Ld nsecs\n", (unsigned long long)now); |
263 | 264 | ||
diff --git a/kernel/timer.c b/kernel/timer.c index c61a7949387f..aeb6a54f2771 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/kallsyms.h> | 39 | #include <linux/kallsyms.h> |
40 | #include <linux/perf_event.h> | 40 | #include <linux/perf_event.h> |
41 | #include <linux/sched.h> | 41 | #include <linux/sched.h> |
42 | #include <linux/slab.h> | ||
42 | 43 | ||
43 | #include <asm/uaccess.h> | 44 | #include <asm/uaccess.h> |
44 | #include <asm/unistd.h> | 45 | #include <asm/unistd.h> |
@@ -880,6 +881,7 @@ int try_to_del_timer_sync(struct timer_list *timer) | |||
880 | if (base->running_timer == timer) | 881 | if (base->running_timer == timer) |
881 | goto out; | 882 | goto out; |
882 | 883 | ||
884 | timer_stats_timer_clear_start_info(timer); | ||
883 | ret = 0; | 885 | ret = 0; |
884 | if (timer_pending(timer)) { | 886 | if (timer_pending(timer)) { |
885 | detach_timer(timer, 1); | 887 | detach_timer(timer, 1); |
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 07f945a99430..b3bc91a3f510 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/percpu.h> | 21 | #include <linux/percpu.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/debugfs.h> | 25 | #include <linux/debugfs.h> |
25 | #include <linux/smp_lock.h> | 26 | #include <linux/smp_lock.h> |
26 | #include <linux/time.h> | 27 | #include <linux/time.h> |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index d9062f5cc0c0..2404b59b3097 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/uaccess.h> | 24 | #include <linux/uaccess.h> |
25 | #include <linux/ftrace.h> | 25 | #include <linux/ftrace.h> |
26 | #include <linux/sysctl.h> | 26 | #include <linux/sysctl.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/ctype.h> | 28 | #include <linux/ctype.h> |
28 | #include <linux/list.h> | 29 | #include <linux/list.h> |
29 | #include <linux/hash.h> | 30 | #include <linux/hash.h> |
diff --git a/kernel/trace/power-traces.c b/kernel/trace/power-traces.c index 9f4f565b01e6..a22582a06161 100644 --- a/kernel/trace/power-traces.c +++ b/kernel/trace/power-traces.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/workqueue.h> | 9 | #include <linux/workqueue.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/slab.h> | ||
13 | 12 | ||
14 | #define CREATE_TRACE_POINTS | 13 | #define CREATE_TRACE_POINTS |
15 | #include <trace/events/power.h> | 14 | #include <trace/events/power.h> |
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 05a9f83b8819..41ca394feb22 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/percpu.h> | 15 | #include <linux/percpu.h> |
16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/hash.h> | 19 | #include <linux/hash.h> |
19 | #include <linux/list.h> | 20 | #include <linux/list.h> |
@@ -207,6 +208,14 @@ EXPORT_SYMBOL_GPL(tracing_is_on); | |||
207 | #define RB_MAX_SMALL_DATA (RB_ALIGNMENT * RINGBUF_TYPE_DATA_TYPE_LEN_MAX) | 208 | #define RB_MAX_SMALL_DATA (RB_ALIGNMENT * RINGBUF_TYPE_DATA_TYPE_LEN_MAX) |
208 | #define RB_EVNT_MIN_SIZE 8U /* two 32bit words */ | 209 | #define RB_EVNT_MIN_SIZE 8U /* two 32bit words */ |
209 | 210 | ||
211 | #if !defined(CONFIG_64BIT) || defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) | ||
212 | # define RB_FORCE_8BYTE_ALIGNMENT 0 | ||
213 | # define RB_ARCH_ALIGNMENT RB_ALIGNMENT | ||
214 | #else | ||
215 | # define RB_FORCE_8BYTE_ALIGNMENT 1 | ||
216 | # define RB_ARCH_ALIGNMENT 8U | ||
217 | #endif | ||
218 | |||
210 | /* define RINGBUF_TYPE_DATA for 'case RINGBUF_TYPE_DATA:' */ | 219 | /* define RINGBUF_TYPE_DATA for 'case RINGBUF_TYPE_DATA:' */ |
211 | #define RINGBUF_TYPE_DATA 0 ... RINGBUF_TYPE_DATA_TYPE_LEN_MAX | 220 | #define RINGBUF_TYPE_DATA 0 ... RINGBUF_TYPE_DATA_TYPE_LEN_MAX |
212 | 221 | ||
@@ -1201,18 +1210,19 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned nr_pages) | |||
1201 | 1210 | ||
1202 | for (i = 0; i < nr_pages; i++) { | 1211 | for (i = 0; i < nr_pages; i++) { |
1203 | if (RB_WARN_ON(cpu_buffer, list_empty(cpu_buffer->pages))) | 1212 | if (RB_WARN_ON(cpu_buffer, list_empty(cpu_buffer->pages))) |
1204 | return; | 1213 | goto out; |
1205 | p = cpu_buffer->pages->next; | 1214 | p = cpu_buffer->pages->next; |
1206 | bpage = list_entry(p, struct buffer_page, list); | 1215 | bpage = list_entry(p, struct buffer_page, list); |
1207 | list_del_init(&bpage->list); | 1216 | list_del_init(&bpage->list); |
1208 | free_buffer_page(bpage); | 1217 | free_buffer_page(bpage); |
1209 | } | 1218 | } |
1210 | if (RB_WARN_ON(cpu_buffer, list_empty(cpu_buffer->pages))) | 1219 | if (RB_WARN_ON(cpu_buffer, list_empty(cpu_buffer->pages))) |
1211 | return; | 1220 | goto out; |
1212 | 1221 | ||
1213 | rb_reset_cpu(cpu_buffer); | 1222 | rb_reset_cpu(cpu_buffer); |
1214 | rb_check_pages(cpu_buffer); | 1223 | rb_check_pages(cpu_buffer); |
1215 | 1224 | ||
1225 | out: | ||
1216 | spin_unlock_irq(&cpu_buffer->reader_lock); | 1226 | spin_unlock_irq(&cpu_buffer->reader_lock); |
1217 | } | 1227 | } |
1218 | 1228 | ||
@@ -1229,7 +1239,7 @@ rb_insert_pages(struct ring_buffer_per_cpu *cpu_buffer, | |||
1229 | 1239 | ||
1230 | for (i = 0; i < nr_pages; i++) { | 1240 | for (i = 0; i < nr_pages; i++) { |
1231 | if (RB_WARN_ON(cpu_buffer, list_empty(pages))) | 1241 | if (RB_WARN_ON(cpu_buffer, list_empty(pages))) |
1232 | return; | 1242 | goto out; |
1233 | p = pages->next; | 1243 | p = pages->next; |
1234 | bpage = list_entry(p, struct buffer_page, list); | 1244 | bpage = list_entry(p, struct buffer_page, list); |
1235 | list_del_init(&bpage->list); | 1245 | list_del_init(&bpage->list); |
@@ -1238,6 +1248,7 @@ rb_insert_pages(struct ring_buffer_per_cpu *cpu_buffer, | |||
1238 | rb_reset_cpu(cpu_buffer); | 1248 | rb_reset_cpu(cpu_buffer); |
1239 | rb_check_pages(cpu_buffer); | 1249 | rb_check_pages(cpu_buffer); |
1240 | 1250 | ||
1251 | out: | ||
1241 | spin_unlock_irq(&cpu_buffer->reader_lock); | 1252 | spin_unlock_irq(&cpu_buffer->reader_lock); |
1242 | } | 1253 | } |
1243 | 1254 | ||
@@ -1547,7 +1558,7 @@ rb_update_event(struct ring_buffer_event *event, | |||
1547 | 1558 | ||
1548 | case 0: | 1559 | case 0: |
1549 | length -= RB_EVNT_HDR_SIZE; | 1560 | length -= RB_EVNT_HDR_SIZE; |
1550 | if (length > RB_MAX_SMALL_DATA) | 1561 | if (length > RB_MAX_SMALL_DATA || RB_FORCE_8BYTE_ALIGNMENT) |
1551 | event->array[0] = length; | 1562 | event->array[0] = length; |
1552 | else | 1563 | else |
1553 | event->type_len = DIV_ROUND_UP(length, RB_ALIGNMENT); | 1564 | event->type_len = DIV_ROUND_UP(length, RB_ALIGNMENT); |
@@ -1722,11 +1733,11 @@ static unsigned rb_calculate_event_length(unsigned length) | |||
1722 | if (!length) | 1733 | if (!length) |
1723 | length = 1; | 1734 | length = 1; |
1724 | 1735 | ||
1725 | if (length > RB_MAX_SMALL_DATA) | 1736 | if (length > RB_MAX_SMALL_DATA || RB_FORCE_8BYTE_ALIGNMENT) |
1726 | length += sizeof(event.array[0]); | 1737 | length += sizeof(event.array[0]); |
1727 | 1738 | ||
1728 | length += RB_EVNT_HDR_SIZE; | 1739 | length += RB_EVNT_HDR_SIZE; |
1729 | length = ALIGN(length, RB_ALIGNMENT); | 1740 | length = ALIGN(length, RB_ARCH_ALIGNMENT); |
1730 | 1741 | ||
1731 | return length; | 1742 | return length; |
1732 | } | 1743 | } |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 3ec2ee6f6560..44f916a04065 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -33,10 +33,10 @@ | |||
33 | #include <linux/kdebug.h> | 33 | #include <linux/kdebug.h> |
34 | #include <linux/string.h> | 34 | #include <linux/string.h> |
35 | #include <linux/rwsem.h> | 35 | #include <linux/rwsem.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/ctype.h> | 37 | #include <linux/ctype.h> |
37 | #include <linux/init.h> | 38 | #include <linux/init.h> |
38 | #include <linux/poll.h> | 39 | #include <linux/poll.h> |
39 | #include <linux/gfp.h> | ||
40 | #include <linux/fs.h> | 40 | #include <linux/fs.h> |
41 | 41 | ||
42 | #include "trace.h" | 42 | #include "trace.h" |
diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c index 6fbfb8f417b9..9d589d8dcd1a 100644 --- a/kernel/trace/trace_clock.c +++ b/kernel/trace/trace_clock.c | |||
@@ -84,7 +84,7 @@ u64 notrace trace_clock_global(void) | |||
84 | int this_cpu; | 84 | int this_cpu; |
85 | u64 now; | 85 | u64 now; |
86 | 86 | ||
87 | raw_local_irq_save(flags); | 87 | local_irq_save(flags); |
88 | 88 | ||
89 | this_cpu = raw_smp_processor_id(); | 89 | this_cpu = raw_smp_processor_id(); |
90 | now = cpu_clock(this_cpu); | 90 | now = cpu_clock(this_cpu); |
@@ -110,7 +110,7 @@ u64 notrace trace_clock_global(void) | |||
110 | arch_spin_unlock(&trace_clock_struct.lock); | 110 | arch_spin_unlock(&trace_clock_struct.lock); |
111 | 111 | ||
112 | out: | 112 | out: |
113 | raw_local_irq_restore(flags); | 113 | local_irq_restore(flags); |
114 | 114 | ||
115 | return now; | 115 | return now; |
116 | } | 116 | } |
diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c index 81f691eb3a30..0565bb42566f 100644 --- a/kernel/trace/trace_event_perf.c +++ b/kernel/trace/trace_event_perf.c | |||
@@ -17,7 +17,12 @@ EXPORT_SYMBOL_GPL(perf_arch_fetch_caller_regs); | |||
17 | static char *perf_trace_buf; | 17 | static char *perf_trace_buf; |
18 | static char *perf_trace_buf_nmi; | 18 | static char *perf_trace_buf_nmi; |
19 | 19 | ||
20 | typedef typeof(char [PERF_MAX_TRACE_SIZE]) perf_trace_t ; | 20 | /* |
21 | * Force it to be aligned to unsigned long to avoid misaligned accesses | ||
22 | * suprises | ||
23 | */ | ||
24 | typedef typeof(unsigned long [PERF_MAX_TRACE_SIZE / sizeof(unsigned long)]) | ||
25 | perf_trace_t; | ||
21 | 26 | ||
22 | /* Count the events in use (per event id, not per instance) */ | 27 | /* Count the events in use (per event id, not per instance) */ |
23 | static int total_ref_count; | 28 | static int total_ref_count; |
@@ -130,6 +135,8 @@ __kprobes void *perf_trace_buf_prepare(int size, unsigned short type, | |||
130 | char *trace_buf, *raw_data; | 135 | char *trace_buf, *raw_data; |
131 | int pc, cpu; | 136 | int pc, cpu; |
132 | 137 | ||
138 | BUILD_BUG_ON(PERF_MAX_TRACE_SIZE % sizeof(unsigned long)); | ||
139 | |||
133 | pc = preempt_count(); | 140 | pc = preempt_count(); |
134 | 141 | ||
135 | /* Protect the per cpu buffer, begin the rcu read side */ | 142 | /* Protect the per cpu buffer, begin the rcu read side */ |
@@ -152,7 +159,7 @@ __kprobes void *perf_trace_buf_prepare(int size, unsigned short type, | |||
152 | raw_data = per_cpu_ptr(trace_buf, cpu); | 159 | raw_data = per_cpu_ptr(trace_buf, cpu); |
153 | 160 | ||
154 | /* zero the dead bytes from align to not leak stack to user */ | 161 | /* zero the dead bytes from align to not leak stack to user */ |
155 | *(u64 *)(&raw_data[size - sizeof(u64)]) = 0ULL; | 162 | memset(&raw_data[size - sizeof(u64)], 0, sizeof(u64)); |
156 | 163 | ||
157 | entry = (struct trace_entry *)raw_data; | 164 | entry = (struct trace_entry *)raw_data; |
158 | tracing_generic_entry_update(entry, *irq_flags, pc); | 165 | tracing_generic_entry_update(entry, *irq_flags, pc); |
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index beab8bf2f310..c697c7043349 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/uaccess.h> | 15 | #include <linux/uaccess.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/ctype.h> | 17 | #include <linux/ctype.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
19 | 20 | ||
20 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index 4615f62a04f1..88c0b6dbd7fe 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/ctype.h> | 22 | #include <linux/ctype.h> |
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/perf_event.h> | 24 | #include <linux/perf_event.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include "trace.h" | 27 | #include "trace.h" |
27 | #include "trace_output.h" | 28 | #include "trace_output.h" |
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index e6989d9b44da..9aed1a5cf553 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/debugfs.h> | 9 | #include <linux/debugfs.h> |
10 | #include <linux/uaccess.h> | 10 | #include <linux/uaccess.h> |
11 | #include <linux/ftrace.h> | 11 | #include <linux/ftrace.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
13 | 14 | ||
14 | #include "trace.h" | 15 | #include "trace.h" |
diff --git a/kernel/trace/trace_ksym.c b/kernel/trace/trace_ksym.c index 94103cdcf9d8..d59cd6879477 100644 --- a/kernel/trace/trace_ksym.c +++ b/kernel/trace/trace_ksym.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/debugfs.h> | 23 | #include <linux/debugfs.h> |
24 | #include <linux/ftrace.h> | 24 | #include <linux/ftrace.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/fs.h> | 27 | #include <linux/fs.h> |
27 | 28 | ||
28 | #include "trace_output.h" | 29 | #include "trace_output.h" |
diff --git a/kernel/trace/trace_mmiotrace.c b/kernel/trace/trace_mmiotrace.c index 0acd834659ed..017fa376505d 100644 --- a/kernel/trace/trace_mmiotrace.c +++ b/kernel/trace/trace_mmiotrace.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/mmiotrace.h> | 10 | #include <linux/mmiotrace.h> |
11 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/time.h> | 13 | #include <linux/time.h> |
13 | 14 | ||
14 | #include <asm/atomic.h> | 15 | #include <asm/atomic.h> |
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c index 280fea470d67..81003b4d617f 100644 --- a/kernel/trace/trace_selftest.c +++ b/kernel/trace/trace_selftest.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/stringify.h> | 3 | #include <linux/stringify.h> |
4 | #include <linux/kthread.h> | 4 | #include <linux/kthread.h> |
5 | #include <linux/delay.h> | 5 | #include <linux/delay.h> |
6 | #include <linux/slab.h> | ||
6 | 7 | ||
7 | static inline int trace_valid_entry(struct trace_entry *entry) | 8 | static inline int trace_valid_entry(struct trace_entry *entry) |
8 | { | 9 | { |
diff --git a/kernel/trace/trace_stat.c b/kernel/trace/trace_stat.c index a4bb239eb987..96cffb269e73 100644 --- a/kernel/trace/trace_stat.c +++ b/kernel/trace/trace_stat.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | 11 | ||
12 | #include <linux/list.h> | 12 | #include <linux/list.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/rbtree.h> | 14 | #include <linux/rbtree.h> |
14 | #include <linux/debugfs.h> | 15 | #include <linux/debugfs.h> |
15 | #include "trace_stat.h" | 16 | #include "trace_stat.h" |
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c index 33c2a5b769dc..4d6d711717f2 100644 --- a/kernel/trace/trace_syscalls.c +++ b/kernel/trace/trace_syscalls.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <trace/syscall.h> | 1 | #include <trace/syscall.h> |
2 | #include <trace/events/syscalls.h> | 2 | #include <trace/events/syscalls.h> |
3 | #include <linux/slab.h> | ||
3 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
4 | #include <linux/ftrace.h> | 5 | #include <linux/ftrace.h> |
5 | #include <linux/perf_event.h> | 6 | #include <linux/perf_event.h> |
diff --git a/kernel/trace/trace_workqueue.c b/kernel/trace/trace_workqueue.c index 40cafb07dffd..cc2d2faa7d9e 100644 --- a/kernel/trace/trace_workqueue.c +++ b/kernel/trace/trace_workqueue.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <trace/events/workqueue.h> | 9 | #include <trace/events/workqueue.h> |
10 | #include <linux/list.h> | 10 | #include <linux/list.h> |
11 | #include <linux/percpu.h> | 11 | #include <linux/percpu.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/kref.h> | 13 | #include <linux/kref.h> |
13 | #include "trace_stat.h" | 14 | #include "trace_stat.h" |
14 | #include "trace.h" | 15 | #include "trace.h" |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 8e5ec5e1ab91..ff017108700d 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -103,7 +103,8 @@ config HEADERS_CHECK | |||
103 | 103 | ||
104 | config DEBUG_SECTION_MISMATCH | 104 | config DEBUG_SECTION_MISMATCH |
105 | bool "Enable full Section mismatch analysis" | 105 | bool "Enable full Section mismatch analysis" |
106 | depends on UNDEFINED | 106 | depends on UNDEFINED || (BLACKFIN) |
107 | default y | ||
107 | # This option is on purpose disabled for now. | 108 | # This option is on purpose disabled for now. |
108 | # It will be enabled when we are down to a reasonable number | 109 | # It will be enabled when we are down to a reasonable number |
109 | # of section mismatch warnings (< 10 for an allyesconfig build) | 110 | # of section mismatch warnings (< 10 for an allyesconfig build) |
@@ -355,7 +356,7 @@ config SLUB_STATS | |||
355 | config DEBUG_KMEMLEAK | 356 | config DEBUG_KMEMLEAK |
356 | bool "Kernel memory leak detector" | 357 | bool "Kernel memory leak detector" |
357 | depends on DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && \ | 358 | depends on DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && \ |
358 | (X86 || ARM || PPC || S390 || SUPERH) | 359 | (X86 || ARM || PPC || S390 || SUPERH || MICROBLAZE) |
359 | 360 | ||
360 | select DEBUG_FS if SYSFS | 361 | select DEBUG_FS if SYSFS |
361 | select STACKTRACE if STACKTRACE_SUPPORT | 362 | select STACKTRACE if STACKTRACE_SUPPORT |
diff --git a/lib/Makefile b/lib/Makefile index 2e152aed7198..0d4015205c64 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
@@ -21,7 +21,7 @@ lib-y += kobject.o kref.o klist.o | |||
21 | 21 | ||
22 | obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \ | 22 | obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \ |
23 | bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \ | 23 | bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \ |
24 | string_helpers.o gcd.o list_sort.o | 24 | string_helpers.o gcd.o lcm.o list_sort.o |
25 | 25 | ||
26 | ifeq ($(CONFIG_DEBUG_KOBJECT),y) | 26 | ifeq ($(CONFIG_DEBUG_KOBJECT),y) |
27 | CFLAGS_kobject.o += -DDEBUG | 27 | CFLAGS_kobject.o += -DDEBUG |
diff --git a/lib/cpumask.c b/lib/cpumask.c index 7bb4142a502f..05d6aca7fc19 100644 --- a/lib/cpumask.c +++ b/lib/cpumask.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #include <linux/slab.h> | ||
1 | #include <linux/kernel.h> | 2 | #include <linux/kernel.h> |
2 | #include <linux/bitops.h> | 3 | #include <linux/bitops.h> |
3 | #include <linux/cpumask.h> | 4 | #include <linux/cpumask.h> |
diff --git a/lib/crc32.c b/lib/crc32.c index 0f45fbff34cb..bc5b936e9142 100644 --- a/lib/crc32.c +++ b/lib/crc32.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/compiler.h> | 26 | #include <linux/compiler.h> |
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
30 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
31 | #include "crc32defs.h" | 30 | #include "crc32defs.h" |
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index a9a8996d286a..b862b30369ff 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
14 | #include <linux/debugfs.h> | 14 | #include <linux/debugfs.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/hash.h> | 16 | #include <linux/hash.h> |
16 | 17 | ||
17 | #define ODEBUG_HASH_BITS 14 | 18 | #define ODEBUG_HASH_BITS 14 |
diff --git a/lib/devres.c b/lib/devres.c index 72c8909006da..49368608f988 100644 --- a/lib/devres.c +++ b/lib/devres.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/pci.h> | 1 | #include <linux/pci.h> |
2 | #include <linux/io.h> | 2 | #include <linux/io.h> |
3 | #include <linux/gfp.h> | ||
3 | #include <linux/module.h> | 4 | #include <linux/module.h> |
4 | 5 | ||
5 | void devm_ioremap_release(struct device *dev, void *res) | 6 | void devm_ioremap_release(struct device *dev, void *res) |
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index f93502915988..d6b8b9b1abfe 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/uaccess.h> | 25 | #include <linux/uaccess.h> |
26 | #include <linux/dynamic_debug.h> | 26 | #include <linux/dynamic_debug.h> |
27 | #include <linux/debugfs.h> | 27 | #include <linux/debugfs.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | extern struct _ddebug __start___verbose[]; | 30 | extern struct _ddebug __start___verbose[]; |
30 | extern struct _ddebug __stop___verbose[]; | 31 | extern struct _ddebug __stop___verbose[]; |
diff --git a/lib/genalloc.c b/lib/genalloc.c index e67f97495dd5..736c3b06398e 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * Version 2. See the file COPYING for more details. | 10 | * Version 2. See the file COPYING for more details. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/slab.h> | ||
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/bitmap.h> | 15 | #include <linux/bitmap.h> |
15 | #include <linux/genalloc.h> | 16 | #include <linux/genalloc.h> |
diff --git a/lib/inflate.c b/lib/inflate.c index d10255973a9f..677b738c2204 100644 --- a/lib/inflate.c +++ b/lib/inflate.c | |||
@@ -103,6 +103,7 @@ | |||
103 | the two sets of lengths. | 103 | the two sets of lengths. |
104 | */ | 104 | */ |
105 | #include <linux/compiler.h> | 105 | #include <linux/compiler.h> |
106 | #include <linux/slab.h> | ||
106 | 107 | ||
107 | #ifdef RCSID | 108 | #ifdef RCSID |
108 | static char rcsid[] = "#Id: inflate.c,v 0.14 1993/06/10 13:27:04 jloup Exp #"; | 109 | static char rcsid[] = "#Id: inflate.c,v 0.14 1993/06/10 13:27:04 jloup Exp #"; |
diff --git a/lib/kasprintf.c b/lib/kasprintf.c index c5ff1fd10030..9c4233b23783 100644 --- a/lib/kasprintf.c +++ b/lib/kasprintf.c | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <stdarg.h> | 7 | #include <stdarg.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/types.h> | 10 | #include <linux/types.h> |
10 | #include <linux/string.h> | 11 | #include <linux/string.h> |
11 | 12 | ||
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index c9d3a3e8405d..7b48d44ced6e 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/kobject.h> | 19 | #include <linux/kobject.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <linux/socket.h> | 23 | #include <linux/socket.h> |
23 | #include <linux/skbuff.h> | 24 | #include <linux/skbuff.h> |
diff --git a/lib/kref.c b/lib/kref.c index 9ecd6e865610..6d19f690380b 100644 --- a/lib/kref.c +++ b/lib/kref.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/kref.h> | 14 | #include <linux/kref.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | /** | 18 | /** |
18 | * kref_set - initialize object and set refcount to requested number. | 19 | * kref_set - initialize object and set refcount to requested number. |
diff --git a/lib/lcm.c b/lib/lcm.c new file mode 100644 index 000000000000..157cd88a6ffc --- /dev/null +++ b/lib/lcm.c | |||
@@ -0,0 +1,15 @@ | |||
1 | #include <linux/kernel.h> | ||
2 | #include <linux/gcd.h> | ||
3 | #include <linux/module.h> | ||
4 | |||
5 | /* Lowest common multiple */ | ||
6 | unsigned long lcm(unsigned long a, unsigned long b) | ||
7 | { | ||
8 | if (a && b) | ||
9 | return (a * b) / gcd(a, b); | ||
10 | else if (b) | ||
11 | return b; | ||
12 | |||
13 | return a; | ||
14 | } | ||
15 | EXPORT_SYMBOL_GPL(lcm); | ||
diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 6b9670d6bbf9..2a087e0f9863 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
29 | #include <linux/notifier.h> | 29 | #include <linux/notifier.h> |
30 | #include <linux/cpu.h> | 30 | #include <linux/cpu.h> |
31 | #include <linux/gfp.h> | ||
32 | #include <linux/string.h> | 31 | #include <linux/string.h> |
33 | #include <linux/bitops.h> | 32 | #include <linux/bitops.h> |
34 | #include <linux/rcupdate.h> | 33 | #include <linux/rcupdate.h> |
@@ -556,6 +555,10 @@ EXPORT_SYMBOL(radix_tree_tag_clear); | |||
556 | * | 555 | * |
557 | * 0: tag not present or not set | 556 | * 0: tag not present or not set |
558 | * 1: tag set | 557 | * 1: tag set |
558 | * | ||
559 | * Note that the return value of this function may not be relied on, even if | ||
560 | * the RCU lock is held, unless tag modification and node deletion are excluded | ||
561 | * from concurrency. | ||
559 | */ | 562 | */ |
560 | int radix_tree_tag_get(struct radix_tree_root *root, | 563 | int radix_tree_tag_get(struct radix_tree_root *root, |
561 | unsigned long index, unsigned int tag) | 564 | unsigned long index, unsigned int tag) |
@@ -596,12 +599,8 @@ int radix_tree_tag_get(struct radix_tree_root *root, | |||
596 | */ | 599 | */ |
597 | if (!tag_get(node, tag, offset)) | 600 | if (!tag_get(node, tag, offset)) |
598 | saw_unset_tag = 1; | 601 | saw_unset_tag = 1; |
599 | if (height == 1) { | 602 | if (height == 1) |
600 | int ret = tag_get(node, tag, offset); | 603 | return !!tag_get(node, tag, offset); |
601 | |||
602 | BUG_ON(ret && saw_unset_tag); | ||
603 | return !!ret; | ||
604 | } | ||
605 | node = rcu_dereference_raw(node->slots[offset]); | 604 | node = rcu_dereference_raw(node->slots[offset]); |
606 | shift -= RADIX_TREE_MAP_SHIFT; | 605 | shift -= RADIX_TREE_MAP_SHIFT; |
607 | height--; | 606 | height--; |
diff --git a/lib/ratelimit.c b/lib/ratelimit.c index 09f5ce1810dc..027a03f4c56d 100644 --- a/lib/ratelimit.c +++ b/lib/ratelimit.c | |||
@@ -16,9 +16,14 @@ | |||
16 | /* | 16 | /* |
17 | * __ratelimit - rate limiting | 17 | * __ratelimit - rate limiting |
18 | * @rs: ratelimit_state data | 18 | * @rs: ratelimit_state data |
19 | * @func: name of calling function | ||
19 | * | 20 | * |
20 | * This enforces a rate limit: not more than @rs->ratelimit_burst callbacks | 21 | * This enforces a rate limit: not more than @rs->burst callbacks |
21 | * in every @rs->ratelimit_jiffies | 22 | * in every @rs->interval |
23 | * | ||
24 | * RETURNS: | ||
25 | * 0 means callbacks will be suppressed. | ||
26 | * 1 means go ahead and do it. | ||
22 | */ | 27 | */ |
23 | int ___ratelimit(struct ratelimit_state *rs, const char *func) | 28 | int ___ratelimit(struct ratelimit_state *rs, const char *func) |
24 | { | 29 | { |
@@ -35,7 +40,7 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func) | |||
35 | * the entity that is holding the lock already: | 40 | * the entity that is holding the lock already: |
36 | */ | 41 | */ |
37 | if (!spin_trylock_irqsave(&rs->lock, flags)) | 42 | if (!spin_trylock_irqsave(&rs->lock, flags)) |
38 | return 1; | 43 | return 0; |
39 | 44 | ||
40 | if (!rs->begin) | 45 | if (!rs->begin) |
41 | rs->begin = jiffies; | 46 | rs->begin = jiffies; |
diff --git a/lib/rwsem-spinlock.c b/lib/rwsem-spinlock.c index ccf95bff7984..ffc9fc7f3b05 100644 --- a/lib/rwsem-spinlock.c +++ b/lib/rwsem-spinlock.c | |||
@@ -143,13 +143,14 @@ void __sched __down_read(struct rw_semaphore *sem) | |||
143 | { | 143 | { |
144 | struct rwsem_waiter waiter; | 144 | struct rwsem_waiter waiter; |
145 | struct task_struct *tsk; | 145 | struct task_struct *tsk; |
146 | unsigned long flags; | ||
146 | 147 | ||
147 | spin_lock_irq(&sem->wait_lock); | 148 | spin_lock_irqsave(&sem->wait_lock, flags); |
148 | 149 | ||
149 | if (sem->activity >= 0 && list_empty(&sem->wait_list)) { | 150 | if (sem->activity >= 0 && list_empty(&sem->wait_list)) { |
150 | /* granted */ | 151 | /* granted */ |
151 | sem->activity++; | 152 | sem->activity++; |
152 | spin_unlock_irq(&sem->wait_lock); | 153 | spin_unlock_irqrestore(&sem->wait_lock, flags); |
153 | goto out; | 154 | goto out; |
154 | } | 155 | } |
155 | 156 | ||
@@ -164,7 +165,7 @@ void __sched __down_read(struct rw_semaphore *sem) | |||
164 | list_add_tail(&waiter.list, &sem->wait_list); | 165 | list_add_tail(&waiter.list, &sem->wait_list); |
165 | 166 | ||
166 | /* we don't need to touch the semaphore struct anymore */ | 167 | /* we don't need to touch the semaphore struct anymore */ |
167 | spin_unlock_irq(&sem->wait_lock); | 168 | spin_unlock_irqrestore(&sem->wait_lock, flags); |
168 | 169 | ||
169 | /* wait to be given the lock */ | 170 | /* wait to be given the lock */ |
170 | for (;;) { | 171 | for (;;) { |
@@ -209,13 +210,14 @@ void __sched __down_write_nested(struct rw_semaphore *sem, int subclass) | |||
209 | { | 210 | { |
210 | struct rwsem_waiter waiter; | 211 | struct rwsem_waiter waiter; |
211 | struct task_struct *tsk; | 212 | struct task_struct *tsk; |
213 | unsigned long flags; | ||
212 | 214 | ||
213 | spin_lock_irq(&sem->wait_lock); | 215 | spin_lock_irqsave(&sem->wait_lock, flags); |
214 | 216 | ||
215 | if (sem->activity == 0 && list_empty(&sem->wait_list)) { | 217 | if (sem->activity == 0 && list_empty(&sem->wait_list)) { |
216 | /* granted */ | 218 | /* granted */ |
217 | sem->activity = -1; | 219 | sem->activity = -1; |
218 | spin_unlock_irq(&sem->wait_lock); | 220 | spin_unlock_irqrestore(&sem->wait_lock, flags); |
219 | goto out; | 221 | goto out; |
220 | } | 222 | } |
221 | 223 | ||
@@ -230,7 +232,7 @@ void __sched __down_write_nested(struct rw_semaphore *sem, int subclass) | |||
230 | list_add_tail(&waiter.list, &sem->wait_list); | 232 | list_add_tail(&waiter.list, &sem->wait_list); |
231 | 233 | ||
232 | /* we don't need to touch the semaphore struct anymore */ | 234 | /* we don't need to touch the semaphore struct anymore */ |
233 | spin_unlock_irq(&sem->wait_lock); | 235 | spin_unlock_irqrestore(&sem->wait_lock, flags); |
234 | 236 | ||
235 | /* wait to be given the lock */ | 237 | /* wait to be given the lock */ |
236 | for (;;) { | 238 | for (;;) { |
diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 0d475d8167bf..9afa25b52a83 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Version 2. See the file COPYING for more details. | 7 | * Version 2. See the file COPYING for more details. |
8 | */ | 8 | */ |
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/scatterlist.h> | 11 | #include <linux/scatterlist.h> |
11 | #include <linux/highmem.h> | 12 | #include <linux/highmem.h> |
12 | 13 | ||
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 437eedb5a53b..5fddf720da73 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | #include <linux/ctype.h> | 29 | #include <linux/ctype.h> |
30 | #include <linux/highmem.h> | 30 | #include <linux/highmem.h> |
31 | #include <linux/gfp.h> | ||
31 | 32 | ||
32 | #include <asm/io.h> | 33 | #include <asm/io.h> |
33 | #include <asm/dma.h> | 34 | #include <asm/dma.h> |
diff --git a/lib/textsearch.c b/lib/textsearch.c index 9fbcb44c554f..d608331b3e47 100644 --- a/lib/textsearch.c +++ b/lib/textsearch.c | |||
@@ -103,6 +103,7 @@ | |||
103 | #include <linux/rcupdate.h> | 103 | #include <linux/rcupdate.h> |
104 | #include <linux/err.h> | 104 | #include <linux/err.h> |
105 | #include <linux/textsearch.h> | 105 | #include <linux/textsearch.h> |
106 | #include <linux/slab.h> | ||
106 | 107 | ||
107 | static LIST_HEAD(ts_ops); | 108 | static LIST_HEAD(ts_ops); |
108 | static DEFINE_SPINLOCK(ts_mod_lock); | 109 | static DEFINE_SPINLOCK(ts_mod_lock); |
diff --git a/mm/Makefile b/mm/Makefile index 7a68d2ab5560..6c2a73a54a43 100644 --- a/mm/Makefile +++ b/mm/Makefile | |||
@@ -33,7 +33,11 @@ obj-$(CONFIG_FAILSLAB) += failslab.o | |||
33 | obj-$(CONFIG_MEMORY_HOTPLUG) += memory_hotplug.o | 33 | obj-$(CONFIG_MEMORY_HOTPLUG) += memory_hotplug.o |
34 | obj-$(CONFIG_FS_XIP) += filemap_xip.o | 34 | obj-$(CONFIG_FS_XIP) += filemap_xip.o |
35 | obj-$(CONFIG_MIGRATION) += migrate.o | 35 | obj-$(CONFIG_MIGRATION) += migrate.o |
36 | obj-$(CONFIG_SMP) += percpu.o | 36 | ifdef CONFIG_SMP |
37 | obj-y += percpu.o | ||
38 | else | ||
39 | obj-y += percpu_up.o | ||
40 | endif | ||
37 | obj-$(CONFIG_QUICKLIST) += quicklist.o | 41 | obj-$(CONFIG_QUICKLIST) += quicklist.o |
38 | obj-$(CONFIG_CGROUP_MEM_RES_CTLR) += memcontrol.o page_cgroup.o | 42 | obj-$(CONFIG_CGROUP_MEM_RES_CTLR) += memcontrol.o page_cgroup.o |
39 | obj-$(CONFIG_MEMORY_FAILURE) += memory-failure.o | 43 | obj-$(CONFIG_MEMORY_FAILURE) += memory-failure.o |
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 0e8ca0347707..f13e067e1467 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c | |||
@@ -227,6 +227,9 @@ static struct device_attribute bdi_dev_attrs[] = { | |||
227 | static __init int bdi_class_init(void) | 227 | static __init int bdi_class_init(void) |
228 | { | 228 | { |
229 | bdi_class = class_create(THIS_MODULE, "bdi"); | 229 | bdi_class = class_create(THIS_MODULE, "bdi"); |
230 | if (IS_ERR(bdi_class)) | ||
231 | return PTR_ERR(bdi_class); | ||
232 | |||
230 | bdi_class->dev_attrs = bdi_dev_attrs; | 233 | bdi_class->dev_attrs = bdi_dev_attrs; |
231 | bdi_debug_init(); | 234 | bdi_debug_init(); |
232 | return 0; | 235 | return 0; |
diff --git a/mm/bootmem.c b/mm/bootmem.c index d7c791ef0036..58c66cc5056a 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/pfn.h> | 12 | #include <linux/pfn.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/bootmem.h> | 14 | #include <linux/bootmem.h> |
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/kmemleak.h> | 16 | #include <linux/kmemleak.h> |
@@ -180,19 +181,12 @@ static void __init __free_pages_memory(unsigned long start, unsigned long end) | |||
180 | end_aligned = end & ~(BITS_PER_LONG - 1); | 181 | end_aligned = end & ~(BITS_PER_LONG - 1); |
181 | 182 | ||
182 | if (end_aligned <= start_aligned) { | 183 | if (end_aligned <= start_aligned) { |
183 | #if 1 | ||
184 | printk(KERN_DEBUG " %lx - %lx\n", start, end); | ||
185 | #endif | ||
186 | for (i = start; i < end; i++) | 184 | for (i = start; i < end; i++) |
187 | __free_pages_bootmem(pfn_to_page(i), 0); | 185 | __free_pages_bootmem(pfn_to_page(i), 0); |
188 | 186 | ||
189 | return; | 187 | return; |
190 | } | 188 | } |
191 | 189 | ||
192 | #if 1 | ||
193 | printk(KERN_DEBUG " %lx %lx - %lx %lx\n", | ||
194 | start, start_aligned, end_aligned, end); | ||
195 | #endif | ||
196 | for (i = start; i < start_aligned; i++) | 190 | for (i = start; i < start_aligned; i++) |
197 | __free_pages_bootmem(pfn_to_page(i), 0); | 191 | __free_pages_bootmem(pfn_to_page(i), 0); |
198 | 192 | ||
@@ -310,9 +304,22 @@ unsigned long __init free_all_bootmem_node(pg_data_t *pgdat) | |||
310 | unsigned long __init free_all_bootmem(void) | 304 | unsigned long __init free_all_bootmem(void) |
311 | { | 305 | { |
312 | #ifdef CONFIG_NO_BOOTMEM | 306 | #ifdef CONFIG_NO_BOOTMEM |
313 | return free_all_memory_core_early(NODE_DATA(0)->node_id); | 307 | /* |
308 | * We need to use MAX_NUMNODES instead of NODE_DATA(0)->node_id | ||
309 | * because in some case like Node0 doesnt have RAM installed | ||
310 | * low ram will be on Node1 | ||
311 | * Use MAX_NUMNODES will make sure all ranges in early_node_map[] | ||
312 | * will be used instead of only Node0 related | ||
313 | */ | ||
314 | return free_all_memory_core_early(MAX_NUMNODES); | ||
314 | #else | 315 | #else |
315 | return free_all_bootmem_core(NODE_DATA(0)->bdata); | 316 | unsigned long total_pages = 0; |
317 | bootmem_data_t *bdata; | ||
318 | |||
319 | list_for_each_entry(bdata, &bdata_list, list) | ||
320 | total_pages += free_all_bootmem_core(bdata); | ||
321 | |||
322 | return total_pages; | ||
316 | #endif | 323 | #endif |
317 | } | 324 | } |
318 | 325 | ||
@@ -428,9 +435,6 @@ void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, | |||
428 | { | 435 | { |
429 | #ifdef CONFIG_NO_BOOTMEM | 436 | #ifdef CONFIG_NO_BOOTMEM |
430 | free_early(physaddr, physaddr + size); | 437 | free_early(physaddr, physaddr + size); |
431 | #if 0 | ||
432 | printk(KERN_DEBUG "free %lx %lx\n", physaddr, size); | ||
433 | #endif | ||
434 | #else | 438 | #else |
435 | unsigned long start, end; | 439 | unsigned long start, end; |
436 | 440 | ||
@@ -456,9 +460,6 @@ void __init free_bootmem(unsigned long addr, unsigned long size) | |||
456 | { | 460 | { |
457 | #ifdef CONFIG_NO_BOOTMEM | 461 | #ifdef CONFIG_NO_BOOTMEM |
458 | free_early(addr, addr + size); | 462 | free_early(addr, addr + size); |
459 | #if 0 | ||
460 | printk(KERN_DEBUG "free %lx %lx\n", addr, size); | ||
461 | #endif | ||
462 | #else | 463 | #else |
463 | unsigned long start, end; | 464 | unsigned long start, end; |
464 | 465 | ||
diff --git a/mm/bounce.c b/mm/bounce.c index a2b76a588e34..13b6dad1eed2 100644 --- a/mm/bounce.c +++ b/mm/bounce.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/swap.h> | 8 | #include <linux/swap.h> |
9 | #include <linux/gfp.h> | ||
9 | #include <linux/bio.h> | 10 | #include <linux/bio.h> |
10 | #include <linux/pagemap.h> | 11 | #include <linux/pagemap.h> |
11 | #include <linux/mempool.h> | 12 | #include <linux/mempool.h> |
diff --git a/mm/failslab.c b/mm/failslab.c index bb41f98dd8b7..c5f88f240ddc 100644 --- a/mm/failslab.c +++ b/mm/failslab.c | |||
@@ -1,5 +1,4 @@ | |||
1 | #include <linux/fault-inject.h> | 1 | #include <linux/fault-inject.h> |
2 | #include <linux/gfp.h> | ||
3 | #include <linux/slab.h> | 2 | #include <linux/slab.h> |
4 | 3 | ||
5 | static struct { | 4 | static struct { |
diff --git a/mm/filemap.c b/mm/filemap.c index 045b31c37653..140ebda9640f 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -10,13 +10,13 @@ | |||
10 | * the NFS filesystem used to do this differently, for example) | 10 | * the NFS filesystem used to do this differently, for example) |
11 | */ | 11 | */ |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/compiler.h> | 13 | #include <linux/compiler.h> |
15 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
16 | #include <linux/uaccess.h> | 15 | #include <linux/uaccess.h> |
17 | #include <linux/aio.h> | 16 | #include <linux/aio.h> |
18 | #include <linux/capability.h> | 17 | #include <linux/capability.h> |
19 | #include <linux/kernel_stat.h> | 18 | #include <linux/kernel_stat.h> |
19 | #include <linux/gfp.h> | ||
20 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
21 | #include <linux/swap.h> | 21 | #include <linux/swap.h> |
22 | #include <linux/mman.h> | 22 | #include <linux/mman.h> |
diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c index 78b94f0b6d5d..83364df74a33 100644 --- a/mm/filemap_xip.c +++ b/mm/filemap_xip.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/seqlock.h> | 18 | #include <linux/seqlock.h> |
19 | #include <linux/mutex.h> | 19 | #include <linux/mutex.h> |
20 | #include <linux/gfp.h> | ||
20 | #include <asm/tlbflush.h> | 21 | #include <asm/tlbflush.h> |
21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
22 | 23 | ||
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 3a5aeb37c110..6034dc9e9796 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -2,7 +2,6 @@ | |||
2 | * Generic hugetlb support. | 2 | * Generic hugetlb support. |
3 | * (C) William Irwin, April 2004 | 3 | * (C) William Irwin, April 2004 |
4 | */ | 4 | */ |
5 | #include <linux/gfp.h> | ||
6 | #include <linux/list.h> | 5 | #include <linux/list.h> |
7 | #include <linux/init.h> | 6 | #include <linux/init.h> |
8 | #include <linux/module.h> | 7 | #include <linux/module.h> |
@@ -18,6 +17,7 @@ | |||
18 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
19 | #include <linux/bootmem.h> | 18 | #include <linux/bootmem.h> |
20 | #include <linux/sysfs.h> | 19 | #include <linux/sysfs.h> |
20 | #include <linux/slab.h> | ||
21 | 21 | ||
22 | #include <asm/page.h> | 22 | #include <asm/page.h> |
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 5b069e4f5e48..2c0d032ac898 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c | |||
@@ -72,7 +72,6 @@ | |||
72 | #include <linux/module.h> | 72 | #include <linux/module.h> |
73 | #include <linux/kthread.h> | 73 | #include <linux/kthread.h> |
74 | #include <linux/prio_tree.h> | 74 | #include <linux/prio_tree.h> |
75 | #include <linux/gfp.h> | ||
76 | #include <linux/fs.h> | 75 | #include <linux/fs.h> |
77 | #include <linux/debugfs.h> | 76 | #include <linux/debugfs.h> |
78 | #include <linux/seq_file.h> | 77 | #include <linux/seq_file.h> |
@@ -751,7 +751,7 @@ static int write_protect_page(struct vm_area_struct *vma, struct page *page, | |||
751 | * page | 751 | * page |
752 | */ | 752 | */ |
753 | if (page_mapcount(page) + 1 + swapped != page_count(page)) { | 753 | if (page_mapcount(page) + 1 + swapped != page_count(page)) { |
754 | set_pte_at_notify(mm, addr, ptep, entry); | 754 | set_pte_at(mm, addr, ptep, entry); |
755 | goto out_unlock; | 755 | goto out_unlock; |
756 | } | 756 | } |
757 | entry = pte_wrprotect(entry); | 757 | entry = pte_wrprotect(entry); |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 7973b5221fb8..f4ede99c8b9b 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -1359,16 +1359,19 @@ void mem_cgroup_update_file_mapped(struct page *page, int val) | |||
1359 | 1359 | ||
1360 | lock_page_cgroup(pc); | 1360 | lock_page_cgroup(pc); |
1361 | mem = pc->mem_cgroup; | 1361 | mem = pc->mem_cgroup; |
1362 | if (!mem) | 1362 | if (!mem || !PageCgroupUsed(pc)) |
1363 | goto done; | ||
1364 | |||
1365 | if (!PageCgroupUsed(pc)) | ||
1366 | goto done; | 1363 | goto done; |
1367 | 1364 | ||
1368 | /* | 1365 | /* |
1369 | * Preemption is already disabled. We can use __this_cpu_xxx | 1366 | * Preemption is already disabled. We can use __this_cpu_xxx |
1370 | */ | 1367 | */ |
1371 | __this_cpu_add(mem->stat->count[MEM_CGROUP_STAT_FILE_MAPPED], val); | 1368 | if (val > 0) { |
1369 | __this_cpu_inc(mem->stat->count[MEM_CGROUP_STAT_FILE_MAPPED]); | ||
1370 | SetPageCgroupFileMapped(pc); | ||
1371 | } else { | ||
1372 | __this_cpu_dec(mem->stat->count[MEM_CGROUP_STAT_FILE_MAPPED]); | ||
1373 | ClearPageCgroupFileMapped(pc); | ||
1374 | } | ||
1372 | 1375 | ||
1373 | done: | 1376 | done: |
1374 | unlock_page_cgroup(pc); | 1377 | unlock_page_cgroup(pc); |
@@ -1801,16 +1804,13 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *mem, | |||
1801 | static void __mem_cgroup_move_account(struct page_cgroup *pc, | 1804 | static void __mem_cgroup_move_account(struct page_cgroup *pc, |
1802 | struct mem_cgroup *from, struct mem_cgroup *to, bool uncharge) | 1805 | struct mem_cgroup *from, struct mem_cgroup *to, bool uncharge) |
1803 | { | 1806 | { |
1804 | struct page *page; | ||
1805 | |||
1806 | VM_BUG_ON(from == to); | 1807 | VM_BUG_ON(from == to); |
1807 | VM_BUG_ON(PageLRU(pc->page)); | 1808 | VM_BUG_ON(PageLRU(pc->page)); |
1808 | VM_BUG_ON(!PageCgroupLocked(pc)); | 1809 | VM_BUG_ON(!PageCgroupLocked(pc)); |
1809 | VM_BUG_ON(!PageCgroupUsed(pc)); | 1810 | VM_BUG_ON(!PageCgroupUsed(pc)); |
1810 | VM_BUG_ON(pc->mem_cgroup != from); | 1811 | VM_BUG_ON(pc->mem_cgroup != from); |
1811 | 1812 | ||
1812 | page = pc->page; | 1813 | if (PageCgroupFileMapped(pc)) { |
1813 | if (page_mapped(page) && !PageAnon(page)) { | ||
1814 | /* Update mapped_file data for mem_cgroup */ | 1814 | /* Update mapped_file data for mem_cgroup */ |
1815 | preempt_disable(); | 1815 | preempt_disable(); |
1816 | __this_cpu_dec(from->stat->count[MEM_CGROUP_STAT_FILE_MAPPED]); | 1816 | __this_cpu_dec(from->stat->count[MEM_CGROUP_STAT_FILE_MAPPED]); |
@@ -3691,8 +3691,10 @@ static struct mem_cgroup *mem_cgroup_alloc(void) | |||
3691 | else | 3691 | else |
3692 | mem = vmalloc(size); | 3692 | mem = vmalloc(size); |
3693 | 3693 | ||
3694 | if (mem) | 3694 | if (!mem) |
3695 | memset(mem, 0, size); | 3695 | return NULL; |
3696 | |||
3697 | memset(mem, 0, size); | ||
3696 | mem->stat = alloc_percpu(struct mem_cgroup_stat_cpu); | 3698 | mem->stat = alloc_percpu(struct mem_cgroup_stat_cpu); |
3697 | if (!mem->stat) { | 3699 | if (!mem->stat) { |
3698 | if (size < PAGE_SIZE) | 3700 | if (size < PAGE_SIZE) |
@@ -3946,28 +3948,6 @@ one_by_one: | |||
3946 | } | 3948 | } |
3947 | return ret; | 3949 | return ret; |
3948 | } | 3950 | } |
3949 | #else /* !CONFIG_MMU */ | ||
3950 | static int mem_cgroup_can_attach(struct cgroup_subsys *ss, | ||
3951 | struct cgroup *cgroup, | ||
3952 | struct task_struct *p, | ||
3953 | bool threadgroup) | ||
3954 | { | ||
3955 | return 0; | ||
3956 | } | ||
3957 | static void mem_cgroup_cancel_attach(struct cgroup_subsys *ss, | ||
3958 | struct cgroup *cgroup, | ||
3959 | struct task_struct *p, | ||
3960 | bool threadgroup) | ||
3961 | { | ||
3962 | } | ||
3963 | static void mem_cgroup_move_task(struct cgroup_subsys *ss, | ||
3964 | struct cgroup *cont, | ||
3965 | struct cgroup *old_cont, | ||
3966 | struct task_struct *p, | ||
3967 | bool threadgroup) | ||
3968 | { | ||
3969 | } | ||
3970 | #endif | ||
3971 | 3951 | ||
3972 | /** | 3952 | /** |
3973 | * is_target_pte_for_mc - check a pte whether it is valid for move charge | 3953 | * is_target_pte_for_mc - check a pte whether it is valid for move charge |
@@ -4330,6 +4310,28 @@ static void mem_cgroup_move_task(struct cgroup_subsys *ss, | |||
4330 | } | 4310 | } |
4331 | mem_cgroup_clear_mc(); | 4311 | mem_cgroup_clear_mc(); |
4332 | } | 4312 | } |
4313 | #else /* !CONFIG_MMU */ | ||
4314 | static int mem_cgroup_can_attach(struct cgroup_subsys *ss, | ||
4315 | struct cgroup *cgroup, | ||
4316 | struct task_struct *p, | ||
4317 | bool threadgroup) | ||
4318 | { | ||
4319 | return 0; | ||
4320 | } | ||
4321 | static void mem_cgroup_cancel_attach(struct cgroup_subsys *ss, | ||
4322 | struct cgroup *cgroup, | ||
4323 | struct task_struct *p, | ||
4324 | bool threadgroup) | ||
4325 | { | ||
4326 | } | ||
4327 | static void mem_cgroup_move_task(struct cgroup_subsys *ss, | ||
4328 | struct cgroup *cont, | ||
4329 | struct cgroup *old_cont, | ||
4330 | struct task_struct *p, | ||
4331 | bool threadgroup) | ||
4332 | { | ||
4333 | } | ||
4334 | #endif | ||
4333 | 4335 | ||
4334 | struct cgroup_subsys mem_cgroup_subsys = { | 4336 | struct cgroup_subsys mem_cgroup_subsys = { |
4335 | .name = "memory", | 4337 | .name = "memory", |
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index d1f335162976..620b0b461593 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/migrate.h> | 44 | #include <linux/migrate.h> |
45 | #include <linux/page-isolation.h> | 45 | #include <linux/page-isolation.h> |
46 | #include <linux/suspend.h> | 46 | #include <linux/suspend.h> |
47 | #include <linux/slab.h> | ||
47 | #include "internal.h" | 48 | #include "internal.h" |
48 | 49 | ||
49 | int sysctl_memory_failure_early_kill __read_mostly = 0; | 50 | int sysctl_memory_failure_early_kill __read_mostly = 0; |
diff --git a/mm/memory.c b/mm/memory.c index 5b7f2002e54b..833952d8b74d 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include <linux/kallsyms.h> | 56 | #include <linux/kallsyms.h> |
57 | #include <linux/swapops.h> | 57 | #include <linux/swapops.h> |
58 | #include <linux/elf.h> | 58 | #include <linux/elf.h> |
59 | #include <linux/gfp.h> | ||
59 | 60 | ||
60 | #include <asm/io.h> | 61 | #include <asm/io.h> |
61 | #include <asm/pgalloc.h> | 62 | #include <asm/pgalloc.h> |
@@ -124,7 +125,7 @@ core_initcall(init_zero_pfn); | |||
124 | 125 | ||
125 | #if defined(SPLIT_RSS_COUNTING) | 126 | #if defined(SPLIT_RSS_COUNTING) |
126 | 127 | ||
127 | void __sync_task_rss_stat(struct task_struct *task, struct mm_struct *mm) | 128 | static void __sync_task_rss_stat(struct task_struct *task, struct mm_struct *mm) |
128 | { | 129 | { |
129 | int i; | 130 | int i; |
130 | 131 | ||
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 643f66e10187..08f40a2f3fe0 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -73,7 +73,6 @@ | |||
73 | #include <linux/sched.h> | 73 | #include <linux/sched.h> |
74 | #include <linux/nodemask.h> | 74 | #include <linux/nodemask.h> |
75 | #include <linux/cpuset.h> | 75 | #include <linux/cpuset.h> |
76 | #include <linux/gfp.h> | ||
77 | #include <linux/slab.h> | 76 | #include <linux/slab.h> |
78 | #include <linux/string.h> | 77 | #include <linux/string.h> |
79 | #include <linux/module.h> | 78 | #include <linux/module.h> |
@@ -806,9 +805,13 @@ static long do_get_mempolicy(int *policy, nodemask_t *nmask, | |||
806 | 805 | ||
807 | err = 0; | 806 | err = 0; |
808 | if (nmask) { | 807 | if (nmask) { |
809 | task_lock(current); | 808 | if (mpol_store_user_nodemask(pol)) { |
810 | get_policy_nodemask(pol, nmask); | 809 | *nmask = pol->w.user_nodemask; |
811 | task_unlock(current); | 810 | } else { |
811 | task_lock(current); | ||
812 | get_policy_nodemask(pol, nmask); | ||
813 | task_unlock(current); | ||
814 | } | ||
812 | } | 815 | } |
813 | 816 | ||
814 | out: | 817 | out: |
@@ -2195,8 +2198,8 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) | |||
2195 | char *rest = nodelist; | 2198 | char *rest = nodelist; |
2196 | while (isdigit(*rest)) | 2199 | while (isdigit(*rest)) |
2197 | rest++; | 2200 | rest++; |
2198 | if (!*rest) | 2201 | if (*rest) |
2199 | err = 0; | 2202 | goto out; |
2200 | } | 2203 | } |
2201 | break; | 2204 | break; |
2202 | case MPOL_INTERLEAVE: | 2205 | case MPOL_INTERLEAVE: |
@@ -2205,7 +2208,6 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) | |||
2205 | */ | 2208 | */ |
2206 | if (!nodelist) | 2209 | if (!nodelist) |
2207 | nodes = node_states[N_HIGH_MEMORY]; | 2210 | nodes = node_states[N_HIGH_MEMORY]; |
2208 | err = 0; | ||
2209 | break; | 2211 | break; |
2210 | case MPOL_LOCAL: | 2212 | case MPOL_LOCAL: |
2211 | /* | 2213 | /* |
@@ -2215,11 +2217,19 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) | |||
2215 | goto out; | 2217 | goto out; |
2216 | mode = MPOL_PREFERRED; | 2218 | mode = MPOL_PREFERRED; |
2217 | break; | 2219 | break; |
2218 | 2220 | case MPOL_DEFAULT: | |
2219 | /* | 2221 | /* |
2220 | * case MPOL_BIND: mpol_new() enforces non-empty nodemask. | 2222 | * Insist on a empty nodelist |
2221 | * case MPOL_DEFAULT: mpol_new() enforces empty nodemask, ignores flags. | 2223 | */ |
2222 | */ | 2224 | if (!nodelist) |
2225 | err = 0; | ||
2226 | goto out; | ||
2227 | case MPOL_BIND: | ||
2228 | /* | ||
2229 | * Insist on a nodelist | ||
2230 | */ | ||
2231 | if (!nodelist) | ||
2232 | goto out; | ||
2223 | } | 2233 | } |
2224 | 2234 | ||
2225 | mode_flags = 0; | 2235 | mode_flags = 0; |
@@ -2233,13 +2243,14 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) | |||
2233 | else if (!strcmp(flags, "relative")) | 2243 | else if (!strcmp(flags, "relative")) |
2234 | mode_flags |= MPOL_F_RELATIVE_NODES; | 2244 | mode_flags |= MPOL_F_RELATIVE_NODES; |
2235 | else | 2245 | else |
2236 | err = 1; | 2246 | goto out; |
2237 | } | 2247 | } |
2238 | 2248 | ||
2239 | new = mpol_new(mode, mode_flags, &nodes); | 2249 | new = mpol_new(mode, mode_flags, &nodes); |
2240 | if (IS_ERR(new)) | 2250 | if (IS_ERR(new)) |
2241 | err = 1; | 2251 | goto out; |
2242 | else { | 2252 | |
2253 | { | ||
2243 | int ret; | 2254 | int ret; |
2244 | NODEMASK_SCRATCH(scratch); | 2255 | NODEMASK_SCRATCH(scratch); |
2245 | if (scratch) { | 2256 | if (scratch) { |
@@ -2250,13 +2261,15 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) | |||
2250 | ret = -ENOMEM; | 2261 | ret = -ENOMEM; |
2251 | NODEMASK_SCRATCH_FREE(scratch); | 2262 | NODEMASK_SCRATCH_FREE(scratch); |
2252 | if (ret) { | 2263 | if (ret) { |
2253 | err = 1; | ||
2254 | mpol_put(new); | 2264 | mpol_put(new); |
2255 | } else if (no_context) { | 2265 | goto out; |
2256 | /* save for contextualization */ | ||
2257 | new->w.user_nodemask = nodes; | ||
2258 | } | 2266 | } |
2259 | } | 2267 | } |
2268 | err = 0; | ||
2269 | if (no_context) { | ||
2270 | /* save for contextualization */ | ||
2271 | new->w.user_nodemask = nodes; | ||
2272 | } | ||
2260 | 2273 | ||
2261 | out: | 2274 | out: |
2262 | /* Restore string for error message */ | 2275 | /* Restore string for error message */ |
diff --git a/mm/migrate.c b/mm/migrate.c index 88000b89fc9a..d3f3f7f81075 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/security.h> | 32 | #include <linux/security.h> |
33 | #include <linux/memcontrol.h> | 33 | #include <linux/memcontrol.h> |
34 | #include <linux/syscalls.h> | 34 | #include <linux/syscalls.h> |
35 | #include <linux/gfp.h> | ||
35 | 36 | ||
36 | #include "internal.h" | 37 | #include "internal.h" |
37 | 38 | ||
diff --git a/mm/mincore.c b/mm/mincore.c index 7a3436ef39eb..f77433c20279 100644 --- a/mm/mincore.c +++ b/mm/mincore.c | |||
@@ -7,8 +7,8 @@ | |||
7 | /* | 7 | /* |
8 | * The mincore() system call. | 8 | * The mincore() system call. |
9 | */ | 9 | */ |
10 | #include <linux/slab.h> | ||
11 | #include <linux/pagemap.h> | 10 | #include <linux/pagemap.h> |
11 | #include <linux/gfp.h> | ||
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/mman.h> | 13 | #include <linux/mman.h> |
14 | #include <linux/syscalls.h> | 14 | #include <linux/syscalls.h> |
diff --git a/mm/mmu_context.c b/mm/mmu_context.c index 0777654147c9..9e82e937000e 100644 --- a/mm/mmu_context.c +++ b/mm/mmu_context.c | |||
@@ -53,6 +53,7 @@ void unuse_mm(struct mm_struct *mm) | |||
53 | struct task_struct *tsk = current; | 53 | struct task_struct *tsk = current; |
54 | 54 | ||
55 | task_lock(tsk); | 55 | task_lock(tsk); |
56 | sync_mm_rss(tsk, mm); | ||
56 | tsk->mm = NULL; | 57 | tsk->mm = NULL; |
57 | /* active_mm is still 'mm' */ | 58 | /* active_mm is still 'mm' */ |
58 | enter_lazy_tlb(mm, tsk); | 59 | enter_lazy_tlb(mm, tsk); |
diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c index 7e33f2cb3c77..438951d366f2 100644 --- a/mm/mmu_notifier.c +++ b/mm/mmu_notifier.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/rcupdate.h> | 17 | #include <linux/rcupdate.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | /* | 21 | /* |
21 | * This function can't run concurrently against mmu_notifier_register | 22 | * This function can't run concurrently against mmu_notifier_register |
diff --git a/mm/mprotect.c b/mm/mprotect.c index 8bc969d8112d..2d1bf7cf8851 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
12 | #include <linux/hugetlb.h> | 12 | #include <linux/hugetlb.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/shm.h> | 13 | #include <linux/shm.h> |
15 | #include <linux/mman.h> | 14 | #include <linux/mman.h> |
16 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
diff --git a/mm/mremap.c b/mm/mremap.c index e9c75efce609..cde56ee51ef7 100644 --- a/mm/mremap.c +++ b/mm/mremap.c | |||
@@ -9,7 +9,6 @@ | |||
9 | 9 | ||
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/hugetlb.h> | 11 | #include <linux/hugetlb.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/shm.h> | 12 | #include <linux/shm.h> |
14 | #include <linux/ksm.h> | 13 | #include <linux/ksm.h> |
15 | #include <linux/mman.h> | 14 | #include <linux/mman.h> |
diff --git a/mm/nommu.c b/mm/nommu.c index 605ace8982a8..63fa17d121f0 100644 --- a/mm/nommu.c +++ b/mm/nommu.c | |||
@@ -146,7 +146,7 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
146 | (VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE); | 146 | (VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE); |
147 | 147 | ||
148 | for (i = 0; i < nr_pages; i++) { | 148 | for (i = 0; i < nr_pages; i++) { |
149 | vma = find_extend_vma(mm, start); | 149 | vma = find_vma(mm, start); |
150 | if (!vma) | 150 | if (!vma) |
151 | goto finish_or_fault; | 151 | goto finish_or_fault; |
152 | 152 | ||
@@ -162,7 +162,7 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
162 | } | 162 | } |
163 | if (vmas) | 163 | if (vmas) |
164 | vmas[i] = vma; | 164 | vmas[i] = vma; |
165 | start += PAGE_SIZE; | 165 | start = (start + PAGE_SIZE) & PAGE_MASK; |
166 | } | 166 | } |
167 | 167 | ||
168 | return i; | 168 | return i; |
@@ -764,7 +764,7 @@ EXPORT_SYMBOL(find_vma); | |||
764 | */ | 764 | */ |
765 | struct vm_area_struct *find_extend_vma(struct mm_struct *mm, unsigned long addr) | 765 | struct vm_area_struct *find_extend_vma(struct mm_struct *mm, unsigned long addr) |
766 | { | 766 | { |
767 | return find_vma(mm, addr & PAGE_MASK); | 767 | return find_vma(mm, addr); |
768 | } | 768 | } |
769 | 769 | ||
770 | /* | 770 | /* |
@@ -1040,10 +1040,9 @@ static int do_mmap_shared_file(struct vm_area_struct *vma) | |||
1040 | if (ret != -ENOSYS) | 1040 | if (ret != -ENOSYS) |
1041 | return ret; | 1041 | return ret; |
1042 | 1042 | ||
1043 | /* getting an ENOSYS error indicates that direct mmap isn't | 1043 | /* getting -ENOSYS indicates that direct mmap isn't possible (as |
1044 | * possible (as opposed to tried but failed) so we'll fall | 1044 | * opposed to tried but failed) so we can only give a suitable error as |
1045 | * through to making a private copy of the data and mapping | 1045 | * it's not possible to make a private copy if MAP_SHARED was given */ |
1046 | * that if we can */ | ||
1047 | return -ENODEV; | 1046 | return -ENODEV; |
1048 | } | 1047 | } |
1049 | 1048 | ||
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 9b223af6a147..b68e802a7a7d 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/oom.h> | 18 | #include <linux/oom.h> |
19 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
20 | #include <linux/err.h> | 20 | #include <linux/err.h> |
21 | #include <linux/gfp.h> | ||
21 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
22 | #include <linux/swap.h> | 23 | #include <linux/swap.h> |
23 | #include <linux/timex.h> | 24 | #include <linux/timex.h> |
diff --git a/mm/page_io.c b/mm/page_io.c index a19af956ee1b..31a3b962230a 100644 --- a/mm/page_io.c +++ b/mm/page_io.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/kernel_stat.h> | 14 | #include <linux/kernel_stat.h> |
15 | #include <linux/gfp.h> | ||
15 | #include <linux/pagemap.h> | 16 | #include <linux/pagemap.h> |
16 | #include <linux/swap.h> | 17 | #include <linux/swap.h> |
17 | #include <linux/bio.h> | 18 | #include <linux/bio.h> |
diff --git a/mm/pagewalk.c b/mm/pagewalk.c index 7b47a57b6646..8b1a2ce21ee5 100644 --- a/mm/pagewalk.c +++ b/mm/pagewalk.c | |||
@@ -80,6 +80,37 @@ static int walk_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end, | |||
80 | return err; | 80 | return err; |
81 | } | 81 | } |
82 | 82 | ||
83 | #ifdef CONFIG_HUGETLB_PAGE | ||
84 | static unsigned long hugetlb_entry_end(struct hstate *h, unsigned long addr, | ||
85 | unsigned long end) | ||
86 | { | ||
87 | unsigned long boundary = (addr & huge_page_mask(h)) + huge_page_size(h); | ||
88 | return boundary < end ? boundary : end; | ||
89 | } | ||
90 | |||
91 | static int walk_hugetlb_range(struct vm_area_struct *vma, | ||
92 | unsigned long addr, unsigned long end, | ||
93 | struct mm_walk *walk) | ||
94 | { | ||
95 | struct hstate *h = hstate_vma(vma); | ||
96 | unsigned long next; | ||
97 | unsigned long hmask = huge_page_mask(h); | ||
98 | pte_t *pte; | ||
99 | int err = 0; | ||
100 | |||
101 | do { | ||
102 | next = hugetlb_entry_end(h, addr, end); | ||
103 | pte = huge_pte_offset(walk->mm, addr & hmask); | ||
104 | if (pte && walk->hugetlb_entry) | ||
105 | err = walk->hugetlb_entry(pte, hmask, addr, next, walk); | ||
106 | if (err) | ||
107 | return err; | ||
108 | } while (addr = next, addr != end); | ||
109 | |||
110 | return 0; | ||
111 | } | ||
112 | #endif | ||
113 | |||
83 | /** | 114 | /** |
84 | * walk_page_range - walk a memory map's page tables with a callback | 115 | * walk_page_range - walk a memory map's page tables with a callback |
85 | * @mm: memory map to walk | 116 | * @mm: memory map to walk |
@@ -128,20 +159,16 @@ int walk_page_range(unsigned long addr, unsigned long end, | |||
128 | vma = find_vma(walk->mm, addr); | 159 | vma = find_vma(walk->mm, addr); |
129 | #ifdef CONFIG_HUGETLB_PAGE | 160 | #ifdef CONFIG_HUGETLB_PAGE |
130 | if (vma && is_vm_hugetlb_page(vma)) { | 161 | if (vma && is_vm_hugetlb_page(vma)) { |
131 | pte_t *pte; | ||
132 | struct hstate *hs; | ||
133 | |||
134 | if (vma->vm_end < next) | 162 | if (vma->vm_end < next) |
135 | next = vma->vm_end; | 163 | next = vma->vm_end; |
136 | hs = hstate_vma(vma); | 164 | /* |
137 | pte = huge_pte_offset(walk->mm, | 165 | * Hugepage is very tightly coupled with vma, so |
138 | addr & huge_page_mask(hs)); | 166 | * walk through hugetlb entries within a given vma. |
139 | if (pte && !huge_pte_none(huge_ptep_get(pte)) | 167 | */ |
140 | && walk->hugetlb_entry) | 168 | err = walk_hugetlb_range(vma, addr, next, walk); |
141 | err = walk->hugetlb_entry(pte, addr, | ||
142 | next, walk); | ||
143 | if (err) | 169 | if (err) |
144 | break; | 170 | break; |
171 | pgd = pgd_offset(walk->mm, next); | ||
145 | continue; | 172 | continue; |
146 | } | 173 | } |
147 | #endif | 174 | #endif |
diff --git a/mm/percpu.c b/mm/percpu.c index 768419d44ad7..6e09741ddc62 100644 --- a/mm/percpu.c +++ b/mm/percpu.c | |||
@@ -1304,6 +1304,32 @@ void free_percpu(void __percpu *ptr) | |||
1304 | EXPORT_SYMBOL_GPL(free_percpu); | 1304 | EXPORT_SYMBOL_GPL(free_percpu); |
1305 | 1305 | ||
1306 | /** | 1306 | /** |
1307 | * is_kernel_percpu_address - test whether address is from static percpu area | ||
1308 | * @addr: address to test | ||
1309 | * | ||
1310 | * Test whether @addr belongs to in-kernel static percpu area. Module | ||
1311 | * static percpu areas are not considered. For those, use | ||
1312 | * is_module_percpu_address(). | ||
1313 | * | ||
1314 | * RETURNS: | ||
1315 | * %true if @addr is from in-kernel static percpu area, %false otherwise. | ||
1316 | */ | ||
1317 | bool is_kernel_percpu_address(unsigned long addr) | ||
1318 | { | ||
1319 | const size_t static_size = __per_cpu_end - __per_cpu_start; | ||
1320 | void __percpu *base = __addr_to_pcpu_ptr(pcpu_base_addr); | ||
1321 | unsigned int cpu; | ||
1322 | |||
1323 | for_each_possible_cpu(cpu) { | ||
1324 | void *start = per_cpu_ptr(base, cpu); | ||
1325 | |||
1326 | if ((void *)addr >= start && (void *)addr < start + static_size) | ||
1327 | return true; | ||
1328 | } | ||
1329 | return false; | ||
1330 | } | ||
1331 | |||
1332 | /** | ||
1307 | * per_cpu_ptr_to_phys - convert translated percpu address to physical address | 1333 | * per_cpu_ptr_to_phys - convert translated percpu address to physical address |
1308 | * @addr: the address to be converted to physical address | 1334 | * @addr: the address to be converted to physical address |
1309 | * | 1335 | * |
diff --git a/mm/percpu_up.c b/mm/percpu_up.c new file mode 100644 index 000000000000..c4351c7f57d2 --- /dev/null +++ b/mm/percpu_up.c | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * mm/percpu_up.c - dummy percpu memory allocator implementation for UP | ||
3 | */ | ||
4 | |||
5 | #include <linux/module.h> | ||
6 | #include <linux/percpu.h> | ||
7 | #include <linux/slab.h> | ||
8 | |||
9 | void __percpu *__alloc_percpu(size_t size, size_t align) | ||
10 | { | ||
11 | /* | ||
12 | * Can't easily make larger alignment work with kmalloc. WARN | ||
13 | * on it. Larger alignment should only be used for module | ||
14 | * percpu sections on SMP for which this path isn't used. | ||
15 | */ | ||
16 | WARN_ON_ONCE(align > SMP_CACHE_BYTES); | ||
17 | return kzalloc(size, GFP_KERNEL); | ||
18 | } | ||
19 | EXPORT_SYMBOL_GPL(__alloc_percpu); | ||
20 | |||
21 | void free_percpu(void __percpu *p) | ||
22 | { | ||
23 | kfree(p); | ||
24 | } | ||
25 | EXPORT_SYMBOL_GPL(free_percpu); | ||
26 | |||
27 | phys_addr_t per_cpu_ptr_to_phys(void *addr) | ||
28 | { | ||
29 | return __pa(addr); | ||
30 | } | ||
diff --git a/mm/quicklist.c b/mm/quicklist.c index 6633965bb27b..2876349339a7 100644 --- a/mm/quicklist.c +++ b/mm/quicklist.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | 16 | ||
17 | #include <linux/gfp.h> | ||
17 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
18 | #include <linux/mmzone.h> | 19 | #include <linux/mmzone.h> |
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
diff --git a/mm/readahead.c b/mm/readahead.c index 337b20e946f6..dfa9a1a03a11 100644 --- a/mm/readahead.c +++ b/mm/readahead.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
12 | #include <linux/gfp.h> | ||
12 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/blkdev.h> | 15 | #include <linux/blkdev.h> |
@@ -502,7 +503,7 @@ void page_cache_sync_readahead(struct address_space *mapping, | |||
502 | return; | 503 | return; |
503 | 504 | ||
504 | /* be dumb */ | 505 | /* be dumb */ |
505 | if (filp->f_mode & FMODE_RANDOM) { | 506 | if (filp && (filp->f_mode & FMODE_RANDOM)) { |
506 | force_page_cache_readahead(mapping, filp, offset, req_size); | 507 | force_page_cache_readahead(mapping, filp, offset, req_size); |
507 | return; | 508 | return; |
508 | } | 509 | } |
@@ -232,6 +232,7 @@ int anon_vma_fork(struct vm_area_struct *vma, struct vm_area_struct *pvma) | |||
232 | out_error_free_anon_vma: | 232 | out_error_free_anon_vma: |
233 | anon_vma_free(anon_vma); | 233 | anon_vma_free(anon_vma); |
234 | out_error: | 234 | out_error: |
235 | unlink_anon_vmas(vma); | ||
235 | return -ENOMEM; | 236 | return -ENOMEM; |
236 | } | 237 | } |
237 | 238 | ||
@@ -3602,21 +3602,10 @@ EXPORT_SYMBOL(kmem_cache_alloc_notrace); | |||
3602 | */ | 3602 | */ |
3603 | int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr) | 3603 | int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr) |
3604 | { | 3604 | { |
3605 | unsigned long addr = (unsigned long)ptr; | ||
3606 | unsigned long min_addr = PAGE_OFFSET; | ||
3607 | unsigned long align_mask = BYTES_PER_WORD - 1; | ||
3608 | unsigned long size = cachep->buffer_size; | 3605 | unsigned long size = cachep->buffer_size; |
3609 | struct page *page; | 3606 | struct page *page; |
3610 | 3607 | ||
3611 | if (unlikely(addr < min_addr)) | 3608 | if (unlikely(!kern_ptr_validate(ptr, size))) |
3612 | goto out; | ||
3613 | if (unlikely(addr > (unsigned long)high_memory - size)) | ||
3614 | goto out; | ||
3615 | if (unlikely(addr & align_mask)) | ||
3616 | goto out; | ||
3617 | if (unlikely(!kern_addr_valid(addr))) | ||
3618 | goto out; | ||
3619 | if (unlikely(!kern_addr_valid(addr + size - 1))) | ||
3620 | goto out; | 3609 | goto out; |
3621 | page = virt_to_page(ptr); | 3610 | page = virt_to_page(ptr); |
3622 | if (unlikely(!PageSlab(page))) | 3611 | if (unlikely(!PageSlab(page))) |
@@ -2386,6 +2386,9 @@ int kmem_ptr_validate(struct kmem_cache *s, const void *object) | |||
2386 | { | 2386 | { |
2387 | struct page *page; | 2387 | struct page *page; |
2388 | 2388 | ||
2389 | if (!kern_ptr_validate(object, s->size)) | ||
2390 | return 0; | ||
2391 | |||
2389 | page = get_object_page(object); | 2392 | page = get_object_page(object); |
2390 | 2393 | ||
2391 | if (!page || s != page->slab) | 2394 | if (!page || s != page->slab) |
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c index 392b9bb5bc01..aa33fd67fa41 100644 --- a/mm/sparse-vmemmap.c +++ b/mm/sparse-vmemmap.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/bootmem.h> | 22 | #include <linux/bootmem.h> |
23 | #include <linux/highmem.h> | 23 | #include <linux/highmem.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
26 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
27 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
diff --git a/mm/sparse.c b/mm/sparse.c index 22896d589133..dc0cc4d43ff3 100644 --- a/mm/sparse.c +++ b/mm/sparse.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * sparse memory mappings. | 2 | * sparse memory mappings. |
3 | */ | 3 | */ |
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | #include <linux/slab.h> | ||
5 | #include <linux/mmzone.h> | 6 | #include <linux/mmzone.h> |
6 | #include <linux/bootmem.h> | 7 | #include <linux/bootmem.h> |
7 | #include <linux/highmem.h> | 8 | #include <linux/highmem.h> |
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/notifier.h> | 30 | #include <linux/notifier.h> |
31 | #include <linux/backing-dev.h> | 31 | #include <linux/backing-dev.h> |
32 | #include <linux/memcontrol.h> | 32 | #include <linux/memcontrol.h> |
33 | #include <linux/gfp.h> | ||
33 | 34 | ||
34 | #include "internal.h" | 35 | #include "internal.h" |
35 | 36 | ||
diff --git a/mm/swap_state.c b/mm/swap_state.c index 6d1daeb1cb4a..e10f5833167f 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/gfp.h> | ||
11 | #include <linux/kernel_stat.h> | 12 | #include <linux/kernel_stat.h> |
12 | #include <linux/swap.h> | 13 | #include <linux/swap.h> |
13 | #include <linux/swapops.h> | 14 | #include <linux/swapops.h> |
diff --git a/mm/truncate.c b/mm/truncate.c index e87e37244829..f42675a3615d 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/backing-dev.h> | 11 | #include <linux/backing-dev.h> |
12 | #include <linux/gfp.h> | ||
12 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
13 | #include <linux/swap.h> | 14 | #include <linux/swap.h> |
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
@@ -186,6 +186,27 @@ void kzfree(const void *p) | |||
186 | } | 186 | } |
187 | EXPORT_SYMBOL(kzfree); | 187 | EXPORT_SYMBOL(kzfree); |
188 | 188 | ||
189 | int kern_ptr_validate(const void *ptr, unsigned long size) | ||
190 | { | ||
191 | unsigned long addr = (unsigned long)ptr; | ||
192 | unsigned long min_addr = PAGE_OFFSET; | ||
193 | unsigned long align_mask = sizeof(void *) - 1; | ||
194 | |||
195 | if (unlikely(addr < min_addr)) | ||
196 | goto out; | ||
197 | if (unlikely(addr > (unsigned long)high_memory - size)) | ||
198 | goto out; | ||
199 | if (unlikely(addr & align_mask)) | ||
200 | goto out; | ||
201 | if (unlikely(!kern_addr_valid(addr))) | ||
202 | goto out; | ||
203 | if (unlikely(!kern_addr_valid(addr + size - 1))) | ||
204 | goto out; | ||
205 | return 1; | ||
206 | out: | ||
207 | return 0; | ||
208 | } | ||
209 | |||
189 | /* | 210 | /* |
190 | * strndup_user - duplicate an existing string from user space | 211 | * strndup_user - duplicate an existing string from user space |
191 | * @s: The string to duplicate | 212 | * @s: The string to duplicate |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 79c809895fba..3ff3311447f5 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | 16 | #include <linux/gfp.h> |
17 | #include <linux/kernel_stat.h> | 17 | #include <linux/kernel_stat.h> |
18 | #include <linux/swap.h> | 18 | #include <linux/swap.h> |
19 | #include <linux/pagemap.h> | 19 | #include <linux/pagemap.h> |
@@ -1535,13 +1535,6 @@ static void get_scan_ratio(struct zone *zone, struct scan_control *sc, | |||
1535 | unsigned long ap, fp; | 1535 | unsigned long ap, fp; |
1536 | struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(zone, sc); | 1536 | struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(zone, sc); |
1537 | 1537 | ||
1538 | /* If we have no swap space, do not bother scanning anon pages. */ | ||
1539 | if (!sc->may_swap || (nr_swap_pages <= 0)) { | ||
1540 | percent[0] = 0; | ||
1541 | percent[1] = 100; | ||
1542 | return; | ||
1543 | } | ||
1544 | |||
1545 | anon = zone_nr_lru_pages(zone, sc, LRU_ACTIVE_ANON) + | 1538 | anon = zone_nr_lru_pages(zone, sc, LRU_ACTIVE_ANON) + |
1546 | zone_nr_lru_pages(zone, sc, LRU_INACTIVE_ANON); | 1539 | zone_nr_lru_pages(zone, sc, LRU_INACTIVE_ANON); |
1547 | file = zone_nr_lru_pages(zone, sc, LRU_ACTIVE_FILE) + | 1540 | file = zone_nr_lru_pages(zone, sc, LRU_ACTIVE_FILE) + |
@@ -1639,20 +1632,22 @@ static void shrink_zone(int priority, struct zone *zone, | |||
1639 | unsigned long nr_reclaimed = sc->nr_reclaimed; | 1632 | unsigned long nr_reclaimed = sc->nr_reclaimed; |
1640 | unsigned long nr_to_reclaim = sc->nr_to_reclaim; | 1633 | unsigned long nr_to_reclaim = sc->nr_to_reclaim; |
1641 | struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(zone, sc); | 1634 | struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(zone, sc); |
1635 | int noswap = 0; | ||
1642 | 1636 | ||
1643 | get_scan_ratio(zone, sc, percent); | 1637 | /* If we have no swap space, do not bother scanning anon pages. */ |
1638 | if (!sc->may_swap || (nr_swap_pages <= 0)) { | ||
1639 | noswap = 1; | ||
1640 | percent[0] = 0; | ||
1641 | percent[1] = 100; | ||
1642 | } else | ||
1643 | get_scan_ratio(zone, sc, percent); | ||
1644 | 1644 | ||
1645 | for_each_evictable_lru(l) { | 1645 | for_each_evictable_lru(l) { |
1646 | int file = is_file_lru(l); | 1646 | int file = is_file_lru(l); |
1647 | unsigned long scan; | 1647 | unsigned long scan; |
1648 | 1648 | ||
1649 | if (percent[file] == 0) { | ||
1650 | nr[l] = 0; | ||
1651 | continue; | ||
1652 | } | ||
1653 | |||
1654 | scan = zone_nr_lru_pages(zone, sc, l); | 1649 | scan = zone_nr_lru_pages(zone, sc, l); |
1655 | if (priority) { | 1650 | if (priority || noswap) { |
1656 | scan >>= priority; | 1651 | scan >>= priority; |
1657 | scan = (scan * percent[file]) / 100; | 1652 | scan = (scan * percent[file]) / 100; |
1658 | } | 1653 | } |
diff --git a/mm/vmstat.c b/mm/vmstat.c index 7f760cbc73f3..fa12ea3051fb 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/err.h> | 13 | #include <linux/err.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/cpu.h> | 16 | #include <linux/cpu.h> |
16 | #include <linux/vmstat.h> | 17 | #include <linux/vmstat.h> |
17 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
diff --git a/net/802/garp.c b/net/802/garp.c index 78cff9ec2cb4..941f2a324d3a 100644 --- a/net/802/garp.c +++ b/net/802/garp.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/etherdevice.h> | 14 | #include <linux/etherdevice.h> |
15 | #include <linux/rtnetlink.h> | 15 | #include <linux/rtnetlink.h> |
16 | #include <linux/llc.h> | 16 | #include <linux/llc.h> |
17 | #include <linux/slab.h> | ||
17 | #include <net/llc.h> | 18 | #include <net/llc.h> |
18 | #include <net/llc_pdu.h> | 19 | #include <net/llc_pdu.h> |
19 | #include <net/garp.h> | 20 | #include <net/garp.h> |
diff --git a/net/802/p8022.c b/net/802/p8022.c index 2530f35241cd..7f353c4f437a 100644 --- a/net/802/p8022.c +++ b/net/802/p8022.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/netdevice.h> | 19 | #include <linux/netdevice.h> |
20 | #include <linux/skbuff.h> | 20 | #include <linux/skbuff.h> |
21 | #include <linux/slab.h> | ||
21 | #include <net/datalink.h> | 22 | #include <net/datalink.h> |
22 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
23 | #include <linux/in.h> | 24 | #include <linux/in.h> |
diff --git a/net/802/p8023.c b/net/802/p8023.c index 6ab1835041a7..1256a40da43c 100644 --- a/net/802/p8023.c +++ b/net/802/p8023.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/netdevice.h> | 19 | #include <linux/netdevice.h> |
20 | #include <linux/skbuff.h> | 20 | #include <linux/skbuff.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <net/datalink.h> | 23 | #include <net/datalink.h> |
23 | #include <net/p8022.h> | 24 | #include <net/p8022.h> |
diff --git a/net/802/psnap.c b/net/802/psnap.c index 6fea0750662b..21cde8fd5795 100644 --- a/net/802/psnap.c +++ b/net/802/psnap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/netdevice.h> | 15 | #include <linux/netdevice.h> |
16 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
17 | #include <linux/slab.h> | ||
17 | #include <net/datalink.h> | 18 | #include <net/datalink.h> |
18 | #include <net/llc.h> | 19 | #include <net/llc.h> |
19 | #include <net/psnap.h> | 20 | #include <net/psnap.h> |
diff --git a/net/802/stp.c b/net/802/stp.c index 0b7a24452d11..53c8f77f0ccd 100644 --- a/net/802/stp.c +++ b/net/802/stp.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/skbuff.h> | 11 | #include <linux/skbuff.h> |
12 | #include <linux/etherdevice.h> | 12 | #include <linux/etherdevice.h> |
13 | #include <linux/llc.h> | 13 | #include <linux/llc.h> |
14 | #include <linux/slab.h> | ||
14 | #include <net/llc.h> | 15 | #include <net/llc.h> |
15 | #include <net/llc_pdu.h> | 16 | #include <net/llc_pdu.h> |
16 | #include <net/stp.h> | 17 | #include <net/stp.h> |
diff --git a/net/802/tr.c b/net/802/tr.c index 44acce47fcdc..1c6e596074df 100644 --- a/net/802/tr.c +++ b/net/802/tr.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/seq_file.h> | 36 | #include <linux/seq_file.h> |
37 | #include <linux/init.h> | 37 | #include <linux/init.h> |
38 | #include <linux/sysctl.h> | 38 | #include <linux/sysctl.h> |
39 | #include <linux/slab.h> | ||
39 | #include <net/arp.h> | 40 | #include <net/arp.h> |
40 | #include <net/net_namespace.h> | 41 | #include <net/net_namespace.h> |
41 | 42 | ||
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 7b13206185ba..3c1c8c14e929 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
24 | #include <linux/skbuff.h> | 24 | #include <linux/skbuff.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/init.h> | 26 | #include <linux/init.h> |
26 | #include <linux/rculist.h> | 27 | #include <linux/rculist.h> |
27 | #include <net/p8022.h> | 28 | #include <net/p8022.h> |
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index f7d2fe431ee0..b5249c5fd4d3 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/skbuff.h> | 25 | #include <linux/skbuff.h> |
25 | #include <linux/netdevice.h> | 26 | #include <linux/netdevice.h> |
26 | #include <linux/etherdevice.h> | 27 | #include <linux/etherdevice.h> |
diff --git a/net/9p/client.c b/net/9p/client.c index e3e5bf4469ce..0aa79faa9850 100644 --- a/net/9p/client.c +++ b/net/9p/client.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/poll.h> | 29 | #include <linux/poll.h> |
30 | #include <linux/idr.h> | 30 | #include <linux/idr.h> |
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
33 | #include <linux/uaccess.h> | 34 | #include <linux/uaccess.h> |
34 | #include <net/9p/9p.h> | 35 | #include <net/9p/9p.h> |
@@ -71,9 +72,10 @@ inline int p9_is_proto_dotu(struct p9_client *clnt) | |||
71 | EXPORT_SYMBOL(p9_is_proto_dotu); | 72 | EXPORT_SYMBOL(p9_is_proto_dotu); |
72 | 73 | ||
73 | /* Interpret mount option for protocol version */ | 74 | /* Interpret mount option for protocol version */ |
74 | static unsigned char get_protocol_version(const substring_t *name) | 75 | static int get_protocol_version(const substring_t *name) |
75 | { | 76 | { |
76 | unsigned char version = -EINVAL; | 77 | int version = -EINVAL; |
78 | |||
77 | if (!strncmp("9p2000", name->from, name->to-name->from)) { | 79 | if (!strncmp("9p2000", name->from, name->to-name->from)) { |
78 | version = p9_proto_legacy; | 80 | version = p9_proto_legacy; |
79 | P9_DPRINTK(P9_DEBUG_9P, "Protocol version: Legacy\n"); | 81 | P9_DPRINTK(P9_DEBUG_9P, "Protocol version: Legacy\n"); |
@@ -533,7 +535,12 @@ p9_client_rpc(struct p9_client *c, int8_t type, const char *fmt, ...) | |||
533 | 535 | ||
534 | P9_DPRINTK(P9_DEBUG_MUX, "client %p op %d\n", c, type); | 536 | P9_DPRINTK(P9_DEBUG_MUX, "client %p op %d\n", c, type); |
535 | 537 | ||
536 | if (c->status != Connected) | 538 | /* we allow for any status other than disconnected */ |
539 | if (c->status == Disconnected) | ||
540 | return ERR_PTR(-EIO); | ||
541 | |||
542 | /* if status is begin_disconnected we allow only clunk request */ | ||
543 | if ((c->status == BeginDisconnect) && (type != P9_TCLUNK)) | ||
537 | return ERR_PTR(-EIO); | 544 | return ERR_PTR(-EIO); |
538 | 545 | ||
539 | if (signal_pending(current)) { | 546 | if (signal_pending(current)) { |
@@ -799,8 +806,10 @@ void p9_client_destroy(struct p9_client *clnt) | |||
799 | 806 | ||
800 | v9fs_put_trans(clnt->trans_mod); | 807 | v9fs_put_trans(clnt->trans_mod); |
801 | 808 | ||
802 | list_for_each_entry_safe(fid, fidptr, &clnt->fidlist, flist) | 809 | list_for_each_entry_safe(fid, fidptr, &clnt->fidlist, flist) { |
810 | printk(KERN_INFO "Found fid %d not clunked\n", fid->fid); | ||
803 | p9_fid_destroy(fid); | 811 | p9_fid_destroy(fid); |
812 | } | ||
804 | 813 | ||
805 | if (clnt->fidpool) | 814 | if (clnt->fidpool) |
806 | p9_idpool_destroy(clnt->fidpool); | 815 | p9_idpool_destroy(clnt->fidpool); |
@@ -818,6 +827,13 @@ void p9_client_disconnect(struct p9_client *clnt) | |||
818 | } | 827 | } |
819 | EXPORT_SYMBOL(p9_client_disconnect); | 828 | EXPORT_SYMBOL(p9_client_disconnect); |
820 | 829 | ||
830 | void p9_client_begin_disconnect(struct p9_client *clnt) | ||
831 | { | ||
832 | P9_DPRINTK(P9_DEBUG_9P, "clnt %p\n", clnt); | ||
833 | clnt->status = BeginDisconnect; | ||
834 | } | ||
835 | EXPORT_SYMBOL(p9_client_begin_disconnect); | ||
836 | |||
821 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, | 837 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, |
822 | char *uname, u32 n_uname, char *aname) | 838 | char *uname, u32 n_uname, char *aname) |
823 | { | 839 | { |
diff --git a/net/9p/protocol.c b/net/9p/protocol.c index 94f5a8f65e9c..e7541d5b0118 100644 --- a/net/9p/protocol.c +++ b/net/9p/protocol.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
30 | #include <linux/uaccess.h> | 30 | #include <linux/uaccess.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
32 | #include <linux/types.h> | 33 | #include <linux/types.h> |
33 | #include <net/9p/9p.h> | 34 | #include <net/9p/9p.h> |
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index 31d0b05582a9..98ce9bcb0e15 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/idr.h> | 38 | #include <linux/idr.h> |
39 | #include <linux/file.h> | 39 | #include <linux/file.h> |
40 | #include <linux/parser.h> | 40 | #include <linux/parser.h> |
41 | #include <linux/slab.h> | ||
41 | #include <net/9p/9p.h> | 42 | #include <net/9p/9p.h> |
42 | #include <net/9p/client.h> | 43 | #include <net/9p/client.h> |
43 | #include <net/9p/transport.h> | 44 | #include <net/9p/transport.h> |
diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c index 2c95a89c0f46..041101ab4aa5 100644 --- a/net/9p/trans_rdma.c +++ b/net/9p/trans_rdma.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/file.h> | 40 | #include <linux/file.h> |
41 | #include <linux/parser.h> | 41 | #include <linux/parser.h> |
42 | #include <linux/semaphore.h> | 42 | #include <linux/semaphore.h> |
43 | #include <linux/slab.h> | ||
43 | #include <net/9p/9p.h> | 44 | #include <net/9p/9p.h> |
44 | #include <net/9p/client.h> | 45 | #include <net/9p/client.h> |
45 | #include <net/9p/transport.h> | 46 | #include <net/9p/transport.h> |
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index afde1a89fbb3..7eb78ecc1618 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/inet.h> | 37 | #include <linux/inet.h> |
38 | #include <linux/idr.h> | 38 | #include <linux/idr.h> |
39 | #include <linux/file.h> | 39 | #include <linux/file.h> |
40 | #include <linux/slab.h> | ||
40 | #include <net/9p/9p.h> | 41 | #include <net/9p/9p.h> |
41 | #include <linux/parser.h> | 42 | #include <linux/parser.h> |
42 | #include <net/9p/client.h> | 43 | #include <net/9p/client.h> |
diff --git a/net/9p/util.c b/net/9p/util.c index dc4ec05ad93d..e048701a72d2 100644 --- a/net/9p/util.c +++ b/net/9p/util.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
31 | #include <linux/parser.h> | 31 | #include <linux/parser.h> |
32 | #include <linux/idr.h> | 32 | #include <linux/idr.h> |
33 | #include <linux/slab.h> | ||
33 | #include <net/9p/9p.h> | 34 | #include <net/9p/9p.h> |
34 | 35 | ||
35 | /** | 36 | /** |
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index f2b3b56aa779..50dce7981321 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c | |||
@@ -30,6 +30,7 @@ | |||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <linux/if_arp.h> | 32 | #include <linux/if_arp.h> |
33 | #include <linux/slab.h> | ||
33 | #include <net/sock.h> | 34 | #include <net/sock.h> |
34 | #include <net/datalink.h> | 35 | #include <net/datalink.h> |
35 | #include <net/psnap.h> | 36 | #include <net/psnap.h> |
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 1d15a60b23af..c410b93fda2e 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <linux/smp_lock.h> | 57 | #include <linux/smp_lock.h> |
58 | #include <linux/termios.h> /* For TIOCOUTQ/INQ */ | 58 | #include <linux/termios.h> /* For TIOCOUTQ/INQ */ |
59 | #include <linux/compat.h> | 59 | #include <linux/compat.h> |
60 | #include <linux/slab.h> | ||
60 | #include <net/datalink.h> | 61 | #include <net/datalink.h> |
61 | #include <net/psnap.h> | 62 | #include <net/psnap.h> |
62 | #include <net/sock.h> | 63 | #include <net/sock.h> |
diff --git a/net/atm/addr.c b/net/atm/addr.c index cf3ae8b47572..dcda35c66f15 100644 --- a/net/atm/addr.c +++ b/net/atm/addr.c | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | #include <linux/atm.h> | 5 | #include <linux/atm.h> |
6 | #include <linux/atmdev.h> | 6 | #include <linux/atmdev.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/uaccess.h> | 8 | #include <linux/uaccess.h> |
8 | 9 | ||
9 | #include "signaling.h" | 10 | #include "signaling.h" |
diff --git a/net/atm/atm_sysfs.c b/net/atm/atm_sysfs.c index f693b78eb467..799c631f0fed 100644 --- a/net/atm/atm_sysfs.c +++ b/net/atm/atm_sysfs.c | |||
@@ -1,6 +1,7 @@ | |||
1 | /* ATM driver model support. */ | 1 | /* ATM driver model support. */ |
2 | 2 | ||
3 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
4 | #include <linux/slab.h> | ||
4 | #include <linux/init.h> | 5 | #include <linux/init.h> |
5 | #include <linux/kobject.h> | 6 | #include <linux/kobject.h> |
6 | #include <linux/atmdev.h> | 7 | #include <linux/atmdev.h> |
diff --git a/net/atm/br2684.c b/net/atm/br2684.c index 4d64d87e7578..d6c7ceaf13e9 100644 --- a/net/atm/br2684.c +++ b/net/atm/br2684.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/rtnetlink.h> | 18 | #include <linux/rtnetlink.h> |
19 | #include <linux/ip.h> | 19 | #include <linux/ip.h> |
20 | #include <linux/uaccess.h> | 20 | #include <linux/uaccess.h> |
21 | #include <linux/slab.h> | ||
21 | #include <net/arp.h> | 22 | #include <net/arp.h> |
22 | #include <linux/atm.h> | 23 | #include <linux/atm.h> |
23 | #include <linux/atmdev.h> | 24 | #include <linux/atmdev.h> |
diff --git a/net/atm/clip.c b/net/atm/clip.c index ebfa022008f7..313aba11316b 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/seq_file.h> | 30 | #include <linux/seq_file.h> |
31 | #include <linux/rcupdate.h> | 31 | #include <linux/rcupdate.h> |
32 | #include <linux/jhash.h> | 32 | #include <linux/jhash.h> |
33 | #include <linux/slab.h> | ||
33 | #include <net/route.h> /* for struct rtable and routing */ | 34 | #include <net/route.h> /* for struct rtable and routing */ |
34 | #include <net/icmp.h> /* icmp_send */ | 35 | #include <net/icmp.h> /* icmp_send */ |
35 | #include <linux/param.h> /* for HZ */ | 36 | #include <linux/param.h> /* for HZ */ |
diff --git a/net/atm/common.c b/net/atm/common.c index 74d095a081e3..97ed94aa0cbc 100644 --- a/net/atm/common.c +++ b/net/atm/common.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/skbuff.h> | 18 | #include <linux/skbuff.h> |
19 | #include <linux/bitops.h> | 19 | #include <linux/bitops.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/slab.h> | ||
21 | #include <net/sock.h> /* struct sock */ | 22 | #include <net/sock.h> /* struct sock */ |
22 | #include <linux/uaccess.h> | 23 | #include <linux/uaccess.h> |
23 | #include <linux/poll.h> | 24 | #include <linux/poll.h> |
diff --git a/net/atm/lec.c b/net/atm/lec.c index 5da5753157f9..feeaf5718472 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__ | 7 | #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__ |
8 | 8 | ||
9 | #include <linux/slab.h> | ||
9 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
10 | #include <linux/bitops.h> | 11 | #include <linux/bitops.h> |
11 | #include <linux/capability.h> | 12 | #include <linux/capability.h> |
diff --git a/net/atm/mpc.c b/net/atm/mpc.c index a6521c8aa88b..436f2e177657 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
4 | #include <linux/string.h> | 4 | #include <linux/string.h> |
5 | #include <linux/slab.h> | ||
5 | #include <linux/timer.h> | 6 | #include <linux/timer.h> |
6 | #include <linux/init.h> | 7 | #include <linux/init.h> |
7 | #include <linux/bitops.h> | 8 | #include <linux/bitops.h> |
diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c index 4c141810eb6d..e773d8336918 100644 --- a/net/atm/mpoa_caches.c +++ b/net/atm/mpoa_caches.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/types.h> | 1 | #include <linux/types.h> |
2 | #include <linux/atmmpc.h> | 2 | #include <linux/atmmpc.h> |
3 | #include <linux/slab.h> | ||
3 | #include <linux/time.h> | 4 | #include <linux/time.h> |
4 | 5 | ||
5 | #include "mpoa_caches.h" | 6 | #include "mpoa_caches.h" |
diff --git a/net/atm/mpoa_proc.c b/net/atm/mpoa_proc.c index b9bdb98427e4..53e500292271 100644 --- a/net/atm/mpoa_proc.c +++ b/net/atm/mpoa_proc.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/uaccess.h> | 12 | #include <linux/uaccess.h> |
13 | #include <linux/atmmpc.h> | 13 | #include <linux/atmmpc.h> |
14 | #include <linux/atm.h> | 14 | #include <linux/atm.h> |
15 | #include <linux/gfp.h> | ||
15 | #include "mpc.h" | 16 | #include "mpc.h" |
16 | #include "mpoa_caches.h" | 17 | #include "mpoa_caches.h" |
17 | 18 | ||
diff --git a/net/atm/pppoatm.c b/net/atm/pppoatm.c index 400839273c67..e49bb6d948a1 100644 --- a/net/atm/pppoatm.c +++ b/net/atm/pppoatm.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/init.h> | 39 | #include <linux/init.h> |
40 | #include <linux/skbuff.h> | 40 | #include <linux/skbuff.h> |
41 | #include <linux/slab.h> | ||
41 | #include <linux/atm.h> | 42 | #include <linux/atm.h> |
42 | #include <linux/atmdev.h> | 43 | #include <linux/atmdev.h> |
43 | #include <linux/capability.h> | 44 | #include <linux/capability.h> |
diff --git a/net/atm/proc.c b/net/atm/proc.c index f188a399c679..6262aeae398e 100644 --- a/net/atm/proc.c +++ b/net/atm/proc.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/netdevice.h> | 22 | #include <linux/netdevice.h> |
23 | #include <linux/atmclip.h> | 23 | #include <linux/atmclip.h> |
24 | #include <linux/init.h> /* for __init */ | 24 | #include <linux/init.h> /* for __init */ |
25 | #include <linux/slab.h> | ||
25 | #include <net/net_namespace.h> | 26 | #include <net/net_namespace.h> |
26 | #include <net/atmclip.h> | 27 | #include <net/atmclip.h> |
27 | #include <linux/uaccess.h> | 28 | #include <linux/uaccess.h> |
diff --git a/net/atm/raw.c b/net/atm/raw.c index d0c4bd047dc4..b4f7b9ff3c74 100644 --- a/net/atm/raw.c +++ b/net/atm/raw.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/skbuff.h> | 11 | #include <linux/skbuff.h> |
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/slab.h> | ||
13 | 14 | ||
14 | #include "common.h" | 15 | #include "common.h" |
15 | #include "protocols.h" | 16 | #include "protocols.h" |
diff --git a/net/atm/resources.c b/net/atm/resources.c index 90082904f20d..d29e58261511 100644 --- a/net/atm/resources.c +++ b/net/atm/resources.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/capability.h> | 19 | #include <linux/capability.h> |
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <net/sock.h> /* for struct sock */ | 24 | #include <net/sock.h> /* for struct sock */ |
24 | 25 | ||
diff --git a/net/atm/signaling.c b/net/atm/signaling.c index ad1d28ae512b..6ba6e466ee54 100644 --- a/net/atm/signaling.c +++ b/net/atm/signaling.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/atmsvc.h> | 14 | #include <linux/atmsvc.h> |
15 | #include <linux/atmdev.h> | 15 | #include <linux/atmdev.h> |
16 | #include <linux/bitops.h> | 16 | #include <linux/bitops.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include "resources.h" | 19 | #include "resources.h" |
19 | #include "signaling.h" | 20 | #include "signaling.h" |
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index a5beedf43e2d..65c5801261f9 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/string.h> | 25 | #include <linux/string.h> |
26 | #include <linux/sockios.h> | 26 | #include <linux/sockios.h> |
27 | #include <linux/net.h> | 27 | #include <linux/net.h> |
28 | #include <linux/slab.h> | ||
28 | #include <net/ax25.h> | 29 | #include <net/ax25.h> |
29 | #include <linux/inet.h> | 30 | #include <linux/inet.h> |
30 | #include <linux/netdevice.h> | 31 | #include <linux/netdevice.h> |
diff --git a/net/ax25/ax25_dev.c b/net/ax25/ax25_dev.c index a7a0e0c9698b..c1cb982f6e86 100644 --- a/net/ax25/ax25_dev.c +++ b/net/ax25/ax25_dev.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/socket.h> | 11 | #include <linux/socket.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/in.h> | 13 | #include <linux/in.h> |
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
14 | #include <linux/timer.h> | 15 | #include <linux/timer.h> |
diff --git a/net/ax25/ax25_ds_subr.c b/net/ax25/ax25_ds_subr.c index b5e59787be2f..85816e612dc0 100644 --- a/net/ax25/ax25_ds_subr.c +++ b/net/ax25/ax25_ds_subr.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/sockios.h> | 17 | #include <linux/sockios.h> |
18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
19 | #include <linux/net.h> | 19 | #include <linux/net.h> |
20 | #include <linux/gfp.h> | ||
20 | #include <net/ax25.h> | 21 | #include <net/ax25.h> |
21 | #include <linux/inet.h> | 22 | #include <linux/inet.h> |
22 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
diff --git a/net/ax25/ax25_iface.c b/net/ax25/ax25_iface.c index 71338f112108..5a0dda8df492 100644 --- a/net/ax25/ax25_iface.c +++ b/net/ax25/ax25_iface.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/sockios.h> | 18 | #include <linux/sockios.h> |
19 | #include <linux/net.h> | 19 | #include <linux/net.h> |
20 | #include <linux/slab.h> | ||
20 | #include <net/ax25.h> | 21 | #include <net/ax25.h> |
21 | #include <linux/inet.h> | 22 | #include <linux/inet.h> |
22 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c index de56d3983de0..9bb776541203 100644 --- a/net/ax25/ax25_in.c +++ b/net/ax25/ax25_in.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/sockios.h> | 19 | #include <linux/sockios.h> |
20 | #include <linux/net.h> | 20 | #include <linux/net.h> |
21 | #include <linux/slab.h> | ||
21 | #include <net/ax25.h> | 22 | #include <net/ax25.h> |
22 | #include <linux/inet.h> | 23 | #include <linux/inet.h> |
23 | #include <linux/netdevice.h> | 24 | #include <linux/netdevice.h> |
diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c index f047a57aa95c..cf0c47a26530 100644 --- a/net/ax25/ax25_ip.c +++ b/net/ax25/ax25_ip.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/sockios.h> | 17 | #include <linux/sockios.h> |
18 | #include <linux/net.h> | 18 | #include <linux/net.h> |
19 | #include <linux/slab.h> | ||
19 | #include <net/ax25.h> | 20 | #include <net/ax25.h> |
20 | #include <linux/inet.h> | 21 | #include <linux/inet.h> |
21 | #include <linux/netdevice.h> | 22 | #include <linux/netdevice.h> |
diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c index 14912600ec57..37507d806f65 100644 --- a/net/ax25/ax25_out.c +++ b/net/ax25/ax25_out.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/sockios.h> | 19 | #include <linux/sockios.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/net.h> | 21 | #include <linux/net.h> |
22 | #include <linux/slab.h> | ||
22 | #include <net/ax25.h> | 23 | #include <net/ax25.h> |
23 | #include <linux/inet.h> | 24 | #include <linux/inet.h> |
24 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c index c833ba4c45a5..7805945a5fd6 100644 --- a/net/ax25/ax25_route.c +++ b/net/ax25/ax25_route.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/sockios.h> | 24 | #include <linux/sockios.h> |
25 | #include <linux/net.h> | 25 | #include <linux/net.h> |
26 | #include <linux/slab.h> | ||
26 | #include <net/ax25.h> | 27 | #include <net/ax25.h> |
27 | #include <linux/inet.h> | 28 | #include <linux/inet.h> |
28 | #include <linux/netdevice.h> | 29 | #include <linux/netdevice.h> |
diff --git a/net/ax25/ax25_subr.c b/net/ax25/ax25_subr.c index 034aa10a5198..c6715ee4ab8f 100644 --- a/net/ax25/ax25_subr.c +++ b/net/ax25/ax25_subr.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/sockios.h> | 19 | #include <linux/sockios.h> |
20 | #include <linux/net.h> | 20 | #include <linux/net.h> |
21 | #include <linux/slab.h> | ||
21 | #include <net/ax25.h> | 22 | #include <net/ax25.h> |
22 | #include <linux/inet.h> | 23 | #include <linux/inet.h> |
23 | #include <linux/netdevice.h> | 24 | #include <linux/netdevice.h> |
diff --git a/net/ax25/ax25_uid.c b/net/ax25/ax25_uid.c index 9f13f6eefcba..d349be9578f5 100644 --- a/net/ax25/ax25_uid.c +++ b/net/ax25/ax25_uid.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/sockios.h> | 18 | #include <linux/sockios.h> |
19 | #include <linux/net.h> | 19 | #include <linux/net.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/slab.h> | ||
21 | #include <net/ax25.h> | 22 | #include <net/ax25.h> |
22 | #include <linux/inet.h> | 23 | #include <linux/inet.h> |
23 | #include <linux/netdevice.h> | 24 | #include <linux/netdevice.h> |
diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c index 5159be6b2625..ebe0ef3f1d83 100644 --- a/net/ax25/sysctl_net_ax25.c +++ b/net/ax25/sysctl_net_ax25.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Copyright (C) 1996 Mike Shaver (shaver@zeroknowledge.com) | 7 | * Copyright (C) 1996 Mike Shaver (shaver@zeroknowledge.com) |
8 | */ | 8 | */ |
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/sysctl.h> | 11 | #include <linux/sysctl.h> |
11 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
12 | #include <net/ax25.h> | 13 | #include <net/ax25.h> |
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index 087cc51f5927..404a8500fd03 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
34 | #include <linux/slab.h> | ||
35 | #include <linux/skbuff.h> | 34 | #include <linux/skbuff.h> |
36 | #include <linux/init.h> | 35 | #include <linux/init.h> |
37 | #include <linux/poll.h> | 36 | #include <linux/poll.h> |
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index ef09c7b3a858..8062dad6d10d 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/freezer.h> | 35 | #include <linux/freezer.h> |
36 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
37 | #include <linux/net.h> | 37 | #include <linux/net.h> |
38 | #include <linux/slab.h> | ||
38 | #include <net/sock.h> | 39 | #include <net/sock.h> |
39 | 40 | ||
40 | #include <linux/socket.h> | 41 | #include <linux/socket.h> |
diff --git a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c index 260a9507e542..d48b33f4d4ba 100644 --- a/net/bluetooth/bnep/netdev.c +++ b/net/bluetooth/bnep/netdev.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <linux/socket.h> | 31 | #include <linux/socket.h> |
31 | #include <linux/netdevice.h> | 32 | #include <linux/netdevice.h> |
diff --git a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c index 2ff6ac7b2ed4..2862f53b66b1 100644 --- a/net/bluetooth/bnep/sock.c +++ b/net/bluetooth/bnep/sock.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/capability.h> | 30 | #include <linux/capability.h> |
31 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/slab.h> | ||
34 | #include <linux/poll.h> | 33 | #include <linux/poll.h> |
35 | #include <linux/fcntl.h> | 34 | #include <linux/fcntl.h> |
36 | #include <linux/skbuff.h> | 35 | #include <linux/skbuff.h> |
@@ -39,6 +38,7 @@ | |||
39 | #include <linux/file.h> | 38 | #include <linux/file.h> |
40 | #include <linux/init.h> | 39 | #include <linux/init.h> |
41 | #include <linux/compat.h> | 40 | #include <linux/compat.h> |
41 | #include <linux/gfp.h> | ||
42 | #include <net/sock.h> | 42 | #include <net/sock.h> |
43 | 43 | ||
44 | #include <asm/system.h> | 44 | #include <asm/system.h> |
diff --git a/net/bluetooth/cmtp/sock.c b/net/bluetooth/cmtp/sock.c index 978cc3a718ad..7ea1979a8e4f 100644 --- a/net/bluetooth/cmtp/sock.c +++ b/net/bluetooth/cmtp/sock.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/capability.h> | 26 | #include <linux/capability.h> |
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/poll.h> | 29 | #include <linux/poll.h> |
31 | #include <linux/fcntl.h> | 30 | #include <linux/fcntl.h> |
32 | #include <linux/skbuff.h> | 31 | #include <linux/skbuff.h> |
@@ -34,6 +33,7 @@ | |||
34 | #include <linux/ioctl.h> | 33 | #include <linux/ioctl.h> |
35 | #include <linux/file.h> | 34 | #include <linux/file.h> |
36 | #include <linux/compat.h> | 35 | #include <linux/compat.h> |
36 | #include <linux/gfp.h> | ||
37 | #include <net/sock.h> | 37 | #include <net/sock.h> |
38 | 38 | ||
39 | #include <linux/isdn/capilli.h> | 39 | #include <linux/isdn/capilli.h> |
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index 05fd125f74fe..0e8e1a59856c 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c | |||
@@ -1,6 +1,7 @@ | |||
1 | /* Bluetooth HCI driver model support. */ | 1 | /* Bluetooth HCI driver model support. */ |
2 | 2 | ||
3 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
4 | #include <linux/slab.h> | ||
4 | #include <linux/init.h> | 5 | #include <linux/init.h> |
5 | #include <linux/debugfs.h> | 6 | #include <linux/debugfs.h> |
6 | #include <linux/seq_file.h> | 7 | #include <linux/seq_file.h> |
diff --git a/net/bluetooth/hidp/sock.c b/net/bluetooth/hidp/sock.c index 9cfef68b9fec..250dfd46237d 100644 --- a/net/bluetooth/hidp/sock.c +++ b/net/bluetooth/hidp/sock.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/capability.h> | 26 | #include <linux/capability.h> |
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/poll.h> | 29 | #include <linux/poll.h> |
31 | #include <linux/fcntl.h> | 30 | #include <linux/fcntl.h> |
32 | #include <linux/skbuff.h> | 31 | #include <linux/skbuff.h> |
@@ -35,6 +34,7 @@ | |||
35 | #include <linux/file.h> | 34 | #include <linux/file.h> |
36 | #include <linux/init.h> | 35 | #include <linux/init.h> |
37 | #include <linux/compat.h> | 36 | #include <linux/compat.h> |
37 | #include <linux/gfp.h> | ||
38 | #include <net/sock.h> | 38 | #include <net/sock.h> |
39 | 39 | ||
40 | #include "hidp.h" | 40 | #include "hidp.h" |
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 13f114e8b0f9..7dca91bb8c57 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/net.h> | 38 | #include <linux/net.h> |
39 | #include <linux/mutex.h> | 39 | #include <linux/mutex.h> |
40 | #include <linux/kthread.h> | 40 | #include <linux/kthread.h> |
41 | #include <linux/slab.h> | ||
41 | 42 | ||
42 | #include <net/sock.h> | 43 | #include <net/sock.h> |
43 | #include <asm/uaccess.h> | 44 | #include <asm/uaccess.h> |
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index 3b8e038ab32c..9101a4e56201 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/etherdevice.h> | 20 | #include <linux/etherdevice.h> |
21 | #include <linux/jhash.h> | 21 | #include <linux/jhash.h> |
22 | #include <linux/random.h> | 22 | #include <linux/random.h> |
23 | #include <linux/slab.h> | ||
23 | #include <asm/atomic.h> | 24 | #include <asm/atomic.h> |
24 | #include <asm/unaligned.h> | 25 | #include <asm/unaligned.h> |
25 | #include "br_private.h" | 26 | #include "br_private.h" |
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c index 8dbec83e50ca..7a241c396981 100644 --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/netdevice.h> | 17 | #include <linux/netdevice.h> |
17 | #include <linux/skbuff.h> | 18 | #include <linux/skbuff.h> |
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index b7cdd2e98050..521439333316 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/rtnetlink.h> | 20 | #include <linux/rtnetlink.h> |
21 | #include <linux/if_ether.h> | 21 | #include <linux/if_ether.h> |
22 | #include <linux/slab.h> | ||
22 | #include <net/sock.h> | 23 | #include <net/sock.h> |
23 | 24 | ||
24 | #include "br_private.h" | 25 | #include "br_private.h" |
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index 333dfb7c5886..e7f4c1d02f57 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * 2 of the License, or (at your option) any later version. | 11 | * 2 of the License, or (at your option) any later version. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/slab.h> | ||
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
16 | #include <linux/etherdevice.h> | 17 | #include <linux/etherdevice.h> |
diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c index 2af6e4a90262..995afc4b04dc 100644 --- a/net/bridge/br_ioctl.c +++ b/net/bridge/br_ioctl.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/if_bridge.h> | 16 | #include <linux/if_bridge.h> |
17 | #include <linux/netdevice.h> | 17 | #include <linux/netdevice.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/times.h> | 19 | #include <linux/times.h> |
19 | #include <net/net_namespace.h> | 20 | #include <net/net_namespace.h> |
20 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 9f0c4f065604..3fe86ffc069c 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
@@ -723,7 +723,7 @@ static int br_multicast_igmp3_report(struct net_bridge *br, | |||
723 | if (!pskb_may_pull(skb, len)) | 723 | if (!pskb_may_pull(skb, len)) |
724 | return -EINVAL; | 724 | return -EINVAL; |
725 | 725 | ||
726 | grec = (void *)(skb->data + len); | 726 | grec = (void *)(skb->data + len - sizeof(*grec)); |
727 | group = grec->grec_mca; | 727 | group = grec->grec_mca; |
728 | type = grec->grec_type; | 728 | type = grec->grec_type; |
729 | 729 | ||
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index 268e2e725888..4c4977d12fd6 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/ip.h> | 27 | #include <linux/ip.h> |
27 | #include <linux/netdevice.h> | 28 | #include <linux/netdevice.h> |
28 | #include <linux/skbuff.h> | 29 | #include <linux/skbuff.h> |
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index fcffb3fb1177..aa56ac2c8829 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/slab.h> | ||
14 | #include <net/rtnetlink.h> | 15 | #include <net/rtnetlink.h> |
15 | #include <net/net_namespace.h> | 16 | #include <net/net_namespace.h> |
16 | #include <net/sock.h> | 17 | #include <net/sock.h> |
diff --git a/net/bridge/br_stp_bpdu.c b/net/bridge/br_stp_bpdu.c index 81ae40b3f655..d66cce11f3bf 100644 --- a/net/bridge/br_stp_bpdu.c +++ b/net/bridge/br_stp_bpdu.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/netfilter_bridge.h> | 15 | #include <linux/netfilter_bridge.h> |
16 | #include <linux/etherdevice.h> | 16 | #include <linux/etherdevice.h> |
17 | #include <linux/llc.h> | 17 | #include <linux/llc.h> |
18 | #include <linux/slab.h> | ||
18 | #include <net/net_namespace.h> | 19 | #include <net/net_namespace.h> |
19 | #include <net/llc.h> | 20 | #include <net/llc.h> |
20 | #include <net/llc_pdu.h> | 21 | #include <net/llc_pdu.h> |
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c index c6ac657074a6..f9560f3dbdc7 100644 --- a/net/bridge/netfilter/ebt_ulog.c +++ b/net/bridge/netfilter/ebt_ulog.c | |||
@@ -29,6 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/slab.h> | ||
32 | #include <linux/spinlock.h> | 33 | #include <linux/spinlock.h> |
33 | #include <linux/socket.h> | 34 | #include <linux/socket.h> |
34 | #include <linux/skbuff.h> | 35 | #include <linux/skbuff.h> |
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index dfb58056a89a..f0865fd1e3ec 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/netfilter_bridge/ebtables.h> | 23 | #include <linux/netfilter_bridge/ebtables.h> |
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
26 | #include <linux/slab.h> | ||
26 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
27 | #include <linux/smp.h> | 28 | #include <linux/smp.h> |
28 | #include <linux/cpumask.h> | 29 | #include <linux/cpumask.h> |
diff --git a/net/can/bcm.c b/net/can/bcm.c index 629ad1debe81..907dc871fac8 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include <linux/can.h> | 56 | #include <linux/can.h> |
57 | #include <linux/can/core.h> | 57 | #include <linux/can/core.h> |
58 | #include <linux/can/bcm.h> | 58 | #include <linux/can/bcm.h> |
59 | #include <linux/slab.h> | ||
59 | #include <net/sock.h> | 60 | #include <net/sock.h> |
60 | #include <net/net_namespace.h> | 61 | #include <net/net_namespace.h> |
61 | 62 | ||
diff --git a/net/can/raw.c b/net/can/raw.c index abca920440b5..3a7dffb6519c 100644 --- a/net/can/raw.c +++ b/net/can/raw.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/init.h> | 45 | #include <linux/init.h> |
46 | #include <linux/uio.h> | 46 | #include <linux/uio.h> |
47 | #include <linux/net.h> | 47 | #include <linux/net.h> |
48 | #include <linux/slab.h> | ||
48 | #include <linux/netdevice.h> | 49 | #include <linux/netdevice.h> |
49 | #include <linux/socket.h> | 50 | #include <linux/socket.h> |
50 | #include <linux/if_arp.h> | 51 | #include <linux/if_arp.h> |
diff --git a/net/compat.c b/net/compat.c index a1fb1b079a82..ec24d9edb025 100644 --- a/net/compat.c +++ b/net/compat.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/gfp.h> | ||
15 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
16 | #include <linux/types.h> | 17 | #include <linux/types.h> |
17 | #include <linux/file.h> | 18 | #include <linux/file.h> |
diff --git a/net/core/datagram.c b/net/core/datagram.c index 95c2e0840d0d..2dccd4ee591b 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/poll.h> | 48 | #include <linux/poll.h> |
49 | #include <linux/highmem.h> | 49 | #include <linux/highmem.h> |
50 | #include <linux/spinlock.h> | 50 | #include <linux/spinlock.h> |
51 | #include <linux/slab.h> | ||
51 | 52 | ||
52 | #include <net/protocol.h> | 53 | #include <net/protocol.h> |
53 | #include <linux/skbuff.h> | 54 | #include <linux/skbuff.h> |
diff --git a/net/core/dev.c b/net/core/dev.c index b98ddc62a55d..a10a21619ae3 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -80,6 +80,7 @@ | |||
80 | #include <linux/types.h> | 80 | #include <linux/types.h> |
81 | #include <linux/kernel.h> | 81 | #include <linux/kernel.h> |
82 | #include <linux/hash.h> | 82 | #include <linux/hash.h> |
83 | #include <linux/slab.h> | ||
83 | #include <linux/sched.h> | 84 | #include <linux/sched.h> |
84 | #include <linux/mutex.h> | 85 | #include <linux/mutex.h> |
85 | #include <linux/string.h> | 86 | #include <linux/string.h> |
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index f8c874975350..cf208d8042b1 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/percpu.h> | 21 | #include <linux/percpu.h> |
22 | #include <linux/timer.h> | 22 | #include <linux/timer.h> |
23 | #include <linux/bitops.h> | 23 | #include <linux/bitops.h> |
24 | #include <linux/slab.h> | ||
24 | #include <net/genetlink.h> | 25 | #include <net/genetlink.h> |
25 | #include <net/netevent.h> | 26 | #include <net/netevent.h> |
26 | 27 | ||
diff --git a/net/core/dst.c b/net/core/dst.c index 2076d84203d1..b8c22f0f9373 100644 --- a/net/core/dst.c +++ b/net/core/dst.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/workqueue.h> | 12 | #include <linux/workqueue.h> |
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
16 | #include <linux/skbuff.h> | 17 | #include <linux/skbuff.h> |
17 | #include <linux/string.h> | 18 | #include <linux/string.h> |
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 99e9f850ea07..1a7db92037fa 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/netdevice.h> | 19 | #include <linux/netdevice.h> |
20 | #include <linux/bitops.h> | 20 | #include <linux/bitops.h> |
21 | #include <linux/uaccess.h> | 21 | #include <linux/uaccess.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | /* | 24 | /* |
24 | * Some useful ethtool_ops methods that're device independent. | 25 | * Some useful ethtool_ops methods that're device independent. |
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index 2ff34894357a..05cce4ec84dd 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/list.h> | 14 | #include <linux/list.h> |
14 | #include <net/net_namespace.h> | 15 | #include <net/net_namespace.h> |
15 | #include <net/sock.h> | 16 | #include <net/sock.h> |
diff --git a/net/core/filter.c b/net/core/filter.c index d38ef7fd50f0..ff943bed21af 100644 --- a/net/core/filter.c +++ b/net/core/filter.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/inet.h> | 25 | #include <linux/inet.h> |
26 | #include <linux/netdevice.h> | 26 | #include <linux/netdevice.h> |
27 | #include <linux/if_packet.h> | 27 | #include <linux/if_packet.h> |
28 | #include <linux/gfp.h> | ||
28 | #include <net/ip.h> | 29 | #include <net/ip.h> |
29 | #include <net/protocol.h> | 30 | #include <net/protocol.h> |
30 | #include <net/netlink.h> | 31 | #include <net/netlink.h> |
diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c index 493775f4f2f1..cf8e70392fe0 100644 --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/rtnetlink.h> | 32 | #include <linux/rtnetlink.h> |
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | #include <linux/rbtree.h> | 34 | #include <linux/rbtree.h> |
35 | #include <linux/slab.h> | ||
35 | #include <net/sock.h> | 36 | #include <net/sock.h> |
36 | #include <net/gen_stats.h> | 37 | #include <net/gen_stats.h> |
37 | 38 | ||
diff --git a/net/core/iovec.c b/net/core/iovec.c index 16ad45d4882b..1e7f4e91a935 100644 --- a/net/core/iovec.c +++ b/net/core/iovec.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/slab.h> | ||
24 | #include <linux/net.h> | 23 | #include <linux/net.h> |
25 | #include <linux/in6.h> | 24 | #include <linux/in6.h> |
26 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
diff --git a/net/core/link_watch.c b/net/core/link_watch.c index 5910b555a54a..bdbce2f5875b 100644 --- a/net/core/link_watch.c +++ b/net/core/link_watch.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/rtnetlink.h> | 19 | #include <linux/rtnetlink.h> |
20 | #include <linux/jiffies.h> | 20 | #include <linux/jiffies.h> |
21 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/workqueue.h> | 22 | #include <linux/workqueue.h> |
24 | #include <linux/bitops.h> | 23 | #include <linux/bitops.h> |
25 | #include <asm/types.h> | 24 | #include <asm/types.h> |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 6cee6434da67..bff37908bd55 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * Harald Welte Add neighbour cache statistics like rtstat | 15 | * Harald Welte Add neighbour cache statistics like rtstat |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/slab.h> | ||
18 | #include <linux/types.h> | 19 | #include <linux/types.h> |
19 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
20 | #include <linux/module.h> | 21 | #include <linux/module.h> |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 1e7fdd6029a2..96ed6905b823 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/netdevice.h> | 14 | #include <linux/netdevice.h> |
15 | #include <linux/if_arp.h> | 15 | #include <linux/if_arp.h> |
16 | #include <linux/slab.h> | ||
16 | #include <net/sock.h> | 17 | #include <net/sock.h> |
17 | #include <linux/rtnetlink.h> | 18 | #include <linux/rtnetlink.h> |
18 | #include <linux/wireless.h> | 19 | #include <linux/wireless.h> |
diff --git a/net/core/net-traces.c b/net/core/net-traces.c index f1e982c508bb..afa6380ed88a 100644 --- a/net/core/net-traces.c +++ b/net/core/net-traces.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/workqueue.h> | 19 | #include <linux/workqueue.h> |
20 | #include <linux/netlink.h> | 20 | #include <linux/netlink.h> |
21 | #include <linux/net_dropmon.h> | 21 | #include <linux/net_dropmon.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <asm/unaligned.h> | 24 | #include <asm/unaligned.h> |
24 | #include <asm/bitops.h> | 25 | #include <asm/bitops.h> |
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 6f9206b36dc2..a58f59b97597 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/rcupdate.h> | 23 | #include <linux/rcupdate.h> |
24 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
25 | #include <linux/slab.h> | ||
25 | #include <net/tcp.h> | 26 | #include <net/tcp.h> |
26 | #include <net/udp.h> | 27 | #include <net/udp.h> |
27 | #include <asm/unaligned.h> | 28 | #include <asm/unaligned.h> |
diff --git a/net/core/scm.c b/net/core/scm.c index 9b264634acfd..b88f6f9d0b97 100644 --- a/net/core/scm.c +++ b/net/core/scm.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/security.h> | 26 | #include <linux/security.h> |
27 | #include <linux/pid.h> | 27 | #include <linux/pid.h> |
28 | #include <linux/nsproxy.h> | 28 | #include <linux/nsproxy.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <asm/system.h> | 31 | #include <asm/system.h> |
31 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index 06124872af5b..b7b6b8208f75 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
13 | #include <linux/ratelimit.h> | 13 | #include <linux/ratelimit.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include <net/ip.h> | 17 | #include <net/ip.h> |
17 | #include <net/sock.h> | 18 | #include <net/sock.h> |
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index 813e399220a7..19ac2b985485 100644 --- a/net/dcb/dcbnl.c +++ b/net/dcb/dcbnl.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/netdevice.h> | 20 | #include <linux/netdevice.h> |
21 | #include <linux/netlink.h> | 21 | #include <linux/netlink.h> |
22 | #include <linux/slab.h> | ||
22 | #include <net/netlink.h> | 23 | #include <net/netlink.h> |
23 | #include <net/rtnetlink.h> | 24 | #include <net/rtnetlink.h> |
24 | #include <linux/dcbnl.h> | 25 | #include <linux/dcbnl.h> |
diff --git a/net/dccp/ccid.c b/net/dccp/ccid.c index 49d27c556bec..36479ca61e03 100644 --- a/net/dccp/ccid.c +++ b/net/dccp/ccid.c | |||
@@ -11,6 +11,8 @@ | |||
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/slab.h> | ||
15 | |||
14 | #include "ccid.h" | 16 | #include "ccid.h" |
15 | #include "ccids/lib/tfrc.h" | 17 | #include "ccids/lib/tfrc.h" |
16 | 18 | ||
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index a47a8c918ee8..9b3ae9922be1 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c | |||
@@ -23,6 +23,7 @@ | |||
23 | /* | 23 | /* |
24 | * This implementation should follow RFC 4341 | 24 | * This implementation should follow RFC 4341 |
25 | */ | 25 | */ |
26 | #include <linux/slab.h> | ||
26 | #include "../feat.h" | 27 | #include "../feat.h" |
27 | #include "../ccid.h" | 28 | #include "../ccid.h" |
28 | #include "../dccp.h" | 29 | #include "../dccp.h" |
diff --git a/net/dccp/feat.c b/net/dccp/feat.c index 972b8dc918d6..df7dd26cf07e 100644 --- a/net/dccp/feat.c +++ b/net/dccp/feat.c | |||
@@ -22,6 +22,7 @@ | |||
22 | * 2 of the License, or (at your option) any later version. | 22 | * 2 of the License, or (at your option) any later version. |
23 | */ | 23 | */ |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/slab.h> | ||
25 | #include "ccid.h" | 26 | #include "ccid.h" |
26 | #include "feat.h" | 27 | #include "feat.h" |
27 | 28 | ||
diff --git a/net/dccp/input.c b/net/dccp/input.c index 5daa4bdfdb10..58f7bc156850 100644 --- a/net/dccp/input.c +++ b/net/dccp/input.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/dccp.h> | 13 | #include <linux/dccp.h> |
14 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include <net/sock.h> | 17 | #include <net/sock.h> |
17 | 18 | ||
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 4071eaf2b361..52ffa1cde15a 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/dccp.h> | 13 | #include <linux/dccp.h> |
14 | #include <linux/icmp.h> | 14 | #include <linux/icmp.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/module.h> | 16 | #include <linux/module.h> |
16 | #include <linux/skbuff.h> | 17 | #include <linux/skbuff.h> |
17 | #include <linux/random.h> | 18 | #include <linux/random.h> |
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index af3394df63b7..3b11e41a2929 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/random.h> | 16 | #include <linux/random.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/xfrm.h> | 18 | #include <linux/xfrm.h> |
18 | 19 | ||
19 | #include <net/addrconf.h> | 20 | #include <net/addrconf.h> |
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c index 0d508c359fa9..128b089d3aef 100644 --- a/net/dccp/minisocks.c +++ b/net/dccp/minisocks.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/dccp.h> | 13 | #include <linux/dccp.h> |
14 | #include <linux/gfp.h> | ||
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
16 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
diff --git a/net/dccp/output.c b/net/dccp/output.c index d6bb753bf6ad..fc3f436440b4 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/dccp.h> | 13 | #include <linux/dccp.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/skbuff.h> | 15 | #include <linux/skbuff.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #include <net/inet_sock.h> | 18 | #include <net/inet_sock.h> |
18 | #include <net/sock.h> | 19 | #include <net/sock.h> |
diff --git a/net/dccp/probe.c b/net/dccp/probe.c index f5b3464f1242..078e48d442fd 100644 --- a/net/dccp/probe.c +++ b/net/dccp/probe.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/kfifo.h> | 31 | #include <linux/kfifo.h> |
32 | #include <linux/vmalloc.h> | 32 | #include <linux/vmalloc.h> |
33 | #include <linux/gfp.h> | ||
33 | #include <net/net_namespace.h> | 34 | #include <net/net_namespace.h> |
34 | 35 | ||
35 | #include "dccp.h" | 36 | #include "dccp.h" |
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index aa4cef374fd0..a0e38d8018f5 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/if_arp.h> | 20 | #include <linux/if_arp.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/random.h> | 22 | #include <linux/random.h> |
23 | #include <linux/slab.h> | ||
23 | #include <net/checksum.h> | 24 | #include <net/checksum.h> |
24 | 25 | ||
25 | #include <net/inet_sock.h> | 26 | #include <net/inet_sock.h> |
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index f3e4734d207f..615dbe3b43f9 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/skbuff.h> | 40 | #include <linux/skbuff.h> |
41 | #include <linux/sysctl.h> | 41 | #include <linux/sysctl.h> |
42 | #include <linux/notifier.h> | 42 | #include <linux/notifier.h> |
43 | #include <linux/slab.h> | ||
43 | #include <asm/uaccess.h> | 44 | #include <asm/uaccess.h> |
44 | #include <asm/system.h> | 45 | #include <asm/system.h> |
45 | #include <net/net_namespace.h> | 46 | #include <net/net_namespace.h> |
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c index e9d48700e83a..4ab96c15166d 100644 --- a/net/decnet/dn_fib.c +++ b/net/decnet/dn_fib.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/string.h> | 20 | #include <linux/string.h> |
21 | #include <linux/net.h> | 21 | #include <linux/net.h> |
22 | #include <linux/socket.h> | 22 | #include <linux/socket.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/sockios.h> | 24 | #include <linux/sockios.h> |
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/skbuff.h> | 26 | #include <linux/skbuff.h> |
diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index 794b5bf95af1..deb723dba44b 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/socket.h> | 29 | #include <linux/socket.h> |
30 | #include <linux/if_arp.h> | 30 | #include <linux/if_arp.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/if_ether.h> | 32 | #include <linux/if_ether.h> |
32 | #include <linux/init.h> | 33 | #include <linux/init.h> |
33 | #include <linux/proc_fs.h> | 34 | #include <linux/proc_fs.h> |
diff --git a/net/decnet/dn_nsp_in.c b/net/decnet/dn_nsp_in.c index 932408dca86d..25a37299bc65 100644 --- a/net/decnet/dn_nsp_in.c +++ b/net/decnet/dn_nsp_in.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <linux/netdevice.h> | 57 | #include <linux/netdevice.h> |
58 | #include <linux/inet.h> | 58 | #include <linux/inet.h> |
59 | #include <linux/route.h> | 59 | #include <linux/route.h> |
60 | #include <linux/slab.h> | ||
60 | #include <net/sock.h> | 61 | #include <net/sock.h> |
61 | #include <net/tcp_states.h> | 62 | #include <net/tcp_states.h> |
62 | #include <asm/system.h> | 63 | #include <asm/system.h> |
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c index a65e929ce76c..baeb1eaf011b 100644 --- a/net/decnet/dn_nsp_out.c +++ b/net/decnet/dn_nsp_out.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/netdevice.h> | 50 | #include <linux/netdevice.h> |
51 | #include <linux/inet.h> | 51 | #include <linux/inet.h> |
52 | #include <linux/route.h> | 52 | #include <linux/route.h> |
53 | #include <linux/slab.h> | ||
53 | #include <net/sock.h> | 54 | #include <net/sock.h> |
54 | #include <asm/system.h> | 55 | #include <asm/system.h> |
55 | #include <linux/fcntl.h> | 56 | #include <linux/fcntl.h> |
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index a7bf03ca0a36..70ebe74027d5 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -66,6 +66,7 @@ | |||
66 | #include <linux/inet.h> | 66 | #include <linux/inet.h> |
67 | #include <linux/route.h> | 67 | #include <linux/route.h> |
68 | #include <linux/in_route.h> | 68 | #include <linux/in_route.h> |
69 | #include <linux/slab.h> | ||
69 | #include <net/sock.h> | 70 | #include <net/sock.h> |
70 | #include <linux/mm.h> | 71 | #include <linux/mm.h> |
71 | #include <linux/proc_fs.h> | 72 | #include <linux/proc_fs.h> |
diff --git a/net/decnet/dn_table.c b/net/decnet/dn_table.c index b9a33bb5e9cc..f2abd3755690 100644 --- a/net/decnet/dn_table.c +++ b/net/decnet/dn_table.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/net.h> | 16 | #include <linux/net.h> |
17 | #include <linux/socket.h> | 17 | #include <linux/socket.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/sockios.h> | 19 | #include <linux/sockios.h> |
19 | #include <linux/init.h> | 20 | #include <linux/init.h> |
20 | #include <linux/skbuff.h> | 21 | #include <linux/skbuff.h> |
diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c index 6d2bd3202048..64a7f39e069f 100644 --- a/net/decnet/netfilter/dn_rtmsg.c +++ b/net/decnet/netfilter/dn_rtmsg.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/netdevice.h> | 19 | #include <linux/netdevice.h> |
19 | #include <linux/netfilter.h> | 20 | #include <linux/netfilter.h> |
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 71489f69a42c..6112a12578b2 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
12 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/slab.h> | ||
14 | #include <net/dsa.h> | 15 | #include <net/dsa.h> |
15 | #include "dsa_priv.h" | 16 | #include "dsa_priv.h" |
16 | 17 | ||
diff --git a/net/dsa/tag_dsa.c b/net/dsa/tag_dsa.c index cdf2d28a0297..98dfe80b4538 100644 --- a/net/dsa/tag_dsa.c +++ b/net/dsa/tag_dsa.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/etherdevice.h> | 11 | #include <linux/etherdevice.h> |
12 | #include <linux/list.h> | 12 | #include <linux/list.h> |
13 | #include <linux/netdevice.h> | 13 | #include <linux/netdevice.h> |
14 | #include <linux/slab.h> | ||
14 | #include "dsa_priv.h" | 15 | #include "dsa_priv.h" |
15 | 16 | ||
16 | #define DSA_HLEN 4 | 17 | #define DSA_HLEN 4 |
diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c index 8f53948cff4f..6f383322ad25 100644 --- a/net/dsa/tag_edsa.c +++ b/net/dsa/tag_edsa.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/etherdevice.h> | 11 | #include <linux/etherdevice.h> |
12 | #include <linux/list.h> | 12 | #include <linux/list.h> |
13 | #include <linux/netdevice.h> | 13 | #include <linux/netdevice.h> |
14 | #include <linux/slab.h> | ||
14 | #include "dsa_priv.h" | 15 | #include "dsa_priv.h" |
15 | 16 | ||
16 | #define DSA_HLEN 4 | 17 | #define DSA_HLEN 4 |
diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c index a85c829853c0..d6d7d0add3cb 100644 --- a/net/dsa/tag_trailer.c +++ b/net/dsa/tag_trailer.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/etherdevice.h> | 11 | #include <linux/etherdevice.h> |
12 | #include <linux/list.h> | 12 | #include <linux/list.h> |
13 | #include <linux/netdevice.h> | 13 | #include <linux/netdevice.h> |
14 | #include <linux/slab.h> | ||
14 | #include "dsa_priv.h" | 15 | #include "dsa_priv.h" |
15 | 16 | ||
16 | netdev_tx_t trailer_xmit(struct sk_buff *skb, struct net_device *dev) | 17 | netdev_tx_t trailer_xmit(struct sk_buff *skb, struct net_device *dev) |
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index 29b4931aae52..2a5a8053e000 100644 --- a/net/econet/af_econet.c +++ b/net/econet/af_econet.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/wireless.h> | 30 | #include <linux/wireless.h> |
31 | #include <linux/skbuff.h> | 31 | #include <linux/skbuff.h> |
32 | #include <linux/udp.h> | 32 | #include <linux/udp.h> |
33 | #include <linux/slab.h> | ||
33 | #include <net/sock.h> | 34 | #include <net/sock.h> |
34 | #include <net/inet_common.h> | 35 | #include <net/inet_common.h> |
35 | #include <linux/stat.h> | 36 | #include <linux/stat.h> |
diff --git a/net/ethernet/pe2.c b/net/ethernet/pe2.c index d60e15d9365e..eb00796758c3 100644 --- a/net/ethernet/pe2.c +++ b/net/ethernet/pe2.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include <linux/netdevice.h> | 4 | #include <linux/netdevice.h> |
5 | #include <linux/skbuff.h> | 5 | #include <linux/skbuff.h> |
6 | #include <linux/slab.h> | ||
6 | 7 | ||
7 | #include <net/datalink.h> | 8 | #include <net/datalink.h> |
8 | 9 | ||
diff --git a/net/ieee802154/af_ieee802154.c b/net/ieee802154/af_ieee802154.c index 01beb6c11205..c7da600750bb 100644 --- a/net/ieee802154/af_ieee802154.c +++ b/net/ieee802154/af_ieee802154.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/if.h> | 28 | #include <linux/if.h> |
29 | #include <linux/termios.h> /* For TIOCOUTQ/INQ */ | 29 | #include <linux/termios.h> /* For TIOCOUTQ/INQ */ |
30 | #include <linux/list.h> | 30 | #include <linux/list.h> |
31 | #include <linux/slab.h> | ||
31 | #include <net/datalink.h> | 32 | #include <net/datalink.h> |
32 | #include <net/psnap.h> | 33 | #include <net/psnap.h> |
33 | #include <net/sock.h> | 34 | #include <net/sock.h> |
diff --git a/net/ieee802154/dgram.c b/net/ieee802154/dgram.c index 9aac5aee1575..1a3334c2609a 100644 --- a/net/ieee802154/dgram.c +++ b/net/ieee802154/dgram.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/if_arp.h> | 26 | #include <linux/if_arp.h> |
27 | #include <linux/list.h> | 27 | #include <linux/list.h> |
28 | #include <linux/slab.h> | ||
28 | #include <net/sock.h> | 29 | #include <net/sock.h> |
29 | #include <net/af_ieee802154.h> | 30 | #include <net/af_ieee802154.h> |
30 | #include <net/ieee802154.h> | 31 | #include <net/ieee802154.h> |
diff --git a/net/ieee802154/netlink.c b/net/ieee802154/netlink.c index 33137b99e471..c8097ae2482f 100644 --- a/net/ieee802154/netlink.c +++ b/net/ieee802154/netlink.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/gfp.h> | ||
26 | #include <net/genetlink.h> | 27 | #include <net/genetlink.h> |
27 | #include <linux/nl802154.h> | 28 | #include <linux/nl802154.h> |
28 | 29 | ||
diff --git a/net/ieee802154/nl-mac.c b/net/ieee802154/nl-mac.c index 135c1678fb11..71ee1108d4f8 100644 --- a/net/ieee802154/nl-mac.c +++ b/net/ieee802154/nl-mac.c | |||
@@ -22,6 +22,7 @@ | |||
22 | * Maxim Osipov <maxim.osipov@siemens.com> | 22 | * Maxim Osipov <maxim.osipov@siemens.com> |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/gfp.h> | ||
25 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
26 | #include <linux/if_arp.h> | 27 | #include <linux/if_arp.h> |
27 | #include <linux/netdevice.h> | 28 | #include <linux/netdevice.h> |
diff --git a/net/ieee802154/nl-phy.c b/net/ieee802154/nl-phy.c index 199a2d9d12f9..ed0eab39f531 100644 --- a/net/ieee802154/nl-phy.c +++ b/net/ieee802154/nl-phy.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/slab.h> | ||
26 | #include <net/netlink.h> | 27 | #include <net/netlink.h> |
27 | #include <net/genetlink.h> | 28 | #include <net/genetlink.h> |
28 | #include <net/wpan-phy.h> | 29 | #include <net/wpan-phy.h> |
diff --git a/net/ieee802154/raw.c b/net/ieee802154/raw.c index 9c9b85c00033..10970ca85748 100644 --- a/net/ieee802154/raw.c +++ b/net/ieee802154/raw.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/if_arp.h> | 26 | #include <linux/if_arp.h> |
27 | #include <linux/list.h> | 27 | #include <linux/list.h> |
28 | #include <linux/slab.h> | ||
28 | #include <net/sock.h> | 29 | #include <net/sock.h> |
29 | #include <net/af_ieee802154.h> | 30 | #include <net/af_ieee802154.h> |
30 | 31 | ||
diff --git a/net/ieee802154/wpan-class.c b/net/ieee802154/wpan-class.c index 268691256a6d..3d803a1b9fb6 100644 --- a/net/ieee802154/wpan-class.c +++ b/net/ieee802154/wpan-class.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/slab.h> | ||
19 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
20 | #include <linux/module.h> | 21 | #include <linux/module.h> |
21 | #include <linux/device.h> | 22 | #include <linux/device.h> |
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index b5924f178812..a0beb32beaa3 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -86,6 +86,7 @@ | |||
86 | #include <linux/poll.h> | 86 | #include <linux/poll.h> |
87 | #include <linux/netfilter_ipv4.h> | 87 | #include <linux/netfilter_ipv4.h> |
88 | #include <linux/random.h> | 88 | #include <linux/random.h> |
89 | #include <linux/slab.h> | ||
89 | 90 | ||
90 | #include <asm/uaccess.h> | 91 | #include <asm/uaccess.h> |
91 | #include <asm/system.h> | 92 | #include <asm/system.h> |
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index 987b47dc69ad..880a5ec6dce0 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <crypto/hash.h> | 1 | #include <crypto/hash.h> |
2 | #include <linux/err.h> | 2 | #include <linux/err.h> |
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include <linux/slab.h> | ||
4 | #include <net/ip.h> | 5 | #include <net/ip.h> |
5 | #include <net/xfrm.h> | 6 | #include <net/xfrm.h> |
6 | #include <net/ah.h> | 7 | #include <net/ah.h> |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index c4dd13542802..6e747065c202 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -98,6 +98,7 @@ | |||
98 | #include <linux/net.h> | 98 | #include <linux/net.h> |
99 | #include <linux/rcupdate.h> | 99 | #include <linux/rcupdate.h> |
100 | #include <linux/jhash.h> | 100 | #include <linux/jhash.h> |
101 | #include <linux/slab.h> | ||
101 | #ifdef CONFIG_SYSCTL | 102 | #ifdef CONFIG_SYSCTL |
102 | #include <linux/sysctl.h> | 103 | #include <linux/sysctl.h> |
103 | #endif | 104 | #endif |
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c index 1e029dc75455..c97cd9ff697e 100644 --- a/net/ipv4/cipso_ipv4.c +++ b/net/ipv4/cipso_ipv4.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/string.h> | 44 | #include <linux/string.h> |
45 | #include <linux/jhash.h> | 45 | #include <linux/jhash.h> |
46 | #include <linux/audit.h> | 46 | #include <linux/audit.h> |
47 | #include <linux/slab.h> | ||
47 | #include <net/ip.h> | 48 | #include <net/ip.h> |
48 | #include <net/icmp.h> | 49 | #include <net/icmp.h> |
49 | #include <net/tcp.h> | 50 | #include <net/tcp.h> |
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index d009c6a5d9ad..382bc768ed56 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/notifier.h> | 50 | #include <linux/notifier.h> |
51 | #include <linux/inetdevice.h> | 51 | #include <linux/inetdevice.h> |
52 | #include <linux/igmp.h> | 52 | #include <linux/igmp.h> |
53 | #include <linux/slab.h> | ||
53 | #ifdef CONFIG_SYSCTL | 54 | #ifdef CONFIG_SYSCTL |
54 | #include <linux/sysctl.h> | 55 | #include <linux/sysctl.h> |
55 | #endif | 56 | #endif |
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 9b3e28ed5240..4f0ed458c883 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/skbuff.h> | 34 | #include <linux/skbuff.h> |
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/list.h> | 36 | #include <linux/list.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include <net/ip.h> | 39 | #include <net/ip.h> |
39 | #include <net/protocol.h> | 40 | #include <net/protocol.h> |
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c index 14972017b9c2..4ed7e0dea1bc 100644 --- a/net/ipv4/fib_hash.c +++ b/net/ipv4/fib_hash.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/skbuff.h> | 32 | #include <linux/skbuff.h> |
33 | #include <linux/netlink.h> | 33 | #include <linux/netlink.h> |
34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #include <net/net_namespace.h> | 37 | #include <net/net_namespace.h> |
37 | #include <net/ip.h> | 38 | #include <net/ip.h> |
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 1af0ea0fb6a2..20f09c5b31e8 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/proc_fs.h> | 32 | #include <linux/proc_fs.h> |
33 | #include <linux/skbuff.h> | 33 | #include <linux/skbuff.h> |
34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
35 | #include <linux/slab.h> | ||
35 | 36 | ||
36 | #include <net/arp.h> | 37 | #include <net/arp.h> |
37 | #include <net/ip.h> | 38 | #include <net/ip.h> |
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 01ef8ba9025c..59a838795e3e 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -71,6 +71,7 @@ | |||
71 | #include <linux/netlink.h> | 71 | #include <linux/netlink.h> |
72 | #include <linux/init.h> | 72 | #include <linux/init.h> |
73 | #include <linux/list.h> | 73 | #include <linux/list.h> |
74 | #include <linux/slab.h> | ||
74 | #include <net/net_namespace.h> | 75 | #include <net/net_namespace.h> |
75 | #include <net/ip.h> | 76 | #include <net/ip.h> |
76 | #include <net/protocol.h> | 77 | #include <net/protocol.h> |
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index d2aa7438c523..f3d339f728b0 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -74,6 +74,7 @@ | |||
74 | #include <linux/netdevice.h> | 74 | #include <linux/netdevice.h> |
75 | #include <linux/string.h> | 75 | #include <linux/string.h> |
76 | #include <linux/netfilter_ipv4.h> | 76 | #include <linux/netfilter_ipv4.h> |
77 | #include <linux/slab.h> | ||
77 | #include <net/snmp.h> | 78 | #include <net/snmp.h> |
78 | #include <net/ip.h> | 79 | #include <net/ip.h> |
79 | #include <net/route.h> | 80 | #include <net/route.h> |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 51824c42b775..5fff865a4fa7 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -71,6 +71,7 @@ | |||
71 | */ | 71 | */ |
72 | 72 | ||
73 | #include <linux/module.h> | 73 | #include <linux/module.h> |
74 | #include <linux/slab.h> | ||
74 | #include <asm/uaccess.h> | 75 | #include <asm/uaccess.h> |
75 | #include <asm/system.h> | 76 | #include <asm/system.h> |
76 | #include <linux/types.h> | 77 | #include <linux/types.h> |
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index 1aaa8110d84b..e5fa2ddce320 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/fcntl.h> | 15 | #include <linux/fcntl.h> |
16 | #include <linux/random.h> | 16 | #include <linux/random.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/cache.h> | 18 | #include <linux/cache.h> |
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <linux/time.h> | 20 | #include <linux/time.h> |
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c index eaf3e2c8646a..a2ca6aed763b 100644 --- a/net/ipv4/inet_fragment.c +++ b/net/ipv4/inet_fragment.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/random.h> | 19 | #include <linux/random.h> |
20 | #include <linux/skbuff.h> | 20 | #include <linux/skbuff.h> |
21 | #include <linux/rtnetlink.h> | 21 | #include <linux/rtnetlink.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <net/inet_frag.h> | 24 | #include <net/inet_frag.h> |
24 | 25 | ||
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index cc94cc2d8b2d..c5af909cf701 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/kmemcheck.h> | 12 | #include <linux/kmemcheck.h> |
13 | #include <linux/slab.h> | ||
13 | #include <net/inet_hashtables.h> | 14 | #include <net/inet_hashtables.h> |
14 | #include <net/inet_timewait_sock.h> | 15 | #include <net/inet_timewait_sock.h> |
15 | #include <net/ip.h> | 16 | #include <net/ip.h> |
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c index a2991bc8e32e..af10942b326c 100644 --- a/net/ipv4/ip_forward.c +++ b/net/ipv4/ip_forward.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/ip.h> | 25 | #include <linux/ip.h> |
26 | #include <linux/icmp.h> | 26 | #include <linux/icmp.h> |
27 | #include <linux/netdevice.h> | 27 | #include <linux/netdevice.h> |
28 | #include <linux/slab.h> | ||
28 | #include <net/sock.h> | 29 | #include <net/sock.h> |
29 | #include <net/ip.h> | 30 | #include <net/ip.h> |
30 | #include <net/tcp.h> | 31 | #include <net/tcp.h> |
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index b59430bc041c..75347ea70ea0 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/netdevice.h> | 32 | #include <linux/netdevice.h> |
33 | #include <linux/jhash.h> | 33 | #include <linux/jhash.h> |
34 | #include <linux/random.h> | 34 | #include <linux/random.h> |
35 | #include <linux/slab.h> | ||
35 | #include <net/route.h> | 36 | #include <net/route.h> |
36 | #include <net/dst.h> | 37 | #include <net/dst.h> |
37 | #include <net/sock.h> | 38 | #include <net/sock.h> |
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index f78402d097b3..fe381d12ecdd 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/slab.h> | ||
17 | #include <asm/uaccess.h> | 18 | #include <asm/uaccess.h> |
18 | #include <linux/skbuff.h> | 19 | #include <linux/skbuff.h> |
19 | #include <linux/netdevice.h> | 20 | #include <linux/netdevice.h> |
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index c29de9879fda..f8ab7a380d4a 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -119,6 +119,7 @@ | |||
119 | #include <linux/kernel.h> | 119 | #include <linux/kernel.h> |
120 | #include <linux/string.h> | 120 | #include <linux/string.h> |
121 | #include <linux/errno.h> | 121 | #include <linux/errno.h> |
122 | #include <linux/slab.h> | ||
122 | 123 | ||
123 | #include <linux/net.h> | 124 | #include <linux/net.h> |
124 | #include <linux/socket.h> | 125 | #include <linux/socket.h> |
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index 94bf105ef3c9..4c09a31fd140 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/capability.h> | 12 | #include <linux/capability.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/types.h> | 15 | #include <linux/types.h> |
15 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
16 | #include <linux/skbuff.h> | 17 | #include <linux/skbuff.h> |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 3451799e3dbf..c65f18e0936e 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/string.h> | 51 | #include <linux/string.h> |
52 | #include <linux/errno.h> | 52 | #include <linux/errno.h> |
53 | #include <linux/highmem.h> | 53 | #include <linux/highmem.h> |
54 | #include <linux/slab.h> | ||
54 | 55 | ||
55 | #include <linux/socket.h> | 56 | #include <linux/socket.h> |
56 | #include <linux/sockios.h> | 57 | #include <linux/sockios.h> |
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index f4b47acbf7b6..b0aa0546a3b3 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/icmp.h> | 23 | #include <linux/icmp.h> |
24 | #include <linux/inetdevice.h> | 24 | #include <linux/inetdevice.h> |
25 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
26 | #include <linux/slab.h> | ||
26 | #include <net/sock.h> | 27 | #include <net/sock.h> |
27 | #include <net/ip.h> | 28 | #include <net/ip.h> |
28 | #include <net/icmp.h> | 29 | #include <net/icmp.h> |
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index bf12d2a7a0c7..b9d84e800cf4 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <linux/root_dev.h> | 53 | #include <linux/root_dev.h> |
54 | #include <linux/delay.h> | 54 | #include <linux/delay.h> |
55 | #include <linux/nfs_fs.h> | 55 | #include <linux/nfs_fs.h> |
56 | #include <linux/slab.h> | ||
56 | #include <net/net_namespace.h> | 57 | #include <net/net_namespace.h> |
57 | #include <net/arp.h> | 58 | #include <net/arp.h> |
58 | #include <net/ip.h> | 59 | #include <net/ip.h> |
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 2f302d3ac9a3..0b27b14dcc9d 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -95,6 +95,7 @@ | |||
95 | #include <linux/module.h> | 95 | #include <linux/module.h> |
96 | #include <linux/types.h> | 96 | #include <linux/types.h> |
97 | #include <linux/kernel.h> | 97 | #include <linux/kernel.h> |
98 | #include <linux/slab.h> | ||
98 | #include <asm/uaccess.h> | 99 | #include <asm/uaccess.h> |
99 | #include <linux/skbuff.h> | 100 | #include <linux/skbuff.h> |
100 | #include <linux/netdevice.h> | 101 | #include <linux/netdevice.h> |
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index d0a6092a67be..9d4f6d1340a4 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/mroute.h> | 47 | #include <linux/mroute.h> |
48 | #include <linux/init.h> | 48 | #include <linux/init.h> |
49 | #include <linux/if_ether.h> | 49 | #include <linux/if_ether.h> |
50 | #include <linux/slab.h> | ||
50 | #include <net/net_namespace.h> | 51 | #include <net/net_namespace.h> |
51 | #include <net/ip.h> | 52 | #include <net/ip.h> |
52 | #include <net/protocol.h> | 53 | #include <net/protocol.h> |
diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c index c14623fc4d5e..82fb43c5c59e 100644 --- a/net/ipv4/netfilter.c +++ b/net/ipv4/netfilter.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/netfilter_ipv4.h> | 4 | #include <linux/netfilter_ipv4.h> |
5 | #include <linux/ip.h> | 5 | #include <linux/ip.h> |
6 | #include <linux/skbuff.h> | 6 | #include <linux/skbuff.h> |
7 | #include <linux/gfp.h> | ||
7 | #include <net/route.h> | 8 | #include <net/route.h> |
8 | #include <net/xfrm.h> | 9 | #include <net/xfrm.h> |
9 | #include <net/ip.h> | 10 | #include <net/ip.h> |
diff --git a/net/ipv4/netfilter/arptable_filter.c b/net/ipv4/netfilter/arptable_filter.c index bfe26f32b930..79ca5e70d497 100644 --- a/net/ipv4/netfilter/arptable_filter.c +++ b/net/ipv4/netfilter/arptable_filter.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/netfilter/x_tables.h> | 9 | #include <linux/netfilter/x_tables.h> |
10 | #include <linux/netfilter_arp/arp_tables.h> | 10 | #include <linux/netfilter_arp/arp_tables.h> |
11 | #include <linux/slab.h> | ||
11 | 12 | ||
12 | MODULE_LICENSE("GPL"); | 13 | MODULE_LICENSE("GPL"); |
13 | MODULE_AUTHOR("David S. Miller <davem@redhat.com>"); | 14 | MODULE_AUTHOR("David S. Miller <davem@redhat.com>"); |
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c index 2855f1f38cbc..e2787048aa0a 100644 --- a/net/ipv4/netfilter/ip_queue.c +++ b/net/ipv4/netfilter/ip_queue.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/security.h> | 26 | #include <linux/security.h> |
27 | #include <linux/net.h> | 27 | #include <linux/net.h> |
28 | #include <linux/mutex.h> | 28 | #include <linux/mutex.h> |
29 | #include <linux/slab.h> | ||
29 | #include <net/net_namespace.h> | 30 | #include <net/net_namespace.h> |
30 | #include <net/sock.h> | 31 | #include <net/sock.h> |
31 | #include <net/route.h> | 32 | #include <net/route.h> |
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index a2208b7b313d..a992dc826f1c 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/jhash.h> | 14 | #include <linux/jhash.h> |
15 | #include <linux/bitops.h> | 15 | #include <linux/bitops.h> |
16 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/ip.h> | 18 | #include <linux/ip.h> |
18 | #include <linux/tcp.h> | 19 | #include <linux/tcp.h> |
19 | #include <linux/udp.h> | 20 | #include <linux/udp.h> |
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c index 5113b8f1a379..a0e8bcf04159 100644 --- a/net/ipv4/netfilter/ipt_REJECT.c +++ b/net/ipv4/netfilter/ipt_REJECT.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/ip.h> | 16 | #include <linux/ip.h> |
16 | #include <linux/udp.h> | 17 | #include <linux/udp.h> |
17 | #include <linux/icmp.h> | 18 | #include <linux/icmp.h> |
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c index 09a5d3f7cc41..0dbe697f164f 100644 --- a/net/ipv4/netfilter/ipt_ULOG.c +++ b/net/ipv4/netfilter/ipt_ULOG.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/spinlock.h> | 34 | #include <linux/spinlock.h> |
35 | #include <linux/socket.h> | 35 | #include <linux/socket.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/skbuff.h> | 37 | #include <linux/skbuff.h> |
37 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
38 | #include <linux/timer.h> | 39 | #include <linux/timer.h> |
diff --git a/net/ipv4/netfilter/iptable_filter.c b/net/ipv4/netfilter/iptable_filter.c index c8dc9800d620..55392466daa4 100644 --- a/net/ipv4/netfilter/iptable_filter.c +++ b/net/ipv4/netfilter/iptable_filter.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
15 | #include <linux/netfilter_ipv4/ip_tables.h> | 15 | #include <linux/netfilter_ipv4/ip_tables.h> |
16 | #include <linux/slab.h> | ||
16 | #include <net/ip.h> | 17 | #include <net/ip.h> |
17 | 18 | ||
18 | MODULE_LICENSE("GPL"); | 19 | MODULE_LICENSE("GPL"); |
diff --git a/net/ipv4/netfilter/iptable_mangle.c b/net/ipv4/netfilter/iptable_mangle.c index b9b83464cbf4..294a2a32f293 100644 --- a/net/ipv4/netfilter/iptable_mangle.c +++ b/net/ipv4/netfilter/iptable_mangle.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/netfilter_ipv4/ip_tables.h> | 12 | #include <linux/netfilter_ipv4/ip_tables.h> |
13 | #include <linux/netdevice.h> | 13 | #include <linux/netdevice.h> |
14 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
15 | #include <linux/slab.h> | ||
15 | #include <net/sock.h> | 16 | #include <net/sock.h> |
16 | #include <net/route.h> | 17 | #include <net/route.h> |
17 | #include <linux/ip.h> | 18 | #include <linux/ip.h> |
diff --git a/net/ipv4/netfilter/iptable_raw.c b/net/ipv4/netfilter/iptable_raw.c index 06fb9d11953c..07fb710cd722 100644 --- a/net/ipv4/netfilter/iptable_raw.c +++ b/net/ipv4/netfilter/iptable_raw.c | |||
@@ -5,6 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
7 | #include <linux/netfilter_ipv4/ip_tables.h> | 7 | #include <linux/netfilter_ipv4/ip_tables.h> |
8 | #include <linux/slab.h> | ||
8 | #include <net/ip.h> | 9 | #include <net/ip.h> |
9 | 10 | ||
10 | #define RAW_VALID_HOOKS ((1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_OUT)) | 11 | #define RAW_VALID_HOOKS ((1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_OUT)) |
diff --git a/net/ipv4/netfilter/iptable_security.c b/net/ipv4/netfilter/iptable_security.c index cce2f64e6f21..be45bdc4c602 100644 --- a/net/ipv4/netfilter/iptable_security.c +++ b/net/ipv4/netfilter/iptable_security.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/netfilter_ipv4/ip_tables.h> | 19 | #include <linux/netfilter_ipv4/ip_tables.h> |
20 | #include <linux/slab.h> | ||
20 | #include <net/ip.h> | 21 | #include <net/ip.h> |
21 | 22 | ||
22 | MODULE_LICENSE("GPL"); | 23 | MODULE_LICENSE("GPL"); |
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c index 4595281c2863..4f8bddb760c9 100644 --- a/net/ipv4/netfilter/nf_nat_core.c +++ b/net/ipv4/netfilter/nf_nat_core.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/timer.h> | 13 | #include <linux/timer.h> |
14 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
15 | #include <linux/gfp.h> | ||
15 | #include <net/checksum.h> | 16 | #include <net/checksum.h> |
16 | #include <net/icmp.h> | 17 | #include <net/icmp.h> |
17 | #include <net/ip.h> | 18 | #include <net/ip.h> |
diff --git a/net/ipv4/netfilter/nf_nat_helper.c b/net/ipv4/netfilter/nf_nat_helper.c index 4b6af4bb1f50..4a0c6b548eee 100644 --- a/net/ipv4/netfilter/nf_nat_helper.c +++ b/net/ipv4/netfilter/nf_nat_helper.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/gfp.h> | ||
11 | #include <linux/kmod.h> | 12 | #include <linux/kmod.h> |
12 | #include <linux/types.h> | 13 | #include <linux/types.h> |
13 | #include <linux/timer.h> | 14 | #include <linux/timer.h> |
diff --git a/net/ipv4/netfilter/nf_nat_rule.c b/net/ipv4/netfilter/nf_nat_rule.c index ab74cc0535e2..26de2c1f7fab 100644 --- a/net/ipv4/netfilter/nf_nat_rule.c +++ b/net/ipv4/netfilter/nf_nat_rule.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kmod.h> | 15 | #include <linux/kmod.h> |
16 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
17 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
18 | #include <linux/slab.h> | ||
18 | #include <net/checksum.h> | 19 | #include <net/checksum.h> |
19 | #include <net/route.h> | 20 | #include <net/route.h> |
20 | #include <linux/bitops.h> | 21 | #include <linux/bitops.h> |
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c index 0b9c7ce3d6c5..4d85b6e55f29 100644 --- a/net/ipv4/netfilter/nf_nat_snmp_basic.c +++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/moduleparam.h> | 43 | #include <linux/moduleparam.h> |
44 | #include <linux/types.h> | 44 | #include <linux/types.h> |
45 | #include <linux/kernel.h> | 45 | #include <linux/kernel.h> |
46 | #include <linux/slab.h> | ||
46 | #include <linux/in.h> | 47 | #include <linux/in.h> |
47 | #include <linux/ip.h> | 48 | #include <linux/ip.h> |
48 | #include <linux/udp.h> | 49 | #include <linux/udp.h> |
diff --git a/net/ipv4/netfilter/nf_nat_standalone.c b/net/ipv4/netfilter/nf_nat_standalone.c index 5678e9562c15..c39c9cf6bee6 100644 --- a/net/ipv4/netfilter/nf_nat_standalone.c +++ b/net/ipv4/netfilter/nf_nat_standalone.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
9 | #include <linux/icmp.h> | 9 | #include <linux/icmp.h> |
10 | #include <linux/gfp.h> | ||
10 | #include <linux/ip.h> | 11 | #include <linux/ip.h> |
11 | #include <linux/netfilter.h> | 12 | #include <linux/netfilter.h> |
12 | #include <linux/netfilter_ipv4.h> | 13 | #include <linux/netfilter_ipv4.h> |
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index ce154b47f1da..cc6f097fbd5f 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -60,7 +60,6 @@ | |||
60 | #include <net/net_namespace.h> | 60 | #include <net/net_namespace.h> |
61 | #include <net/dst.h> | 61 | #include <net/dst.h> |
62 | #include <net/sock.h> | 62 | #include <net/sock.h> |
63 | #include <linux/gfp.h> | ||
64 | #include <linux/ip.h> | 63 | #include <linux/ip.h> |
65 | #include <linux/net.h> | 64 | #include <linux/net.h> |
66 | #include <net/ip.h> | 65 | #include <net/ip.h> |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index d413b57be9b3..cb562fdd9b9a 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -90,6 +90,7 @@ | |||
90 | #include <linux/jhash.h> | 90 | #include <linux/jhash.h> |
91 | #include <linux/rcupdate.h> | 91 | #include <linux/rcupdate.h> |
92 | #include <linux/times.h> | 92 | #include <linux/times.h> |
93 | #include <linux/slab.h> | ||
93 | #include <net/dst.h> | 94 | #include <net/dst.h> |
94 | #include <net/net_namespace.h> | 95 | #include <net/net_namespace.h> |
95 | #include <net/protocol.h> | 96 | #include <net/protocol.h> |
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index c1bc074f61b7..1cd5c15174b8 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/inetdevice.h> | 12 | #include <linux/inetdevice.h> |
13 | #include <linux/seqlock.h> | 13 | #include <linux/seqlock.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | ||
15 | #include <net/snmp.h> | 16 | #include <net/snmp.h> |
16 | #include <net/icmp.h> | 17 | #include <net/icmp.h> |
17 | #include <net/ip.h> | 18 | #include <net/ip.h> |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 2c75f891914e..0f8caf64caa3 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -265,6 +265,7 @@ | |||
265 | #include <linux/err.h> | 265 | #include <linux/err.h> |
266 | #include <linux/crypto.h> | 266 | #include <linux/crypto.h> |
267 | #include <linux/time.h> | 267 | #include <linux/time.h> |
268 | #include <linux/slab.h> | ||
268 | 269 | ||
269 | #include <net/icmp.h> | 270 | #include <net/icmp.h> |
270 | #include <net/tcp.h> | 271 | #include <net/tcp.h> |
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index 6428b342b164..0ec9bd0ae94f 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/list.h> | 12 | #include <linux/list.h> |
13 | #include <linux/gfp.h> | ||
13 | #include <net/tcp.h> | 14 | #include <net/tcp.h> |
14 | 15 | ||
15 | int sysctl_tcp_max_ssthresh = 0; | 16 | int sysctl_tcp_max_ssthresh = 0; |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 7b31476a4063..4000b10610b7 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -62,6 +62,7 @@ | |||
62 | */ | 62 | */ |
63 | 63 | ||
64 | #include <linux/mm.h> | 64 | #include <linux/mm.h> |
65 | #include <linux/slab.h> | ||
65 | #include <linux/module.h> | 66 | #include <linux/module.h> |
66 | #include <linux/sysctl.h> | 67 | #include <linux/sysctl.h> |
67 | #include <linux/kernel.h> | 68 | #include <linux/kernel.h> |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index f4df5f931f36..3c23e70885f4 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -60,6 +60,7 @@ | |||
60 | #include <linux/jhash.h> | 60 | #include <linux/jhash.h> |
61 | #include <linux/init.h> | 61 | #include <linux/init.h> |
62 | #include <linux/times.h> | 62 | #include <linux/times.h> |
63 | #include <linux/slab.h> | ||
63 | 64 | ||
64 | #include <net/net_namespace.h> | 65 | #include <net/net_namespace.h> |
65 | #include <net/icmp.h> | 66 | #include <net/icmp.h> |
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 32f96278a24a..794c2e122a41 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/sysctl.h> | 24 | #include <linux/sysctl.h> |
24 | #include <linux/workqueue.h> | 25 | #include <linux/workqueue.h> |
25 | #include <net/tcp.h> | 26 | #include <net/tcp.h> |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index f181b78f2385..0dda86e72ad8 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <net/tcp.h> | 37 | #include <net/tcp.h> |
38 | 38 | ||
39 | #include <linux/compiler.h> | 39 | #include <linux/compiler.h> |
40 | #include <linux/gfp.h> | ||
40 | #include <linux/module.h> | 41 | #include <linux/module.h> |
41 | 42 | ||
42 | /* People can turn this off for buggy TCP's found in printers etc. */ | 43 | /* People can turn this off for buggy TCP's found in printers etc. */ |
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index 9bc805df95d2..f8efada580e8 100644 --- a/net/ipv4/tcp_probe.c +++ b/net/ipv4/tcp_probe.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/kprobes.h> | 22 | #include <linux/kprobes.h> |
23 | #include <linux/socket.h> | 23 | #include <linux/socket.h> |
24 | #include <linux/tcp.h> | 24 | #include <linux/tcp.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/proc_fs.h> | 26 | #include <linux/proc_fs.h> |
26 | #include <linux/module.h> | 27 | #include <linux/module.h> |
27 | #include <linux/ktime.h> | 28 | #include <linux/ktime.h> |
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index b2e6bbccaee1..8a0ab2977f1f 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/gfp.h> | ||
22 | #include <net/tcp.h> | 23 | #include <net/tcp.h> |
23 | 24 | ||
24 | int sysctl_tcp_syn_retries __read_mostly = TCP_SYN_RETRIES; | 25 | int sysctl_tcp_syn_retries __read_mostly = TCP_SYN_RETRIES; |
diff --git a/net/ipv4/tunnel4.c b/net/ipv4/tunnel4.c index 3959e0ca456a..3b3813cc80b9 100644 --- a/net/ipv4/tunnel4.c +++ b/net/ipv4/tunnel4.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/mutex.h> | 8 | #include <linux/mutex.h> |
9 | #include <linux/netdevice.h> | 9 | #include <linux/netdevice.h> |
10 | #include <linux/skbuff.h> | 10 | #include <linux/skbuff.h> |
11 | #include <linux/slab.h> | ||
11 | #include <net/icmp.h> | 12 | #include <net/icmp.h> |
12 | #include <net/ip.h> | 13 | #include <net/ip.h> |
13 | #include <net/protocol.h> | 14 | #include <net/protocol.h> |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 7af756d0f931..8fef859db35d 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -95,6 +95,7 @@ | |||
95 | #include <linux/mm.h> | 95 | #include <linux/mm.h> |
96 | #include <linux/inet.h> | 96 | #include <linux/inet.h> |
97 | #include <linux/netdevice.h> | 97 | #include <linux/netdevice.h> |
98 | #include <linux/slab.h> | ||
98 | #include <net/tcp_states.h> | 99 | #include <net/tcp_states.h> |
99 | #include <linux/skbuff.h> | 100 | #include <linux/skbuff.h> |
100 | #include <linux/proc_fs.h> | 101 | #include <linux/proc_fs.h> |
@@ -471,8 +472,8 @@ static struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr, | |||
471 | if (hslot->count < hslot2->count) | 472 | if (hslot->count < hslot2->count) |
472 | goto begin; | 473 | goto begin; |
473 | 474 | ||
474 | result = udp4_lib_lookup2(net, INADDR_ANY, sport, | 475 | result = udp4_lib_lookup2(net, saddr, sport, |
475 | daddr, hnum, dif, | 476 | INADDR_ANY, hnum, dif, |
476 | hslot2, slot2); | 477 | hslot2, slot2); |
477 | } | 478 | } |
478 | rcu_read_unlock(); | 479 | rcu_read_unlock(); |
diff --git a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c index f9f922a0ba88..c791bb63203f 100644 --- a/net/ipv4/xfrm4_input.c +++ b/net/ipv4/xfrm4_input.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/string.h> | 14 | #include <linux/string.h> |
14 | #include <linux/netfilter.h> | 15 | #include <linux/netfilter.h> |
diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c index 3444f3b34eca..6f368413eb0e 100644 --- a/net/ipv4/xfrm4_mode_tunnel.c +++ b/net/ipv4/xfrm4_mode_tunnel.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Copyright (c) 2004-2006 Herbert Xu <herbert@gondor.apana.org.au> | 4 | * Copyright (c) 2004-2006 Herbert Xu <herbert@gondor.apana.org.au> |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/gfp.h> | ||
7 | #include <linux/init.h> | 8 | #include <linux/init.h> |
8 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
9 | #include <linux/module.h> | 10 | #include <linux/module.h> |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 1c58b99a54a4..1b00bfef268e 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <linux/route.h> | 53 | #include <linux/route.h> |
54 | #include <linux/inetdevice.h> | 54 | #include <linux/inetdevice.h> |
55 | #include <linux/init.h> | 55 | #include <linux/init.h> |
56 | #include <linux/slab.h> | ||
56 | #ifdef CONFIG_SYSCTL | 57 | #ifdef CONFIG_SYSCTL |
57 | #include <linux/sysctl.h> | 58 | #include <linux/sysctl.h> |
58 | #endif | 59 | #endif |
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index 6ff73c4c126a..ae404c9a746c 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/rcupdate.h> | 14 | #include <linux/rcupdate.h> |
15 | #include <linux/in6.h> | 15 | #include <linux/in6.h> |
16 | #include <linux/slab.h> | ||
16 | #include <net/addrconf.h> | 17 | #include <net/addrconf.h> |
17 | #include <linux/if_addrlabel.h> | 18 | #include <linux/if_addrlabel.h> |
18 | #include <linux/netlink.h> | 19 | #include <linux/netlink.h> |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 37d14e735c27..3192aa02ba5d 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/proc_fs.h> | 36 | #include <linux/proc_fs.h> |
37 | #include <linux/stat.h> | 37 | #include <linux/stat.h> |
38 | #include <linux/init.h> | 38 | #include <linux/init.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | #include <linux/inet.h> | 41 | #include <linux/inet.h> |
41 | #include <linux/netdevice.h> | 42 | #include <linux/netdevice.h> |
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 5ac89025f9de..ee82d4ef26ce 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <crypto/hash.h> | 27 | #include <crypto/hash.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/slab.h> | ||
29 | #include <net/ip.h> | 30 | #include <net/ip.h> |
30 | #include <net/ah.h> | 31 | #include <net/ah.h> |
31 | #include <linux/crypto.h> | 32 | #include <linux/crypto.h> |
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c index c4f6ca32fa74..b5b07054508a 100644 --- a/net/ipv6/anycast.c +++ b/net/ipv6/anycast.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/proc_fs.h> | 30 | #include <linux/proc_fs.h> |
31 | #include <linux/seq_file.h> | 31 | #include <linux/seq_file.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <net/net_namespace.h> | 34 | #include <net/net_namespace.h> |
34 | #include <net/sock.h> | 35 | #include <net/sock.h> |
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index e6f9cdf780fe..622dc7939a1b 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/in6.h> | 21 | #include <linux/in6.h> |
22 | #include <linux/ipv6.h> | 22 | #include <linux/ipv6.h> |
23 | #include <linux/route.h> | 23 | #include <linux/route.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include <net/ipv6.h> | 26 | #include <net/ipv6.h> |
26 | #include <net/ndisc.h> | 27 | #include <net/ndisc.h> |
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 074f2c084f9f..8a659f92d17a 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/netdevice.h> | 29 | #include <linux/netdevice.h> |
30 | #include <linux/in6.h> | 30 | #include <linux/in6.h> |
31 | #include <linux/icmpv6.h> | 31 | #include <linux/icmpv6.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <net/dst.h> | 34 | #include <net/dst.h> |
34 | #include <net/sock.h> | 35 | #include <net/sock.h> |
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index a00c18aa6c8d..12d2fa42657d 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/skbuff.h> | 40 | #include <linux/skbuff.h> |
41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
42 | #include <linux/netfilter.h> | 42 | #include <linux/netfilter.h> |
43 | #include <linux/slab.h> | ||
43 | 44 | ||
44 | #ifdef CONFIG_SYSCTL | 45 | #ifdef CONFIG_SYSCTL |
45 | #include <linux/sysctl.h> | 46 | #include <linux/sysctl.h> |
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index 3516e6fe2e56..628db24bcf22 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/in6.h> | 17 | #include <linux/in6.h> |
18 | #include <linux/ipv6.h> | 18 | #include <linux/ipv6.h> |
19 | #include <linux/jhash.h> | 19 | #include <linux/jhash.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | #include <net/addrconf.h> | 22 | #include <net/addrconf.h> |
22 | #include <net/inet_connection_sock.h> | 23 | #include <net/inet_connection_sock.h> |
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 68119ef62869..dc6e0b8f260d 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/in6.h> | 26 | #include <linux/in6.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #ifdef CONFIG_PROC_FS | 31 | #ifdef CONFIG_PROC_FS |
31 | #include <linux/proc_fs.h> | 32 | #include <linux/proc_fs.h> |
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index e41eba8aacf1..14e23216eb28 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/route.h> | 20 | #include <linux/route.h> |
21 | #include <linux/proc_fs.h> | 21 | #include <linux/proc_fs.h> |
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <net/net_namespace.h> | 25 | #include <net/net_namespace.h> |
25 | #include <net/sock.h> | 26 | #include <net/sock.h> |
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index e28f9203deca..6aa7ee1295c2 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/in6.h> | 28 | #include <linux/in6.h> |
29 | #include <linux/icmpv6.h> | 29 | #include <linux/icmpv6.h> |
30 | #include <linux/mroute6.h> | 30 | #include <linux/mroute6.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | #include <linux/netfilter.h> | 33 | #include <linux/netfilter.h> |
33 | #include <linux/netfilter_ipv6.h> | 34 | #include <linux/netfilter_ipv6.h> |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index dabf108ad811..16c4391f952b 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/tcp.h> | 37 | #include <linux/tcp.h> |
38 | #include <linux/route.h> | 38 | #include <linux/route.h> |
39 | #include <linux/module.h> | 39 | #include <linux/module.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | #include <linux/netfilter.h> | 42 | #include <linux/netfilter.h> |
42 | #include <linux/netfilter_ipv6.h> | 43 | #include <linux/netfilter_ipv6.h> |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 138980eec214..2599870747ec 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/route.h> | 37 | #include <linux/route.h> |
38 | #include <linux/rtnetlink.h> | 38 | #include <linux/rtnetlink.h> |
39 | #include <linux/netfilter_ipv6.h> | 39 | #include <linux/netfilter_ipv6.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
42 | #include <asm/atomic.h> | 43 | #include <asm/atomic.h> |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 27acfb58650a..3e333268db89 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/proc_fs.h> | 33 | #include <linux/proc_fs.h> |
34 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/slab.h> | ||
36 | #include <net/protocol.h> | 37 | #include <net/protocol.h> |
37 | #include <linux/skbuff.h> | 38 | #include <linux/skbuff.h> |
38 | #include <net/sock.h> | 39 | #include <net/sock.h> |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 430454ee5ead..33f60fca7aa7 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/init.h> | 36 | #include <linux/init.h> |
37 | #include <linux/sysctl.h> | 37 | #include <linux/sysctl.h> |
38 | #include <linux/netfilter.h> | 38 | #include <linux/netfilter.h> |
39 | #include <linux/slab.h> | ||
39 | 40 | ||
40 | #include <net/sock.h> | 41 | #include <net/sock.h> |
41 | #include <net/snmp.h> | 42 | #include <net/snmp.h> |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 37d1868c0064..62ed08213d91 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/init.h> | 43 | #include <linux/init.h> |
44 | #include <linux/proc_fs.h> | 44 | #include <linux/proc_fs.h> |
45 | #include <linux/seq_file.h> | 45 | #include <linux/seq_file.h> |
46 | #include <linux/slab.h> | ||
46 | 47 | ||
47 | #include <linux/netfilter.h> | 48 | #include <linux/netfilter.h> |
48 | #include <linux/netfilter_ipv6.h> | 49 | #include <linux/netfilter_ipv6.h> |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 8bcc4b7db3bf..da0a4d2adc69 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -59,6 +59,7 @@ | |||
59 | #include <linux/route.h> | 59 | #include <linux/route.h> |
60 | #include <linux/init.h> | 60 | #include <linux/init.h> |
61 | #include <linux/rcupdate.h> | 61 | #include <linux/rcupdate.h> |
62 | #include <linux/slab.h> | ||
62 | #ifdef CONFIG_SYSCTL | 63 | #ifdef CONFIG_SYSCTL |
63 | #include <linux/sysctl.h> | 64 | #include <linux/sysctl.h> |
64 | #endif | 65 | #endif |
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c index 7854052be60b..6a68a74d14a3 100644 --- a/net/ipv6/netfilter/ip6_queue.c +++ b/net/ipv6/netfilter/ip6_queue.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/proc_fs.h> | 25 | #include <linux/proc_fs.h> |
26 | #include <linux/seq_file.h> | 26 | #include <linux/seq_file.h> |
27 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
28 | #include <linux/slab.h> | ||
28 | #include <net/net_namespace.h> | 29 | #include <net/net_namespace.h> |
29 | #include <net/sock.h> | 30 | #include <net/sock.h> |
30 | #include <net/ipv6.h> | 31 | #include <net/ipv6.h> |
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c index dd8afbaf00a8..39b50c3768e8 100644 --- a/net/ipv6/netfilter/ip6t_REJECT.c +++ b/net/ipv6/netfilter/ip6t_REJECT.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * 2 of the License, or (at your option) any later version. | 15 | * 2 of the License, or (at your option) any later version. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/gfp.h> | ||
18 | #include <linux/module.h> | 19 | #include <linux/module.h> |
19 | #include <linux/skbuff.h> | 20 | #include <linux/skbuff.h> |
20 | #include <linux/icmpv6.h> | 21 | #include <linux/icmpv6.h> |
diff --git a/net/ipv6/netfilter/ip6table_filter.c b/net/ipv6/netfilter/ip6table_filter.c index 36b72cafc227..d6fc9aff3163 100644 --- a/net/ipv6/netfilter/ip6table_filter.c +++ b/net/ipv6/netfilter/ip6table_filter.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/moduleparam.h> | 13 | #include <linux/moduleparam.h> |
14 | #include <linux/netfilter_ipv6/ip6_tables.h> | 14 | #include <linux/netfilter_ipv6/ip6_tables.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | MODULE_LICENSE("GPL"); | 17 | MODULE_LICENSE("GPL"); |
17 | MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>"); | 18 | MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>"); |
diff --git a/net/ipv6/netfilter/ip6table_mangle.c b/net/ipv6/netfilter/ip6table_mangle.c index 7844e557c0ec..6a102b57f356 100644 --- a/net/ipv6/netfilter/ip6table_mangle.c +++ b/net/ipv6/netfilter/ip6table_mangle.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/netfilter_ipv6/ip6_tables.h> | 12 | #include <linux/netfilter_ipv6/ip6_tables.h> |
13 | #include <linux/slab.h> | ||
13 | 14 | ||
14 | MODULE_LICENSE("GPL"); | 15 | MODULE_LICENSE("GPL"); |
15 | MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>"); | 16 | MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>"); |
diff --git a/net/ipv6/netfilter/ip6table_raw.c b/net/ipv6/netfilter/ip6table_raw.c index b9cf7cd61923..5b9926a011bd 100644 --- a/net/ipv6/netfilter/ip6table_raw.c +++ b/net/ipv6/netfilter/ip6table_raw.c | |||
@@ -5,6 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
7 | #include <linux/netfilter_ipv6/ip6_tables.h> | 7 | #include <linux/netfilter_ipv6/ip6_tables.h> |
8 | #include <linux/slab.h> | ||
8 | 9 | ||
9 | #define RAW_VALID_HOOKS ((1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_OUT)) | 10 | #define RAW_VALID_HOOKS ((1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_OUT)) |
10 | 11 | ||
diff --git a/net/ipv6/netfilter/ip6table_security.c b/net/ipv6/netfilter/ip6table_security.c index 0824d865aa9b..91aa2b4d83c9 100644 --- a/net/ipv6/netfilter/ip6table_security.c +++ b/net/ipv6/netfilter/ip6table_security.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/netfilter_ipv6/ip6_tables.h> | 19 | #include <linux/netfilter_ipv6/ip6_tables.h> |
20 | #include <linux/slab.h> | ||
20 | 21 | ||
21 | MODULE_LICENSE("GPL"); | 22 | MODULE_LICENSE("GPL"); |
22 | MODULE_AUTHOR("James Morris <jmorris <at> redhat.com>"); | 23 | MODULE_AUTHOR("James Morris <jmorris <at> redhat.com>"); |
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index f1171b744650..dd5b9bd61c62 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/ipv6.h> | 27 | #include <linux/ipv6.h> |
28 | #include <linux/icmpv6.h> | 28 | #include <linux/icmpv6.h> |
29 | #include <linux/random.h> | 29 | #include <linux/random.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <net/sock.h> | 32 | #include <net/sock.h> |
32 | #include <net/snmp.h> | 33 | #include <net/snmp.h> |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index ed31c37c6e39..8763b1a0814a 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/socket.h> | 23 | #include <linux/socket.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/sockios.h> | 25 | #include <linux/sockios.h> |
25 | #include <linux/net.h> | 26 | #include <linux/net.h> |
26 | #include <linux/in6.h> | 27 | #include <linux/in6.h> |
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index a555156e9779..6d4292ff5854 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/random.h> | 41 | #include <linux/random.h> |
42 | #include <linux/jhash.h> | 42 | #include <linux/jhash.h> |
43 | #include <linux/skbuff.h> | 43 | #include <linux/skbuff.h> |
44 | #include <linux/slab.h> | ||
44 | 45 | ||
45 | #include <net/sock.h> | 46 | #include <net/sock.h> |
46 | #include <net/snmp.h> | 47 | #include <net/snmp.h> |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 0d7713c5c206..c2438e8cb9d0 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/proc_fs.h> | 40 | #include <linux/proc_fs.h> |
41 | #include <linux/seq_file.h> | 41 | #include <linux/seq_file.h> |
42 | #include <linux/nsproxy.h> | 42 | #include <linux/nsproxy.h> |
43 | #include <linux/slab.h> | ||
43 | #include <net/net_namespace.h> | 44 | #include <net/net_namespace.h> |
44 | #include <net/snmp.h> | 45 | #include <net/snmp.h> |
45 | #include <net/ipv6.h> | 46 | #include <net/ipv6.h> |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index b1eea811be48..5abae10cd884 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/netdevice.h> | 28 | #include <linux/netdevice.h> |
29 | #include <linux/if_arp.h> | 29 | #include <linux/if_arp.h> |
30 | #include <linux/icmp.h> | 30 | #include <linux/icmp.h> |
31 | #include <linux/slab.h> | ||
31 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
32 | #include <linux/init.h> | 33 | #include <linux/init.h> |
33 | #include <linux/netfilter_ipv4.h> | 34 | #include <linux/netfilter_ipv4.h> |
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index f841d93bf987..fa1d8f4e0051 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/sysctl.h> | 9 | #include <linux/sysctl.h> |
10 | #include <linux/in6.h> | 10 | #include <linux/in6.h> |
11 | #include <linux/ipv6.h> | 11 | #include <linux/ipv6.h> |
12 | #include <linux/slab.h> | ||
12 | #include <net/ndisc.h> | 13 | #include <net/ndisc.h> |
13 | #include <net/ipv6.h> | 14 | #include <net/ipv6.h> |
14 | #include <net/addrconf.h> | 15 | #include <net/addrconf.h> |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 9b6dbba80d31..c92ebe8f80d5 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/jhash.h> | 38 | #include <linux/jhash.h> |
39 | #include <linux/ipsec.h> | 39 | #include <linux/ipsec.h> |
40 | #include <linux/times.h> | 40 | #include <linux/times.h> |
41 | #include <linux/slab.h> | ||
41 | 42 | ||
42 | #include <linux/ipv6.h> | 43 | #include <linux/ipv6.h> |
43 | #include <linux/icmpv6.h> | 44 | #include <linux/icmpv6.h> |
diff --git a/net/ipv6/tunnel6.c b/net/ipv6/tunnel6.c index e17bc1dfc1a4..fc3c86a47452 100644 --- a/net/ipv6/tunnel6.c +++ b/net/ipv6/tunnel6.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
26 | #include <linux/netdevice.h> | 26 | #include <linux/netdevice.h> |
27 | #include <linux/skbuff.h> | 27 | #include <linux/skbuff.h> |
28 | #include <linux/slab.h> | ||
28 | #include <net/ipv6.h> | 29 | #include <net/ipv6.h> |
29 | #include <net/protocol.h> | 30 | #include <net/protocol.h> |
30 | #include <net/xfrm.h> | 31 | #include <net/xfrm.h> |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 3c0c9c755c92..90824852f598 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/skbuff.h> | 36 | #include <linux/skbuff.h> |
37 | #include <linux/slab.h> | ||
37 | #include <asm/uaccess.h> | 38 | #include <asm/uaccess.h> |
38 | 39 | ||
39 | #include <net/ndisc.h> | 40 | #include <net/ndisc.h> |
@@ -258,8 +259,8 @@ static struct sock *__udp6_lib_lookup(struct net *net, | |||
258 | if (hslot->count < hslot2->count) | 259 | if (hslot->count < hslot2->count) |
259 | goto begin; | 260 | goto begin; |
260 | 261 | ||
261 | result = udp6_lib_lookup2(net, &in6addr_any, sport, | 262 | result = udp6_lib_lookup2(net, saddr, sport, |
262 | daddr, hnum, dif, | 263 | &in6addr_any, hnum, dif, |
263 | hslot2, slot2); | 264 | hslot2, slot2); |
264 | } | 265 | } |
265 | rcu_read_unlock(); | 266 | rcu_read_unlock(); |
diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c index 3927832227b9..b809812c8d30 100644 --- a/net/ipv6/xfrm6_mode_tunnel.c +++ b/net/ipv6/xfrm6_mode_tunnel.c | |||
@@ -5,6 +5,7 @@ | |||
5 | * Copyright (c) 2004-2006 Herbert Xu <herbert@gondor.apana.org.au> | 5 | * Copyright (c) 2004-2006 Herbert Xu <herbert@gondor.apana.org.au> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/gfp.h> | ||
8 | #include <linux/init.h> | 9 | #include <linux/init.h> |
9 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
10 | #include <linux/module.h> | 11 | #include <linux/module.h> |
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c index fa85a7d22dc4..2ce3a8278f26 100644 --- a/net/ipv6/xfrm6_tunnel.c +++ b/net/ipv6/xfrm6_tunnel.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/xfrm.h> | 25 | #include <linux/xfrm.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/rculist.h> | 27 | #include <linux/rculist.h> |
27 | #include <net/ip.h> | 28 | #include <net/ip.h> |
28 | #include <net/xfrm.h> | 29 | #include <net/xfrm.h> |
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c index f9759b54a6de..da3d21c41d90 100644 --- a/net/ipx/af_ipx.c +++ b/net/ipx/af_ipx.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/net.h> | 40 | #include <linux/net.h> |
41 | #include <linux/netdevice.h> | 41 | #include <linux/netdevice.h> |
42 | #include <linux/uio.h> | 42 | #include <linux/uio.h> |
43 | #include <linux/slab.h> | ||
43 | #include <linux/skbuff.h> | 44 | #include <linux/skbuff.h> |
44 | #include <linux/smp_lock.h> | 45 | #include <linux/smp_lock.h> |
45 | #include <linux/socket.h> | 46 | #include <linux/socket.h> |
diff --git a/net/ipx/ipx_route.c b/net/ipx/ipx_route.c index e16c11423527..30f4519b092f 100644 --- a/net/ipx/ipx_route.c +++ b/net/ipx/ipx_route.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/list.h> | 10 | #include <linux/list.h> |
11 | #include <linux/route.h> | 11 | #include <linux/route.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
13 | 14 | ||
14 | #include <net/ipx.h> | 15 | #include <net/ipx.h> |
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index 10093aab6173..2a4efcea3423 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/smp_lock.h> | 48 | #include <linux/smp_lock.h> |
49 | #include <linux/socket.h> | 49 | #include <linux/socket.h> |
50 | #include <linux/sockios.h> | 50 | #include <linux/sockios.h> |
51 | #include <linux/slab.h> | ||
51 | #include <linux/init.h> | 52 | #include <linux/init.h> |
52 | #include <linux/net.h> | 53 | #include <linux/net.h> |
53 | #include <linux/irda.h> | 54 | #include <linux/irda.h> |
diff --git a/net/irda/discovery.c b/net/irda/discovery.c index a6f99b5a1499..c1c8ae939126 100644 --- a/net/irda/discovery.c +++ b/net/irda/discovery.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/socket.h> | 34 | #include <linux/socket.h> |
35 | #include <linux/fs.h> | 35 | #include <linux/fs.h> |
36 | #include <linux/seq_file.h> | 36 | #include <linux/seq_file.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include <net/irda/irda.h> | 39 | #include <net/irda/irda.h> |
39 | #include <net/irda/irlmp.h> | 40 | #include <net/irda/irlmp.h> |
diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c index 018c92941aba..e97082017f4f 100644 --- a/net/irda/ircomm/ircomm_core.c +++ b/net/irda/ircomm/ircomm_core.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/proc_fs.h> | 33 | #include <linux/proc_fs.h> |
34 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <net/irda/irda.h> | 38 | #include <net/irda/irda.h> |
38 | #include <net/irda/irmod.h> | 39 | #include <net/irda/irmod.h> |
diff --git a/net/irda/ircomm/ircomm_lmp.c b/net/irda/ircomm/ircomm_lmp.c index 7ba96618660e..08fb54dc8c41 100644 --- a/net/irda/ircomm/ircomm_lmp.c +++ b/net/irda/ircomm/ircomm_lmp.c | |||
@@ -31,6 +31,7 @@ | |||
31 | ********************************************************************/ | 31 | ********************************************************************/ |
32 | 32 | ||
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | #include <linux/gfp.h> | ||
34 | 35 | ||
35 | #include <net/irda/irda.h> | 36 | #include <net/irda/irda.h> |
36 | #include <net/irda/irlmp.h> | 37 | #include <net/irda/irlmp.h> |
diff --git a/net/irda/ircomm/ircomm_param.c b/net/irda/ircomm/ircomm_param.c index 0804532d970f..8b915f3ac3b9 100644 --- a/net/irda/ircomm/ircomm_param.c +++ b/net/irda/ircomm/ircomm_param.c | |||
@@ -28,6 +28,7 @@ | |||
28 | * | 28 | * |
29 | ********************************************************************/ | 29 | ********************************************************************/ |
30 | 30 | ||
31 | #include <linux/gfp.h> | ||
31 | #include <linux/workqueue.h> | 32 | #include <linux/workqueue.h> |
32 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
33 | 34 | ||
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index 8b85d774e47f..faa82ca2dfdc 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
34 | #include <linux/module.h> | 34 | #include <linux/module.h> |
35 | #include <linux/fs.h> | 35 | #include <linux/fs.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
37 | #include <linux/seq_file.h> | 38 | #include <linux/seq_file.h> |
38 | #include <linux/termios.h> | 39 | #include <linux/termios.h> |
diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c index bf92e1473447..25cc2e695158 100644 --- a/net/irda/irda_device.c +++ b/net/irda/irda_device.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/tty.h> | 41 | #include <linux/tty.h> |
42 | #include <linux/kmod.h> | 42 | #include <linux/kmod.h> |
43 | #include <linux/spinlock.h> | 43 | #include <linux/spinlock.h> |
44 | #include <linux/slab.h> | ||
44 | 45 | ||
45 | #include <asm/ioctls.h> | 46 | #include <asm/ioctls.h> |
46 | #include <asm/uaccess.h> | 47 | #include <asm/uaccess.h> |
diff --git a/net/irda/iriap.c b/net/irda/iriap.c index 294e34d3517c..79a1e5a23e10 100644 --- a/net/irda/iriap.c +++ b/net/irda/iriap.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/string.h> | 31 | #include <linux/string.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/seq_file.h> | 33 | #include <linux/seq_file.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include <asm/byteorder.h> | 36 | #include <asm/byteorder.h> |
36 | #include <asm/unaligned.h> | 37 | #include <asm/unaligned.h> |
diff --git a/net/irda/iriap_event.c b/net/irda/iriap_event.c index a301cbd93785..703774e29e32 100644 --- a/net/irda/iriap_event.c +++ b/net/irda/iriap_event.c | |||
@@ -24,6 +24,8 @@ | |||
24 | * | 24 | * |
25 | ********************************************************************/ | 25 | ********************************************************************/ |
26 | 26 | ||
27 | #include <linux/slab.h> | ||
28 | |||
27 | #include <net/irda/irda.h> | 29 | #include <net/irda/irda.h> |
28 | #include <net/irda/irlmp.h> | 30 | #include <net/irda/irlmp.h> |
29 | #include <net/irda/iriap.h> | 31 | #include <net/irda/iriap.h> |
diff --git a/net/irda/irias_object.c b/net/irda/irias_object.c index 99ebb96f1386..f07ed9fd5792 100644 --- a/net/irda/irias_object.c +++ b/net/irda/irias_object.c | |||
@@ -22,6 +22,7 @@ | |||
22 | * | 22 | * |
23 | ********************************************************************/ | 23 | ********************************************************************/ |
24 | 24 | ||
25 | #include <linux/slab.h> | ||
25 | #include <linux/string.h> | 26 | #include <linux/string.h> |
26 | #include <linux/socket.h> | 27 | #include <linux/socket.h> |
27 | #include <linux/module.h> | 28 | #include <linux/module.h> |
diff --git a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c index 42f7d960d055..7ed3af957935 100644 --- a/net/irda/irlan/irlan_client.c +++ b/net/irda/irlan/irlan_client.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/string.h> | 30 | #include <linux/string.h> |
31 | #include <linux/slab.h> | ||
31 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
32 | #include <linux/init.h> | 33 | #include <linux/init.h> |
33 | #include <linux/netdevice.h> | 34 | #include <linux/netdevice.h> |
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c index e486dc89ea59..a788f9e9427d 100644 --- a/net/irda/irlan/irlan_common.c +++ b/net/irda/irlan/irlan_common.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/string.h> | 29 | #include <linux/string.h> |
30 | #include <linux/gfp.h> | ||
30 | #include <linux/init.h> | 31 | #include <linux/init.h> |
31 | #include <linux/errno.h> | 32 | #include <linux/errno.h> |
32 | #include <linux/proc_fs.h> | 33 | #include <linux/proc_fs.h> |
diff --git a/net/irda/irlan/irlan_provider.c b/net/irda/irlan/irlan_provider.c index 3f81f81b2dfa..5cf5e6c872bb 100644 --- a/net/irda/irlan/irlan_provider.c +++ b/net/irda/irlan/irlan_provider.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
35 | #include <linux/random.h> | 35 | #include <linux/random.h> |
36 | #include <linux/bitops.h> | 36 | #include <linux/bitops.h> |
37 | #include <linux/slab.h> | ||
37 | 38 | ||
38 | #include <asm/system.h> | 39 | #include <asm/system.h> |
39 | #include <asm/byteorder.h> | 40 | #include <asm/byteorder.h> |
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c index 94a9884d7146..d434c8880745 100644 --- a/net/irda/irlap_event.c +++ b/net/irda/irlap_event.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | #include <linux/skbuff.h> | 31 | #include <linux/skbuff.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <net/irda/irda.h> | 34 | #include <net/irda/irda.h> |
34 | #include <net/irda/irlap_event.h> | 35 | #include <net/irda/irlap_event.h> |
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c index 7af2e74deda8..688222cbf55b 100644 --- a/net/irda/irlap_frame.c +++ b/net/irda/irlap_frame.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/if_ether.h> | 29 | #include <linux/if_ether.h> |
30 | #include <linux/netdevice.h> | 30 | #include <linux/netdevice.h> |
31 | #include <linux/irda.h> | 31 | #include <linux/irda.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <net/pkt_sched.h> | 34 | #include <net/pkt_sched.h> |
34 | #include <net/sock.h> | 35 | #include <net/sock.h> |
diff --git a/net/irda/irnet/irnet_irda.c b/net/irda/irnet/irnet_irda.c index b26dee784aba..df18ab4b6c5e 100644 --- a/net/irda/irnet/irnet_irda.c +++ b/net/irda/irnet/irnet_irda.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include "irnet_irda.h" /* Private header */ | 11 | #include "irnet_irda.h" /* Private header */ |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
14 | #include <linux/slab.h> | ||
14 | #include <asm/unaligned.h> | 15 | #include <asm/unaligned.h> |
15 | 16 | ||
16 | /* | 17 | /* |
diff --git a/net/irda/irnet/irnet_ppp.c b/net/irda/irnet/irnet_ppp.c index 6b3602de359a..6a1a202710c5 100644 --- a/net/irda/irnet/irnet_ppp.c +++ b/net/irda/irnet/irnet_ppp.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/smp_lock.h> | 18 | #include <linux/smp_lock.h> |
18 | #include "irnet_ppp.h" /* Private header */ | 19 | #include "irnet_ppp.h" /* Private header */ |
19 | /* Please put other headers in irnet.h - Thanks */ | 20 | /* Please put other headers in irnet.h - Thanks */ |
diff --git a/net/irda/irnetlink.c b/net/irda/irnetlink.c index 69b5b75f5431..6c7c4b92e4f8 100644 --- a/net/irda/irnetlink.c +++ b/net/irda/irnetlink.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/socket.h> | 16 | #include <linux/socket.h> |
17 | #include <linux/irda.h> | 17 | #include <linux/irda.h> |
18 | #include <linux/gfp.h> | ||
18 | #include <net/net_namespace.h> | 19 | #include <net/net_namespace.h> |
19 | #include <net/sock.h> | 20 | #include <net/sock.h> |
20 | #include <net/irda/irda.h> | 21 | #include <net/irda/irda.h> |
diff --git a/net/irda/irqueue.c b/net/irda/irqueue.c index ba01938becb5..849aaf0dabb5 100644 --- a/net/irda/irqueue.c +++ b/net/irda/irqueue.c | |||
@@ -192,6 +192,7 @@ | |||
192 | * Jean II | 192 | * Jean II |
193 | */ | 193 | */ |
194 | #include <linux/module.h> | 194 | #include <linux/module.h> |
195 | #include <linux/slab.h> | ||
195 | 196 | ||
196 | #include <net/irda/irda.h> | 197 | #include <net/irda/irda.h> |
197 | #include <net/irda/irqueue.h> | 198 | #include <net/irda/irqueue.h> |
diff --git a/net/irda/irttp.c b/net/irda/irttp.c index 9cb79f95bf63..47db1d8a0d92 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/seq_file.h> | 30 | #include <linux/seq_file.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | #include <asm/byteorder.h> | 33 | #include <asm/byteorder.h> |
33 | #include <asm/unaligned.h> | 34 | #include <asm/unaligned.h> |
diff --git a/net/key/af_key.c b/net/key/af_key.c index 344145f23c34..ba9a3fcc2fed 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/in6.h> | 26 | #include <linux/in6.h> |
27 | #include <linux/proc_fs.h> | 27 | #include <linux/proc_fs.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/slab.h> | ||
29 | #include <net/net_namespace.h> | 30 | #include <net/net_namespace.h> |
30 | #include <net/netns/generic.h> | 31 | #include <net/netns/generic.h> |
31 | #include <net/xfrm.h> | 32 | #include <net/xfrm.h> |
diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c index bda96d18fd98..d5d8d555c410 100644 --- a/net/lapb/lapb_iface.c +++ b/net/lapb/lapb_iface.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/inet.h> | 29 | #include <linux/inet.h> |
30 | #include <linux/if_arp.h> | 30 | #include <linux/if_arp.h> |
31 | #include <linux/skbuff.h> | 31 | #include <linux/skbuff.h> |
32 | #include <linux/slab.h> | ||
32 | #include <net/sock.h> | 33 | #include <net/sock.h> |
33 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
34 | #include <asm/system.h> | 35 | #include <asm/system.h> |
diff --git a/net/lapb/lapb_in.c b/net/lapb/lapb_in.c index 6762e7c751eb..21904a002449 100644 --- a/net/lapb/lapb_in.c +++ b/net/lapb/lapb_in.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/inet.h> | 27 | #include <linux/inet.h> |
28 | #include <linux/netdevice.h> | 28 | #include <linux/netdevice.h> |
29 | #include <linux/skbuff.h> | 29 | #include <linux/skbuff.h> |
30 | #include <linux/slab.h> | ||
30 | #include <net/sock.h> | 31 | #include <net/sock.h> |
31 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
32 | #include <asm/system.h> | 33 | #include <asm/system.h> |
diff --git a/net/lapb/lapb_out.c b/net/lapb/lapb_out.c index 339cc5f2684f..c75a79540f9f 100644 --- a/net/lapb/lapb_out.c +++ b/net/lapb/lapb_out.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/net.h> | 25 | #include <linux/net.h> |
26 | #include <linux/inet.h> | 26 | #include <linux/inet.h> |
27 | #include <linux/skbuff.h> | 27 | #include <linux/skbuff.h> |
28 | #include <linux/slab.h> | ||
28 | #include <net/sock.h> | 29 | #include <net/sock.h> |
29 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
30 | #include <asm/system.h> | 31 | #include <asm/system.h> |
diff --git a/net/lapb/lapb_subr.c b/net/lapb/lapb_subr.c index b827f47ac133..43a2a7fb327b 100644 --- a/net/lapb/lapb_subr.c +++ b/net/lapb/lapb_subr.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/net.h> | 24 | #include <linux/net.h> |
25 | #include <linux/inet.h> | 25 | #include <linux/inet.h> |
26 | #include <linux/skbuff.h> | 26 | #include <linux/skbuff.h> |
27 | #include <linux/slab.h> | ||
27 | #include <net/sock.h> | 28 | #include <net/sock.h> |
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
29 | #include <asm/system.h> | 30 | #include <asm/system.h> |
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index e35d907fba2c..2db6a9f75913 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/rtnetlink.h> | 26 | #include <linux/rtnetlink.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/slab.h> | ||
28 | #include <net/llc.h> | 29 | #include <net/llc.h> |
29 | #include <net/llc_sap.h> | 30 | #include <net/llc_sap.h> |
30 | #include <net/llc_pdu.h> | 31 | #include <net/llc_pdu.h> |
diff --git a/net/llc/llc_c_ac.c b/net/llc/llc_c_ac.c index 86d6985b9d49..ea225bd2672c 100644 --- a/net/llc/llc_c_ac.c +++ b/net/llc/llc_c_ac.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * See the GNU General Public License for more details. | 18 | * See the GNU General Public License for more details. |
19 | */ | 19 | */ |
20 | #include <linux/netdevice.h> | 20 | #include <linux/netdevice.h> |
21 | #include <linux/slab.h> | ||
21 | #include <net/llc_conn.h> | 22 | #include <net/llc_conn.h> |
22 | #include <net/llc_sap.h> | 23 | #include <net/llc_sap.h> |
23 | #include <net/sock.h> | 24 | #include <net/sock.h> |
diff --git a/net/llc/llc_conn.c b/net/llc/llc_conn.c index a12144da7974..ba137a6a224d 100644 --- a/net/llc/llc_conn.c +++ b/net/llc/llc_conn.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/slab.h> | ||
16 | #include <net/llc_sap.h> | 17 | #include <net/llc_sap.h> |
17 | #include <net/llc_conn.h> | 18 | #include <net/llc_conn.h> |
18 | #include <net/sock.h> | 19 | #include <net/sock.h> |
diff --git a/net/llc/llc_if.c b/net/llc/llc_if.c index a89917130a7b..25c31c0a3fdb 100644 --- a/net/llc/llc_if.c +++ b/net/llc/llc_if.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * | 11 | * |
12 | * See the GNU General Public License for more details. | 12 | * See the GNU General Public License for more details. |
13 | */ | 13 | */ |
14 | #include <linux/gfp.h> | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/netdevice.h> | 17 | #include <linux/netdevice.h> |
diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c index 57ad974e4d94..f99687439139 100644 --- a/net/llc/llc_input.c +++ b/net/llc/llc_input.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * See the GNU General Public License for more details. | 12 | * See the GNU General Public License for more details. |
13 | */ | 13 | */ |
14 | #include <linux/netdevice.h> | 14 | #include <linux/netdevice.h> |
15 | #include <linux/slab.h> | ||
15 | #include <net/net_namespace.h> | 16 | #include <net/net_namespace.h> |
16 | #include <net/llc.h> | 17 | #include <net/llc.h> |
17 | #include <net/llc_pdu.h> | 18 | #include <net/llc_pdu.h> |
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c index ad6e6e1cf22f..a432f0ec051c 100644 --- a/net/llc/llc_sap.c +++ b/net/llc/llc_sap.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <net/sock.h> | 23 | #include <net/sock.h> |
24 | #include <net/tcp_states.h> | 24 | #include <net/tcp_states.h> |
25 | #include <linux/llc.h> | 25 | #include <linux/llc.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | static int llc_mac_header_len(unsigned short devtype) | 28 | static int llc_mac_header_len(unsigned short devtype) |
28 | { | 29 | { |
diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c index 83da13339490..e4dae0244d76 100644 --- a/net/llc/llc_station.c +++ b/net/llc/llc_station.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | ||
16 | #include <net/llc.h> | 17 | #include <net/llc.h> |
17 | #include <net/llc_sap.h> | 18 | #include <net/llc_sap.h> |
18 | #include <net/llc_conn.h> | 19 | #include <net/llc_conn.h> |
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index a978e666ed6f..f9516a27e233 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/ieee80211.h> | 16 | #include <linux/ieee80211.h> |
17 | #include <linux/slab.h> | ||
17 | #include <net/mac80211.h> | 18 | #include <net/mac80211.h> |
18 | #include "ieee80211_i.h" | 19 | #include "ieee80211_i.h" |
19 | #include "driver-ops.h" | 20 | #include "driver-ops.h" |
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index 5538e1b4a697..96d25348aa59 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/ieee80211.h> | 16 | #include <linux/ieee80211.h> |
17 | #include <linux/slab.h> | ||
17 | #include <net/mac80211.h> | 18 | #include <net/mac80211.h> |
18 | #include "ieee80211_i.h" | 19 | #include "ieee80211_i.h" |
19 | #include "driver-ops.h" | 20 | #include "driver-ops.h" |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index c8f520529eec..c41aaba839fa 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/ieee80211.h> | 9 | #include <linux/ieee80211.h> |
10 | #include <linux/nl80211.h> | 10 | #include <linux/nl80211.h> |
11 | #include <linux/rtnetlink.h> | 11 | #include <linux/rtnetlink.h> |
12 | #include <linux/slab.h> | ||
12 | #include <net/net_namespace.h> | 13 | #include <net/net_namespace.h> |
13 | #include <linux/rcupdate.h> | 14 | #include <linux/rcupdate.h> |
14 | #include <net/cfg80211.h> | 15 | #include <net/cfg80211.h> |
diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c index d12e743cb4e1..97c9e46e859e 100644 --- a/net/mac80211/debugfs_key.c +++ b/net/mac80211/debugfs_key.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/kobject.h> | 11 | #include <linux/kobject.h> |
12 | #include <linux/slab.h> | ||
12 | #include "ieee80211_i.h" | 13 | #include "ieee80211_i.h" |
13 | #include "key.h" | 14 | #include "key.h" |
14 | #include "debugfs.h" | 15 | #include "debugfs.h" |
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index b4ddb2f83914..83d4289d954b 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/netdevice.h> | 14 | #include <linux/netdevice.h> |
15 | #include <linux/rtnetlink.h> | 15 | #include <linux/rtnetlink.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/notifier.h> | 17 | #include <linux/notifier.h> |
17 | #include <net/mac80211.h> | 18 | #include <net/mac80211.h> |
18 | #include <net/cfg80211.h> | 19 | #include <net/cfg80211.h> |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 01974c2510a8..e6f3b0c7a71f 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/if_ether.h> | 17 | #include <linux/if_ether.h> |
17 | #include <linux/skbuff.h> | 18 | #include <linux/skbuff.h> |
18 | #include <linux/if_arp.h> | 19 | #include <linux/if_arp.h> |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 00f3a93c6b04..50deb017fd6e 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | #include <linux/slab.h> | ||
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
14 | #include <linux/if_arp.h> | 15 | #include <linux/if_arp.h> |
15 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 8160d9c5372e..e8f6e3b252d8 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/list.h> | 14 | #include <linux/list.h> |
15 | #include <linux/rcupdate.h> | 15 | #include <linux/rcupdate.h> |
16 | #include <linux/rtnetlink.h> | 16 | #include <linux/rtnetlink.h> |
17 | #include <linux/slab.h> | ||
17 | #include <net/mac80211.h> | 18 | #include <net/mac80211.h> |
18 | #include "ieee80211_i.h" | 19 | #include "ieee80211_i.h" |
19 | #include "driver-ops.h" | 20 | #include "driver-ops.h" |
diff --git a/net/mac80211/led.c b/net/mac80211/led.c index 162a643f16b6..063aad944246 100644 --- a/net/mac80211/led.c +++ b/net/mac80211/led.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | /* just for IFNAMSIZ */ | 9 | /* just for IFNAMSIZ */ |
10 | #include <linux/if.h> | 10 | #include <linux/if.h> |
11 | #include <linux/slab.h> | ||
11 | #include "led.h" | 12 | #include "led.h" |
12 | 13 | ||
13 | void ieee80211_led_rx(struct ieee80211_local *local) | 14 | void ieee80211_led_rx(struct ieee80211_local *local) |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 0b82cd2f781e..50c1b1ada884 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -225,11 +225,11 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | |||
225 | switch (sdata->vif.type) { | 225 | switch (sdata->vif.type) { |
226 | case NL80211_IFTYPE_AP: | 226 | case NL80211_IFTYPE_AP: |
227 | sdata->vif.bss_conf.enable_beacon = | 227 | sdata->vif.bss_conf.enable_beacon = |
228 | !!rcu_dereference(sdata->u.ap.beacon); | 228 | !!sdata->u.ap.beacon; |
229 | break; | 229 | break; |
230 | case NL80211_IFTYPE_ADHOC: | 230 | case NL80211_IFTYPE_ADHOC: |
231 | sdata->vif.bss_conf.enable_beacon = | 231 | sdata->vif.bss_conf.enable_beacon = |
232 | !!rcu_dereference(sdata->u.ibss.presp); | 232 | !!sdata->u.ibss.presp; |
233 | break; | 233 | break; |
234 | case NL80211_IFTYPE_MESH_POINT: | 234 | case NL80211_IFTYPE_MESH_POINT: |
235 | sdata->vif.bss_conf.enable_beacon = true; | 235 | sdata->vif.bss_conf.enable_beacon = true; |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 61080c5fad50..859ee5f3d941 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/slab.h> | ||
11 | #include <asm/unaligned.h> | 12 | #include <asm/unaligned.h> |
12 | #include "ieee80211_i.h" | 13 | #include "ieee80211_i.h" |
13 | #include "mesh.h" | 14 | #include "mesh.h" |
@@ -749,9 +750,6 @@ ieee80211_mesh_rx_mgmt(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) | |||
749 | 750 | ||
750 | switch (fc & IEEE80211_FCTL_STYPE) { | 751 | switch (fc & IEEE80211_FCTL_STYPE) { |
751 | case IEEE80211_STYPE_ACTION: | 752 | case IEEE80211_STYPE_ACTION: |
752 | if (skb->len < IEEE80211_MIN_ACTION_SIZE) | ||
753 | return RX_DROP_MONITOR; | ||
754 | /* fall through */ | ||
755 | case IEEE80211_STYPE_PROBE_RESP: | 753 | case IEEE80211_STYPE_PROBE_RESP: |
756 | case IEEE80211_STYPE_BEACON: | 754 | case IEEE80211_STYPE_BEACON: |
757 | skb_queue_tail(&ifmsh->skb_queue, skb); | 755 | skb_queue_tail(&ifmsh->skb_queue, skb); |
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index ccff6133e19a..fefc45c4b4e8 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/slab.h> | ||
10 | #include "mesh.h" | 11 | #include "mesh.h" |
11 | 12 | ||
12 | #ifdef CONFIG_MAC80211_VERBOSE_MHWMP_DEBUG | 13 | #ifdef CONFIG_MAC80211_VERBOSE_MHWMP_DEBUG |
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 2312efe04c62..181ffd6efd81 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/etherdevice.h> | 10 | #include <linux/etherdevice.h> |
11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
12 | #include <linux/random.h> | 12 | #include <linux/random.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
14 | #include <linux/string.h> | 15 | #include <linux/string.h> |
15 | #include <net/mac80211.h> | 16 | #include <net/mac80211.h> |
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 1a29c4a8139e..7b7080e2b49f 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * it under the terms of the GNU General Public License version 2 as | 6 | * it under the terms of the GNU General Public License version 2 as |
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | */ | 8 | */ |
9 | #include <linux/gfp.h> | ||
9 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
10 | #include <linux/random.h> | 11 | #include <linux/random.h> |
11 | #include "ieee80211_i.h" | 12 | #include "ieee80211_i.h" |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 34e0650e9ef8..71ff42a0465b 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/rtnetlink.h> | 19 | #include <linux/rtnetlink.h> |
20 | #include <linux/pm_qos_params.h> | 20 | #include <linux/pm_qos_params.h> |
21 | #include <linux/crc32.h> | 21 | #include <linux/crc32.h> |
22 | #include <linux/slab.h> | ||
22 | #include <net/mac80211.h> | 23 | #include <net/mac80211.h> |
23 | #include <asm/unaligned.h> | 24 | #include <asm/unaligned.h> |
24 | 25 | ||
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 0b299d236fa1..6d0bd198af19 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/rtnetlink.h> | 12 | #include <linux/rtnetlink.h> |
13 | #include <linux/slab.h> | ||
13 | #include "rate.h" | 14 | #include "rate.h" |
14 | #include "ieee80211_i.h" | 15 | #include "ieee80211_i.h" |
15 | #include "debugfs.h" | 16 | #include "debugfs.h" |
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c index 4926d929fd9f..f65ce6dcc8e2 100644 --- a/net/mac80211/rc80211_minstrel.c +++ b/net/mac80211/rc80211_minstrel.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/debugfs.h> | 50 | #include <linux/debugfs.h> |
51 | #include <linux/random.h> | 51 | #include <linux/random.h> |
52 | #include <linux/ieee80211.h> | 52 | #include <linux/ieee80211.h> |
53 | #include <linux/slab.h> | ||
53 | #include <net/mac80211.h> | 54 | #include <net/mac80211.h> |
54 | #include "rate.h" | 55 | #include "rate.h" |
55 | #include "rc80211_minstrel.h" | 56 | #include "rc80211_minstrel.h" |
diff --git a/net/mac80211/rc80211_minstrel_debugfs.c b/net/mac80211/rc80211_minstrel_debugfs.c index 56d0f24957d9..241e76f3fdf2 100644 --- a/net/mac80211/rc80211_minstrel_debugfs.c +++ b/net/mac80211/rc80211_minstrel_debugfs.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/skbuff.h> | 49 | #include <linux/skbuff.h> |
50 | #include <linux/debugfs.h> | 50 | #include <linux/debugfs.h> |
51 | #include <linux/ieee80211.h> | 51 | #include <linux/ieee80211.h> |
52 | #include <linux/slab.h> | ||
52 | #include <net/mac80211.h> | 53 | #include <net/mac80211.h> |
53 | #include "rc80211_minstrel.h" | 54 | #include "rc80211_minstrel.h" |
54 | 55 | ||
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c index 2652a374974e..aeda65466f3e 100644 --- a/net/mac80211/rc80211_pid_algo.c +++ b/net/mac80211/rc80211_pid_algo.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
15 | #include <linux/debugfs.h> | 15 | #include <linux/debugfs.h> |
16 | #include <linux/slab.h> | ||
16 | #include <net/mac80211.h> | 17 | #include <net/mac80211.h> |
17 | #include "rate.h" | 18 | #include "rate.h" |
18 | #include "mesh.h" | 19 | #include "mesh.h" |
diff --git a/net/mac80211/rc80211_pid_debugfs.c b/net/mac80211/rc80211_pid_debugfs.c index 45667054a5f3..47438b4a9af5 100644 --- a/net/mac80211/rc80211_pid_debugfs.c +++ b/net/mac80211/rc80211_pid_debugfs.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include <net/mac80211.h> | 17 | #include <net/mac80211.h> |
17 | #include "rate.h" | 18 | #include "rate.h" |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 1da57c8e849a..e0c944fb6fc9 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/jiffies.h> | 12 | #include <linux/jiffies.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
14 | #include <linux/skbuff.h> | 15 | #include <linux/skbuff.h> |
15 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
@@ -1964,6 +1965,11 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
1964 | goto handled; | 1965 | goto handled; |
1965 | } | 1966 | } |
1966 | break; | 1967 | break; |
1968 | case MESH_PLINK_CATEGORY: | ||
1969 | case MESH_PATH_SEL_CATEGORY: | ||
1970 | if (ieee80211_vif_is_mesh(&sdata->vif)) | ||
1971 | return ieee80211_mesh_rx_mgmt(sdata, rx->skb); | ||
1972 | break; | ||
1967 | } | 1973 | } |
1968 | 1974 | ||
1969 | /* | 1975 | /* |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 75a85978c3b3..1ce4ce8af80f 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/rtnetlink.h> | 16 | #include <linux/rtnetlink.h> |
17 | #include <linux/pm_qos_params.h> | 17 | #include <linux/pm_qos_params.h> |
18 | #include <net/sch_generic.h> | 18 | #include <net/sch_generic.h> |
19 | #include <linux/slab.h> | ||
19 | #include <net/mac80211.h> | 20 | #include <net/mac80211.h> |
20 | 21 | ||
21 | #include "ieee80211_i.h" | 22 | #include "ieee80211_i.h" |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 56422d894351..fb12cec4d333 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -93,12 +93,18 @@ struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata, | |||
93 | struct ieee80211_local *local = sdata->local; | 93 | struct ieee80211_local *local = sdata->local; |
94 | struct sta_info *sta; | 94 | struct sta_info *sta; |
95 | 95 | ||
96 | sta = rcu_dereference(local->sta_hash[STA_HASH(addr)]); | 96 | sta = rcu_dereference_check(local->sta_hash[STA_HASH(addr)], |
97 | rcu_read_lock_held() || | ||
98 | lockdep_is_held(&local->sta_lock) || | ||
99 | lockdep_is_held(&local->sta_mtx)); | ||
97 | while (sta) { | 100 | while (sta) { |
98 | if (sta->sdata == sdata && | 101 | if (sta->sdata == sdata && |
99 | memcmp(sta->sta.addr, addr, ETH_ALEN) == 0) | 102 | memcmp(sta->sta.addr, addr, ETH_ALEN) == 0) |
100 | break; | 103 | break; |
101 | sta = rcu_dereference(sta->hnext); | 104 | sta = rcu_dereference_check(sta->hnext, |
105 | rcu_read_lock_held() || | ||
106 | lockdep_is_held(&local->sta_lock) || | ||
107 | lockdep_is_held(&local->sta_mtx)); | ||
102 | } | 108 | } |
103 | return sta; | 109 | return sta; |
104 | } | 110 | } |
@@ -113,13 +119,19 @@ struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata, | |||
113 | struct ieee80211_local *local = sdata->local; | 119 | struct ieee80211_local *local = sdata->local; |
114 | struct sta_info *sta; | 120 | struct sta_info *sta; |
115 | 121 | ||
116 | sta = rcu_dereference(local->sta_hash[STA_HASH(addr)]); | 122 | sta = rcu_dereference_check(local->sta_hash[STA_HASH(addr)], |
123 | rcu_read_lock_held() || | ||
124 | lockdep_is_held(&local->sta_lock) || | ||
125 | lockdep_is_held(&local->sta_mtx)); | ||
117 | while (sta) { | 126 | while (sta) { |
118 | if ((sta->sdata == sdata || | 127 | if ((sta->sdata == sdata || |
119 | sta->sdata->bss == sdata->bss) && | 128 | sta->sdata->bss == sdata->bss) && |
120 | memcmp(sta->sta.addr, addr, ETH_ALEN) == 0) | 129 | memcmp(sta->sta.addr, addr, ETH_ALEN) == 0) |
121 | break; | 130 | break; |
122 | sta = rcu_dereference(sta->hnext); | 131 | sta = rcu_dereference_check(sta->hnext, |
132 | rcu_read_lock_held() || | ||
133 | lockdep_is_held(&local->sta_lock) || | ||
134 | lockdep_is_held(&local->sta_mtx)); | ||
123 | } | 135 | } |
124 | return sta; | 136 | return sta; |
125 | } | 137 | } |
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c index 5d745f2d7236..5f3a4113bda1 100644 --- a/net/mac80211/wep.c +++ b/net/mac80211/wep.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
19 | #include <linux/scatterlist.h> | 19 | #include <linux/scatterlist.h> |
20 | #include <linux/slab.h> | ||
20 | #include <asm/unaligned.h> | 21 | #include <asm/unaligned.h> |
21 | 22 | ||
22 | #include <net/mac80211.h> | 23 | #include <net/mac80211.h> |
diff --git a/net/mac80211/work.c b/net/mac80211/work.c index 1e1ea3007b06..15e1ba931b87 100644 --- a/net/mac80211/work.c +++ b/net/mac80211/work.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/if_arp.h> | 19 | #include <linux/if_arp.h> |
20 | #include <linux/etherdevice.h> | 20 | #include <linux/etherdevice.h> |
21 | #include <linux/crc32.h> | 21 | #include <linux/crc32.h> |
22 | #include <linux/slab.h> | ||
22 | #include <net/mac80211.h> | 23 | #include <net/mac80211.h> |
23 | #include <asm/unaligned.h> | 24 | #include <asm/unaligned.h> |
24 | 25 | ||
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c index f4971cd45c64..0adbcc941ac9 100644 --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c | |||
@@ -9,10 +9,10 @@ | |||
9 | 9 | ||
10 | #include <linux/netdevice.h> | 10 | #include <linux/netdevice.h> |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/slab.h> | ||
13 | #include <linux/skbuff.h> | 12 | #include <linux/skbuff.h> |
14 | #include <linux/compiler.h> | 13 | #include <linux/compiler.h> |
15 | #include <linux/ieee80211.h> | 14 | #include <linux/ieee80211.h> |
15 | #include <linux/gfp.h> | ||
16 | #include <asm/unaligned.h> | 16 | #include <asm/unaligned.h> |
17 | #include <net/mac80211.h> | 17 | #include <net/mac80211.h> |
18 | 18 | ||
diff --git a/net/netfilter/core.c b/net/netfilter/core.c index 60ec4e4badaa..78b505d33bfb 100644 --- a/net/netfilter/core.c +++ b/net/netfilter/core.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/inetdevice.h> | 19 | #include <linux/inetdevice.h> |
20 | #include <linux/proc_fs.h> | 20 | #include <linux/proc_fs.h> |
21 | #include <linux/mutex.h> | 21 | #include <linux/mutex.h> |
22 | #include <linux/slab.h> | ||
22 | #include <net/net_namespace.h> | 23 | #include <net/net_namespace.h> |
23 | #include <net/sock.h> | 24 | #include <net/sock.h> |
24 | 25 | ||
diff --git a/net/netfilter/ipvs/ip_vs_app.c b/net/netfilter/ipvs/ip_vs_app.c index 3c7e42735b60..1cb0e834f8ff 100644 --- a/net/netfilter/ipvs/ip_vs_app.c +++ b/net/netfilter/ipvs/ip_vs_app.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/in.h> | 27 | #include <linux/in.h> |
28 | #include <linux/ip.h> | 28 | #include <linux/ip.h> |
29 | #include <linux/netfilter.h> | 29 | #include <linux/netfilter.h> |
30 | #include <linux/slab.h> | ||
30 | #include <net/net_namespace.h> | 31 | #include <net/net_namespace.h> |
31 | #include <net/protocol.h> | 32 | #include <net/protocol.h> |
32 | #include <net/tcp.h> | 33 | #include <net/tcp.h> |
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index 60bb41a8d8d4..d8f7e8ef67b4 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/vmalloc.h> | 33 | #include <linux/vmalloc.h> |
34 | #include <linux/proc_fs.h> /* for proc_net_* */ | 34 | #include <linux/proc_fs.h> /* for proc_net_* */ |
35 | #include <linux/slab.h> | ||
35 | #include <linux/seq_file.h> | 36 | #include <linux/seq_file.h> |
36 | #include <linux/jhash.h> | 37 | #include <linux/jhash.h> |
37 | #include <linux/random.h> | 38 | #include <linux/random.h> |
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c index 44590887a92c..1cd6e3fd058b 100644 --- a/net/netfilter/ipvs/ip_vs_core.c +++ b/net/netfilter/ipvs/ip_vs_core.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/tcp.h> | 33 | #include <linux/tcp.h> |
34 | #include <linux/sctp.h> | 34 | #include <linux/sctp.h> |
35 | #include <linux/icmp.h> | 35 | #include <linux/icmp.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include <net/ip.h> | 38 | #include <net/ip.h> |
38 | #include <net/tcp.h> | 39 | #include <net/tcp.h> |
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 7ee9c3426f44..36dc1d88c2fa 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/workqueue.h> | 31 | #include <linux/workqueue.h> |
32 | #include <linux/swap.h> | 32 | #include <linux/swap.h> |
33 | #include <linux/seq_file.h> | 33 | #include <linux/seq_file.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include <linux/netfilter.h> | 36 | #include <linux/netfilter.h> |
36 | #include <linux/netfilter_ipv4.h> | 37 | #include <linux/netfilter_ipv4.h> |
diff --git a/net/netfilter/ipvs/ip_vs_dh.c b/net/netfilter/ipvs/ip_vs_dh.c index fe3e18834b91..95fd0d14200b 100644 --- a/net/netfilter/ipvs/ip_vs_dh.c +++ b/net/netfilter/ipvs/ip_vs_dh.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 39 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
40 | 40 | ||
41 | #include <linux/ip.h> | 41 | #include <linux/ip.h> |
42 | #include <linux/slab.h> | ||
42 | #include <linux/module.h> | 43 | #include <linux/module.h> |
43 | #include <linux/kernel.h> | 44 | #include <linux/kernel.h> |
44 | #include <linux/skbuff.h> | 45 | #include <linux/skbuff.h> |
diff --git a/net/netfilter/ipvs/ip_vs_est.c b/net/netfilter/ipvs/ip_vs_est.c index 702b53ca937c..ff28801962e0 100644 --- a/net/netfilter/ipvs/ip_vs_est.c +++ b/net/netfilter/ipvs/ip_vs_est.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/jiffies.h> | 19 | #include <linux/jiffies.h> |
20 | #include <linux/slab.h> | ||
21 | #include <linux/types.h> | 20 | #include <linux/types.h> |
22 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
23 | #include <linux/sysctl.h> | 22 | #include <linux/sysctl.h> |
diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c index 73f38ea98f25..2c7f185dfae4 100644 --- a/net/netfilter/ipvs/ip_vs_ftp.c +++ b/net/netfilter/ipvs/ip_vs_ftp.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/in.h> | 32 | #include <linux/in.h> |
33 | #include <linux/ip.h> | 33 | #include <linux/ip.h> |
34 | #include <linux/netfilter.h> | 34 | #include <linux/netfilter.h> |
35 | #include <linux/gfp.h> | ||
35 | #include <net/protocol.h> | 36 | #include <net/protocol.h> |
36 | #include <net/tcp.h> | 37 | #include <net/tcp.h> |
37 | #include <asm/unaligned.h> | 38 | #include <asm/unaligned.h> |
diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c index 1b9370db2305..94a45213faa6 100644 --- a/net/netfilter/ipvs/ip_vs_lblc.c +++ b/net/netfilter/ipvs/ip_vs_lblc.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 43 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
44 | 44 | ||
45 | #include <linux/ip.h> | 45 | #include <linux/ip.h> |
46 | #include <linux/slab.h> | ||
46 | #include <linux/module.h> | 47 | #include <linux/module.h> |
47 | #include <linux/kernel.h> | 48 | #include <linux/kernel.h> |
48 | #include <linux/skbuff.h> | 49 | #include <linux/skbuff.h> |
diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c index caa58fa1438a..535dc2b419d8 100644 --- a/net/netfilter/ipvs/ip_vs_lblcr.c +++ b/net/netfilter/ipvs/ip_vs_lblcr.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/skbuff.h> | 46 | #include <linux/skbuff.h> |
47 | #include <linux/jiffies.h> | 47 | #include <linux/jiffies.h> |
48 | #include <linux/list.h> | 48 | #include <linux/list.h> |
49 | #include <linux/slab.h> | ||
49 | 50 | ||
50 | /* for sysctl */ | 51 | /* for sysctl */ |
51 | #include <linux/fs.h> | 52 | #include <linux/fs.h> |
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c index 0e584553819d..7fc49f4cf5ad 100644 --- a/net/netfilter/ipvs/ip_vs_proto.c +++ b/net/netfilter/ipvs/ip_vs_proto.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/skbuff.h> | 21 | #include <linux/skbuff.h> |
22 | #include <linux/gfp.h> | ||
22 | #include <linux/in.h> | 23 | #include <linux/in.h> |
23 | #include <linux/ip.h> | 24 | #include <linux/ip.h> |
24 | #include <net/protocol.h> | 25 | #include <net/protocol.h> |
diff --git a/net/netfilter/ipvs/ip_vs_sh.c b/net/netfilter/ipvs/ip_vs_sh.c index 8e6cfd36e6f0..e6cc174fbc06 100644 --- a/net/netfilter/ipvs/ip_vs_sh.c +++ b/net/netfilter/ipvs/ip_vs_sh.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 36 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
37 | 37 | ||
38 | #include <linux/ip.h> | 38 | #include <linux/ip.h> |
39 | #include <linux/slab.h> | ||
39 | #include <linux/module.h> | 40 | #include <linux/module.h> |
40 | #include <linux/kernel.h> | 41 | #include <linux/kernel.h> |
41 | #include <linux/skbuff.h> | 42 | #include <linux/skbuff.h> |
diff --git a/net/netfilter/ipvs/ip_vs_wrr.c b/net/netfilter/ipvs/ip_vs_wrr.c index 3c115fc19784..30db633f88f1 100644 --- a/net/netfilter/ipvs/ip_vs_wrr.c +++ b/net/netfilter/ipvs/ip_vs_wrr.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/net.h> | 27 | #include <linux/net.h> |
27 | #include <linux/gcd.h> | 28 | #include <linux/gcd.h> |
28 | 29 | ||
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c index 223b5018c7dc..e450cd6f4eb5 100644 --- a/net/netfilter/ipvs/ip_vs_xmit.c +++ b/net/netfilter/ipvs/ip_vs_xmit.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 17 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
18 | 18 | ||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/tcp.h> /* for tcphdr */ | 21 | #include <linux/tcp.h> /* for tcphdr */ |
21 | #include <net/ip.h> | 22 | #include <net/ip.h> |
22 | #include <net/tcp.h> /* for csum_tcpudp_magic */ | 23 | #include <net/tcp.h> /* for csum_tcpudp_magic */ |
diff --git a/net/netfilter/nf_conntrack_acct.c b/net/netfilter/nf_conntrack_acct.c index 018f90db511c..ab81b380eae6 100644 --- a/net/netfilter/nf_conntrack_acct.c +++ b/net/netfilter/nf_conntrack_acct.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/netfilter.h> | 11 | #include <linux/netfilter.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
13 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
14 | 15 | ||
diff --git a/net/netfilter/nf_conntrack_amanda.c b/net/netfilter/nf_conntrack_amanda.c index 07d9d8857e5d..372e80f07a81 100644 --- a/net/netfilter/nf_conntrack_amanda.c +++ b/net/netfilter/nf_conntrack_amanda.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/in.h> | 16 | #include <linux/in.h> |
17 | #include <linux/udp.h> | 17 | #include <linux/udp.h> |
18 | #include <linux/netfilter.h> | 18 | #include <linux/netfilter.h> |
19 | #include <linux/gfp.h> | ||
19 | 20 | ||
20 | #include <net/netfilter/nf_conntrack.h> | 21 | #include <net/netfilter/nf_conntrack.h> |
21 | #include <net/netfilter/nf_conntrack_expect.h> | 22 | #include <net/netfilter/nf_conntrack_expect.h> |
diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c index d5a9bcd7d61b..f516961a83b4 100644 --- a/net/netfilter/nf_conntrack_ecache.c +++ b/net/netfilter/nf_conntrack_ecache.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/percpu.h> | 18 | #include <linux/percpu.h> |
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/netdevice.h> | 20 | #include <linux/netdevice.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <net/netfilter/nf_conntrack.h> | 23 | #include <net/netfilter/nf_conntrack.h> |
23 | #include <net/netfilter/nf_conntrack_core.h> | 24 | #include <net/netfilter/nf_conntrack_core.h> |
diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c index f0732aa18e4f..2ae3169e7633 100644 --- a/net/netfilter/nf_conntrack_ftp.c +++ b/net/netfilter/nf_conntrack_ftp.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/moduleparam.h> | 13 | #include <linux/moduleparam.h> |
14 | #include <linux/netfilter.h> | 14 | #include <linux/netfilter.h> |
15 | #include <linux/ip.h> | 15 | #include <linux/ip.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/ipv6.h> | 17 | #include <linux/ipv6.h> |
17 | #include <linux/ctype.h> | 18 | #include <linux/ctype.h> |
18 | #include <linux/inet.h> | 19 | #include <linux/inet.h> |
diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c index a1c8dd917e12..a487c8038044 100644 --- a/net/netfilter/nf_conntrack_h323_main.c +++ b/net/netfilter/nf_conntrack_h323_main.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/inet.h> | 17 | #include <linux/inet.h> |
18 | #include <linux/in.h> | 18 | #include <linux/in.h> |
19 | #include <linux/ip.h> | 19 | #include <linux/ip.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/udp.h> | 21 | #include <linux/udp.h> |
21 | #include <linux/tcp.h> | 22 | #include <linux/tcp.h> |
22 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c index 4509fa6726f8..59e1a4cd4e8b 100644 --- a/net/netfilter/nf_conntrack_helper.c +++ b/net/netfilter/nf_conntrack_helper.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/skbuff.h> | 15 | #include <linux/skbuff.h> |
16 | #include <linux/vmalloc.h> | 16 | #include <linux/vmalloc.h> |
17 | #include <linux/stddef.h> | 17 | #include <linux/stddef.h> |
18 | #include <linux/slab.h> | ||
19 | #include <linux/random.h> | 18 | #include <linux/random.h> |
20 | #include <linux/err.h> | 19 | #include <linux/err.h> |
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
diff --git a/net/netfilter/nf_conntrack_irc.c b/net/netfilter/nf_conntrack_irc.c index 8bd98c84f77e..7673930ca342 100644 --- a/net/netfilter/nf_conntrack_irc.c +++ b/net/netfilter/nf_conntrack_irc.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/ip.h> | 15 | #include <linux/ip.h> |
16 | #include <linux/tcp.h> | 16 | #include <linux/tcp.h> |
17 | #include <linux/netfilter.h> | 17 | #include <linux/netfilter.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include <net/netfilter/nf_conntrack.h> | 20 | #include <net/netfilter/nf_conntrack.h> |
20 | #include <net/netfilter/nf_conntrack_expect.h> | 21 | #include <net/netfilter/nf_conntrack_expect.h> |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 569410a85953..afc52f2ee4ac 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/netlink.h> | 27 | #include <linux/netlink.h> |
28 | #include <linux/spinlock.h> | 28 | #include <linux/spinlock.h> |
29 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <linux/netfilter.h> | 32 | #include <linux/netfilter.h> |
32 | #include <net/netlink.h> | 33 | #include <net/netlink.h> |
diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c index 1a4568bf7ea5..a44fa75b5178 100644 --- a/net/netfilter/nf_conntrack_proto.c +++ b/net/netfilter/nf_conntrack_proto.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/netfilter.h> | 13 | #include <linux/netfilter.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
16 | #include <linux/skbuff.h> | 17 | #include <linux/skbuff.h> |
17 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
diff --git a/net/netfilter/nf_conntrack_proto_dccp.c b/net/netfilter/nf_conntrack_proto_dccp.c index 9a2815549375..5292560d6d4a 100644 --- a/net/netfilter/nf_conntrack_proto_dccp.c +++ b/net/netfilter/nf_conntrack_proto_dccp.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
17 | #include <linux/dccp.h> | 17 | #include <linux/dccp.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include <net/net_namespace.h> | 20 | #include <net/net_namespace.h> |
20 | #include <net/netns/generic.h> | 21 | #include <net/netns/generic.h> |
diff --git a/net/netfilter/nf_conntrack_proto_gre.c b/net/netfilter/nf_conntrack_proto_gre.c index d899b1a69940..cf616e55ca41 100644 --- a/net/netfilter/nf_conntrack_proto_gre.c +++ b/net/netfilter/nf_conntrack_proto_gre.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/in.h> | 31 | #include <linux/in.h> |
32 | #include <linux/netdevice.h> | 32 | #include <linux/netdevice.h> |
33 | #include <linux/skbuff.h> | 33 | #include <linux/skbuff.h> |
34 | #include <linux/slab.h> | ||
34 | #include <net/dst.h> | 35 | #include <net/dst.h> |
35 | #include <net/net_namespace.h> | 36 | #include <net/net_namespace.h> |
36 | #include <net/netns/generic.h> | 37 | #include <net/netns/generic.h> |
diff --git a/net/netfilter/nf_conntrack_sane.c b/net/netfilter/nf_conntrack_sane.c index dcfecbb81c46..d9e27734b2a2 100644 --- a/net/netfilter/nf_conntrack_sane.c +++ b/net/netfilter/nf_conntrack_sane.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/moduleparam.h> | 21 | #include <linux/moduleparam.h> |
22 | #include <linux/netfilter.h> | 22 | #include <linux/netfilter.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/in.h> | 24 | #include <linux/in.h> |
24 | #include <linux/tcp.h> | 25 | #include <linux/tcp.h> |
25 | #include <net/netfilter/nf_conntrack.h> | 26 | #include <net/netfilter/nf_conntrack.h> |
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index 24a42efe62ef..faa8eb3722b9 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/netfilter.h> | 10 | #include <linux/netfilter.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/module.h> | 12 | #include <linux/module.h> |
12 | #include <linux/skbuff.h> | 13 | #include <linux/skbuff.h> |
13 | #include <linux/proc_fs.h> | 14 | #include <linux/proc_fs.h> |
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index ba095fd014e5..c49ef219899e 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/slab.h> | ||
2 | #include <linux/init.h> | 3 | #include <linux/init.h> |
3 | #include <linux/module.h> | 4 | #include <linux/module.h> |
4 | #include <linux/proc_fs.h> | 5 | #include <linux/proc_fs.h> |
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index d9b8fb8ab340..203643fb2c52 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
29 | #include <linux/jhash.h> | 29 | #include <linux/jhash.h> |
30 | #include <linux/random.h> | 30 | #include <linux/random.h> |
31 | #include <linux/slab.h> | ||
31 | #include <net/sock.h> | 32 | #include <net/sock.h> |
32 | #include <net/netfilter/nf_log.h> | 33 | #include <net/netfilter/nf_log.h> |
33 | #include <net/netfilter/nfnetlink_log.h> | 34 | #include <net/netfilter/nfnetlink_log.h> |
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 7ba4abc405c9..e70a6ef1f4f2 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/skbuff.h> | 18 | #include <linux/skbuff.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/notifier.h> | 22 | #include <linux/notifier.h> |
22 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
23 | #include <linux/netfilter.h> | 24 | #include <linux/netfilter.h> |
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 0a12cedfe9e3..665f5beef6ad 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/vmalloc.h> | 22 | #include <linux/vmalloc.h> |
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/slab.h> | ||
25 | #include <net/net_namespace.h> | 26 | #include <net/net_namespace.h> |
26 | 27 | ||
27 | #include <linux/netfilter/x_tables.h> | 28 | #include <linux/netfilter/x_tables.h> |
diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c index 61c50fa84703..ee18b231b950 100644 --- a/net/netfilter/xt_CT.c +++ b/net/netfilter/xt_CT.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/gfp.h> | ||
10 | #include <linux/skbuff.h> | 11 | #include <linux/skbuff.h> |
11 | #include <linux/selinux.h> | 12 | #include <linux/selinux.h> |
12 | #include <linux/netfilter_ipv4/ip_tables.h> | 13 | #include <linux/netfilter_ipv4/ip_tables.h> |
diff --git a/net/netfilter/xt_LED.c b/net/netfilter/xt_LED.c index 8ff7843bb921..3271c8e52153 100644 --- a/net/netfilter/xt_LED.c +++ b/net/netfilter/xt_LED.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
24 | #include <linux/netfilter/x_tables.h> | 24 | #include <linux/netfilter/x_tables.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/leds.h> | 26 | #include <linux/leds.h> |
26 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
27 | 28 | ||
diff --git a/net/netfilter/xt_RATEEST.c b/net/netfilter/xt_RATEEST.c index 87ae97e5516f..d16d55df4f61 100644 --- a/net/netfilter/xt_RATEEST.c +++ b/net/netfilter/xt_RATEEST.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/jhash.h> | 11 | #include <linux/jhash.h> |
12 | #include <linux/rtnetlink.h> | 12 | #include <linux/rtnetlink.h> |
13 | #include <linux/random.h> | 13 | #include <linux/random.h> |
14 | #include <linux/slab.h> | ||
14 | #include <net/gen_stats.h> | 15 | #include <net/gen_stats.h> |
15 | #include <net/netlink.h> | 16 | #include <net/netlink.h> |
16 | 17 | ||
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c index 0e357ac9a2a8..c5f4b9919e9a 100644 --- a/net/netfilter/xt_TCPMSS.c +++ b/net/netfilter/xt_TCPMSS.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/skbuff.h> | 12 | #include <linux/skbuff.h> |
13 | #include <linux/ip.h> | 13 | #include <linux/ip.h> |
14 | #include <linux/gfp.h> | ||
14 | #include <linux/ipv6.h> | 15 | #include <linux/ipv6.h> |
15 | #include <linux/tcp.h> | 16 | #include <linux/tcp.h> |
16 | #include <net/dst.h> | 17 | #include <net/dst.h> |
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c index 26997ce90e48..388ca4596098 100644 --- a/net/netfilter/xt_connlimit.c +++ b/net/netfilter/xt_connlimit.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/ip.h> | 17 | #include <linux/ip.h> |
18 | #include <linux/ipv6.h> | 18 | #include <linux/ipv6.h> |
19 | #include <linux/jhash.h> | 19 | #include <linux/jhash.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/list.h> | 21 | #include <linux/list.h> |
21 | #include <linux/module.h> | 22 | #include <linux/module.h> |
22 | #include <linux/random.h> | 23 | #include <linux/random.h> |
diff --git a/net/netfilter/xt_dccp.c b/net/netfilter/xt_dccp.c index 0989f29ade2e..395af5943ffd 100644 --- a/net/netfilter/xt_dccp.c +++ b/net/netfilter/xt_dccp.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/skbuff.h> | 12 | #include <linux/skbuff.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
14 | #include <net/ip.h> | 15 | #include <net/ip.h> |
15 | #include <linux/dccp.h> | 16 | #include <linux/dccp.h> |
diff --git a/net/netfilter/xt_limit.c b/net/netfilter/xt_limit.c index a0ca5339af41..e5d7e1ffb1a4 100644 --- a/net/netfilter/xt_limit.c +++ b/net/netfilter/xt_limit.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/slab.h> | ||
9 | #include <linux/module.h> | 10 | #include <linux/module.h> |
10 | #include <linux/skbuff.h> | 11 | #include <linux/skbuff.h> |
11 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c index 390b7d09fe51..2d5562498c43 100644 --- a/net/netfilter/xt_quota.c +++ b/net/netfilter/xt_quota.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Sam Johnston <samj@samj.net> | 4 | * Sam Johnston <samj@samj.net> |
5 | */ | 5 | */ |
6 | #include <linux/skbuff.h> | 6 | #include <linux/skbuff.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/spinlock.h> | 8 | #include <linux/spinlock.h> |
8 | 9 | ||
9 | #include <linux/netfilter/x_tables.h> | 10 | #include <linux/netfilter/x_tables.h> |
diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c index 971d172afece..834b736857cb 100644 --- a/net/netfilter/xt_recent.c +++ b/net/netfilter/xt_recent.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/bitops.h> | 27 | #include <linux/bitops.h> |
28 | #include <linux/skbuff.h> | 28 | #include <linux/skbuff.h> |
29 | #include <linux/inet.h> | 29 | #include <linux/inet.h> |
30 | #include <linux/slab.h> | ||
30 | #include <net/net_namespace.h> | 31 | #include <net/net_namespace.h> |
31 | #include <net/netns/generic.h> | 32 | #include <net/netns/generic.h> |
32 | 33 | ||
diff --git a/net/netfilter/xt_statistic.c b/net/netfilter/xt_statistic.c index d8c0f8f1a78e..937ce0633e99 100644 --- a/net/netfilter/xt_statistic.c +++ b/net/netfilter/xt_statistic.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
13 | #include <linux/skbuff.h> | 13 | #include <linux/skbuff.h> |
14 | #include <linux/net.h> | 14 | #include <linux/net.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include <linux/netfilter/xt_statistic.h> | 17 | #include <linux/netfilter/xt_statistic.h> |
17 | #include <linux/netfilter/x_tables.h> | 18 | #include <linux/netfilter/x_tables.h> |
diff --git a/net/netfilter/xt_string.c b/net/netfilter/xt_string.c index b4d774111311..96801ffd8af8 100644 --- a/net/netfilter/xt_string.c +++ b/net/netfilter/xt_string.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/gfp.h> | ||
10 | #include <linux/init.h> | 11 | #include <linux/init.h> |
11 | #include <linux/module.h> | 12 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
diff --git a/net/netlabel/netlabel_cipso_v4.c b/net/netlabel/netlabel_cipso_v4.c index e639298bc9c8..5f14c8462e30 100644 --- a/net/netlabel/netlabel_cipso_v4.c +++ b/net/netlabel/netlabel_cipso_v4.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/string.h> | 33 | #include <linux/string.h> |
34 | #include <linux/skbuff.h> | 34 | #include <linux/skbuff.h> |
35 | #include <linux/audit.h> | 35 | #include <linux/audit.h> |
36 | #include <linux/slab.h> | ||
36 | #include <net/sock.h> | 37 | #include <net/sock.h> |
37 | #include <net/netlink.h> | 38 | #include <net/netlink.h> |
38 | #include <net/genetlink.h> | 39 | #include <net/genetlink.h> |
diff --git a/net/netlabel/netlabel_domainhash.c b/net/netlabel/netlabel_domainhash.c index 06ab41b6b57a..d37b7f80fa37 100644 --- a/net/netlabel/netlabel_domainhash.c +++ b/net/netlabel/netlabel_domainhash.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/spinlock.h> | 35 | #include <linux/spinlock.h> |
36 | #include <linux/string.h> | 36 | #include <linux/string.h> |
37 | #include <linux/audit.h> | 37 | #include <linux/audit.h> |
38 | #include <linux/slab.h> | ||
38 | #include <net/netlabel.h> | 39 | #include <net/netlabel.h> |
39 | #include <net/cipso_ipv4.h> | 40 | #include <net/cipso_ipv4.h> |
40 | #include <asm/bug.h> | 41 | #include <asm/bug.h> |
diff --git a/net/netlabel/netlabel_kapi.c b/net/netlabel/netlabel_kapi.c index 6ce00205f342..1b83e0009d8d 100644 --- a/net/netlabel/netlabel_kapi.c +++ b/net/netlabel/netlabel_kapi.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/types.h> | 32 | #include <linux/types.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/audit.h> | 34 | #include <linux/audit.h> |
34 | #include <linux/in.h> | 35 | #include <linux/in.h> |
35 | #include <linux/in6.h> | 36 | #include <linux/in6.h> |
diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c index 8203623e65ad..998e85e895d0 100644 --- a/net/netlabel/netlabel_mgmt.c +++ b/net/netlabel/netlabel_mgmt.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/skbuff.h> | 34 | #include <linux/skbuff.h> |
35 | #include <linux/in.h> | 35 | #include <linux/in.h> |
36 | #include <linux/in6.h> | 36 | #include <linux/in6.h> |
37 | #include <linux/slab.h> | ||
37 | #include <net/sock.h> | 38 | #include <net/sock.h> |
38 | #include <net/netlink.h> | 39 | #include <net/netlink.h> |
39 | #include <net/genetlink.h> | 40 | #include <net/genetlink.h> |
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index 3b4fde7622a3..a3d64aabe2f7 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/notifier.h> | 43 | #include <linux/notifier.h> |
44 | #include <linux/netdevice.h> | 44 | #include <linux/netdevice.h> |
45 | #include <linux/security.h> | 45 | #include <linux/security.h> |
46 | #include <linux/slab.h> | ||
46 | #include <net/sock.h> | 47 | #include <net/sock.h> |
47 | #include <net/netlink.h> | 48 | #include <net/netlink.h> |
48 | #include <net/genetlink.h> | 49 | #include <net/genetlink.h> |
diff --git a/net/netlabel/netlabel_user.c b/net/netlabel/netlabel_user.c index 68706b4e3bf8..a3fd75ac3fa5 100644 --- a/net/netlabel/netlabel_user.c +++ b/net/netlabel/netlabel_user.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/audit.h> | 35 | #include <linux/audit.h> |
36 | #include <linux/tty.h> | 36 | #include <linux/tty.h> |
37 | #include <linux/security.h> | 37 | #include <linux/security.h> |
38 | #include <linux/gfp.h> | ||
38 | #include <net/sock.h> | 39 | #include <net/sock.h> |
39 | #include <net/netlink.h> | 40 | #include <net/netlink.h> |
40 | #include <net/genetlink.h> | 41 | #include <net/genetlink.h> |
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index a28fda7420d9..aa4308afcc7f 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
12 | #include <linux/types.h> | 13 | #include <linux/types.h> |
13 | #include <linux/socket.h> | 14 | #include <linux/socket.h> |
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index a249127020a5..fa07f044b599 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/socket.h> | 16 | #include <linux/socket.h> |
17 | #include <linux/in.h> | 17 | #include <linux/in.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
19 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
20 | #include <linux/timer.h> | 21 | #include <linux/timer.h> |
diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c index 7aa11b01b2e2..64e6dde9749d 100644 --- a/net/netrom/nr_dev.c +++ b/net/netrom/nr_dev.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/fcntl.h> | 19 | #include <linux/fcntl.h> |
20 | #include <linux/in.h> | 20 | #include <linux/in.h> |
21 | #include <linux/if_ether.h> /* For the statistics structure. */ | 21 | #include <linux/if_ether.h> /* For the statistics structure. */ |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <asm/system.h> | 24 | #include <asm/system.h> |
24 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
diff --git a/net/netrom/nr_in.c b/net/netrom/nr_in.c index 68176483617f..6d4ef6d65b3d 100644 --- a/net/netrom/nr_in.c +++ b/net/netrom/nr_in.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/sockios.h> | 17 | #include <linux/sockios.h> |
18 | #include <linux/net.h> | 18 | #include <linux/net.h> |
19 | #include <linux/slab.h> | ||
19 | #include <net/ax25.h> | 20 | #include <net/ax25.h> |
20 | #include <linux/inet.h> | 21 | #include <linux/inet.h> |
21 | #include <linux/netdevice.h> | 22 | #include <linux/netdevice.h> |
diff --git a/net/netrom/nr_loopback.c b/net/netrom/nr_loopback.c index f324d5df4186..94d4e922af53 100644 --- a/net/netrom/nr_loopback.c +++ b/net/netrom/nr_loopback.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Copyright Tomi Manninen OH2BNS (oh2bns@sral.fi) | 7 | * Copyright Tomi Manninen OH2BNS (oh2bns@sral.fi) |
8 | */ | 8 | */ |
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/socket.h> | 11 | #include <linux/socket.h> |
11 | #include <linux/timer.h> | 12 | #include <linux/timer.h> |
12 | #include <net/ax25.h> | 13 | #include <net/ax25.h> |
diff --git a/net/netrom/nr_out.c b/net/netrom/nr_out.c index e3e6c44e1890..607fddb4fdbb 100644 --- a/net/netrom/nr_out.c +++ b/net/netrom/nr_out.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/sockios.h> | 17 | #include <linux/sockios.h> |
18 | #include <linux/net.h> | 18 | #include <linux/net.h> |
19 | #include <linux/slab.h> | ||
19 | #include <net/ax25.h> | 20 | #include <net/ax25.h> |
20 | #include <linux/inet.h> | 21 | #include <linux/inet.h> |
21 | #include <linux/netdevice.h> | 22 | #include <linux/netdevice.h> |
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index 5cc648012f50..44059d0c8dd1 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/sockios.h> | 18 | #include <linux/sockios.h> |
19 | #include <linux/net.h> | 19 | #include <linux/net.h> |
20 | #include <linux/slab.h> | ||
20 | #include <net/ax25.h> | 21 | #include <net/ax25.h> |
21 | #include <linux/inet.h> | 22 | #include <linux/inet.h> |
22 | #include <linux/netdevice.h> | 23 | #include <linux/netdevice.h> |
diff --git a/net/netrom/nr_subr.c b/net/netrom/nr_subr.c index 04e7d0d2fd8f..6a947ae50dbd 100644 --- a/net/netrom/nr_subr.c +++ b/net/netrom/nr_subr.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/sockios.h> | 16 | #include <linux/sockios.h> |
17 | #include <linux/net.h> | 17 | #include <linux/net.h> |
18 | #include <linux/slab.h> | ||
18 | #include <net/ax25.h> | 19 | #include <net/ax25.h> |
19 | #include <linux/inet.h> | 20 | #include <linux/inet.h> |
20 | #include <linux/netdevice.h> | 21 | #include <linux/netdevice.h> |
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index b0f037cc899c..d7d0310dca9d 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -60,6 +60,7 @@ | |||
60 | #include <linux/wireless.h> | 60 | #include <linux/wireless.h> |
61 | #include <linux/kernel.h> | 61 | #include <linux/kernel.h> |
62 | #include <linux/kmod.h> | 62 | #include <linux/kmod.h> |
63 | #include <linux/slab.h> | ||
63 | #include <net/net_namespace.h> | 64 | #include <net/net_namespace.h> |
64 | #include <net/ip.h> | 65 | #include <net/ip.h> |
65 | #include <net/protocol.h> | 66 | #include <net/protocol.h> |
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index 526d0273991a..73aee7f2fcdc 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/slab.h> | ||
28 | #include <asm/unaligned.h> | 29 | #include <asm/unaligned.h> |
29 | #include <net/sock.h> | 30 | #include <net/sock.h> |
30 | 31 | ||
diff --git a/net/phonet/datagram.c b/net/phonet/datagram.c index 387197b579b1..1bd38db4fe1e 100644 --- a/net/phonet/datagram.c +++ b/net/phonet/datagram.c | |||
@@ -24,6 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/socket.h> | 28 | #include <linux/socket.h> |
28 | #include <asm/ioctls.h> | 29 | #include <asm/ioctls.h> |
29 | #include <net/sock.h> | 30 | #include <net/sock.h> |
diff --git a/net/phonet/pep.c b/net/phonet/pep.c index 360cf377693e..e2a95762abd3 100644 --- a/net/phonet/pep.c +++ b/net/phonet/pep.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/slab.h> | ||
26 | #include <linux/socket.h> | 27 | #include <linux/socket.h> |
27 | #include <net/sock.h> | 28 | #include <net/sock.h> |
28 | #include <net/tcp_states.h> | 29 | #include <net/tcp_states.h> |
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c index 5c6ae0c701c0..9b4ced6e0968 100644 --- a/net/phonet/pn_dev.c +++ b/net/phonet/pn_dev.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/net.h> | 27 | #include <linux/net.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/netdevice.h> | 29 | #include <linux/netdevice.h> |
29 | #include <linux/phonet.h> | 30 | #include <linux/phonet.h> |
30 | #include <linux/proc_fs.h> | 31 | #include <linux/proc_fs.h> |
diff --git a/net/phonet/pn_netlink.c b/net/phonet/pn_netlink.c index fe2e7088ee07..58b3b1f991ed 100644 --- a/net/phonet/pn_netlink.c +++ b/net/phonet/pn_netlink.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/netlink.h> | 27 | #include <linux/netlink.h> |
28 | #include <linux/phonet.h> | 28 | #include <linux/phonet.h> |
29 | #include <linux/slab.h> | ||
29 | #include <net/sock.h> | 30 | #include <net/sock.h> |
30 | #include <net/phonet/pn_dev.h> | 31 | #include <net/phonet/pn_dev.h> |
31 | 32 | ||
diff --git a/net/phonet/socket.c b/net/phonet/socket.c index 69c8b826a0ce..c785bfd0744f 100644 --- a/net/phonet/socket.c +++ b/net/phonet/socket.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * 02110-1301 USA | 23 | * 02110-1301 USA |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/gfp.h> | ||
26 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
27 | #include <linux/net.h> | 28 | #include <linux/net.h> |
28 | #include <linux/poll.h> | 29 | #include <linux/poll.h> |
diff --git a/net/rds/af_rds.c b/net/rds/af_rds.c index c2e45e8efa20..7919a9edb8e9 100644 --- a/net/rds/af_rds.c +++ b/net/rds/af_rds.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
36 | #include <linux/gfp.h> | ||
36 | #include <linux/in.h> | 37 | #include <linux/in.h> |
37 | #include <linux/poll.h> | 38 | #include <linux/poll.h> |
38 | #include <net/sock.h> | 39 | #include <net/sock.h> |
diff --git a/net/rds/cong.c b/net/rds/cong.c index dd2711df640b..0871a29f0780 100644 --- a/net/rds/cong.c +++ b/net/rds/cong.c | |||
@@ -30,6 +30,7 @@ | |||
30 | * SOFTWARE. | 30 | * SOFTWARE. |
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/slab.h> | ||
33 | #include <linux/types.h> | 34 | #include <linux/types.h> |
34 | #include <linux/rbtree.h> | 35 | #include <linux/rbtree.h> |
35 | 36 | ||
diff --git a/net/rds/connection.c b/net/rds/connection.c index 278f607ab603..7619b671ca28 100644 --- a/net/rds/connection.c +++ b/net/rds/connection.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/list.h> | 34 | #include <linux/list.h> |
35 | #include <linux/slab.h> | ||
35 | #include <net/inet_hashtables.h> | 36 | #include <net/inet_hashtables.h> |
36 | 37 | ||
37 | #include "rds.h" | 38 | #include "rds.h" |
diff --git a/net/rds/ib.c b/net/rds/ib.c index 3b8992361042..8f2d6dd7700a 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/inetdevice.h> | 37 | #include <linux/inetdevice.h> |
38 | #include <linux/if_arp.h> | 38 | #include <linux/if_arp.h> |
39 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | #include "rds.h" | 42 | #include "rds.h" |
42 | #include "ib.h" | 43 | #include "ib.h" |
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index e1f124bf03bb..10ed0d55f759 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/in.h> | 34 | #include <linux/in.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/vmalloc.h> | 36 | #include <linux/vmalloc.h> |
36 | 37 | ||
37 | #include "rds.h" | 38 | #include "rds.h" |
diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c index cfb1d904ed00..a54cd63f9e35 100644 --- a/net/rds/ib_rdma.c +++ b/net/rds/ib_rdma.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include "rds.h" | 36 | #include "rds.h" |
36 | #include "rdma.h" | 37 | #include "rdma.h" |
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c index c338881eca71..c74e9904a6b2 100644 --- a/net/rds/ib_recv.c +++ b/net/rds/ib_recv.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
35 | #include <linux/dma-mapping.h> | 36 | #include <linux/dma-mapping.h> |
36 | #include <rdma/rdma_cm.h> | 37 | #include <rdma/rdma_cm.h> |
diff --git a/net/rds/info.c b/net/rds/info.c index 814a91a6f4a7..c45c4173a44d 100644 --- a/net/rds/info.c +++ b/net/rds/info.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | #include <linux/percpu.h> | 33 | #include <linux/percpu.h> |
34 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/proc_fs.h> | 36 | #include <linux/proc_fs.h> |
36 | 37 | ||
37 | #include "rds.h" | 38 | #include "rds.h" |
diff --git a/net/rds/iw.c b/net/rds/iw.c index b28fa8525b24..c8f3d3525cb9 100644 --- a/net/rds/iw.c +++ b/net/rds/iw.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/inetdevice.h> | 37 | #include <linux/inetdevice.h> |
38 | #include <linux/if_arp.h> | 38 | #include <linux/if_arp.h> |
39 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | #include "rds.h" | 42 | #include "rds.h" |
42 | #include "iw.h" | 43 | #include "iw.h" |
diff --git a/net/rds/iw_cm.c b/net/rds/iw_cm.c index 6bc638fd252c..a9d951b4fbae 100644 --- a/net/rds/iw_cm.c +++ b/net/rds/iw_cm.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/in.h> | 34 | #include <linux/in.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/vmalloc.h> | 36 | #include <linux/vmalloc.h> |
36 | 37 | ||
37 | #include "rds.h" | 38 | #include "rds.h" |
diff --git a/net/rds/iw_rdma.c b/net/rds/iw_rdma.c index 9eda11cca956..13dc1862d862 100644 --- a/net/rds/iw_rdma.c +++ b/net/rds/iw_rdma.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include "rds.h" | 36 | #include "rds.h" |
36 | #include "rdma.h" | 37 | #include "rdma.h" |
diff --git a/net/rds/iw_recv.c b/net/rds/iw_recv.c index 337e4e5025e2..3d479067d54d 100644 --- a/net/rds/iw_recv.c +++ b/net/rds/iw_recv.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
35 | #include <linux/dma-mapping.h> | 36 | #include <linux/dma-mapping.h> |
36 | #include <rdma/rdma_cm.h> | 37 | #include <rdma/rdma_cm.h> |
diff --git a/net/rds/loop.c b/net/rds/loop.c index 93a45f1ce61f..dd9879379457 100644 --- a/net/rds/loop.c +++ b/net/rds/loop.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/in.h> | 35 | #include <linux/in.h> |
35 | 36 | ||
36 | #include "rds.h" | 37 | #include "rds.h" |
diff --git a/net/rds/message.c b/net/rds/message.c index 73e600ffd87f..9a1d67e001ba 100644 --- a/net/rds/message.c +++ b/net/rds/message.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include "rds.h" | 36 | #include "rds.h" |
36 | #include "rdma.h" | 37 | #include "rdma.h" |
diff --git a/net/rds/page.c b/net/rds/page.c index 36790122dfd4..595a952d4b17 100644 --- a/net/rds/page.c +++ b/net/rds/page.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/highmem.h> | 33 | #include <linux/highmem.h> |
34 | #include <linux/gfp.h> | ||
34 | 35 | ||
35 | #include "rds.h" | 36 | #include "rds.h" |
36 | 37 | ||
diff --git a/net/rds/rdma.c b/net/rds/rdma.c index 61b359d9dffd..75fd13bb631b 100644 --- a/net/rds/rdma.c +++ b/net/rds/rdma.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/pagemap.h> | 33 | #include <linux/pagemap.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/rbtree.h> | 35 | #include <linux/rbtree.h> |
35 | #include <linux/dma-mapping.h> /* for DMA_*_DEVICE */ | 36 | #include <linux/dma-mapping.h> /* for DMA_*_DEVICE */ |
36 | 37 | ||
diff --git a/net/rds/recv.c b/net/rds/recv.c index b426d67f760c..e2a2b9344f7b 100644 --- a/net/rds/recv.c +++ b/net/rds/recv.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/slab.h> | ||
34 | #include <net/sock.h> | 35 | #include <net/sock.h> |
35 | #include <linux/in.h> | 36 | #include <linux/in.h> |
36 | 37 | ||
diff --git a/net/rds/send.c b/net/rds/send.c index 4629a0b63bbd..53d6795ac9d0 100644 --- a/net/rds/send.c +++ b/net/rds/send.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/gfp.h> | ||
34 | #include <net/sock.h> | 35 | #include <net/sock.h> |
35 | #include <linux/in.h> | 36 | #include <linux/in.h> |
36 | #include <linux/list.h> | 37 | #include <linux/list.h> |
diff --git a/net/rds/tcp.c b/net/rds/tcp.c index b5198aee45d3..babf4577ff7d 100644 --- a/net/rds/tcp.c +++ b/net/rds/tcp.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/in.h> | 35 | #include <linux/in.h> |
35 | #include <net/tcp.h> | 36 | #include <net/tcp.h> |
36 | 37 | ||
diff --git a/net/rds/tcp_listen.c b/net/rds/tcp_listen.c index 53cb1b54165d..975183fe6950 100644 --- a/net/rds/tcp_listen.c +++ b/net/rds/tcp_listen.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/gfp.h> | ||
34 | #include <linux/in.h> | 35 | #include <linux/in.h> |
35 | #include <net/tcp.h> | 36 | #include <net/tcp.h> |
36 | 37 | ||
diff --git a/net/rds/tcp_recv.c b/net/rds/tcp_recv.c index 40bfcf887465..1aba6878fa5d 100644 --- a/net/rds/tcp_recv.c +++ b/net/rds/tcp_recv.c | |||
@@ -31,6 +31,7 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/slab.h> | ||
34 | #include <net/tcp.h> | 35 | #include <net/tcp.h> |
35 | 36 | ||
36 | #include "rds.h" | 37 | #include "rds.h" |
diff --git a/net/rfkill/core.c b/net/rfkill/core.c index 7ae58b5b5a08..51875a0c5d48 100644 --- a/net/rfkill/core.c +++ b/net/rfkill/core.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/wait.h> | 33 | #include <linux/wait.h> |
34 | #include <linux/poll.h> | 34 | #include <linux/poll.h> |
35 | #include <linux/fs.h> | 35 | #include <linux/fs.h> |
36 | #include <linux/slab.h> | ||
36 | 37 | ||
37 | #include "rfkill.h" | 38 | #include "rfkill.h" |
38 | 39 | ||
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index e90b9b6c16ae..4fb711a035f4 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <linux/socket.h> | 19 | #include <linux/socket.h> |
20 | #include <linux/in.h> | 20 | #include <linux/in.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
22 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
23 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
diff --git a/net/rose/rose_dev.c b/net/rose/rose_dev.c index 424b893d1450..178ff4f73c85 100644 --- a/net/rose/rose_dev.c +++ b/net/rose/rose_dev.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/fcntl.h> | 19 | #include <linux/fcntl.h> |
20 | #include <linux/in.h> | 20 | #include <linux/in.h> |
21 | #include <linux/if_ether.h> | 21 | #include <linux/if_ether.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <asm/system.h> | 24 | #include <asm/system.h> |
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
diff --git a/net/rose/rose_link.c b/net/rose/rose_link.c index 5ef5f6988a2e..a750a28e0221 100644 --- a/net/rose/rose_link.c +++ b/net/rose/rose_link.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/sockios.h> | 17 | #include <linux/sockios.h> |
18 | #include <linux/net.h> | 18 | #include <linux/net.h> |
19 | #include <linux/slab.h> | ||
19 | #include <net/ax25.h> | 20 | #include <net/ax25.h> |
20 | #include <linux/inet.h> | 21 | #include <linux/inet.h> |
21 | #include <linux/netdevice.h> | 22 | #include <linux/netdevice.h> |
diff --git a/net/rose/rose_loopback.c b/net/rose/rose_loopback.c index 968e8bac1b5d..ae4a9d99aec7 100644 --- a/net/rose/rose_loopback.c +++ b/net/rose/rose_loopback.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) | 7 | * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) |
8 | */ | 8 | */ |
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/socket.h> | 11 | #include <linux/socket.h> |
11 | #include <linux/timer.h> | 12 | #include <linux/timer.h> |
12 | #include <net/ax25.h> | 13 | #include <net/ax25.h> |
diff --git a/net/rose/rose_out.c b/net/rose/rose_out.c index 69820f93414b..4ebf33afbe47 100644 --- a/net/rose/rose_out.c +++ b/net/rose/rose_out.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/sockios.h> | 16 | #include <linux/sockios.h> |
17 | #include <linux/net.h> | 17 | #include <linux/net.h> |
18 | #include <linux/gfp.h> | ||
18 | #include <net/ax25.h> | 19 | #include <net/ax25.h> |
19 | #include <linux/inet.h> | 20 | #include <linux/inet.h> |
20 | #include <linux/netdevice.h> | 21 | #include <linux/netdevice.h> |
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index 70a0b3b4b4d2..cbc244a128bd 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/sockios.h> | 17 | #include <linux/sockios.h> |
18 | #include <linux/net.h> | 18 | #include <linux/net.h> |
19 | #include <linux/slab.h> | ||
19 | #include <net/ax25.h> | 20 | #include <net/ax25.h> |
20 | #include <linux/inet.h> | 21 | #include <linux/inet.h> |
21 | #include <linux/netdevice.h> | 22 | #include <linux/netdevice.h> |
diff --git a/net/rose/rose_subr.c b/net/rose/rose_subr.c index b05108f382da..1734abba26a2 100644 --- a/net/rose/rose_subr.c +++ b/net/rose/rose_subr.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/sockios.h> | 16 | #include <linux/sockios.h> |
17 | #include <linux/net.h> | 17 | #include <linux/net.h> |
18 | #include <linux/slab.h> | ||
18 | #include <net/ax25.h> | 19 | #include <net/ax25.h> |
19 | #include <linux/inet.h> | 20 | #include <linux/inet.h> |
20 | #include <linux/netdevice.h> | 21 | #include <linux/netdevice.h> |
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index 287b1415cee9..c060095b27ce 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/net.h> | 13 | #include <linux/net.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/skbuff.h> | 15 | #include <linux/skbuff.h> |
15 | #include <linux/poll.h> | 16 | #include <linux/poll.h> |
16 | #include <linux/proc_fs.h> | 17 | #include <linux/proc_fs.h> |
diff --git a/net/rxrpc/ar-accept.c b/net/rxrpc/ar-accept.c index 2d744f22a9a1..6d79310fcaae 100644 --- a/net/rxrpc/ar-accept.c +++ b/net/rxrpc/ar-accept.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/in.h> | 17 | #include <linux/in.h> |
18 | #include <linux/in6.h> | 18 | #include <linux/in6.h> |
19 | #include <linux/icmp.h> | 19 | #include <linux/icmp.h> |
20 | #include <linux/gfp.h> | ||
20 | #include <net/sock.h> | 21 | #include <net/sock.h> |
21 | #include <net/af_rxrpc.h> | 22 | #include <net/af_rxrpc.h> |
22 | #include <net/ip.h> | 23 | #include <net/ip.h> |
diff --git a/net/rxrpc/ar-ack.c b/net/rxrpc/ar-ack.c index b4a220977031..2714da167fb8 100644 --- a/net/rxrpc/ar-ack.c +++ b/net/rxrpc/ar-ack.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/circ_buf.h> | 13 | #include <linux/circ_buf.h> |
14 | #include <linux/net.h> | 14 | #include <linux/net.h> |
15 | #include <linux/skbuff.h> | 15 | #include <linux/skbuff.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/udp.h> | 17 | #include <linux/udp.h> |
17 | #include <net/sock.h> | 18 | #include <net/sock.h> |
18 | #include <net/af_rxrpc.h> | 19 | #include <net/af_rxrpc.h> |
diff --git a/net/rxrpc/ar-call.c b/net/rxrpc/ar-call.c index bc0019f704fe..909d092de9f4 100644 --- a/net/rxrpc/ar-call.c +++ b/net/rxrpc/ar-call.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/circ_buf.h> | 14 | #include <linux/circ_buf.h> |
14 | #include <net/sock.h> | 15 | #include <net/sock.h> |
diff --git a/net/rxrpc/ar-connection.c b/net/rxrpc/ar-connection.c index 9f1ce841a0bb..4106ca95ec86 100644 --- a/net/rxrpc/ar-connection.c +++ b/net/rxrpc/ar-connection.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/net.h> | 14 | #include <linux/net.h> |
14 | #include <linux/skbuff.h> | 15 | #include <linux/skbuff.h> |
15 | #include <linux/crypto.h> | 16 | #include <linux/crypto.h> |
diff --git a/net/rxrpc/ar-input.c b/net/rxrpc/ar-input.c index f98c8027e5c1..89315009bab1 100644 --- a/net/rxrpc/ar-input.c +++ b/net/rxrpc/ar-input.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/in.h> | 17 | #include <linux/in.h> |
18 | #include <linux/in6.h> | 18 | #include <linux/in6.h> |
19 | #include <linux/icmp.h> | 19 | #include <linux/icmp.h> |
20 | #include <linux/gfp.h> | ||
20 | #include <net/sock.h> | 21 | #include <net/sock.h> |
21 | #include <net/af_rxrpc.h> | 22 | #include <net/af_rxrpc.h> |
22 | #include <net/ip.h> | 23 | #include <net/ip.h> |
diff --git a/net/rxrpc/ar-key.c b/net/rxrpc/ar-key.c index 74697b200496..5ee16f0353fe 100644 --- a/net/rxrpc/ar-key.c +++ b/net/rxrpc/ar-key.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/key-type.h> | 18 | #include <linux/key-type.h> |
19 | #include <linux/crypto.h> | 19 | #include <linux/crypto.h> |
20 | #include <linux/ctype.h> | 20 | #include <linux/ctype.h> |
21 | #include <linux/slab.h> | ||
21 | #include <net/sock.h> | 22 | #include <net/sock.h> |
22 | #include <net/af_rxrpc.h> | 23 | #include <net/af_rxrpc.h> |
23 | #include <keys/rxrpc-type.h> | 24 | #include <keys/rxrpc-type.h> |
diff --git a/net/rxrpc/ar-local.c b/net/rxrpc/ar-local.c index 807535ff29b5..87f7135d238b 100644 --- a/net/rxrpc/ar-local.c +++ b/net/rxrpc/ar-local.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/net.h> | 13 | #include <linux/net.h> |
14 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
15 | #include <linux/slab.h> | ||
15 | #include <net/sock.h> | 16 | #include <net/sock.h> |
16 | #include <net/af_rxrpc.h> | 17 | #include <net/af_rxrpc.h> |
17 | #include "ar-internal.h" | 18 | #include "ar-internal.h" |
diff --git a/net/rxrpc/ar-output.c b/net/rxrpc/ar-output.c index cc9102c5b588..5f22e263eda7 100644 --- a/net/rxrpc/ar-output.c +++ b/net/rxrpc/ar-output.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/net.h> | 12 | #include <linux/net.h> |
13 | #include <linux/gfp.h> | ||
13 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
14 | #include <linux/circ_buf.h> | 15 | #include <linux/circ_buf.h> |
15 | #include <net/sock.h> | 16 | #include <net/sock.h> |
diff --git a/net/rxrpc/ar-peer.c b/net/rxrpc/ar-peer.c index edc026c1eb76..f0f85b0123f7 100644 --- a/net/rxrpc/ar-peer.c +++ b/net/rxrpc/ar-peer.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/in.h> | 16 | #include <linux/in.h> |
17 | #include <linux/in6.h> | 17 | #include <linux/in6.h> |
18 | #include <linux/icmp.h> | 18 | #include <linux/icmp.h> |
19 | #include <linux/slab.h> | ||
19 | #include <net/sock.h> | 20 | #include <net/sock.h> |
20 | #include <net/af_rxrpc.h> | 21 | #include <net/af_rxrpc.h> |
21 | #include <net/ip.h> | 22 | #include <net/ip.h> |
diff --git a/net/rxrpc/ar-transport.c b/net/rxrpc/ar-transport.c index 0936e1acc30e..5e0226fe587e 100644 --- a/net/rxrpc/ar-transport.c +++ b/net/rxrpc/ar-transport.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/net.h> | 13 | #include <linux/net.h> |
14 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
15 | #include <linux/slab.h> | ||
15 | #include <net/sock.h> | 16 | #include <net/sock.h> |
16 | #include <net/af_rxrpc.h> | 17 | #include <net/af_rxrpc.h> |
17 | #include "ar-internal.h" | 18 | #include "ar-internal.h" |
diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c index 713ac593e2e9..7635107726ce 100644 --- a/net/rxrpc/rxkad.c +++ b/net/rxrpc/rxkad.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/crypto.h> | 16 | #include <linux/crypto.h> |
17 | #include <linux/scatterlist.h> | 17 | #include <linux/scatterlist.h> |
18 | #include <linux/ctype.h> | 18 | #include <linux/ctype.h> |
19 | #include <linux/slab.h> | ||
19 | #include <net/sock.h> | 20 | #include <net/sock.h> |
20 | #include <net/af_rxrpc.h> | 21 | #include <net/af_rxrpc.h> |
21 | #include <keys/rxrpc-type.h> | 22 | #include <keys/rxrpc-type.h> |
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 7a558da99bb6..019045174fc3 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/skbuff.h> | 19 | #include <linux/skbuff.h> |
19 | #include <linux/init.h> | 20 | #include <linux/init.h> |
20 | #include <linux/kmod.h> | 21 | #include <linux/kmod.h> |
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c index 082c520b0def..da27a170b6b7 100644 --- a/net/sched/act_ipt.c +++ b/net/sched/act_ipt.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/rtnetlink.h> | 19 | #include <linux/rtnetlink.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/slab.h> | ||
22 | #include <net/netlink.h> | 23 | #include <net/netlink.h> |
23 | #include <net/pkt_sched.h> | 24 | #include <net/pkt_sched.h> |
24 | #include <linux/tc_act/tc_ipt.h> | 25 | #include <linux/tc_act/tc_ipt.h> |
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index d329170243cb..c046682054eb 100644 --- a/net/sched/act_mirred.c +++ b/net/sched/act_mirred.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/rtnetlink.h> | 20 | #include <linux/rtnetlink.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/gfp.h> | ||
23 | #include <net/net_namespace.h> | 24 | #include <net/net_namespace.h> |
24 | #include <net/netlink.h> | 25 | #include <net/netlink.h> |
25 | #include <net/pkt_sched.h> | 26 | #include <net/pkt_sched.h> |
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index 6b0359a500e6..b7dcfedc802e 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/rtnetlink.h> | 17 | #include <linux/rtnetlink.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/slab.h> | ||
20 | #include <net/netlink.h> | 21 | #include <net/netlink.h> |
21 | #include <net/pkt_sched.h> | 22 | #include <net/pkt_sched.h> |
22 | #include <linux/tc_act/tc_pedit.h> | 23 | #include <linux/tc_act/tc_pedit.h> |
diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 723964c3ee4f..654f73dff7c1 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/skbuff.h> | 18 | #include <linux/skbuff.h> |
19 | #include <linux/rtnetlink.h> | 19 | #include <linux/rtnetlink.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/slab.h> | ||
21 | #include <net/act_api.h> | 22 | #include <net/act_api.h> |
22 | #include <net/netlink.h> | 23 | #include <net/netlink.h> |
23 | 24 | ||
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c index 8daa1ebc7413..622ca809c15c 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/skbuff.h> | 17 | #include <linux/skbuff.h> |
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 4a795d966172..5fd0c28ef79a 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/kmod.h> | 24 | #include <linux/kmod.h> |
25 | #include <linux/netlink.h> | 25 | #include <linux/netlink.h> |
26 | #include <linux/err.h> | 26 | #include <linux/err.h> |
27 | #include <linux/slab.h> | ||
27 | #include <net/net_namespace.h> | 28 | #include <net/net_namespace.h> |
28 | #include <net/sock.h> | 29 | #include <net/sock.h> |
29 | #include <net/netlink.h> | 30 | #include <net/netlink.h> |
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c index 4e2bda854119..efd4f95fd050 100644 --- a/net/sched/cls_basic.c +++ b/net/sched/cls_basic.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/string.h> | 16 | #include <linux/string.h> |
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c index 7f27d2c15e08..221180384fd7 100644 --- a/net/sched/cls_cgroup.c +++ b/net/sched/cls_cgroup.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
14 | #include <linux/string.h> | 15 | #include <linux/string.h> |
15 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c index e054c62857e1..6ed61b10e002 100644 --- a/net/sched/cls_flow.c +++ b/net/sched/cls_flow.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/ip.h> | 20 | #include <linux/ip.h> |
21 | #include <linux/ipv6.h> | 21 | #include <linux/ipv6.h> |
22 | #include <linux/if_vlan.h> | 22 | #include <linux/if_vlan.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include <net/pkt_cls.h> | 25 | #include <net/pkt_cls.h> |
25 | #include <net/ip.h> | 26 | #include <net/ip.h> |
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c index 6d6e87585fb1..93b0a7b6f9b4 100644 --- a/net/sched/cls_fw.c +++ b/net/sched/cls_fw.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/types.h> | 23 | #include <linux/types.h> |
23 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
24 | #include <linux/string.h> | 25 | #include <linux/string.h> |
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c index dd872d5383ef..694dcd85dec8 100644 --- a/net/sched/cls_route.c +++ b/net/sched/cls_route.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/string.h> | 16 | #include <linux/string.h> |
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c index e806f2314b5e..20ef330bb918 100644 --- a/net/sched/cls_tcindex.c +++ b/net/sched/cls_tcindex.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/skbuff.h> | 10 | #include <linux/skbuff.h> |
11 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
12 | #include <linux/slab.h> | ||
12 | #include <net/act_api.h> | 13 | #include <net/act_api.h> |
13 | #include <net/netlink.h> | 14 | #include <net/netlink.h> |
14 | #include <net/pkt_cls.h> | 15 | #include <net/pkt_cls.h> |
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 1ef76871a57b..593eac056e8d 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c | |||
@@ -31,6 +31,7 @@ | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/types.h> | 35 | #include <linux/types.h> |
35 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
36 | #include <linux/string.h> | 37 | #include <linux/string.h> |
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 24dce8b648a4..3bcac8aa333c 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
@@ -58,6 +58,7 @@ | |||
58 | * only available if that subsystem is enabled in the kernel. | 58 | * only available if that subsystem is enabled in the kernel. |
59 | */ | 59 | */ |
60 | 60 | ||
61 | #include <linux/slab.h> | ||
61 | #include <linux/module.h> | 62 | #include <linux/module.h> |
62 | #include <linux/types.h> | 63 | #include <linux/types.h> |
63 | #include <linux/kernel.h> | 64 | #include <linux/kernel.h> |
diff --git a/net/sched/em_nbyte.c b/net/sched/em_nbyte.c index 370a1b2ea317..1a4176aee6e5 100644 --- a/net/sched/em_nbyte.c +++ b/net/sched/em_nbyte.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * Authors: Thomas Graf <tgraf@suug.ch> | 9 | * Authors: Thomas Graf <tgraf@suug.ch> |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/gfp.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/net/sched/em_text.c b/net/sched/em_text.c index 853c5ead87fd..763253257411 100644 --- a/net/sched/em_text.c +++ b/net/sched/em_text.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * Authors: Thomas Graf <tgraf@suug.ch> | 9 | * Authors: Thomas Graf <tgraf@suug.ch> |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/net/sched/ematch.c b/net/sched/ematch.c index aab59409728b..e782bdeedc58 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c | |||
@@ -82,6 +82,7 @@ | |||
82 | */ | 82 | */ |
83 | 83 | ||
84 | #include <linux/module.h> | 84 | #include <linux/module.h> |
85 | #include <linux/slab.h> | ||
85 | #include <linux/types.h> | 86 | #include <linux/types.h> |
86 | #include <linux/kernel.h> | 87 | #include <linux/kernel.h> |
87 | #include <linux/errno.h> | 88 | #include <linux/errno.h> |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index c65866da17bc..9839b26674f4 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
29 | #include <linux/hrtimer.h> | 29 | #include <linux/hrtimer.h> |
30 | #include <linux/lockdep.h> | 30 | #include <linux/lockdep.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | #include <net/net_namespace.h> | 33 | #include <net/net_namespace.h> |
33 | #include <net/sock.h> | 34 | #include <net/sock.h> |
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index ab82f145f689..fcbb86a486a2 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c | |||
@@ -3,6 +3,7 @@ | |||
3 | /* Written 1998-2000 by Werner Almesberger, EPFL ICA */ | 3 | /* Written 1998-2000 by Werner Almesberger, EPFL ICA */ |
4 | 4 | ||
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/slab.h> | ||
6 | #include <linux/init.h> | 7 | #include <linux/init.h> |
7 | #include <linux/string.h> | 8 | #include <linux/string.h> |
8 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index 3846d65bc03e..28c01ef5abc8 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/types.h> | 15 | #include <linux/types.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/string.h> | 17 | #include <linux/string.h> |
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c index a65604f8f2b8..b74046a95397 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
13 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
14 | #include <linux/netdevice.h> | 15 | #include <linux/netdevice.h> |
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index d303daa45d49..63d41f86679c 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/types.h> | 9 | #include <linux/types.h> |
9 | #include <linux/string.h> | 10 | #include <linux/string.h> |
10 | #include <linux/errno.h> | 11 | #include <linux/errno.h> |
diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c index 4b0a6cc44c77..5948bafa8ce2 100644 --- a/net/sched/sch_fifo.c +++ b/net/sched/sch_fifo.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 17513252e83f..aeddabfb8e4e 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/rcupdate.h> | 25 | #include <linux/rcupdate.h> |
26 | #include <linux/list.h> | 26 | #include <linux/list.h> |
27 | #include <linux/slab.h> | ||
27 | #include <net/pkt_sched.h> | 28 | #include <net/pkt_sched.h> |
28 | 29 | ||
29 | /* Main transmission queue. */ | 30 | /* Main transmission queue. */ |
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c index 40408d595c08..51dcc2aa5c92 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * For all the glorious comments look at include/net/red.h | 18 | * For all the glorious comments look at include/net/red.h |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/slab.h> | ||
21 | #include <linux/module.h> | 22 | #include <linux/module.h> |
22 | #include <linux/types.h> | 23 | #include <linux/types.h> |
23 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 508cf5f3a6d5..0b52b8de562c 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/compiler.h> | 36 | #include <linux/compiler.h> |
37 | #include <linux/rbtree.h> | 37 | #include <linux/rbtree.h> |
38 | #include <linux/workqueue.h> | 38 | #include <linux/workqueue.h> |
39 | #include <linux/slab.h> | ||
39 | #include <net/netlink.h> | 40 | #include <net/netlink.h> |
40 | #include <net/pkt_sched.h> | 41 | #include <net/pkt_sched.h> |
41 | 42 | ||
diff --git a/net/sched/sch_mq.c b/net/sched/sch_mq.c index d1dea3d5dc92..b2aba3f5e6fa 100644 --- a/net/sched/sch_mq.c +++ b/net/sched/sch_mq.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/slab.h> | ||
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
13 | #include <linux/string.h> | 14 | #include <linux/string.h> |
14 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c index 7db2c88ce585..c50876cd8704 100644 --- a/net/sched/sch_multiq.c +++ b/net/sched/sch_multiq.c | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/types.h> | 22 | #include <linux/types.h> |
22 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
23 | #include <linux/string.h> | 24 | #include <linux/string.h> |
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index d8b10e054627..4714ff162bbd 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/types.h> | 18 | #include <linux/types.h> |
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
19 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index 93285cecb246..81672e0c1b25 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/types.h> | 16 | #include <linux/types.h> |
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
17 | #include <linux/string.h> | 18 | #include <linux/string.h> |
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index cb21380c0605..c5a9ac566007 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/ipv6.h> | 20 | #include <linux/ipv6.h> |
21 | #include <linux/skbuff.h> | 21 | #include <linux/skbuff.h> |
22 | #include <linux/jhash.h> | 22 | #include <linux/jhash.h> |
23 | #include <linux/slab.h> | ||
23 | #include <net/ip.h> | 24 | #include <net/ip.h> |
24 | #include <net/netlink.h> | 25 | #include <net/netlink.h> |
25 | #include <net/pkt_sched.h> | 26 | #include <net/pkt_sched.h> |
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c index db69637069c4..3415b6ce1c0a 100644 --- a/net/sched/sch_teql.c +++ b/net/sched/sch_teql.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/string.h> | 15 | #include <linux/string.h> |
15 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
16 | #include <linux/if_arp.h> | 17 | #include <linux/if_arp.h> |
diff --git a/net/sctp/auth.c b/net/sctp/auth.c index 56935bbc1496..86366390038a 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c | |||
@@ -34,6 +34,7 @@ | |||
34 | * be incorporated into the next SCTP release. | 34 | * be incorporated into the next SCTP release. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/slab.h> | ||
37 | #include <linux/types.h> | 38 | #include <linux/types.h> |
38 | #include <linux/crypto.h> | 39 | #include <linux/crypto.h> |
39 | #include <linux/scatterlist.h> | 40 | #include <linux/scatterlist.h> |
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c index bef133731683..faf71d179e46 100644 --- a/net/sctp/bind_addr.c +++ b/net/sctp/bind_addr.c | |||
@@ -43,6 +43,7 @@ | |||
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/types.h> | 45 | #include <linux/types.h> |
46 | #include <linux/slab.h> | ||
46 | #include <linux/in.h> | 47 | #include <linux/in.h> |
47 | #include <net/sock.h> | 48 | #include <net/sock.h> |
48 | #include <net/ipv6.h> | 49 | #include <net/ipv6.h> |
diff --git a/net/sctp/chunk.c b/net/sctp/chunk.c index 8e4320040f05..3eab6db59a37 100644 --- a/net/sctp/chunk.c +++ b/net/sctp/chunk.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/net.h> | 42 | #include <linux/net.h> |
43 | #include <linux/inet.h> | 43 | #include <linux/inet.h> |
44 | #include <linux/skbuff.h> | 44 | #include <linux/skbuff.h> |
45 | #include <linux/slab.h> | ||
45 | #include <net/sock.h> | 46 | #include <net/sock.h> |
46 | #include <net/sctp/sctp.h> | 47 | #include <net/sctp/sctp.h> |
47 | #include <net/sctp/sm.h> | 48 | #include <net/sctp/sm.h> |
diff --git a/net/sctp/input.c b/net/sctp/input.c index 3d74b264ea22..2a570184e5a9 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <linux/socket.h> | 53 | #include <linux/socket.h> |
54 | #include <linux/ip.h> | 54 | #include <linux/ip.h> |
55 | #include <linux/time.h> /* For struct timeval */ | 55 | #include <linux/time.h> /* For struct timeval */ |
56 | #include <linux/slab.h> | ||
56 | #include <net/ip.h> | 57 | #include <net/ip.h> |
57 | #include <net/icmp.h> | 58 | #include <net/icmp.h> |
58 | #include <net/snmp.h> | 59 | #include <net/snmp.h> |
diff --git a/net/sctp/inqueue.c b/net/sctp/inqueue.c index bbf5dd2a97c4..ccb6dc48d15b 100644 --- a/net/sctp/inqueue.c +++ b/net/sctp/inqueue.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <net/sctp/sctp.h> | 46 | #include <net/sctp/sctp.h> |
47 | #include <net/sctp/sm.h> | 47 | #include <net/sctp/sm.h> |
48 | #include <linux/interrupt.h> | 48 | #include <linux/interrupt.h> |
49 | #include <linux/slab.h> | ||
49 | 50 | ||
50 | /* Initialize an SCTP inqueue. */ | 51 | /* Initialize an SCTP inqueue. */ |
51 | void sctp_inq_init(struct sctp_inq *queue) | 52 | void sctp_inq_init(struct sctp_inq *queue) |
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index db1c767e509e..14db5689fb89 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/netdevice.h> | 58 | #include <linux/netdevice.h> |
59 | #include <linux/init.h> | 59 | #include <linux/init.h> |
60 | #include <linux/ipsec.h> | 60 | #include <linux/ipsec.h> |
61 | #include <linux/slab.h> | ||
61 | 62 | ||
62 | #include <linux/ipv6.h> | 63 | #include <linux/ipv6.h> |
63 | #include <linux/icmpv6.h> | 64 | #include <linux/icmpv6.h> |
diff --git a/net/sctp/output.c b/net/sctp/output.c index 7c5589363433..fad261d41ec2 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/ip.h> | 48 | #include <linux/ip.h> |
49 | #include <linux/ipv6.h> | 49 | #include <linux/ipv6.h> |
50 | #include <linux/init.h> | 50 | #include <linux/init.h> |
51 | #include <linux/slab.h> | ||
51 | #include <net/inet_ecn.h> | 52 | #include <net/inet_ecn.h> |
52 | #include <net/ip.h> | 53 | #include <net/ip.h> |
53 | #include <net/icmp.h> | 54 | #include <net/icmp.h> |
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 229690f02a1d..abfc0b8dee74 100644 --- a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/list.h> /* For struct list_head */ | 50 | #include <linux/list.h> /* For struct list_head */ |
51 | #include <linux/socket.h> | 51 | #include <linux/socket.h> |
52 | #include <linux/ip.h> | 52 | #include <linux/ip.h> |
53 | #include <linux/slab.h> | ||
53 | #include <net/sock.h> /* For skb_set_owner_w */ | 54 | #include <net/sock.h> /* For skb_set_owner_w */ |
54 | 55 | ||
55 | #include <net/sctp/sctp.h> | 56 | #include <net/sctp/sctp.h> |
diff --git a/net/sctp/primitive.c b/net/sctp/primitive.c index 8cb4f060bce6..534c7eae9d15 100644 --- a/net/sctp/primitive.c +++ b/net/sctp/primitive.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/socket.h> | 50 | #include <linux/socket.h> |
51 | #include <linux/ip.h> | 51 | #include <linux/ip.h> |
52 | #include <linux/time.h> /* For struct timeval */ | 52 | #include <linux/time.h> /* For struct timeval */ |
53 | #include <linux/gfp.h> | ||
53 | #include <net/sock.h> | 54 | #include <net/sock.h> |
54 | #include <net/sctp/sctp.h> | 55 | #include <net/sctp/sctp.h> |
55 | #include <net/sctp/sm.h> | 56 | #include <net/sctp/sm.h> |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index e771690f6d5d..a56f98e82f92 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -54,6 +54,7 @@ | |||
54 | #include <linux/bootmem.h> | 54 | #include <linux/bootmem.h> |
55 | #include <linux/highmem.h> | 55 | #include <linux/highmem.h> |
56 | #include <linux/swap.h> | 56 | #include <linux/swap.h> |
57 | #include <linux/slab.h> | ||
57 | #include <net/net_namespace.h> | 58 | #include <net/net_namespace.h> |
58 | #include <net/protocol.h> | 59 | #include <net/protocol.h> |
59 | #include <net/ip.h> | 60 | #include <net/ip.h> |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 9e732916b671..17cb400ecd6a 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/inet.h> | 58 | #include <linux/inet.h> |
59 | #include <linux/scatterlist.h> | 59 | #include <linux/scatterlist.h> |
60 | #include <linux/crypto.h> | 60 | #include <linux/crypto.h> |
61 | #include <linux/slab.h> | ||
61 | #include <net/sock.h> | 62 | #include <net/sock.h> |
62 | 63 | ||
63 | #include <linux/skbuff.h> | 64 | #include <linux/skbuff.h> |
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 500886bda9b4..4c5bed9af4e3 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/types.h> | 51 | #include <linux/types.h> |
52 | #include <linux/socket.h> | 52 | #include <linux/socket.h> |
53 | #include <linux/ip.h> | 53 | #include <linux/ip.h> |
54 | #include <linux/gfp.h> | ||
54 | #include <net/sock.h> | 55 | #include <net/sock.h> |
55 | #include <net/sctp/sctp.h> | 56 | #include <net/sctp/sctp.h> |
56 | #include <net/sctp/sm.h> | 57 | #include <net/sctp/sm.h> |
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 47bc20d3a85b..abf601a1b847 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include <linux/ipv6.h> | 56 | #include <linux/ipv6.h> |
57 | #include <linux/net.h> | 57 | #include <linux/net.h> |
58 | #include <linux/inet.h> | 58 | #include <linux/inet.h> |
59 | #include <linux/slab.h> | ||
59 | #include <net/sock.h> | 60 | #include <net/sock.h> |
60 | #include <net/inet_ecn.h> | 61 | #include <net/inet_ecn.h> |
61 | #include <linux/skbuff.h> | 62 | #include <linux/skbuff.h> |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index d80ee3a2f110..c1941276f6e3 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -67,6 +67,7 @@ | |||
67 | #include <linux/poll.h> | 67 | #include <linux/poll.h> |
68 | #include <linux/init.h> | 68 | #include <linux/init.h> |
69 | #include <linux/crypto.h> | 69 | #include <linux/crypto.h> |
70 | #include <linux/slab.h> | ||
70 | 71 | ||
71 | #include <net/ip.h> | 72 | #include <net/ip.h> |
72 | #include <net/icmp.h> | 73 | #include <net/icmp.h> |
diff --git a/net/sctp/ssnmap.c b/net/sctp/ssnmap.c index 737d330e5ffc..442ad4ed6315 100644 --- a/net/sctp/ssnmap.c +++ b/net/sctp/ssnmap.c | |||
@@ -37,6 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include <linux/types.h> | 39 | #include <linux/types.h> |
40 | #include <linux/slab.h> | ||
40 | #include <net/sctp/sctp.h> | 41 | #include <net/sctp/sctp.h> |
41 | #include <net/sctp/sm.h> | 42 | #include <net/sctp/sm.h> |
42 | 43 | ||
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index b827d21dbe54..be4d63d5a5cc 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -48,6 +48,7 @@ | |||
48 | * be incorporated into the next SCTP release. | 48 | * be incorporated into the next SCTP release. |
49 | */ | 49 | */ |
50 | 50 | ||
51 | #include <linux/slab.h> | ||
51 | #include <linux/types.h> | 52 | #include <linux/types.h> |
52 | #include <linux/random.h> | 53 | #include <linux/random.h> |
53 | #include <net/sctp/sctp.h> | 54 | #include <net/sctp/sctp.h> |
diff --git a/net/sctp/tsnmap.c b/net/sctp/tsnmap.c index 9bd64565021a..747d5412c463 100644 --- a/net/sctp/tsnmap.c +++ b/net/sctp/tsnmap.c | |||
@@ -42,6 +42,7 @@ | |||
42 | * be incorporated into the next SCTP release. | 42 | * be incorporated into the next SCTP release. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/slab.h> | ||
45 | #include <linux/types.h> | 46 | #include <linux/types.h> |
46 | #include <linux/bitmap.h> | 47 | #include <linux/bitmap.h> |
47 | #include <net/sctp/sctp.h> | 48 | #include <net/sctp/sctp.h> |
diff --git a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c index 8b3560fd876d..aa72e89c3ee1 100644 --- a/net/sctp/ulpevent.c +++ b/net/sctp/ulpevent.c | |||
@@ -43,6 +43,7 @@ | |||
43 | * be incorporated into the next SCTP release. | 43 | * be incorporated into the next SCTP release. |
44 | */ | 44 | */ |
45 | 45 | ||
46 | #include <linux/slab.h> | ||
46 | #include <linux/types.h> | 47 | #include <linux/types.h> |
47 | #include <linux/skbuff.h> | 48 | #include <linux/skbuff.h> |
48 | #include <net/sctp/structs.h> | 49 | #include <net/sctp/structs.h> |
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c index 7b23803343cc..3a448536f0b6 100644 --- a/net/sctp/ulpqueue.c +++ b/net/sctp/ulpqueue.c | |||
@@ -41,6 +41,7 @@ | |||
41 | * be incorporated into the next SCTP release. | 41 | * be incorporated into the next SCTP release. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/slab.h> | ||
44 | #include <linux/types.h> | 45 | #include <linux/types.h> |
45 | #include <linux/skbuff.h> | 46 | #include <linux/skbuff.h> |
46 | #include <net/sock.h> | 47 | #include <net/sock.h> |
diff --git a/net/socket.c b/net/socket.c index ad2e8153c618..35bc198bbf68 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -87,6 +87,7 @@ | |||
87 | #include <linux/wireless.h> | 87 | #include <linux/wireless.h> |
88 | #include <linux/nsproxy.h> | 88 | #include <linux/nsproxy.h> |
89 | #include <linux/magic.h> | 89 | #include <linux/magic.h> |
90 | #include <linux/slab.h> | ||
90 | 91 | ||
91 | #include <asm/uaccess.h> | 92 | #include <asm/uaccess.h> |
92 | #include <asm/unistd.h> | 93 | #include <asm/unistd.h> |
diff --git a/net/sunrpc/addr.c b/net/sunrpc/addr.c index f845d9d72f73..1419d0cdbbac 100644 --- a/net/sunrpc/addr.c +++ b/net/sunrpc/addr.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <net/ipv6.h> | 19 | #include <net/ipv6.h> |
20 | #include <linux/sunrpc/clnt.h> | 20 | #include <linux/sunrpc/clnt.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 23 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
23 | 24 | ||
diff --git a/net/sunrpc/auth_generic.c b/net/sunrpc/auth_generic.c index bf88bf8e9365..8f623b0f03dd 100644 --- a/net/sunrpc/auth_generic.c +++ b/net/sunrpc/auth_generic.c | |||
@@ -5,6 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/err.h> | 7 | #include <linux/err.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/types.h> | 9 | #include <linux/types.h> |
9 | #include <linux/module.h> | 10 | #include <linux/module.h> |
10 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 0cfccc2a0297..c389ccf6437d 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -1280,9 +1280,8 @@ alloc_enc_pages(struct rpc_rqst *rqstp) | |||
1280 | rqstp->rq_release_snd_buf = priv_release_snd_buf; | 1280 | rqstp->rq_release_snd_buf = priv_release_snd_buf; |
1281 | return 0; | 1281 | return 0; |
1282 | out_free: | 1282 | out_free: |
1283 | for (i--; i >= 0; i--) { | 1283 | rqstp->rq_enc_pages_num = i; |
1284 | __free_page(rqstp->rq_enc_pages[i]); | 1284 | priv_release_snd_buf(rqstp); |
1285 | } | ||
1286 | out: | 1285 | out: |
1287 | return -EAGAIN; | 1286 | return -EAGAIN; |
1288 | } | 1287 | } |
diff --git a/net/sunrpc/auth_gss/gss_generic_token.c b/net/sunrpc/auth_gss/gss_generic_token.c index c0ba39c4f5f2..310b78e99456 100644 --- a/net/sunrpc/auth_gss/gss_generic_token.c +++ b/net/sunrpc/auth_gss/gss_generic_token.c | |||
@@ -33,7 +33,6 @@ | |||
33 | 33 | ||
34 | #include <linux/types.h> | 34 | #include <linux/types.h> |
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/slab.h> | ||
37 | #include <linux/string.h> | 36 | #include <linux/string.h> |
38 | #include <linux/sunrpc/sched.h> | 37 | #include <linux/sunrpc/sched.h> |
39 | #include <linux/sunrpc/gss_asn1.h> | 38 | #include <linux/sunrpc/gss_asn1.h> |
diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c index c93fca204558..e9b636176687 100644 --- a/net/sunrpc/auth_gss/gss_krb5_crypto.c +++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <linux/err.h> | 37 | #include <linux/err.h> |
38 | #include <linux/types.h> | 38 | #include <linux/types.h> |
39 | #include <linux/mm.h> | 39 | #include <linux/mm.h> |
40 | #include <linux/slab.h> | ||
41 | #include <linux/scatterlist.h> | 40 | #include <linux/scatterlist.h> |
42 | #include <linux/crypto.h> | 41 | #include <linux/crypto.h> |
43 | #include <linux/highmem.h> | 42 | #include <linux/highmem.h> |
diff --git a/net/sunrpc/auth_gss/gss_krb5_seal.c b/net/sunrpc/auth_gss/gss_krb5_seal.c index b8f42ef7178e..88fe6e75ed7e 100644 --- a/net/sunrpc/auth_gss/gss_krb5_seal.c +++ b/net/sunrpc/auth_gss/gss_krb5_seal.c | |||
@@ -59,7 +59,6 @@ | |||
59 | */ | 59 | */ |
60 | 60 | ||
61 | #include <linux/types.h> | 61 | #include <linux/types.h> |
62 | #include <linux/slab.h> | ||
63 | #include <linux/jiffies.h> | 62 | #include <linux/jiffies.h> |
64 | #include <linux/sunrpc/gss_krb5.h> | 63 | #include <linux/sunrpc/gss_krb5.h> |
65 | #include <linux/random.h> | 64 | #include <linux/random.h> |
diff --git a/net/sunrpc/auth_gss/gss_krb5_seqnum.c b/net/sunrpc/auth_gss/gss_krb5_seqnum.c index 17562b4c35f6..6331cd6866ec 100644 --- a/net/sunrpc/auth_gss/gss_krb5_seqnum.c +++ b/net/sunrpc/auth_gss/gss_krb5_seqnum.c | |||
@@ -32,7 +32,6 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <linux/types.h> | 34 | #include <linux/types.h> |
35 | #include <linux/slab.h> | ||
36 | #include <linux/sunrpc/gss_krb5.h> | 35 | #include <linux/sunrpc/gss_krb5.h> |
37 | #include <linux/crypto.h> | 36 | #include <linux/crypto.h> |
38 | 37 | ||
diff --git a/net/sunrpc/auth_gss/gss_krb5_unseal.c b/net/sunrpc/auth_gss/gss_krb5_unseal.c index 066ec73c84d6..ce6c247edad0 100644 --- a/net/sunrpc/auth_gss/gss_krb5_unseal.c +++ b/net/sunrpc/auth_gss/gss_krb5_unseal.c | |||
@@ -58,7 +58,6 @@ | |||
58 | */ | 58 | */ |
59 | 59 | ||
60 | #include <linux/types.h> | 60 | #include <linux/types.h> |
61 | #include <linux/slab.h> | ||
62 | #include <linux/jiffies.h> | 61 | #include <linux/jiffies.h> |
63 | #include <linux/sunrpc/gss_krb5.h> | 62 | #include <linux/sunrpc/gss_krb5.h> |
64 | #include <linux/crypto.h> | 63 | #include <linux/crypto.h> |
diff --git a/net/sunrpc/auth_gss/gss_krb5_wrap.c b/net/sunrpc/auth_gss/gss_krb5_wrap.c index ae8e69b59c4c..a6e905637e03 100644 --- a/net/sunrpc/auth_gss/gss_krb5_wrap.c +++ b/net/sunrpc/auth_gss/gss_krb5_wrap.c | |||
@@ -1,5 +1,4 @@ | |||
1 | #include <linux/types.h> | 1 | #include <linux/types.h> |
2 | #include <linux/slab.h> | ||
3 | #include <linux/jiffies.h> | 2 | #include <linux/jiffies.h> |
4 | #include <linux/sunrpc/gss_krb5.h> | 3 | #include <linux/sunrpc/gss_krb5.h> |
5 | #include <linux/random.h> | 4 | #include <linux/random.h> |
diff --git a/net/sunrpc/auth_gss/gss_spkm3_seal.c b/net/sunrpc/auth_gss/gss_spkm3_seal.c index c832712f8d55..5a3a65a0e2b4 100644 --- a/net/sunrpc/auth_gss/gss_spkm3_seal.c +++ b/net/sunrpc/auth_gss/gss_spkm3_seal.c | |||
@@ -34,7 +34,6 @@ | |||
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
37 | #include <linux/slab.h> | ||
38 | #include <linux/jiffies.h> | 37 | #include <linux/jiffies.h> |
39 | #include <linux/sunrpc/gss_spkm3.h> | 38 | #include <linux/sunrpc/gss_spkm3.h> |
40 | #include <linux/random.h> | 39 | #include <linux/random.h> |
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index e34bc531fcb9..b81e790ef9f4 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
@@ -37,6 +37,7 @@ | |||
37 | * | 37 | * |
38 | */ | 38 | */ |
39 | 39 | ||
40 | #include <linux/slab.h> | ||
40 | #include <linux/types.h> | 41 | #include <linux/types.h> |
41 | #include <linux/module.h> | 42 | #include <linux/module.h> |
42 | #include <linux/pagemap.h> | 43 | #include <linux/pagemap.h> |
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c index 46b2647c5bd2..aac2f8b4ee21 100644 --- a/net/sunrpc/auth_unix.c +++ b/net/sunrpc/auth_unix.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> | 6 | * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/slab.h> | ||
9 | #include <linux/types.h> | 10 | #include <linux/types.h> |
10 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
11 | #include <linux/module.h> | 12 | #include <linux/module.h> |
diff --git a/net/sunrpc/backchannel_rqst.c b/net/sunrpc/backchannel_rqst.c index 553621fb2c41..cf06af3b63c6 100644 --- a/net/sunrpc/backchannel_rqst.c +++ b/net/sunrpc/backchannel_rqst.c | |||
@@ -22,6 +22,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
22 | ******************************************************************************/ | 22 | ******************************************************************************/ |
23 | 23 | ||
24 | #include <linux/tcp.h> | 24 | #include <linux/tcp.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/sunrpc/xprt.h> | 26 | #include <linux/sunrpc/xprt.h> |
26 | 27 | ||
27 | #ifdef RPC_DEBUG | 28 | #ifdef RPC_DEBUG |
diff --git a/net/sunrpc/bc_svc.c b/net/sunrpc/bc_svc.c index 8a610fb0cfec..7dcfe0cc3500 100644 --- a/net/sunrpc/bc_svc.c +++ b/net/sunrpc/bc_svc.c | |||
@@ -37,21 +37,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
37 | 37 | ||
38 | #define RPCDBG_FACILITY RPCDBG_SVCDSP | 38 | #define RPCDBG_FACILITY RPCDBG_SVCDSP |
39 | 39 | ||
40 | void bc_release_request(struct rpc_task *task) | ||
41 | { | ||
42 | struct rpc_rqst *req = task->tk_rqstp; | ||
43 | |||
44 | dprintk("RPC: bc_release_request: task= %p\n", task); | ||
45 | |||
46 | /* | ||
47 | * Release this request only if it's a backchannel | ||
48 | * preallocated request | ||
49 | */ | ||
50 | if (!bc_prealloc(req)) | ||
51 | return; | ||
52 | xprt_free_bc_request(req); | ||
53 | } | ||
54 | |||
55 | /* Empty callback ops */ | 40 | /* Empty callback ops */ |
56 | static const struct rpc_call_ops nfs41_callback_ops = { | 41 | static const struct rpc_call_ops nfs41_callback_ops = { |
57 | }; | 42 | }; |
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 154034b675bd..19c9983d5360 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -659,6 +659,7 @@ struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req, | |||
659 | task = rpc_new_task(&task_setup_data); | 659 | task = rpc_new_task(&task_setup_data); |
660 | if (!task) { | 660 | if (!task) { |
661 | xprt_free_bc_request(req); | 661 | xprt_free_bc_request(req); |
662 | task = ERR_PTR(-ENOMEM); | ||
662 | goto out; | 663 | goto out; |
663 | } | 664 | } |
664 | task->tk_rqstp = req; | 665 | task->tk_rqstp = req; |
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 8d63f8fd29b7..20e30c6f8355 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -587,6 +587,8 @@ static struct dentry *__rpc_lookup_create_exclusive(struct dentry *parent, | |||
587 | struct dentry *dentry; | 587 | struct dentry *dentry; |
588 | 588 | ||
589 | dentry = __rpc_lookup_create(parent, name); | 589 | dentry = __rpc_lookup_create(parent, name); |
590 | if (IS_ERR(dentry)) | ||
591 | return dentry; | ||
590 | if (dentry->d_inode == NULL) | 592 | if (dentry->d_inode == NULL) |
591 | return dentry; | 593 | return dentry; |
592 | dput(dentry); | 594 | dput(dentry); |
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index 3e3772d8eb92..121105355f60 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/slab.h> | ||
24 | #include <net/ipv6.h> | 25 | #include <net/ipv6.h> |
25 | 26 | ||
26 | #include <linux/sunrpc/clnt.h> | 27 | #include <linux/sunrpc/clnt.h> |
diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c index a661a3acb37e..10b4319ebbca 100644 --- a/net/sunrpc/socklib.c +++ b/net/sunrpc/socklib.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/compiler.h> | 9 | #include <linux/compiler.h> |
10 | #include <linux/netdevice.h> | 10 | #include <linux/netdevice.h> |
11 | #include <linux/gfp.h> | ||
11 | #include <linux/skbuff.h> | 12 | #include <linux/skbuff.h> |
12 | #include <linux/types.h> | 13 | #include <linux/types.h> |
13 | #include <linux/pagemap.h> | 14 | #include <linux/pagemap.h> |
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c index 1b4e6791ecf3..5785d2037f45 100644 --- a/net/sunrpc/stats.c +++ b/net/sunrpc/stats.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 8420a4205b76..d9017d64597e 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/kthread.h> | 21 | #include <linux/kthread.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <linux/sunrpc/types.h> | 24 | #include <linux/sunrpc/types.h> |
24 | #include <linux/sunrpc/xdr.h> | 25 | #include <linux/sunrpc/xdr.h> |
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 8f0f1fb3dc52..061b2e0f9118 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
10 | #include <linux/freezer.h> | 10 | #include <linux/freezer.h> |
11 | #include <linux/kthread.h> | 11 | #include <linux/kthread.h> |
12 | #include <linux/slab.h> | ||
12 | #include <net/sock.h> | 13 | #include <net/sock.h> |
13 | #include <linux/sunrpc/stats.h> | 14 | #include <linux/sunrpc/stats.h> |
14 | #include <linux/sunrpc/svc_xprt.h> | 15 | #include <linux/sunrpc/svc_xprt.h> |
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index afdcb0459a83..207311610988 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/seq_file.h> | 10 | #include <linux/seq_file.h> |
11 | #include <linux/hash.h> | 11 | #include <linux/hash.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/slab.h> | ||
13 | #include <net/sock.h> | 14 | #include <net/sock.h> |
14 | #include <net/ipv6.h> | 15 | #include <net/ipv6.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index 8bd690c48b69..2763fde88499 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/types.h> | 11 | #include <linux/types.h> |
11 | #include <linux/string.h> | 12 | #include <linux/string.h> |
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 469de292c23c..42f09ade0044 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -46,6 +46,7 @@ | |||
46 | 46 | ||
47 | #include <linux/sunrpc/clnt.h> | 47 | #include <linux/sunrpc/clnt.h> |
48 | #include <linux/sunrpc/metrics.h> | 48 | #include <linux/sunrpc/metrics.h> |
49 | #include <linux/sunrpc/bc_xprt.h> | ||
49 | 50 | ||
50 | #include "sunrpc.h" | 51 | #include "sunrpc.h" |
51 | 52 | ||
@@ -1032,21 +1033,16 @@ void xprt_release(struct rpc_task *task) | |||
1032 | if (req->rq_release_snd_buf) | 1033 | if (req->rq_release_snd_buf) |
1033 | req->rq_release_snd_buf(req); | 1034 | req->rq_release_snd_buf(req); |
1034 | 1035 | ||
1035 | /* | ||
1036 | * Early exit if this is a backchannel preallocated request. | ||
1037 | * There is no need to have it added to the RPC slot list. | ||
1038 | */ | ||
1039 | if (is_bc_request) | ||
1040 | return; | ||
1041 | |||
1042 | memset(req, 0, sizeof(*req)); /* mark unused */ | ||
1043 | |||
1044 | dprintk("RPC: %5u release request %p\n", task->tk_pid, req); | 1036 | dprintk("RPC: %5u release request %p\n", task->tk_pid, req); |
1037 | if (likely(!is_bc_request)) { | ||
1038 | memset(req, 0, sizeof(*req)); /* mark unused */ | ||
1045 | 1039 | ||
1046 | spin_lock(&xprt->reserve_lock); | 1040 | spin_lock(&xprt->reserve_lock); |
1047 | list_add(&req->rq_list, &xprt->free); | 1041 | list_add(&req->rq_list, &xprt->free); |
1048 | rpc_wake_up_next(&xprt->backlog); | 1042 | rpc_wake_up_next(&xprt->backlog); |
1049 | spin_unlock(&xprt->reserve_lock); | 1043 | spin_unlock(&xprt->reserve_lock); |
1044 | } else | ||
1045 | xprt_free_bc_request(req); | ||
1050 | } | 1046 | } |
1051 | 1047 | ||
1052 | /** | 1048 | /** |
diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c index 5b8a8ff93a25..d718b8fa9525 100644 --- a/net/sunrpc/xprtrdma/svc_rdma.c +++ b/net/sunrpc/xprtrdma/svc_rdma.c | |||
@@ -40,6 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | #include <linux/module.h> | 41 | #include <linux/module.h> |
42 | #include <linux/init.h> | 42 | #include <linux/init.h> |
43 | #include <linux/slab.h> | ||
43 | #include <linux/fs.h> | 44 | #include <linux/fs.h> |
44 | #include <linux/sysctl.h> | 45 | #include <linux/sysctl.h> |
45 | #include <linux/sunrpc/clnt.h> | 46 | #include <linux/sunrpc/clnt.h> |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index 3fa5751af0ec..fd90eb89842b 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/sunrpc/debug.h> | 43 | #include <linux/sunrpc/debug.h> |
44 | #include <linux/sunrpc/rpc_rdma.h> | 44 | #include <linux/sunrpc/rpc_rdma.h> |
45 | #include <linux/sched.h> | 45 | #include <linux/sched.h> |
46 | #include <linux/slab.h> | ||
46 | #include <linux/spinlock.h> | 47 | #include <linux/spinlock.h> |
47 | #include <rdma/ib_verbs.h> | 48 | #include <rdma/ib_verbs.h> |
48 | #include <rdma/rdma_cm.h> | 49 | #include <rdma/rdma_cm.h> |
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index f96c2fe6137b..187257b1d880 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c | |||
@@ -49,6 +49,7 @@ | |||
49 | 49 | ||
50 | #include <linux/module.h> | 50 | #include <linux/module.h> |
51 | #include <linux/init.h> | 51 | #include <linux/init.h> |
52 | #include <linux/slab.h> | ||
52 | #include <linux/seq_file.h> | 53 | #include <linux/seq_file.h> |
53 | 54 | ||
54 | #include "xprt_rdma.h" | 55 | #include "xprt_rdma.h" |
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 2209aa87d899..27015c6d8eb5 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c | |||
@@ -48,6 +48,7 @@ | |||
48 | */ | 48 | */ |
49 | 49 | ||
50 | #include <linux/pci.h> /* for Tavor hack below */ | 50 | #include <linux/pci.h> /* for Tavor hack below */ |
51 | #include <linux/slab.h> | ||
51 | 52 | ||
52 | #include "xprt_rdma.h" | 53 | #include "xprt_rdma.h" |
53 | 54 | ||
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index e4839c07c913..9847c30b5001 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -2251,9 +2251,6 @@ static struct rpc_xprt_ops xs_tcp_ops = { | |||
2251 | .buf_free = rpc_free, | 2251 | .buf_free = rpc_free, |
2252 | .send_request = xs_tcp_send_request, | 2252 | .send_request = xs_tcp_send_request, |
2253 | .set_retrans_timeout = xprt_set_retrans_timeout_def, | 2253 | .set_retrans_timeout = xprt_set_retrans_timeout_def, |
2254 | #if defined(CONFIG_NFS_V4_1) | ||
2255 | .release_request = bc_release_request, | ||
2256 | #endif /* CONFIG_NFS_V4_1 */ | ||
2257 | .close = xs_tcp_close, | 2254 | .close = xs_tcp_close, |
2258 | .destroy = xs_destroy, | 2255 | .destroy = xs_destroy, |
2259 | .print_stats = xs_tcp_print_stats, | 2256 | .print_stats = xs_tcp_print_stats, |
diff --git a/net/tipc/core.h b/net/tipc/core.h index a881f92a8537..c58a1d16563a 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h | |||
@@ -56,6 +56,7 @@ | |||
56 | #include <linux/netdevice.h> | 56 | #include <linux/netdevice.h> |
57 | #include <linux/in.h> | 57 | #include <linux/in.h> |
58 | #include <linux/list.h> | 58 | #include <linux/list.h> |
59 | #include <linux/slab.h> | ||
59 | #include <linux/vmalloc.h> | 60 | #include <linux/vmalloc.h> |
60 | 61 | ||
61 | /* | 62 | /* |
diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c index 524ba5696d4d..6230d16020c4 100644 --- a/net/tipc/eth_media.c +++ b/net/tipc/eth_media.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <net/tipc/tipc_bearer.h> | 38 | #include <net/tipc/tipc_bearer.h> |
39 | #include <net/tipc/tipc_msg.h> | 39 | #include <net/tipc/tipc_msg.h> |
40 | #include <linux/netdevice.h> | 40 | #include <linux/netdevice.h> |
41 | #include <linux/slab.h> | ||
41 | #include <net/net_namespace.h> | 42 | #include <net/net_namespace.h> |
42 | 43 | ||
43 | #define MAX_ETH_BEARERS 2 | 44 | #define MAX_ETH_BEARERS 2 |
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 4b235fc1c70f..cfb20b80b3a1 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -40,9 +40,9 @@ | |||
40 | #include <linux/socket.h> | 40 | #include <linux/socket.h> |
41 | #include <linux/errno.h> | 41 | #include <linux/errno.h> |
42 | #include <linux/mm.h> | 42 | #include <linux/mm.h> |
43 | #include <linux/slab.h> | ||
44 | #include <linux/poll.h> | 43 | #include <linux/poll.h> |
45 | #include <linux/fcntl.h> | 44 | #include <linux/fcntl.h> |
45 | #include <linux/gfp.h> | ||
46 | #include <asm/string.h> | 46 | #include <asm/string.h> |
47 | #include <asm/atomic.h> | 47 | #include <asm/atomic.h> |
48 | #include <net/sock.h> | 48 | #include <net/sock.h> |
diff --git a/net/unix/garbage.c b/net/unix/garbage.c index 19c17e4a0c8b..14c22c3768da 100644 --- a/net/unix/garbage.c +++ b/net/unix/garbage.c | |||
@@ -74,7 +74,6 @@ | |||
74 | #include <linux/un.h> | 74 | #include <linux/un.h> |
75 | #include <linux/net.h> | 75 | #include <linux/net.h> |
76 | #include <linux/fs.h> | 76 | #include <linux/fs.h> |
77 | #include <linux/slab.h> | ||
78 | #include <linux/skbuff.h> | 77 | #include <linux/skbuff.h> |
79 | #include <linux/netdevice.h> | 78 | #include <linux/netdevice.h> |
80 | #include <linux/file.h> | 79 | #include <linux/file.h> |
diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c index d095c7be10d0..397cffebb3b6 100644 --- a/net/unix/sysctl_net_unix.c +++ b/net/unix/sysctl_net_unix.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/sysctl.h> | 14 | #include <linux/sysctl.h> |
14 | 15 | ||
15 | #include <net/af_unix.h> | 16 | #include <net/af_unix.h> |
diff --git a/net/wimax/op-msg.c b/net/wimax/op-msg.c index 7718657e93dc..d5b7c3779c43 100644 --- a/net/wimax/op-msg.c +++ b/net/wimax/op-msg.c | |||
@@ -72,6 +72,7 @@ | |||
72 | * wimax_msg_send() | 72 | * wimax_msg_send() |
73 | */ | 73 | */ |
74 | #include <linux/device.h> | 74 | #include <linux/device.h> |
75 | #include <linux/slab.h> | ||
75 | #include <net/genetlink.h> | 76 | #include <net/genetlink.h> |
76 | #include <linux/netdevice.h> | 77 | #include <linux/netdevice.h> |
77 | #include <linux/wimax.h> | 78 | #include <linux/wimax.h> |
diff --git a/net/wimax/stack.c b/net/wimax/stack.c index 813e1eaea29b..1ed65dbdab03 100644 --- a/net/wimax/stack.c +++ b/net/wimax/stack.c | |||
@@ -51,6 +51,7 @@ | |||
51 | * wimax_rfkill_rm() | 51 | * wimax_rfkill_rm() |
52 | */ | 52 | */ |
53 | #include <linux/device.h> | 53 | #include <linux/device.h> |
54 | #include <linux/gfp.h> | ||
54 | #include <net/genetlink.h> | 55 | #include <net/genetlink.h> |
55 | #include <linux/netdevice.h> | 56 | #include <linux/netdevice.h> |
56 | #include <linux/wimax.h> | 57 | #include <linux/wimax.h> |
diff --git a/net/wireless/core.c b/net/wireless/core.c index 7fdb9409ad2a..6ac70c101523 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/err.h> | 9 | #include <linux/err.h> |
10 | #include <linux/list.h> | 10 | #include <linux/list.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/nl80211.h> | 12 | #include <linux/nl80211.h> |
12 | #include <linux/debugfs.h> | 13 | #include <linux/debugfs.h> |
13 | #include <linux/notifier.h> | 14 | #include <linux/notifier.h> |
diff --git a/net/wireless/debugfs.c b/net/wireless/debugfs.c index 2e4895615037..a4991a3efec0 100644 --- a/net/wireless/debugfs.c +++ b/net/wireless/debugfs.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
12 | #include "core.h" | 13 | #include "core.h" |
13 | #include "debugfs.h" | 14 | #include "debugfs.h" |
14 | 15 | ||
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index 6ef5a491fb4b..6a5acf750174 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/etherdevice.h> | 7 | #include <linux/etherdevice.h> |
8 | #include <linux/if_arp.h> | 8 | #include <linux/if_arp.h> |
9 | #include <linux/slab.h> | ||
9 | #include <net/cfg80211.h> | 10 | #include <net/cfg80211.h> |
10 | #include "wext-compat.h" | 11 | #include "wext-compat.h" |
11 | #include "nl80211.h" | 12 | #include "nl80211.h" |
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index 0855f0d32349..4bb734a95f57 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/netdevice.h> | 9 | #include <linux/netdevice.h> |
10 | #include <linux/nl80211.h> | 10 | #include <linux/nl80211.h> |
11 | #include <linux/slab.h> | ||
11 | #include <linux/wireless.h> | 12 | #include <linux/wireless.h> |
12 | #include <net/cfg80211.h> | 13 | #include <net/cfg80211.h> |
13 | #include <net/iw_handler.h> | 14 | #include <net/iw_handler.h> |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index a7fc3d83f5f6..596bf189549a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/if.h> | 7 | #include <linux/if.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/err.h> | 9 | #include <linux/err.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/list.h> | 11 | #include <linux/list.h> |
11 | #include <linux/if_ether.h> | 12 | #include <linux/if_ether.h> |
12 | #include <linux/ieee80211.h> | 13 | #include <linux/ieee80211.h> |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 81fcafc60150..422da20d1e5b 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -33,6 +33,7 @@ | |||
33 | * | 33 | * |
34 | */ | 34 | */ |
35 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
36 | #include <linux/slab.h> | ||
36 | #include <linux/list.h> | 37 | #include <linux/list.h> |
37 | #include <linux/random.h> | 38 | #include <linux/random.h> |
38 | #include <linux/nl80211.h> | 39 | #include <linux/nl80211.h> |
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 978cac3414b5..a026c6d56bd3 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Copyright 2008 Johannes Berg <johannes@sipsolutions.net> | 4 | * Copyright 2008 Johannes Berg <johannes@sipsolutions.net> |
5 | */ | 5 | */ |
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/slab.h> | ||
7 | #include <linux/module.h> | 8 | #include <linux/module.h> |
8 | #include <linux/netdevice.h> | 9 | #include <linux/netdevice.h> |
9 | #include <linux/wireless.h> | 10 | #include <linux/wireless.h> |
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 17fde0da1b08..f4dfd5f5f2ea 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/etherdevice.h> | 8 | #include <linux/etherdevice.h> |
9 | #include <linux/if_arp.h> | 9 | #include <linux/if_arp.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/workqueue.h> | 11 | #include <linux/workqueue.h> |
11 | #include <linux/wireless.h> | 12 | #include <linux/wireless.h> |
12 | #include <net/iw_handler.h> | 13 | #include <net/iw_handler.h> |
diff --git a/net/wireless/util.c b/net/wireless/util.c index be2ab8c59e3a..d3574a4eb3ba 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -5,6 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | #include <linux/bitops.h> | 6 | #include <linux/bitops.h> |
7 | #include <linux/etherdevice.h> | 7 | #include <linux/etherdevice.h> |
8 | #include <linux/slab.h> | ||
8 | #include <net/cfg80211.h> | 9 | #include <net/cfg80211.h> |
9 | #include <net/ip.h> | 10 | #include <net/ip.h> |
10 | #include "core.h" | 11 | #include "core.h" |
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index 9ab51838849e..a60a2773b497 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/nl80211.h> | 12 | #include <linux/nl80211.h> |
13 | #include <linux/if_arp.h> | 13 | #include <linux/if_arp.h> |
14 | #include <linux/etherdevice.h> | 14 | #include <linux/etherdevice.h> |
15 | #include <linux/slab.h> | ||
15 | #include <net/iw_handler.h> | 16 | #include <net/iw_handler.h> |
16 | #include <net/cfg80211.h> | 17 | #include <net/cfg80211.h> |
17 | #include "wext-compat.h" | 18 | #include "wext-compat.h" |
diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c index bfcbeee23f9c..0ef17bc42bac 100644 --- a/net/wireless/wext-core.c +++ b/net/wireless/wext-core.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/netdevice.h> | 11 | #include <linux/netdevice.h> |
12 | #include <linux/rtnetlink.h> | 12 | #include <linux/rtnetlink.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/wireless.h> | 14 | #include <linux/wireless.h> |
14 | #include <linux/uaccess.h> | 15 | #include <linux/uaccess.h> |
15 | #include <net/cfg80211.h> | 16 | #include <net/cfg80211.h> |
diff --git a/net/wireless/wext-priv.c b/net/wireless/wext-priv.c index a3c2277de9e5..3feb28e41c53 100644 --- a/net/wireless/wext-priv.c +++ b/net/wireless/wext-priv.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * | 7 | * |
8 | * (As all part of the Linux kernel, this file is GPL) | 8 | * (As all part of the Linux kernel, this file is GPL) |
9 | */ | 9 | */ |
10 | #include <linux/slab.h> | ||
10 | #include <linux/wireless.h> | 11 | #include <linux/wireless.h> |
11 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
12 | #include <net/iw_handler.h> | 13 | #include <net/iw_handler.h> |
diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c index 5615a8802536..d5c6140f4cb8 100644 --- a/net/wireless/wext-sme.c +++ b/net/wireless/wext-sme.c | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/etherdevice.h> | 8 | #include <linux/etherdevice.h> |
9 | #include <linux/if_arp.h> | 9 | #include <linux/if_arp.h> |
10 | #include <linux/slab.h> | ||
10 | #include <net/cfg80211.h> | 11 | #include <net/cfg80211.h> |
11 | #include "wext-compat.h" | 12 | #include "wext-compat.h" |
12 | #include "nl80211.h" | 13 | #include "nl80211.h" |
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 9796f3ed1edb..cbddd0cb83f1 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/netdevice.h> | 47 | #include <linux/netdevice.h> |
48 | #include <linux/if_arp.h> | 48 | #include <linux/if_arp.h> |
49 | #include <linux/skbuff.h> | 49 | #include <linux/skbuff.h> |
50 | #include <linux/slab.h> | ||
50 | #include <net/sock.h> | 51 | #include <net/sock.h> |
51 | #include <net/tcp_states.h> | 52 | #include <net/tcp_states.h> |
52 | #include <asm/uaccess.h> | 53 | #include <asm/uaccess.h> |
@@ -82,6 +83,41 @@ struct compat_x25_subscrip_struct { | |||
82 | }; | 83 | }; |
83 | #endif | 84 | #endif |
84 | 85 | ||
86 | |||
87 | int x25_parse_address_block(struct sk_buff *skb, | ||
88 | struct x25_address *called_addr, | ||
89 | struct x25_address *calling_addr) | ||
90 | { | ||
91 | unsigned char len; | ||
92 | int needed; | ||
93 | int rc; | ||
94 | |||
95 | if (skb->len < 1) { | ||
96 | /* packet has no address block */ | ||
97 | rc = 0; | ||
98 | goto empty; | ||
99 | } | ||
100 | |||
101 | len = *skb->data; | ||
102 | needed = 1 + (len >> 4) + (len & 0x0f); | ||
103 | |||
104 | if (skb->len < needed) { | ||
105 | /* packet is too short to hold the addresses it claims | ||
106 | to hold */ | ||
107 | rc = -1; | ||
108 | goto empty; | ||
109 | } | ||
110 | |||
111 | return x25_addr_ntoa(skb->data, called_addr, calling_addr); | ||
112 | |||
113 | empty: | ||
114 | *called_addr->x25_addr = 0; | ||
115 | *calling_addr->x25_addr = 0; | ||
116 | |||
117 | return rc; | ||
118 | } | ||
119 | |||
120 | |||
85 | int x25_addr_ntoa(unsigned char *p, struct x25_address *called_addr, | 121 | int x25_addr_ntoa(unsigned char *p, struct x25_address *called_addr, |
86 | struct x25_address *calling_addr) | 122 | struct x25_address *calling_addr) |
87 | { | 123 | { |
@@ -553,7 +589,8 @@ static int x25_create(struct net *net, struct socket *sock, int protocol, | |||
553 | x25->facilities.winsize_out = X25_DEFAULT_WINDOW_SIZE; | 589 | x25->facilities.winsize_out = X25_DEFAULT_WINDOW_SIZE; |
554 | x25->facilities.pacsize_in = X25_DEFAULT_PACKET_SIZE; | 590 | x25->facilities.pacsize_in = X25_DEFAULT_PACKET_SIZE; |
555 | x25->facilities.pacsize_out = X25_DEFAULT_PACKET_SIZE; | 591 | x25->facilities.pacsize_out = X25_DEFAULT_PACKET_SIZE; |
556 | x25->facilities.throughput = X25_DEFAULT_THROUGHPUT; | 592 | x25->facilities.throughput = 0; /* by default don't negotiate |
593 | throughput */ | ||
557 | x25->facilities.reverse = X25_DEFAULT_REVERSE; | 594 | x25->facilities.reverse = X25_DEFAULT_REVERSE; |
558 | x25->dte_facilities.calling_len = 0; | 595 | x25->dte_facilities.calling_len = 0; |
559 | x25->dte_facilities.called_len = 0; | 596 | x25->dte_facilities.called_len = 0; |
@@ -921,16 +958,26 @@ int x25_rx_call_request(struct sk_buff *skb, struct x25_neigh *nb, | |||
921 | /* | 958 | /* |
922 | * Extract the X.25 addresses and convert them to ASCII strings, | 959 | * Extract the X.25 addresses and convert them to ASCII strings, |
923 | * and remove them. | 960 | * and remove them. |
961 | * | ||
962 | * Address block is mandatory in call request packets | ||
924 | */ | 963 | */ |
925 | addr_len = x25_addr_ntoa(skb->data, &source_addr, &dest_addr); | 964 | addr_len = x25_parse_address_block(skb, &source_addr, &dest_addr); |
965 | if (addr_len <= 0) | ||
966 | goto out_clear_request; | ||
926 | skb_pull(skb, addr_len); | 967 | skb_pull(skb, addr_len); |
927 | 968 | ||
928 | /* | 969 | /* |
929 | * Get the length of the facilities, skip past them for the moment | 970 | * Get the length of the facilities, skip past them for the moment |
930 | * get the call user data because this is needed to determine | 971 | * get the call user data because this is needed to determine |
931 | * the correct listener | 972 | * the correct listener |
973 | * | ||
974 | * Facilities length is mandatory in call request packets | ||
932 | */ | 975 | */ |
976 | if (skb->len < 1) | ||
977 | goto out_clear_request; | ||
933 | len = skb->data[0] + 1; | 978 | len = skb->data[0] + 1; |
979 | if (skb->len < len) | ||
980 | goto out_clear_request; | ||
934 | skb_pull(skb,len); | 981 | skb_pull(skb,len); |
935 | 982 | ||
936 | /* | 983 | /* |
@@ -1414,9 +1461,20 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
1414 | if (facilities.winsize_in < 1 || | 1461 | if (facilities.winsize_in < 1 || |
1415 | facilities.winsize_in > 127) | 1462 | facilities.winsize_in > 127) |
1416 | break; | 1463 | break; |
1417 | if (facilities.throughput < 0x03 || | 1464 | if (facilities.throughput) { |
1418 | facilities.throughput > 0xDD) | 1465 | int out = facilities.throughput & 0xf0; |
1419 | break; | 1466 | int in = facilities.throughput & 0x0f; |
1467 | if (!out) | ||
1468 | facilities.throughput |= | ||
1469 | X25_DEFAULT_THROUGHPUT << 4; | ||
1470 | else if (out < 0x30 || out > 0xD0) | ||
1471 | break; | ||
1472 | if (!in) | ||
1473 | facilities.throughput |= | ||
1474 | X25_DEFAULT_THROUGHPUT; | ||
1475 | else if (in < 0x03 || in > 0x0D) | ||
1476 | break; | ||
1477 | } | ||
1420 | if (facilities.reverse && | 1478 | if (facilities.reverse && |
1421 | (facilities.reverse & 0x81) != 0x81) | 1479 | (facilities.reverse & 0x81) != 0x81) |
1422 | break; | 1480 | break; |
diff --git a/net/x25/x25_dev.c b/net/x25/x25_dev.c index 52e304212241..b9ef682230a0 100644 --- a/net/x25/x25_dev.c +++ b/net/x25/x25_dev.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/netdevice.h> | 21 | #include <linux/netdevice.h> |
22 | #include <linux/skbuff.h> | 22 | #include <linux/skbuff.h> |
23 | #include <linux/slab.h> | ||
23 | #include <net/sock.h> | 24 | #include <net/sock.h> |
24 | #include <linux/if_arp.h> | 25 | #include <linux/if_arp.h> |
25 | #include <net/x25.h> | 26 | #include <net/x25.h> |
diff --git a/net/x25/x25_facilities.c b/net/x25/x25_facilities.c index a21f6646eb3a..771bab00754b 100644 --- a/net/x25/x25_facilities.c +++ b/net/x25/x25_facilities.c | |||
@@ -35,7 +35,7 @@ int x25_parse_facilities(struct sk_buff *skb, struct x25_facilities *facilities, | |||
35 | struct x25_dte_facilities *dte_facs, unsigned long *vc_fac_mask) | 35 | struct x25_dte_facilities *dte_facs, unsigned long *vc_fac_mask) |
36 | { | 36 | { |
37 | unsigned char *p = skb->data; | 37 | unsigned char *p = skb->data; |
38 | unsigned int len = *p++; | 38 | unsigned int len; |
39 | 39 | ||
40 | *vc_fac_mask = 0; | 40 | *vc_fac_mask = 0; |
41 | 41 | ||
@@ -50,6 +50,14 @@ int x25_parse_facilities(struct sk_buff *skb, struct x25_facilities *facilities, | |||
50 | memset(dte_facs->called_ae, '\0', sizeof(dte_facs->called_ae)); | 50 | memset(dte_facs->called_ae, '\0', sizeof(dte_facs->called_ae)); |
51 | memset(dte_facs->calling_ae, '\0', sizeof(dte_facs->calling_ae)); | 51 | memset(dte_facs->calling_ae, '\0', sizeof(dte_facs->calling_ae)); |
52 | 52 | ||
53 | if (skb->len < 1) | ||
54 | return 0; | ||
55 | |||
56 | len = *p++; | ||
57 | |||
58 | if (len >= skb->len) | ||
59 | return -1; | ||
60 | |||
53 | while (len > 0) { | 61 | while (len > 0) { |
54 | switch (*p & X25_FAC_CLASS_MASK) { | 62 | switch (*p & X25_FAC_CLASS_MASK) { |
55 | case X25_FAC_CLASS_A: | 63 | case X25_FAC_CLASS_A: |
@@ -247,6 +255,8 @@ int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk, | |||
247 | memcpy(new, ours, sizeof(*new)); | 255 | memcpy(new, ours, sizeof(*new)); |
248 | 256 | ||
249 | len = x25_parse_facilities(skb, &theirs, dte, &x25->vc_facil_mask); | 257 | len = x25_parse_facilities(skb, &theirs, dte, &x25->vc_facil_mask); |
258 | if (len < 0) | ||
259 | return len; | ||
250 | 260 | ||
251 | /* | 261 | /* |
252 | * They want reverse charging, we won't accept it. | 262 | * They want reverse charging, we won't accept it. |
@@ -259,9 +269,18 @@ int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk, | |||
259 | new->reverse = theirs.reverse; | 269 | new->reverse = theirs.reverse; |
260 | 270 | ||
261 | if (theirs.throughput) { | 271 | if (theirs.throughput) { |
262 | if (theirs.throughput < ours->throughput) { | 272 | int theirs_in = theirs.throughput & 0x0f; |
263 | SOCK_DEBUG(sk, "X.25: throughput negotiated down\n"); | 273 | int theirs_out = theirs.throughput & 0xf0; |
264 | new->throughput = theirs.throughput; | 274 | int ours_in = ours->throughput & 0x0f; |
275 | int ours_out = ours->throughput & 0xf0; | ||
276 | if (!ours_in || theirs_in < ours_in) { | ||
277 | SOCK_DEBUG(sk, "X.25: inbound throughput negotiated\n"); | ||
278 | new->throughput = (new->throughput & 0xf0) | theirs_in; | ||
279 | } | ||
280 | if (!ours_out || theirs_out < ours_out) { | ||
281 | SOCK_DEBUG(sk, | ||
282 | "X.25: outbound throughput negotiated\n"); | ||
283 | new->throughput = (new->throughput & 0x0f) | theirs_out; | ||
265 | } | 284 | } |
266 | } | 285 | } |
267 | 286 | ||
diff --git a/net/x25/x25_forward.c b/net/x25/x25_forward.c index 056a55f3a871..25a810793968 100644 --- a/net/x25/x25_forward.c +++ b/net/x25/x25_forward.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/if_arp.h> | 11 | #include <linux/if_arp.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/slab.h> | ||
13 | #include <net/x25.h> | 14 | #include <net/x25.h> |
14 | 15 | ||
15 | LIST_HEAD(x25_forward_list); | 16 | LIST_HEAD(x25_forward_list); |
diff --git a/net/x25/x25_in.c b/net/x25/x25_in.c index 96d922783547..372ac226e648 100644 --- a/net/x25/x25_in.c +++ b/net/x25/x25_in.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * i-frames. | 23 | * i-frames. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/slab.h> | ||
26 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
27 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
28 | #include <linux/string.h> | 29 | #include <linux/string.h> |
@@ -89,6 +90,7 @@ static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more) | |||
89 | static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype) | 90 | static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype) |
90 | { | 91 | { |
91 | struct x25_address source_addr, dest_addr; | 92 | struct x25_address source_addr, dest_addr; |
93 | int len; | ||
92 | 94 | ||
93 | switch (frametype) { | 95 | switch (frametype) { |
94 | case X25_CALL_ACCEPTED: { | 96 | case X25_CALL_ACCEPTED: { |
@@ -106,11 +108,17 @@ static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametyp | |||
106 | * Parse the data in the frame. | 108 | * Parse the data in the frame. |
107 | */ | 109 | */ |
108 | skb_pull(skb, X25_STD_MIN_LEN); | 110 | skb_pull(skb, X25_STD_MIN_LEN); |
109 | skb_pull(skb, x25_addr_ntoa(skb->data, &source_addr, &dest_addr)); | 111 | |
110 | skb_pull(skb, | 112 | len = x25_parse_address_block(skb, &source_addr, |
111 | x25_parse_facilities(skb, &x25->facilities, | 113 | &dest_addr); |
114 | if (len > 0) | ||
115 | skb_pull(skb, len); | ||
116 | |||
117 | len = x25_parse_facilities(skb, &x25->facilities, | ||
112 | &x25->dte_facilities, | 118 | &x25->dte_facilities, |
113 | &x25->vc_facil_mask)); | 119 | &x25->vc_facil_mask); |
120 | if (len > 0) | ||
121 | skb_pull(skb, len); | ||
114 | /* | 122 | /* |
115 | * Copy any Call User Data. | 123 | * Copy any Call User Data. |
116 | */ | 124 | */ |
diff --git a/net/x25/x25_link.c b/net/x25/x25_link.c index e4e1b6e49538..73e7b954ad28 100644 --- a/net/x25/x25_link.c +++ b/net/x25/x25_link.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/jiffies.h> | 25 | #include <linux/jiffies.h> |
26 | #include <linux/timer.h> | 26 | #include <linux/timer.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/netdevice.h> | 28 | #include <linux/netdevice.h> |
28 | #include <linux/skbuff.h> | 29 | #include <linux/skbuff.h> |
29 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
diff --git a/net/x25/x25_out.c b/net/x25/x25_out.c index 2b96b52114d6..52351a26b6fc 100644 --- a/net/x25/x25_out.c +++ b/net/x25/x25_out.c | |||
@@ -22,6 +22,7 @@ | |||
22 | * needed cleaned seq-number fields. | 22 | * needed cleaned seq-number fields. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/slab.h> | ||
25 | #include <linux/socket.h> | 26 | #include <linux/socket.h> |
26 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
27 | #include <linux/string.h> | 28 | #include <linux/string.h> |
diff --git a/net/x25/x25_route.c b/net/x25/x25_route.c index b95fae9ab393..97d77c532d8c 100644 --- a/net/x25/x25_route.c +++ b/net/x25/x25_route.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/if_arp.h> | 20 | #include <linux/if_arp.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/slab.h> | ||
22 | #include <net/x25.h> | 23 | #include <net/x25.h> |
23 | 24 | ||
24 | LIST_HEAD(x25_route_list); | 25 | LIST_HEAD(x25_route_list); |
diff --git a/net/x25/x25_subr.c b/net/x25/x25_subr.c index 352b32d216fc..dc20cf12f39b 100644 --- a/net/x25/x25_subr.c +++ b/net/x25/x25_subr.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * restriction on response. | 23 | * restriction on response. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/slab.h> | ||
26 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
27 | #include <linux/string.h> | 28 | #include <linux/string.h> |
28 | #include <linux/skbuff.h> | 29 | #include <linux/skbuff.h> |
diff --git a/net/xfrm/xfrm_ipcomp.c b/net/xfrm/xfrm_ipcomp.c index 0fc5ff66d1fa..fc91ad7ee26e 100644 --- a/net/xfrm/xfrm_ipcomp.c +++ b/net/xfrm/xfrm_ipcomp.c | |||
@@ -17,11 +17,11 @@ | |||
17 | 17 | ||
18 | #include <linux/crypto.h> | 18 | #include <linux/crypto.h> |
19 | #include <linux/err.h> | 19 | #include <linux/err.h> |
20 | #include <linux/gfp.h> | ||
21 | #include <linux/list.h> | 20 | #include <linux/list.h> |
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
23 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
24 | #include <linux/percpu.h> | 23 | #include <linux/percpu.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/smp.h> | 25 | #include <linux/smp.h> |
26 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
27 | #include <net/ip.h> | 27 | #include <net/ip.h> |
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c index b9fe13138c07..6a329158bdfa 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/netdevice.h> | 14 | #include <linux/netdevice.h> |
15 | #include <linux/netfilter.h> | 15 | #include <linux/netfilter.h> |
16 | #include <linux/skbuff.h> | 16 | #include <linux/skbuff.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
18 | #include <net/dst.h> | 19 | #include <net/dst.h> |
19 | #include <net/xfrm.h> | 20 | #include <net/xfrm.h> |
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 71f8f33d637b..5208b12fbfb4 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/audit.h> | 22 | #include <linux/audit.h> |
23 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
24 | #include <linux/ktime.h> | 24 | #include <linux/ktime.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
26 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
27 | 28 | ||
diff --git a/net/xfrm/xfrm_sysctl.c b/net/xfrm/xfrm_sysctl.c index 2c4d6cdcba49..05640bc9594b 100644 --- a/net/xfrm/xfrm_sysctl.c +++ b/net/xfrm/xfrm_sysctl.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/sysctl.h> | 1 | #include <linux/sysctl.h> |
2 | #include <linux/slab.h> | ||
2 | #include <net/net_namespace.h> | 3 | #include <net/net_namespace.h> |
3 | #include <net/xfrm.h> | 4 | #include <net/xfrm.h> |
4 | 5 | ||
diff --git a/samples/kobject/kset-example.c b/samples/kobject/kset-example.c index 3b126d1f8599..d0c687fd9802 100644 --- a/samples/kobject/kset-example.c +++ b/samples/kobject/kset-example.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/kobject.h> | 10 | #include <linux/kobject.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/sysfs.h> | 12 | #include <linux/sysfs.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | 16 | ||
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index f76f3d13276d..6f97a13bcee4 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
@@ -284,7 +284,7 @@ foreach my $file (@ARGV) { | |||
284 | my $file_cnt = @files; | 284 | my $file_cnt = @files; |
285 | my $lastfile; | 285 | my $lastfile; |
286 | 286 | ||
287 | open(my $patch, '<', $file) | 287 | open(my $patch, "< $file") |
288 | or die "$P: Can't open $file: $!\n"; | 288 | or die "$P: Can't open $file: $!\n"; |
289 | while (<$patch>) { | 289 | while (<$patch>) { |
290 | my $patch_line = $_; | 290 | my $patch_line = $_; |
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index c7865c362d28..fcdfb245a575 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -1424,6 +1424,8 @@ sub dump_struct($$) { | |||
1424 | $nested =~ s/\/\*.*?\*\///gos; | 1424 | $nested =~ s/\/\*.*?\*\///gos; |
1425 | # strip kmemcheck_bitfield_{begin,end}.*; | 1425 | # strip kmemcheck_bitfield_{begin,end}.*; |
1426 | $members =~ s/kmemcheck_bitfield_.*?;//gos; | 1426 | $members =~ s/kmemcheck_bitfield_.*?;//gos; |
1427 | # strip attributes | ||
1428 | $members =~ s/__aligned\s*\(\d+\)//gos; | ||
1427 | 1429 | ||
1428 | create_parameterlist($members, ';', $file); | 1430 | create_parameterlist($members, ';', $file); |
1429 | check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested); | 1431 | check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested); |
@@ -1728,6 +1730,7 @@ sub dump_function($$) { | |||
1728 | $prototype =~ s/^noinline +//; | 1730 | $prototype =~ s/^noinline +//; |
1729 | $prototype =~ s/__devinit +//; | 1731 | $prototype =~ s/__devinit +//; |
1730 | $prototype =~ s/__init +//; | 1732 | $prototype =~ s/__init +//; |
1733 | $prototype =~ s/__init_or_module +//; | ||
1731 | $prototype =~ s/^#\s*define\s+//; #ak added | 1734 | $prototype =~ s/^#\s*define\s+//; #ak added |
1732 | $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; | 1735 | $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; |
1733 | 1736 | ||
diff --git a/security/device_cgroup.c b/security/device_cgroup.c index 6cf8fd2b79e8..f77c60423992 100644 --- a/security/device_cgroup.c +++ b/security/device_cgroup.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/list.h> | 10 | #include <linux/list.h> |
11 | #include <linux/uaccess.h> | 11 | #include <linux/uaccess.h> |
12 | #include <linux/seq_file.h> | 12 | #include <linux/seq_file.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/rcupdate.h> | 14 | #include <linux/rcupdate.h> |
14 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
15 | 16 | ||
diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c index 2a5e0bcf3887..52015d098fdf 100644 --- a/security/integrity/ima/ima_api.c +++ b/security/integrity/ima/ima_api.c | |||
@@ -13,6 +13,7 @@ | |||
13 | * and store_template. | 13 | * and store_template. |
14 | */ | 14 | */ |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #include "ima.h" | 18 | #include "ima.h" |
18 | static const char *IMA_TEMPLATE_NAME = "ima"; | 19 | static const char *IMA_TEMPLATE_NAME = "ima"; |
diff --git a/security/integrity/ima/ima_audit.c b/security/integrity/ima/ima_audit.c index ff513ff737f5..5af76340470c 100644 --- a/security/integrity/ima/ima_audit.c +++ b/security/integrity/ima/ima_audit.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/gfp.h> | ||
14 | #include <linux/audit.h> | 15 | #include <linux/audit.h> |
15 | #include "ima.h" | 16 | #include "ima.h" |
16 | 17 | ||
diff --git a/security/integrity/ima/ima_crypto.c b/security/integrity/ima/ima_crypto.c index 46642a19bc78..952e51373f58 100644 --- a/security/integrity/ima/ima_crypto.c +++ b/security/integrity/ima/ima_crypto.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/crypto.h> | 18 | #include <linux/crypto.h> |
19 | #include <linux/scatterlist.h> | 19 | #include <linux/scatterlist.h> |
20 | #include <linux/err.h> | 20 | #include <linux/err.h> |
21 | #include <linux/slab.h> | ||
21 | #include "ima.h" | 22 | #include "ima.h" |
22 | 23 | ||
23 | static int init_desc(struct hash_desc *desc) | 24 | static int init_desc(struct hash_desc *desc) |
diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c index 0c72c9c38956..07cb9c338cc4 100644 --- a/security/integrity/ima/ima_fs.c +++ b/security/integrity/ima/ima_fs.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * current measurement list and IMA statistics | 16 | * current measurement list and IMA statistics |
17 | */ | 17 | */ |
18 | #include <linux/fcntl.h> | 18 | #include <linux/fcntl.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/seq_file.h> | 21 | #include <linux/seq_file.h> |
21 | #include <linux/rculist.h> | 22 | #include <linux/rculist.h> |
diff --git a/security/integrity/ima/ima_iint.c b/security/integrity/ima/ima_iint.c index 2d4d05d92fda..2c744d488014 100644 --- a/security/integrity/ima/ima_iint.c +++ b/security/integrity/ima/ima_iint.c | |||
@@ -14,6 +14,7 @@ | |||
14 | * - cache integrity information associated with an inode | 14 | * - cache integrity information associated with an inode |
15 | * using a radix tree. | 15 | * using a radix tree. |
16 | */ | 16 | */ |
17 | #include <linux/slab.h> | ||
17 | #include <linux/module.h> | 18 | #include <linux/module.h> |
18 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
19 | #include <linux/radix-tree.h> | 20 | #include <linux/radix-tree.h> |
diff --git a/security/integrity/ima/ima_init.c b/security/integrity/ima/ima_init.c index a40da7ae5900..b1bcb702a27c 100644 --- a/security/integrity/ima/ima_init.c +++ b/security/integrity/ima/ima_init.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/scatterlist.h> | 18 | #include <linux/scatterlist.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/err.h> | 20 | #include <linux/err.h> |
20 | #include "ima.h" | 21 | #include "ima.h" |
21 | 22 | ||
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 294b005d6520..b2c89d9de2a4 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/binfmts.h> | 21 | #include <linux/binfmts.h> |
22 | #include <linux/mount.h> | 22 | #include <linux/mount.h> |
23 | #include <linux/mman.h> | 23 | #include <linux/mman.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | #include "ima.h" | 26 | #include "ima.h" |
26 | 27 | ||
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index 4759d0f99335..8643a93c5963 100644 --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/security.h> | 15 | #include <linux/security.h> |
16 | #include <linux/magic.h> | 16 | #include <linux/magic.h> |
17 | #include <linux/parser.h> | 17 | #include <linux/parser.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include "ima.h" | 20 | #include "ima.h" |
20 | 21 | ||
diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c index a0880e9c8e05..46ba62b1adf5 100644 --- a/security/integrity/ima/ima_queue.c +++ b/security/integrity/ima/ima_queue.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/rculist.h> | 22 | #include <linux/rculist.h> |
23 | #include <linux/slab.h> | ||
23 | #include "ima.h" | 24 | #include "ima.h" |
24 | 25 | ||
25 | LIST_HEAD(ima_measurements); /* list of all measurements */ | 26 | LIST_HEAD(ima_measurements); /* list of all measurements */ |
diff --git a/security/keys/proc.c b/security/keys/proc.c index 9d01021ca0c8..706d63f4f185 100644 --- a/security/keys/proc.c +++ b/security/keys/proc.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
17 | #include <linux/proc_fs.h> | 16 | #include <linux/proc_fs.h> |
18 | #include <linux/seq_file.h> | 17 | #include <linux/seq_file.h> |
diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c index 5c23afb31ece..06c2ccf26ed3 100644 --- a/security/keys/process_keys.c +++ b/security/keys/process_keys.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/slab.h> | ||
16 | #include <linux/keyctl.h> | 15 | #include <linux/keyctl.h> |
17 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
18 | #include <linux/err.h> | 17 | #include <linux/err.h> |
diff --git a/security/lsm_audit.c b/security/lsm_audit.c index acba3dfc8d29..893365b79a29 100644 --- a/security/lsm_audit.c +++ b/security/lsm_audit.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/stddef.h> | 15 | #include <linux/stddef.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/gfp.h> | ||
17 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <net/sock.h> | 20 | #include <net/sock.h> |
diff --git a/security/selinux/netif.c b/security/selinux/netif.c index b4e14bc0bf32..d6095d63d831 100644 --- a/security/selinux/netif.c +++ b/security/selinux/netif.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/stddef.h> | 20 | #include <linux/stddef.h> |
20 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
21 | #include <linux/list.h> | 22 | #include <linux/list.h> |
diff --git a/security/selinux/netlabel.c b/security/selinux/netlabel.c index 2534400317c5..628da72ee763 100644 --- a/security/selinux/netlabel.c +++ b/security/selinux/netlabel.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
31 | #include <linux/rcupdate.h> | 31 | #include <linux/rcupdate.h> |
32 | #include <linux/gfp.h> | ||
32 | #include <linux/ip.h> | 33 | #include <linux/ip.h> |
33 | #include <linux/ipv6.h> | 34 | #include <linux/ipv6.h> |
34 | #include <net/sock.h> | 35 | #include <net/sock.h> |
diff --git a/security/selinux/netlink.c b/security/selinux/netlink.c index 1ae556446e65..0e147b6914ad 100644 --- a/security/selinux/netlink.c +++ b/security/selinux/netlink.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/stddef.h> | 15 | #include <linux/stddef.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/list.h> | 17 | #include <linux/list.h> |
diff --git a/security/selinux/netnode.c b/security/selinux/netnode.c index 7100072bb1b0..dc92792271f1 100644 --- a/security/selinux/netnode.c +++ b/security/selinux/netnode.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/rcupdate.h> | 32 | #include <linux/rcupdate.h> |
33 | #include <linux/list.h> | 33 | #include <linux/list.h> |
34 | #include <linux/slab.h> | ||
34 | #include <linux/spinlock.h> | 35 | #include <linux/spinlock.h> |
35 | #include <linux/in.h> | 36 | #include <linux/in.h> |
36 | #include <linux/in6.h> | 37 | #include <linux/in6.h> |
diff --git a/security/selinux/netport.c b/security/selinux/netport.c index fe7fba67f19f..cfe2d72d3fb7 100644 --- a/security/selinux/netport.c +++ b/security/selinux/netport.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/rcupdate.h> | 31 | #include <linux/rcupdate.h> |
32 | #include <linux/list.h> | 32 | #include <linux/list.h> |
33 | #include <linux/slab.h> | ||
33 | #include <linux/spinlock.h> | 34 | #include <linux/spinlock.h> |
34 | #include <linux/in.h> | 35 | #include <linux/in.h> |
35 | #include <linux/in6.h> | 36 | #include <linux/in6.h> |
diff --git a/security/selinux/ss/symtab.c b/security/selinux/ss/symtab.c index 837658a98a54..bcf9f620426e 100644 --- a/security/selinux/ss/symtab.c +++ b/security/selinux/ss/symtab.c | |||
@@ -4,7 +4,6 @@ | |||
4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> | 4 | * Author : Stephen Smalley, <sds@epoch.ncsc.mil> |
5 | */ | 5 | */ |
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/slab.h> | ||
8 | #include <linux/string.h> | 7 | #include <linux/string.h> |
9 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
10 | #include "symtab.h" | 9 | #include "symtab.h" |
diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c index f3cb9ed731a9..fff78d3b51a2 100644 --- a/security/selinux/xfrm.c +++ b/security/selinux/xfrm.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/netfilter.h> | 38 | #include <linux/netfilter.h> |
39 | #include <linux/netfilter_ipv4.h> | 39 | #include <linux/netfilter_ipv4.h> |
40 | #include <linux/netfilter_ipv6.h> | 40 | #include <linux/netfilter_ipv6.h> |
41 | #include <linux/slab.h> | ||
41 | #include <linux/ip.h> | 42 | #include <linux/ip.h> |
42 | #include <linux/tcp.h> | 43 | #include <linux/tcp.h> |
43 | #include <linux/skbuff.h> | 44 | #include <linux/skbuff.h> |
diff --git a/security/smack/smack_access.c b/security/smack/smack_access.c index 0f9ac8146900..f4fac64c4da8 100644 --- a/security/smack/smack_access.c +++ b/security/smack/smack_access.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
15 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
16 | #include "smack.h" | 17 | #include "smack.h" |
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 5225e668dbf0..fdfeaa2f28ec 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/ip.h> | 25 | #include <linux/ip.h> |
26 | #include <linux/tcp.h> | 26 | #include <linux/tcp.h> |
27 | #include <linux/udp.h> | 27 | #include <linux/udp.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
29 | #include <linux/pipe_fs_i.h> | 30 | #include <linux/pipe_fs_i.h> |
30 | #include <net/netlabel.h> | 31 | #include <net/netlabel.h> |
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index aeead7585093..a2b72d77f926 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/vmalloc.h> | 20 | #include <linux/vmalloc.h> |
21 | #include <linux/security.h> | 21 | #include <linux/security.h> |
22 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
23 | #include <linux/slab.h> | ||
23 | #include <net/net_namespace.h> | 24 | #include <net/net_namespace.h> |
24 | #include <net/netlabel.h> | 25 | #include <net/netlabel.h> |
25 | #include <net/cipso_ipv4.h> | 26 | #include <net/cipso_ipv4.h> |
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c index ef89947a774b..975c45d88baa 100644 --- a/security/tomoyo/common.c +++ b/security/tomoyo/common.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/uaccess.h> | 12 | #include <linux/uaccess.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/security.h> | 14 | #include <linux/security.h> |
14 | #include <linux/hardirq.h> | 15 | #include <linux/hardirq.h> |
15 | #include "common.h" | 16 | #include "common.h" |
diff --git a/security/tomoyo/domain.c b/security/tomoyo/domain.c index 66caaa1b842a..acb8c397d5cf 100644 --- a/security/tomoyo/domain.c +++ b/security/tomoyo/domain.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include "common.h" | 12 | #include "common.h" |
13 | #include <linux/binfmts.h> | 13 | #include <linux/binfmts.h> |
14 | #include <linux/slab.h> | ||
14 | 15 | ||
15 | /* Variables definitions.*/ | 16 | /* Variables definitions.*/ |
16 | 17 | ||
diff --git a/security/tomoyo/file.c b/security/tomoyo/file.c index 1b24304edb7d..6f3fe76a1fde 100644 --- a/security/tomoyo/file.c +++ b/security/tomoyo/file.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "common.h" | 12 | #include "common.h" |
13 | #include <linux/slab.h> | ||
13 | 14 | ||
14 | /* Keyword array for single path operations. */ | 15 | /* Keyword array for single path operations. */ |
15 | static const char *tomoyo_path_keyword[TOMOYO_MAX_PATH_OPERATION] = { | 16 | static const char *tomoyo_path_keyword[TOMOYO_MAX_PATH_OPERATION] = { |
diff --git a/security/tomoyo/gc.c b/security/tomoyo/gc.c index 9645525ccdd4..d9ad35bc7fa8 100644 --- a/security/tomoyo/gc.c +++ b/security/tomoyo/gc.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include "common.h" | 10 | #include "common.h" |
11 | #include <linux/kthread.h> | 11 | #include <linux/kthread.h> |
12 | #include <linux/slab.h> | ||
12 | 13 | ||
13 | enum tomoyo_gc_id { | 14 | enum tomoyo_gc_id { |
14 | TOMOYO_ID_DOMAIN_INITIALIZER, | 15 | TOMOYO_ID_DOMAIN_INITIALIZER, |
diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c index cf7d61f781b9..c225c65ce426 100644 --- a/security/tomoyo/realpath.c +++ b/security/tomoyo/realpath.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/fs_struct.h> | 15 | #include <linux/fs_struct.h> |
16 | #include <linux/hash.h> | 16 | #include <linux/hash.h> |
17 | #include <linux/magic.h> | 17 | #include <linux/magic.h> |
18 | #include <linux/slab.h> | ||
18 | #include "common.h" | 19 | #include "common.h" |
19 | 20 | ||
20 | /** | 21 | /** |
diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c index 84bb07d39a7f..91852e49910e 100644 --- a/sound/aoa/codecs/onyx.c +++ b/sound/aoa/codecs/onyx.c | |||
@@ -33,6 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/slab.h> | ||
36 | MODULE_AUTHOR("Johannes Berg <johannes@sipsolutions.net>"); | 37 | MODULE_AUTHOR("Johannes Berg <johannes@sipsolutions.net>"); |
37 | MODULE_LICENSE("GPL"); | 38 | MODULE_LICENSE("GPL"); |
38 | MODULE_DESCRIPTION("pcm3052 (onyx) codec driver for snd-aoa"); | 39 | MODULE_DESCRIPTION("pcm3052 (onyx) codec driver for snd-aoa"); |
diff --git a/sound/aoa/codecs/tas.c b/sound/aoa/codecs/tas.c index 1dd66ddffcaf..fd2188c3df2b 100644 --- a/sound/aoa/codecs/tas.c +++ b/sound/aoa/codecs/tas.c | |||
@@ -66,6 +66,7 @@ | |||
66 | #include <linux/delay.h> | 66 | #include <linux/delay.h> |
67 | #include <linux/module.h> | 67 | #include <linux/module.h> |
68 | #include <linux/mutex.h> | 68 | #include <linux/mutex.h> |
69 | #include <linux/slab.h> | ||
69 | 70 | ||
70 | MODULE_AUTHOR("Johannes Berg <johannes@sipsolutions.net>"); | 71 | MODULE_AUTHOR("Johannes Berg <johannes@sipsolutions.net>"); |
71 | MODULE_LICENSE("GPL"); | 72 | MODULE_LICENSE("GPL"); |
diff --git a/sound/aoa/codecs/toonie.c b/sound/aoa/codecs/toonie.c index f13827e17562..69d2cb601f2a 100644 --- a/sound/aoa/codecs/toonie.c +++ b/sound/aoa/codecs/toonie.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/slab.h> | ||
14 | MODULE_AUTHOR("Johannes Berg <johannes@sipsolutions.net>"); | 15 | MODULE_AUTHOR("Johannes Berg <johannes@sipsolutions.net>"); |
15 | MODULE_LICENSE("GPL"); | 16 | MODULE_LICENSE("GPL"); |
16 | MODULE_DESCRIPTION("toonie codec driver for snd-aoa"); | 17 | MODULE_DESCRIPTION("toonie codec driver for snd-aoa"); |
diff --git a/sound/aoa/core/gpio-pmf.c b/sound/aoa/core/gpio-pmf.c index 1dd0c28d1fb7..6776d1c12b63 100644 --- a/sound/aoa/core/gpio-pmf.c +++ b/sound/aoa/core/gpio-pmf.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * GPL v2, can be found in COPYING. | 6 | * GPL v2, can be found in COPYING. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/slab.h> | ||
9 | #include <asm/pmac_feature.h> | 10 | #include <asm/pmac_feature.h> |
10 | #include <asm/pmac_pfunc.h> | 11 | #include <asm/pmac_pfunc.h> |
11 | #include "../aoa.h" | 12 | #include "../aoa.h" |
diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c index 7a437da05646..1cd9b301df03 100644 --- a/sound/aoa/fabrics/layout.c +++ b/sound/aoa/fabrics/layout.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/prom.h> | 12 | #include <asm/prom.h> |
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/slab.h> | ||
15 | #include "../aoa.h" | 16 | #include "../aoa.h" |
16 | #include "../soundbus/soundbus.h" | 17 | #include "../soundbus/soundbus.h" |
17 | 18 | ||
diff --git a/sound/aoa/soundbus/i2sbus/control.c b/sound/aoa/soundbus/i2sbus/control.c index 87beb4ad4d63..47f854c2001f 100644 --- a/sound/aoa/soundbus/i2sbus/control.c +++ b/sound/aoa/soundbus/i2sbus/control.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/delay.h> | 10 | #include <linux/delay.h> |
11 | #include <linux/slab.h> | ||
11 | 12 | ||
12 | #include <asm/io.h> | 13 | #include <asm/io.h> |
13 | #include <asm/prom.h> | 14 | #include <asm/prom.h> |
diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c index 4e3b819d4993..9d6f3b176ed1 100644 --- a/sound/aoa/soundbus/i2sbus/core.c +++ b/sound/aoa/soundbus/i2sbus/core.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/slab.h> | ||
10 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
11 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
12 | #include <linux/dma-mapping.h> | 13 | #include <linux/dma-mapping.h> |
diff --git a/sound/aoa/soundbus/i2sbus/pcm.c b/sound/aoa/soundbus/i2sbus/pcm.c index 59bacd365733..be838993926d 100644 --- a/sound/aoa/soundbus/i2sbus/pcm.c +++ b/sound/aoa/soundbus/i2sbus/pcm.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <asm/io.h> | 9 | #include <asm/io.h> |
10 | #include <linux/delay.h> | 10 | #include <linux/delay.h> |
11 | #include <linux/slab.h> | ||
11 | #include <sound/core.h> | 12 | #include <sound/core.h> |
12 | #include <asm/macio.h> | 13 | #include <asm/macio.h> |
13 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c index 743ac6a29065..8808b82311b1 100644 --- a/sound/arm/pxa2xx-pcm-lib.c +++ b/sound/arm/pxa2xx-pcm-lib.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * published by the Free Software Foundation. | 4 | * published by the Free Software Foundation. |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/slab.h> | ||
7 | #include <linux/module.h> | 8 | #include <linux/module.h> |
8 | #include <linux/dma-mapping.h> | 9 | #include <linux/dma-mapping.h> |
9 | 10 | ||
@@ -205,6 +206,7 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream) | |||
205 | if (!rtd->dma_desc_array) | 206 | if (!rtd->dma_desc_array) |
206 | goto err1; | 207 | goto err1; |
207 | 208 | ||
209 | rtd->dma_ch = -1; | ||
208 | runtime->private_data = rtd; | 210 | runtime->private_data = rtd; |
209 | return 0; | 211 | return 0; |
210 | 212 | ||
diff --git a/sound/core/control_compat.c b/sound/core/control_compat.c index 368dc9c4aef8..426874429a5e 100644 --- a/sound/core/control_compat.c +++ b/sound/core/control_compat.c | |||
@@ -21,6 +21,7 @@ | |||
21 | /* this file included from control.c */ | 21 | /* this file included from control.c */ |
22 | 22 | ||
23 | #include <linux/compat.h> | 23 | #include <linux/compat.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | struct snd_ctl_elem_list32 { | 26 | struct snd_ctl_elem_list32 { |
26 | u32 offset; | 27 | u32 offset; |
diff --git a/sound/core/hrtimer.c b/sound/core/hrtimer.c index 7f4d744ae40a..7730575bfadd 100644 --- a/sound/core/hrtimer.c +++ b/sound/core/hrtimer.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/module.h> | 23 | #include <linux/module.h> |
23 | #include <linux/moduleparam.h> | 24 | #include <linux/moduleparam.h> |
24 | #include <linux/hrtimer.h> | 25 | #include <linux/hrtimer.h> |
diff --git a/sound/core/info.c b/sound/core/info.c index d749a0d394a7..cc4a53d4b7f8 100644 --- a/sound/core/info.c +++ b/sound/core/info.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/time.h> | 23 | #include <linux/time.h> |
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/smp_lock.h> | 26 | #include <linux/smp_lock.h> |
26 | #include <linux/string.h> | 27 | #include <linux/string.h> |
27 | #include <sound/core.h> | 28 | #include <sound/core.h> |
diff --git a/sound/core/jack.c b/sound/core/jack.c index f705eec7372a..14b8a4ee690d 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/input.h> | 22 | #include <linux/input.h> |
23 | #include <linux/slab.h> | ||
23 | #include <sound/jack.h> | 24 | #include <sound/jack.h> |
24 | #include <sound/core.h> | 25 | #include <sound/core.h> |
25 | 26 | ||
diff --git a/sound/core/misc.c b/sound/core/misc.c index 3da4f92427d8..2c41825c836e 100644 --- a/sound/core/misc.c +++ b/sound/core/misc.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/time.h> | 23 | #include <linux/time.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/ioport.h> | 25 | #include <linux/ioport.h> |
25 | #include <sound/core.h> | 26 | #include <sound/core.h> |
26 | 27 | ||
diff --git a/sound/core/oss/route.c b/sound/core/oss/route.c index 0dcc2870d537..bbe25d8c450a 100644 --- a/sound/core/oss/route.c +++ b/sound/core/oss/route.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/slab.h> | ||
23 | #include <linux/time.h> | 22 | #include <linux/time.h> |
24 | #include <sound/core.h> | 23 | #include <sound/core.h> |
25 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
diff --git a/sound/core/pcm_compat.c b/sound/core/pcm_compat.c index 08bfed594a83..5fb2e28e796f 100644 --- a/sound/core/pcm_compat.c +++ b/sound/core/pcm_compat.c | |||
@@ -21,6 +21,7 @@ | |||
21 | /* This file included from pcm_native.c */ | 21 | /* This file included from pcm_native.c */ |
22 | 22 | ||
23 | #include <linux/compat.h> | 23 | #include <linux/compat.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | static int snd_pcm_ioctl_delay_compat(struct snd_pcm_substream *substream, | 26 | static int snd_pcm_ioctl_delay_compat(struct snd_pcm_substream *substream, |
26 | s32 __user *src) | 27 | s32 __user *src) |
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index b546ac2660f9..a2ff86189d2a 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -148,6 +148,9 @@ static void pcm_debug_name(struct snd_pcm_substream *substream, | |||
148 | 148 | ||
149 | #define xrun_debug(substream, mask) \ | 149 | #define xrun_debug(substream, mask) \ |
150 | ((substream)->pstr->xrun_debug & (mask)) | 150 | ((substream)->pstr->xrun_debug & (mask)) |
151 | #else | ||
152 | #define xrun_debug(substream, mask) 0 | ||
153 | #endif | ||
151 | 154 | ||
152 | #define dump_stack_on_xrun(substream) do { \ | 155 | #define dump_stack_on_xrun(substream) do { \ |
153 | if (xrun_debug(substream, XRUN_DEBUG_STACK)) \ | 156 | if (xrun_debug(substream, XRUN_DEBUG_STACK)) \ |
@@ -169,6 +172,7 @@ static void xrun(struct snd_pcm_substream *substream) | |||
169 | } | 172 | } |
170 | } | 173 | } |
171 | 174 | ||
175 | #ifdef CONFIG_SND_PCM_XRUN_DEBUG | ||
172 | #define hw_ptr_error(substream, fmt, args...) \ | 176 | #define hw_ptr_error(substream, fmt, args...) \ |
173 | do { \ | 177 | do { \ |
174 | if (xrun_debug(substream, XRUN_DEBUG_BASIC)) { \ | 178 | if (xrun_debug(substream, XRUN_DEBUG_BASIC)) { \ |
@@ -255,8 +259,6 @@ static void xrun_log_show(struct snd_pcm_substream *substream) | |||
255 | 259 | ||
256 | #else /* ! CONFIG_SND_PCM_XRUN_DEBUG */ | 260 | #else /* ! CONFIG_SND_PCM_XRUN_DEBUG */ |
257 | 261 | ||
258 | #define xrun_debug(substream, mask) 0 | ||
259 | #define xrun(substream) do { } while (0) | ||
260 | #define hw_ptr_error(substream, fmt, args...) do { } while (0) | 262 | #define hw_ptr_error(substream, fmt, args...) do { } while (0) |
261 | #define xrun_log(substream, pos) do { } while (0) | 263 | #define xrun_log(substream, pos) do { } while (0) |
262 | #define xrun_log_show(substream) do { } while (0) | 264 | #define xrun_log_show(substream) do { } while (0) |
diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c index d6d49d6651f9..917e4055ee30 100644 --- a/sound/core/pcm_memory.c +++ b/sound/core/pcm_memory.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #include <linux/time.h> | 23 | #include <linux/time.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/moduleparam.h> | 26 | #include <linux/moduleparam.h> |
26 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
27 | #include <sound/core.h> | 28 | #include <sound/core.h> |
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c index d0d721c22eac..685712276ac9 100644 --- a/sound/core/seq/oss/seq_oss_init.c +++ b/sound/core/seq/oss/seq_oss_init.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "seq_oss_event.h" | 29 | #include "seq_oss_event.h" |
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/moduleparam.h> | 31 | #include <linux/moduleparam.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | /* | 34 | /* |
34 | * common variables | 35 | * common variables |
diff --git a/sound/core/seq/oss/seq_oss_midi.c b/sound/core/seq/oss/seq_oss_midi.c index 9dfb2f77be60..677dc84590c7 100644 --- a/sound/core/seq/oss/seq_oss_midi.c +++ b/sound/core/seq/oss/seq_oss_midi.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <sound/seq_midi_event.h> | 28 | #include <sound/seq_midi_event.h> |
29 | #include "../seq_lock.h" | 29 | #include "../seq_lock.h" |
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/slab.h> | ||
31 | 32 | ||
32 | 33 | ||
33 | /* | 34 | /* |
diff --git a/sound/core/seq/oss/seq_oss_readq.c b/sound/core/seq/oss/seq_oss_readq.c index f5de79f29f1e..73661c4ab82a 100644 --- a/sound/core/seq/oss/seq_oss_readq.c +++ b/sound/core/seq/oss/seq_oss_readq.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <sound/seq_oss_legacy.h> | 25 | #include <sound/seq_oss_legacy.h> |
26 | #include "../seq_lock.h" | 26 | #include "../seq_lock.h" |
27 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | /* | 30 | /* |
30 | * constants | 31 | * constants |
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c index 945a27c34a9d..ee44ab9593c0 100644 --- a/sound/core/seq/oss/seq_oss_synth.c +++ b/sound/core/seq/oss/seq_oss_synth.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "seq_oss_midi.h" | 24 | #include "seq_oss_midi.h" |
25 | #include "../seq_lock.h" | 25 | #include "../seq_lock.h" |
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/slab.h> | ||
27 | 28 | ||
28 | /* | 29 | /* |
29 | * constants | 30 | * constants |
diff --git a/sound/core/seq/oss/seq_oss_timer.c b/sound/core/seq/oss/seq_oss_timer.c index c440fdacec93..ab59cbfbcaf2 100644 --- a/sound/core/seq/oss/seq_oss_timer.c +++ b/sound/core/seq/oss/seq_oss_timer.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "seq_oss_timer.h" | 23 | #include "seq_oss_timer.h" |
24 | #include "seq_oss_event.h" | 24 | #include "seq_oss_event.h" |
25 | #include <sound/seq_oss_legacy.h> | 25 | #include <sound/seq_oss_legacy.h> |
26 | #include <linux/slab.h> | ||
26 | 27 | ||
27 | /* | 28 | /* |
28 | */ | 29 | */ |
diff --git a/sound/core/seq/oss/seq_oss_writeq.c b/sound/core/seq/oss/seq_oss_writeq.c index 217424858191..d50338bbc21f 100644 --- a/sound/core/seq/oss/seq_oss_writeq.c +++ b/sound/core/seq/oss/seq_oss_writeq.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "../seq_lock.h" | 27 | #include "../seq_lock.h" |
28 | #include "../seq_clientmgr.h" | 28 | #include "../seq_clientmgr.h" |
29 | #include <linux/wait.h> | 29 | #include <linux/wait.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | 32 | ||
32 | /* | 33 | /* |
diff --git a/sound/core/seq/seq_compat.c b/sound/core/seq/seq_compat.c index c956fe462569..81f7c109dc46 100644 --- a/sound/core/seq/seq_compat.c +++ b/sound/core/seq/seq_compat.c | |||
@@ -21,6 +21,7 @@ | |||
21 | /* This file included from seq.c */ | 21 | /* This file included from seq.c */ |
22 | 22 | ||
23 | #include <linux/compat.h> | 23 | #include <linux/compat.h> |
24 | #include <linux/slab.h> | ||
24 | 25 | ||
25 | struct snd_seq_port_info32 { | 26 | struct snd_seq_port_info32 { |
26 | struct snd_seq_addr addr; /* client/port numbers */ | 27 | struct snd_seq_addr addr; /* client/port numbers */ |
diff --git a/sound/core/seq/seq_system.c b/sound/core/seq/seq_system.c index 77884e62b648..c38b90cf3cb0 100644 --- a/sound/core/seq/seq_system.c +++ b/sound/core/seq/seq_system.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/slab.h> | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include "seq_system.h" | 25 | #include "seq_system.h" |
25 | #include "seq_timer.h" | 26 | #include "seq_timer.h" |
diff --git a/sound/drivers/ml403-ac97cr.c b/sound/drivers/ml403-ac97cr.c index 1950ffce2b54..a1282c1c0591 100644 --- a/sound/drivers/ml403-ac97cr.c +++ b/sound/drivers/ml403-ac97cr.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/platform_device.h> | 39 | #include <linux/platform_device.h> |
40 | 40 | ||
41 | #include <linux/ioport.h> | 41 | #include <linux/ioport.h> |
42 | #include <linux/slab.h> | ||
42 | #include <linux/io.h> | 43 | #include <linux/io.h> |
43 | #include <linux/interrupt.h> | 44 | #include <linux/interrupt.h> |
44 | 45 | ||
diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c index 2f8f295d6b0c..da03597fc893 100644 --- a/sound/drivers/mtpav.c +++ b/sound/drivers/mtpav.c | |||
@@ -54,7 +54,6 @@ | |||
54 | #include <linux/interrupt.h> | 54 | #include <linux/interrupt.h> |
55 | #include <linux/err.h> | 55 | #include <linux/err.h> |
56 | #include <linux/platform_device.h> | 56 | #include <linux/platform_device.h> |
57 | #include <linux/slab.h> | ||
58 | #include <linux/ioport.h> | 57 | #include <linux/ioport.h> |
59 | #include <linux/moduleparam.h> | 58 | #include <linux/moduleparam.h> |
60 | #include <sound/core.h> | 59 | #include <sound/core.h> |
diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c index 9284829bf927..8539ab0a0893 100644 --- a/sound/drivers/mts64.c +++ b/sound/drivers/mts64.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/parport.h> | 23 | #include <linux/parport.h> |
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/slab.h> | ||
26 | #include <sound/core.h> | 27 | #include <sound/core.h> |
27 | #include <sound/initval.h> | 28 | #include <sound/initval.h> |
28 | #include <sound/rawmidi.h> | 29 | #include <sound/rawmidi.h> |
diff --git a/sound/drivers/opl3/opl3_oss.c b/sound/drivers/opl3/opl3_oss.c index a54b1dc5cc78..ade3ca52422e 100644 --- a/sound/drivers/opl3/opl3_oss.c +++ b/sound/drivers/opl3/opl3_oss.c | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include "opl3_voice.h" | 21 | #include "opl3_voice.h" |
22 | #include <linux/slab.h> | ||
23 | 22 | ||
24 | static int snd_opl3_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure); | 23 | static int snd_opl3_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure); |
25 | static int snd_opl3_close_seq_oss(struct snd_seq_oss_arg *arg); | 24 | static int snd_opl3_close_seq_oss(struct snd_seq_oss_arg *arg); |
diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c index 6d57b6441dec..301acb6b9cf9 100644 --- a/sound/drivers/opl3/opl3_synth.c +++ b/sound/drivers/opl3/opl3_synth.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * | 19 | * |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/slab.h> | ||
22 | #include <sound/opl3.h> | 23 | #include <sound/opl3.h> |
23 | #include <sound/asound_fm.h> | 24 | #include <sound/asound_fm.h> |
24 | 25 | ||
diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c index 01997f24c895..f07e38da59b8 100644 --- a/sound/drivers/opl4/opl4_lib.c +++ b/sound/drivers/opl4/opl4_lib.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include "opl4_local.h" | 20 | #include "opl4_local.h" |
21 | #include <sound/initval.h> | 21 | #include <sound/initval.h> |
22 | #include <linux/ioport.h> | 22 | #include <linux/ioport.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
25 | 26 | ||
diff --git a/sound/drivers/pcsp/pcsp_lib.c b/sound/drivers/pcsp/pcsp_lib.c index e1145ac6e908..d77ffa9a9387 100644 --- a/sound/drivers/pcsp/pcsp_lib.c +++ b/sound/drivers/pcsp/pcsp_lib.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/gfp.h> | ||
10 | #include <linux/moduleparam.h> | 11 | #include <linux/moduleparam.h> |
11 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
12 | #include <sound/pcm.h> | 13 | #include <sound/pcm.h> |
diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c index 60158e2e0eaf..f2b0ba22d9ce 100644 --- a/sound/drivers/portman2x4.c +++ b/sound/drivers/portman2x4.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/parport.h> | 42 | #include <linux/parport.h> |
43 | #include <linux/spinlock.h> | 43 | #include <linux/spinlock.h> |
44 | #include <linux/delay.h> | 44 | #include <linux/delay.h> |
45 | #include <linux/slab.h> | ||
45 | #include <sound/core.h> | 46 | #include <sound/core.h> |
46 | #include <sound/initval.h> | 47 | #include <sound/initval.h> |
47 | #include <sound/rawmidi.h> | 48 | #include <sound/rawmidi.h> |
diff --git a/sound/drivers/vx/vx_hwdep.c b/sound/drivers/vx/vx_hwdep.c index 46df8817c18f..f7a6fbd313e3 100644 --- a/sound/drivers/vx/vx_hwdep.c +++ b/sound/drivers/vx/vx_hwdep.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include <linux/firmware.h> | 24 | #include <linux/firmware.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
26 | #include <sound/core.h> | 27 | #include <sound/core.h> |
27 | #include <sound/hwdep.h> | 28 | #include <sound/hwdep.h> |
diff --git a/sound/i2c/other/ak4113.c b/sound/i2c/other/ak4113.c index fff62cc8607c..971a84a4fa77 100644 --- a/sound/i2c/other/ak4113.c +++ b/sound/i2c/other/ak4113.c | |||
@@ -70,7 +70,7 @@ static int snd_ak4113_dev_free(struct snd_device *device) | |||
70 | } | 70 | } |
71 | 71 | ||
72 | int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read, | 72 | int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read, |
73 | ak4113_write_t *write, const unsigned char pgm[5], | 73 | ak4113_write_t *write, const unsigned char *pgm, |
74 | void *private_data, struct ak4113 **r_ak4113) | 74 | void *private_data, struct ak4113 **r_ak4113) |
75 | { | 75 | { |
76 | struct ak4113 *chip; | 76 | struct ak4113 *chip; |
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c index c4c6ef73f9bf..ee538f1ae846 100644 --- a/sound/i2c/other/tea575x-tuner.c +++ b/sound/i2c/other/tea575x-tuner.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/version.h> | 28 | #include <linux/version.h> |
28 | #include <sound/core.h> | 29 | #include <sound/core.h> |
29 | #include <sound/tea575x-tuner.h> | 30 | #include <sound/tea575x-tuner.h> |
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index 8246aae32ab4..fe79a169acb5 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <linux/init.h> | 46 | #include <linux/init.h> |
47 | #include <linux/err.h> | 47 | #include <linux/err.h> |
48 | #include <linux/isa.h> | 48 | #include <linux/isa.h> |
49 | #include <linux/slab.h> | ||
50 | #include <linux/pnp.h> | 49 | #include <linux/pnp.h> |
51 | #include <linux/moduleparam.h> | 50 | #include <linux/moduleparam.h> |
52 | #include <sound/core.h> | 51 | #include <sound/core.h> |
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c index cc15d1d65a22..999dc1e0fdbd 100644 --- a/sound/isa/cs423x/cs4236.c +++ b/sound/isa/cs423x/cs4236.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
24 | #include <linux/isa.h> | 24 | #include <linux/isa.h> |
25 | #include <linux/slab.h> | ||
26 | #include <linux/pnp.h> | 25 | #include <linux/pnp.h> |
27 | #include <linux/moduleparam.h> | 26 | #include <linux/moduleparam.h> |
28 | #include <sound/core.h> | 27 | #include <sound/core.h> |
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index 9a43baae7250..fb4d6b34bbca 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c | |||
@@ -80,7 +80,6 @@ | |||
80 | #include <linux/init.h> | 80 | #include <linux/init.h> |
81 | #include <linux/err.h> | 81 | #include <linux/err.h> |
82 | #include <linux/isa.h> | 82 | #include <linux/isa.h> |
83 | #include <linux/slab.h> | ||
84 | #include <linux/pnp.h> | 83 | #include <linux/pnp.h> |
85 | #include <linux/isapnp.h> | 84 | #include <linux/isapnp.h> |
86 | #include <linux/moduleparam.h> | 85 | #include <linux/moduleparam.h> |
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index 534a6eced2b8..c7b80e4730fc 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/err.h> | 26 | #include <linux/err.h> |
27 | #include <linux/isa.h> | 27 | #include <linux/isa.h> |
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/pnp.h> | 29 | #include <linux/pnp.h> |
31 | #include <linux/moduleparam.h> | 30 | #include <linux/moduleparam.h> |
32 | #include <asm/dma.h> | 31 | #include <asm/dma.h> |
diff --git a/sound/isa/msnd/msnd_midi.c b/sound/isa/msnd/msnd_midi.c index 4be562b2cf21..787495674235 100644 --- a/sound/isa/msnd/msnd_midi.c +++ b/sound/isa/msnd/msnd_midi.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
29 | #include <linux/ioport.h> | 30 | #include <linux/ioport.h> |
30 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index 0481a55334b9..265abcce9dba 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/isa.h> | 24 | #include <linux/isa.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/pm.h> | 26 | #include <linux/pm.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/pnp.h> | 27 | #include <linux/pnp.h> |
29 | #include <linux/moduleparam.h> | 28 | #include <linux/moduleparam.h> |
30 | #include <sound/core.h> | 29 | #include <sound/core.h> |
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c index 5913717c1be6..8c24102d0d93 100644 --- a/sound/isa/opti9xx/miro.c +++ b/sound/isa/opti9xx/miro.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/isa.h> | 27 | #include <linux/isa.h> |
28 | #include <linux/pnp.h> | 28 | #include <linux/pnp.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/slab.h> | ||
31 | #include <linux/ioport.h> | 30 | #include <linux/ioport.h> |
32 | #include <linux/moduleparam.h> | 31 | #include <linux/moduleparam.h> |
33 | #include <asm/io.h> | 32 | #include <asm/io.h> |
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index 4d2d0405bdc7..c35dc68930dc 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/err.h> | 27 | #include <linux/err.h> |
28 | #include <linux/isa.h> | 28 | #include <linux/isa.h> |
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/slab.h> | ||
31 | #include <linux/pnp.h> | 30 | #include <linux/pnp.h> |
32 | #include <linux/moduleparam.h> | 31 | #include <linux/moduleparam.h> |
33 | #include <asm/io.h> | 32 | #include <asm/io.h> |
diff --git a/sound/isa/sb/emu8000_pcm.c b/sound/isa/sb/emu8000_pcm.c index 91dc3d83e2cf..ccedbfed061a 100644 --- a/sound/isa/sb/emu8000_pcm.c +++ b/sound/isa/sb/emu8000_pcm.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include "emu8000_local.h" | 21 | #include "emu8000_local.h" |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/slab.h> | ||
23 | #include <sound/initval.h> | 24 | #include <sound/initval.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
25 | 26 | ||
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c index 519c36346dec..4d1c5a300ff8 100644 --- a/sound/isa/sb/sb16.c +++ b/sound/isa/sb/sb16.c | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | #include <asm/dma.h> | 22 | #include <asm/dma.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/pnp.h> | 24 | #include <linux/pnp.h> |
26 | #include <linux/err.h> | 25 | #include <linux/err.h> |
27 | #include <linux/isa.h> | 26 | #include <linux/isa.h> |
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c index 3cd57ee54660..81284a8fa0ce 100644 --- a/sound/isa/sb/sb8.c +++ b/sound/isa/sb/sb8.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
24 | #include <linux/isa.h> | 24 | #include <linux/isa.h> |
25 | #include <linux/slab.h> | ||
26 | #include <linux/ioport.h> | 25 | #include <linux/ioport.h> |
27 | #include <linux/moduleparam.h> | 26 | #include <linux/moduleparam.h> |
28 | #include <sound/core.h> | 27 | #include <sound/core.h> |
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c index a34ae7b1f7d0..711670e4a425 100644 --- a/sound/isa/wavefront/wavefront.c +++ b/sound/isa/wavefront/wavefront.c | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/err.h> | 24 | #include <linux/err.h> |
26 | #include <linux/isa.h> | 25 | #include <linux/isa.h> |
27 | #include <linux/pnp.h> | 26 | #include <linux/pnp.h> |
diff --git a/sound/isa/wavefront/wavefront_fx.c b/sound/isa/wavefront/wavefront_fx.c index 2bb1cee09255..657e2d6c01ac 100644 --- a/sound/isa/wavefront/wavefront_fx.c +++ b/sound/isa/wavefront/wavefront_fx.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/time.h> | 21 | #include <linux/time.h> |
22 | #include <linux/wait.h> | 22 | #include <linux/wait.h> |
23 | #include <linux/slab.h> | ||
23 | #include <linux/firmware.h> | 24 | #include <linux/firmware.h> |
24 | #include <sound/core.h> | 25 | #include <sound/core.h> |
25 | #include <sound/snd_wavefront.h> | 26 | #include <sound/snd_wavefront.h> |
diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c index 5d4ff48c4345..4fb7b19ff393 100644 --- a/sound/isa/wavefront/wavefront_synth.c +++ b/sound/isa/wavefront/wavefront_synth.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/wait.h> | 28 | #include <linux/wait.h> |
29 | #include <linux/firmware.h> | 29 | #include <linux/firmware.h> |
30 | #include <linux/moduleparam.h> | 30 | #include <linux/moduleparam.h> |
31 | #include <linux/slab.h> | ||
31 | #include <sound/core.h> | 32 | #include <sound/core.h> |
32 | #include <sound/snd_wavefront.h> | 33 | #include <sound/snd_wavefront.h> |
33 | #include <sound/initval.h> | 34 | #include <sound/initval.h> |
diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c index 9a88cdfd952a..453d343550a8 100644 --- a/sound/mips/hal2.c +++ b/sound/mips/hal2.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include <asm/sgi/hpc3.h> | 30 | #include <asm/sgi/hpc3.h> |
30 | #include <asm/sgi/ip22.h> | 31 | #include <asm/sgi/ip22.h> |
diff --git a/sound/mips/sgio2audio.c b/sound/mips/sgio2audio.c index 6aff217379d9..717604c00f0a 100644 --- a/sound/mips/sgio2audio.c +++ b/sound/mips/sgio2audio.c | |||
@@ -25,11 +25,11 @@ | |||
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <linux/gfp.h> | ||
29 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
30 | #include <linux/dma-mapping.h> | 29 | #include <linux/dma-mapping.h> |
31 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
32 | #include <linux/io.h> | 31 | #include <linux/io.h> |
32 | #include <linux/slab.h> | ||
33 | 33 | ||
34 | #include <asm/ip32/ip32_ints.h> | 34 | #include <asm/ip32/ip32_ints.h> |
35 | #include <asm/ip32/mace.h> | 35 | #include <asm/ip32/mace.h> |
diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c index d12bd98a37ba..24793c5b65ac 100644 --- a/sound/oss/ad1848.c +++ b/sound/oss/ad1848.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/interrupt.h> | 45 | #include <linux/interrupt.h> |
46 | #include <linux/module.h> | 46 | #include <linux/module.h> |
47 | #include <linux/stddef.h> | 47 | #include <linux/stddef.h> |
48 | #include <linux/slab.h> | ||
48 | #include <linux/isapnp.h> | 49 | #include <linux/isapnp.h> |
49 | #include <linux/pnp.h> | 50 | #include <linux/pnp.h> |
50 | #include <linux/spinlock.h> | 51 | #include <linux/spinlock.h> |
diff --git a/sound/oss/dmabuf.c b/sound/oss/dmabuf.c index 1bfcf7e88546..bcc3e8e07122 100644 --- a/sound/oss/dmabuf.c +++ b/sound/oss/dmabuf.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #define SAMPLE_ROUNDUP 0 | 26 | #define SAMPLE_ROUNDUP 0 |
27 | 27 | ||
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/gfp.h> | ||
29 | #include "sound_config.h" | 30 | #include "sound_config.h" |
30 | 31 | ||
31 | #define DMAP_FREE_ON_CLOSE 0 | 32 | #define DMAP_FREE_ON_CLOSE 0 |
diff --git a/sound/oss/kahlua.c b/sound/oss/kahlua.c index 24d152ccf80d..52d06a334e8f 100644 --- a/sound/oss/kahlua.c +++ b/sound/oss/kahlua.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include "sound_config.h" | 36 | #include "sound_config.h" |
36 | 37 | ||
diff --git a/sound/oss/mpu401.c b/sound/oss/mpu401.c index 0af9d24feb8f..25e4609f8339 100644 --- a/sound/oss/mpu401.c +++ b/sound/oss/mpu401.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
24 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
diff --git a/sound/oss/msnd.c b/sound/oss/msnd.c index 21eb6dce46df..c0cc951ba97d 100644 --- a/sound/oss/msnd.c +++ b/sound/oss/msnd.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
29 | #include <linux/types.h> | 28 | #include <linux/types.h> |
30 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
diff --git a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c index bf27e008f465..a1e3f9671bea 100644 --- a/sound/oss/msnd_pinnacle.c +++ b/sound/oss/msnd_pinnacle.c | |||
@@ -35,12 +35,12 @@ | |||
35 | 35 | ||
36 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
37 | #include <linux/module.h> | 37 | #include <linux/module.h> |
38 | #include <linux/slab.h> | ||
39 | #include <linux/types.h> | 38 | #include <linux/types.h> |
40 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
41 | #include <linux/init.h> | 40 | #include <linux/init.h> |
42 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
43 | #include <linux/smp_lock.h> | 42 | #include <linux/smp_lock.h> |
43 | #include <linux/gfp.h> | ||
44 | #include <asm/irq.h> | 44 | #include <asm/irq.h> |
45 | #include <asm/io.h> | 45 | #include <asm/io.h> |
46 | #include "sound_config.h" | 46 | #include "sound_config.h" |
diff --git a/sound/oss/opl3.c b/sound/oss/opl3.c index 7781c13c1476..938c48c43585 100644 --- a/sound/oss/opl3.c +++ b/sound/oss/opl3.c | |||
@@ -24,6 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/module.h> | 28 | #include <linux/module.h> |
28 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
29 | 30 | ||
diff --git a/sound/oss/sb_card.c b/sound/oss/sb_card.c index 7de18b58f2cd..84ef4d06c1c2 100644 --- a/sound/oss/sb_card.c +++ b/sound/oss/sb_card.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/moduleparam.h> | 26 | #include <linux/moduleparam.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/init.h> | 28 | #include <linux/init.h> |
28 | #include "sound_config.h" | 29 | #include "sound_config.h" |
29 | #include "sb_mixer.h" | 30 | #include "sb_mixer.h" |
diff --git a/sound/oss/sb_common.c b/sound/oss/sb_common.c index ce4db49291f7..7d42c5418d1b 100644 --- a/sound/oss/sb_common.c +++ b/sound/oss/sb_common.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <linux/spinlock.h> | 33 | #include <linux/spinlock.h> |
34 | #include <linux/slab.h> | ||
34 | 35 | ||
35 | #include "sound_config.h" | 36 | #include "sound_config.h" |
36 | #include "sound_firmware.h" | 37 | #include "sound_firmware.h" |
diff --git a/sound/oss/sb_midi.c b/sound/oss/sb_midi.c index 8b796704e112..f139028e85c0 100644 --- a/sound/oss/sb_midi.c +++ b/sound/oss/sb_midi.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include "sound_config.h" | 17 | #include "sound_config.h" |
17 | 18 | ||
diff --git a/sound/oss/sb_mixer.c b/sound/oss/sb_mixer.c index fad1a4f25ad6..2039d31b7e22 100644 --- a/sound/oss/sb_mixer.c +++ b/sound/oss/sb_mixer.c | |||
@@ -16,6 +16,8 @@ | |||
16 | * Stanislav Voronyi <stas@esc.kharkov.com> : Support for AWE 3DSE device (Jun 7 1999) | 16 | * Stanislav Voronyi <stas@esc.kharkov.com> : Support for AWE 3DSE device (Jun 7 1999) |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/slab.h> | ||
20 | |||
19 | #include "sound_config.h" | 21 | #include "sound_config.h" |
20 | 22 | ||
21 | #define __SB_MIXER_C__ | 23 | #define __SB_MIXER_C__ |
diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c index fde7c12fe5da..2d9c51312622 100644 --- a/sound/oss/soundcard.c +++ b/sound/oss/soundcard.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/dma.h> | 36 | #include <asm/dma.h> |
37 | #include <asm/io.h> | 37 | #include <asm/io.h> |
38 | #include <linux/wait.h> | 38 | #include <linux/wait.h> |
39 | #include <linux/slab.h> | ||
40 | #include <linux/ioport.h> | 39 | #include <linux/ioport.h> |
41 | #include <linux/major.h> | 40 | #include <linux/major.h> |
42 | #include <linux/delay.h> | 41 | #include <linux/delay.h> |
diff --git a/sound/oss/uart401.c b/sound/oss/uart401.c index a446b826d5fc..8e514a676a0d 100644 --- a/sound/oss/uart401.c +++ b/sound/oss/uart401.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/spinlock.h> | 28 | #include <linux/spinlock.h> |
28 | #include "sound_config.h" | 29 | #include "sound_config.h" |
29 | 30 | ||
diff --git a/sound/oss/v_midi.c b/sound/oss/v_midi.c index 103940fd5b4f..f0b4151d9b17 100644 --- a/sound/oss/v_midi.c +++ b/sound/oss/v_midi.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
25 | #include "sound_config.h" | 26 | #include "sound_config.h" |
26 | 27 | ||
diff --git a/sound/oss/vidc.c b/sound/oss/vidc.c index 725fef0f59a3..ac39a531df19 100644 --- a/sound/oss/vidc.c +++ b/sound/oss/vidc.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * We currently support a mixer device, but it is currently non-functional. | 17 | * We currently support a mixer device, but it is currently non-functional. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/gfp.h> | ||
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | #include <linux/module.h> | 22 | #include <linux/module.h> |
22 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
@@ -363,13 +364,13 @@ static void vidc_audio_trigger(int dev, int enable_bits) | |||
363 | struct audio_operations *adev = audio_devs[dev]; | 364 | struct audio_operations *adev = audio_devs[dev]; |
364 | 365 | ||
365 | if (enable_bits & PCM_ENABLE_OUTPUT) { | 366 | if (enable_bits & PCM_ENABLE_OUTPUT) { |
366 | if (!(adev->flags & DMA_ACTIVE)) { | 367 | if (!(adev->dmap_out->flags & DMA_ACTIVE)) { |
367 | unsigned long flags; | 368 | unsigned long flags; |
368 | 369 | ||
369 | local_irq_save(flags); | 370 | local_irq_save(flags); |
370 | 371 | ||
371 | /* prevent recusion */ | 372 | /* prevent recusion */ |
372 | adev->flags |= DMA_ACTIVE; | 373 | adev->dmap_out->flags |= DMA_ACTIVE; |
373 | 374 | ||
374 | dma_interrupt = vidc_audio_dma_interrupt; | 375 | dma_interrupt = vidc_audio_dma_interrupt; |
375 | vidc_sound_dma_irq(0, NULL); | 376 | vidc_sound_dma_irq(0, NULL); |
diff --git a/sound/oss/vwsnd.c b/sound/oss/vwsnd.c index 6713110bdc75..20b3b325aa80 100644 --- a/sound/oss/vwsnd.c +++ b/sound/oss/vwsnd.c | |||
@@ -149,6 +149,7 @@ | |||
149 | #include <linux/wait.h> | 149 | #include <linux/wait.h> |
150 | #include <linux/interrupt.h> | 150 | #include <linux/interrupt.h> |
151 | #include <linux/mutex.h> | 151 | #include <linux/mutex.h> |
152 | #include <linux/slab.h> | ||
152 | 153 | ||
153 | #include <asm/visws/cobalt.h> | 154 | #include <asm/visws/cobalt.h> |
154 | 155 | ||
diff --git a/sound/oss/waveartist.c b/sound/oss/waveartist.c index 2c63bb9da74a..e688dde6bbde 100644 --- a/sound/oss/waveartist.c +++ b/sound/oss/waveartist.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #include <linux/module.h> | 36 | #include <linux/module.h> |
37 | #include <linux/init.h> | 37 | #include <linux/init.h> |
38 | #include <linux/slab.h> | ||
38 | #include <linux/sched.h> | 39 | #include <linux/sched.h> |
39 | #include <linux/interrupt.h> | 40 | #include <linux/interrupt.h> |
40 | #include <linux/delay.h> | 41 | #include <linux/delay.h> |
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 1caf5e3c1f6a..e68c98ef4041 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -1852,12 +1852,14 @@ static unsigned int ad1981_jacks_blacklist[] = { | |||
1852 | 0x10140523, /* Thinkpad R40 */ | 1852 | 0x10140523, /* Thinkpad R40 */ |
1853 | 0x10140534, /* Thinkpad X31 */ | 1853 | 0x10140534, /* Thinkpad X31 */ |
1854 | 0x10140537, /* Thinkpad T41p */ | 1854 | 0x10140537, /* Thinkpad T41p */ |
1855 | 0x1014053e, /* Thinkpad R40e */ | ||
1855 | 0x10140554, /* Thinkpad T42p/R50p */ | 1856 | 0x10140554, /* Thinkpad T42p/R50p */ |
1856 | 0x10140567, /* Thinkpad T43p 2668-G7U */ | 1857 | 0x10140567, /* Thinkpad T43p 2668-G7U */ |
1857 | 0x10140581, /* Thinkpad X41-2527 */ | 1858 | 0x10140581, /* Thinkpad X41-2527 */ |
1858 | 0x10280160, /* Dell Dimension 2400 */ | 1859 | 0x10280160, /* Dell Dimension 2400 */ |
1859 | 0x104380b0, /* Asus A7V8X-MX */ | 1860 | 0x104380b0, /* Asus A7V8X-MX */ |
1860 | 0x11790241, /* Toshiba Satellite A-15 S127 */ | 1861 | 0x11790241, /* Toshiba Satellite A-15 S127 */ |
1862 | 0x1179ff10, /* Toshiba P500 */ | ||
1861 | 0x144dc01a, /* Samsung NP-X20C004/SEG */ | 1863 | 0x144dc01a, /* Samsung NP-X20C004/SEG */ |
1862 | 0 /* end */ | 1864 | 0 /* end */ |
1863 | }; | 1865 | }; |
diff --git a/sound/pci/ac97/ac97_proc.c b/sound/pci/ac97/ac97_proc.c index 73b17d526c8b..6320bf084e47 100644 --- a/sound/pci/ac97/ac97_proc.c +++ b/sound/pci/ac97/ac97_proc.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/slab.h> | ||
26 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
27 | 26 | ||
28 | #include <sound/core.h> | 27 | #include <sound/core.h> |
diff --git a/sound/pci/als4000.c b/sound/pci/als4000.c index d75cf7b06426..6cf1de8042e8 100644 --- a/sound/pci/als4000.c +++ b/sound/pci/als4000.c | |||
@@ -68,7 +68,6 @@ | |||
68 | #include <asm/io.h> | 68 | #include <asm/io.h> |
69 | #include <linux/init.h> | 69 | #include <linux/init.h> |
70 | #include <linux/pci.h> | 70 | #include <linux/pci.h> |
71 | #include <linux/slab.h> | ||
72 | #include <linux/gameport.h> | 71 | #include <linux/gameport.h> |
73 | #include <linux/moduleparam.h> | 72 | #include <linux/moduleparam.h> |
74 | #include <linux/dma-mapping.h> | 73 | #include <linux/dma-mapping.h> |
diff --git a/sound/pci/aw2/aw2-saa7146.c b/sound/pci/aw2/aw2-saa7146.c index 296123ab74f7..8afd8b5d1ac7 100644 --- a/sound/pci/aw2/aw2-saa7146.c +++ b/sound/pci/aw2/aw2-saa7146.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/slab.h> | ||
29 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
30 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
31 | #include <asm/system.h> | 30 | #include <asm/system.h> |
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index 8f443a9d61ec..85fd315d9999 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c | |||
@@ -63,7 +63,6 @@ | |||
63 | #include <linux/delay.h> | 63 | #include <linux/delay.h> |
64 | #include <linux/init.h> | 64 | #include <linux/init.h> |
65 | #include <linux/interrupt.h> | 65 | #include <linux/interrupt.h> |
66 | #include <linux/slab.h> | ||
67 | #include <linux/moduleparam.h> | 66 | #include <linux/moduleparam.h> |
68 | #include <sound/core.h> | 67 | #include <sound/core.h> |
69 | #include <sound/initval.h> | 68 | #include <sound/initval.h> |
diff --git a/sound/pci/ca0106/ca0106_proc.c b/sound/pci/ca0106/ca0106_proc.c index 0470461cc03e..ba96428c9f4c 100644 --- a/sound/pci/ca0106/ca0106_proc.c +++ b/sound/pci/ca0106/ca0106_proc.c | |||
@@ -63,7 +63,6 @@ | |||
63 | #include <linux/delay.h> | 63 | #include <linux/delay.h> |
64 | #include <linux/init.h> | 64 | #include <linux/init.h> |
65 | #include <linux/interrupt.h> | 65 | #include <linux/interrupt.h> |
66 | #include <linux/slab.h> | ||
67 | #include <linux/moduleparam.h> | 66 | #include <linux/moduleparam.h> |
68 | #include <sound/core.h> | 67 | #include <sound/core.h> |
69 | #include <sound/initval.h> | 68 | #include <sound/initval.h> |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 1ded64e05643..329968edca9b 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -941,13 +941,21 @@ static snd_pcm_uframes_t snd_cmipci_pcm_pointer(struct cmipci *cm, struct cmipci | |||
941 | struct snd_pcm_substream *substream) | 941 | struct snd_pcm_substream *substream) |
942 | { | 942 | { |
943 | size_t ptr; | 943 | size_t ptr; |
944 | unsigned int reg; | 944 | unsigned int reg, rem, tries; |
945 | |||
945 | if (!rec->running) | 946 | if (!rec->running) |
946 | return 0; | 947 | return 0; |
947 | #if 1 // this seems better.. | 948 | #if 1 // this seems better.. |
948 | reg = rec->ch ? CM_REG_CH1_FRAME2 : CM_REG_CH0_FRAME2; | 949 | reg = rec->ch ? CM_REG_CH1_FRAME2 : CM_REG_CH0_FRAME2; |
949 | ptr = rec->dma_size - (snd_cmipci_read_w(cm, reg) + 1); | 950 | for (tries = 0; tries < 3; tries++) { |
950 | ptr >>= rec->shift; | 951 | rem = snd_cmipci_read_w(cm, reg); |
952 | if (rem < rec->dma_size) | ||
953 | goto ok; | ||
954 | } | ||
955 | printk(KERN_ERR "cmipci: invalid PCM pointer: %#x\n", rem); | ||
956 | return SNDRV_PCM_POS_XRUN; | ||
957 | ok: | ||
958 | ptr = (rec->dma_size - (rem + 1)) >> rec->shift; | ||
951 | #else | 959 | #else |
952 | reg = rec->ch ? CM_REG_CH1_FRAME1 : CM_REG_CH0_FRAME1; | 960 | reg = rec->ch ? CM_REG_CH1_FRAME1 : CM_REG_CH0_FRAME1; |
953 | ptr = snd_cmipci_read(cm, reg) - rec->offset; | 961 | ptr = snd_cmipci_read(cm, reg) - rec->offset; |
diff --git a/sound/pci/cs5530.c b/sound/pci/cs5530.c index 207479a641cf..bc07e275d4d4 100644 --- a/sound/pci/cs5530.c +++ b/sound/pci/cs5530.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
40 | #include <linux/moduleparam.h> | 40 | #include <linux/moduleparam.h> |
41 | #include <linux/pci.h> | 41 | #include <linux/pci.h> |
42 | #include <linux/slab.h> | ||
42 | #include <sound/core.h> | 43 | #include <sound/core.h> |
43 | #include <sound/sb.h> | 44 | #include <sound/sb.h> |
44 | #include <sound/initval.h> | 45 | #include <sound/initval.h> |
diff --git a/sound/pci/cs5535audio/cs5535audio_pcm.c b/sound/pci/cs5535audio/cs5535audio_pcm.c index 0f48a871f17b..f16bc8aad6ed 100644 --- a/sound/pci/cs5535audio/cs5535audio_pcm.c +++ b/sound/pci/cs5535audio/cs5535audio_pcm.c | |||
@@ -23,7 +23,6 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/slab.h> | ||
27 | #include <linux/pci.h> | 26 | #include <linux/pci.h> |
28 | #include <sound/core.h> | 27 | #include <sound/core.h> |
29 | #include <sound/control.h> | 28 | #include <sound/control.h> |
diff --git a/sound/pci/cs5535audio/cs5535audio_pm.c b/sound/pci/cs5535audio/cs5535audio_pm.c index 564c33b60953..a3301cc4ab82 100644 --- a/sound/pci/cs5535audio/cs5535audio_pm.c +++ b/sound/pci/cs5535audio/cs5535audio_pm.c | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/slab.h> | ||
23 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
24 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
25 | #include <sound/core.h> | 24 | #include <sound/core.h> |
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index 480cb1e905b6..1bff80cde0a2 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "ctdaio.h" | 24 | #include "ctdaio.h" |
25 | #include "cttimer.h" | 25 | #include "cttimer.h" |
26 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
27 | #include <linux/slab.h> | ||
27 | #include <sound/pcm.h> | 28 | #include <sound/pcm.h> |
28 | #include <sound/control.h> | 29 | #include <sound/control.h> |
29 | #include <sound/asoundef.h> | 30 | #include <sound/asoundef.h> |
diff --git a/sound/pci/ctxfi/ctpcm.c b/sound/pci/ctxfi/ctpcm.c index d0dc227fbdd3..85ab43e89212 100644 --- a/sound/pci/ctxfi/ctpcm.c +++ b/sound/pci/ctxfi/ctpcm.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include "ctpcm.h" | 18 | #include "ctpcm.h" |
19 | #include "cttimer.h" | 19 | #include "cttimer.h" |
20 | #include <linux/slab.h> | ||
20 | #include <sound/pcm.h> | 21 | #include <sound/pcm.h> |
21 | 22 | ||
22 | /* Hardware descriptions for playback */ | 23 | /* Hardware descriptions for playback */ |
diff --git a/sound/pci/echoaudio/darla20.c b/sound/pci/echoaudio/darla20.c index a65bafe0800f..fe7ad64dccd7 100644 --- a/sound/pci/echoaudio/darla20.c +++ b/sound/pci/echoaudio/darla20.c | |||
@@ -40,9 +40,9 @@ | |||
40 | #include <linux/init.h> | 40 | #include <linux/init.h> |
41 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
42 | #include <linux/pci.h> | 42 | #include <linux/pci.h> |
43 | #include <linux/slab.h> | ||
44 | #include <linux/moduleparam.h> | 43 | #include <linux/moduleparam.h> |
45 | #include <linux/firmware.h> | 44 | #include <linux/firmware.h> |
45 | #include <linux/slab.h> | ||
46 | #include <sound/core.h> | 46 | #include <sound/core.h> |
47 | #include <sound/info.h> | 47 | #include <sound/info.h> |
48 | #include <sound/control.h> | 48 | #include <sound/control.h> |
diff --git a/sound/pci/echoaudio/darla24.c b/sound/pci/echoaudio/darla24.c index 0a6c50bcd758..d1fd34b1a8e3 100644 --- a/sound/pci/echoaudio/darla24.c +++ b/sound/pci/echoaudio/darla24.c | |||
@@ -44,9 +44,9 @@ | |||
44 | #include <linux/init.h> | 44 | #include <linux/init.h> |
45 | #include <linux/interrupt.h> | 45 | #include <linux/interrupt.h> |
46 | #include <linux/pci.h> | 46 | #include <linux/pci.h> |
47 | #include <linux/slab.h> | ||
48 | #include <linux/moduleparam.h> | 47 | #include <linux/moduleparam.h> |
49 | #include <linux/firmware.h> | 48 | #include <linux/firmware.h> |
49 | #include <linux/slab.h> | ||
50 | #include <sound/core.h> | 50 | #include <sound/core.h> |
51 | #include <sound/info.h> | 51 | #include <sound/info.h> |
52 | #include <sound/control.h> | 52 | #include <sound/control.h> |
diff --git a/sound/pci/echoaudio/echo3g.c b/sound/pci/echoaudio/echo3g.c index f5142796989b..1dffdc54416d 100644 --- a/sound/pci/echoaudio/echo3g.c +++ b/sound/pci/echoaudio/echo3g.c | |||
@@ -51,9 +51,9 @@ | |||
51 | #include <linux/init.h> | 51 | #include <linux/init.h> |
52 | #include <linux/interrupt.h> | 52 | #include <linux/interrupt.h> |
53 | #include <linux/pci.h> | 53 | #include <linux/pci.h> |
54 | #include <linux/slab.h> | ||
55 | #include <linux/moduleparam.h> | 54 | #include <linux/moduleparam.h> |
56 | #include <linux/firmware.h> | 55 | #include <linux/firmware.h> |
56 | #include <linux/slab.h> | ||
57 | #include <sound/core.h> | 57 | #include <sound/core.h> |
58 | #include <sound/info.h> | 58 | #include <sound/info.h> |
59 | #include <sound/control.h> | 59 | #include <sound/control.h> |
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index 8dab82d7d19d..668a5ec04499 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c | |||
@@ -2184,10 +2184,9 @@ static int __devinit snd_echo_probe(struct pci_dev *pci, | |||
2184 | goto ctl_error; | 2184 | goto ctl_error; |
2185 | #endif | 2185 | #endif |
2186 | 2186 | ||
2187 | if ((err = snd_card_register(card)) < 0) { | 2187 | err = snd_card_register(card); |
2188 | snd_card_free(card); | 2188 | if (err < 0) |
2189 | goto ctl_error; | 2189 | goto ctl_error; |
2190 | } | ||
2191 | snd_printk(KERN_INFO "Card registered: %s\n", card->longname); | 2190 | snd_printk(KERN_INFO "Card registered: %s\n", card->longname); |
2192 | 2191 | ||
2193 | pci_set_drvdata(pci, chip); | 2192 | pci_set_drvdata(pci, chip); |
diff --git a/sound/pci/echoaudio/gina20.c b/sound/pci/echoaudio/gina20.c index 2364f8a1bc21..050e54aa693f 100644 --- a/sound/pci/echoaudio/gina20.c +++ b/sound/pci/echoaudio/gina20.c | |||
@@ -44,9 +44,9 @@ | |||
44 | #include <linux/init.h> | 44 | #include <linux/init.h> |
45 | #include <linux/interrupt.h> | 45 | #include <linux/interrupt.h> |
46 | #include <linux/pci.h> | 46 | #include <linux/pci.h> |
47 | #include <linux/slab.h> | ||
48 | #include <linux/moduleparam.h> | 47 | #include <linux/moduleparam.h> |
49 | #include <linux/firmware.h> | 48 | #include <linux/firmware.h> |
49 | #include <linux/slab.h> | ||
50 | #include <sound/core.h> | 50 | #include <sound/core.h> |
51 | #include <sound/info.h> | 51 | #include <sound/info.h> |
52 | #include <sound/control.h> | 52 | #include <sound/control.h> |
diff --git a/sound/pci/echoaudio/gina24.c b/sound/pci/echoaudio/gina24.c index 616b55825a19..5748fc6d29d6 100644 --- a/sound/pci/echoaudio/gina24.c +++ b/sound/pci/echoaudio/gina24.c | |||
@@ -50,9 +50,9 @@ | |||
50 | #include <linux/init.h> | 50 | #include <linux/init.h> |
51 | #include <linux/interrupt.h> | 51 | #include <linux/interrupt.h> |
52 | #include <linux/pci.h> | 52 | #include <linux/pci.h> |
53 | #include <linux/slab.h> | ||
54 | #include <linux/moduleparam.h> | 53 | #include <linux/moduleparam.h> |
55 | #include <linux/firmware.h> | 54 | #include <linux/firmware.h> |
55 | #include <linux/slab.h> | ||
56 | #include <sound/core.h> | 56 | #include <sound/core.h> |
57 | #include <sound/info.h> | 57 | #include <sound/info.h> |
58 | #include <sound/control.h> | 58 | #include <sound/control.h> |
diff --git a/sound/pci/echoaudio/indigo.c b/sound/pci/echoaudio/indigo.c index 776175c0bdad..4ae5e35cb5f1 100644 --- a/sound/pci/echoaudio/indigo.c +++ b/sound/pci/echoaudio/indigo.c | |||
@@ -42,9 +42,9 @@ | |||
42 | #include <linux/init.h> | 42 | #include <linux/init.h> |
43 | #include <linux/interrupt.h> | 43 | #include <linux/interrupt.h> |
44 | #include <linux/pci.h> | 44 | #include <linux/pci.h> |
45 | #include <linux/slab.h> | ||
46 | #include <linux/moduleparam.h> | 45 | #include <linux/moduleparam.h> |
47 | #include <linux/firmware.h> | 46 | #include <linux/firmware.h> |
47 | #include <linux/slab.h> | ||
48 | #include <sound/core.h> | 48 | #include <sound/core.h> |
49 | #include <sound/info.h> | 49 | #include <sound/info.h> |
50 | #include <sound/control.h> | 50 | #include <sound/control.h> |
diff --git a/sound/pci/echoaudio/indigodj.c b/sound/pci/echoaudio/indigodj.c index 8816b0bd2ba6..3550715bab1c 100644 --- a/sound/pci/echoaudio/indigodj.c +++ b/sound/pci/echoaudio/indigodj.c | |||
@@ -42,9 +42,9 @@ | |||
42 | #include <linux/init.h> | 42 | #include <linux/init.h> |
43 | #include <linux/interrupt.h> | 43 | #include <linux/interrupt.h> |
44 | #include <linux/pci.h> | 44 | #include <linux/pci.h> |
45 | #include <linux/slab.h> | ||
46 | #include <linux/moduleparam.h> | 45 | #include <linux/moduleparam.h> |
47 | #include <linux/firmware.h> | 46 | #include <linux/firmware.h> |
47 | #include <linux/slab.h> | ||
48 | #include <sound/core.h> | 48 | #include <sound/core.h> |
49 | #include <sound/info.h> | 49 | #include <sound/info.h> |
50 | #include <sound/control.h> | 50 | #include <sound/control.h> |
diff --git a/sound/pci/echoaudio/indigodjx.c b/sound/pci/echoaudio/indigodjx.c index b1e3652f2f48..19b191fd0120 100644 --- a/sound/pci/echoaudio/indigodjx.c +++ b/sound/pci/echoaudio/indigodjx.c | |||
@@ -42,10 +42,10 @@ | |||
42 | #include <linux/init.h> | 42 | #include <linux/init.h> |
43 | #include <linux/interrupt.h> | 43 | #include <linux/interrupt.h> |
44 | #include <linux/pci.h> | 44 | #include <linux/pci.h> |
45 | #include <linux/slab.h> | ||
46 | #include <linux/moduleparam.h> | 45 | #include <linux/moduleparam.h> |
47 | #include <linux/firmware.h> | 46 | #include <linux/firmware.h> |
48 | #include <linux/io.h> | 47 | #include <linux/io.h> |
48 | #include <linux/slab.h> | ||
49 | #include <sound/core.h> | 49 | #include <sound/core.h> |
50 | #include <sound/info.h> | 50 | #include <sound/info.h> |
51 | #include <sound/control.h> | 51 | #include <sound/control.h> |
diff --git a/sound/pci/echoaudio/indigoio.c b/sound/pci/echoaudio/indigoio.c index 1035125336d6..a9fcedf317a4 100644 --- a/sound/pci/echoaudio/indigoio.c +++ b/sound/pci/echoaudio/indigoio.c | |||
@@ -43,9 +43,9 @@ | |||
43 | #include <linux/init.h> | 43 | #include <linux/init.h> |
44 | #include <linux/interrupt.h> | 44 | #include <linux/interrupt.h> |
45 | #include <linux/pci.h> | 45 | #include <linux/pci.h> |
46 | #include <linux/slab.h> | ||
47 | #include <linux/moduleparam.h> | 46 | #include <linux/moduleparam.h> |
48 | #include <linux/firmware.h> | 47 | #include <linux/firmware.h> |
48 | #include <linux/slab.h> | ||
49 | #include <sound/core.h> | 49 | #include <sound/core.h> |
50 | #include <sound/info.h> | 50 | #include <sound/info.h> |
51 | #include <sound/control.h> | 51 | #include <sound/control.h> |
diff --git a/sound/pci/echoaudio/indigoiox.c b/sound/pci/echoaudio/indigoiox.c index 60b7cb2753cf..bcdfac63212c 100644 --- a/sound/pci/echoaudio/indigoiox.c +++ b/sound/pci/echoaudio/indigoiox.c | |||
@@ -43,10 +43,10 @@ | |||
43 | #include <linux/init.h> | 43 | #include <linux/init.h> |
44 | #include <linux/interrupt.h> | 44 | #include <linux/interrupt.h> |
45 | #include <linux/pci.h> | 45 | #include <linux/pci.h> |
46 | #include <linux/slab.h> | ||
47 | #include <linux/moduleparam.h> | 46 | #include <linux/moduleparam.h> |
48 | #include <linux/firmware.h> | 47 | #include <linux/firmware.h> |
49 | #include <linux/io.h> | 48 | #include <linux/io.h> |
49 | #include <linux/slab.h> | ||
50 | #include <sound/core.h> | 50 | #include <sound/core.h> |
51 | #include <sound/info.h> | 51 | #include <sound/info.h> |
52 | #include <sound/control.h> | 52 | #include <sound/control.h> |
diff --git a/sound/pci/echoaudio/layla20.c b/sound/pci/echoaudio/layla20.c index 8c3f5c5b5301..d3a98c5dac86 100644 --- a/sound/pci/echoaudio/layla20.c +++ b/sound/pci/echoaudio/layla20.c | |||
@@ -49,9 +49,9 @@ | |||
49 | #include <linux/init.h> | 49 | #include <linux/init.h> |
50 | #include <linux/interrupt.h> | 50 | #include <linux/interrupt.h> |
51 | #include <linux/pci.h> | 51 | #include <linux/pci.h> |
52 | #include <linux/slab.h> | ||
53 | #include <linux/moduleparam.h> | 52 | #include <linux/moduleparam.h> |
54 | #include <linux/firmware.h> | 53 | #include <linux/firmware.h> |
54 | #include <linux/slab.h> | ||
55 | #include <sound/core.h> | 55 | #include <sound/core.h> |
56 | #include <sound/info.h> | 56 | #include <sound/info.h> |
57 | #include <sound/control.h> | 57 | #include <sound/control.h> |
diff --git a/sound/pci/echoaudio/layla24.c b/sound/pci/echoaudio/layla24.c index ed1cc0abc2b8..2a1dca6dce17 100644 --- a/sound/pci/echoaudio/layla24.c +++ b/sound/pci/echoaudio/layla24.c | |||
@@ -51,9 +51,9 @@ | |||
51 | #include <linux/init.h> | 51 | #include <linux/init.h> |
52 | #include <linux/interrupt.h> | 52 | #include <linux/interrupt.h> |
53 | #include <linux/pci.h> | 53 | #include <linux/pci.h> |
54 | #include <linux/slab.h> | ||
55 | #include <linux/moduleparam.h> | 54 | #include <linux/moduleparam.h> |
56 | #include <linux/firmware.h> | 55 | #include <linux/firmware.h> |
56 | #include <linux/slab.h> | ||
57 | #include <sound/core.h> | 57 | #include <sound/core.h> |
58 | #include <sound/info.h> | 58 | #include <sound/info.h> |
59 | #include <sound/control.h> | 59 | #include <sound/control.h> |
diff --git a/sound/pci/echoaudio/mia.c b/sound/pci/echoaudio/mia.c index cc2bbfc65327..9cdf14cfdd74 100644 --- a/sound/pci/echoaudio/mia.c +++ b/sound/pci/echoaudio/mia.c | |||
@@ -50,9 +50,9 @@ | |||
50 | #include <linux/init.h> | 50 | #include <linux/init.h> |
51 | #include <linux/interrupt.h> | 51 | #include <linux/interrupt.h> |
52 | #include <linux/pci.h> | 52 | #include <linux/pci.h> |
53 | #include <linux/slab.h> | ||
54 | #include <linux/moduleparam.h> | 53 | #include <linux/moduleparam.h> |
55 | #include <linux/firmware.h> | 54 | #include <linux/firmware.h> |
55 | #include <linux/slab.h> | ||
56 | #include <sound/core.h> | 56 | #include <sound/core.h> |
57 | #include <sound/info.h> | 57 | #include <sound/info.h> |
58 | #include <sound/control.h> | 58 | #include <sound/control.h> |
diff --git a/sound/pci/echoaudio/mona.c b/sound/pci/echoaudio/mona.c index 3e7e01824b40..1047be405ebe 100644 --- a/sound/pci/echoaudio/mona.c +++ b/sound/pci/echoaudio/mona.c | |||
@@ -48,9 +48,9 @@ | |||
48 | #include <linux/init.h> | 48 | #include <linux/init.h> |
49 | #include <linux/interrupt.h> | 49 | #include <linux/interrupt.h> |
50 | #include <linux/pci.h> | 50 | #include <linux/pci.h> |
51 | #include <linux/slab.h> | ||
52 | #include <linux/moduleparam.h> | 51 | #include <linux/moduleparam.h> |
53 | #include <linux/firmware.h> | 52 | #include <linux/firmware.h> |
53 | #include <linux/slab.h> | ||
54 | #include <sound/core.h> | 54 | #include <sound/core.h> |
55 | #include <sound/info.h> | 55 | #include <sound/info.h> |
56 | #include <sound/control.h> | 56 | #include <sound/control.h> |
diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c index 6a47672f930a..ffb1ddb8dc28 100644 --- a/sound/pci/emu10k1/memory.c +++ b/sound/pci/emu10k1/memory.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/gfp.h> | ||
25 | #include <linux/time.h> | 26 | #include <linux/time.h> |
26 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
27 | 28 | ||
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index e4581a42ace5..29714c818b53 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/input.h> | 22 | #include <linux/input.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/workqueue.h> | 25 | #include <linux/workqueue.h> |
25 | #include <sound/core.h> | 26 | #include <sound/core.h> |
26 | #include "hda_beep.h" | 27 | #include "hda_beep.h" |
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c index dcd22446cfc7..d8da18a9e98b 100644 --- a/sound/pci/hda/hda_eld.c +++ b/sound/pci/hda/hda_eld.c | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/slab.h> | ||
25 | #include <sound/core.h> | 26 | #include <sound/core.h> |
26 | #include <asm/unaligned.h> | 27 | #include <asm/unaligned.h> |
27 | #include "hda_codec.h" | 28 | #include "hda_codec.h" |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 8b2915631cc3..f8fd586ae024 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -2269,6 +2269,7 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = { | |||
2269 | SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB), | 2269 | SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB), |
2270 | SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB), | 2270 | SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB), |
2271 | SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), | 2271 | SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), |
2272 | SND_PCI_QUIRK(0x1458, 0xa022, "ga-ma770-ud3", POS_FIX_LPIB), | ||
2272 | SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB), | 2273 | SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB), |
2273 | SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB), | 2274 | SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB), |
2274 | SND_PCI_QUIRK(0x8086, 0xd601, "eMachines T5212", POS_FIX_LPIB), | 2275 | SND_PCI_QUIRK(0x8086, 0xd601, "eMachines T5212", POS_FIX_LPIB), |
@@ -2361,6 +2362,7 @@ static struct snd_pci_quirk msi_black_list[] __devinitdata = { | |||
2361 | SND_PCI_QUIRK(0x1043, 0x81f6, "ASUS", 0), /* nvidia */ | 2362 | SND_PCI_QUIRK(0x1043, 0x81f6, "ASUS", 0), /* nvidia */ |
2362 | SND_PCI_QUIRK(0x1043, 0x822d, "ASUS", 0), /* Athlon64 X2 + nvidia MCP55 */ | 2363 | SND_PCI_QUIRK(0x1043, 0x822d, "ASUS", 0), /* Athlon64 X2 + nvidia MCP55 */ |
2363 | SND_PCI_QUIRK(0x1849, 0x0888, "ASRock", 0), /* Athlon64 X2 + nvidia */ | 2364 | SND_PCI_QUIRK(0x1849, 0x0888, "ASRock", 0), /* Athlon64 X2 + nvidia */ |
2365 | SND_PCI_QUIRK(0xa0a0, 0x0575, "Aopen MZ915-M", 0), /* ICH6 */ | ||
2364 | {} | 2366 | {} |
2365 | }; | 2367 | }; |
2366 | 2368 | ||
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index e6d1bdff1b6e..af34606c30c3 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -1896,6 +1896,14 @@ static int patch_ad1981(struct hda_codec *codec) | |||
1896 | case AD1981_THINKPAD: | 1896 | case AD1981_THINKPAD: |
1897 | spec->mixers[0] = ad1981_thinkpad_mixers; | 1897 | spec->mixers[0] = ad1981_thinkpad_mixers; |
1898 | spec->input_mux = &ad1981_thinkpad_capture_source; | 1898 | spec->input_mux = &ad1981_thinkpad_capture_source; |
1899 | /* set the upper-limit for mixer amp to 0dB for avoiding the | ||
1900 | * possible damage by overloading | ||
1901 | */ | ||
1902 | snd_hda_override_amp_caps(codec, 0x11, HDA_INPUT, | ||
1903 | (0x17 << AC_AMPCAP_OFFSET_SHIFT) | | ||
1904 | (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) | | ||
1905 | (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) | | ||
1906 | (1 << AC_AMPCAP_MUTE_SHIFT)); | ||
1899 | break; | 1907 | break; |
1900 | case AD1981_TOSHIBA: | 1908 | case AD1981_TOSHIBA: |
1901 | spec->mixers[0] = ad1981_hp_mixers; | 1909 | spec->mixers[0] = ad1981_hp_mixers; |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 194a28c54992..61682e1d09da 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -1591,6 +1591,21 @@ static int patch_cxt5047(struct hda_codec *codec) | |||
1591 | #endif | 1591 | #endif |
1592 | } | 1592 | } |
1593 | spec->vmaster_nid = 0x13; | 1593 | spec->vmaster_nid = 0x13; |
1594 | |||
1595 | switch (codec->subsystem_id >> 16) { | ||
1596 | case 0x103c: | ||
1597 | /* HP laptops have really bad sound over 0 dB on NID 0x10. | ||
1598 | * Fix max PCM level to 0 dB (originally it has 0x1e steps | ||
1599 | * with 0 dB offset 0x17) | ||
1600 | */ | ||
1601 | snd_hda_override_amp_caps(codec, 0x10, HDA_INPUT, | ||
1602 | (0x17 << AC_AMPCAP_OFFSET_SHIFT) | | ||
1603 | (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) | | ||
1604 | (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) | | ||
1605 | (1 << AC_AMPCAP_MUTE_SHIFT)); | ||
1606 | break; | ||
1607 | } | ||
1608 | |||
1594 | return 0; | 1609 | return 0; |
1595 | } | 1610 | } |
1596 | 1611 | ||
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index 70669a246902..3c10c0b149f4 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c | |||
@@ -538,8 +538,6 @@ static int patch_nvhdmi_2ch(struct hda_codec *codec) | |||
538 | * patch entries | 538 | * patch entries |
539 | */ | 539 | */ |
540 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | 540 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { |
541 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, | ||
542 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, | ||
543 | { .id = 0x10de0002, .name = "MCP77/78 HDMI", | 541 | { .id = 0x10de0002, .name = "MCP77/78 HDMI", |
544 | .patch = patch_nvhdmi_8ch_7x }, | 542 | .patch = patch_nvhdmi_8ch_7x }, |
545 | { .id = 0x10de0003, .name = "MCP77/78 HDMI", | 543 | { .id = 0x10de0003, .name = "MCP77/78 HDMI", |
@@ -550,12 +548,16 @@ static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | |||
550 | .patch = patch_nvhdmi_8ch_7x }, | 548 | .patch = patch_nvhdmi_8ch_7x }, |
551 | { .id = 0x10de0007, .name = "MCP79/7A HDMI", | 549 | { .id = 0x10de0007, .name = "MCP79/7A HDMI", |
552 | .patch = patch_nvhdmi_8ch_7x }, | 550 | .patch = patch_nvhdmi_8ch_7x }, |
553 | { .id = 0x10de000c, .name = "MCP89 HDMI", | 551 | { .id = 0x10de000a, .name = "GT220 HDMI", |
554 | .patch = patch_nvhdmi_8ch_89 }, | 552 | .patch = patch_nvhdmi_8ch_89 }, |
555 | { .id = 0x10de000b, .name = "GT21x HDMI", | 553 | { .id = 0x10de000b, .name = "GT21x HDMI", |
556 | .patch = patch_nvhdmi_8ch_89 }, | 554 | .patch = patch_nvhdmi_8ch_89 }, |
555 | { .id = 0x10de000c, .name = "MCP89 HDMI", | ||
556 | .patch = patch_nvhdmi_8ch_89 }, | ||
557 | { .id = 0x10de000d, .name = "GT240 HDMI", | 557 | { .id = 0x10de000d, .name = "GT240 HDMI", |
558 | .patch = patch_nvhdmi_8ch_89 }, | 558 | .patch = patch_nvhdmi_8ch_89 }, |
559 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, | ||
560 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, | ||
559 | {} /* terminator */ | 561 | {} /* terminator */ |
560 | }; | 562 | }; |
561 | 563 | ||
@@ -564,11 +566,12 @@ MODULE_ALIAS("snd-hda-codec-id:10de0003"); | |||
564 | MODULE_ALIAS("snd-hda-codec-id:10de0005"); | 566 | MODULE_ALIAS("snd-hda-codec-id:10de0005"); |
565 | MODULE_ALIAS("snd-hda-codec-id:10de0006"); | 567 | MODULE_ALIAS("snd-hda-codec-id:10de0006"); |
566 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); | 568 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); |
567 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); | 569 | MODULE_ALIAS("snd-hda-codec-id:10de000a"); |
568 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); | ||
569 | MODULE_ALIAS("snd-hda-codec-id:10de000c"); | ||
570 | MODULE_ALIAS("snd-hda-codec-id:10de000b"); | 570 | MODULE_ALIAS("snd-hda-codec-id:10de000b"); |
571 | MODULE_ALIAS("snd-hda-codec-id:10de000c"); | ||
571 | MODULE_ALIAS("snd-hda-codec-id:10de000d"); | 572 | MODULE_ALIAS("snd-hda-codec-id:10de000d"); |
573 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); | ||
574 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); | ||
572 | 575 | ||
573 | MODULE_LICENSE("GPL"); | 576 | MODULE_LICENSE("GPL"); |
574 | MODULE_DESCRIPTION("NVIDIA HDMI HD-audio codec"); | 577 | MODULE_DESCRIPTION("NVIDIA HDMI HD-audio codec"); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 4ec57633af88..c7730dbb9ddb 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1621,6 +1621,11 @@ static struct hda_verb alc888_acer_aspire_4930g_verbs[] = { | |||
1621 | */ | 1621 | */ |
1622 | 1622 | ||
1623 | static struct hda_verb alc888_acer_aspire_6530g_verbs[] = { | 1623 | static struct hda_verb alc888_acer_aspire_6530g_verbs[] = { |
1624 | /* Route to built-in subwoofer as well as speakers */ | ||
1625 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1626 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
1627 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
1628 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
1624 | /* Bias voltage on for external mic port */ | 1629 | /* Bias voltage on for external mic port */ |
1625 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN | PIN_VREF80}, | 1630 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN | PIN_VREF80}, |
1626 | /* Front Mic: set to PIN_IN (empty by default) */ | 1631 | /* Front Mic: set to PIN_IN (empty by default) */ |
@@ -1632,10 +1637,12 @@ static struct hda_verb alc888_acer_aspire_6530g_verbs[] = { | |||
1632 | /* Enable speaker output */ | 1637 | /* Enable speaker output */ |
1633 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | 1638 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, |
1634 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | 1639 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, |
1640 | {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2}, | ||
1635 | /* Enable headphone output */ | 1641 | /* Enable headphone output */ |
1636 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT | PIN_HP}, | 1642 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT | PIN_HP}, |
1637 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | 1643 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, |
1638 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | 1644 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, |
1645 | {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2}, | ||
1639 | { } | 1646 | { } |
1640 | }; | 1647 | }; |
1641 | 1648 | ||
@@ -2532,8 +2539,6 @@ static int alc_build_controls(struct hda_codec *codec) | |||
2532 | return err; | 2539 | return err; |
2533 | } | 2540 | } |
2534 | 2541 | ||
2535 | alc_free_kctls(codec); /* no longer needed */ | ||
2536 | |||
2537 | /* assign Capture Source enums to NID */ | 2542 | /* assign Capture Source enums to NID */ |
2538 | kctl = snd_hda_find_mixer_ctl(codec, "Capture Source"); | 2543 | kctl = snd_hda_find_mixer_ctl(codec, "Capture Source"); |
2539 | if (!kctl) | 2544 | if (!kctl) |
@@ -2602,6 +2607,9 @@ static int alc_build_controls(struct hda_codec *codec) | |||
2602 | } | 2607 | } |
2603 | } | 2608 | } |
2604 | } | 2609 | } |
2610 | |||
2611 | alc_free_kctls(codec); /* no longer needed */ | ||
2612 | |||
2605 | return 0; | 2613 | return 0; |
2606 | } | 2614 | } |
2607 | 2615 | ||
@@ -4983,6 +4991,70 @@ static void set_capture_mixer(struct hda_codec *codec) | |||
4983 | } | 4991 | } |
4984 | } | 4992 | } |
4985 | 4993 | ||
4994 | /* fill adc_nids (and capsrc_nids) containing all active input pins */ | ||
4995 | static void fillup_priv_adc_nids(struct hda_codec *codec, hda_nid_t *nids, | ||
4996 | int num_nids) | ||
4997 | { | ||
4998 | struct alc_spec *spec = codec->spec; | ||
4999 | int n; | ||
5000 | hda_nid_t fallback_adc = 0, fallback_cap = 0; | ||
5001 | |||
5002 | for (n = 0; n < num_nids; n++) { | ||
5003 | hda_nid_t adc, cap; | ||
5004 | hda_nid_t conn[HDA_MAX_NUM_INPUTS]; | ||
5005 | int nconns, i, j; | ||
5006 | |||
5007 | adc = nids[n]; | ||
5008 | if (get_wcaps_type(get_wcaps(codec, adc)) != AC_WID_AUD_IN) | ||
5009 | continue; | ||
5010 | cap = adc; | ||
5011 | nconns = snd_hda_get_connections(codec, cap, conn, | ||
5012 | ARRAY_SIZE(conn)); | ||
5013 | if (nconns == 1) { | ||
5014 | cap = conn[0]; | ||
5015 | nconns = snd_hda_get_connections(codec, cap, conn, | ||
5016 | ARRAY_SIZE(conn)); | ||
5017 | } | ||
5018 | if (nconns <= 0) | ||
5019 | continue; | ||
5020 | if (!fallback_adc) { | ||
5021 | fallback_adc = adc; | ||
5022 | fallback_cap = cap; | ||
5023 | } | ||
5024 | for (i = 0; i < AUTO_PIN_LAST; i++) { | ||
5025 | hda_nid_t nid = spec->autocfg.input_pins[i]; | ||
5026 | if (!nid) | ||
5027 | continue; | ||
5028 | for (j = 0; j < nconns; j++) { | ||
5029 | if (conn[j] == nid) | ||
5030 | break; | ||
5031 | } | ||
5032 | if (j >= nconns) | ||
5033 | break; | ||
5034 | } | ||
5035 | if (i >= AUTO_PIN_LAST) { | ||
5036 | int num_adcs = spec->num_adc_nids; | ||
5037 | spec->private_adc_nids[num_adcs] = adc; | ||
5038 | spec->private_capsrc_nids[num_adcs] = cap; | ||
5039 | spec->num_adc_nids++; | ||
5040 | spec->adc_nids = spec->private_adc_nids; | ||
5041 | if (adc != cap) | ||
5042 | spec->capsrc_nids = spec->private_capsrc_nids; | ||
5043 | } | ||
5044 | } | ||
5045 | if (!spec->num_adc_nids) { | ||
5046 | printk(KERN_WARNING "hda_codec: %s: no valid ADC found;" | ||
5047 | " using fallback 0x%x\n", | ||
5048 | codec->chip_name, fallback_adc); | ||
5049 | spec->private_adc_nids[0] = fallback_adc; | ||
5050 | spec->adc_nids = spec->private_adc_nids; | ||
5051 | if (fallback_adc != fallback_cap) { | ||
5052 | spec->private_capsrc_nids[0] = fallback_cap; | ||
5053 | spec->capsrc_nids = spec->private_adc_nids; | ||
5054 | } | ||
5055 | } | ||
5056 | } | ||
5057 | |||
4986 | #ifdef CONFIG_SND_HDA_INPUT_BEEP | 5058 | #ifdef CONFIG_SND_HDA_INPUT_BEEP |
4987 | #define set_beep_amp(spec, nid, idx, dir) \ | 5059 | #define set_beep_amp(spec, nid, idx, dir) \ |
4988 | ((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir)) | 5060 | ((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir)) |
@@ -8397,9 +8469,7 @@ static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = { | |||
8397 | 8469 | ||
8398 | static struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = { | 8470 | static struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = { |
8399 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | 8471 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), |
8400 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
8401 | HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | 8472 | HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT), |
8402 | HDA_BIND_MUTE("LFE Playback Switch", 0x0f, 2, HDA_INPUT), | ||
8403 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 8473 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
8404 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 8474 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
8405 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 8475 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
@@ -10040,6 +10110,8 @@ static void alc882_auto_set_output_and_unmute(struct hda_codec *codec, | |||
10040 | int idx; | 10110 | int idx; |
10041 | 10111 | ||
10042 | alc_set_pin_output(codec, nid, pin_type); | 10112 | alc_set_pin_output(codec, nid, pin_type); |
10113 | if (dac_idx >= spec->multiout.num_dacs) | ||
10114 | return; | ||
10043 | if (spec->multiout.dac_nids[dac_idx] == 0x25) | 10115 | if (spec->multiout.dac_nids[dac_idx] == 0x25) |
10044 | idx = 4; | 10116 | idx = 4; |
10045 | else | 10117 | else |
@@ -12455,11 +12527,11 @@ static void alc268_aspire_one_speaker_automute(struct hda_codec *codec) | |||
12455 | unsigned char bits; | 12527 | unsigned char bits; |
12456 | 12528 | ||
12457 | present = snd_hda_jack_detect(codec, 0x15); | 12529 | present = snd_hda_jack_detect(codec, 0x15); |
12458 | bits = present ? AMP_IN_MUTE(0) : 0; | 12530 | bits = present ? HDA_AMP_MUTE : 0; |
12459 | snd_hda_codec_amp_stereo(codec, 0x0f, HDA_INPUT, 0, | 12531 | snd_hda_codec_amp_stereo(codec, 0x0f, HDA_INPUT, 0, |
12460 | AMP_IN_MUTE(0), bits); | 12532 | HDA_AMP_MUTE, bits); |
12461 | snd_hda_codec_amp_stereo(codec, 0x0f, HDA_INPUT, 1, | 12533 | snd_hda_codec_amp_stereo(codec, 0x0f, HDA_INPUT, 1, |
12462 | AMP_IN_MUTE(0), bits); | 12534 | HDA_AMP_MUTE, bits); |
12463 | } | 12535 | } |
12464 | 12536 | ||
12465 | static void alc268_acer_lc_unsol_event(struct hda_codec *codec, | 12537 | static void alc268_acer_lc_unsol_event(struct hda_codec *codec, |
@@ -13329,9 +13401,9 @@ static hda_nid_t alc269vb_capsrc_nids[1] = { | |||
13329 | 0x22, | 13401 | 0x22, |
13330 | }; | 13402 | }; |
13331 | 13403 | ||
13332 | /* NOTE: ADC2 (0x07) is connected from a recording *MIXER* (0x24), | 13404 | static hda_nid_t alc269_adc_candidates[] = { |
13333 | * not a mux! | 13405 | 0x08, 0x09, 0x07, |
13334 | */ | 13406 | }; |
13335 | 13407 | ||
13336 | #define alc269_modes alc260_modes | 13408 | #define alc269_modes alc260_modes |
13337 | #define alc269_capture_source alc880_lg_lw_capture_source | 13409 | #define alc269_capture_source alc880_lg_lw_capture_source |
@@ -13478,11 +13550,11 @@ static void alc269_quanta_fl1_speaker_automute(struct hda_codec *codec) | |||
13478 | unsigned char bits; | 13550 | unsigned char bits; |
13479 | 13551 | ||
13480 | present = snd_hda_jack_detect(codec, 0x15); | 13552 | present = snd_hda_jack_detect(codec, 0x15); |
13481 | bits = present ? AMP_IN_MUTE(0) : 0; | 13553 | bits = present ? HDA_AMP_MUTE : 0; |
13482 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 13554 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
13483 | AMP_IN_MUTE(0), bits); | 13555 | HDA_AMP_MUTE, bits); |
13484 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 13556 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
13485 | AMP_IN_MUTE(0), bits); | 13557 | HDA_AMP_MUTE, bits); |
13486 | 13558 | ||
13487 | snd_hda_codec_write(codec, 0x20, 0, | 13559 | snd_hda_codec_write(codec, 0x20, 0, |
13488 | AC_VERB_SET_COEF_INDEX, 0x0c); | 13560 | AC_VERB_SET_COEF_INDEX, 0x0c); |
@@ -13507,11 +13579,11 @@ static void alc269_lifebook_speaker_automute(struct hda_codec *codec) | |||
13507 | /* Check port replicator headphone socket */ | 13579 | /* Check port replicator headphone socket */ |
13508 | present |= snd_hda_jack_detect(codec, 0x1a); | 13580 | present |= snd_hda_jack_detect(codec, 0x1a); |
13509 | 13581 | ||
13510 | bits = present ? AMP_IN_MUTE(0) : 0; | 13582 | bits = present ? HDA_AMP_MUTE : 0; |
13511 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 13583 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
13512 | AMP_IN_MUTE(0), bits); | 13584 | HDA_AMP_MUTE, bits); |
13513 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 13585 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
13514 | AMP_IN_MUTE(0), bits); | 13586 | HDA_AMP_MUTE, bits); |
13515 | 13587 | ||
13516 | snd_hda_codec_write(codec, 0x20, 0, | 13588 | snd_hda_codec_write(codec, 0x20, 0, |
13517 | AC_VERB_SET_COEF_INDEX, 0x0c); | 13589 | AC_VERB_SET_COEF_INDEX, 0x0c); |
@@ -13642,11 +13714,11 @@ static void alc269_speaker_automute(struct hda_codec *codec) | |||
13642 | unsigned char bits; | 13714 | unsigned char bits; |
13643 | 13715 | ||
13644 | present = snd_hda_jack_detect(codec, nid); | 13716 | present = snd_hda_jack_detect(codec, nid); |
13645 | bits = present ? AMP_IN_MUTE(0) : 0; | 13717 | bits = present ? HDA_AMP_MUTE : 0; |
13646 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 13718 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
13647 | AMP_IN_MUTE(0), bits); | 13719 | HDA_AMP_MUTE, bits); |
13648 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 13720 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
13649 | AMP_IN_MUTE(0), bits); | 13721 | HDA_AMP_MUTE, bits); |
13650 | } | 13722 | } |
13651 | 13723 | ||
13652 | /* unsolicited event for HP jack sensing */ | 13724 | /* unsolicited event for HP jack sensing */ |
@@ -13838,7 +13910,6 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
13838 | struct alc_spec *spec = codec->spec; | 13910 | struct alc_spec *spec = codec->spec; |
13839 | int err; | 13911 | int err; |
13840 | static hda_nid_t alc269_ignore[] = { 0x1d, 0 }; | 13912 | static hda_nid_t alc269_ignore[] = { 0x1d, 0 }; |
13841 | hda_nid_t real_capsrc_nids; | ||
13842 | 13913 | ||
13843 | err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, | 13914 | err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, |
13844 | alc269_ignore); | 13915 | alc269_ignore); |
@@ -13862,18 +13933,19 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
13862 | 13933 | ||
13863 | if ((alc_read_coef_idx(codec, 0) & 0x00f0) == 0x0010) { | 13934 | if ((alc_read_coef_idx(codec, 0) & 0x00f0) == 0x0010) { |
13864 | add_verb(spec, alc269vb_init_verbs); | 13935 | add_verb(spec, alc269vb_init_verbs); |
13865 | real_capsrc_nids = alc269vb_capsrc_nids[0]; | ||
13866 | alc_ssid_check(codec, 0, 0x1b, 0x14, 0x21); | 13936 | alc_ssid_check(codec, 0, 0x1b, 0x14, 0x21); |
13867 | } else { | 13937 | } else { |
13868 | add_verb(spec, alc269_init_verbs); | 13938 | add_verb(spec, alc269_init_verbs); |
13869 | real_capsrc_nids = alc269_capsrc_nids[0]; | ||
13870 | alc_ssid_check(codec, 0x15, 0x1b, 0x14, 0); | 13939 | alc_ssid_check(codec, 0x15, 0x1b, 0x14, 0); |
13871 | } | 13940 | } |
13872 | 13941 | ||
13873 | spec->num_mux_defs = 1; | 13942 | spec->num_mux_defs = 1; |
13874 | spec->input_mux = &spec->private_imux[0]; | 13943 | spec->input_mux = &spec->private_imux[0]; |
13944 | fillup_priv_adc_nids(codec, alc269_adc_candidates, | ||
13945 | sizeof(alc269_adc_candidates)); | ||
13946 | |||
13875 | /* set default input source */ | 13947 | /* set default input source */ |
13876 | snd_hda_codec_write_cache(codec, real_capsrc_nids, | 13948 | snd_hda_codec_write_cache(codec, spec->capsrc_nids[0], |
13877 | 0, AC_VERB_SET_CONNECT_SEL, | 13949 | 0, AC_VERB_SET_CONNECT_SEL, |
13878 | spec->input_mux->items[0].index); | 13950 | spec->input_mux->items[0].index); |
13879 | 13951 | ||
@@ -14152,14 +14224,16 @@ static int patch_alc269(struct hda_codec *codec) | |||
14152 | spec->stream_digital_playback = &alc269_pcm_digital_playback; | 14224 | spec->stream_digital_playback = &alc269_pcm_digital_playback; |
14153 | spec->stream_digital_capture = &alc269_pcm_digital_capture; | 14225 | spec->stream_digital_capture = &alc269_pcm_digital_capture; |
14154 | 14226 | ||
14155 | if (!is_alc269vb) { | 14227 | if (!spec->adc_nids) { /* wasn't filled automatically? use default */ |
14156 | spec->adc_nids = alc269_adc_nids; | 14228 | if (!is_alc269vb) { |
14157 | spec->num_adc_nids = ARRAY_SIZE(alc269_adc_nids); | 14229 | spec->adc_nids = alc269_adc_nids; |
14158 | spec->capsrc_nids = alc269_capsrc_nids; | 14230 | spec->num_adc_nids = ARRAY_SIZE(alc269_adc_nids); |
14159 | } else { | 14231 | spec->capsrc_nids = alc269_capsrc_nids; |
14160 | spec->adc_nids = alc269vb_adc_nids; | 14232 | } else { |
14161 | spec->num_adc_nids = ARRAY_SIZE(alc269vb_adc_nids); | 14233 | spec->adc_nids = alc269vb_adc_nids; |
14162 | spec->capsrc_nids = alc269vb_capsrc_nids; | 14234 | spec->num_adc_nids = ARRAY_SIZE(alc269vb_adc_nids); |
14235 | spec->capsrc_nids = alc269vb_capsrc_nids; | ||
14236 | } | ||
14163 | } | 14237 | } |
14164 | 14238 | ||
14165 | if (!spec->cap_mixer) | 14239 | if (!spec->cap_mixer) |
@@ -17111,9 +17185,9 @@ static void alc663_m51va_speaker_automute(struct hda_codec *codec) | |||
17111 | present = snd_hda_jack_detect(codec, 0x21); | 17185 | present = snd_hda_jack_detect(codec, 0x21); |
17112 | bits = present ? HDA_AMP_MUTE : 0; | 17186 | bits = present ? HDA_AMP_MUTE : 0; |
17113 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 17187 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
17114 | AMP_IN_MUTE(0), bits); | 17188 | HDA_AMP_MUTE, bits); |
17115 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 17189 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
17116 | AMP_IN_MUTE(0), bits); | 17190 | HDA_AMP_MUTE, bits); |
17117 | } | 17191 | } |
17118 | 17192 | ||
17119 | static void alc663_21jd_two_speaker_automute(struct hda_codec *codec) | 17193 | static void alc663_21jd_two_speaker_automute(struct hda_codec *codec) |
@@ -17124,13 +17198,13 @@ static void alc663_21jd_two_speaker_automute(struct hda_codec *codec) | |||
17124 | present = snd_hda_jack_detect(codec, 0x21); | 17198 | present = snd_hda_jack_detect(codec, 0x21); |
17125 | bits = present ? HDA_AMP_MUTE : 0; | 17199 | bits = present ? HDA_AMP_MUTE : 0; |
17126 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 17200 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
17127 | AMP_IN_MUTE(0), bits); | 17201 | HDA_AMP_MUTE, bits); |
17128 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 17202 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
17129 | AMP_IN_MUTE(0), bits); | 17203 | HDA_AMP_MUTE, bits); |
17130 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 0, | 17204 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 0, |
17131 | AMP_IN_MUTE(0), bits); | 17205 | HDA_AMP_MUTE, bits); |
17132 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 1, | 17206 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 1, |
17133 | AMP_IN_MUTE(0), bits); | 17207 | HDA_AMP_MUTE, bits); |
17134 | } | 17208 | } |
17135 | 17209 | ||
17136 | static void alc663_15jd_two_speaker_automute(struct hda_codec *codec) | 17210 | static void alc663_15jd_two_speaker_automute(struct hda_codec *codec) |
@@ -17141,13 +17215,13 @@ static void alc663_15jd_two_speaker_automute(struct hda_codec *codec) | |||
17141 | present = snd_hda_jack_detect(codec, 0x15); | 17215 | present = snd_hda_jack_detect(codec, 0x15); |
17142 | bits = present ? HDA_AMP_MUTE : 0; | 17216 | bits = present ? HDA_AMP_MUTE : 0; |
17143 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 17217 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
17144 | AMP_IN_MUTE(0), bits); | 17218 | HDA_AMP_MUTE, bits); |
17145 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 17219 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
17146 | AMP_IN_MUTE(0), bits); | 17220 | HDA_AMP_MUTE, bits); |
17147 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 0, | 17221 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 0, |
17148 | AMP_IN_MUTE(0), bits); | 17222 | HDA_AMP_MUTE, bits); |
17149 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 1, | 17223 | snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 1, |
17150 | AMP_IN_MUTE(0), bits); | 17224 | HDA_AMP_MUTE, bits); |
17151 | } | 17225 | } |
17152 | 17226 | ||
17153 | static void alc662_f5z_speaker_automute(struct hda_codec *codec) | 17227 | static void alc662_f5z_speaker_automute(struct hda_codec *codec) |
@@ -17186,14 +17260,14 @@ static void alc663_two_hp_m2_speaker_automute(struct hda_codec *codec) | |||
17186 | 17260 | ||
17187 | if (present1 || present2) { | 17261 | if (present1 || present2) { |
17188 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 17262 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
17189 | AMP_IN_MUTE(0), AMP_IN_MUTE(0)); | 17263 | HDA_AMP_MUTE, HDA_AMP_MUTE); |
17190 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 17264 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
17191 | AMP_IN_MUTE(0), AMP_IN_MUTE(0)); | 17265 | HDA_AMP_MUTE, HDA_AMP_MUTE); |
17192 | } else { | 17266 | } else { |
17193 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, | 17267 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, |
17194 | AMP_IN_MUTE(0), 0); | 17268 | HDA_AMP_MUTE, 0); |
17195 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, | 17269 | snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, |
17196 | AMP_IN_MUTE(0), 0); | 17270 | HDA_AMP_MUTE, 0); |
17197 | } | 17271 | } |
17198 | } | 17272 | } |
17199 | 17273 | ||
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 8c416bb18a57..c4be3fab94e5 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1730,6 +1730,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { | |||
1730 | "HP HDX", STAC_HP_HDX), /* HDX16 */ | 1730 | "HP HDX", STAC_HP_HDX), /* HDX16 */ |
1731 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3620, | 1731 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3620, |
1732 | "HP dv6", STAC_HP_DV5), | 1732 | "HP dv6", STAC_HP_DV5), |
1733 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3061, | ||
1734 | "HP dv6", STAC_HP_DV5), /* HP dv6-1110ax */ | ||
1733 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010, | 1735 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010, |
1734 | "HP", STAC_HP_DV5), | 1736 | "HP", STAC_HP_DV5), |
1735 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, | 1737 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, |
diff --git a/sound/pci/ice1712/ak4xxx.c b/sound/pci/ice1712/ak4xxx.c index 03391da8c8c7..90d560c3df13 100644 --- a/sound/pci/ice1712/ak4xxx.c +++ b/sound/pci/ice1712/ak4xxx.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/io.h> | 24 | #include <asm/io.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/init.h> | 28 | #include <linux/init.h> |
28 | #include <sound/core.h> | 29 | #include <sound/core.h> |
29 | #include <sound/initval.h> | 30 | #include <sound/initval.h> |
diff --git a/sound/pci/ice1712/amp.c b/sound/pci/ice1712/amp.c index 6da21a2bcade..e328cfb7620c 100644 --- a/sound/pci/ice1712/amp.c +++ b/sound/pci/ice1712/amp.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/slab.h> | ||
29 | #include <sound/core.h> | 28 | #include <sound/core.h> |
30 | 29 | ||
31 | #include "ice1712.h" | 30 | #include "ice1712.h" |
diff --git a/sound/pci/ice1712/vt1720_mobo.c b/sound/pci/ice1712/vt1720_mobo.c index 7f9674b641c0..4c551e147c08 100644 --- a/sound/pci/ice1712/vt1720_mobo.c +++ b/sound/pci/ice1712/vt1720_mobo.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/slab.h> | ||
29 | #include <sound/core.h> | 28 | #include <sound/core.h> |
30 | 29 | ||
31 | #include "ice1712.h" | 30 | #include "ice1712.h" |
diff --git a/sound/pci/ice1712/wtm.c b/sound/pci/ice1712/wtm.c index 5af9e84456d1..e618f789026e 100644 --- a/sound/pci/ice1712/wtm.c +++ b/sound/pci/ice1712/wtm.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/slab.h> | ||
33 | #include <sound/core.h> | 32 | #include <sound/core.h> |
34 | 33 | ||
35 | #include "ice1712.h" | 34 | #include "ice1712.h" |
diff --git a/sound/pci/lx6464es/lx6464es.c b/sound/pci/lx6464es/lx6464es.c index 0cca56038cd9..ef9af3f4ace2 100644 --- a/sound/pci/lx6464es/lx6464es.c +++ b/sound/pci/lx6464es/lx6464es.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <sound/initval.h> | 31 | #include <sound/initval.h> |
31 | #include <sound/control.h> | 32 | #include <sound/control.h> |
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index 7e8e7da592a9..3be8f97c8bc0 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
28 | #include <linux/moduleparam.h> | 28 | #include <linux/moduleparam.h> |
29 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
30 | #include <linux/slab.h> | ||
30 | 31 | ||
31 | #include <sound/core.h> | 32 | #include <sound/core.h> |
32 | #include <sound/initval.h> | 33 | #include <sound/initval.h> |
@@ -1161,13 +1162,15 @@ static long snd_mixart_BA0_read(struct snd_info_entry *entry, void *file_private | |||
1161 | unsigned long count, unsigned long pos) | 1162 | unsigned long count, unsigned long pos) |
1162 | { | 1163 | { |
1163 | struct mixart_mgr *mgr = entry->private_data; | 1164 | struct mixart_mgr *mgr = entry->private_data; |
1165 | unsigned long maxsize; | ||
1164 | 1166 | ||
1165 | count = count & ~3; /* make sure the read size is a multiple of 4 bytes */ | 1167 | if (pos >= MIXART_BA0_SIZE) |
1166 | if(count <= 0) | ||
1167 | return 0; | 1168 | return 0; |
1168 | if(pos + count > MIXART_BA0_SIZE) | 1169 | maxsize = MIXART_BA0_SIZE - pos; |
1169 | count = (long)(MIXART_BA0_SIZE - pos); | 1170 | if (count > maxsize) |
1170 | if(copy_to_user_fromio(buf, MIXART_MEM( mgr, pos ), count)) | 1171 | count = maxsize; |
1172 | count = count & ~3; /* make sure the read size is a multiple of 4 bytes */ | ||
1173 | if (copy_to_user_fromio(buf, MIXART_MEM(mgr, pos), count)) | ||
1171 | return -EFAULT; | 1174 | return -EFAULT; |
1172 | return count; | 1175 | return count; |
1173 | } | 1176 | } |
@@ -1180,13 +1183,15 @@ static long snd_mixart_BA1_read(struct snd_info_entry *entry, void *file_private | |||
1180 | unsigned long count, unsigned long pos) | 1183 | unsigned long count, unsigned long pos) |
1181 | { | 1184 | { |
1182 | struct mixart_mgr *mgr = entry->private_data; | 1185 | struct mixart_mgr *mgr = entry->private_data; |
1186 | unsigned long maxsize; | ||
1183 | 1187 | ||
1184 | count = count & ~3; /* make sure the read size is a multiple of 4 bytes */ | 1188 | if (pos > MIXART_BA1_SIZE) |
1185 | if(count <= 0) | ||
1186 | return 0; | 1189 | return 0; |
1187 | if(pos + count > MIXART_BA1_SIZE) | 1190 | maxsize = MIXART_BA1_SIZE - pos; |
1188 | count = (long)(MIXART_BA1_SIZE - pos); | 1191 | if (count > maxsize) |
1189 | if(copy_to_user_fromio(buf, MIXART_REG( mgr, pos ), count)) | 1192 | count = maxsize; |
1193 | count = count & ~3; /* make sure the read size is a multiple of 4 bytes */ | ||
1194 | if (copy_to_user_fromio(buf, MIXART_REG(mgr, pos), count)) | ||
1190 | return -EFAULT; | 1195 | return -EFAULT; |
1191 | return count; | 1196 | return count; |
1192 | } | 1197 | } |
diff --git a/sound/pci/mixart/mixart_hwdep.c b/sound/pci/mixart/mixart_hwdep.c index 4cf4cd8c939c..bf2696aa5d49 100644 --- a/sound/pci/mixart/mixart_hwdep.c +++ b/sound/pci/mixart/mixart_hwdep.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/pci.h> | 24 | #include <linux/pci.h> |
25 | #include <linux/firmware.h> | 25 | #include <linux/firmware.h> |
26 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
27 | #include <linux/slab.h> | ||
27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
28 | #include <sound/core.h> | 29 | #include <sound/core.h> |
29 | #include "mixart.h" | 30 | #include "mixart.h" |
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index 9c5e6450eebb..fad03d64e3ad 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/slab.h> | ||
24 | #include <sound/ac97_codec.h> | 25 | #include <sound/ac97_codec.h> |
25 | #include <sound/asoundef.h> | 26 | #include <sound/asoundef.h> |
26 | #include <sound/core.h> | 27 | #include <sound/core.h> |
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c index d5e1c6eb7b7b..3c04524de37c 100644 --- a/sound/pci/rme32.c +++ b/sound/pci/rme32.c | |||
@@ -70,10 +70,10 @@ | |||
70 | 70 | ||
71 | 71 | ||
72 | #include <linux/delay.h> | 72 | #include <linux/delay.h> |
73 | #include <linux/gfp.h> | ||
73 | #include <linux/init.h> | 74 | #include <linux/init.h> |
74 | #include <linux/interrupt.h> | 75 | #include <linux/interrupt.h> |
75 | #include <linux/pci.h> | 76 | #include <linux/pci.h> |
76 | #include <linux/slab.h> | ||
77 | #include <linux/moduleparam.h> | 77 | #include <linux/moduleparam.h> |
78 | 78 | ||
79 | #include <sound/core.h> | 79 | #include <sound/core.h> |
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c index 9d5252bc870c..d19dc052c391 100644 --- a/sound/pci/rme96.c +++ b/sound/pci/rme96.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/slab.h> | ||
31 | #include <linux/moduleparam.h> | 30 | #include <linux/moduleparam.h> |
32 | 31 | ||
33 | #include <sound/core.h> | 32 | #include <sound/core.h> |
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index 52c6eb57cc3f..b92adef8e81e 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
29 | #include <linux/firmware.h> | 28 | #include <linux/firmware.h> |
30 | #include <linux/moduleparam.h> | 29 | #include <linux/moduleparam.h> |
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index 44a3e2d8c556..c492af5b25f3 100644 --- a/sound/pci/rme9652/rme9652.c +++ b/sound/pci/rme9652/rme9652.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/pci.h> | 26 | #include <linux/pci.h> |
27 | #include <linux/slab.h> | ||
28 | #include <linux/moduleparam.h> | 27 | #include <linux/moduleparam.h> |
29 | 28 | ||
30 | #include <sound/core.h> | 29 | #include <sound/core.h> |
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c index 7e3e8fbc90fe..9cc1b5aa0148 100644 --- a/sound/pci/sis7019.c +++ b/sound/pci/sis7019.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
26 | #include <linux/time.h> | 26 | #include <linux/time.h> |
27 | #include <linux/slab.h> | ||
27 | #include <linux/moduleparam.h> | 28 | #include <linux/moduleparam.h> |
28 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
29 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c index 5d2afa0b0ce4..9dce0bde5c05 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/info.h> | 24 | #include <sound/info.h> |
24 | #include "pdaudiocf.h" | 25 | #include "pdaudiocf.h" |
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c index 0d668f471620..43f995a3f960 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/slab.h> | ||
24 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
25 | #include <sound/core.h> | 24 | #include <sound/core.h> |
26 | #include <sound/asoundef.h> | 25 | #include <sound/asoundef.h> |
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c index 7be3b3357045..cfd1438bcc64 100644 --- a/sound/pcmcia/vx/vxpocket.c +++ b/sound/pcmcia/vx/vxpocket.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/moduleparam.h> | 23 | #include <linux/moduleparam.h> |
24 | #include <linux/slab.h> | ||
24 | #include <sound/core.h> | 25 | #include <sound/core.h> |
25 | #include "vxpocket.h" | 26 | #include "vxpocket.h" |
26 | #include <pcmcia/ciscode.h> | 27 | #include <pcmcia/ciscode.h> |
diff --git a/sound/ppc/burgundy.c b/sound/ppc/burgundy.c index 1f72e1c786bf..00e2d5166d0a 100644 --- a/sound/ppc/burgundy.c +++ b/sound/ppc/burgundy.c | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/slab.h> | ||
25 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
26 | #include <sound/core.h> | 25 | #include <sound/core.h> |
27 | #include "pmac.h" | 26 | #include "pmac.h" |
diff --git a/sound/ppc/keywest.c b/sound/ppc/keywest.c index d06f780bd7e8..8f064c7ce745 100644 --- a/sound/ppc/keywest.c +++ b/sound/ppc/keywest.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/slab.h> | ||
26 | #include <sound/core.h> | 25 | #include <sound/core.h> |
27 | #include "pmac.h" | 26 | #include "pmac.h" |
28 | 27 | ||
diff --git a/sound/ppc/snd_ps3.c b/sound/ppc/snd_ps3.c index 53c81a547613..2f12da4da561 100644 --- a/sound/ppc/snd_ps3.c +++ b/sound/ppc/snd_ps3.c | |||
@@ -20,10 +20,10 @@ | |||
20 | 20 | ||
21 | #include <linux/dma-mapping.h> | 21 | #include <linux/dma-mapping.h> |
22 | #include <linux/dmapool.h> | 22 | #include <linux/dmapool.h> |
23 | #include <linux/gfp.h> | ||
23 | #include <linux/init.h> | 24 | #include <linux/init.h> |
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
25 | #include <linux/io.h> | 26 | #include <linux/io.h> |
26 | #include <linux/slab.h> | ||
27 | 27 | ||
28 | #include <sound/asound.h> | 28 | #include <sound/asound.h> |
29 | #include <sound/control.h> | 29 | #include <sound/control.h> |
diff --git a/sound/sh/sh_dac_audio.c b/sound/sh/sh_dac_audio.c index 76d9ad27d91c..68e0dee4ff05 100644 --- a/sound/sh/sh_dac_audio.c +++ b/sound/sh/sh_dac_audio.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/slab.h> | ||
29 | #include <sound/core.h> | 30 | #include <sound/core.h> |
30 | #include <sound/initval.h> | 31 | #include <sound/initval.h> |
31 | #include <sound/pcm.h> | 32 | #include <sound/pcm.h> |
diff --git a/sound/soc/atmel/atmel-pcm.c b/sound/soc/atmel/atmel-pcm.c index 9ef6b96373f5..3e6628c8e665 100644 --- a/sound/soc/atmel/atmel-pcm.c +++ b/sound/soc/atmel/atmel-pcm.c | |||
@@ -180,7 +180,7 @@ static int atmel_pcm_hw_params(struct snd_pcm_substream *substream, | |||
180 | snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); | 180 | snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); |
181 | runtime->dma_bytes = params_buffer_bytes(params); | 181 | runtime->dma_bytes = params_buffer_bytes(params); |
182 | 182 | ||
183 | prtd->params = rtd->dai->cpu_dai->dma_data; | 183 | prtd->params = snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream); |
184 | prtd->params->dma_intr_handler = atmel_pcm_dma_irq; | 184 | prtd->params->dma_intr_handler = atmel_pcm_dma_irq; |
185 | 185 | ||
186 | prtd->dma_buffer = runtime->dma_addr; | 186 | prtd->dma_buffer = runtime->dma_addr; |
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index e588e63f18d2..0b59806905d1 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c | |||
@@ -363,12 +363,12 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream, | |||
363 | ssc_p->dma_params[dir] = dma_params; | 363 | ssc_p->dma_params[dir] = dma_params; |
364 | 364 | ||
365 | /* | 365 | /* |
366 | * The cpu_dai->dma_data field is only used to communicate the | 366 | * The snd_soc_pcm_stream->dma_data field is only used to communicate |
367 | * appropriate DMA parameters to the pcm driver hw_params() | 367 | * the appropriate DMA parameters to the pcm driver hw_params() |
368 | * function. It should not be used for other purposes | 368 | * function. It should not be used for other purposes |
369 | * as it is common to all substreams. | 369 | * as it is common to all substreams. |
370 | */ | 370 | */ |
371 | rtd->dai->cpu_dai->dma_data = dma_params; | 371 | snd_soc_dai_set_dma_data(rtd->dai->cpu_dai, substream, dma_params); |
372 | 372 | ||
373 | channels = params_channels(params); | 373 | channels = params_channels(params); |
374 | 374 | ||
diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c index 340311d7fed5..a61ccd2d505f 100644 --- a/sound/soc/au1x/psc-ac97.c +++ b/sound/soc/au1x/psc-ac97.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/device.h> | 21 | #include <linux/device.h> |
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
22 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c index 0cf2ca61c776..495be6e71931 100644 --- a/sound/soc/au1x/psc-i2s.c +++ b/sound/soc/au1x/psc-i2s.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/suspend.h> | 22 | #include <linux/suspend.h> |
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
diff --git a/sound/soc/blackfin/bf5xx-ac97-pcm.c b/sound/soc/blackfin/bf5xx-ac97-pcm.c index 67cbfe7283da..5e7aacf3bb5a 100644 --- a/sound/soc/blackfin/bf5xx-ac97-pcm.c +++ b/sound/soc/blackfin/bf5xx-ac97-pcm.c | |||
@@ -29,8 +29,8 @@ | |||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <linux/gfp.h> | ||
34 | 34 | ||
35 | #include <sound/core.h> | 35 | #include <sound/core.h> |
36 | #include <sound/pcm.h> | 36 | #include <sound/pcm.h> |
diff --git a/sound/soc/blackfin/bf5xx-ac97.c b/sound/soc/blackfin/bf5xx-ac97.c index e69322978739..523b7fc33f4e 100644 --- a/sound/soc/blackfin/bf5xx-ac97.c +++ b/sound/soc/blackfin/bf5xx-ac97.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/wait.h> | 17 | #include <linux/wait.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include <sound/core.h> | 21 | #include <sound/core.h> |
21 | #include <sound/pcm.h> | 22 | #include <sound/pcm.h> |
diff --git a/sound/soc/blackfin/bf5xx-i2s-pcm.c b/sound/soc/blackfin/bf5xx-i2s-pcm.c index c6c6a4a7d948..1d2a1adf2575 100644 --- a/sound/soc/blackfin/bf5xx-i2s-pcm.c +++ b/sound/soc/blackfin/bf5xx-i2s-pcm.c | |||
@@ -29,8 +29,8 @@ | |||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <linux/gfp.h> | ||
34 | 34 | ||
35 | #include <sound/core.h> | 35 | #include <sound/core.h> |
36 | #include <sound/pcm.h> | 36 | #include <sound/pcm.h> |
diff --git a/sound/soc/blackfin/bf5xx-tdm-pcm.c b/sound/soc/blackfin/bf5xx-tdm-pcm.c index 5e03bb2f3cd7..6bac1ac1a315 100644 --- a/sound/soc/blackfin/bf5xx-tdm-pcm.c +++ b/sound/soc/blackfin/bf5xx-tdm-pcm.c | |||
@@ -29,8 +29,8 @@ | |||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <linux/gfp.h> | ||
34 | 34 | ||
35 | #include <sound/core.h> | 35 | #include <sound/core.h> |
36 | #include <sound/pcm.h> | 36 | #include <sound/pcm.h> |
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index a1bbe16b7f96..1f5e57a4bb7a 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
17 | #include <linux/device.h> | 18 | #include <linux/device.h> |
18 | #include <sound/core.h> | 19 | #include <sound/core.h> |
@@ -80,9 +81,11 @@ static int ac97_write(struct snd_soc_codec *codec, unsigned int reg, | |||
80 | static int ac97_soc_probe(struct platform_device *pdev) | 81 | static int ac97_soc_probe(struct platform_device *pdev) |
81 | { | 82 | { |
82 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 83 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
84 | struct snd_soc_card *card = socdev->card; | ||
83 | struct snd_soc_codec *codec; | 85 | struct snd_soc_codec *codec; |
84 | struct snd_ac97_bus *ac97_bus; | 86 | struct snd_ac97_bus *ac97_bus; |
85 | struct snd_ac97_template ac97_template; | 87 | struct snd_ac97_template ac97_template; |
88 | int i; | ||
86 | int ret = 0; | 89 | int ret = 0; |
87 | 90 | ||
88 | printk(KERN_INFO "AC97 SoC Audio Codec %s\n", AC97_VERSION); | 91 | printk(KERN_INFO "AC97 SoC Audio Codec %s\n", AC97_VERSION); |
@@ -102,12 +105,6 @@ static int ac97_soc_probe(struct platform_device *pdev) | |||
102 | INIT_LIST_HEAD(&codec->dapm_widgets); | 105 | INIT_LIST_HEAD(&codec->dapm_widgets); |
103 | INIT_LIST_HEAD(&codec->dapm_paths); | 106 | INIT_LIST_HEAD(&codec->dapm_paths); |
104 | 107 | ||
105 | ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); | ||
106 | if (ret < 0) { | ||
107 | printk(KERN_ERR "ASoC: failed to init gen ac97 glue\n"); | ||
108 | goto err; | ||
109 | } | ||
110 | |||
111 | /* register pcms */ | 108 | /* register pcms */ |
112 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); | 109 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); |
113 | if (ret < 0) | 110 | if (ret < 0) |
@@ -123,6 +120,13 @@ static int ac97_soc_probe(struct platform_device *pdev) | |||
123 | if (ret < 0) | 120 | if (ret < 0) |
124 | goto bus_err; | 121 | goto bus_err; |
125 | 122 | ||
123 | for (i = 0; i < card->num_links; i++) { | ||
124 | if (card->dai_link[i].codec_dai->ac97_control) { | ||
125 | snd_ac97_dev_add_pdata(codec->ac97, | ||
126 | card->dai_link[i].cpu_dai->ac97_pdata); | ||
127 | } | ||
128 | } | ||
129 | |||
126 | return 0; | 130 | return 0; |
127 | 131 | ||
128 | bus_err: | 132 | bus_err: |
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c index 3c80137d5938..11b62dee842c 100644 --- a/sound/soc/codecs/ad1836.c +++ b/sound/soc/codecs/ad1836.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/module.h> | 21 | #include <linux/module.h> |
21 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
22 | #include <linux/device.h> | 23 | #include <linux/device.h> |
diff --git a/sound/soc/codecs/ad1938.c b/sound/soc/codecs/ad1938.c index c233810d463d..240cd155b313 100644 --- a/sound/soc/codecs/ad1938.c +++ b/sound/soc/codecs/ad1938.c | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/slab.h> | ||
30 | #include <linux/module.h> | 31 | #include <linux/module.h> |
31 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
32 | #include <linux/device.h> | 33 | #include <linux/device.h> |
diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c index 39c0f7584e65..042072738cdc 100644 --- a/sound/soc/codecs/ad1980.c +++ b/sound/soc/codecs/ad1980.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/module.h> | 16 | #include <linux/module.h> |
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
17 | #include <linux/device.h> | 18 | #include <linux/device.h> |
diff --git a/sound/soc/codecs/ad73311.c b/sound/soc/codecs/ad73311.c index d2fcc601722c..475807bea2c2 100644 --- a/sound/soc/codecs/ad73311.c +++ b/sound/soc/codecs/ad73311.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/device.h> | 17 | #include <linux/device.h> |
diff --git a/sound/soc/codecs/ads117x.c b/sound/soc/codecs/ads117x.c index cc96411ca3e6..f8e75edb27b7 100644 --- a/sound/soc/codecs/ads117x.c +++ b/sound/soc/codecs/ads117x.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/device.h> | 16 | #include <linux/device.h> |
16 | #include <sound/core.h> | 17 | #include <sound/core.h> |
diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c index b68d99fb6af0..bdeb10dfd887 100644 --- a/sound/soc/codecs/ak4104.c +++ b/sound/soc/codecs/ak4104.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/slab.h> | ||
13 | #include <sound/core.h> | 14 | #include <sound/core.h> |
14 | #include <sound/soc.h> | 15 | #include <sound/soc.h> |
15 | #include <sound/initval.h> | 16 | #include <sound/initval.h> |
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c index ff966567e2ba..352d1d08dbd9 100644 --- a/sound/soc/codecs/ak4535.c +++ b/sound/soc/codecs/ak4535.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/pm.h> | 19 | #include <linux/pm.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index 3ef16bbc8c83..729859cf6ca8 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/pm.h> | 29 | #include <linux/pm.h> |
30 | #include <linux/i2c.h> | 30 | #include <linux/i2c.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/slab.h> | ||
32 | #include <sound/core.h> | 33 | #include <sound/core.h> |
33 | #include <sound/pcm.h> | 34 | #include <sound/pcm.h> |
34 | #include <sound/pcm_params.h> | 35 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c index 82fca284d007..926797a014c7 100644 --- a/sound/soc/codecs/ak4671.c +++ b/sound/soc/codecs/ak4671.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/slab.h> | ||
18 | #include <sound/soc.h> | 19 | #include <sound/soc.h> |
19 | #include <sound/soc-dapm.h> | 20 | #include <sound/soc-dapm.h> |
20 | #include <sound/initval.h> | 21 | #include <sound/initval.h> |
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index dfbeb2db61b3..81a62d198b70 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/slab.h> | ||
26 | #include <sound/core.h> | 27 | #include <sound/core.h> |
27 | #include <sound/soc.h> | 28 | #include <sound/soc.h> |
28 | #include <sound/initval.h> | 29 | #include <sound/initval.h> |
diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c index e000cdfec1ec..9f169c477108 100644 --- a/sound/soc/codecs/cx20442.c +++ b/sound/soc/codecs/cx20442.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/tty.h> | 16 | #include <linux/tty.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include <sound/core.h> | 19 | #include <sound/core.h> |
19 | #include <sound/initval.h> | 20 | #include <sound/initval.h> |
diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c index cf2975a7294a..366daf1d044e 100644 --- a/sound/soc/codecs/da7210.c +++ b/sound/soc/codecs/da7210.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/pm.h> | 23 | #include <linux/pm.h> |
24 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/slab.h> | ||
26 | #include <sound/core.h> | 27 | #include <sound/core.h> |
27 | #include <sound/pcm.h> | 28 | #include <sound/pcm.h> |
28 | #include <sound/pcm_params.h> | 29 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/pcm3008.c b/sound/soc/codecs/pcm3008.c index 2afcd0a8669d..5a5f187a2657 100644 --- a/sound/soc/codecs/pcm3008.c +++ b/sound/soc/codecs/pcm3008.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/initval.h> | 25 | #include <sound/initval.h> |
diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c index d2ff1cde6883..29d0906a924a 100644 --- a/sound/soc/codecs/ssm2602.c +++ b/sound/soc/codecs/ssm2602.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/pm.h> | 33 | #include <linux/pm.h> |
34 | #include <linux/i2c.h> | 34 | #include <linux/i2c.h> |
35 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
36 | #include <linux/slab.h> | ||
36 | #include <sound/core.h> | 37 | #include <sound/core.h> |
37 | #include <sound/pcm.h> | 38 | #include <sound/pcm.h> |
38 | #include <sound/pcm_params.h> | 39 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c index 81b8c9dfe7fc..3293629dcb3b 100644 --- a/sound/soc/codecs/stac9766.c +++ b/sound/soc/codecs/stac9766.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/module.h> | 19 | #include <linux/module.h> |
19 | #include <linux/device.h> | 20 | #include <linux/device.h> |
20 | #include <sound/core.h> | 21 | #include <sound/core.h> |
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index da589d8664d0..776b79cde904 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/pm.h> | 25 | #include <linux/pm.h> |
26 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/slab.h> | ||
28 | #include <sound/core.h> | 29 | #include <sound/core.h> |
29 | #include <sound/pcm.h> | 30 | #include <sound/pcm.h> |
30 | #include <sound/pcm_params.h> | 31 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c index 357b609196e3..b5b7d6a03844 100644 --- a/sound/soc/codecs/tlv320aic26.c +++ b/sound/soc/codecs/tlv320aic26.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
14 | #include <linux/sysfs.h> | 14 | #include <linux/sysfs.h> |
15 | #include <linux/spi/spi.h> | 15 | #include <linux/spi/spi.h> |
16 | #include <linux/slab.h> | ||
16 | #include <sound/core.h> | 17 | #include <sound/core.h> |
17 | #include <sound/pcm.h> | 18 | #include <sound/pcm.h> |
18 | #include <sound/pcm_params.h> | 19 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index e4b946a19ea3..4a6d56c3fed9 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/pm.h> | 39 | #include <linux/pm.h> |
40 | #include <linux/i2c.h> | 40 | #include <linux/i2c.h> |
41 | #include <linux/platform_device.h> | 41 | #include <linux/platform_device.h> |
42 | #include <linux/slab.h> | ||
42 | #include <sound/core.h> | 43 | #include <sound/core.h> |
43 | #include <sound/pcm.h> | 44 | #include <sound/pcm.h> |
44 | #include <sound/pcm_params.h> | 45 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index f9f367d29a90..d1e0e81ef30c 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/gpio.h> | 32 | #include <linux/gpio.h> |
33 | #include <linux/regulator/consumer.h> | 33 | #include <linux/regulator/consumer.h> |
34 | #include <linux/slab.h> | ||
34 | #include <sound/core.h> | 35 | #include <sound/core.h> |
35 | #include <sound/pcm.h> | 36 | #include <sound/pcm.h> |
36 | #include <sound/pcm_params.h> | 37 | #include <sound/pcm_params.h> |
@@ -778,7 +779,7 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream) | |||
778 | if (dac33->fifo_mode) { | 779 | if (dac33->fifo_mode) { |
779 | /* Generic for all FIFO modes */ | 780 | /* Generic for all FIFO modes */ |
780 | /* 50-51 : ASRC Control registers */ | 781 | /* 50-51 : ASRC Control registers */ |
781 | dac33_write(codec, DAC33_ASRC_CTRL_A, (1 << 4)); /* div=2 */ | 782 | dac33_write(codec, DAC33_ASRC_CTRL_A, DAC33_SRCLKDIV(1)); |
782 | dac33_write(codec, DAC33_ASRC_CTRL_B, 1); /* ??? */ | 783 | dac33_write(codec, DAC33_ASRC_CTRL_B, 1); /* ??? */ |
783 | 784 | ||
784 | /* Write registers 0x34 and 0x35 (MSB, LSB) */ | 785 | /* Write registers 0x34 and 0x35 (MSB, LSB) */ |
@@ -1038,11 +1039,7 @@ static int dac33_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
1038 | case SND_SOC_DAIFMT_DSP_A: | 1039 | case SND_SOC_DAIFMT_DSP_A: |
1039 | aictrl_a |= DAC33_AFMT_DSP; | 1040 | aictrl_a |= DAC33_AFMT_DSP; |
1040 | aictrl_b &= ~DAC33_DATA_DELAY_MASK; | 1041 | aictrl_b &= ~DAC33_DATA_DELAY_MASK; |
1041 | aictrl_b |= DAC33_DATA_DELAY(1); /* 1 bit delay */ | 1042 | aictrl_b |= DAC33_DATA_DELAY(0); |
1042 | break; | ||
1043 | case SND_SOC_DAIFMT_DSP_B: | ||
1044 | aictrl_a |= DAC33_AFMT_DSP; | ||
1045 | aictrl_b &= ~DAC33_DATA_DELAY_MASK; /* No delay */ | ||
1046 | break; | 1043 | break; |
1047 | case SND_SOC_DAIFMT_RIGHT_J: | 1044 | case SND_SOC_DAIFMT_RIGHT_J: |
1048 | aictrl_a |= DAC33_AFMT_RIGHT_J; | 1045 | aictrl_a |= DAC33_AFMT_RIGHT_J; |
@@ -1066,7 +1063,7 @@ static void dac33_init_chip(struct snd_soc_codec *codec) | |||
1066 | { | 1063 | { |
1067 | /* 44-46: DAC Control Registers */ | 1064 | /* 44-46: DAC Control Registers */ |
1068 | /* A : DAC sample rate Fsref/1.5 */ | 1065 | /* A : DAC sample rate Fsref/1.5 */ |
1069 | dac33_write(codec, DAC33_DAC_CTRL_A, DAC33_DACRATE(1)); | 1066 | dac33_write(codec, DAC33_DAC_CTRL_A, DAC33_DACRATE(0)); |
1070 | /* B : DAC src=normal, not muted */ | 1067 | /* B : DAC src=normal, not muted */ |
1071 | dac33_write(codec, DAC33_DAC_CTRL_B, DAC33_DACSRCR_RIGHT | | 1068 | dac33_write(codec, DAC33_DAC_CTRL_B, DAC33_DACSRCR_RIGHT | |
1072 | DAC33_DACSRCL_LEFT); | 1069 | DAC33_DACSRCL_LEFT); |
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index 958d49c969ac..569ad8758a84 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | #include <linux/regulator/consumer.h> | 28 | #include <linux/regulator/consumer.h> |
29 | #include <linux/slab.h> | ||
29 | #include <sound/tpa6130a2-plat.h> | 30 | #include <sound/tpa6130a2-plat.h> |
30 | #include <sound/soc.h> | 31 | #include <sound/soc.h> |
31 | #include <sound/soc-dapm.h> | 32 | #include <sound/soc-dapm.h> |
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 6f5d4af20052..520ffd6536c3 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/i2c/twl.h> | 29 | #include <linux/i2c/twl.h> |
30 | #include <linux/slab.h> | ||
30 | #include <sound/core.h> | 31 | #include <sound/core.h> |
31 | #include <sound/pcm.h> | 32 | #include <sound/pcm.h> |
32 | #include <sound/pcm_params.h> | 33 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c index 3e99fe5131dd..a8dcd5a5bbcb 100644 --- a/sound/soc/codecs/uda134x.c +++ b/sound/soc/codecs/uda134x.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/slab.h> | ||
18 | #include <sound/pcm.h> | 19 | #include <sound/pcm.h> |
19 | #include <sound/pcm_params.h> | 20 | #include <sound/pcm_params.h> |
20 | #include <sound/soc.h> | 21 | #include <sound/soc.h> |
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c index 217b02680597..a34cbcf7904f 100644 --- a/sound/soc/codecs/wm2000.c +++ b/sound/soc/codecs/wm2000.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/i2c.h> | 32 | #include <linux/i2c.h> |
33 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
34 | #include <linux/debugfs.h> | 34 | #include <linux/debugfs.h> |
35 | #include <linux/slab.h> | ||
35 | #include <sound/core.h> | 36 | #include <sound/core.h> |
36 | #include <sound/pcm.h> | 37 | #include <sound/pcm.h> |
37 | #include <sound/pcm_params.h> | 38 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index df2c6d9617fb..2e0772f9c456 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
17 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
18 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c index b432f4d4a324..6acc885cf9b7 100644 --- a/sound/soc/codecs/wm8400.c +++ b/sound/soc/codecs/wm8400.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/moduleparam.h> | 15 | #include <linux/moduleparam.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
19 | #include <linux/pm.h> | 20 | #include <linux/pm.h> |
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c index af8cb6995a1f..9000b1d19afb 100644 --- a/sound/soc/codecs/wm8510.c +++ b/sound/soc/codecs/wm8510.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/spi/spi.h> | 21 | #include <linux/spi/spi.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c index d3a61d7ea0c5..19cd47293424 100644 --- a/sound/soc/codecs/wm8523.c +++ b/sound/soc/codecs/wm8523.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/regulator/consumer.h> | 21 | #include <linux/regulator/consumer.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index d077df6f5e75..8cc9042965eb 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/regulator/consumer.h> | 27 | #include <linux/regulator/consumer.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include <sound/core.h> | 30 | #include <sound/core.h> |
30 | #include <sound/pcm.h> | 31 | #include <sound/pcm.h> |
diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c index 24a35603bcf7..8ca3812f2f2f 100644 --- a/sound/soc/codecs/wm8711.c +++ b/sound/soc/codecs/wm8711.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
23 | #include <linux/slab.h> | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
25 | #include <sound/pcm_params.h> | 26 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8727.c b/sound/soc/codecs/wm8727.c index 63a254e293ca..1072621e93fd 100644 --- a/sound/soc/codecs/wm8727.c +++ b/sound/soc/codecs/wm8727.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | #include <linux/device.h> | 19 | #include <linux/device.h> |
diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c index 3fb653ba363a..07adc375a706 100644 --- a/sound/soc/codecs/wm8728.c +++ b/sound/soc/codecs/wm8728.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/i2c.h> | 18 | #include <linux/i2c.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
21 | #include <linux/slab.h> | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 5a2619dbf283..e7c6bf163185 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/pm.h> | 19 | #include <linux/pm.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
22 | #include <linux/regulator/consumer.h> | 23 | #include <linux/regulator/consumer.h> |
23 | #include <linux/spi/spi.h> | 24 | #include <linux/spi/spi.h> |
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index 475c67ac7818..2916ed4d3844 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
23 | #include <linux/slab.h> | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
25 | #include <sound/pcm_params.h> | 26 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index c2444e7c8480..613199a0f799 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/i2c.h> | 40 | #include <linux/i2c.h> |
41 | #include <linux/platform_device.h> | 41 | #include <linux/platform_device.h> |
42 | #include <linux/spi/spi.h> | 42 | #include <linux/spi/spi.h> |
43 | #include <linux/slab.h> | ||
43 | #include <sound/core.h> | 44 | #include <sound/core.h> |
44 | #include <sound/pcm.h> | 45 | #include <sound/pcm.h> |
45 | #include <sound/pcm_params.h> | 46 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c index 44e7d9d82f87..60b1b3e1094b 100644 --- a/sound/soc/codecs/wm8776.c +++ b/sound/soc/codecs/wm8776.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
23 | #include <linux/slab.h> | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
25 | #include <sound/pcm_params.h> | 26 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c index dbc368c08263..b7fd96adac64 100644 --- a/sound/soc/codecs/wm8900.c +++ b/sound/soc/codecs/wm8900.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/pm.h> | 24 | #include <linux/pm.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/slab.h> | ||
27 | #include <sound/core.h> | 28 | #include <sound/core.h> |
28 | #include <sound/pcm.h> | 29 | #include <sound/pcm.h> |
29 | #include <sound/pcm_params.h> | 30 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 3595bd57c4eb..fa5f99fde68b 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/pm.h> | 23 | #include <linux/pm.h> |
24 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/slab.h> | ||
26 | #include <sound/core.h> | 27 | #include <sound/core.h> |
27 | #include <sound/pcm.h> | 28 | #include <sound/pcm.h> |
28 | #include <sound/pcm_params.h> | 29 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 593e47d0e0eb..c6f0abcc5711 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/regulator/consumer.h> | 21 | #include <linux/regulator/consumer.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index 31e39ffd1d8e..0c04b476487f 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/i2c.h> | 30 | #include <linux/i2c.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/spi/spi.h> | 32 | #include <linux/spi/spi.h> |
33 | #include <linux/slab.h> | ||
33 | #include <sound/core.h> | 34 | #include <sound/core.h> |
34 | #include <sound/pcm.h> | 35 | #include <sound/pcm.h> |
35 | #include <sound/pcm_params.h> | 36 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c index 615dab2b62ef..c8d7a809af4d 100644 --- a/sound/soc/codecs/wm8955.c +++ b/sound/soc/codecs/wm8955.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/i2c.h> | 18 | #include <linux/i2c.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/regulator/consumer.h> | 20 | #include <linux/regulator/consumer.h> |
21 | #include <linux/slab.h> | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index d07bcc1e1c60..f1e63e01b04d 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/pm.h> | 15 | #include <linux/pm.h> |
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/slab.h> | ||
18 | #include <sound/core.h> | 19 | #include <sound/core.h> |
19 | #include <sound/pcm.h> | 20 | #include <sound/pcm.h> |
20 | #include <sound/pcm_params.h> | 21 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index d2342c5e0425..50634ab76a5c 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/slab.h> | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c index d9540d55fc89..a65b781af512 100644 --- a/sound/soc/codecs/wm8971.c +++ b/sound/soc/codecs/wm8971.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/pm.h> | 20 | #include <linux/pm.h> |
21 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/slab.h> | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
25 | #include <sound/pcm_params.h> | 26 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index ee637af4737a..69708c4cc004 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/slab.h> | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c index 28bb59ea6ea1..526f56b09066 100644 --- a/sound/soc/codecs/wm8978.c +++ b/sound/soc/codecs/wm8978.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/pm.h> | 19 | #include <linux/pm.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c index 2862e4dced27..bb18c3ecfeb9 100644 --- a/sound/soc/codecs/wm8988.c +++ b/sound/soc/codecs/wm8988.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index 056b787b6ee0..831f4730bfd5 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/slab.h> | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c index bf022f68b84f..03e8b1a6a56c 100644 --- a/sound/soc/codecs/wm8993.c +++ b/sound/soc/codecs/wm8993.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/i2c.h> | 18 | #include <linux/i2c.h> |
19 | #include <linux/regulator/consumer.h> | 19 | #include <linux/regulator/consumer.h> |
20 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
21 | #include <linux/slab.h> | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 29f3771c33a4..9da0724cd47a 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/regulator/consumer.h> | 21 | #include <linux/regulator/consumer.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
@@ -3007,34 +3008,39 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec, | |||
3007 | break; | 3008 | break; |
3008 | 3009 | ||
3009 | case SND_SOC_BIAS_OFF: | 3010 | case SND_SOC_BIAS_OFF: |
3010 | /* Switch over to startup biases */ | 3011 | if (codec->bias_level == SND_SOC_BIAS_STANDBY) { |
3011 | snd_soc_update_bits(codec, WM8994_ANTIPOP_2, | 3012 | /* Switch over to startup biases */ |
3012 | WM8994_BIAS_SRC | WM8994_STARTUP_BIAS_ENA | | 3013 | snd_soc_update_bits(codec, WM8994_ANTIPOP_2, |
3013 | WM8994_VMID_BUF_ENA | | 3014 | WM8994_BIAS_SRC | |
3014 | WM8994_VMID_RAMP_MASK, | 3015 | WM8994_STARTUP_BIAS_ENA | |
3015 | WM8994_BIAS_SRC | WM8994_STARTUP_BIAS_ENA | | 3016 | WM8994_VMID_BUF_ENA | |
3016 | WM8994_VMID_BUF_ENA | | 3017 | WM8994_VMID_RAMP_MASK, |
3017 | (1 << WM8994_VMID_RAMP_SHIFT)); | 3018 | WM8994_BIAS_SRC | |
3018 | 3019 | WM8994_STARTUP_BIAS_ENA | | |
3019 | /* Disable main biases */ | 3020 | WM8994_VMID_BUF_ENA | |
3020 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_1, | 3021 | (1 << WM8994_VMID_RAMP_SHIFT)); |
3021 | WM8994_BIAS_ENA | WM8994_VMID_SEL_MASK, 0); | ||
3022 | 3022 | ||
3023 | /* Discharge line */ | 3023 | /* Disable main biases */ |
3024 | snd_soc_update_bits(codec, WM8994_ANTIPOP_1, | 3024 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_1, |
3025 | WM8994_LINEOUT1_DISCH | | 3025 | WM8994_BIAS_ENA | |
3026 | WM8994_LINEOUT2_DISCH, | 3026 | WM8994_VMID_SEL_MASK, 0); |
3027 | WM8994_LINEOUT1_DISCH | | ||
3028 | WM8994_LINEOUT2_DISCH); | ||
3029 | 3027 | ||
3030 | msleep(5); | 3028 | /* Discharge line */ |
3029 | snd_soc_update_bits(codec, WM8994_ANTIPOP_1, | ||
3030 | WM8994_LINEOUT1_DISCH | | ||
3031 | WM8994_LINEOUT2_DISCH, | ||
3032 | WM8994_LINEOUT1_DISCH | | ||
3033 | WM8994_LINEOUT2_DISCH); | ||
3031 | 3034 | ||
3032 | /* Switch off startup biases */ | 3035 | msleep(5); |
3033 | snd_soc_update_bits(codec, WM8994_ANTIPOP_2, | ||
3034 | WM8994_BIAS_SRC | WM8994_STARTUP_BIAS_ENA | | ||
3035 | WM8994_VMID_BUF_ENA | | ||
3036 | WM8994_VMID_RAMP_MASK, 0); | ||
3037 | 3036 | ||
3037 | /* Switch off startup biases */ | ||
3038 | snd_soc_update_bits(codec, WM8994_ANTIPOP_2, | ||
3039 | WM8994_BIAS_SRC | | ||
3040 | WM8994_STARTUP_BIAS_ENA | | ||
3041 | WM8994_VMID_BUF_ENA | | ||
3042 | WM8994_VMID_RAMP_MASK, 0); | ||
3043 | } | ||
3038 | break; | 3044 | break; |
3039 | } | 3045 | } |
3040 | codec->bias_level = level; | 3046 | codec->bias_level = level; |
@@ -3401,7 +3407,7 @@ struct snd_soc_dai wm8994_dai[] = { | |||
3401 | .rates = WM8994_RATES, | 3407 | .rates = WM8994_RATES, |
3402 | .formats = WM8994_FORMATS, | 3408 | .formats = WM8994_FORMATS, |
3403 | }, | 3409 | }, |
3404 | .playback = { | 3410 | .capture = { |
3405 | .stream_name = "AIF3 Capture", | 3411 | .stream_name = "AIF3 Capture", |
3406 | .channels_min = 2, | 3412 | .channels_min = 2, |
3407 | .channels_max = 2, | 3413 | .channels_max = 2, |
@@ -3730,11 +3736,12 @@ static int wm8994_codec_probe(struct platform_device *pdev) | |||
3730 | case 3: | 3736 | case 3: |
3731 | wm8994->hubs.dcs_codes = -5; | 3737 | wm8994->hubs.dcs_codes = -5; |
3732 | wm8994->hubs.hp_startup_mode = 1; | 3738 | wm8994->hubs.hp_startup_mode = 1; |
3739 | wm8994->hubs.dcs_readback_mode = 1; | ||
3733 | break; | 3740 | break; |
3734 | default: | 3741 | default: |
3742 | wm8994->hubs.dcs_readback_mode = 1; | ||
3735 | break; | 3743 | break; |
3736 | } | 3744 | } |
3737 | |||
3738 | 3745 | ||
3739 | /* Remember if AIFnLRCLK is configured as a GPIO. This should be | 3746 | /* Remember if AIFnLRCLK is configured as a GPIO. This should be |
3740 | * configured on init - if a system wants to do this dynamically | 3747 | * configured on init - if a system wants to do this dynamically |
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index c468497314ba..3a184fcb702b 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/slab.h> | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c index ec54c6da9856..8793341849d1 100644 --- a/sound/soc/codecs/wm9705.c +++ b/sound/soc/codecs/wm9705.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/device.h> | 16 | #include <linux/device.h> |
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index e237bf615129..2f48a8aae22c 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/device.h> | 17 | #include <linux/device.h> |
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index ceb86b4ddb25..2fca514fde58 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/device.h> | 21 | #include <linux/device.h> |
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index 0ad9f5d536c6..e1f225a3ac46 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c | |||
@@ -62,21 +62,27 @@ static const char *speaker_mode_text[] = { | |||
62 | static const struct soc_enum speaker_mode = | 62 | static const struct soc_enum speaker_mode = |
63 | SOC_ENUM_SINGLE(WM8993_SPKMIXR_ATTENUATION, 8, 2, speaker_mode_text); | 63 | SOC_ENUM_SINGLE(WM8993_SPKMIXR_ATTENUATION, 8, 2, speaker_mode_text); |
64 | 64 | ||
65 | static void wait_for_dc_servo(struct snd_soc_codec *codec) | 65 | static void wait_for_dc_servo(struct snd_soc_codec *codec, unsigned int op) |
66 | { | 66 | { |
67 | unsigned int reg; | 67 | unsigned int reg; |
68 | int count = 0; | 68 | int count = 0; |
69 | unsigned int val; | ||
70 | |||
71 | val = op | WM8993_DCS_ENA_CHAN_0 | WM8993_DCS_ENA_CHAN_1; | ||
72 | |||
73 | /* Trigger the command */ | ||
74 | snd_soc_write(codec, WM8993_DC_SERVO_0, val); | ||
69 | 75 | ||
70 | dev_dbg(codec->dev, "Waiting for DC servo...\n"); | 76 | dev_dbg(codec->dev, "Waiting for DC servo...\n"); |
71 | 77 | ||
72 | do { | 78 | do { |
73 | count++; | 79 | count++; |
74 | msleep(1); | 80 | msleep(1); |
75 | reg = snd_soc_read(codec, WM8993_DC_SERVO_READBACK_0); | 81 | reg = snd_soc_read(codec, WM8993_DC_SERVO_0); |
76 | dev_dbg(codec->dev, "DC servo: %x\n", reg); | 82 | dev_dbg(codec->dev, "DC servo: %x\n", reg); |
77 | } while (reg & WM8993_DCS_DATAPATH_BUSY); | 83 | } while (reg & op && count < 400); |
78 | 84 | ||
79 | if (reg & WM8993_DCS_DATAPATH_BUSY) | 85 | if (reg & op) |
80 | dev_err(codec->dev, "Timed out waiting for DC Servo\n"); | 86 | dev_err(codec->dev, "Timed out waiting for DC Servo\n"); |
81 | } | 87 | } |
82 | 88 | ||
@@ -86,51 +92,58 @@ static void wait_for_dc_servo(struct snd_soc_codec *codec) | |||
86 | static void calibrate_dc_servo(struct snd_soc_codec *codec) | 92 | static void calibrate_dc_servo(struct snd_soc_codec *codec) |
87 | { | 93 | { |
88 | struct wm_hubs_data *hubs = codec->private_data; | 94 | struct wm_hubs_data *hubs = codec->private_data; |
89 | u16 reg, dcs_cfg; | 95 | u16 reg, reg_l, reg_r, dcs_cfg; |
90 | 96 | ||
91 | /* Set for 32 series updates */ | 97 | /* Set for 32 series updates */ |
92 | snd_soc_update_bits(codec, WM8993_DC_SERVO_1, | 98 | snd_soc_update_bits(codec, WM8993_DC_SERVO_1, |
93 | WM8993_DCS_SERIES_NO_01_MASK, | 99 | WM8993_DCS_SERIES_NO_01_MASK, |
94 | 32 << WM8993_DCS_SERIES_NO_01_SHIFT); | 100 | 32 << WM8993_DCS_SERIES_NO_01_SHIFT); |
95 | 101 | wait_for_dc_servo(codec, | |
96 | /* Enable the DC servo. Write all bits to avoid triggering startup | 102 | WM8993_DCS_TRIG_SERIES_0 | WM8993_DCS_TRIG_SERIES_1); |
97 | * or write calibration. | ||
98 | */ | ||
99 | snd_soc_update_bits(codec, WM8993_DC_SERVO_0, | ||
100 | 0xFFFF, | ||
101 | WM8993_DCS_ENA_CHAN_0 | | ||
102 | WM8993_DCS_ENA_CHAN_1 | | ||
103 | WM8993_DCS_TRIG_SERIES_1 | | ||
104 | WM8993_DCS_TRIG_SERIES_0); | ||
105 | |||
106 | wait_for_dc_servo(codec); | ||
107 | 103 | ||
108 | /* Apply correction to DC servo result */ | 104 | /* Apply correction to DC servo result */ |
109 | if (hubs->dcs_codes) { | 105 | if (hubs->dcs_codes) { |
110 | dev_dbg(codec->dev, "Applying %d code DC servo correction\n", | 106 | dev_dbg(codec->dev, "Applying %d code DC servo correction\n", |
111 | hubs->dcs_codes); | 107 | hubs->dcs_codes); |
112 | 108 | ||
109 | /* Different chips in the family support different | ||
110 | * readback methods. | ||
111 | */ | ||
112 | switch (hubs->dcs_readback_mode) { | ||
113 | case 0: | ||
114 | reg_l = snd_soc_read(codec, WM8993_DC_SERVO_READBACK_1) | ||
115 | & WM8993_DCS_INTEG_CHAN_0_MASK;; | ||
116 | reg_r = snd_soc_read(codec, WM8993_DC_SERVO_READBACK_2) | ||
117 | & WM8993_DCS_INTEG_CHAN_1_MASK; | ||
118 | break; | ||
119 | case 1: | ||
120 | reg = snd_soc_read(codec, WM8993_DC_SERVO_3); | ||
121 | reg_l = (reg & WM8993_DCS_DAC_WR_VAL_1_MASK) | ||
122 | >> WM8993_DCS_DAC_WR_VAL_1_SHIFT; | ||
123 | reg_r = reg & WM8993_DCS_DAC_WR_VAL_0_MASK; | ||
124 | break; | ||
125 | default: | ||
126 | WARN(1, "Unknown DCS readback method"); | ||
127 | break; | ||
128 | } | ||
129 | |||
113 | /* HPOUT1L */ | 130 | /* HPOUT1L */ |
114 | reg = snd_soc_read(codec, WM8993_DC_SERVO_READBACK_1) & | 131 | if (reg_l + hubs->dcs_codes > 0 && |
115 | WM8993_DCS_INTEG_CHAN_0_MASK;; | 132 | reg_l + hubs->dcs_codes < 0xff) |
116 | reg += hubs->dcs_codes; | 133 | reg_l += hubs->dcs_codes; |
117 | dcs_cfg = reg << WM8993_DCS_DAC_WR_VAL_1_SHIFT; | 134 | dcs_cfg = reg_l << WM8993_DCS_DAC_WR_VAL_1_SHIFT; |
118 | 135 | ||
119 | /* HPOUT1R */ | 136 | /* HPOUT1R */ |
120 | reg = snd_soc_read(codec, WM8993_DC_SERVO_READBACK_2) & | 137 | if (reg_r + hubs->dcs_codes > 0 && |
121 | WM8993_DCS_INTEG_CHAN_1_MASK; | 138 | reg_r + hubs->dcs_codes < 0xff) |
122 | reg += hubs->dcs_codes; | 139 | reg_r += hubs->dcs_codes; |
123 | dcs_cfg |= reg; | 140 | dcs_cfg |= reg_r; |
124 | 141 | ||
125 | /* Do it */ | 142 | /* Do it */ |
126 | snd_soc_write(codec, WM8993_DC_SERVO_3, dcs_cfg); | 143 | snd_soc_write(codec, WM8993_DC_SERVO_3, dcs_cfg); |
127 | snd_soc_update_bits(codec, WM8993_DC_SERVO_0, | 144 | wait_for_dc_servo(codec, |
128 | WM8993_DCS_TRIG_DAC_WR_0 | | 145 | WM8993_DCS_TRIG_DAC_WR_0 | |
129 | WM8993_DCS_TRIG_DAC_WR_1, | 146 | WM8993_DCS_TRIG_DAC_WR_1); |
130 | WM8993_DCS_TRIG_DAC_WR_0 | | ||
131 | WM8993_DCS_TRIG_DAC_WR_1); | ||
132 | |||
133 | wait_for_dc_servo(codec); | ||
134 | } | 147 | } |
135 | } | 148 | } |
136 | 149 | ||
@@ -141,10 +154,16 @@ static int wm8993_put_dc_servo(struct snd_kcontrol *kcontrol, | |||
141 | struct snd_ctl_elem_value *ucontrol) | 154 | struct snd_ctl_elem_value *ucontrol) |
142 | { | 155 | { |
143 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 156 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
157 | struct wm_hubs_data *hubs = codec->private_data; | ||
144 | int ret; | 158 | int ret; |
145 | 159 | ||
146 | ret = snd_soc_put_volsw_2r(kcontrol, ucontrol); | 160 | ret = snd_soc_put_volsw_2r(kcontrol, ucontrol); |
147 | 161 | ||
162 | /* If we're applying an offset correction then updating the | ||
163 | * callibration would be likely to introduce further offsets. */ | ||
164 | if (hubs->dcs_codes) | ||
165 | return ret; | ||
166 | |||
148 | /* Only need to do this if the outputs are active */ | 167 | /* Only need to do this if the outputs are active */ |
149 | if (snd_soc_read(codec, WM8993_POWER_MANAGEMENT_1) | 168 | if (snd_soc_read(codec, WM8993_POWER_MANAGEMENT_1) |
150 | & (WM8993_HPOUT1L_ENA | WM8993_HPOUT1R_ENA)) | 169 | & (WM8993_HPOUT1L_ENA | WM8993_HPOUT1R_ENA)) |
diff --git a/sound/soc/codecs/wm_hubs.h b/sound/soc/codecs/wm_hubs.h index 420104fe9c90..e51c16683589 100644 --- a/sound/soc/codecs/wm_hubs.h +++ b/sound/soc/codecs/wm_hubs.h | |||
@@ -21,6 +21,7 @@ extern const unsigned int wm_hubs_spkmix_tlv[]; | |||
21 | /* This *must* be the first element of the codec->private_data struct */ | 21 | /* This *must* be the first element of the codec->private_data struct */ |
22 | struct wm_hubs_data { | 22 | struct wm_hubs_data { |
23 | int dcs_codes; | 23 | int dcs_codes; |
24 | int dcs_readback_mode; | ||
24 | int hp_startup_mode; | 25 | int hp_startup_mode; |
25 | }; | 26 | }; |
26 | 27 | ||
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index 6362ca05506e..adadcd3aa1b1 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
16 | #include <linux/io.h> | 17 | #include <linux/io.h> |
17 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
@@ -585,7 +586,8 @@ static int davinci_i2s_probe(struct platform_device *pdev) | |||
585 | dev->dma_params[SNDRV_PCM_STREAM_CAPTURE].channel = res->start; | 586 | dev->dma_params[SNDRV_PCM_STREAM_CAPTURE].channel = res->start; |
586 | 587 | ||
587 | davinci_i2s_dai.private_data = dev; | 588 | davinci_i2s_dai.private_data = dev; |
588 | davinci_i2s_dai.dma_data = dev->dma_params; | 589 | davinci_i2s_dai.capture.dma_data = dev->dma_params; |
590 | davinci_i2s_dai.playback.dma_data = dev->dma_params; | ||
589 | ret = snd_soc_register_dai(&davinci_i2s_dai); | 591 | ret = snd_soc_register_dai(&davinci_i2s_dai); |
590 | if (ret != 0) | 592 | if (ret != 0) |
591 | goto err_free_mem; | 593 | goto err_free_mem; |
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index ab6518d86f18..79f0f4ad242c 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
22 | #include <linux/io.h> | 23 | #include <linux/io.h> |
23 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
@@ -917,7 +918,8 @@ static int davinci_mcasp_probe(struct platform_device *pdev) | |||
917 | 918 | ||
918 | dma_data->channel = res->start; | 919 | dma_data->channel = res->start; |
919 | davinci_mcasp_dai[pdata->op_mode].private_data = dev; | 920 | davinci_mcasp_dai[pdata->op_mode].private_data = dev; |
920 | davinci_mcasp_dai[pdata->op_mode].dma_data = dev->dma_params; | 921 | davinci_mcasp_dai[pdata->op_mode].capture.dma_data = dev->dma_params; |
922 | davinci_mcasp_dai[pdata->op_mode].playback.dma_data = dev->dma_params; | ||
921 | davinci_mcasp_dai[pdata->op_mode].dev = &pdev->dev; | 923 | davinci_mcasp_dai[pdata->op_mode].dev = &pdev->dev; |
922 | ret = snd_soc_register_dai(&davinci_mcasp_dai[pdata->op_mode]); | 924 | ret = snd_soc_register_dai(&davinci_mcasp_dai[pdata->op_mode]); |
923 | 925 | ||
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c index 80c7fdf2f521..2dc406f42fe7 100644 --- a/sound/soc/davinci/davinci-pcm.c +++ b/sound/soc/davinci/davinci-pcm.c | |||
@@ -649,8 +649,10 @@ static int davinci_pcm_open(struct snd_pcm_substream *substream) | |||
649 | struct snd_pcm_hardware *ppcm; | 649 | struct snd_pcm_hardware *ppcm; |
650 | int ret = 0; | 650 | int ret = 0; |
651 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 651 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
652 | struct davinci_pcm_dma_params *pa = rtd->dai->cpu_dai->dma_data; | 652 | struct davinci_pcm_dma_params *pa; |
653 | struct davinci_pcm_dma_params *params; | 653 | struct davinci_pcm_dma_params *params; |
654 | |||
655 | pa = snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream); | ||
654 | if (!pa) | 656 | if (!pa) |
655 | return -ENODEV; | 657 | return -ENODEV; |
656 | params = &pa[substream->stream]; | 658 | params = &pa[substream->stream]; |
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c index b1a3a278819f..410c7496a18d 100644 --- a/sound/soc/fsl/fsl_dma.c +++ b/sound/soc/fsl/fsl_dma.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/dma-mapping.h> | 19 | #include <linux/dma-mapping.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/gfp.h> | ||
22 | 23 | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 93f0f38a32c9..762c1b8e8e4e 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include <sound/core.h> | 19 | #include <sound/core.h> |
19 | #include <sound/pcm.h> | 20 | #include <sound/pcm.h> |
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c index 30ed568afb2e..d639e55c5124 100644 --- a/sound/soc/fsl/mpc5200_dma.c +++ b/sound/soc/fsl/mpc5200_dma.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/of_device.h> | 10 | #include <linux/of_device.h> |
11 | #include <linux/slab.h> | ||
11 | 12 | ||
12 | #include <sound/soc.h> | 13 | #include <sound/soc.h> |
13 | 14 | ||
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index ef67d1cdffe7..83de1c81c8c4 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * express or implied. | 9 | * express or implied. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
14 | #include <linux/of_device.h> | 15 | #include <linux/of_device.h> |
diff --git a/sound/soc/fsl/soc-of-simple.c b/sound/soc/fsl/soc-of-simple.c index 8bc5cd9e972f..3bc13fd89096 100644 --- a/sound/soc/fsl/soc-of-simple.c +++ b/sound/soc/fsl/soc-of-simple.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/bitops.h> | 12 | #include <linux/bitops.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/of.h> | 14 | #include <linux/of.h> |
15 | #include <linux/slab.h> | ||
15 | #include <sound/core.h> | 16 | #include <sound/core.h> |
16 | #include <sound/pcm.h> | 17 | #include <sound/pcm.h> |
17 | #include <sound/pcm_params.h> | 18 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/imx/Kconfig b/sound/soc/imx/Kconfig index c7d0fd9b7de8..7174b4c710de 100644 --- a/sound/soc/imx/Kconfig +++ b/sound/soc/imx/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config SND_IMX_SOC | 1 | config SND_IMX_SOC |
2 | tristate "SoC Audio for Freescale i.MX CPUs" | 2 | tristate "SoC Audio for Freescale i.MX CPUs" |
3 | depends on ARCH_MXC && BROKEN | 3 | depends on ARCH_MXC |
4 | select SND_PCM | 4 | select SND_PCM |
5 | select FIQ | 5 | select FIQ |
6 | select SND_SOC_AC97_BUS | 6 | select SND_SOC_AC97_BUS |
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c index 19452e44afdc..2e79d7136298 100644 --- a/sound/soc/imx/imx-pcm-dma-mx2.c +++ b/sound/soc/imx/imx-pcm-dma-mx2.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/initval.h> | 25 | #include <sound/initval.h> |
@@ -83,11 +84,13 @@ static void snd_imx_dma_err_callback(int channel, void *data, int err) | |||
83 | static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream) | 84 | static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream) |
84 | { | 85 | { |
85 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 86 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
86 | struct imx_pcm_dma_params *dma_params = rtd->dai->cpu_dai->dma_data; | 87 | struct imx_pcm_dma_params *dma_params; |
87 | struct snd_pcm_runtime *runtime = substream->runtime; | 88 | struct snd_pcm_runtime *runtime = substream->runtime; |
88 | struct imx_pcm_runtime_data *iprtd = runtime->private_data; | 89 | struct imx_pcm_runtime_data *iprtd = runtime->private_data; |
89 | int ret; | 90 | int ret; |
90 | 91 | ||
92 | dma_params = snd_soc_get_dma_data(rtd->dai->cpu_dai, substream); | ||
93 | |||
91 | iprtd->dma = imx_dma_request_by_prio(DRV_NAME, DMA_PRIO_HIGH); | 94 | iprtd->dma = imx_dma_request_by_prio(DRV_NAME, DMA_PRIO_HIGH); |
92 | if (iprtd->dma < 0) { | 95 | if (iprtd->dma < 0) { |
93 | pr_err("Failed to claim the audio DMA\n"); | 96 | pr_err("Failed to claim the audio DMA\n"); |
@@ -192,10 +195,12 @@ static int snd_imx_pcm_prepare(struct snd_pcm_substream *substream) | |||
192 | { | 195 | { |
193 | struct snd_pcm_runtime *runtime = substream->runtime; | 196 | struct snd_pcm_runtime *runtime = substream->runtime; |
194 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 197 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
195 | struct imx_pcm_dma_params *dma_params = rtd->dai->cpu_dai->dma_data; | 198 | struct imx_pcm_dma_params *dma_params; |
196 | struct imx_pcm_runtime_data *iprtd = runtime->private_data; | 199 | struct imx_pcm_runtime_data *iprtd = runtime->private_data; |
197 | int err; | 200 | int err; |
198 | 201 | ||
202 | dma_params = snd_soc_get_dma_data(rtd->dai->cpu_dai, substream); | ||
203 | |||
199 | iprtd->substream = substream; | 204 | iprtd->substream = substream; |
200 | iprtd->buf = (unsigned int *)substream->dma_buffer.area; | 205 | iprtd->buf = (unsigned int *)substream->dma_buffer.area; |
201 | iprtd->period_cnt = 0; | 206 | iprtd->period_cnt = 0; |
diff --git a/sound/soc/imx/imx-pcm-fiq.c b/sound/soc/imx/imx-pcm-fiq.c index d9cb9849b033..f96a373699cf 100644 --- a/sound/soc/imx/imx-pcm-fiq.c +++ b/sound/soc/imx/imx-pcm-fiq.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/initval.h> | 25 | #include <sound/initval.h> |
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c index 56f46a75d297..0bcc6d7d9471 100644 --- a/sound/soc/imx/imx-ssi.c +++ b/sound/soc/imx/imx-ssi.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
40 | #include <linux/module.h> | 40 | #include <linux/module.h> |
41 | #include <linux/platform_device.h> | 41 | #include <linux/platform_device.h> |
42 | #include <linux/slab.h> | ||
42 | 43 | ||
43 | #include <sound/core.h> | 44 | #include <sound/core.h> |
44 | #include <sound/initval.h> | 45 | #include <sound/initval.h> |
@@ -234,17 +235,20 @@ static int imx_ssi_hw_params(struct snd_pcm_substream *substream, | |||
234 | struct snd_soc_dai *cpu_dai) | 235 | struct snd_soc_dai *cpu_dai) |
235 | { | 236 | { |
236 | struct imx_ssi *ssi = cpu_dai->private_data; | 237 | struct imx_ssi *ssi = cpu_dai->private_data; |
238 | struct imx_pcm_dma_params *dma_data; | ||
237 | u32 reg, sccr; | 239 | u32 reg, sccr; |
238 | 240 | ||
239 | /* Tx/Rx config */ | 241 | /* Tx/Rx config */ |
240 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | 242 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
241 | reg = SSI_STCCR; | 243 | reg = SSI_STCCR; |
242 | cpu_dai->dma_data = &ssi->dma_params_tx; | 244 | dma_data = &ssi->dma_params_tx; |
243 | } else { | 245 | } else { |
244 | reg = SSI_SRCCR; | 246 | reg = SSI_SRCCR; |
245 | cpu_dai->dma_data = &ssi->dma_params_rx; | 247 | dma_data = &ssi->dma_params_rx; |
246 | } | 248 | } |
247 | 249 | ||
250 | snd_soc_dai_set_dma_data(cpu_dai, substream, dma_data); | ||
251 | |||
248 | sccr = readl(ssi->base + reg) & ~SSI_STCCR_WL_MASK; | 252 | sccr = readl(ssi->base + reg) & ~SSI_STCCR_WL_MASK; |
249 | 253 | ||
250 | /* DAI data (word) size */ | 254 | /* DAI data (word) size */ |
diff --git a/sound/soc/omap/mcpdm.c b/sound/soc/omap/mcpdm.c index ad8df6cfae88..1dab4c14874d 100644 --- a/sound/soc/omap/mcpdm.c +++ b/sound/soc/omap/mcpdm.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/device.h> | 25 | #include <linux/device.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
29 | #include <linux/err.h> | 30 | #include <linux/err.h> |
30 | #include <linux/clk.h> | 31 | #include <linux/clk.h> |
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index e814a9591f78..8ad9dc901007 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c | |||
@@ -297,7 +297,9 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, | |||
297 | omap_mcbsp_dai_dma_params[id][substream->stream].sync_mode = sync_mode; | 297 | omap_mcbsp_dai_dma_params[id][substream->stream].sync_mode = sync_mode; |
298 | omap_mcbsp_dai_dma_params[id][substream->stream].data_type = | 298 | omap_mcbsp_dai_dma_params[id][substream->stream].data_type = |
299 | OMAP_DMA_DATA_TYPE_S16; | 299 | OMAP_DMA_DATA_TYPE_S16; |
300 | cpu_dai->dma_data = &omap_mcbsp_dai_dma_params[id][substream->stream]; | 300 | |
301 | snd_soc_dai_set_dma_data(cpu_dai, substream, | ||
302 | &omap_mcbsp_dai_dma_params[id][substream->stream]); | ||
301 | 303 | ||
302 | if (mcbsp_data->configured) { | 304 | if (mcbsp_data->configured) { |
303 | /* McBSP already configured by another stream */ | 305 | /* McBSP already configured by another stream */ |
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c index 25f19e4728bf..b7f4f7e015f3 100644 --- a/sound/soc/omap/omap-mcpdm.c +++ b/sound/soc/omap/omap-mcpdm.c | |||
@@ -150,7 +150,8 @@ static int omap_mcpdm_dai_hw_params(struct snd_pcm_substream *substream, | |||
150 | int stream = substream->stream; | 150 | int stream = substream->stream; |
151 | int channels, err, link_mask = 0; | 151 | int channels, err, link_mask = 0; |
152 | 152 | ||
153 | cpu_dai->dma_data = &omap_mcpdm_dai_dma_params[stream]; | 153 | snd_soc_dai_set_dma_data(cpu_dai, substream, |
154 | &omap_mcpdm_dai_dma_params[stream]); | ||
154 | 155 | ||
155 | channels = params_channels(params); | 156 | channels = params_channels(params); |
156 | switch (channels) { | 157 | switch (channels) { |
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 825db385f01f..1e521904ea64 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
26 | #include <linux/slab.h> | ||
26 | #include <sound/core.h> | 27 | #include <sound/core.h> |
27 | #include <sound/pcm.h> | 28 | #include <sound/pcm.h> |
28 | #include <sound/pcm_params.h> | 29 | #include <sound/pcm_params.h> |
@@ -60,12 +61,11 @@ static void omap_pcm_dma_irq(int ch, u16 stat, void *data) | |||
60 | struct omap_runtime_data *prtd = runtime->private_data; | 61 | struct omap_runtime_data *prtd = runtime->private_data; |
61 | unsigned long flags; | 62 | unsigned long flags; |
62 | 63 | ||
63 | if ((cpu_is_omap1510()) && | 64 | if ((cpu_is_omap1510())) { |
64 | (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)) { | ||
65 | /* | 65 | /* |
66 | * OMAP1510 doesn't fully support DMA progress counter | 66 | * OMAP1510 doesn't fully support DMA progress counter |
67 | * and there is no software emulation implemented yet, | 67 | * and there is no software emulation implemented yet, |
68 | * so have to maintain our own playback progress counter | 68 | * so have to maintain our own progress counters |
69 | * that can be used by omap_pcm_pointer() instead. | 69 | * that can be used by omap_pcm_pointer() instead. |
70 | */ | 70 | */ |
71 | spin_lock_irqsave(&prtd->lock, flags); | 71 | spin_lock_irqsave(&prtd->lock, flags); |
@@ -100,9 +100,11 @@ static int omap_pcm_hw_params(struct snd_pcm_substream *substream, | |||
100 | struct snd_pcm_runtime *runtime = substream->runtime; | 100 | struct snd_pcm_runtime *runtime = substream->runtime; |
101 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 101 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
102 | struct omap_runtime_data *prtd = runtime->private_data; | 102 | struct omap_runtime_data *prtd = runtime->private_data; |
103 | struct omap_pcm_dma_data *dma_data = rtd->dai->cpu_dai->dma_data; | 103 | struct omap_pcm_dma_data *dma_data; |
104 | int err = 0; | 104 | int err = 0; |
105 | 105 | ||
106 | dma_data = snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream); | ||
107 | |||
106 | /* return if this is a bufferless transfer e.g. | 108 | /* return if this is a bufferless transfer e.g. |
107 | * codec <--> BT codec or GSM modem -- lg FIXME */ | 109 | * codec <--> BT codec or GSM modem -- lg FIXME */ |
108 | if (!dma_data) | 110 | if (!dma_data) |
@@ -189,8 +191,7 @@ static int omap_pcm_prepare(struct snd_pcm_substream *substream) | |||
189 | dma_params.frame_count = runtime->periods; | 191 | dma_params.frame_count = runtime->periods; |
190 | omap_set_dma_params(prtd->dma_ch, &dma_params); | 192 | omap_set_dma_params(prtd->dma_ch, &dma_params); |
191 | 193 | ||
192 | if ((cpu_is_omap1510()) && | 194 | if ((cpu_is_omap1510())) |
193 | (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)) | ||
194 | omap_enable_dma_irq(prtd->dma_ch, OMAP_DMA_FRAME_IRQ | | 195 | omap_enable_dma_irq(prtd->dma_ch, OMAP_DMA_FRAME_IRQ | |
195 | OMAP_DMA_LAST_IRQ | OMAP_DMA_BLOCK_IRQ); | 196 | OMAP_DMA_LAST_IRQ | OMAP_DMA_BLOCK_IRQ); |
196 | else | 197 | else |
@@ -248,14 +249,15 @@ static snd_pcm_uframes_t omap_pcm_pointer(struct snd_pcm_substream *substream) | |||
248 | dma_addr_t ptr; | 249 | dma_addr_t ptr; |
249 | snd_pcm_uframes_t offset; | 250 | snd_pcm_uframes_t offset; |
250 | 251 | ||
251 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { | 252 | if (cpu_is_omap1510()) { |
253 | offset = prtd->period_index * runtime->period_size; | ||
254 | } else if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { | ||
252 | ptr = omap_get_dma_dst_pos(prtd->dma_ch); | 255 | ptr = omap_get_dma_dst_pos(prtd->dma_ch); |
253 | offset = bytes_to_frames(runtime, ptr - runtime->dma_addr); | 256 | offset = bytes_to_frames(runtime, ptr - runtime->dma_addr); |
254 | } else if (!(cpu_is_omap1510())) { | 257 | } else { |
255 | ptr = omap_get_dma_src_pos(prtd->dma_ch); | 258 | ptr = omap_get_dma_src_pos(prtd->dma_ch); |
256 | offset = bytes_to_frames(runtime, ptr - runtime->dma_addr); | 259 | offset = bytes_to_frames(runtime, ptr - runtime->dma_addr); |
257 | } else | 260 | } |
258 | offset = prtd->period_index * runtime->period_size; | ||
259 | 261 | ||
260 | if (offset >= runtime->buffer_size) | 262 | if (offset >= runtime->buffer_size) |
261 | offset = 0; | 263 | offset = 0; |
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index 9e95e5117c88..544fd9566f4d 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
20 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
21 | #include <linux/io.h> | 22 | #include <linux/io.h> |
@@ -121,10 +122,9 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream, | |||
121 | ssp_disable(ssp); | 122 | ssp_disable(ssp); |
122 | } | 123 | } |
123 | 124 | ||
124 | if (cpu_dai->dma_data) { | 125 | kfree(snd_soc_dai_get_dma_data(cpu_dai, substream)); |
125 | kfree(cpu_dai->dma_data); | 126 | snd_soc_dai_set_dma_data(cpu_dai, substream, NULL); |
126 | cpu_dai->dma_data = NULL; | 127 | |
127 | } | ||
128 | return ret; | 128 | return ret; |
129 | } | 129 | } |
130 | 130 | ||
@@ -141,10 +141,8 @@ static void pxa_ssp_shutdown(struct snd_pcm_substream *substream, | |||
141 | clk_disable(ssp->clk); | 141 | clk_disable(ssp->clk); |
142 | } | 142 | } |
143 | 143 | ||
144 | if (cpu_dai->dma_data) { | 144 | kfree(snd_soc_dai_get_dma_data(cpu_dai, substream)); |
145 | kfree(cpu_dai->dma_data); | 145 | snd_soc_dai_set_dma_data(cpu_dai, substream, NULL); |
146 | cpu_dai->dma_data = NULL; | ||
147 | } | ||
148 | } | 146 | } |
149 | 147 | ||
150 | #ifdef CONFIG_PM | 148 | #ifdef CONFIG_PM |
@@ -569,19 +567,23 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, | |||
569 | u32 sspsp; | 567 | u32 sspsp; |
570 | int width = snd_pcm_format_physical_width(params_format(params)); | 568 | int width = snd_pcm_format_physical_width(params_format(params)); |
571 | int ttsa = ssp_read_reg(ssp, SSTSA) & 0xf; | 569 | int ttsa = ssp_read_reg(ssp, SSTSA) & 0xf; |
570 | struct pxa2xx_pcm_dma_params *dma_data; | ||
571 | |||
572 | dma_data = snd_soc_dai_get_dma_data(dai, substream); | ||
572 | 573 | ||
573 | /* generate correct DMA params */ | 574 | /* generate correct DMA params */ |
574 | if (cpu_dai->dma_data) | 575 | kfree(dma_data); |
575 | kfree(cpu_dai->dma_data); | ||
576 | 576 | ||
577 | /* Network mode with one active slot (ttsa == 1) can be used | 577 | /* Network mode with one active slot (ttsa == 1) can be used |
578 | * to force 16-bit frame width on the wire (for S16_LE), even | 578 | * to force 16-bit frame width on the wire (for S16_LE), even |
579 | * with two channels. Use 16-bit DMA transfers for this case. | 579 | * with two channels. Use 16-bit DMA transfers for this case. |
580 | */ | 580 | */ |
581 | cpu_dai->dma_data = ssp_get_dma_params(ssp, | 581 | dma_data = ssp_get_dma_params(ssp, |
582 | ((chn == 2) && (ttsa != 1)) || (width == 32), | 582 | ((chn == 2) && (ttsa != 1)) || (width == 32), |
583 | substream->stream == SNDRV_PCM_STREAM_PLAYBACK); | 583 | substream->stream == SNDRV_PCM_STREAM_PLAYBACK); |
584 | 584 | ||
585 | snd_soc_dai_set_dma_data(dai, substream, dma_data); | ||
586 | |||
585 | /* we can only change the settings if the port is not in use */ | 587 | /* we can only change the settings if the port is not in use */ |
586 | if (ssp_read_reg(ssp, SSCR0) & SSCR0_SSE) | 588 | if (ssp_read_reg(ssp, SSCR0) & SSCR0_SSE) |
587 | return 0; | 589 | return 0; |
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c index e9ae7b3a7e00..d314115e3dd7 100644 --- a/sound/soc/pxa/pxa2xx-ac97.c +++ b/sound/soc/pxa/pxa2xx-ac97.c | |||
@@ -122,11 +122,14 @@ static int pxa2xx_ac97_hw_params(struct snd_pcm_substream *substream, | |||
122 | { | 122 | { |
123 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 123 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
124 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 124 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; |
125 | struct pxa2xx_pcm_dma_params *dma_data; | ||
125 | 126 | ||
126 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 127 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
127 | cpu_dai->dma_data = &pxa2xx_ac97_pcm_stereo_out; | 128 | dma_data = &pxa2xx_ac97_pcm_stereo_out; |
128 | else | 129 | else |
129 | cpu_dai->dma_data = &pxa2xx_ac97_pcm_stereo_in; | 130 | dma_data = &pxa2xx_ac97_pcm_stereo_in; |
131 | |||
132 | snd_soc_dai_set_dma_data(cpu_dai, substream, dma_data); | ||
130 | 133 | ||
131 | return 0; | 134 | return 0; |
132 | } | 135 | } |
@@ -137,11 +140,14 @@ static int pxa2xx_ac97_hw_aux_params(struct snd_pcm_substream *substream, | |||
137 | { | 140 | { |
138 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 141 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
139 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 142 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; |
143 | struct pxa2xx_pcm_dma_params *dma_data; | ||
140 | 144 | ||
141 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 145 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
142 | cpu_dai->dma_data = &pxa2xx_ac97_pcm_aux_mono_out; | 146 | dma_data = &pxa2xx_ac97_pcm_aux_mono_out; |
143 | else | 147 | else |
144 | cpu_dai->dma_data = &pxa2xx_ac97_pcm_aux_mono_in; | 148 | dma_data = &pxa2xx_ac97_pcm_aux_mono_in; |
149 | |||
150 | snd_soc_dai_set_dma_data(cpu_dai, substream, dma_data); | ||
145 | 151 | ||
146 | return 0; | 152 | return 0; |
147 | } | 153 | } |
@@ -156,7 +162,8 @@ static int pxa2xx_ac97_hw_mic_params(struct snd_pcm_substream *substream, | |||
156 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 162 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
157 | return -ENODEV; | 163 | return -ENODEV; |
158 | else | 164 | else |
159 | cpu_dai->dma_data = &pxa2xx_ac97_pcm_mic_mono_in; | 165 | snd_soc_dai_set_dma_data(cpu_dai, substream, |
166 | &pxa2xx_ac97_pcm_mic_mono_in); | ||
160 | 167 | ||
161 | return 0; | 168 | return 0; |
162 | } | 169 | } |
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c index 6b8f655d1ad8..c1a5275721e4 100644 --- a/sound/soc/pxa/pxa2xx-i2s.c +++ b/sound/soc/pxa/pxa2xx-i2s.c | |||
@@ -164,6 +164,7 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream, | |||
164 | { | 164 | { |
165 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 165 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
166 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 166 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; |
167 | struct pxa2xx_pcm_dma_params *dma_data; | ||
167 | 168 | ||
168 | BUG_ON(IS_ERR(clk_i2s)); | 169 | BUG_ON(IS_ERR(clk_i2s)); |
169 | clk_enable(clk_i2s); | 170 | clk_enable(clk_i2s); |
@@ -171,9 +172,11 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream, | |||
171 | pxa_i2s_wait(); | 172 | pxa_i2s_wait(); |
172 | 173 | ||
173 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 174 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
174 | cpu_dai->dma_data = &pxa2xx_i2s_pcm_stereo_out; | 175 | dma_data = &pxa2xx_i2s_pcm_stereo_out; |
175 | else | 176 | else |
176 | cpu_dai->dma_data = &pxa2xx_i2s_pcm_stereo_in; | 177 | dma_data = &pxa2xx_i2s_pcm_stereo_in; |
178 | |||
179 | snd_soc_dai_set_dma_data(cpu_dai, substream, dma_data); | ||
177 | 180 | ||
178 | /* is port used by another stream */ | 181 | /* is port used by another stream */ |
179 | if (!(SACR0 & SACR0_ENB)) { | 182 | if (!(SACR0 & SACR0_ENB)) { |
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c index d38e39575f51..adc7e6f15f93 100644 --- a/sound/soc/pxa/pxa2xx-pcm.c +++ b/sound/soc/pxa/pxa2xx-pcm.c | |||
@@ -25,9 +25,11 @@ static int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, | |||
25 | struct snd_pcm_runtime *runtime = substream->runtime; | 25 | struct snd_pcm_runtime *runtime = substream->runtime; |
26 | struct pxa2xx_runtime_data *prtd = runtime->private_data; | 26 | struct pxa2xx_runtime_data *prtd = runtime->private_data; |
27 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 27 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
28 | struct pxa2xx_pcm_dma_params *dma = rtd->dai->cpu_dai->dma_data; | 28 | struct pxa2xx_pcm_dma_params *dma; |
29 | int ret; | 29 | int ret; |
30 | 30 | ||
31 | dma = snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream); | ||
32 | |||
31 | /* return if this is a bufferless transfer e.g. | 33 | /* return if this is a bufferless transfer e.g. |
32 | * codec <--> BT codec or GSM modem -- lg FIXME */ | 34 | * codec <--> BT codec or GSM modem -- lg FIXME */ |
33 | if (!dma) | 35 | if (!dma) |
diff --git a/sound/soc/s3c24xx/s3c-ac97.c b/sound/soc/s3c24xx/s3c-ac97.c index ee8ed9d7e703..ecf4fd04ae96 100644 --- a/sound/soc/s3c24xx/s3c-ac97.c +++ b/sound/soc/s3c24xx/s3c-ac97.c | |||
@@ -224,11 +224,14 @@ static int s3c_ac97_hw_params(struct snd_pcm_substream *substream, | |||
224 | { | 224 | { |
225 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 225 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
226 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 226 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; |
227 | struct s3c_dma_params *dma_data; | ||
227 | 228 | ||
228 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 229 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
229 | cpu_dai->dma_data = &s3c_ac97_pcm_out; | 230 | dma_data = &s3c_ac97_pcm_out; |
230 | else | 231 | else |
231 | cpu_dai->dma_data = &s3c_ac97_pcm_in; | 232 | dma_data = &s3c_ac97_pcm_in; |
233 | |||
234 | snd_soc_dai_set_dma_data(cpu_dai, substream, dma_data); | ||
232 | 235 | ||
233 | return 0; | 236 | return 0; |
234 | } | 237 | } |
@@ -238,8 +241,8 @@ static int s3c_ac97_trigger(struct snd_pcm_substream *substream, int cmd, | |||
238 | { | 241 | { |
239 | u32 ac_glbctrl; | 242 | u32 ac_glbctrl; |
240 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 243 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
241 | int channel = ((struct s3c_dma_params *) | 244 | struct s3c_dma_params *dma_data = |
242 | rtd->dai->cpu_dai->dma_data)->channel; | 245 | snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream); |
243 | 246 | ||
244 | ac_glbctrl = readl(s3c_ac97.regs + S3C_AC97_GLBCTRL); | 247 | ac_glbctrl = readl(s3c_ac97.regs + S3C_AC97_GLBCTRL); |
245 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) | 248 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) |
@@ -265,7 +268,7 @@ static int s3c_ac97_trigger(struct snd_pcm_substream *substream, int cmd, | |||
265 | 268 | ||
266 | writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL); | 269 | writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL); |
267 | 270 | ||
268 | s3c2410_dma_ctrl(channel, S3C2410_DMAOP_STARTED); | 271 | s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED); |
269 | 272 | ||
270 | return 0; | 273 | return 0; |
271 | } | 274 | } |
@@ -280,7 +283,7 @@ static int s3c_ac97_hw_mic_params(struct snd_pcm_substream *substream, | |||
280 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 283 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
281 | return -ENODEV; | 284 | return -ENODEV; |
282 | else | 285 | else |
283 | cpu_dai->dma_data = &s3c_ac97_mic_in; | 286 | snd_soc_dai_set_dma_data(cpu_dai, substream, &s3c_ac97_mic_in); |
284 | 287 | ||
285 | return 0; | 288 | return 0; |
286 | } | 289 | } |
@@ -290,8 +293,8 @@ static int s3c_ac97_mic_trigger(struct snd_pcm_substream *substream, | |||
290 | { | 293 | { |
291 | u32 ac_glbctrl; | 294 | u32 ac_glbctrl; |
292 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 295 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
293 | int channel = ((struct s3c_dma_params *) | 296 | struct s3c_dma_params *dma_data = |
294 | rtd->dai->cpu_dai->dma_data)->channel; | 297 | snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream); |
295 | 298 | ||
296 | ac_glbctrl = readl(s3c_ac97.regs + S3C_AC97_GLBCTRL); | 299 | ac_glbctrl = readl(s3c_ac97.regs + S3C_AC97_GLBCTRL); |
297 | ac_glbctrl &= ~S3C_AC97_GLBCTRL_MICINTM_MASK; | 300 | ac_glbctrl &= ~S3C_AC97_GLBCTRL_MICINTM_MASK; |
@@ -311,7 +314,7 @@ static int s3c_ac97_mic_trigger(struct snd_pcm_substream *substream, | |||
311 | 314 | ||
312 | writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL); | 315 | writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL); |
313 | 316 | ||
314 | s3c2410_dma_ctrl(channel, S3C2410_DMAOP_STARTED); | 317 | s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED); |
315 | 318 | ||
316 | return 0; | 319 | return 0; |
317 | } | 320 | } |
diff --git a/sound/soc/s3c24xx/s3c-dma.c b/sound/soc/s3c24xx/s3c-dma.c index 7725e26d6c91..1b61c23ff300 100644 --- a/sound/soc/s3c24xx/s3c-dma.c +++ b/sound/soc/s3c24xx/s3c-dma.c | |||
@@ -145,10 +145,12 @@ static int s3c_dma_hw_params(struct snd_pcm_substream *substream, | |||
145 | struct snd_pcm_runtime *runtime = substream->runtime; | 145 | struct snd_pcm_runtime *runtime = substream->runtime; |
146 | struct s3c24xx_runtime_data *prtd = runtime->private_data; | 146 | struct s3c24xx_runtime_data *prtd = runtime->private_data; |
147 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 147 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
148 | struct s3c_dma_params *dma = rtd->dai->cpu_dai->dma_data; | ||
149 | unsigned long totbytes = params_buffer_bytes(params); | 148 | unsigned long totbytes = params_buffer_bytes(params); |
149 | struct s3c_dma_params *dma = | ||
150 | snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream); | ||
150 | int ret = 0; | 151 | int ret = 0; |
151 | 152 | ||
153 | |||
152 | pr_debug("Entered %s\n", __func__); | 154 | pr_debug("Entered %s\n", __func__); |
153 | 155 | ||
154 | /* return if this is a bufferless transfer e.g. | 156 | /* return if this is a bufferless transfer e.g. |
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.c b/sound/soc/s3c24xx/s3c-i2s-v2.c index e994d8374fe6..88515946b6c0 100644 --- a/sound/soc/s3c24xx/s3c-i2s-v2.c +++ b/sound/soc/s3c24xx/s3c-i2s-v2.c | |||
@@ -339,14 +339,17 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream, | |||
339 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 339 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
340 | struct snd_soc_dai_link *dai = rtd->dai; | 340 | struct snd_soc_dai_link *dai = rtd->dai; |
341 | struct s3c_i2sv2_info *i2s = to_info(dai->cpu_dai); | 341 | struct s3c_i2sv2_info *i2s = to_info(dai->cpu_dai); |
342 | struct s3c_dma_params *dma_data; | ||
342 | u32 iismod; | 343 | u32 iismod; |
343 | 344 | ||
344 | pr_debug("Entered %s\n", __func__); | 345 | pr_debug("Entered %s\n", __func__); |
345 | 346 | ||
346 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 347 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
347 | dai->cpu_dai->dma_data = i2s->dma_playback; | 348 | dma_data = i2s->dma_playback; |
348 | else | 349 | else |
349 | dai->cpu_dai->dma_data = i2s->dma_capture; | 350 | dma_data = i2s->dma_capture; |
351 | |||
352 | snd_soc_dai_set_dma_data(dai->cpu_dai, substream, dma_data); | ||
350 | 353 | ||
351 | /* Working copies of register */ | 354 | /* Working copies of register */ |
352 | iismod = readl(i2s->regs + S3C2412_IISMOD); | 355 | iismod = readl(i2s->regs + S3C2412_IISMOD); |
@@ -394,8 +397,8 @@ static int s3c2412_i2s_trigger(struct snd_pcm_substream *substream, int cmd, | |||
394 | int capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE); | 397 | int capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE); |
395 | unsigned long irqs; | 398 | unsigned long irqs; |
396 | int ret = 0; | 399 | int ret = 0; |
397 | int channel = ((struct s3c_dma_params *) | 400 | struct s3c_dma_params *dma_data = |
398 | rtd->dai->cpu_dai->dma_data)->channel; | 401 | snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream); |
399 | 402 | ||
400 | pr_debug("Entered %s\n", __func__); | 403 | pr_debug("Entered %s\n", __func__); |
401 | 404 | ||
@@ -431,7 +434,7 @@ static int s3c2412_i2s_trigger(struct snd_pcm_substream *substream, int cmd, | |||
431 | * of the auto reload mechanism of S3C24XX. | 434 | * of the auto reload mechanism of S3C24XX. |
432 | * This call won't bother S3C64XX. | 435 | * This call won't bother S3C64XX. |
433 | */ | 436 | */ |
434 | s3c2410_dma_ctrl(channel, S3C2410_DMAOP_STARTED); | 437 | s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED); |
435 | 438 | ||
436 | break; | 439 | break; |
437 | 440 | ||
diff --git a/sound/soc/s3c24xx/s3c-pcm.c b/sound/soc/s3c24xx/s3c-pcm.c index a98f40c3cd29..326f0a9e7e30 100644 --- a/sound/soc/s3c24xx/s3c-pcm.c +++ b/sound/soc/s3c24xx/s3c-pcm.c | |||
@@ -178,6 +178,7 @@ static int s3c_pcm_hw_params(struct snd_pcm_substream *substream, | |||
178 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 178 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
179 | struct snd_soc_dai_link *dai = rtd->dai; | 179 | struct snd_soc_dai_link *dai = rtd->dai; |
180 | struct s3c_pcm_info *pcm = to_info(dai->cpu_dai); | 180 | struct s3c_pcm_info *pcm = to_info(dai->cpu_dai); |
181 | struct s3c_dma_params *dma_data; | ||
181 | void __iomem *regs = pcm->regs; | 182 | void __iomem *regs = pcm->regs; |
182 | struct clk *clk; | 183 | struct clk *clk; |
183 | int sclk_div, sync_div; | 184 | int sclk_div, sync_div; |
@@ -187,9 +188,11 @@ static int s3c_pcm_hw_params(struct snd_pcm_substream *substream, | |||
187 | dev_dbg(pcm->dev, "Entered %s\n", __func__); | 188 | dev_dbg(pcm->dev, "Entered %s\n", __func__); |
188 | 189 | ||
189 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 190 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
190 | dai->cpu_dai->dma_data = pcm->dma_playback; | 191 | dma_data = pcm->dma_playback; |
191 | else | 192 | else |
192 | dai->cpu_dai->dma_data = pcm->dma_capture; | 193 | dma_data = pcm->dma_capture; |
194 | |||
195 | snd_soc_dai_set_dma_data(dai->cpu_dai, substream, dma_data); | ||
193 | 196 | ||
194 | /* Strictly check for sample size */ | 197 | /* Strictly check for sample size */ |
195 | switch (params_format(params)) { | 198 | switch (params_format(params)) { |
diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c index 0bc5950b9f02..c3ac890a3986 100644 --- a/sound/soc/s3c24xx/s3c24xx-i2s.c +++ b/sound/soc/s3c24xx/s3c24xx-i2s.c | |||
@@ -242,14 +242,17 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream, | |||
242 | struct snd_soc_dai *dai) | 242 | struct snd_soc_dai *dai) |
243 | { | 243 | { |
244 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 244 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
245 | struct s3c_dma_params *dma_data; | ||
245 | u32 iismod; | 246 | u32 iismod; |
246 | 247 | ||
247 | pr_debug("Entered %s\n", __func__); | 248 | pr_debug("Entered %s\n", __func__); |
248 | 249 | ||
249 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 250 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
250 | rtd->dai->cpu_dai->dma_data = &s3c24xx_i2s_pcm_stereo_out; | 251 | dma_data = &s3c24xx_i2s_pcm_stereo_out; |
251 | else | 252 | else |
252 | rtd->dai->cpu_dai->dma_data = &s3c24xx_i2s_pcm_stereo_in; | 253 | dma_data = &s3c24xx_i2s_pcm_stereo_in; |
254 | |||
255 | snd_soc_dai_set_dma_data(rtd->dai->cpu_dai, substream, dma_data); | ||
253 | 256 | ||
254 | /* Working copies of register */ | 257 | /* Working copies of register */ |
255 | iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); | 258 | iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); |
@@ -258,13 +261,11 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream, | |||
258 | switch (params_format(params)) { | 261 | switch (params_format(params)) { |
259 | case SNDRV_PCM_FORMAT_S8: | 262 | case SNDRV_PCM_FORMAT_S8: |
260 | iismod &= ~S3C2410_IISMOD_16BIT; | 263 | iismod &= ~S3C2410_IISMOD_16BIT; |
261 | ((struct s3c_dma_params *) | 264 | dma_data->dma_size = 1; |
262 | rtd->dai->cpu_dai->dma_data)->dma_size = 1; | ||
263 | break; | 265 | break; |
264 | case SNDRV_PCM_FORMAT_S16_LE: | 266 | case SNDRV_PCM_FORMAT_S16_LE: |
265 | iismod |= S3C2410_IISMOD_16BIT; | 267 | iismod |= S3C2410_IISMOD_16BIT; |
266 | ((struct s3c_dma_params *) | 268 | dma_data->dma_size = 2; |
267 | rtd->dai->cpu_dai->dma_data)->dma_size = 2; | ||
268 | break; | 269 | break; |
269 | default: | 270 | default: |
270 | return -EINVAL; | 271 | return -EINVAL; |
@@ -280,8 +281,8 @@ static int s3c24xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd, | |||
280 | { | 281 | { |
281 | int ret = 0; | 282 | int ret = 0; |
282 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 283 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
283 | int channel = ((struct s3c_dma_params *) | 284 | struct s3c_dma_params *dma_data = |
284 | rtd->dai->cpu_dai->dma_data)->channel; | 285 | snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream); |
285 | 286 | ||
286 | pr_debug("Entered %s\n", __func__); | 287 | pr_debug("Entered %s\n", __func__); |
287 | 288 | ||
@@ -300,7 +301,7 @@ static int s3c24xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd, | |||
300 | else | 301 | else |
301 | s3c24xx_snd_txctrl(1); | 302 | s3c24xx_snd_txctrl(1); |
302 | 303 | ||
303 | s3c2410_dma_ctrl(channel, S3C2410_DMAOP_STARTED); | 304 | s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED); |
304 | break; | 305 | break; |
305 | case SNDRV_PCM_TRIGGER_STOP: | 306 | case SNDRV_PCM_TRIGGER_STOP: |
306 | case SNDRV_PCM_TRIGGER_SUSPEND: | 307 | case SNDRV_PCM_TRIGGER_SUSPEND: |
diff --git a/sound/soc/s6000/s6000-i2s.c b/sound/soc/s6000/s6000-i2s.c index c5cda187ecab..5b9ac1759bd2 100644 --- a/sound/soc/s6000/s6000-i2s.c +++ b/sound/soc/s6000/s6000-i2s.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/clk.h> | 16 | #include <linux/clk.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include <sound/core.h> | 21 | #include <sound/core.h> |
21 | #include <sound/pcm.h> | 22 | #include <sound/pcm.h> |
@@ -518,7 +519,8 @@ static int __devinit s6000_i2s_probe(struct platform_device *pdev) | |||
518 | 519 | ||
519 | s6000_i2s_dai.dev = &pdev->dev; | 520 | s6000_i2s_dai.dev = &pdev->dev; |
520 | s6000_i2s_dai.private_data = dev; | 521 | s6000_i2s_dai.private_data = dev; |
521 | s6000_i2s_dai.dma_data = &dev->dma_params; | 522 | s6000_i2s_dai.capture.dma_data = &dev->dma_params; |
523 | s6000_i2s_dai.playback.dma_data = &dev->dma_params; | ||
522 | 524 | ||
523 | dev->sifbase = sifmem->start; | 525 | dev->sifbase = sifmem->start; |
524 | dev->scbbase = mmio; | 526 | dev->scbbase = mmio; |
diff --git a/sound/soc/s6000/s6000-pcm.c b/sound/soc/s6000/s6000-pcm.c index 1d61109e09fa..9c7f7f00cebb 100644 --- a/sound/soc/s6000/s6000-pcm.c +++ b/sound/soc/s6000/s6000-pcm.c | |||
@@ -58,13 +58,15 @@ static void s6000_pcm_enqueue_dma(struct snd_pcm_substream *substream) | |||
58 | struct snd_pcm_runtime *runtime = substream->runtime; | 58 | struct snd_pcm_runtime *runtime = substream->runtime; |
59 | struct s6000_runtime_data *prtd = runtime->private_data; | 59 | struct s6000_runtime_data *prtd = runtime->private_data; |
60 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; | 60 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; |
61 | struct s6000_pcm_dma_params *par = soc_runtime->dai->cpu_dai->dma_data; | 61 | struct s6000_pcm_dma_params *par; |
62 | int channel; | 62 | int channel; |
63 | unsigned int period_size; | 63 | unsigned int period_size; |
64 | unsigned int dma_offset; | 64 | unsigned int dma_offset; |
65 | dma_addr_t dma_pos; | 65 | dma_addr_t dma_pos; |
66 | dma_addr_t src, dst; | 66 | dma_addr_t src, dst; |
67 | 67 | ||
68 | par = snd_soc_dai_get_dma_data(soc_runtime->dai->cpu_dai, substream); | ||
69 | |||
68 | period_size = snd_pcm_lib_period_bytes(substream); | 70 | period_size = snd_pcm_lib_period_bytes(substream); |
69 | dma_offset = prtd->period * period_size; | 71 | dma_offset = prtd->period * period_size; |
70 | dma_pos = runtime->dma_addr + dma_offset; | 72 | dma_pos = runtime->dma_addr + dma_offset; |
@@ -101,7 +103,8 @@ static irqreturn_t s6000_pcm_irq(int irq, void *data) | |||
101 | { | 103 | { |
102 | struct snd_pcm *pcm = data; | 104 | struct snd_pcm *pcm = data; |
103 | struct snd_soc_pcm_runtime *runtime = pcm->private_data; | 105 | struct snd_soc_pcm_runtime *runtime = pcm->private_data; |
104 | struct s6000_pcm_dma_params *params = runtime->dai->cpu_dai->dma_data; | 106 | struct s6000_pcm_dma_params *params = |
107 | snd_soc_dai_get_dma_data(soc_runtime->dai->cpu_dai, substream); | ||
105 | struct s6000_runtime_data *prtd; | 108 | struct s6000_runtime_data *prtd; |
106 | unsigned int has_xrun; | 109 | unsigned int has_xrun; |
107 | int i, ret = IRQ_NONE; | 110 | int i, ret = IRQ_NONE; |
@@ -172,11 +175,13 @@ static int s6000_pcm_start(struct snd_pcm_substream *substream) | |||
172 | { | 175 | { |
173 | struct s6000_runtime_data *prtd = substream->runtime->private_data; | 176 | struct s6000_runtime_data *prtd = substream->runtime->private_data; |
174 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; | 177 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; |
175 | struct s6000_pcm_dma_params *par = soc_runtime->dai->cpu_dai->dma_data; | 178 | struct s6000_pcm_dma_params *par; |
176 | unsigned long flags; | 179 | unsigned long flags; |
177 | int srcinc; | 180 | int srcinc; |
178 | u32 dma; | 181 | u32 dma; |
179 | 182 | ||
183 | par = snd_soc_dai_get_dma_data(soc_runtime->dai->cpu_dai, substream); | ||
184 | |||
180 | spin_lock_irqsave(&prtd->lock, flags); | 185 | spin_lock_irqsave(&prtd->lock, flags); |
181 | 186 | ||
182 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | 187 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
@@ -212,10 +217,12 @@ static int s6000_pcm_stop(struct snd_pcm_substream *substream) | |||
212 | { | 217 | { |
213 | struct s6000_runtime_data *prtd = substream->runtime->private_data; | 218 | struct s6000_runtime_data *prtd = substream->runtime->private_data; |
214 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; | 219 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; |
215 | struct s6000_pcm_dma_params *par = soc_runtime->dai->cpu_dai->dma_data; | 220 | struct s6000_pcm_dma_params *par; |
216 | unsigned long flags; | 221 | unsigned long flags; |
217 | u32 channel; | 222 | u32 channel; |
218 | 223 | ||
224 | par = snd_soc_dai_get_dma_data(soc_runtime->dai->cpu_dai, substream); | ||
225 | |||
219 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 226 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
220 | channel = par->dma_out; | 227 | channel = par->dma_out; |
221 | else | 228 | else |
@@ -236,9 +243,11 @@ static int s6000_pcm_stop(struct snd_pcm_substream *substream) | |||
236 | static int s6000_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | 243 | static int s6000_pcm_trigger(struct snd_pcm_substream *substream, int cmd) |
237 | { | 244 | { |
238 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; | 245 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; |
239 | struct s6000_pcm_dma_params *par = soc_runtime->dai->cpu_dai->dma_data; | 246 | struct s6000_pcm_dma_params *par; |
240 | int ret; | 247 | int ret; |
241 | 248 | ||
249 | par = snd_soc_dai_get_dma_data(soc_runtime->dai->cpu_dai, substream); | ||
250 | |||
242 | ret = par->trigger(substream, cmd, 0); | 251 | ret = par->trigger(substream, cmd, 0); |
243 | if (ret < 0) | 252 | if (ret < 0) |
244 | return ret; | 253 | return ret; |
@@ -275,13 +284,15 @@ static int s6000_pcm_prepare(struct snd_pcm_substream *substream) | |||
275 | static snd_pcm_uframes_t s6000_pcm_pointer(struct snd_pcm_substream *substream) | 284 | static snd_pcm_uframes_t s6000_pcm_pointer(struct snd_pcm_substream *substream) |
276 | { | 285 | { |
277 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; | 286 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; |
278 | struct s6000_pcm_dma_params *par = soc_runtime->dai->cpu_dai->dma_data; | 287 | struct s6000_pcm_dma_params *par; |
279 | struct snd_pcm_runtime *runtime = substream->runtime; | 288 | struct snd_pcm_runtime *runtime = substream->runtime; |
280 | struct s6000_runtime_data *prtd = runtime->private_data; | 289 | struct s6000_runtime_data *prtd = runtime->private_data; |
281 | unsigned long flags; | 290 | unsigned long flags; |
282 | unsigned int offset; | 291 | unsigned int offset; |
283 | dma_addr_t count; | 292 | dma_addr_t count; |
284 | 293 | ||
294 | par = snd_soc_dai_get_dma_data(soc_runtime->dai->cpu_dai, substream); | ||
295 | |||
285 | spin_lock_irqsave(&prtd->lock, flags); | 296 | spin_lock_irqsave(&prtd->lock, flags); |
286 | 297 | ||
287 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 298 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
@@ -305,11 +316,12 @@ static snd_pcm_uframes_t s6000_pcm_pointer(struct snd_pcm_substream *substream) | |||
305 | static int s6000_pcm_open(struct snd_pcm_substream *substream) | 316 | static int s6000_pcm_open(struct snd_pcm_substream *substream) |
306 | { | 317 | { |
307 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; | 318 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; |
308 | struct s6000_pcm_dma_params *par = soc_runtime->dai->cpu_dai->dma_data; | 319 | struct s6000_pcm_dma_params *par; |
309 | struct snd_pcm_runtime *runtime = substream->runtime; | 320 | struct snd_pcm_runtime *runtime = substream->runtime; |
310 | struct s6000_runtime_data *prtd; | 321 | struct s6000_runtime_data *prtd; |
311 | int ret; | 322 | int ret; |
312 | 323 | ||
324 | par = snd_soc_dai_get_dma_data(soc_runtime->dai->cpu_dai, substream); | ||
313 | snd_soc_set_runtime_hwparams(substream, &s6000_pcm_hardware); | 325 | snd_soc_set_runtime_hwparams(substream, &s6000_pcm_hardware); |
314 | 326 | ||
315 | ret = snd_pcm_hw_constraint_step(runtime, 0, | 327 | ret = snd_pcm_hw_constraint_step(runtime, 0, |
@@ -364,7 +376,7 @@ static int s6000_pcm_hw_params(struct snd_pcm_substream *substream, | |||
364 | struct snd_pcm_hw_params *hw_params) | 376 | struct snd_pcm_hw_params *hw_params) |
365 | { | 377 | { |
366 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; | 378 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; |
367 | struct s6000_pcm_dma_params *par = soc_runtime->dai->cpu_dai->dma_data; | 379 | struct s6000_pcm_dma_params *par; |
368 | int ret; | 380 | int ret; |
369 | ret = snd_pcm_lib_malloc_pages(substream, | 381 | ret = snd_pcm_lib_malloc_pages(substream, |
370 | params_buffer_bytes(hw_params)); | 382 | params_buffer_bytes(hw_params)); |
@@ -373,6 +385,8 @@ static int s6000_pcm_hw_params(struct snd_pcm_substream *substream, | |||
373 | return ret; | 385 | return ret; |
374 | } | 386 | } |
375 | 387 | ||
388 | par = snd_soc_dai_get_dma_data(soc_runtime->dai->cpu_dai, substream); | ||
389 | |||
376 | if (par->same_rate) { | 390 | if (par->same_rate) { |
377 | spin_lock(&par->lock); | 391 | spin_lock(&par->lock); |
378 | if (par->rate == -1 || | 392 | if (par->rate == -1 || |
@@ -392,7 +406,8 @@ static int s6000_pcm_hw_params(struct snd_pcm_substream *substream, | |||
392 | static int s6000_pcm_hw_free(struct snd_pcm_substream *substream) | 406 | static int s6000_pcm_hw_free(struct snd_pcm_substream *substream) |
393 | { | 407 | { |
394 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; | 408 | struct snd_soc_pcm_runtime *soc_runtime = substream->private_data; |
395 | struct s6000_pcm_dma_params *par = soc_runtime->dai->cpu_dai->dma_data; | 409 | struct s6000_pcm_dma_params *par = |
410 | snd_soc_dai_get_dma_data(soc_runtime->dai->cpu_dai, substream); | ||
396 | 411 | ||
397 | spin_lock(&par->lock); | 412 | spin_lock(&par->lock); |
398 | par->in_use &= ~(1 << substream->stream); | 413 | par->in_use &= ~(1 << substream->stream); |
@@ -417,7 +432,8 @@ static struct snd_pcm_ops s6000_pcm_ops = { | |||
417 | static void s6000_pcm_free(struct snd_pcm *pcm) | 432 | static void s6000_pcm_free(struct snd_pcm *pcm) |
418 | { | 433 | { |
419 | struct snd_soc_pcm_runtime *runtime = pcm->private_data; | 434 | struct snd_soc_pcm_runtime *runtime = pcm->private_data; |
420 | struct s6000_pcm_dma_params *params = runtime->dai->cpu_dai->dma_data; | 435 | struct s6000_pcm_dma_params *params = |
436 | snd_soc_dai_get_dma_data(soc_runtime->dai->cpu_dai, substream); | ||
421 | 437 | ||
422 | free_irq(params->irq, pcm); | 438 | free_irq(params->irq, pcm); |
423 | snd_pcm_lib_preallocate_free_for_all(pcm); | 439 | snd_pcm_lib_preallocate_free_for_all(pcm); |
@@ -429,9 +445,11 @@ static int s6000_pcm_new(struct snd_card *card, | |||
429 | struct snd_soc_dai *dai, struct snd_pcm *pcm) | 445 | struct snd_soc_dai *dai, struct snd_pcm *pcm) |
430 | { | 446 | { |
431 | struct snd_soc_pcm_runtime *runtime = pcm->private_data; | 447 | struct snd_soc_pcm_runtime *runtime = pcm->private_data; |
432 | struct s6000_pcm_dma_params *params = runtime->dai->cpu_dai->dma_data; | 448 | struct s6000_pcm_dma_params *params; |
433 | int res; | 449 | int res; |
434 | 450 | ||
451 | params = snd_soc_dai_get_dma_data(soc_runtime->dai->cpu_dai, substream); | ||
452 | |||
435 | if (!card->dev->dma_mask) | 453 | if (!card->dev->dma_mask) |
436 | card->dev->dma_mask = &s6000_pcm_dmamask; | 454 | card->dev->dma_mask = &s6000_pcm_dmamask; |
437 | if (!card->dev->coherent_dma_mask) | 455 | if (!card->dev->coherent_dma_mask) |
diff --git a/sound/soc/sh/Kconfig b/sound/soc/sh/Kconfig index 106674979b53..f07f6d8b93e1 100644 --- a/sound/soc/sh/Kconfig +++ b/sound/soc/sh/Kconfig | |||
@@ -32,6 +32,7 @@ config SND_SOC_SH4_SIU | |||
32 | select DMA_ENGINE | 32 | select DMA_ENGINE |
33 | select DMADEVICES | 33 | select DMADEVICES |
34 | select SH_DMAE | 34 | select SH_DMAE |
35 | select FW_LOADER | ||
35 | 36 | ||
36 | ## | 37 | ## |
37 | ## Boards | 38 | ## Boards |
diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c index baddb1242c71..0d8bdf07729c 100644 --- a/sound/soc/sh/dma-sh7760.c +++ b/sound/soc/sh/dma-sh7760.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/gfp.h> | ||
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
18 | #include <linux/dma-mapping.h> | 19 | #include <linux/dma-mapping.h> |
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 993abb730dfa..8dc966f45c36 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/list.h> | 19 | #include <linux/list.h> |
20 | #include <linux/pm_runtime.h> | 20 | #include <linux/pm_runtime.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/initval.h> | 25 | #include <sound/initval.h> |
diff --git a/sound/soc/sh/siu_dai.c b/sound/soc/sh/siu_dai.c index 5452d19607e1..d86ee1bfc03a 100644 --- a/sound/soc/sh/siu_dai.c +++ b/sound/soc/sh/siu_dai.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/firmware.h> | 23 | #include <linux/firmware.h> |
24 | #include <linux/pm_runtime.h> | 24 | #include <linux/pm_runtime.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <asm/clock.h> | 27 | #include <asm/clock.h> |
27 | #include <asm/siu.h> | 28 | #include <asm/siu.h> |
diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c index ba7f8d05d977..8f85719212f9 100644 --- a/sound/soc/sh/siu_pcm.c +++ b/sound/soc/sh/siu_pcm.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/slab.h> | ||
28 | 27 | ||
29 | #include <sound/control.h> | 28 | #include <sound/control.h> |
30 | #include <sound/core.h> | 29 | #include <sound/core.h> |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index c8b0556ef431..ad7f9528d751 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/bitops.h> | 28 | #include <linux/bitops.h> |
29 | #include <linux/debugfs.h> | 29 | #include <linux/debugfs.h> |
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/slab.h> | ||
31 | #include <sound/ac97_codec.h> | 32 | #include <sound/ac97_codec.h> |
32 | #include <sound/core.h> | 33 | #include <sound/core.h> |
33 | #include <sound/pcm.h> | 34 | #include <sound/pcm.h> |
@@ -1548,7 +1549,8 @@ int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid) | |||
1548 | mutex_unlock(&codec->mutex); | 1549 | mutex_unlock(&codec->mutex); |
1549 | return ret; | 1550 | return ret; |
1550 | } | 1551 | } |
1551 | if (card->dai_link[i].codec_dai->ac97_control) { | 1552 | /* Check for codec->ac97 to handle the ac97.c fun */ |
1553 | if (card->dai_link[i].codec_dai->ac97_control && codec->ac97) { | ||
1552 | snd_ac97_dev_add_pdata(codec->ac97, | 1554 | snd_ac97_dev_add_pdata(codec->ac97, |
1553 | card->dai_link[i].cpu_dai->ac97_pdata); | 1555 | card->dai_link[i].cpu_dai->ac97_pdata); |
1554 | } | 1556 | } |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 6c3351095786..7c28f401f436 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/platform_device.h> | 38 | #include <linux/platform_device.h> |
39 | #include <linux/jiffies.h> | 39 | #include <linux/jiffies.h> |
40 | #include <linux/debugfs.h> | 40 | #include <linux/debugfs.h> |
41 | #include <linux/slab.h> | ||
41 | #include <sound/core.h> | 42 | #include <sound/core.h> |
42 | #include <sound/pcm.h> | 43 | #include <sound/pcm.h> |
43 | #include <sound/pcm_params.h> | 44 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c index 0f83bdb9b16f..612e18b4bf4e 100644 --- a/sound/soc/txx9/txx9aclc-ac97.c +++ b/sound/soc/txx9/txx9aclc-ac97.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/gfp.h> | ||
19 | #include <sound/core.h> | 20 | #include <sound/core.h> |
20 | #include <sound/pcm.h> | 21 | #include <sound/pcm.h> |
21 | #include <sound/soc.h> | 22 | #include <sound/soc.h> |
diff --git a/sound/soc/txx9/txx9aclc.c b/sound/soc/txx9/txx9aclc.c index efed64b8b026..49cc7ea9a518 100644 --- a/sound/soc/txx9/txx9aclc.c +++ b/sound/soc/txx9/txx9aclc.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/scatterlist.h> | 17 | #include <linux/scatterlist.h> |
18 | #include <linux/slab.h> | ||
18 | #include <sound/core.h> | 19 | #include <sound/core.h> |
19 | #include <sound/pcm.h> | 20 | #include <sound/pcm.h> |
20 | #include <sound/pcm_params.h> | 21 | #include <sound/pcm_params.h> |
diff --git a/sound/sound_firmware.c b/sound/sound_firmware.c index 96deaefaa897..340a0bc5303e 100644 --- a/sound/sound_firmware.c +++ b/sound/sound_firmware.c | |||
@@ -2,7 +2,6 @@ | |||
2 | #include <linux/module.h> | 2 | #include <linux/module.h> |
3 | #include <linux/fs.h> | 3 | #include <linux/fs.h> |
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | #include <linux/slab.h> | ||
6 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
7 | #include <asm/uaccess.h> | 6 | #include <asm/uaccess.h> |
8 | #include "oss/sound_firmware.h" | 7 | #include "oss/sound_firmware.h" |
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index 8d13d933087d..7dcc06512e86 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/slab.h> | ||
14 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
15 | #include <linux/init.h> | 14 | #include <linux/init.h> |
16 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 1d2e51b3f918..2eab6ce48852 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/irq.h> | 58 | #include <linux/irq.h> |
59 | #include <linux/io.h> | 59 | #include <linux/io.h> |
60 | #include <linux/dma-mapping.h> | 60 | #include <linux/dma-mapping.h> |
61 | #include <linux/gfp.h> | ||
61 | 62 | ||
62 | #include <sound/core.h> | 63 | #include <sound/core.h> |
63 | #include <sound/pcm.h> | 64 | #include <sound/pcm.h> |
diff --git a/sound/synth/emux/emux_proc.c b/sound/synth/emux/emux_proc.c index 687e6a13689e..58a32a10d115 100644 --- a/sound/synth/emux/emux_proc.c +++ b/sound/synth/emux/emux_proc.c | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/wait.h> | 21 | #include <linux/wait.h> |
22 | #include <linux/slab.h> | ||
23 | #include <sound/core.h> | 22 | #include <sound/core.h> |
24 | #include <sound/emux_synth.h> | 23 | #include <sound/emux_synth.h> |
25 | #include <sound/info.h> | 24 | #include <sound/info.h> |
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c index 86b2c3b92df5..4328cad6c3a2 100644 --- a/sound/usb/caiaq/audio.c +++ b/sound/usb/caiaq/audio.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | #include <linux/usb.h> | 22 | #include <linux/usb.h> |
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c index a3f02dd97440..afc5aeb68005 100644 --- a/sound/usb/caiaq/device.c +++ b/sound/usb/caiaq/device.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/gfp.h> | ||
26 | #include <linux/usb.h> | 27 | #include <linux/usb.h> |
27 | #include <sound/initval.h> | 28 | #include <sound/initval.h> |
28 | #include <sound/core.h> | 29 | #include <sound/core.h> |
diff --git a/sound/usb/caiaq/midi.c b/sound/usb/caiaq/midi.c index 538e8c00d31a..2f218c77fff2 100644 --- a/sound/usb/caiaq/midi.c +++ b/sound/usb/caiaq/midi.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/usb.h> | 19 | #include <linux/usb.h> |
20 | #include <linux/gfp.h> | ||
20 | #include <sound/rawmidi.h> | 21 | #include <sound/rawmidi.h> |
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c index 44deb21b1777..9ca9a13a78da 100644 --- a/sound/usb/usx2y/us122l.c +++ b/sound/usb/usx2y/us122l.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 16 | * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/slab.h> | ||
19 | #include <linux/usb.h> | 20 | #include <linux/usb.h> |
20 | #include <linux/usb/audio.h> | 21 | #include <linux/usb/audio.h> |
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
diff --git a/sound/usb/usx2y/usX2Yhwdep.c b/sound/usb/usx2y/usX2Yhwdep.c index 1879b72c40f8..04aafb43a13c 100644 --- a/sound/usb/usx2y/usX2Yhwdep.c +++ b/sound/usb/usx2y/usX2Yhwdep.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/slab.h> | ||
24 | #include <linux/usb.h> | 25 | #include <linux/usb.h> |
25 | #include <sound/core.h> | 26 | #include <sound/core.h> |
26 | #include <sound/memalloc.h> | 27 | #include <sound/memalloc.h> |
diff --git a/sound/usb/usx2y/usb_stream.c b/sound/usb/usx2y/usb_stream.c index 12ae0340adc0..c400ade3ff08 100644 --- a/sound/usb/usx2y/usb_stream.c +++ b/sound/usb/usx2y/usb_stream.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/usb.h> | 19 | #include <linux/usb.h> |
20 | #include <linux/gfp.h> | ||
20 | 21 | ||
21 | #include "usb_stream.h" | 22 | #include "usb_stream.h" |
22 | 23 | ||
diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c index c42350eed2eb..cbd37f2c76d0 100644 --- a/sound/usb/usx2y/usbusx2y.c +++ b/sound/usb/usx2y/usbusx2y.c | |||
@@ -133,6 +133,7 @@ | |||
133 | #include <linux/init.h> | 133 | #include <linux/init.h> |
134 | #include <linux/module.h> | 134 | #include <linux/module.h> |
135 | #include <linux/moduleparam.h> | 135 | #include <linux/moduleparam.h> |
136 | #include <linux/slab.h> | ||
136 | #include <linux/interrupt.h> | 137 | #include <linux/interrupt.h> |
137 | #include <linux/usb.h> | 138 | #include <linux/usb.h> |
138 | #include <sound/core.h> | 139 | #include <sound/core.h> |
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c index 74a67a85aa81..5d37d1ccf813 100644 --- a/sound/usb/usx2y/usbusx2yaudio.c +++ b/sound/usb/usx2y/usbusx2yaudio.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | 33 | ||
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/usb.h> | 36 | #include <linux/usb.h> |
36 | #include <sound/core.h> | 37 | #include <sound/core.h> |
37 | #include <sound/info.h> | 38 | #include <sound/info.h> |
diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c index 9ed6c3956ca7..2a528e56afd5 100644 --- a/sound/usb/usx2y/usx2yhwdeppcm.c +++ b/sound/usb/usx2y/usx2yhwdeppcm.c | |||
@@ -51,6 +51,7 @@ | |||
51 | */ | 51 | */ |
52 | 52 | ||
53 | #include <linux/delay.h> | 53 | #include <linux/delay.h> |
54 | #include <linux/gfp.h> | ||
54 | #include "usbusx2yaudio.c" | 55 | #include "usbusx2yaudio.c" |
55 | 56 | ||
56 | #if defined(USX2Y_NRPACKS_VARIABLE) || (!defined(USX2Y_NRPACKS_VARIABLE) && USX2Y_NRPACKS == 1) | 57 | #if defined(USX2Y_NRPACKS_VARIABLE) || (!defined(USX2Y_NRPACKS_VARIABLE) && USX2Y_NRPACKS == 1) |
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 8a8f52db7e38..bc0f670a8338 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -200,7 +200,7 @@ endif | |||
200 | 200 | ||
201 | CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) | 201 | CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) |
202 | EXTLIBS = -lpthread -lrt -lelf -lm | 202 | EXTLIBS = -lpthread -lrt -lelf -lm |
203 | ALL_CFLAGS = $(CFLAGS) | 203 | ALL_CFLAGS = $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 |
204 | ALL_LDFLAGS = $(LDFLAGS) | 204 | ALL_LDFLAGS = $(LDFLAGS) |
205 | STRIP ?= strip | 205 | STRIP ?= strip |
206 | 206 | ||
@@ -492,19 +492,19 @@ ifeq ($(uname_S),Darwin) | |||
492 | PTHREAD_LIBS = | 492 | PTHREAD_LIBS = |
493 | endif | 493 | endif |
494 | 494 | ||
495 | ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) | 495 | ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) |
496 | ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) | 496 | ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) |
497 | msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static); | 497 | msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static); |
498 | endif | 498 | endif |
499 | 499 | ||
500 | ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) | 500 | ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) |
501 | BASIC_CFLAGS += -DLIBELF_NO_MMAP | 501 | BASIC_CFLAGS += -DLIBELF_NO_MMAP |
502 | endif | 502 | endif |
503 | else | 503 | else |
504 | msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]); | 504 | msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]); |
505 | endif | 505 | endif |
506 | 506 | ||
507 | ifneq ($(shell sh -c "(echo '\#include <dwarf.h>'; echo '\#include <libdw.h>'; echo 'int main(void) { Dwarf *dbg; dbg = dwarf_begin(0, DWARF_C_READ); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/elfutils -ldw -lelf -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) | 507 | ifneq ($(shell sh -c "(echo '\#include <dwarf.h>'; echo '\#include <libdw.h>'; echo 'int main(void) { Dwarf *dbg; dbg = dwarf_begin(0, DWARF_C_READ); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -I/usr/include/elfutils -ldw -lelf -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y) |
508 | msg := $(warning No libdw.h found or old libdw.h found, disables dwarf support. Please install elfutils-devel/elfutils-dev); | 508 | msg := $(warning No libdw.h found or old libdw.h found, disables dwarf support. Please install elfutils-devel/elfutils-dev); |
509 | BASIC_CFLAGS += -DNO_DWARF_SUPPORT | 509 | BASIC_CFLAGS += -DNO_DWARF_SUPPORT |
510 | else | 510 | else |
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index c30a33592340..152d6c9b1fa4 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include "util/probe-event.h" | 47 | #include "util/probe-event.h" |
48 | 48 | ||
49 | #define MAX_PATH_LEN 256 | 49 | #define MAX_PATH_LEN 256 |
50 | #define MAX_PROBES 128 | ||
51 | 50 | ||
52 | /* Session management structure */ | 51 | /* Session management structure */ |
53 | static struct { | 52 | static struct { |
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 0b719e3dde05..1f529321607e 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -455,7 +455,7 @@ static void print_sym_table(void) | |||
455 | struct sym_entry *syme, *n; | 455 | struct sym_entry *syme, *n; |
456 | struct rb_root tmp = RB_ROOT; | 456 | struct rb_root tmp = RB_ROOT; |
457 | struct rb_node *nd; | 457 | struct rb_node *nd; |
458 | int sym_width = 0, dso_width = 0, max_dso_width; | 458 | int sym_width = 0, dso_width = 0, dso_short_width = 0; |
459 | const int win_width = winsize.ws_col - 1; | 459 | const int win_width = winsize.ws_col - 1; |
460 | 460 | ||
461 | samples = userspace_samples = 0; | 461 | samples = userspace_samples = 0; |
@@ -545,15 +545,20 @@ static void print_sym_table(void) | |||
545 | if (syme->map->dso->long_name_len > dso_width) | 545 | if (syme->map->dso->long_name_len > dso_width) |
546 | dso_width = syme->map->dso->long_name_len; | 546 | dso_width = syme->map->dso->long_name_len; |
547 | 547 | ||
548 | if (syme->map->dso->short_name_len > dso_short_width) | ||
549 | dso_short_width = syme->map->dso->short_name_len; | ||
550 | |||
548 | if (syme->name_len > sym_width) | 551 | if (syme->name_len > sym_width) |
549 | sym_width = syme->name_len; | 552 | sym_width = syme->name_len; |
550 | } | 553 | } |
551 | 554 | ||
552 | printed = 0; | 555 | printed = 0; |
553 | 556 | ||
554 | max_dso_width = winsize.ws_col - sym_width - 29; | 557 | if (sym_width + dso_width > winsize.ws_col - 29) { |
555 | if (dso_width > max_dso_width) | 558 | dso_width = dso_short_width; |
556 | dso_width = max_dso_width; | 559 | if (sym_width + dso_width > winsize.ws_col - 29) |
560 | sym_width = winsize.ws_col - dso_width - 29; | ||
561 | } | ||
557 | putchar('\n'); | 562 | putchar('\n'); |
558 | if (nr_counters == 1) | 563 | if (nr_counters == 1) |
559 | printf(" samples pcnt"); | 564 | printf(" samples pcnt"); |
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 53181dbfe4a8..7c004b6ef24f 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c | |||
@@ -242,7 +242,7 @@ void parse_perf_probe_event(const char *str, struct probe_point *pp, | |||
242 | 242 | ||
243 | /* Parse probe point */ | 243 | /* Parse probe point */ |
244 | parse_perf_probe_probepoint(argv[0], pp); | 244 | parse_perf_probe_probepoint(argv[0], pp); |
245 | if (pp->file || pp->line) | 245 | if (pp->file || pp->line || pp->lazy_line) |
246 | *need_dwarf = true; | 246 | *need_dwarf = true; |
247 | 247 | ||
248 | /* Copy arguments and ensure return probe has no C argument */ | 248 | /* Copy arguments and ensure return probe has no C argument */ |
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 1e6c65ebbd80..c171a243d05b 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c | |||
@@ -333,8 +333,8 @@ static void show_location(Dwarf_Op *op, struct probe_finder *pf) | |||
333 | die("%u exceeds max register number.", regn); | 333 | die("%u exceeds max register number.", regn); |
334 | 334 | ||
335 | if (deref) | 335 | if (deref) |
336 | ret = snprintf(pf->buf, pf->len, " %s=+%ju(%s)", | 336 | ret = snprintf(pf->buf, pf->len, " %s=%+jd(%s)", |
337 | pf->var, (uintmax_t)offs, regs); | 337 | pf->var, (intmax_t)offs, regs); |
338 | else | 338 | else |
339 | ret = snprintf(pf->buf, pf->len, " %s=%s", pf->var, regs); | 339 | ret = snprintf(pf->buf, pf->len, " %s=%s", pf->var, regs); |
340 | DIE_IF(ret < 0); | 340 | DIE_IF(ret < 0); |
@@ -352,8 +352,7 @@ static void show_variable(Dwarf_Die *vr_die, struct probe_finder *pf) | |||
352 | if (dwarf_attr(vr_die, DW_AT_location, &attr) == NULL) | 352 | if (dwarf_attr(vr_die, DW_AT_location, &attr) == NULL) |
353 | goto error; | 353 | goto error; |
354 | /* TODO: handle more than 1 exprs */ | 354 | /* TODO: handle more than 1 exprs */ |
355 | ret = dwarf_getlocation_addr(&attr, (pf->addr - pf->cu_base), | 355 | ret = dwarf_getlocation_addr(&attr, pf->addr, &expr, &nexpr, 1); |
356 | &expr, &nexpr, 1); | ||
357 | if (ret <= 0 || nexpr == 0) | 356 | if (ret <= 0 || nexpr == 0) |
358 | goto error; | 357 | goto error; |
359 | 358 | ||
@@ -437,8 +436,7 @@ static void show_probe_point(Dwarf_Die *sp_die, struct probe_finder *pf) | |||
437 | 436 | ||
438 | /* Get the frame base attribute/ops */ | 437 | /* Get the frame base attribute/ops */ |
439 | dwarf_attr(sp_die, DW_AT_frame_base, &fb_attr); | 438 | dwarf_attr(sp_die, DW_AT_frame_base, &fb_attr); |
440 | ret = dwarf_getlocation_addr(&fb_attr, (pf->addr - pf->cu_base), | 439 | ret = dwarf_getlocation_addr(&fb_attr, pf->addr, &pf->fb_ops, &nops, 1); |
441 | &pf->fb_ops, &nops, 1); | ||
442 | if (ret <= 0 || nops == 0) | 440 | if (ret <= 0 || nops == 0) |
443 | pf->fb_ops = NULL; | 441 | pf->fb_ops = NULL; |
444 | 442 | ||
@@ -455,6 +453,9 @@ static void show_probe_point(Dwarf_Die *sp_die, struct probe_finder *pf) | |||
455 | /* *pf->fb_ops will be cached in libdw. Don't free it. */ | 453 | /* *pf->fb_ops will be cached in libdw. Don't free it. */ |
456 | pf->fb_ops = NULL; | 454 | pf->fb_ops = NULL; |
457 | 455 | ||
456 | if (pp->found == MAX_PROBES) | ||
457 | die("Too many( > %d) probe point found.\n", MAX_PROBES); | ||
458 | |||
458 | pp->probes[pp->found] = strdup(tmp); | 459 | pp->probes[pp->found] = strdup(tmp); |
459 | pp->found++; | 460 | pp->found++; |
460 | } | 461 | } |
@@ -641,7 +642,6 @@ static void find_probe_point_by_func(struct probe_finder *pf) | |||
641 | int find_probe_point(int fd, struct probe_point *pp) | 642 | int find_probe_point(int fd, struct probe_point *pp) |
642 | { | 643 | { |
643 | struct probe_finder pf = {.pp = pp}; | 644 | struct probe_finder pf = {.pp = pp}; |
644 | int ret; | ||
645 | Dwarf_Off off, noff; | 645 | Dwarf_Off off, noff; |
646 | size_t cuhl; | 646 | size_t cuhl; |
647 | Dwarf_Die *diep; | 647 | Dwarf_Die *diep; |
@@ -668,10 +668,6 @@ int find_probe_point(int fd, struct probe_point *pp) | |||
668 | pf.fname = NULL; | 668 | pf.fname = NULL; |
669 | 669 | ||
670 | if (!pp->file || pf.fname) { | 670 | if (!pp->file || pf.fname) { |
671 | /* Save CU base address (for frame_base) */ | ||
672 | ret = dwarf_lowpc(&pf.cu_die, &pf.cu_base); | ||
673 | if (ret != 0) | ||
674 | pf.cu_base = 0; | ||
675 | if (pp->function) | 671 | if (pp->function) |
676 | find_probe_point_by_func(&pf); | 672 | find_probe_point_by_func(&pf); |
677 | else if (pp->lazy_line) | 673 | else if (pp->lazy_line) |
diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h index d1a651793ba6..21f7354397b4 100644 --- a/tools/perf/util/probe-finder.h +++ b/tools/perf/util/probe-finder.h | |||
@@ -71,7 +71,6 @@ struct probe_finder { | |||
71 | 71 | ||
72 | /* For variable searching */ | 72 | /* For variable searching */ |
73 | Dwarf_Op *fb_ops; /* Frame base attribute */ | 73 | Dwarf_Op *fb_ops; /* Frame base attribute */ |
74 | Dwarf_Addr cu_base; /* Current CU base address */ | ||
75 | const char *var; /* Current variable name */ | 74 | const char *var; /* Current variable name */ |
76 | char *buf; /* Current output buffer */ | 75 | char *buf; /* Current output buffer */ |
77 | int len; /* Length of output buffer */ | 76 | int len; /* Length of output buffer */ |
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c index 33a414bbba3e..6a72f14c5986 100644 --- a/tools/perf/util/scripting-engines/trace-event-python.c +++ b/tools/perf/util/scripting-engines/trace-event-python.c | |||
@@ -208,7 +208,7 @@ static void python_process_event(int cpu, void *data, | |||
208 | int size __unused, | 208 | int size __unused, |
209 | unsigned long long nsecs, char *comm) | 209 | unsigned long long nsecs, char *comm) |
210 | { | 210 | { |
211 | PyObject *handler, *retval, *context, *t; | 211 | PyObject *handler, *retval, *context, *t, *obj; |
212 | static char handler_name[256]; | 212 | static char handler_name[256]; |
213 | struct format_field *field; | 213 | struct format_field *field; |
214 | unsigned long long val; | 214 | unsigned long long val; |
@@ -256,16 +256,23 @@ static void python_process_event(int cpu, void *data, | |||
256 | offset &= 0xffff; | 256 | offset &= 0xffff; |
257 | } else | 257 | } else |
258 | offset = field->offset; | 258 | offset = field->offset; |
259 | PyTuple_SetItem(t, n++, | 259 | obj = PyString_FromString((char *)data + offset); |
260 | PyString_FromString((char *)data + offset)); | ||
261 | } else { /* FIELD_IS_NUMERIC */ | 260 | } else { /* FIELD_IS_NUMERIC */ |
262 | val = read_size(data + field->offset, field->size); | 261 | val = read_size(data + field->offset, field->size); |
263 | if (field->flags & FIELD_IS_SIGNED) { | 262 | if (field->flags & FIELD_IS_SIGNED) { |
264 | PyTuple_SetItem(t, n++, PyInt_FromLong(val)); | 263 | if ((long long)val >= LONG_MIN && |
264 | (long long)val <= LONG_MAX) | ||
265 | obj = PyInt_FromLong(val); | ||
266 | else | ||
267 | obj = PyLong_FromLongLong(val); | ||
265 | } else { | 268 | } else { |
266 | PyTuple_SetItem(t, n++, PyInt_FromLong(val)); | 269 | if (val <= LONG_MAX) |
270 | obj = PyInt_FromLong(val); | ||
271 | else | ||
272 | obj = PyLong_FromUnsignedLongLong(val); | ||
267 | } | 273 | } |
268 | } | 274 | } |
275 | PyTuple_SetItem(t, n++, obj); | ||
269 | } | 276 | } |
270 | 277 | ||
271 | if (_PyTuple_Resize(&t, n) == -1) | 278 | if (_PyTuple_Resize(&t, n) == -1) |
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 323c0aea0a91..c458c4a371d1 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c | |||
@@ -163,9 +163,17 @@ void dso__set_long_name(struct dso *self, char *name) | |||
163 | self->long_name_len = strlen(name); | 163 | self->long_name_len = strlen(name); |
164 | } | 164 | } |
165 | 165 | ||
166 | static void dso__set_short_name(struct dso *self, const char *name) | ||
167 | { | ||
168 | if (name == NULL) | ||
169 | return; | ||
170 | self->short_name = name; | ||
171 | self->short_name_len = strlen(name); | ||
172 | } | ||
173 | |||
166 | static void dso__set_basename(struct dso *self) | 174 | static void dso__set_basename(struct dso *self) |
167 | { | 175 | { |
168 | self->short_name = basename(self->long_name); | 176 | dso__set_short_name(self, basename(self->long_name)); |
169 | } | 177 | } |
170 | 178 | ||
171 | struct dso *dso__new(const char *name) | 179 | struct dso *dso__new(const char *name) |
@@ -176,7 +184,7 @@ struct dso *dso__new(const char *name) | |||
176 | int i; | 184 | int i; |
177 | strcpy(self->name, name); | 185 | strcpy(self->name, name); |
178 | dso__set_long_name(self, self->name); | 186 | dso__set_long_name(self, self->name); |
179 | self->short_name = self->name; | 187 | dso__set_short_name(self, self->name); |
180 | for (i = 0; i < MAP__NR_TYPES; ++i) | 188 | for (i = 0; i < MAP__NR_TYPES; ++i) |
181 | self->symbols[i] = self->symbol_names[i] = RB_ROOT; | 189 | self->symbols[i] = self->symbol_names[i] = RB_ROOT; |
182 | self->slen_calculated = 0; | 190 | self->slen_calculated = 0; |
@@ -897,7 +905,6 @@ static int dso__load_sym(struct dso *self, struct map *map, const char *name, | |||
897 | struct kmap *kmap = self->kernel ? map__kmap(map) : NULL; | 905 | struct kmap *kmap = self->kernel ? map__kmap(map) : NULL; |
898 | struct map *curr_map = map; | 906 | struct map *curr_map = map; |
899 | struct dso *curr_dso = self; | 907 | struct dso *curr_dso = self; |
900 | size_t dso_name_len = strlen(self->short_name); | ||
901 | Elf_Data *symstrs, *secstrs; | 908 | Elf_Data *symstrs, *secstrs; |
902 | uint32_t nr_syms; | 909 | uint32_t nr_syms; |
903 | int err = -1; | 910 | int err = -1; |
@@ -987,7 +994,8 @@ static int dso__load_sym(struct dso *self, struct map *map, const char *name, | |||
987 | char dso_name[PATH_MAX]; | 994 | char dso_name[PATH_MAX]; |
988 | 995 | ||
989 | if (strcmp(section_name, | 996 | if (strcmp(section_name, |
990 | curr_dso->short_name + dso_name_len) == 0) | 997 | (curr_dso->short_name + |
998 | self->short_name_len)) == 0) | ||
991 | goto new_symbol; | 999 | goto new_symbol; |
992 | 1000 | ||
993 | if (strcmp(section_name, ".text") == 0) { | 1001 | if (strcmp(section_name, ".text") == 0) { |
@@ -1782,7 +1790,7 @@ struct dso *dso__new_kernel(const char *name) | |||
1782 | struct dso *self = dso__new(name ?: "[kernel.kallsyms]"); | 1790 | struct dso *self = dso__new(name ?: "[kernel.kallsyms]"); |
1783 | 1791 | ||
1784 | if (self != NULL) { | 1792 | if (self != NULL) { |
1785 | self->short_name = "[kernel]"; | 1793 | dso__set_short_name(self, "[kernel]"); |
1786 | self->kernel = 1; | 1794 | self->kernel = 1; |
1787 | } | 1795 | } |
1788 | 1796 | ||
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 280dadd32a08..f30a37428919 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
@@ -110,9 +110,10 @@ struct dso { | |||
110 | u8 sorted_by_name; | 110 | u8 sorted_by_name; |
111 | u8 loaded; | 111 | u8 loaded; |
112 | u8 build_id[BUILD_ID_SIZE]; | 112 | u8 build_id[BUILD_ID_SIZE]; |
113 | u16 long_name_len; | ||
114 | const char *short_name; | 113 | const char *short_name; |
115 | char *long_name; | 114 | char *long_name; |
115 | u16 long_name_len; | ||
116 | u16 short_name_len; | ||
116 | char name[0]; | 117 | char name[0]; |
117 | }; | 118 | }; |
118 | 119 | ||
diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c index 057e2cca6af5..02ff2b19dbe2 100644 --- a/virt/kvm/assigned-dev.c +++ b/virt/kvm/assigned-dev.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/slab.h> | ||
19 | #include "irq.h" | 20 | #include "irq.h" |
20 | 21 | ||
21 | static struct kvm_assigned_dev_kernel *kvm_find_assigned_dev(struct list_head *head, | 22 | static struct kvm_assigned_dev_kernel *kvm_find_assigned_dev(struct list_head *head, |
diff --git a/virt/kvm/coalesced_mmio.c b/virt/kvm/coalesced_mmio.c index 5169736377a3..36e258029649 100644 --- a/virt/kvm/coalesced_mmio.c +++ b/virt/kvm/coalesced_mmio.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include "iodev.h" | 10 | #include "iodev.h" |
11 | 11 | ||
12 | #include <linux/kvm_host.h> | 12 | #include <linux/kvm_host.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/kvm.h> | 14 | #include <linux/kvm.h> |
14 | 15 | ||
15 | #include "coalesced_mmio.h" | 16 | #include "coalesced_mmio.h" |
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 7016319b1ec0..b81f0ebbaaad 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/list.h> | 30 | #include <linux/list.h> |
31 | #include <linux/eventfd.h> | 31 | #include <linux/eventfd.h> |
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include "iodev.h" | 35 | #include "iodev.h" |
35 | 36 | ||
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 3db15a807f80..03a5eb22da2b 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/smp.h> | 33 | #include <linux/smp.h> |
34 | #include <linux/hrtimer.h> | 34 | #include <linux/hrtimer.h> |
35 | #include <linux/io.h> | 35 | #include <linux/io.h> |
36 | #include <linux/slab.h> | ||
36 | #include <asm/processor.h> | 37 | #include <asm/processor.h> |
37 | #include <asm/page.h> | 38 | #include <asm/page.h> |
38 | #include <asm/current.h> | 39 | #include <asm/current.h> |
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 9fd5b3ebc517..a0e88809e45e 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/kvm_host.h> | 22 | #include <linux/kvm_host.h> |
23 | #include <linux/slab.h> | ||
23 | #include <trace/events/kvm.h> | 24 | #include <trace/events/kvm.h> |
24 | 25 | ||
25 | #include <asm/msidef.h> | 26 | #include <asm/msidef.h> |
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 548f9253c195..5a0cd194dce0 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
24 | #include <linux/percpu.h> | 24 | #include <linux/percpu.h> |
25 | #include <linux/gfp.h> | ||
26 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
27 | #include <linux/miscdevice.h> | 26 | #include <linux/miscdevice.h> |
28 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
@@ -46,6 +45,7 @@ | |||
46 | #include <linux/compat.h> | 45 | #include <linux/compat.h> |
47 | #include <linux/srcu.h> | 46 | #include <linux/srcu.h> |
48 | #include <linux/hugetlb.h> | 47 | #include <linux/hugetlb.h> |
48 | #include <linux/slab.h> | ||
49 | 49 | ||
50 | #include <asm/processor.h> | 50 | #include <asm/processor.h> |
51 | #include <asm/io.h> | 51 | #include <asm/io.h> |