diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-04-01 22:17:41 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-01 22:17:41 -0400 |
commit | c4361bb64b81f5b81a7a08d58654493385a2f2b2 (patch) | |
tree | 8741c0b60ddfbc3fc4e17c8d200f6aa6ff32cca0 /include | |
parent | 46368fa05164e1afdc1401294908cf30c6d8d981 (diff) | |
parent | 833bb3046b6cb320e775ea2160ddca87d53260d5 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include')
60 files changed, 850 insertions, 895 deletions
diff --git a/include/asm-frv/highmem.h b/include/asm-frv/highmem.h index 26cefcde5cee..68e4677fb9e7 100644 --- a/include/asm-frv/highmem.h +++ b/include/asm-frv/highmem.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | 19 | ||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/highmem.h> | ||
21 | #include <asm/mem-layout.h> | 22 | #include <asm/mem-layout.h> |
22 | #include <asm/spr-regs.h> | 23 | #include <asm/spr-regs.h> |
23 | #include <asm/mb-regs.h> | 24 | #include <asm/mb-regs.h> |
@@ -116,6 +117,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type) | |||
116 | unsigned long paddr; | 117 | unsigned long paddr; |
117 | 118 | ||
118 | pagefault_disable(); | 119 | pagefault_disable(); |
120 | debug_kmap_atomic(type); | ||
119 | paddr = page_to_phys(page); | 121 | paddr = page_to_phys(page); |
120 | 122 | ||
121 | switch (type) { | 123 | switch (type) { |
diff --git a/include/asm-generic/dma-mapping.h b/include/asm-generic/dma-mapping.h deleted file mode 100644 index 189486c3f92e..000000000000 --- a/include/asm-generic/dma-mapping.h +++ /dev/null | |||
@@ -1,308 +0,0 @@ | |||
1 | /* Copyright (C) 2002 by James.Bottomley@HansenPartnership.com | ||
2 | * | ||
3 | * Implements the generic device dma API via the existing pci_ one | ||
4 | * for unconverted architectures | ||
5 | */ | ||
6 | |||
7 | #ifndef _ASM_GENERIC_DMA_MAPPING_H | ||
8 | #define _ASM_GENERIC_DMA_MAPPING_H | ||
9 | |||
10 | |||
11 | #ifdef CONFIG_PCI | ||
12 | |||
13 | /* we implement the API below in terms of the existing PCI one, | ||
14 | * so include it */ | ||
15 | #include <linux/pci.h> | ||
16 | /* need struct page definitions */ | ||
17 | #include <linux/mm.h> | ||
18 | |||
19 | static inline int | ||
20 | dma_supported(struct device *dev, u64 mask) | ||
21 | { | ||
22 | BUG_ON(dev->bus != &pci_bus_type); | ||
23 | |||
24 | return pci_dma_supported(to_pci_dev(dev), mask); | ||
25 | } | ||
26 | |||
27 | static inline int | ||
28 | dma_set_mask(struct device *dev, u64 dma_mask) | ||
29 | { | ||
30 | BUG_ON(dev->bus != &pci_bus_type); | ||
31 | |||
32 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); | ||
33 | } | ||
34 | |||
35 | static inline void * | ||
36 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | ||
37 | gfp_t flag) | ||
38 | { | ||
39 | BUG_ON(dev->bus != &pci_bus_type); | ||
40 | |||
41 | return pci_alloc_consistent(to_pci_dev(dev), size, dma_handle); | ||
42 | } | ||
43 | |||
44 | static inline void | ||
45 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | ||
46 | dma_addr_t dma_handle) | ||
47 | { | ||
48 | BUG_ON(dev->bus != &pci_bus_type); | ||
49 | |||
50 | pci_free_consistent(to_pci_dev(dev), size, cpu_addr, dma_handle); | ||
51 | } | ||
52 | |||
53 | static inline dma_addr_t | ||
54 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, | ||
55 | enum dma_data_direction direction) | ||
56 | { | ||
57 | BUG_ON(dev->bus != &pci_bus_type); | ||
58 | |||
59 | return pci_map_single(to_pci_dev(dev), cpu_addr, size, (int)direction); | ||
60 | } | ||
61 | |||
62 | static inline void | ||
63 | dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | ||
64 | enum dma_data_direction direction) | ||
65 | { | ||
66 | BUG_ON(dev->bus != &pci_bus_type); | ||
67 | |||
68 | pci_unmap_single(to_pci_dev(dev), dma_addr, size, (int)direction); | ||
69 | } | ||
70 | |||
71 | static inline dma_addr_t | ||
72 | dma_map_page(struct device *dev, struct page *page, | ||
73 | unsigned long offset, size_t size, | ||
74 | enum dma_data_direction direction) | ||
75 | { | ||
76 | BUG_ON(dev->bus != &pci_bus_type); | ||
77 | |||
78 | return pci_map_page(to_pci_dev(dev), page, offset, size, (int)direction); | ||
79 | } | ||
80 | |||
81 | static inline void | ||
82 | dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, | ||
83 | enum dma_data_direction direction) | ||
84 | { | ||
85 | BUG_ON(dev->bus != &pci_bus_type); | ||
86 | |||
87 | pci_unmap_page(to_pci_dev(dev), dma_address, size, (int)direction); | ||
88 | } | ||
89 | |||
90 | static inline int | ||
91 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | ||
92 | enum dma_data_direction direction) | ||
93 | { | ||
94 | BUG_ON(dev->bus != &pci_bus_type); | ||
95 | |||
96 | return pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction); | ||
97 | } | ||
98 | |||
99 | static inline void | ||
100 | dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, | ||
101 | enum dma_data_direction direction) | ||
102 | { | ||
103 | BUG_ON(dev->bus != &pci_bus_type); | ||
104 | |||
105 | pci_unmap_sg(to_pci_dev(dev), sg, nhwentries, (int)direction); | ||
106 | } | ||
107 | |||
108 | static inline void | ||
109 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, | ||
110 | enum dma_data_direction direction) | ||
111 | { | ||
112 | BUG_ON(dev->bus != &pci_bus_type); | ||
113 | |||
114 | pci_dma_sync_single_for_cpu(to_pci_dev(dev), dma_handle, | ||
115 | size, (int)direction); | ||
116 | } | ||
117 | |||
118 | static inline void | ||
119 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, | ||
120 | enum dma_data_direction direction) | ||
121 | { | ||
122 | BUG_ON(dev->bus != &pci_bus_type); | ||
123 | |||
124 | pci_dma_sync_single_for_device(to_pci_dev(dev), dma_handle, | ||
125 | size, (int)direction); | ||
126 | } | ||
127 | |||
128 | static inline void | ||
129 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, | ||
130 | enum dma_data_direction direction) | ||
131 | { | ||
132 | BUG_ON(dev->bus != &pci_bus_type); | ||
133 | |||
134 | pci_dma_sync_sg_for_cpu(to_pci_dev(dev), sg, nelems, (int)direction); | ||
135 | } | ||
136 | |||
137 | static inline void | ||
138 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, | ||
139 | enum dma_data_direction direction) | ||
140 | { | ||
141 | BUG_ON(dev->bus != &pci_bus_type); | ||
142 | |||
143 | pci_dma_sync_sg_for_device(to_pci_dev(dev), sg, nelems, (int)direction); | ||
144 | } | ||
145 | |||
146 | static inline int | ||
147 | dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | ||
148 | { | ||
149 | return pci_dma_mapping_error(to_pci_dev(dev), dma_addr); | ||
150 | } | ||
151 | |||
152 | |||
153 | #else | ||
154 | |||
155 | static inline int | ||
156 | dma_supported(struct device *dev, u64 mask) | ||
157 | { | ||
158 | return 0; | ||
159 | } | ||
160 | |||
161 | static inline int | ||
162 | dma_set_mask(struct device *dev, u64 dma_mask) | ||
163 | { | ||
164 | BUG(); | ||
165 | return 0; | ||
166 | } | ||
167 | |||
168 | static inline void * | ||
169 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | ||
170 | gfp_t flag) | ||
171 | { | ||
172 | BUG(); | ||
173 | return NULL; | ||
174 | } | ||
175 | |||
176 | static inline void | ||
177 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | ||
178 | dma_addr_t dma_handle) | ||
179 | { | ||
180 | BUG(); | ||
181 | } | ||
182 | |||
183 | static inline dma_addr_t | ||
184 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, | ||
185 | enum dma_data_direction direction) | ||
186 | { | ||
187 | BUG(); | ||
188 | return 0; | ||
189 | } | ||
190 | |||
191 | static inline void | ||
192 | dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | ||
193 | enum dma_data_direction direction) | ||
194 | { | ||
195 | BUG(); | ||
196 | } | ||
197 | |||
198 | static inline dma_addr_t | ||
199 | dma_map_page(struct device *dev, struct page *page, | ||
200 | unsigned long offset, size_t size, | ||
201 | enum dma_data_direction direction) | ||
202 | { | ||
203 | BUG(); | ||
204 | return 0; | ||
205 | } | ||
206 | |||
207 | static inline void | ||
208 | dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, | ||
209 | enum dma_data_direction direction) | ||
210 | { | ||
211 | BUG(); | ||
212 | } | ||
213 | |||
214 | static inline int | ||
215 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | ||
216 | enum dma_data_direction direction) | ||
217 | { | ||
218 | BUG(); | ||
219 | return 0; | ||
220 | } | ||
221 | |||
222 | static inline void | ||
223 | dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, | ||
224 | enum dma_data_direction direction) | ||
225 | { | ||
226 | BUG(); | ||
227 | } | ||
228 | |||
229 | static inline void | ||
230 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, | ||
231 | enum dma_data_direction direction) | ||
232 | { | ||
233 | BUG(); | ||
234 | } | ||
235 | |||
236 | static inline void | ||
237 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, | ||
238 | enum dma_data_direction direction) | ||
239 | { | ||
240 | BUG(); | ||
241 | } | ||
242 | |||
243 | static inline void | ||
244 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, | ||
245 | enum dma_data_direction direction) | ||
246 | { | ||
247 | BUG(); | ||
248 | } | ||
249 | |||
250 | static inline void | ||
251 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, | ||
252 | enum dma_data_direction direction) | ||
253 | { | ||
254 | BUG(); | ||
255 | } | ||
256 | |||
257 | static inline int | ||
258 | dma_error(dma_addr_t dma_addr) | ||
259 | { | ||
260 | return 0; | ||
261 | } | ||
262 | |||
263 | #endif | ||
264 | |||
265 | /* Now for the API extensions over the pci_ one */ | ||
266 | |||
267 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | ||
268 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | ||
269 | #define dma_is_consistent(d, h) (1) | ||
270 | |||
271 | static inline int | ||
272 | dma_get_cache_alignment(void) | ||
273 | { | ||
274 | /* no easy way to get cache size on all processors, so return | ||
275 | * the maximum possible, to be safe */ | ||
276 | return (1 << INTERNODE_CACHE_SHIFT); | ||
277 | } | ||
278 | |||
279 | static inline void | ||
280 | dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle, | ||
281 | unsigned long offset, size_t size, | ||
282 | enum dma_data_direction direction) | ||
283 | { | ||
284 | /* just sync everything, that's all the pci API can do */ | ||
285 | dma_sync_single_for_cpu(dev, dma_handle, offset+size, direction); | ||
286 | } | ||
287 | |||
288 | static inline void | ||
289 | dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle, | ||
290 | unsigned long offset, size_t size, | ||
291 | enum dma_data_direction direction) | ||
292 | { | ||
293 | /* just sync everything, that's all the pci API can do */ | ||
294 | dma_sync_single_for_device(dev, dma_handle, offset+size, direction); | ||
295 | } | ||
296 | |||
297 | static inline void | ||
298 | dma_cache_sync(struct device *dev, void *vaddr, size_t size, | ||
299 | enum dma_data_direction direction) | ||
300 | { | ||
301 | /* could define this in terms of the dma_cache ... operations, | ||
302 | * but if you get this on a platform, you should convert the platform | ||
303 | * to using the generic device DMA API */ | ||
304 | BUG(); | ||
305 | } | ||
306 | |||
307 | #endif | ||
308 | |||
diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h index 0e9e2bc0ee96..88bada2ebc4b 100644 --- a/include/asm-generic/topology.h +++ b/include/asm-generic/topology.h | |||
@@ -43,20 +43,10 @@ | |||
43 | #ifndef cpumask_of_node | 43 | #ifndef cpumask_of_node |
44 | #define cpumask_of_node(node) ((void)node, cpu_online_mask) | 44 | #define cpumask_of_node(node) ((void)node, cpu_online_mask) |
45 | #endif | 45 | #endif |
46 | #ifndef node_to_first_cpu | ||
47 | #define node_to_first_cpu(node) ((void)(node),0) | ||
48 | #endif | ||
49 | #ifndef pcibus_to_node | 46 | #ifndef pcibus_to_node |
50 | #define pcibus_to_node(bus) ((void)(bus), -1) | 47 | #define pcibus_to_node(bus) ((void)(bus), -1) |
51 | #endif | 48 | #endif |
52 | 49 | ||
53 | #ifndef pcibus_to_cpumask | ||
54 | #define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \ | ||
55 | CPU_MASK_ALL : \ | ||
56 | node_to_cpumask(pcibus_to_node(bus)) \ | ||
57 | ) | ||
58 | #endif | ||
59 | |||
60 | #ifndef cpumask_of_pcibus | 50 | #ifndef cpumask_of_pcibus |
61 | #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ | 51 | #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ |
62 | cpu_all_mask : \ | 52 | cpu_all_mask : \ |
diff --git a/include/asm-mn10300/highmem.h b/include/asm-mn10300/highmem.h index 5256854c0453..90f2abb04bfd 100644 --- a/include/asm-mn10300/highmem.h +++ b/include/asm-mn10300/highmem.h | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/highmem.h> | ||
19 | #include <asm/kmap_types.h> | 20 | #include <asm/kmap_types.h> |
20 | #include <asm/pgtable.h> | 21 | #include <asm/pgtable.h> |
21 | 22 | ||
@@ -77,6 +78,7 @@ static inline unsigned long kmap_atomic(struct page *page, enum km_type type) | |||
77 | if (page < highmem_start_page) | 78 | if (page < highmem_start_page) |
78 | return page_address(page); | 79 | return page_address(page); |
79 | 80 | ||
81 | debug_kmap_atomic(type); | ||
80 | idx = type + KM_TYPE_NR * smp_processor_id(); | 82 | idx = type + KM_TYPE_NR * smp_processor_id(); |
81 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | 83 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); |
82 | #if HIGHMEM_DEBUG | 84 | #if HIGHMEM_DEBUG |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 78199151c00b..d047f846c3ed 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -257,6 +257,40 @@ void __init acpi_no_s4_hw_signature(void); | |||
257 | void __init acpi_old_suspend_ordering(void); | 257 | void __init acpi_old_suspend_ordering(void); |
258 | void __init acpi_s4_no_nvs(void); | 258 | void __init acpi_s4_no_nvs(void); |
259 | #endif /* CONFIG_PM_SLEEP */ | 259 | #endif /* CONFIG_PM_SLEEP */ |
260 | |||
261 | #define OSC_QUERY_TYPE 0 | ||
262 | #define OSC_SUPPORT_TYPE 1 | ||
263 | #define OSC_CONTROL_TYPE 2 | ||
264 | #define OSC_SUPPORT_MASKS 0x1f | ||
265 | |||
266 | /* _OSC DW0 Definition */ | ||
267 | #define OSC_QUERY_ENABLE 1 | ||
268 | #define OSC_REQUEST_ERROR 2 | ||
269 | #define OSC_INVALID_UUID_ERROR 4 | ||
270 | #define OSC_INVALID_REVISION_ERROR 8 | ||
271 | #define OSC_CAPABILITIES_MASK_ERROR 16 | ||
272 | |||
273 | /* _OSC DW1 Definition (OS Support Fields) */ | ||
274 | #define OSC_EXT_PCI_CONFIG_SUPPORT 1 | ||
275 | #define OSC_ACTIVE_STATE_PWR_SUPPORT 2 | ||
276 | #define OSC_CLOCK_PWR_CAPABILITY_SUPPORT 4 | ||
277 | #define OSC_PCI_SEGMENT_GROUPS_SUPPORT 8 | ||
278 | #define OSC_MSI_SUPPORT 16 | ||
279 | |||
280 | /* _OSC DW1 Definition (OS Control Fields) */ | ||
281 | #define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL 1 | ||
282 | #define OSC_SHPC_NATIVE_HP_CONTROL 2 | ||
283 | #define OSC_PCI_EXPRESS_PME_CONTROL 4 | ||
284 | #define OSC_PCI_EXPRESS_AER_CONTROL 8 | ||
285 | #define OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL 16 | ||
286 | |||
287 | #define OSC_CONTROL_MASKS (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | \ | ||
288 | OSC_SHPC_NATIVE_HP_CONTROL | \ | ||
289 | OSC_PCI_EXPRESS_PME_CONTROL | \ | ||
290 | OSC_PCI_EXPRESS_AER_CONTROL | \ | ||
291 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL) | ||
292 | |||
293 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 flags); | ||
260 | #else /* CONFIG_ACPI */ | 294 | #else /* CONFIG_ACPI */ |
261 | 295 | ||
262 | static inline int early_acpi_boot_init(void) | 296 | static inline int early_acpi_boot_init(void) |
diff --git a/include/linux/auto_dev-ioctl.h b/include/linux/auto_dev-ioctl.h index 91a773993a5c..850f39b33e74 100644 --- a/include/linux/auto_dev-ioctl.h +++ b/include/linux/auto_dev-ioctl.h | |||
@@ -10,8 +10,13 @@ | |||
10 | #ifndef _LINUX_AUTO_DEV_IOCTL_H | 10 | #ifndef _LINUX_AUTO_DEV_IOCTL_H |
11 | #define _LINUX_AUTO_DEV_IOCTL_H | 11 | #define _LINUX_AUTO_DEV_IOCTL_H |
12 | 12 | ||
13 | #include <linux/auto_fs.h> | ||
14 | |||
15 | #ifdef __KERNEL__ | ||
13 | #include <linux/string.h> | 16 | #include <linux/string.h> |
14 | #include <linux/types.h> | 17 | #else |
18 | #include <string.h> | ||
19 | #endif /* __KERNEL__ */ | ||
15 | 20 | ||
16 | #define AUTOFS_DEVICE_NAME "autofs" | 21 | #define AUTOFS_DEVICE_NAME "autofs" |
17 | 22 | ||
diff --git a/include/linux/auto_fs.h b/include/linux/auto_fs.h index c21e5972a3e8..63265852b7d1 100644 --- a/include/linux/auto_fs.h +++ b/include/linux/auto_fs.h | |||
@@ -17,11 +17,13 @@ | |||
17 | #ifdef __KERNEL__ | 17 | #ifdef __KERNEL__ |
18 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
19 | #include <linux/limits.h> | 19 | #include <linux/limits.h> |
20 | #include <linux/types.h> | ||
21 | #include <linux/ioctl.h> | ||
22 | #else | ||
20 | #include <asm/types.h> | 23 | #include <asm/types.h> |
24 | #include <sys/ioctl.h> | ||
21 | #endif /* __KERNEL__ */ | 25 | #endif /* __KERNEL__ */ |
22 | 26 | ||
23 | #include <linux/ioctl.h> | ||
24 | |||
25 | /* This file describes autofs v3 */ | 27 | /* This file describes autofs v3 */ |
26 | #define AUTOFS_PROTO_VERSION 3 | 28 | #define AUTOFS_PROTO_VERSION 3 |
27 | 29 | ||
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 455d83219fae..bc3ab7073695 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -146,10 +146,10 @@ extern void *alloc_large_system_hash(const char *tablename, | |||
146 | 146 | ||
147 | #define HASH_EARLY 0x00000001 /* Allocating during early boot? */ | 147 | #define HASH_EARLY 0x00000001 /* Allocating during early boot? */ |
148 | 148 | ||
149 | /* Only NUMA needs hash distribution. | 149 | /* Only NUMA needs hash distribution. 64bit NUMA architectures have |
150 | * IA64 and x86_64 have sufficient vmalloc space. | 150 | * sufficient vmalloc space. |
151 | */ | 151 | */ |
152 | #if defined(CONFIG_NUMA) && (defined(CONFIG_IA64) || defined(CONFIG_X86_64)) | 152 | #if defined(CONFIG_NUMA) && defined(CONFIG_64BIT) |
153 | #define HASHDIST_DEFAULT 1 | 153 | #define HASHDIST_DEFAULT 1 |
154 | #else | 154 | #else |
155 | #define HASHDIST_DEFAULT 0 | 155 | #define HASHDIST_DEFAULT 0 |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index f19fd9045ea0..3d7bcde2e332 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -216,7 +216,7 @@ int cont_write_begin(struct file *, struct address_space *, loff_t, | |||
216 | get_block_t *, loff_t *); | 216 | get_block_t *, loff_t *); |
217 | int generic_cont_expand_simple(struct inode *inode, loff_t size); | 217 | int generic_cont_expand_simple(struct inode *inode, loff_t size); |
218 | int block_commit_write(struct page *page, unsigned from, unsigned to); | 218 | int block_commit_write(struct page *page, unsigned from, unsigned to); |
219 | int block_page_mkwrite(struct vm_area_struct *vma, struct page *page, | 219 | int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, |
220 | get_block_t get_block); | 220 | get_block_t get_block); |
221 | void block_sync_page(struct page *); | 221 | void block_sync_page(struct page *); |
222 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); | 222 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 90c6074a36ca..2e0d79678deb 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -90,12 +90,12 @@ static inline void cpuset_init_smp(void) {} | |||
90 | static inline void cpuset_cpus_allowed(struct task_struct *p, | 90 | static inline void cpuset_cpus_allowed(struct task_struct *p, |
91 | struct cpumask *mask) | 91 | struct cpumask *mask) |
92 | { | 92 | { |
93 | *mask = cpu_possible_map; | 93 | cpumask_copy(mask, cpu_possible_mask); |
94 | } | 94 | } |
95 | static inline void cpuset_cpus_allowed_locked(struct task_struct *p, | 95 | static inline void cpuset_cpus_allowed_locked(struct task_struct *p, |
96 | struct cpumask *mask) | 96 | struct cpumask *mask) |
97 | { | 97 | { |
98 | *mask = cpu_possible_map; | 98 | cpumask_copy(mask, cpu_possible_mask); |
99 | } | 99 | } |
100 | 100 | ||
101 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) | 101 | static inline nodemask_t cpuset_mems_allowed(struct task_struct *p) |
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index d741b9ceb0e0..bb5489c82c99 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -47,7 +47,8 @@ extern int dmi_get_year(int field); | |||
47 | extern int dmi_name_in_vendors(const char *str); | 47 | extern int dmi_name_in_vendors(const char *str); |
48 | extern int dmi_name_in_serial(const char *str); | 48 | extern int dmi_name_in_serial(const char *str); |
49 | extern int dmi_available; | 49 | extern int dmi_available; |
50 | extern int dmi_walk(void (*decode)(const struct dmi_header *)); | 50 | extern int dmi_walk(void (*decode)(const struct dmi_header *, void *), |
51 | void *private_data); | ||
51 | extern bool dmi_match(enum dmi_field f, const char *str); | 52 | extern bool dmi_match(enum dmi_field f, const char *str); |
52 | 53 | ||
53 | #else | 54 | #else |
@@ -61,8 +62,8 @@ static inline int dmi_get_year(int year) { return 0; } | |||
61 | static inline int dmi_name_in_vendors(const char *s) { return 0; } | 62 | static inline int dmi_name_in_vendors(const char *s) { return 0; } |
62 | static inline int dmi_name_in_serial(const char *s) { return 0; } | 63 | static inline int dmi_name_in_serial(const char *s) { return 0; } |
63 | #define dmi_available 0 | 64 | #define dmi_available 0 |
64 | static inline int dmi_walk(void (*decode)(const struct dmi_header *)) | 65 | static inline int dmi_walk(void (*decode)(const struct dmi_header *, void *), |
65 | { return -1; } | 66 | void *private_data) { return -1; } |
66 | static inline bool dmi_match(enum dmi_field f, const char *str) | 67 | static inline bool dmi_match(enum dmi_field f, const char *str) |
67 | { return false; } | 68 | { return false; } |
68 | static inline const struct dmi_system_id * | 69 | static inline const struct dmi_system_id * |
diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h index a667637b54e3..f45a8ae5f828 100644 --- a/include/linux/eventfd.h +++ b/include/linux/eventfd.h | |||
@@ -13,10 +13,20 @@ | |||
13 | /* For O_CLOEXEC and O_NONBLOCK */ | 13 | /* For O_CLOEXEC and O_NONBLOCK */ |
14 | #include <linux/fcntl.h> | 14 | #include <linux/fcntl.h> |
15 | 15 | ||
16 | /* Flags for eventfd2. */ | 16 | /* |
17 | * CAREFUL: Check include/asm-generic/fcntl.h when defining | ||
18 | * new flags, since they might collide with O_* ones. We want | ||
19 | * to re-use O_* flags that couldn't possibly have a meaning | ||
20 | * from eventfd, in order to leave a free define-space for | ||
21 | * shared O_* flags. | ||
22 | */ | ||
23 | #define EFD_SEMAPHORE (1 << 0) | ||
17 | #define EFD_CLOEXEC O_CLOEXEC | 24 | #define EFD_CLOEXEC O_CLOEXEC |
18 | #define EFD_NONBLOCK O_NONBLOCK | 25 | #define EFD_NONBLOCK O_NONBLOCK |
19 | 26 | ||
27 | #define EFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK) | ||
28 | #define EFD_FLAGS_SET (EFD_SHARED_FCNTL_FLAGS | EFD_SEMAPHORE) | ||
29 | |||
20 | struct file *eventfd_fget(int fd); | 30 | struct file *eventfd_fget(int fd); |
21 | int eventfd_signal(struct file *file, int n); | 31 | int eventfd_signal(struct file *file, int n); |
22 | 32 | ||
diff --git a/include/linux/fb.h b/include/linux/fb.h index 31527e17076b..f563c5013932 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -123,6 +123,7 @@ struct dentry; | |||
123 | #define FB_ACCEL_TRIDENT_3DIMAGE 51 /* Trident 3DImage */ | 123 | #define FB_ACCEL_TRIDENT_3DIMAGE 51 /* Trident 3DImage */ |
124 | #define FB_ACCEL_TRIDENT_BLADE3D 52 /* Trident Blade3D */ | 124 | #define FB_ACCEL_TRIDENT_BLADE3D 52 /* Trident Blade3D */ |
125 | #define FB_ACCEL_TRIDENT_BLADEXP 53 /* Trident BladeXP */ | 125 | #define FB_ACCEL_TRIDENT_BLADEXP 53 /* Trident BladeXP */ |
126 | #define FB_ACCEL_CIRRUS_ALPINE 53 /* Cirrus Logic 543x/544x/5480 */ | ||
126 | #define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ | 127 | #define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ |
127 | #define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ | 128 | #define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ |
128 | #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ | 129 | #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ |
@@ -960,15 +961,7 @@ extern struct fb_info *registered_fb[FB_MAX]; | |||
960 | extern int num_registered_fb; | 961 | extern int num_registered_fb; |
961 | extern struct class *fb_class; | 962 | extern struct class *fb_class; |
962 | 963 | ||
963 | static inline int lock_fb_info(struct fb_info *info) | 964 | extern int lock_fb_info(struct fb_info *info); |
964 | { | ||
965 | mutex_lock(&info->lock); | ||
966 | if (!info->fbops) { | ||
967 | mutex_unlock(&info->lock); | ||
968 | return 0; | ||
969 | } | ||
970 | return 1; | ||
971 | } | ||
972 | 965 | ||
973 | static inline void unlock_fb_info(struct fb_info *info) | 966 | static inline void unlock_fb_info(struct fb_info *info) |
974 | { | 967 | { |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 87e7bfc5ebd7..61211ad823fe 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1878,6 +1878,7 @@ extern struct block_device *open_by_devnum(dev_t, fmode_t); | |||
1878 | extern void invalidate_bdev(struct block_device *); | 1878 | extern void invalidate_bdev(struct block_device *); |
1879 | extern int sync_blockdev(struct block_device *bdev); | 1879 | extern int sync_blockdev(struct block_device *bdev); |
1880 | extern struct super_block *freeze_bdev(struct block_device *); | 1880 | extern struct super_block *freeze_bdev(struct block_device *); |
1881 | extern void emergency_thaw_all(void); | ||
1881 | extern int thaw_bdev(struct block_device *bdev, struct super_block *sb); | 1882 | extern int thaw_bdev(struct block_device *bdev, struct super_block *sb); |
1882 | extern int fsync_bdev(struct block_device *); | 1883 | extern int fsync_bdev(struct block_device *); |
1883 | extern int fsync_super(struct super_block *); | 1884 | extern int fsync_super(struct super_block *); |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index d9051d717d27..7ef1caf50269 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
@@ -95,14 +95,15 @@ struct fsl_usb2_platform_data { | |||
95 | #define FSL_USB2_PORT0_ENABLED 0x00000001 | 95 | #define FSL_USB2_PORT0_ENABLED 0x00000001 |
96 | #define FSL_USB2_PORT1_ENABLED 0x00000002 | 96 | #define FSL_USB2_PORT1_ENABLED 0x00000002 |
97 | 97 | ||
98 | struct spi_device; | ||
99 | |||
98 | struct fsl_spi_platform_data { | 100 | struct fsl_spi_platform_data { |
99 | u32 initial_spmode; /* initial SPMODE value */ | 101 | u32 initial_spmode; /* initial SPMODE value */ |
100 | u16 bus_num; | 102 | s16 bus_num; |
101 | bool qe_mode; | 103 | bool qe_mode; |
102 | /* board specific information */ | 104 | /* board specific information */ |
103 | u16 max_chipselect; | 105 | u16 max_chipselect; |
104 | void (*activate_cs)(u8 cs, u8 polarity); | 106 | void (*cs_control)(struct spi_device *spi, bool on); |
105 | void (*deactivate_cs)(u8 cs, u8 polarity); | ||
106 | u32 sysclk; | 107 | u32 sysclk; |
107 | }; | 108 | }; |
108 | 109 | ||
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 13875ce9112a..7ff5c55f9b55 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
@@ -187,4 +187,16 @@ static inline void copy_highpage(struct page *to, struct page *from) | |||
187 | kunmap_atomic(vto, KM_USER1); | 187 | kunmap_atomic(vto, KM_USER1); |
188 | } | 188 | } |
189 | 189 | ||
190 | #if defined(CONFIG_DEBUG_HIGHMEM) && defined(CONFIG_TRACE_IRQFLAGS_SUPPORT) | ||
191 | |||
192 | void debug_kmap_atomic(enum km_type type); | ||
193 | |||
194 | #else | ||
195 | |||
196 | static inline void debug_kmap_atomic(enum km_type type) | ||
197 | { | ||
198 | } | ||
199 | |||
200 | #endif | ||
201 | |||
190 | #endif /* _LINUX_HIGHMEM_H */ | 202 | #endif /* _LINUX_HIGHMEM_H */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index d5d832271f44..a5d26f66ef78 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -265,7 +265,7 @@ enum { | |||
265 | IDE_TFLAG_WRITE = (1 << 12), | 265 | IDE_TFLAG_WRITE = (1 << 12), |
266 | IDE_TFLAG_CUSTOM_HANDLER = (1 << 13), | 266 | IDE_TFLAG_CUSTOM_HANDLER = (1 << 13), |
267 | IDE_TFLAG_DMA_PIO_FALLBACK = (1 << 14), | 267 | IDE_TFLAG_DMA_PIO_FALLBACK = (1 << 14), |
268 | IDE_TFLAG_IN_HOB_FEATURE = (1 << 15), | 268 | IDE_TFLAG_IN_HOB_ERROR = (1 << 15), |
269 | IDE_TFLAG_IN_HOB_NSECT = (1 << 16), | 269 | IDE_TFLAG_IN_HOB_NSECT = (1 << 16), |
270 | IDE_TFLAG_IN_HOB_LBAL = (1 << 17), | 270 | IDE_TFLAG_IN_HOB_LBAL = (1 << 17), |
271 | IDE_TFLAG_IN_HOB_LBAM = (1 << 18), | 271 | IDE_TFLAG_IN_HOB_LBAM = (1 << 18), |
@@ -273,10 +273,10 @@ enum { | |||
273 | IDE_TFLAG_IN_HOB_LBA = IDE_TFLAG_IN_HOB_LBAL | | 273 | IDE_TFLAG_IN_HOB_LBA = IDE_TFLAG_IN_HOB_LBAL | |
274 | IDE_TFLAG_IN_HOB_LBAM | | 274 | IDE_TFLAG_IN_HOB_LBAM | |
275 | IDE_TFLAG_IN_HOB_LBAH, | 275 | IDE_TFLAG_IN_HOB_LBAH, |
276 | IDE_TFLAG_IN_HOB = IDE_TFLAG_IN_HOB_FEATURE | | 276 | IDE_TFLAG_IN_HOB = IDE_TFLAG_IN_HOB_ERROR | |
277 | IDE_TFLAG_IN_HOB_NSECT | | 277 | IDE_TFLAG_IN_HOB_NSECT | |
278 | IDE_TFLAG_IN_HOB_LBA, | 278 | IDE_TFLAG_IN_HOB_LBA, |
279 | IDE_TFLAG_IN_FEATURE = (1 << 20), | 279 | IDE_TFLAG_IN_ERROR = (1 << 20), |
280 | IDE_TFLAG_IN_NSECT = (1 << 21), | 280 | IDE_TFLAG_IN_NSECT = (1 << 21), |
281 | IDE_TFLAG_IN_LBAL = (1 << 22), | 281 | IDE_TFLAG_IN_LBAL = (1 << 22), |
282 | IDE_TFLAG_IN_LBAM = (1 << 23), | 282 | IDE_TFLAG_IN_LBAM = (1 << 23), |
@@ -310,8 +310,12 @@ enum { | |||
310 | 310 | ||
311 | struct ide_taskfile { | 311 | struct ide_taskfile { |
312 | u8 hob_data; /* 0: high data byte (for TASKFILE IOCTL) */ | 312 | u8 hob_data; /* 0: high data byte (for TASKFILE IOCTL) */ |
313 | /* 1-5: additional data to support LBA48 */ | ||
314 | union { | ||
315 | u8 hob_error; /* read: error */ | ||
316 | u8 hob_feature; /* write: feature */ | ||
317 | }; | ||
313 | 318 | ||
314 | u8 hob_feature; /* 1-5: additional data to support LBA48 */ | ||
315 | u8 hob_nsect; | 319 | u8 hob_nsect; |
316 | u8 hob_lbal; | 320 | u8 hob_lbal; |
317 | u8 hob_lbam; | 321 | u8 hob_lbam; |
@@ -352,6 +356,8 @@ struct ide_cmd { | |||
352 | 356 | ||
353 | unsigned int nbytes; | 357 | unsigned int nbytes; |
354 | unsigned int nleft; | 358 | unsigned int nleft; |
359 | unsigned int last_xfer_len; | ||
360 | |||
355 | struct scatterlist *cursg; | 361 | struct scatterlist *cursg; |
356 | unsigned int cursg_ofs; | 362 | unsigned int cursg_ofs; |
357 | 363 | ||
@@ -375,7 +381,7 @@ enum { | |||
375 | * With each packet command, we allocate a buffer of IDE_PC_BUFFER_SIZE bytes. | 381 | * With each packet command, we allocate a buffer of IDE_PC_BUFFER_SIZE bytes. |
376 | * This is used for several packet commands (not for READ/WRITE commands). | 382 | * This is used for several packet commands (not for READ/WRITE commands). |
377 | */ | 383 | */ |
378 | #define IDE_PC_BUFFER_SIZE 256 | 384 | #define IDE_PC_BUFFER_SIZE 64 |
379 | #define ATAPI_WAIT_PC (60 * HZ) | 385 | #define ATAPI_WAIT_PC (60 * HZ) |
380 | 386 | ||
381 | struct ide_atapi_pc { | 387 | struct ide_atapi_pc { |
@@ -413,9 +419,6 @@ struct ide_atapi_pc { | |||
413 | struct idetape_bh *bh; | 419 | struct idetape_bh *bh; |
414 | char *b_data; | 420 | char *b_data; |
415 | 421 | ||
416 | struct scatterlist *sg; | ||
417 | unsigned int sg_cnt; | ||
418 | |||
419 | unsigned long timeout; | 422 | unsigned long timeout; |
420 | }; | 423 | }; |
421 | 424 | ||
@@ -456,11 +459,6 @@ enum { | |||
456 | IDE_AFLAG_TOCADDR_AS_BCD = (1 << 3), | 459 | IDE_AFLAG_TOCADDR_AS_BCD = (1 << 3), |
457 | /* TOC track numbers are in BCD. */ | 460 | /* TOC track numbers are in BCD. */ |
458 | IDE_AFLAG_TOCTRACKS_AS_BCD = (1 << 4), | 461 | IDE_AFLAG_TOCTRACKS_AS_BCD = (1 << 4), |
459 | /* | ||
460 | * Drive does not provide data in multiples of SECTOR_SIZE | ||
461 | * when more than one interrupt is needed. | ||
462 | */ | ||
463 | IDE_AFLAG_LIMIT_NFRAMES = (1 << 5), | ||
464 | /* Saved TOC information is current. */ | 462 | /* Saved TOC information is current. */ |
465 | IDE_AFLAG_TOC_VALID = (1 << 6), | 463 | IDE_AFLAG_TOC_VALID = (1 << 6), |
466 | /* We think that the drive door is locked. */ | 464 | /* We think that the drive door is locked. */ |
@@ -605,7 +603,7 @@ struct ide_drive_s { | |||
605 | 603 | ||
606 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ | 604 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ |
607 | unsigned int cyl; /* "real" number of cyls */ | 605 | unsigned int cyl; /* "real" number of cyls */ |
608 | unsigned int drive_data; /* used by set_pio_mode/selectproc */ | 606 | unsigned int drive_data; /* used by set_pio_mode/dev_select() */ |
609 | unsigned int failures; /* current failure count */ | 607 | unsigned int failures; /* current failure count */ |
610 | unsigned int max_failures; /* maximum allowed failure count */ | 608 | unsigned int max_failures; /* maximum allowed failure count */ |
611 | u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ | 609 | u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ |
@@ -661,9 +659,9 @@ struct ide_tp_ops { | |||
661 | void (*exec_command)(struct hwif_s *, u8); | 659 | void (*exec_command)(struct hwif_s *, u8); |
662 | u8 (*read_status)(struct hwif_s *); | 660 | u8 (*read_status)(struct hwif_s *); |
663 | u8 (*read_altstatus)(struct hwif_s *); | 661 | u8 (*read_altstatus)(struct hwif_s *); |
662 | void (*write_devctl)(struct hwif_s *, u8); | ||
664 | 663 | ||
665 | void (*set_irq)(struct hwif_s *, int); | 664 | void (*dev_select)(ide_drive_t *); |
666 | |||
667 | void (*tf_load)(ide_drive_t *, struct ide_cmd *); | 665 | void (*tf_load)(ide_drive_t *, struct ide_cmd *); |
668 | void (*tf_read)(ide_drive_t *, struct ide_cmd *); | 666 | void (*tf_read)(ide_drive_t *, struct ide_cmd *); |
669 | 667 | ||
@@ -681,7 +679,6 @@ extern const struct ide_tp_ops default_tp_ops; | |||
681 | * @init_dev: host specific initialization of a device | 679 | * @init_dev: host specific initialization of a device |
682 | * @set_pio_mode: routine to program host for PIO mode | 680 | * @set_pio_mode: routine to program host for PIO mode |
683 | * @set_dma_mode: routine to program host for DMA mode | 681 | * @set_dma_mode: routine to program host for DMA mode |
684 | * @selectproc: tweaks hardware to select drive | ||
685 | * @reset_poll: chipset polling based on hba specifics | 682 | * @reset_poll: chipset polling based on hba specifics |
686 | * @pre_reset: chipset specific changes to default for device-hba resets | 683 | * @pre_reset: chipset specific changes to default for device-hba resets |
687 | * @resetproc: routine to reset controller after a disk reset | 684 | * @resetproc: routine to reset controller after a disk reset |
@@ -698,7 +695,6 @@ struct ide_port_ops { | |||
698 | void (*init_dev)(ide_drive_t *); | 695 | void (*init_dev)(ide_drive_t *); |
699 | void (*set_pio_mode)(ide_drive_t *, const u8); | 696 | void (*set_pio_mode)(ide_drive_t *, const u8); |
700 | void (*set_dma_mode)(ide_drive_t *, const u8); | 697 | void (*set_dma_mode)(ide_drive_t *, const u8); |
701 | void (*selectproc)(ide_drive_t *); | ||
702 | int (*reset_poll)(ide_drive_t *); | 698 | int (*reset_poll)(ide_drive_t *); |
703 | void (*pre_reset)(ide_drive_t *); | 699 | void (*pre_reset)(ide_drive_t *); |
704 | void (*resetproc)(ide_drive_t *); | 700 | void (*resetproc)(ide_drive_t *); |
@@ -719,8 +715,10 @@ struct ide_dma_ops { | |||
719 | int (*dma_end)(struct ide_drive_s *); | 715 | int (*dma_end)(struct ide_drive_s *); |
720 | int (*dma_test_irq)(struct ide_drive_s *); | 716 | int (*dma_test_irq)(struct ide_drive_s *); |
721 | void (*dma_lost_irq)(struct ide_drive_s *); | 717 | void (*dma_lost_irq)(struct ide_drive_s *); |
718 | /* below ones are optional */ | ||
719 | int (*dma_check)(struct ide_drive_s *, struct ide_cmd *); | ||
722 | int (*dma_timer_expiry)(struct ide_drive_s *); | 720 | int (*dma_timer_expiry)(struct ide_drive_s *); |
723 | void (*dma_timeout)(struct ide_drive_s *); | 721 | void (*dma_clear)(struct ide_drive_s *); |
724 | /* | 722 | /* |
725 | * The following method is optional and only required to be | 723 | * The following method is optional and only required to be |
726 | * implemented for the SFF-8038i compatible controllers. | 724 | * implemented for the SFF-8038i compatible controllers. |
@@ -1169,18 +1167,15 @@ void ide_tf_dump(const char *, struct ide_taskfile *); | |||
1169 | void ide_exec_command(ide_hwif_t *, u8); | 1167 | void ide_exec_command(ide_hwif_t *, u8); |
1170 | u8 ide_read_status(ide_hwif_t *); | 1168 | u8 ide_read_status(ide_hwif_t *); |
1171 | u8 ide_read_altstatus(ide_hwif_t *); | 1169 | u8 ide_read_altstatus(ide_hwif_t *); |
1170 | void ide_write_devctl(ide_hwif_t *, u8); | ||
1172 | 1171 | ||
1173 | void ide_set_irq(ide_hwif_t *, int); | 1172 | void ide_dev_select(ide_drive_t *); |
1174 | |||
1175 | void ide_tf_load(ide_drive_t *, struct ide_cmd *); | 1173 | void ide_tf_load(ide_drive_t *, struct ide_cmd *); |
1176 | void ide_tf_read(ide_drive_t *, struct ide_cmd *); | 1174 | void ide_tf_read(ide_drive_t *, struct ide_cmd *); |
1177 | 1175 | ||
1178 | void ide_input_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int); | 1176 | void ide_input_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int); |
1179 | void ide_output_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int); | 1177 | void ide_output_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int); |
1180 | 1178 | ||
1181 | int ide_io_buffers(ide_drive_t *, struct ide_atapi_pc *, unsigned int, int); | ||
1182 | |||
1183 | extern void SELECT_DRIVE(ide_drive_t *); | ||
1184 | void SELECT_MASK(ide_drive_t *, int); | 1179 | void SELECT_MASK(ide_drive_t *, int); |
1185 | 1180 | ||
1186 | u8 ide_read_error(ide_drive_t *); | 1181 | u8 ide_read_error(ide_drive_t *); |
@@ -1226,6 +1221,8 @@ ide_startstop_t ide_issue_pc(ide_drive_t *, struct ide_cmd *); | |||
1226 | 1221 | ||
1227 | ide_startstop_t do_rw_taskfile(ide_drive_t *, struct ide_cmd *); | 1222 | ide_startstop_t do_rw_taskfile(ide_drive_t *, struct ide_cmd *); |
1228 | 1223 | ||
1224 | void ide_pio_bytes(ide_drive_t *, struct ide_cmd *, unsigned int, unsigned int); | ||
1225 | |||
1229 | void ide_finish_cmd(ide_drive_t *, struct ide_cmd *, u8); | 1226 | void ide_finish_cmd(ide_drive_t *, struct ide_cmd *, u8); |
1230 | 1227 | ||
1231 | int ide_raw_taskfile(ide_drive_t *, struct ide_cmd *, u8 *, u16); | 1228 | int ide_raw_taskfile(ide_drive_t *, struct ide_cmd *, u8 *, u16); |
@@ -1443,8 +1440,8 @@ ide_startstop_t ide_dma_intr(ide_drive_t *); | |||
1443 | int ide_allocate_dma_engine(ide_hwif_t *); | 1440 | int ide_allocate_dma_engine(ide_hwif_t *); |
1444 | void ide_release_dma_engine(ide_hwif_t *); | 1441 | void ide_release_dma_engine(ide_hwif_t *); |
1445 | 1442 | ||
1446 | int ide_build_sglist(ide_drive_t *, struct ide_cmd *); | 1443 | int ide_dma_prepare(ide_drive_t *, struct ide_cmd *); |
1447 | void ide_destroy_dmatable(ide_drive_t *); | 1444 | void ide_dma_unmap_sg(ide_drive_t *, struct ide_cmd *); |
1448 | 1445 | ||
1449 | #ifdef CONFIG_BLK_DEV_IDEDMA_SFF | 1446 | #ifdef CONFIG_BLK_DEV_IDEDMA_SFF |
1450 | int config_drive_for_dma(ide_drive_t *); | 1447 | int config_drive_for_dma(ide_drive_t *); |
@@ -1462,7 +1459,6 @@ static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; } | |||
1462 | #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */ | 1459 | #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */ |
1463 | 1460 | ||
1464 | void ide_dma_lost_irq(ide_drive_t *); | 1461 | void ide_dma_lost_irq(ide_drive_t *); |
1465 | void ide_dma_timeout(ide_drive_t *); | ||
1466 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); | 1462 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); |
1467 | 1463 | ||
1468 | #else | 1464 | #else |
@@ -1478,8 +1474,10 @@ static inline void ide_check_dma_crc(ide_drive_t *drive) { ; } | |||
1478 | static inline ide_startstop_t ide_dma_intr(ide_drive_t *drive) { return ide_stopped; } | 1474 | static inline ide_startstop_t ide_dma_intr(ide_drive_t *drive) { return ide_stopped; } |
1479 | static inline ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) { return ide_stopped; } | 1475 | static inline ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) { return ide_stopped; } |
1480 | static inline void ide_release_dma_engine(ide_hwif_t *hwif) { ; } | 1476 | static inline void ide_release_dma_engine(ide_hwif_t *hwif) { ; } |
1481 | static inline int ide_build_sglist(ide_drive_t *drive, | 1477 | static inline int ide_dma_prepare(ide_drive_t *drive, |
1482 | struct ide_cmd *cmd) { return 0; } | 1478 | struct ide_cmd *cmd) { return 1; } |
1479 | static inline void ide_dma_unmap_sg(ide_drive_t *drive, | ||
1480 | struct ide_cmd *cmd) { ; } | ||
1483 | #endif /* CONFIG_BLK_DEV_IDEDMA */ | 1481 | #endif /* CONFIG_BLK_DEV_IDEDMA */ |
1484 | 1482 | ||
1485 | #ifdef CONFIG_BLK_DEV_IDEACPI | 1483 | #ifdef CONFIG_BLK_DEV_IDEACPI |
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 62b73668b602..f7c9c75a2775 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h | |||
@@ -230,6 +230,6 @@ static inline void ipmi_free_smi_msg(struct ipmi_smi_msg *msg) | |||
230 | automatically be dstroyed when the interface is destroyed. */ | 230 | automatically be dstroyed when the interface is destroyed. */ |
231 | int ipmi_smi_add_proc_entry(ipmi_smi_t smi, char *name, | 231 | int ipmi_smi_add_proc_entry(ipmi_smi_t smi, char *name, |
232 | read_proc_t *read_proc, | 232 | read_proc_t *read_proc, |
233 | void *data, struct module *owner); | 233 | void *data); |
234 | 234 | ||
235 | #endif /* __LINUX_IPMI_SMI_H */ | 235 | #endif /* __LINUX_IPMI_SMI_H */ |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 4d248b3f1323..8815a3456b3b 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -649,6 +649,12 @@ struct transaction_s | |||
649 | int t_handle_count; | 649 | int t_handle_count; |
650 | 650 | ||
651 | /* | 651 | /* |
652 | * This transaction is being forced and some process is | ||
653 | * waiting for it to finish. | ||
654 | */ | ||
655 | int t_synchronous_commit:1; | ||
656 | |||
657 | /* | ||
652 | * For use by the filesystem to store fs-specific data | 658 | * For use by the filesystem to store fs-specific data |
653 | * structures associated with the transaction | 659 | * structures associated with the transaction |
654 | */ | 660 | */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 914918abfdd1..e720b0da7751 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -353,6 +353,8 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
353 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | 353 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) |
354 | #define pr_info(fmt, ...) \ | 354 | #define pr_info(fmt, ...) \ |
355 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | 355 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) |
356 | #define pr_cont(fmt, ...) \ | ||
357 | printk(KERN_CONT fmt, ##__VA_ARGS__) | ||
356 | 358 | ||
357 | /* If you are writing a driver, please use dev_dbg instead */ | 359 | /* If you are writing a driver, please use dev_dbg instead */ |
358 | #if defined(DEBUG) | 360 | #if defined(DEBUG) |
@@ -379,18 +381,6 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
379 | ((unsigned char *)&addr)[3] | 381 | ((unsigned char *)&addr)[3] |
380 | #define NIPQUAD_FMT "%u.%u.%u.%u" | 382 | #define NIPQUAD_FMT "%u.%u.%u.%u" |
381 | 383 | ||
382 | #if defined(__LITTLE_ENDIAN) | ||
383 | #define HIPQUAD(addr) \ | ||
384 | ((unsigned char *)&addr)[3], \ | ||
385 | ((unsigned char *)&addr)[2], \ | ||
386 | ((unsigned char *)&addr)[1], \ | ||
387 | ((unsigned char *)&addr)[0] | ||
388 | #elif defined(__BIG_ENDIAN) | ||
389 | #define HIPQUAD NIPQUAD | ||
390 | #else | ||
391 | #error "Please fix asm/byteorder.h" | ||
392 | #endif /* __LITTLE_ENDIAN */ | ||
393 | |||
394 | /* | 384 | /* |
395 | * min()/max()/clamp() macros that also do | 385 | * min()/max()/clamp() macros that also do |
396 | * strict type-checking.. See the | 386 | * strict type-checking.. See the |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 23bf02fb124f..5a58ea3e91e9 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -20,43 +20,10 @@ struct lockdep_map; | |||
20 | #include <linux/stacktrace.h> | 20 | #include <linux/stacktrace.h> |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * Lock-class usage-state bits: | 23 | * We'd rather not expose kernel/lockdep_states.h this wide, but we do need |
24 | * the total number of states... :-( | ||
24 | */ | 25 | */ |
25 | enum lock_usage_bit | 26 | #define XXX_LOCK_USAGE_STATES (1+3*4) |
26 | { | ||
27 | LOCK_USED = 0, | ||
28 | LOCK_USED_IN_HARDIRQ, | ||
29 | LOCK_USED_IN_SOFTIRQ, | ||
30 | LOCK_ENABLED_SOFTIRQS, | ||
31 | LOCK_ENABLED_HARDIRQS, | ||
32 | LOCK_USED_IN_HARDIRQ_READ, | ||
33 | LOCK_USED_IN_SOFTIRQ_READ, | ||
34 | LOCK_ENABLED_SOFTIRQS_READ, | ||
35 | LOCK_ENABLED_HARDIRQS_READ, | ||
36 | LOCK_USAGE_STATES | ||
37 | }; | ||
38 | |||
39 | /* | ||
40 | * Usage-state bitmasks: | ||
41 | */ | ||
42 | #define LOCKF_USED (1 << LOCK_USED) | ||
43 | #define LOCKF_USED_IN_HARDIRQ (1 << LOCK_USED_IN_HARDIRQ) | ||
44 | #define LOCKF_USED_IN_SOFTIRQ (1 << LOCK_USED_IN_SOFTIRQ) | ||
45 | #define LOCKF_ENABLED_HARDIRQS (1 << LOCK_ENABLED_HARDIRQS) | ||
46 | #define LOCKF_ENABLED_SOFTIRQS (1 << LOCK_ENABLED_SOFTIRQS) | ||
47 | |||
48 | #define LOCKF_ENABLED_IRQS (LOCKF_ENABLED_HARDIRQS | LOCKF_ENABLED_SOFTIRQS) | ||
49 | #define LOCKF_USED_IN_IRQ (LOCKF_USED_IN_HARDIRQ | LOCKF_USED_IN_SOFTIRQ) | ||
50 | |||
51 | #define LOCKF_USED_IN_HARDIRQ_READ (1 << LOCK_USED_IN_HARDIRQ_READ) | ||
52 | #define LOCKF_USED_IN_SOFTIRQ_READ (1 << LOCK_USED_IN_SOFTIRQ_READ) | ||
53 | #define LOCKF_ENABLED_HARDIRQS_READ (1 << LOCK_ENABLED_HARDIRQS_READ) | ||
54 | #define LOCKF_ENABLED_SOFTIRQS_READ (1 << LOCK_ENABLED_SOFTIRQS_READ) | ||
55 | |||
56 | #define LOCKF_ENABLED_IRQS_READ \ | ||
57 | (LOCKF_ENABLED_HARDIRQS_READ | LOCKF_ENABLED_SOFTIRQS_READ) | ||
58 | #define LOCKF_USED_IN_IRQ_READ \ | ||
59 | (LOCKF_USED_IN_HARDIRQ_READ | LOCKF_USED_IN_SOFTIRQ_READ) | ||
60 | 27 | ||
61 | #define MAX_LOCKDEP_SUBCLASSES 8UL | 28 | #define MAX_LOCKDEP_SUBCLASSES 8UL |
62 | 29 | ||
@@ -97,7 +64,7 @@ struct lock_class { | |||
97 | * IRQ/softirq usage tracking bits: | 64 | * IRQ/softirq usage tracking bits: |
98 | */ | 65 | */ |
99 | unsigned long usage_mask; | 66 | unsigned long usage_mask; |
100 | struct stack_trace usage_traces[LOCK_USAGE_STATES]; | 67 | struct stack_trace usage_traces[XXX_LOCK_USAGE_STATES]; |
101 | 68 | ||
102 | /* | 69 | /* |
103 | * These fields represent a directed graph of lock dependencies, | 70 | * These fields represent a directed graph of lock dependencies, |
@@ -324,7 +291,11 @@ static inline void lock_set_subclass(struct lockdep_map *lock, | |||
324 | lock_set_class(lock, lock->name, lock->key, subclass, ip); | 291 | lock_set_class(lock, lock->name, lock->key, subclass, ip); |
325 | } | 292 | } |
326 | 293 | ||
327 | # define INIT_LOCKDEP .lockdep_recursion = 0, | 294 | extern void lockdep_set_current_reclaim_state(gfp_t gfp_mask); |
295 | extern void lockdep_clear_current_reclaim_state(void); | ||
296 | extern void lockdep_trace_alloc(gfp_t mask); | ||
297 | |||
298 | # define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, | ||
328 | 299 | ||
329 | #define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) | 300 | #define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) |
330 | 301 | ||
@@ -342,6 +313,9 @@ static inline void lockdep_on(void) | |||
342 | # define lock_release(l, n, i) do { } while (0) | 313 | # define lock_release(l, n, i) do { } while (0) |
343 | # define lock_set_class(l, n, k, s, i) do { } while (0) | 314 | # define lock_set_class(l, n, k, s, i) do { } while (0) |
344 | # define lock_set_subclass(l, s, i) do { } while (0) | 315 | # define lock_set_subclass(l, s, i) do { } while (0) |
316 | # define lockdep_set_current_reclaim_state(g) do { } while (0) | ||
317 | # define lockdep_clear_current_reclaim_state() do { } while (0) | ||
318 | # define lockdep_trace_alloc(g) do { } while (0) | ||
345 | # define lockdep_init() do { } while (0) | 319 | # define lockdep_init() do { } while (0) |
346 | # define lockdep_info() do { } while (0) | 320 | # define lockdep_info() do { } while (0) |
347 | # define lockdep_init_map(lock, name, key, sub) \ | 321 | # define lockdep_init_map(lock, name, key, sub) \ |
diff --git a/include/linux/loop.h b/include/linux/loop.h index 6ffd6db5bb0d..40725447f5e0 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h | |||
@@ -160,5 +160,6 @@ int loop_unregister_transfer(int number); | |||
160 | #define LOOP_SET_STATUS64 0x4C04 | 160 | #define LOOP_SET_STATUS64 0x4C04 |
161 | #define LOOP_GET_STATUS64 0x4C05 | 161 | #define LOOP_GET_STATUS64 0x4C05 |
162 | #define LOOP_CHANGE_FD 0x4C06 | 162 | #define LOOP_CHANGE_FD 0x4C06 |
163 | #define LOOP_SET_CAPACITY 0x4C07 | ||
163 | 164 | ||
164 | #endif | 165 | #endif |
diff --git a/include/linux/mm.h b/include/linux/mm.h index b1ea37fc7a24..aeabe953ba4f 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -135,6 +135,7 @@ extern pgprot_t protection_map[16]; | |||
135 | 135 | ||
136 | #define FAULT_FLAG_WRITE 0x01 /* Fault was a write access */ | 136 | #define FAULT_FLAG_WRITE 0x01 /* Fault was a write access */ |
137 | #define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ | 137 | #define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ |
138 | #define FAULT_FLAG_MKWRITE 0x04 /* Fault was mkwrite of existing pte */ | ||
138 | 139 | ||
139 | /* | 140 | /* |
140 | * This interface is used by x86 PAT code to identify a pfn mapping that is | 141 | * This interface is used by x86 PAT code to identify a pfn mapping that is |
@@ -187,7 +188,7 @@ struct vm_operations_struct { | |||
187 | 188 | ||
188 | /* notification that a previously read-only page is about to become | 189 | /* notification that a previously read-only page is about to become |
189 | * writable, if an error is returned it will cause a SIGBUS */ | 190 | * writable, if an error is returned it will cause a SIGBUS */ |
190 | int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page); | 191 | int (*page_mkwrite)(struct vm_area_struct *vma, struct vm_fault *vmf); |
191 | 192 | ||
192 | /* called by access_process_vm when get_user_pages() fails, typically | 193 | /* called by access_process_vm when get_user_pages() fails, typically |
193 | * for use by special VMAs that can switch between memory and hardware | 194 | * for use by special VMAs that can switch between memory and hardware |
@@ -834,6 +835,7 @@ int __set_page_dirty_nobuffers(struct page *page); | |||
834 | int __set_page_dirty_no_writeback(struct page *page); | 835 | int __set_page_dirty_no_writeback(struct page *page); |
835 | int redirty_page_for_writepage(struct writeback_control *wbc, | 836 | int redirty_page_for_writepage(struct writeback_control *wbc, |
836 | struct page *page); | 837 | struct page *page); |
838 | void account_page_dirtied(struct page *page, struct address_space *mapping); | ||
837 | int set_page_dirty(struct page *page); | 839 | int set_page_dirty(struct page *page); |
838 | int set_page_dirty_lock(struct page *page); | 840 | int set_page_dirty_lock(struct page *page); |
839 | int clear_page_dirty_for_io(struct page *page); | 841 | int clear_page_dirty_for_io(struct page *page); |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index d84feb7bdbf0..ddadb4defe00 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/rwsem.h> | 11 | #include <linux/rwsem.h> |
12 | #include <linux/completion.h> | 12 | #include <linux/completion.h> |
13 | #include <linux/cpumask.h> | 13 | #include <linux/cpumask.h> |
14 | #include <linux/page-debug-flags.h> | ||
14 | #include <asm/page.h> | 15 | #include <asm/page.h> |
15 | #include <asm/mmu.h> | 16 | #include <asm/mmu.h> |
16 | 17 | ||
@@ -174,6 +175,9 @@ struct vm_area_struct { | |||
174 | #ifdef CONFIG_NUMA | 175 | #ifdef CONFIG_NUMA |
175 | struct mempolicy *vm_policy; /* NUMA policy for the VMA */ | 176 | struct mempolicy *vm_policy; /* NUMA policy for the VMA */ |
176 | #endif | 177 | #endif |
178 | #ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS | ||
179 | unsigned long debug_flags; /* Use atomic bitops on this */ | ||
180 | #endif | ||
177 | }; | 181 | }; |
178 | 182 | ||
179 | struct core_thread { | 183 | struct core_thread { |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 1aca6cebbb78..26ef24076b76 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -806,6 +806,14 @@ extern struct zone *next_zone(struct zone *zone); | |||
806 | zone; \ | 806 | zone; \ |
807 | zone = next_zone(zone)) | 807 | zone = next_zone(zone)) |
808 | 808 | ||
809 | #define for_each_populated_zone(zone) \ | ||
810 | for (zone = (first_online_pgdat())->node_zones; \ | ||
811 | zone; \ | ||
812 | zone = next_zone(zone)) \ | ||
813 | if (!populated_zone(zone)) \ | ||
814 | ; /* do nothing */ \ | ||
815 | else | ||
816 | |||
809 | static inline struct zone *zonelist_zone(struct zoneref *zoneref) | 817 | static inline struct zone *zonelist_zone(struct zoneref *zoneref) |
810 | { | 818 | { |
811 | return zoneref->zone; | 819 | return zoneref->zone; |
diff --git a/include/linux/msi.h b/include/linux/msi.h index d2b8a1e8ca11..6991ab5b24d1 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -20,20 +20,23 @@ extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); | |||
20 | 20 | ||
21 | struct msi_desc { | 21 | struct msi_desc { |
22 | struct { | 22 | struct { |
23 | __u8 type : 5; /* {0: unused, 5h:MSI, 11h:MSI-X} */ | 23 | __u8 is_msix : 1; |
24 | __u8 multiple: 3; /* log2 number of messages */ | ||
24 | __u8 maskbit : 1; /* mask-pending bit supported ? */ | 25 | __u8 maskbit : 1; /* mask-pending bit supported ? */ |
25 | __u8 masked : 1; | ||
26 | __u8 is_64 : 1; /* Address size: 0=32bit 1=64bit */ | 26 | __u8 is_64 : 1; /* Address size: 0=32bit 1=64bit */ |
27 | __u8 pos; /* Location of the msi capability */ | 27 | __u8 pos; /* Location of the msi capability */ |
28 | __u32 maskbits_mask; /* mask bits mask */ | ||
29 | __u16 entry_nr; /* specific enabled entry */ | 28 | __u16 entry_nr; /* specific enabled entry */ |
30 | unsigned default_irq; /* default pre-assigned irq */ | 29 | unsigned default_irq; /* default pre-assigned irq */ |
31 | }msi_attrib; | 30 | } msi_attrib; |
32 | 31 | ||
32 | u32 masked; /* mask bits */ | ||
33 | unsigned int irq; | 33 | unsigned int irq; |
34 | struct list_head list; | 34 | struct list_head list; |
35 | 35 | ||
36 | void __iomem *mask_base; | 36 | union { |
37 | void __iomem *mask_base; | ||
38 | u8 mask_pos; | ||
39 | }; | ||
37 | struct pci_dev *dev; | 40 | struct pci_dev *dev; |
38 | 41 | ||
39 | /* Last set MSI message */ | 42 | /* Last set MSI message */ |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 7a0e5c4f8072..3069ec7e0ab8 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -50,8 +50,10 @@ struct mutex { | |||
50 | atomic_t count; | 50 | atomic_t count; |
51 | spinlock_t wait_lock; | 51 | spinlock_t wait_lock; |
52 | struct list_head wait_list; | 52 | struct list_head wait_list; |
53 | #ifdef CONFIG_DEBUG_MUTEXES | 53 | #if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) |
54 | struct thread_info *owner; | 54 | struct thread_info *owner; |
55 | #endif | ||
56 | #ifdef CONFIG_DEBUG_MUTEXES | ||
55 | const char *name; | 57 | const char *name; |
56 | void *magic; | 58 | void *magic; |
57 | #endif | 59 | #endif |
@@ -68,7 +70,6 @@ struct mutex_waiter { | |||
68 | struct list_head list; | 70 | struct list_head list; |
69 | struct task_struct *task; | 71 | struct task_struct *task; |
70 | #ifdef CONFIG_DEBUG_MUTEXES | 72 | #ifdef CONFIG_DEBUG_MUTEXES |
71 | struct mutex *lock; | ||
72 | void *magic; | 73 | void *magic; |
73 | #endif | 74 | #endif |
74 | }; | 75 | }; |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index de99025f2c5d..2524267210d3 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -18,7 +18,7 @@ struct netpoll { | |||
18 | const char *name; | 18 | const char *name; |
19 | void (*rx_hook)(struct netpoll *, int, char *, int); | 19 | void (*rx_hook)(struct netpoll *, int, char *, int); |
20 | 20 | ||
21 | u32 local_ip, remote_ip; | 21 | __be32 local_ip, remote_ip; |
22 | u16 local_port, remote_port; | 22 | u16 local_port, remote_port; |
23 | u8 remote_mac[ETH_ALEN]; | 23 | u8 remote_mac[ETH_ALEN]; |
24 | }; | 24 | }; |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 8cc8807f77d6..bde2557c2a9c 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -166,8 +166,7 @@ struct nfs_inode { | |||
166 | */ | 166 | */ |
167 | struct radix_tree_root nfs_page_tree; | 167 | struct radix_tree_root nfs_page_tree; |
168 | 168 | ||
169 | unsigned long ncommit, | 169 | unsigned long npages; |
170 | npages; | ||
171 | 170 | ||
172 | /* Open contexts for shared mmap writes */ | 171 | /* Open contexts for shared mmap writes */ |
173 | struct list_head open_files; | 172 | struct list_head open_files; |
@@ -207,6 +206,7 @@ struct nfs_inode { | |||
207 | #define NFS_INO_STALE (1) /* possible stale inode */ | 206 | #define NFS_INO_STALE (1) /* possible stale inode */ |
208 | #define NFS_INO_ACL_LRU_SET (2) /* Inode is on the LRU list */ | 207 | #define NFS_INO_ACL_LRU_SET (2) /* Inode is on the LRU list */ |
209 | #define NFS_INO_MOUNTPOINT (3) /* inode is remote mountpoint */ | 208 | #define NFS_INO_MOUNTPOINT (3) /* inode is remote mountpoint */ |
209 | #define NFS_INO_FLUSHING (4) /* inode is flushing out data */ | ||
210 | 210 | ||
211 | static inline struct nfs_inode *NFS_I(const struct inode *inode) | 211 | static inline struct nfs_inode *NFS_I(const struct inode *inode) |
212 | { | 212 | { |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 9bb81aec91cf..29b1e40dce99 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -106,6 +106,11 @@ struct nfs_server { | |||
106 | u32 attr_bitmask[2];/* V4 bitmask representing the set | 106 | u32 attr_bitmask[2];/* V4 bitmask representing the set |
107 | of attributes supported on this | 107 | of attributes supported on this |
108 | filesystem */ | 108 | filesystem */ |
109 | u32 cache_consistency_bitmask[2]; | ||
110 | /* V4 bitmask representing the subset | ||
111 | of change attribute, size, ctime | ||
112 | and mtime attributes supported by | ||
113 | the server */ | ||
109 | u32 acl_bitmask; /* V4 bitmask representing the ACEs | 114 | u32 acl_bitmask; /* V4 bitmask representing the ACEs |
110 | that are supported on this | 115 | that are supported on this |
111 | filesystem */ | 116 | filesystem */ |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 43a713fce11c..b89c34e40bc2 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -27,12 +27,8 @@ static inline int nfs_fsid_equal(const struct nfs_fsid *a, const struct nfs_fsid | |||
27 | } | 27 | } |
28 | 28 | ||
29 | struct nfs_fattr { | 29 | struct nfs_fattr { |
30 | unsigned short valid; /* which fields are valid */ | 30 | unsigned int valid; /* which fields are valid */ |
31 | __u64 pre_size; /* pre_op_attr.size */ | 31 | umode_t mode; |
32 | struct timespec pre_mtime; /* pre_op_attr.mtime */ | ||
33 | struct timespec pre_ctime; /* pre_op_attr.ctime */ | ||
34 | enum nfs_ftype type; /* always use NFSv2 types */ | ||
35 | __u32 mode; | ||
36 | __u32 nlink; | 32 | __u32 nlink; |
37 | __u32 uid; | 33 | __u32 uid; |
38 | __u32 gid; | 34 | __u32 gid; |
@@ -52,19 +48,55 @@ struct nfs_fattr { | |||
52 | struct timespec atime; | 48 | struct timespec atime; |
53 | struct timespec mtime; | 49 | struct timespec mtime; |
54 | struct timespec ctime; | 50 | struct timespec ctime; |
55 | __u32 bitmap[2]; /* NFSv4 returned attribute bitmap */ | ||
56 | __u64 change_attr; /* NFSv4 change attribute */ | 51 | __u64 change_attr; /* NFSv4 change attribute */ |
57 | __u64 pre_change_attr;/* pre-op NFSv4 change attribute */ | 52 | __u64 pre_change_attr;/* pre-op NFSv4 change attribute */ |
53 | __u64 pre_size; /* pre_op_attr.size */ | ||
54 | struct timespec pre_mtime; /* pre_op_attr.mtime */ | ||
55 | struct timespec pre_ctime; /* pre_op_attr.ctime */ | ||
58 | unsigned long time_start; | 56 | unsigned long time_start; |
59 | unsigned long gencount; | 57 | unsigned long gencount; |
60 | }; | 58 | }; |
61 | 59 | ||
62 | #define NFS_ATTR_WCC 0x0001 /* pre-op WCC data */ | 60 | #define NFS_ATTR_FATTR_TYPE (1U << 0) |
63 | #define NFS_ATTR_FATTR 0x0002 /* post-op attributes */ | 61 | #define NFS_ATTR_FATTR_MODE (1U << 1) |
64 | #define NFS_ATTR_FATTR_V3 0x0004 /* NFSv3 attributes */ | 62 | #define NFS_ATTR_FATTR_NLINK (1U << 2) |
65 | #define NFS_ATTR_FATTR_V4 0x0008 /* NFSv4 change attribute */ | 63 | #define NFS_ATTR_FATTR_OWNER (1U << 3) |
66 | #define NFS_ATTR_WCC_V4 0x0010 /* pre-op change attribute */ | 64 | #define NFS_ATTR_FATTR_GROUP (1U << 4) |
67 | #define NFS_ATTR_FATTR_V4_REFERRAL 0x0020 /* NFSv4 referral */ | 65 | #define NFS_ATTR_FATTR_RDEV (1U << 5) |
66 | #define NFS_ATTR_FATTR_SIZE (1U << 6) | ||
67 | #define NFS_ATTR_FATTR_PRESIZE (1U << 7) | ||
68 | #define NFS_ATTR_FATTR_BLOCKS_USED (1U << 8) | ||
69 | #define NFS_ATTR_FATTR_SPACE_USED (1U << 9) | ||
70 | #define NFS_ATTR_FATTR_FSID (1U << 10) | ||
71 | #define NFS_ATTR_FATTR_FILEID (1U << 11) | ||
72 | #define NFS_ATTR_FATTR_ATIME (1U << 12) | ||
73 | #define NFS_ATTR_FATTR_MTIME (1U << 13) | ||
74 | #define NFS_ATTR_FATTR_CTIME (1U << 14) | ||
75 | #define NFS_ATTR_FATTR_PREMTIME (1U << 15) | ||
76 | #define NFS_ATTR_FATTR_PRECTIME (1U << 16) | ||
77 | #define NFS_ATTR_FATTR_CHANGE (1U << 17) | ||
78 | #define NFS_ATTR_FATTR_PRECHANGE (1U << 18) | ||
79 | #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ | ||
80 | |||
81 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ | ||
82 | | NFS_ATTR_FATTR_MODE \ | ||
83 | | NFS_ATTR_FATTR_NLINK \ | ||
84 | | NFS_ATTR_FATTR_OWNER \ | ||
85 | | NFS_ATTR_FATTR_GROUP \ | ||
86 | | NFS_ATTR_FATTR_RDEV \ | ||
87 | | NFS_ATTR_FATTR_SIZE \ | ||
88 | | NFS_ATTR_FATTR_FSID \ | ||
89 | | NFS_ATTR_FATTR_FILEID \ | ||
90 | | NFS_ATTR_FATTR_ATIME \ | ||
91 | | NFS_ATTR_FATTR_MTIME \ | ||
92 | | NFS_ATTR_FATTR_CTIME) | ||
93 | #define NFS_ATTR_FATTR_V2 (NFS_ATTR_FATTR \ | ||
94 | | NFS_ATTR_FATTR_BLOCKS_USED) | ||
95 | #define NFS_ATTR_FATTR_V3 (NFS_ATTR_FATTR \ | ||
96 | | NFS_ATTR_FATTR_SPACE_USED) | ||
97 | #define NFS_ATTR_FATTR_V4 (NFS_ATTR_FATTR \ | ||
98 | | NFS_ATTR_FATTR_SPACE_USED \ | ||
99 | | NFS_ATTR_FATTR_CHANGE) | ||
68 | 100 | ||
69 | /* | 101 | /* |
70 | * Info on the file system | 102 | * Info on the file system |
@@ -836,6 +868,7 @@ struct nfs_rpc_ops { | |||
836 | int (*lock)(struct file *, int, struct file_lock *); | 868 | int (*lock)(struct file *, int, struct file_lock *); |
837 | int (*lock_check_bounds)(const struct file_lock *); | 869 | int (*lock_check_bounds)(const struct file_lock *); |
838 | void (*clear_acl_cache)(struct inode *); | 870 | void (*clear_acl_cache)(struct inode *); |
871 | void (*close_context)(struct nfs_open_context *ctx, int); | ||
839 | }; | 872 | }; |
840 | 873 | ||
841 | /* | 874 | /* |
diff --git a/include/linux/page-debug-flags.h b/include/linux/page-debug-flags.h new file mode 100644 index 000000000000..b0638fd91e92 --- /dev/null +++ b/include/linux/page-debug-flags.h | |||
@@ -0,0 +1,30 @@ | |||
1 | #ifndef LINUX_PAGE_DEBUG_FLAGS_H | ||
2 | #define LINUX_PAGE_DEBUG_FLAGS_H | ||
3 | |||
4 | /* | ||
5 | * page->debug_flags bits: | ||
6 | * | ||
7 | * PAGE_DEBUG_FLAG_POISON is set for poisoned pages. This is used to | ||
8 | * implement generic debug pagealloc feature. The pages are filled with | ||
9 | * poison patterns and set this flag after free_pages(). The poisoned | ||
10 | * pages are verified whether the patterns are not corrupted and clear | ||
11 | * the flag before alloc_pages(). | ||
12 | */ | ||
13 | |||
14 | enum page_debug_flags { | ||
15 | PAGE_DEBUG_FLAG_POISON, /* Page is poisoned */ | ||
16 | }; | ||
17 | |||
18 | /* | ||
19 | * Ensure that CONFIG_WANT_PAGE_DEBUG_FLAGS reliably | ||
20 | * gets turned off when no debug features are enabling it! | ||
21 | */ | ||
22 | |||
23 | #ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS | ||
24 | #if !defined(CONFIG_PAGE_POISONING) \ | ||
25 | /* && !defined(CONFIG_PAGE_DEBUG_SOMETHING_ELSE) && ... */ | ||
26 | #error WANT_PAGE_DEBUG_FLAGS is turned on with no debug features! | ||
27 | #endif | ||
28 | #endif /* CONFIG_WANT_PAGE_DEBUG_FLAGS */ | ||
29 | |||
30 | #endif /* LINUX_PAGE_DEBUG_FLAGS_H */ | ||
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 219a523ecdb0..61df1779b2a5 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -96,6 +96,8 @@ enum pageflags { | |||
96 | PG_swapbacked, /* Page is backed by RAM/swap */ | 96 | PG_swapbacked, /* Page is backed by RAM/swap */ |
97 | #ifdef CONFIG_UNEVICTABLE_LRU | 97 | #ifdef CONFIG_UNEVICTABLE_LRU |
98 | PG_unevictable, /* Page is "unevictable" */ | 98 | PG_unevictable, /* Page is "unevictable" */ |
99 | #endif | ||
100 | #ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT | ||
99 | PG_mlocked, /* Page is vma mlocked */ | 101 | PG_mlocked, /* Page is vma mlocked */ |
100 | #endif | 102 | #endif |
101 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR | 103 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR |
@@ -234,20 +236,20 @@ PAGEFLAG_FALSE(SwapCache) | |||
234 | #ifdef CONFIG_UNEVICTABLE_LRU | 236 | #ifdef CONFIG_UNEVICTABLE_LRU |
235 | PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable) | 237 | PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable) |
236 | TESTCLEARFLAG(Unevictable, unevictable) | 238 | TESTCLEARFLAG(Unevictable, unevictable) |
239 | #else | ||
240 | PAGEFLAG_FALSE(Unevictable) TESTCLEARFLAG_FALSE(Unevictable) | ||
241 | SETPAGEFLAG_NOOP(Unevictable) CLEARPAGEFLAG_NOOP(Unevictable) | ||
242 | __CLEARPAGEFLAG_NOOP(Unevictable) | ||
243 | #endif | ||
237 | 244 | ||
245 | #ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT | ||
238 | #define MLOCK_PAGES 1 | 246 | #define MLOCK_PAGES 1 |
239 | PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked) | 247 | PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked) |
240 | TESTSCFLAG(Mlocked, mlocked) | 248 | TESTSCFLAG(Mlocked, mlocked) |
241 | |||
242 | #else | 249 | #else |
243 | |||
244 | #define MLOCK_PAGES 0 | 250 | #define MLOCK_PAGES 0 |
245 | PAGEFLAG_FALSE(Mlocked) | 251 | PAGEFLAG_FALSE(Mlocked) |
246 | SETPAGEFLAG_NOOP(Mlocked) TESTCLEARFLAG_FALSE(Mlocked) | 252 | SETPAGEFLAG_NOOP(Mlocked) TESTCLEARFLAG_FALSE(Mlocked) |
247 | |||
248 | PAGEFLAG_FALSE(Unevictable) TESTCLEARFLAG_FALSE(Unevictable) | ||
249 | SETPAGEFLAG_NOOP(Unevictable) CLEARPAGEFLAG_NOOP(Unevictable) | ||
250 | __CLEARPAGEFLAG_NOOP(Unevictable) | ||
251 | #endif | 253 | #endif |
252 | 254 | ||
253 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR | 255 | #ifdef CONFIG_IA64_UNCACHED_ALLOCATOR |
@@ -367,9 +369,13 @@ static inline void __ClearPageTail(struct page *page) | |||
367 | 369 | ||
368 | #ifdef CONFIG_UNEVICTABLE_LRU | 370 | #ifdef CONFIG_UNEVICTABLE_LRU |
369 | #define __PG_UNEVICTABLE (1 << PG_unevictable) | 371 | #define __PG_UNEVICTABLE (1 << PG_unevictable) |
370 | #define __PG_MLOCKED (1 << PG_mlocked) | ||
371 | #else | 372 | #else |
372 | #define __PG_UNEVICTABLE 0 | 373 | #define __PG_UNEVICTABLE 0 |
374 | #endif | ||
375 | |||
376 | #ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT | ||
377 | #define __PG_MLOCKED (1 << PG_mlocked) | ||
378 | #else | ||
373 | #define __PG_MLOCKED 0 | 379 | #define __PG_MLOCKED 0 |
374 | #endif | 380 | #endif |
375 | 381 | ||
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index 7b2886fa7fdc..bab82f4c571c 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h | |||
@@ -24,7 +24,6 @@ void __pagevec_release(struct pagevec *pvec); | |||
24 | void __pagevec_free(struct pagevec *pvec); | 24 | void __pagevec_free(struct pagevec *pvec); |
25 | void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru); | 25 | void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru); |
26 | void pagevec_strip(struct pagevec *pvec); | 26 | void pagevec_strip(struct pagevec *pvec); |
27 | void pagevec_swap_free(struct pagevec *pvec); | ||
28 | unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, | 27 | unsigned pagevec_lookup(struct pagevec *pvec, struct address_space *mapping, |
29 | pgoff_t start, unsigned nr_pages); | 28 | pgoff_t start, unsigned nr_pages); |
30 | unsigned pagevec_lookup_tag(struct pagevec *pvec, | 29 | unsigned pagevec_lookup_tag(struct pagevec *pvec, |
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 042c166f65d5..092e82e0048c 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
@@ -10,72 +10,25 @@ | |||
10 | 10 | ||
11 | #include <linux/acpi.h> | 11 | #include <linux/acpi.h> |
12 | 12 | ||
13 | #define OSC_QUERY_TYPE 0 | ||
14 | #define OSC_SUPPORT_TYPE 1 | ||
15 | #define OSC_CONTROL_TYPE 2 | ||
16 | #define OSC_SUPPORT_MASKS 0x1f | ||
17 | |||
18 | /* | ||
19 | * _OSC DW0 Definition | ||
20 | */ | ||
21 | #define OSC_QUERY_ENABLE 1 | ||
22 | #define OSC_REQUEST_ERROR 2 | ||
23 | #define OSC_INVALID_UUID_ERROR 4 | ||
24 | #define OSC_INVALID_REVISION_ERROR 8 | ||
25 | #define OSC_CAPABILITIES_MASK_ERROR 16 | ||
26 | |||
27 | /* | ||
28 | * _OSC DW1 Definition (OS Support Fields) | ||
29 | */ | ||
30 | #define OSC_EXT_PCI_CONFIG_SUPPORT 1 | ||
31 | #define OSC_ACTIVE_STATE_PWR_SUPPORT 2 | ||
32 | #define OSC_CLOCK_PWR_CAPABILITY_SUPPORT 4 | ||
33 | #define OSC_PCI_SEGMENT_GROUPS_SUPPORT 8 | ||
34 | #define OSC_MSI_SUPPORT 16 | ||
35 | |||
36 | /* | ||
37 | * _OSC DW1 Definition (OS Control Fields) | ||
38 | */ | ||
39 | #define OSC_PCI_EXPRESS_NATIVE_HP_CONTROL 1 | ||
40 | #define OSC_SHPC_NATIVE_HP_CONTROL 2 | ||
41 | #define OSC_PCI_EXPRESS_PME_CONTROL 4 | ||
42 | #define OSC_PCI_EXPRESS_AER_CONTROL 8 | ||
43 | #define OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL 16 | ||
44 | |||
45 | #define OSC_CONTROL_MASKS (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL | \ | ||
46 | OSC_SHPC_NATIVE_HP_CONTROL | \ | ||
47 | OSC_PCI_EXPRESS_PME_CONTROL | \ | ||
48 | OSC_PCI_EXPRESS_AER_CONTROL | \ | ||
49 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL) | ||
50 | |||
51 | #ifdef CONFIG_ACPI | 13 | #ifdef CONFIG_ACPI |
52 | extern acpi_status pci_osc_control_set(acpi_handle handle, u32 flags); | ||
53 | int pci_acpi_osc_support(acpi_handle handle, u32 flags); | ||
54 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | 14 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) |
55 | { | 15 | { |
56 | /* Find root host bridge */ | 16 | struct pci_bus *pbus = pdev->bus; |
57 | while (pdev->bus->self) | 17 | /* Find a PCI root bus */ |
58 | pdev = pdev->bus->self; | 18 | while (pbus->parent) |
59 | 19 | pbus = pbus->parent; | |
60 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pdev->bus), | 20 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), |
61 | pdev->bus->number); | 21 | pbus->number); |
62 | } | 22 | } |
63 | 23 | ||
64 | static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) | 24 | static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) |
65 | { | 25 | { |
66 | int seg = pci_domain_nr(pbus), busnr = pbus->number; | 26 | if (pbus->parent) |
67 | struct pci_dev *bridge = pbus->self; | 27 | return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); |
68 | if (bridge) | 28 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), |
69 | return DEVICE_ACPI_HANDLE(&(bridge->dev)); | 29 | pbus->number); |
70 | return acpi_get_pci_rootbridge_handle(seg, busnr); | ||
71 | } | 30 | } |
72 | #else | 31 | #else |
73 | #if !defined(AE_ERROR) | ||
74 | typedef u32 acpi_status; | ||
75 | #define AE_ERROR (acpi_status) (0x0001) | ||
76 | #endif | ||
77 | static inline acpi_status pci_osc_control_set(acpi_handle handle, u32 flags) | ||
78 | {return AE_ERROR;} | ||
79 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | 32 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) |
80 | { return NULL; } | 33 | { return NULL; } |
81 | #endif | 34 | #endif |
diff --git a/include/linux/pci.h b/include/linux/pci.h index df3644132617..a7fe4bbd7ff1 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <asm/atomic.h> | 52 | #include <asm/atomic.h> |
53 | #include <linux/device.h> | 53 | #include <linux/device.h> |
54 | #include <linux/io.h> | 54 | #include <linux/io.h> |
55 | #include <linux/irqreturn.h> | ||
55 | 56 | ||
56 | /* Include the ID list */ | 57 | /* Include the ID list */ |
57 | #include <linux/pci_ids.h> | 58 | #include <linux/pci_ids.h> |
@@ -93,6 +94,12 @@ enum { | |||
93 | /* #6: expansion ROM resource */ | 94 | /* #6: expansion ROM resource */ |
94 | PCI_ROM_RESOURCE, | 95 | PCI_ROM_RESOURCE, |
95 | 96 | ||
97 | /* device specific resources */ | ||
98 | #ifdef CONFIG_PCI_IOV | ||
99 | PCI_IOV_RESOURCES, | ||
100 | PCI_IOV_RESOURCE_END = PCI_IOV_RESOURCES + PCI_SRIOV_NUM_BARS - 1, | ||
101 | #endif | ||
102 | |||
96 | /* resources assigned to buses behind the bridge */ | 103 | /* resources assigned to buses behind the bridge */ |
97 | #define PCI_BRIDGE_RESOURCE_NUM 4 | 104 | #define PCI_BRIDGE_RESOURCE_NUM 4 |
98 | 105 | ||
@@ -180,6 +187,7 @@ struct pci_cap_saved_state { | |||
180 | 187 | ||
181 | struct pcie_link_state; | 188 | struct pcie_link_state; |
182 | struct pci_vpd; | 189 | struct pci_vpd; |
190 | struct pci_sriov; | ||
183 | 191 | ||
184 | /* | 192 | /* |
185 | * The pci_dev structure is used to describe PCI devices. | 193 | * The pci_dev structure is used to describe PCI devices. |
@@ -257,6 +265,8 @@ struct pci_dev { | |||
257 | unsigned int is_managed:1; | 265 | unsigned int is_managed:1; |
258 | unsigned int is_pcie:1; | 266 | unsigned int is_pcie:1; |
259 | unsigned int state_saved:1; | 267 | unsigned int state_saved:1; |
268 | unsigned int is_physfn:1; | ||
269 | unsigned int is_virtfn:1; | ||
260 | pci_dev_flags_t dev_flags; | 270 | pci_dev_flags_t dev_flags; |
261 | atomic_t enable_cnt; /* pci_enable_device has been called */ | 271 | atomic_t enable_cnt; /* pci_enable_device has been called */ |
262 | 272 | ||
@@ -270,6 +280,12 @@ struct pci_dev { | |||
270 | struct list_head msi_list; | 280 | struct list_head msi_list; |
271 | #endif | 281 | #endif |
272 | struct pci_vpd *vpd; | 282 | struct pci_vpd *vpd; |
283 | #ifdef CONFIG_PCI_IOV | ||
284 | union { | ||
285 | struct pci_sriov *sriov; /* SR-IOV capability related */ | ||
286 | struct pci_dev *physfn; /* the PF this VF is associated with */ | ||
287 | }; | ||
288 | #endif | ||
273 | }; | 289 | }; |
274 | 290 | ||
275 | extern struct pci_dev *alloc_pci_dev(void); | 291 | extern struct pci_dev *alloc_pci_dev(void); |
@@ -341,6 +357,15 @@ struct pci_bus { | |||
341 | #define pci_bus_b(n) list_entry(n, struct pci_bus, node) | 357 | #define pci_bus_b(n) list_entry(n, struct pci_bus, node) |
342 | #define to_pci_bus(n) container_of(n, struct pci_bus, dev) | 358 | #define to_pci_bus(n) container_of(n, struct pci_bus, dev) |
343 | 359 | ||
360 | /* | ||
361 | * Returns true if the pci bus is root (behind host-pci bridge), | ||
362 | * false otherwise | ||
363 | */ | ||
364 | static inline bool pci_is_root_bus(struct pci_bus *pbus) | ||
365 | { | ||
366 | return !(pbus->parent); | ||
367 | } | ||
368 | |||
344 | #ifdef CONFIG_PCI_MSI | 369 | #ifdef CONFIG_PCI_MSI |
345 | static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev) | 370 | static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev) |
346 | { | 371 | { |
@@ -528,7 +553,7 @@ void pcibios_update_irq(struct pci_dev *, int irq); | |||
528 | /* Generic PCI functions used internally */ | 553 | /* Generic PCI functions used internally */ |
529 | 554 | ||
530 | extern struct pci_bus *pci_find_bus(int domain, int busnr); | 555 | extern struct pci_bus *pci_find_bus(int domain, int busnr); |
531 | void pci_bus_add_devices(struct pci_bus *bus); | 556 | void pci_bus_add_devices(const struct pci_bus *bus); |
532 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, | 557 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, |
533 | struct pci_ops *ops, void *sysdata); | 558 | struct pci_ops *ops, void *sysdata); |
534 | static inline struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops, | 559 | static inline struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops, |
@@ -702,6 +727,9 @@ int pci_back_from_sleep(struct pci_dev *dev); | |||
702 | 727 | ||
703 | /* Functions for PCI Hotplug drivers to use */ | 728 | /* Functions for PCI Hotplug drivers to use */ |
704 | int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap); | 729 | int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap); |
730 | #ifdef CONFIG_HOTPLUG | ||
731 | unsigned int pci_rescan_bus(struct pci_bus *bus); | ||
732 | #endif | ||
705 | 733 | ||
706 | /* Vital product data routines */ | 734 | /* Vital product data routines */ |
707 | ssize_t pci_read_vpd(struct pci_dev *dev, loff_t pos, size_t count, void *buf); | 735 | ssize_t pci_read_vpd(struct pci_dev *dev, loff_t pos, size_t count, void *buf); |
@@ -709,7 +737,7 @@ ssize_t pci_write_vpd(struct pci_dev *dev, loff_t pos, size_t count, const void | |||
709 | int pci_vpd_truncate(struct pci_dev *dev, size_t size); | 737 | int pci_vpd_truncate(struct pci_dev *dev, size_t size); |
710 | 738 | ||
711 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ | 739 | /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ |
712 | void pci_bus_assign_resources(struct pci_bus *bus); | 740 | void pci_bus_assign_resources(const struct pci_bus *bus); |
713 | void pci_bus_size_bridges(struct pci_bus *bus); | 741 | void pci_bus_size_bridges(struct pci_bus *bus); |
714 | int pci_claim_resource(struct pci_dev *, int); | 742 | int pci_claim_resource(struct pci_dev *, int); |
715 | void pci_assign_unassigned_resources(void); | 743 | void pci_assign_unassigned_resources(void); |
@@ -790,7 +818,7 @@ struct msix_entry { | |||
790 | 818 | ||
791 | 819 | ||
792 | #ifndef CONFIG_PCI_MSI | 820 | #ifndef CONFIG_PCI_MSI |
793 | static inline int pci_enable_msi(struct pci_dev *dev) | 821 | static inline int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec) |
794 | { | 822 | { |
795 | return -1; | 823 | return -1; |
796 | } | 824 | } |
@@ -800,6 +828,10 @@ static inline void pci_msi_shutdown(struct pci_dev *dev) | |||
800 | static inline void pci_disable_msi(struct pci_dev *dev) | 828 | static inline void pci_disable_msi(struct pci_dev *dev) |
801 | { } | 829 | { } |
802 | 830 | ||
831 | static inline int pci_msix_table_size(struct pci_dev *dev) | ||
832 | { | ||
833 | return 0; | ||
834 | } | ||
803 | static inline int pci_enable_msix(struct pci_dev *dev, | 835 | static inline int pci_enable_msix(struct pci_dev *dev, |
804 | struct msix_entry *entries, int nvec) | 836 | struct msix_entry *entries, int nvec) |
805 | { | 837 | { |
@@ -821,9 +853,10 @@ static inline int pci_msi_enabled(void) | |||
821 | return 0; | 853 | return 0; |
822 | } | 854 | } |
823 | #else | 855 | #else |
824 | extern int pci_enable_msi(struct pci_dev *dev); | 856 | extern int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec); |
825 | extern void pci_msi_shutdown(struct pci_dev *dev); | 857 | extern void pci_msi_shutdown(struct pci_dev *dev); |
826 | extern void pci_disable_msi(struct pci_dev *dev); | 858 | extern void pci_disable_msi(struct pci_dev *dev); |
859 | extern int pci_msix_table_size(struct pci_dev *dev); | ||
827 | extern int pci_enable_msix(struct pci_dev *dev, | 860 | extern int pci_enable_msix(struct pci_dev *dev, |
828 | struct msix_entry *entries, int nvec); | 861 | struct msix_entry *entries, int nvec); |
829 | extern void pci_msix_shutdown(struct pci_dev *dev); | 862 | extern void pci_msix_shutdown(struct pci_dev *dev); |
@@ -842,6 +875,8 @@ static inline int pcie_aspm_enabled(void) | |||
842 | extern int pcie_aspm_enabled(void); | 875 | extern int pcie_aspm_enabled(void); |
843 | #endif | 876 | #endif |
844 | 877 | ||
878 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) | ||
879 | |||
845 | #ifdef CONFIG_HT_IRQ | 880 | #ifdef CONFIG_HT_IRQ |
846 | /* The functions a driver should call */ | 881 | /* The functions a driver should call */ |
847 | int ht_create_irq(struct pci_dev *dev, int idx); | 882 | int ht_create_irq(struct pci_dev *dev, int idx); |
@@ -1195,5 +1230,23 @@ int pci_ext_cfg_avail(struct pci_dev *dev); | |||
1195 | 1230 | ||
1196 | void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); | 1231 | void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); |
1197 | 1232 | ||
1233 | #ifdef CONFIG_PCI_IOV | ||
1234 | extern int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); | ||
1235 | extern void pci_disable_sriov(struct pci_dev *dev); | ||
1236 | extern irqreturn_t pci_sriov_migration(struct pci_dev *dev); | ||
1237 | #else | ||
1238 | static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) | ||
1239 | { | ||
1240 | return -ENODEV; | ||
1241 | } | ||
1242 | static inline void pci_disable_sriov(struct pci_dev *dev) | ||
1243 | { | ||
1244 | } | ||
1245 | static inline irqreturn_t pci_sriov_migration(struct pci_dev *dev) | ||
1246 | { | ||
1247 | return IRQ_NONE; | ||
1248 | } | ||
1249 | #endif | ||
1250 | |||
1198 | #endif /* __KERNEL__ */ | 1251 | #endif /* __KERNEL__ */ |
1199 | #endif /* LINUX_PCI_H */ | 1252 | #endif /* LINUX_PCI_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index e5816dd33371..cb14fd260837 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2396,6 +2396,7 @@ | |||
2396 | #define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c | 2396 | #define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c |
2397 | #define PCI_DEVICE_ID_INTEL_82801DB_0 0x24c0 | 2397 | #define PCI_DEVICE_ID_INTEL_82801DB_0 0x24c0 |
2398 | #define PCI_DEVICE_ID_INTEL_82801DB_1 0x24c1 | 2398 | #define PCI_DEVICE_ID_INTEL_82801DB_1 0x24c1 |
2399 | #define PCI_DEVICE_ID_INTEL_82801DB_2 0x24c2 | ||
2399 | #define PCI_DEVICE_ID_INTEL_82801DB_3 0x24c3 | 2400 | #define PCI_DEVICE_ID_INTEL_82801DB_3 0x24c3 |
2400 | #define PCI_DEVICE_ID_INTEL_82801DB_5 0x24c5 | 2401 | #define PCI_DEVICE_ID_INTEL_82801DB_5 0x24c5 |
2401 | #define PCI_DEVICE_ID_INTEL_82801DB_6 0x24c6 | 2402 | #define PCI_DEVICE_ID_INTEL_82801DB_6 0x24c6 |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 027815b4635e..e4d08c1b2e0b 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -235,7 +235,7 @@ | |||
235 | #define PCI_PM_CAP_PME_SHIFT 11 /* Start of the PME Mask in PMC */ | 235 | #define PCI_PM_CAP_PME_SHIFT 11 /* Start of the PME Mask in PMC */ |
236 | #define PCI_PM_CTRL 4 /* PM control and status register */ | 236 | #define PCI_PM_CTRL 4 /* PM control and status register */ |
237 | #define PCI_PM_CTRL_STATE_MASK 0x0003 /* Current power state (D0 to D3) */ | 237 | #define PCI_PM_CTRL_STATE_MASK 0x0003 /* Current power state (D0 to D3) */ |
238 | #define PCI_PM_CTRL_NO_SOFT_RESET 0x0004 /* No reset for D3hot->D0 */ | 238 | #define PCI_PM_CTRL_NO_SOFT_RESET 0x0008 /* No reset for D3hot->D0 */ |
239 | #define PCI_PM_CTRL_PME_ENABLE 0x0100 /* PME pin enable */ | 239 | #define PCI_PM_CTRL_PME_ENABLE 0x0100 /* PME pin enable */ |
240 | #define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00 /* Data select (??) */ | 240 | #define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00 /* Data select (??) */ |
241 | #define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000 /* Data scale (??) */ | 241 | #define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000 /* Data scale (??) */ |
@@ -375,6 +375,7 @@ | |||
375 | #define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ | 375 | #define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ |
376 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ | 376 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ |
377 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ | 377 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ |
378 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ | ||
378 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ | 379 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ |
379 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ | 380 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ |
380 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ | 381 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ |
@@ -487,6 +488,8 @@ | |||
487 | #define PCI_EXP_DEVCAP2_ARI 0x20 /* Alternative Routing-ID */ | 488 | #define PCI_EXP_DEVCAP2_ARI 0x20 /* Alternative Routing-ID */ |
488 | #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ | 489 | #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ |
489 | #define PCI_EXP_DEVCTL2_ARI 0x20 /* Alternative Routing-ID */ | 490 | #define PCI_EXP_DEVCTL2_ARI 0x20 /* Alternative Routing-ID */ |
491 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ | ||
492 | #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ | ||
490 | 493 | ||
491 | /* Extended Capabilities (PCI-X 2.0 and Express) */ | 494 | /* Extended Capabilities (PCI-X 2.0 and Express) */ |
492 | #define PCI_EXT_CAP_ID(header) (header & 0x0000ffff) | 495 | #define PCI_EXT_CAP_ID(header) (header & 0x0000ffff) |
@@ -498,6 +501,7 @@ | |||
498 | #define PCI_EXT_CAP_ID_DSN 3 | 501 | #define PCI_EXT_CAP_ID_DSN 3 |
499 | #define PCI_EXT_CAP_ID_PWR 4 | 502 | #define PCI_EXT_CAP_ID_PWR 4 |
500 | #define PCI_EXT_CAP_ID_ARI 14 | 503 | #define PCI_EXT_CAP_ID_ARI 14 |
504 | #define PCI_EXT_CAP_ID_SRIOV 16 | ||
501 | 505 | ||
502 | /* Advanced Error Reporting */ | 506 | /* Advanced Error Reporting */ |
503 | #define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ | 507 | #define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ |
@@ -615,4 +619,35 @@ | |||
615 | #define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */ | 619 | #define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */ |
616 | #define PCI_ARI_CTRL_FG(x) (((x) >> 4) & 7) /* Function Group */ | 620 | #define PCI_ARI_CTRL_FG(x) (((x) >> 4) & 7) /* Function Group */ |
617 | 621 | ||
622 | /* Single Root I/O Virtualization */ | ||
623 | #define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */ | ||
624 | #define PCI_SRIOV_CAP_VFM 0x01 /* VF Migration Capable */ | ||
625 | #define PCI_SRIOV_CAP_INTR(x) ((x) >> 21) /* Interrupt Message Number */ | ||
626 | #define PCI_SRIOV_CTRL 0x08 /* SR-IOV Control */ | ||
627 | #define PCI_SRIOV_CTRL_VFE 0x01 /* VF Enable */ | ||
628 | #define PCI_SRIOV_CTRL_VFM 0x02 /* VF Migration Enable */ | ||
629 | #define PCI_SRIOV_CTRL_INTR 0x04 /* VF Migration Interrupt Enable */ | ||
630 | #define PCI_SRIOV_CTRL_MSE 0x08 /* VF Memory Space Enable */ | ||
631 | #define PCI_SRIOV_CTRL_ARI 0x10 /* ARI Capable Hierarchy */ | ||
632 | #define PCI_SRIOV_STATUS 0x0a /* SR-IOV Status */ | ||
633 | #define PCI_SRIOV_STATUS_VFM 0x01 /* VF Migration Status */ | ||
634 | #define PCI_SRIOV_INITIAL_VF 0x0c /* Initial VFs */ | ||
635 | #define PCI_SRIOV_TOTAL_VF 0x0e /* Total VFs */ | ||
636 | #define PCI_SRIOV_NUM_VF 0x10 /* Number of VFs */ | ||
637 | #define PCI_SRIOV_FUNC_LINK 0x12 /* Function Dependency Link */ | ||
638 | #define PCI_SRIOV_VF_OFFSET 0x14 /* First VF Offset */ | ||
639 | #define PCI_SRIOV_VF_STRIDE 0x16 /* Following VF Stride */ | ||
640 | #define PCI_SRIOV_VF_DID 0x1a /* VF Device ID */ | ||
641 | #define PCI_SRIOV_SUP_PGSIZE 0x1c /* Supported Page Sizes */ | ||
642 | #define PCI_SRIOV_SYS_PGSIZE 0x20 /* System Page Size */ | ||
643 | #define PCI_SRIOV_BAR 0x24 /* VF BAR0 */ | ||
644 | #define PCI_SRIOV_NUM_BARS 6 /* Number of VF BARs */ | ||
645 | #define PCI_SRIOV_VFM 0x3c /* VF Migration State Array Offset*/ | ||
646 | #define PCI_SRIOV_VFM_BIR(x) ((x) & 7) /* State BIR */ | ||
647 | #define PCI_SRIOV_VFM_OFFSET(x) ((x) & ~7) /* State Offset */ | ||
648 | #define PCI_SRIOV_VFM_UA 0x0 /* Inactive.Unavailable */ | ||
649 | #define PCI_SRIOV_VFM_MI 0x1 /* Dormant.MigrateIn */ | ||
650 | #define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */ | ||
651 | #define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */ | ||
652 | |||
618 | #endif /* LINUX_PCI_REGS_H */ | 653 | #endif /* LINUX_PCI_REGS_H */ |
diff --git a/include/linux/pcieport_if.h b/include/linux/pcieport_if.h index 6cd91e3f9820..b4c79545330b 100644 --- a/include/linux/pcieport_if.h +++ b/include/linux/pcieport_if.h | |||
@@ -16,29 +16,30 @@ | |||
16 | #define PCIE_ANY_PORT 7 | 16 | #define PCIE_ANY_PORT 7 |
17 | 17 | ||
18 | /* Service Type */ | 18 | /* Service Type */ |
19 | #define PCIE_PORT_SERVICE_PME 1 /* Power Management Event */ | 19 | #define PCIE_PORT_SERVICE_PME_SHIFT 0 /* Power Management Event */ |
20 | #define PCIE_PORT_SERVICE_AER 2 /* Advanced Error Reporting */ | 20 | #define PCIE_PORT_SERVICE_PME (1 << PCIE_PORT_SERVICE_PME_SHIFT) |
21 | #define PCIE_PORT_SERVICE_HP 4 /* Native Hotplug */ | 21 | #define PCIE_PORT_SERVICE_AER_SHIFT 1 /* Advanced Error Reporting */ |
22 | #define PCIE_PORT_SERVICE_VC 8 /* Virtual Channel */ | 22 | #define PCIE_PORT_SERVICE_AER (1 << PCIE_PORT_SERVICE_AER_SHIFT) |
23 | #define PCIE_PORT_SERVICE_HP_SHIFT 2 /* Native Hotplug */ | ||
24 | #define PCIE_PORT_SERVICE_HP (1 << PCIE_PORT_SERVICE_HP_SHIFT) | ||
25 | #define PCIE_PORT_SERVICE_VC_SHIFT 3 /* Virtual Channel */ | ||
26 | #define PCIE_PORT_SERVICE_VC (1 << PCIE_PORT_SERVICE_VC_SHIFT) | ||
23 | 27 | ||
24 | /* Root/Upstream/Downstream Port's Interrupt Mode */ | 28 | /* Root/Upstream/Downstream Port's Interrupt Mode */ |
29 | #define PCIE_PORT_NO_IRQ (-1) | ||
25 | #define PCIE_PORT_INTx_MODE 0 | 30 | #define PCIE_PORT_INTx_MODE 0 |
26 | #define PCIE_PORT_MSI_MODE 1 | 31 | #define PCIE_PORT_MSI_MODE 1 |
27 | #define PCIE_PORT_MSIX_MODE 2 | 32 | #define PCIE_PORT_MSIX_MODE 2 |
28 | 33 | ||
29 | struct pcie_port_service_id { | 34 | struct pcie_port_data { |
30 | __u32 vendor, device; /* Vendor and device ID or PCI_ANY_ID*/ | 35 | int port_type; /* Type of the port */ |
31 | __u32 subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */ | 36 | int port_irq_mode; /* [0:INTx | 1:MSI | 2:MSI-X] */ |
32 | __u32 class, class_mask; /* (class,subclass,prog-if) triplet */ | ||
33 | __u32 port_type, service_type; /* Port Entity */ | ||
34 | kernel_ulong_t driver_data; | ||
35 | }; | 37 | }; |
36 | 38 | ||
37 | struct pcie_device { | 39 | struct pcie_device { |
38 | int irq; /* Service IRQ/MSI/MSI-X Vector */ | 40 | int irq; /* Service IRQ/MSI/MSI-X Vector */ |
39 | int interrupt_mode; /* [0:INTx | 1:MSI | 2:MSI-X] */ | 41 | struct pci_dev *port; /* Root/Upstream/Downstream Port */ |
40 | struct pcie_port_service_id id; /* Service ID */ | 42 | u32 service; /* Port service this device represents */ |
41 | struct pci_dev *port; /* Root/Upstream/Downstream Port */ | ||
42 | void *priv_data; /* Service Private Data */ | 43 | void *priv_data; /* Service Private Data */ |
43 | struct device device; /* Generic Device Interface */ | 44 | struct device device; /* Generic Device Interface */ |
44 | }; | 45 | }; |
@@ -56,10 +57,9 @@ static inline void* get_service_data(struct pcie_device *dev) | |||
56 | 57 | ||
57 | struct pcie_port_service_driver { | 58 | struct pcie_port_service_driver { |
58 | const char *name; | 59 | const char *name; |
59 | int (*probe) (struct pcie_device *dev, | 60 | int (*probe) (struct pcie_device *dev); |
60 | const struct pcie_port_service_id *id); | ||
61 | void (*remove) (struct pcie_device *dev); | 61 | void (*remove) (struct pcie_device *dev); |
62 | int (*suspend) (struct pcie_device *dev, pm_message_t state); | 62 | int (*suspend) (struct pcie_device *dev); |
63 | int (*resume) (struct pcie_device *dev); | 63 | int (*resume) (struct pcie_device *dev); |
64 | 64 | ||
65 | /* Service Error Recovery Handler */ | 65 | /* Service Error Recovery Handler */ |
@@ -68,7 +68,9 @@ struct pcie_port_service_driver { | |||
68 | /* Link Reset Capability - AER service driver specific */ | 68 | /* Link Reset Capability - AER service driver specific */ |
69 | pci_ers_result_t (*reset_link) (struct pci_dev *dev); | 69 | pci_ers_result_t (*reset_link) (struct pci_dev *dev); |
70 | 70 | ||
71 | const struct pcie_port_service_id *id_table; | 71 | int port_type; /* Type of the port this driver can handle */ |
72 | u32 service; /* Port service this device represents */ | ||
73 | |||
72 | struct device_driver driver; | 74 | struct device_driver driver; |
73 | }; | 75 | }; |
74 | #define to_service_driver(d) \ | 76 | #define to_service_driver(d) \ |
diff --git a/include/linux/poison.h b/include/linux/poison.h index 9f31683728fd..6729f7dcd60e 100644 --- a/include/linux/poison.h +++ b/include/linux/poison.h | |||
@@ -17,6 +17,9 @@ | |||
17 | */ | 17 | */ |
18 | #define TIMER_ENTRY_STATIC ((void *) 0x74737461) | 18 | #define TIMER_ENTRY_STATIC ((void *) 0x74737461) |
19 | 19 | ||
20 | /********** mm/debug-pagealloc.c **********/ | ||
21 | #define PAGE_POISON 0xaa | ||
22 | |||
20 | /********** mm/slab.c **********/ | 23 | /********** mm/slab.c **********/ |
21 | /* | 24 | /* |
22 | * Magic nums for obj red zoning. | 25 | * Magic nums for obj red zoning. |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index b8bdb96eff78..fbfa3d44d33d 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -41,9 +41,6 @@ enum { | |||
41 | * while parent/subdir create the directory structure (every | 41 | * while parent/subdir create the directory structure (every |
42 | * /proc file has a parent, but "subdir" is NULL for all | 42 | * /proc file has a parent, but "subdir" is NULL for all |
43 | * non-directory entries). | 43 | * non-directory entries). |
44 | * | ||
45 | * "owner" is used to protect module | ||
46 | * from unloading while proc_dir_entry is in use | ||
47 | */ | 44 | */ |
48 | 45 | ||
49 | typedef int (read_proc_t)(char *page, char **start, off_t off, | 46 | typedef int (read_proc_t)(char *page, char **start, off_t off, |
@@ -70,7 +67,6 @@ struct proc_dir_entry { | |||
70 | * somewhere. | 67 | * somewhere. |
71 | */ | 68 | */ |
72 | const struct file_operations *proc_fops; | 69 | const struct file_operations *proc_fops; |
73 | struct module *owner; | ||
74 | struct proc_dir_entry *next, *parent, *subdir; | 70 | struct proc_dir_entry *next, *parent, *subdir; |
75 | void *data; | 71 | void *data; |
76 | read_proc_t *read_proc; | 72 | read_proc_t *read_proc; |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 4046b75563c1..60f88a7fb13d 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -99,6 +99,7 @@ struct rtc_pll_info { | |||
99 | 99 | ||
100 | #ifdef __KERNEL__ | 100 | #ifdef __KERNEL__ |
101 | 101 | ||
102 | #include <linux/types.h> | ||
102 | #include <linux/interrupt.h> | 103 | #include <linux/interrupt.h> |
103 | 104 | ||
104 | extern int rtc_month_days(unsigned int month, unsigned int year); | 105 | extern int rtc_month_days(unsigned int month, unsigned int year); |
@@ -232,6 +233,11 @@ int rtc_register(rtc_task_t *task); | |||
232 | int rtc_unregister(rtc_task_t *task); | 233 | int rtc_unregister(rtc_task_t *task); |
233 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); | 234 | int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); |
234 | 235 | ||
236 | static inline bool is_leap_year(unsigned int year) | ||
237 | { | ||
238 | return (!(year % 4) && (year % 100)) || !(year % 400); | ||
239 | } | ||
240 | |||
235 | #endif /* __KERNEL__ */ | 241 | #endif /* __KERNEL__ */ |
236 | 242 | ||
237 | #endif /* _LINUX_RTC_H_ */ | 243 | #endif /* _LINUX_RTC_H_ */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 1d19c025f9d2..481fad3a9b42 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -331,7 +331,9 @@ extern signed long schedule_timeout(signed long timeout); | |||
331 | extern signed long schedule_timeout_interruptible(signed long timeout); | 331 | extern signed long schedule_timeout_interruptible(signed long timeout); |
332 | extern signed long schedule_timeout_killable(signed long timeout); | 332 | extern signed long schedule_timeout_killable(signed long timeout); |
333 | extern signed long schedule_timeout_uninterruptible(signed long timeout); | 333 | extern signed long schedule_timeout_uninterruptible(signed long timeout); |
334 | asmlinkage void __schedule(void); | ||
334 | asmlinkage void schedule(void); | 335 | asmlinkage void schedule(void); |
336 | extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner); | ||
335 | 337 | ||
336 | struct nsproxy; | 338 | struct nsproxy; |
337 | struct user_namespace; | 339 | struct user_namespace; |
@@ -389,8 +391,15 @@ extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); | |||
389 | (mm)->hiwater_vm = (mm)->total_vm; \ | 391 | (mm)->hiwater_vm = (mm)->total_vm; \ |
390 | } while (0) | 392 | } while (0) |
391 | 393 | ||
392 | #define get_mm_hiwater_rss(mm) max((mm)->hiwater_rss, get_mm_rss(mm)) | 394 | static inline unsigned long get_mm_hiwater_rss(struct mm_struct *mm) |
393 | #define get_mm_hiwater_vm(mm) max((mm)->hiwater_vm, (mm)->total_vm) | 395 | { |
396 | return max(mm->hiwater_rss, get_mm_rss(mm)); | ||
397 | } | ||
398 | |||
399 | static inline unsigned long get_mm_hiwater_vm(struct mm_struct *mm) | ||
400 | { | ||
401 | return max(mm->hiwater_vm, mm->total_vm); | ||
402 | } | ||
394 | 403 | ||
395 | extern void set_dumpable(struct mm_struct *mm, int value); | 404 | extern void set_dumpable(struct mm_struct *mm, int value); |
396 | extern int get_dumpable(struct mm_struct *mm); | 405 | extern int get_dumpable(struct mm_struct *mm); |
@@ -1334,6 +1343,7 @@ struct task_struct { | |||
1334 | int lockdep_depth; | 1343 | int lockdep_depth; |
1335 | unsigned int lockdep_recursion; | 1344 | unsigned int lockdep_recursion; |
1336 | struct held_lock held_locks[MAX_LOCK_DEPTH]; | 1345 | struct held_lock held_locks[MAX_LOCK_DEPTH]; |
1346 | gfp_t lockdep_reclaim_gfp; | ||
1337 | #endif | 1347 | #endif |
1338 | 1348 | ||
1339 | /* journalling filesystem info */ | 1349 | /* journalling filesystem info */ |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index f616f31576d7..004f3b3342c5 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -55,7 +55,7 @@ int seq_bitmap(struct seq_file *m, const unsigned long *bits, | |||
55 | unsigned int nr_bits); | 55 | unsigned int nr_bits); |
56 | static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask) | 56 | static inline int seq_cpumask(struct seq_file *m, const struct cpumask *mask) |
57 | { | 57 | { |
58 | return seq_bitmap(m, mask->bits, nr_cpu_ids); | 58 | return seq_bitmap(m, cpumask_bits(mask), nr_cpu_ids); |
59 | } | 59 | } |
60 | 60 | ||
61 | static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) | 61 | static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) |
@@ -63,12 +63,13 @@ static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) | |||
63 | return seq_bitmap(m, mask->bits, MAX_NUMNODES); | 63 | return seq_bitmap(m, mask->bits, MAX_NUMNODES); |
64 | } | 64 | } |
65 | 65 | ||
66 | int seq_bitmap_list(struct seq_file *m, unsigned long *bits, | 66 | int seq_bitmap_list(struct seq_file *m, const unsigned long *bits, |
67 | unsigned int nr_bits); | 67 | unsigned int nr_bits); |
68 | 68 | ||
69 | static inline int seq_cpumask_list(struct seq_file *m, cpumask_t *mask) | 69 | static inline int seq_cpumask_list(struct seq_file *m, |
70 | const struct cpumask *mask) | ||
70 | { | 71 | { |
71 | return seq_bitmap_list(m, mask->bits, NR_CPUS); | 72 | return seq_bitmap_list(m, cpumask_bits(mask), nr_cpu_ids); |
72 | } | 73 | } |
73 | 74 | ||
74 | static inline int seq_nodemask_list(struct seq_file *m, nodemask_t *mask) | 75 | static inline int seq_nodemask_list(struct seq_file *m, nodemask_t *mask) |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 55d67300fa10..5fd389162f01 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -168,6 +168,7 @@ struct skb_shared_hwtstamps { | |||
168 | * @software: generate software time stamp | 168 | * @software: generate software time stamp |
169 | * @in_progress: device driver is going to provide | 169 | * @in_progress: device driver is going to provide |
170 | * hardware time stamp | 170 | * hardware time stamp |
171 | * @flags: all shared_tx flags | ||
171 | * | 172 | * |
172 | * These flags are attached to packets as part of the | 173 | * These flags are attached to packets as part of the |
173 | * &skb_shared_info. Use skb_tx() to get a pointer. | 174 | * &skb_shared_info. Use skb_tx() to get a pointer. |
diff --git a/include/linux/string.h b/include/linux/string.h index d18fc198aa2f..8852739f36df 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/stddef.h> /* for NULL */ | 12 | #include <linux/stddef.h> /* for NULL */ |
13 | 13 | ||
14 | extern char *strndup_user(const char __user *, long); | 14 | extern char *strndup_user(const char __user *, long); |
15 | extern void *memdup_user(const void __user *, size_t); | ||
15 | 16 | ||
16 | /* | 17 | /* |
17 | * Include machine specific inline routines | 18 | * Include machine specific inline routines |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 3435d24bfe55..d3a4c0231933 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -69,7 +69,6 @@ struct svc_serv { | |||
69 | struct list_head sv_tempsocks; /* all temporary sockets */ | 69 | struct list_head sv_tempsocks; /* all temporary sockets */ |
70 | int sv_tmpcnt; /* count of temporary sockets */ | 70 | int sv_tmpcnt; /* count of temporary sockets */ |
71 | struct timer_list sv_temptimer; /* timer for aging temporary sockets */ | 71 | struct timer_list sv_temptimer; /* timer for aging temporary sockets */ |
72 | sa_family_t sv_family; /* listener's address family */ | ||
73 | 72 | ||
74 | char * sv_name; /* service name */ | 73 | char * sv_name; /* service name */ |
75 | 74 | ||
@@ -385,19 +384,19 @@ struct svc_procedure { | |||
385 | /* | 384 | /* |
386 | * Function prototypes. | 385 | * Function prototypes. |
387 | */ | 386 | */ |
388 | struct svc_serv *svc_create(struct svc_program *, unsigned int, sa_family_t, | 387 | struct svc_serv *svc_create(struct svc_program *, unsigned int, |
389 | void (*shutdown)(struct svc_serv *)); | 388 | void (*shutdown)(struct svc_serv *)); |
390 | struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, | 389 | struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, |
391 | struct svc_pool *pool); | 390 | struct svc_pool *pool); |
392 | void svc_exit_thread(struct svc_rqst *); | 391 | void svc_exit_thread(struct svc_rqst *); |
393 | struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, | 392 | struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, |
394 | sa_family_t, void (*shutdown)(struct svc_serv *), | 393 | void (*shutdown)(struct svc_serv *), |
395 | svc_thread_fn, struct module *); | 394 | svc_thread_fn, struct module *); |
396 | int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); | 395 | int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); |
397 | void svc_destroy(struct svc_serv *); | 396 | void svc_destroy(struct svc_serv *); |
398 | int svc_process(struct svc_rqst *); | 397 | int svc_process(struct svc_rqst *); |
399 | int svc_register(const struct svc_serv *, const unsigned short, | 398 | int svc_register(const struct svc_serv *, const int, |
400 | const unsigned short); | 399 | const unsigned short, const unsigned short); |
401 | 400 | ||
402 | void svc_wake_up(struct svc_serv *); | 401 | void svc_wake_up(struct svc_serv *); |
403 | void svc_reserve(struct svc_rqst *rqstp, int space); | 402 | void svc_reserve(struct svc_rqst *rqstp, int space); |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index 0127daca4354..0d9cb6ef28b0 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
@@ -71,7 +71,8 @@ int svc_reg_xprt_class(struct svc_xprt_class *); | |||
71 | void svc_unreg_xprt_class(struct svc_xprt_class *); | 71 | void svc_unreg_xprt_class(struct svc_xprt_class *); |
72 | void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *, | 72 | void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *, |
73 | struct svc_serv *); | 73 | struct svc_serv *); |
74 | int svc_create_xprt(struct svc_serv *, char *, unsigned short, int); | 74 | int svc_create_xprt(struct svc_serv *, const char *, const int, |
75 | const unsigned short, int); | ||
75 | void svc_xprt_enqueue(struct svc_xprt *xprt); | 76 | void svc_xprt_enqueue(struct svc_xprt *xprt); |
76 | void svc_xprt_received(struct svc_xprt *); | 77 | void svc_xprt_received(struct svc_xprt *); |
77 | void svc_xprt_put(struct svc_xprt *xprt); | 78 | void svc_xprt_put(struct svc_xprt *xprt); |
@@ -80,7 +81,8 @@ void svc_close_xprt(struct svc_xprt *xprt); | |||
80 | void svc_delete_xprt(struct svc_xprt *xprt); | 81 | void svc_delete_xprt(struct svc_xprt *xprt); |
81 | int svc_port_is_privileged(struct sockaddr *sin); | 82 | int svc_port_is_privileged(struct sockaddr *sin); |
82 | int svc_print_xprts(char *buf, int maxlen); | 83 | int svc_print_xprts(char *buf, int maxlen); |
83 | struct svc_xprt *svc_find_xprt(struct svc_serv *, char *, int, int); | 84 | struct svc_xprt *svc_find_xprt(struct svc_serv *serv, const char *xcl_name, |
85 | const sa_family_t af, const unsigned short port); | ||
84 | int svc_xprt_names(struct svc_serv *serv, char *buf, int buflen); | 86 | int svc_xprt_names(struct svc_serv *serv, char *buf, int buflen); |
85 | 87 | ||
86 | static inline void svc_xprt_get(struct svc_xprt *xprt) | 88 | static inline void svc_xprt_get(struct svc_xprt *xprt) |
@@ -88,29 +90,32 @@ static inline void svc_xprt_get(struct svc_xprt *xprt) | |||
88 | kref_get(&xprt->xpt_ref); | 90 | kref_get(&xprt->xpt_ref); |
89 | } | 91 | } |
90 | static inline void svc_xprt_set_local(struct svc_xprt *xprt, | 92 | static inline void svc_xprt_set_local(struct svc_xprt *xprt, |
91 | struct sockaddr *sa, int salen) | 93 | const struct sockaddr *sa, |
94 | const size_t salen) | ||
92 | { | 95 | { |
93 | memcpy(&xprt->xpt_local, sa, salen); | 96 | memcpy(&xprt->xpt_local, sa, salen); |
94 | xprt->xpt_locallen = salen; | 97 | xprt->xpt_locallen = salen; |
95 | } | 98 | } |
96 | static inline void svc_xprt_set_remote(struct svc_xprt *xprt, | 99 | static inline void svc_xprt_set_remote(struct svc_xprt *xprt, |
97 | struct sockaddr *sa, int salen) | 100 | const struct sockaddr *sa, |
101 | const size_t salen) | ||
98 | { | 102 | { |
99 | memcpy(&xprt->xpt_remote, sa, salen); | 103 | memcpy(&xprt->xpt_remote, sa, salen); |
100 | xprt->xpt_remotelen = salen; | 104 | xprt->xpt_remotelen = salen; |
101 | } | 105 | } |
102 | static inline unsigned short svc_addr_port(struct sockaddr *sa) | 106 | static inline unsigned short svc_addr_port(const struct sockaddr *sa) |
103 | { | 107 | { |
104 | unsigned short ret = 0; | 108 | const struct sockaddr_in *sin = (const struct sockaddr_in *)sa; |
109 | const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sa; | ||
110 | |||
105 | switch (sa->sa_family) { | 111 | switch (sa->sa_family) { |
106 | case AF_INET: | 112 | case AF_INET: |
107 | ret = ntohs(((struct sockaddr_in *)sa)->sin_port); | 113 | return ntohs(sin->sin_port); |
108 | break; | ||
109 | case AF_INET6: | 114 | case AF_INET6: |
110 | ret = ntohs(((struct sockaddr_in6 *)sa)->sin6_port); | 115 | return ntohs(sin6->sin6_port); |
111 | break; | ||
112 | } | 116 | } |
113 | return ret; | 117 | |
118 | return 0; | ||
114 | } | 119 | } |
115 | 120 | ||
116 | static inline size_t svc_addr_len(struct sockaddr *sa) | 121 | static inline size_t svc_addr_len(struct sockaddr *sa) |
@@ -124,36 +129,39 @@ static inline size_t svc_addr_len(struct sockaddr *sa) | |||
124 | return -EAFNOSUPPORT; | 129 | return -EAFNOSUPPORT; |
125 | } | 130 | } |
126 | 131 | ||
127 | static inline unsigned short svc_xprt_local_port(struct svc_xprt *xprt) | 132 | static inline unsigned short svc_xprt_local_port(const struct svc_xprt *xprt) |
128 | { | 133 | { |
129 | return svc_addr_port((struct sockaddr *)&xprt->xpt_local); | 134 | return svc_addr_port((const struct sockaddr *)&xprt->xpt_local); |
130 | } | 135 | } |
131 | 136 | ||
132 | static inline unsigned short svc_xprt_remote_port(struct svc_xprt *xprt) | 137 | static inline unsigned short svc_xprt_remote_port(const struct svc_xprt *xprt) |
133 | { | 138 | { |
134 | return svc_addr_port((struct sockaddr *)&xprt->xpt_remote); | 139 | return svc_addr_port((const struct sockaddr *)&xprt->xpt_remote); |
135 | } | 140 | } |
136 | 141 | ||
137 | static inline char *__svc_print_addr(struct sockaddr *addr, | 142 | static inline char *__svc_print_addr(const struct sockaddr *addr, |
138 | char *buf, size_t len) | 143 | char *buf, const size_t len) |
139 | { | 144 | { |
145 | const struct sockaddr_in *sin = (const struct sockaddr_in *)addr; | ||
146 | const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)addr; | ||
147 | |||
140 | switch (addr->sa_family) { | 148 | switch (addr->sa_family) { |
141 | case AF_INET: | 149 | case AF_INET: |
142 | snprintf(buf, len, "%pI4, port=%u", | 150 | snprintf(buf, len, "%pI4, port=%u", &sin->sin_addr, |
143 | &((struct sockaddr_in *)addr)->sin_addr, | 151 | ntohs(sin->sin_port)); |
144 | ntohs(((struct sockaddr_in *) addr)->sin_port)); | ||
145 | break; | 152 | break; |
146 | 153 | ||
147 | case AF_INET6: | 154 | case AF_INET6: |
148 | snprintf(buf, len, "%pI6, port=%u", | 155 | snprintf(buf, len, "%pI6, port=%u", |
149 | &((struct sockaddr_in6 *)addr)->sin6_addr, | 156 | &sin6->sin6_addr, |
150 | ntohs(((struct sockaddr_in6 *) addr)->sin6_port)); | 157 | ntohs(sin6->sin6_port)); |
151 | break; | 158 | break; |
152 | 159 | ||
153 | default: | 160 | default: |
154 | snprintf(buf, len, "unknown address type: %d", addr->sa_family); | 161 | snprintf(buf, len, "unknown address type: %d", addr->sa_family); |
155 | break; | 162 | break; |
156 | } | 163 | } |
164 | |||
157 | return buf; | 165 | return buf; |
158 | } | 166 | } |
159 | #endif /* SUNRPC_SVC_XPRT_H */ | 167 | #endif /* SUNRPC_SVC_XPRT_H */ |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 11fc71d50c1e..1758d9f5b5c3 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -235,6 +235,7 @@ static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 * | |||
235 | */ | 235 | */ |
236 | int xprt_register_transport(struct xprt_class *type); | 236 | int xprt_register_transport(struct xprt_class *type); |
237 | int xprt_unregister_transport(struct xprt_class *type); | 237 | int xprt_unregister_transport(struct xprt_class *type); |
238 | int xprt_load_transport(const char *); | ||
238 | void xprt_set_retrans_timeout_def(struct rpc_task *task); | 239 | void xprt_set_retrans_timeout_def(struct rpc_task *task); |
239 | void xprt_set_retrans_timeout_rtt(struct rpc_task *task); | 240 | void xprt_set_retrans_timeout_rtt(struct rpc_task *task); |
240 | void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); | 241 | void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); |
@@ -259,6 +260,7 @@ void xprt_conditional_disconnect(struct rpc_xprt *xprt, unsigned int cookie); | |||
259 | #define XPRT_BOUND (4) | 260 | #define XPRT_BOUND (4) |
260 | #define XPRT_BINDING (5) | 261 | #define XPRT_BINDING (5) |
261 | #define XPRT_CLOSING (6) | 262 | #define XPRT_CLOSING (6) |
263 | #define XPRT_CONNECTION_ABORT (7) | ||
262 | 264 | ||
263 | static inline void xprt_set_connected(struct rpc_xprt *xprt) | 265 | static inline void xprt_set_connected(struct rpc_xprt *xprt) |
264 | { | 266 | { |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index c7d9bb1832ba..3e3a4364cbff 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef _LINUX_SUSPEND_H | 1 | #ifndef _LINUX_SUSPEND_H |
2 | #define _LINUX_SUSPEND_H | 2 | #define _LINUX_SUSPEND_H |
3 | 3 | ||
4 | #if defined(CONFIG_X86) || defined(CONFIG_FRV) || defined(CONFIG_PPC32) || defined(CONFIG_PPC64) | ||
5 | #include <asm/suspend.h> | ||
6 | #endif | ||
7 | #include <linux/swap.h> | 4 | #include <linux/swap.h> |
8 | #include <linux/notifier.h> | 5 | #include <linux/notifier.h> |
9 | #include <linux/init.h> | 6 | #include <linux/init.h> |
diff --git a/include/linux/swap.h b/include/linux/swap.h index d30215578877..62d81435347a 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -212,7 +212,7 @@ static inline void lru_cache_add_active_file(struct page *page) | |||
212 | 212 | ||
213 | /* linux/mm/vmscan.c */ | 213 | /* linux/mm/vmscan.c */ |
214 | extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, | 214 | extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, |
215 | gfp_t gfp_mask); | 215 | gfp_t gfp_mask, nodemask_t *mask); |
216 | extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, | 216 | extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, |
217 | gfp_t gfp_mask, bool noswap, | 217 | gfp_t gfp_mask, bool noswap, |
218 | unsigned int swappiness); | 218 | unsigned int swappiness); |
@@ -382,6 +382,11 @@ static inline struct page *swapin_readahead(swp_entry_t swp, gfp_t gfp_mask, | |||
382 | return NULL; | 382 | return NULL; |
383 | } | 383 | } |
384 | 384 | ||
385 | static inline int swap_writepage(struct page *p, struct writeback_control *wbc) | ||
386 | { | ||
387 | return 0; | ||
388 | } | ||
389 | |||
385 | static inline struct page *lookup_swap_cache(swp_entry_t swp) | 390 | static inline struct page *lookup_swap_cache(swp_entry_t swp) |
386 | { | 391 | { |
387 | return NULL; | 392 | return NULL; |
diff --git a/include/linux/timer.h b/include/linux/timer.h index e2d662e3416e..6cdb6f3331f1 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/ktime.h> | 5 | #include <linux/ktime.h> |
6 | #include <linux/stddef.h> | 6 | #include <linux/stddef.h> |
7 | #include <linux/debugobjects.h> | 7 | #include <linux/debugobjects.h> |
8 | #include <linux/stringify.h> | ||
8 | 9 | ||
9 | struct tvec_base; | 10 | struct tvec_base; |
10 | 11 | ||
@@ -21,52 +22,126 @@ struct timer_list { | |||
21 | char start_comm[16]; | 22 | char start_comm[16]; |
22 | int start_pid; | 23 | int start_pid; |
23 | #endif | 24 | #endif |
25 | #ifdef CONFIG_LOCKDEP | ||
26 | struct lockdep_map lockdep_map; | ||
27 | #endif | ||
24 | }; | 28 | }; |
25 | 29 | ||
26 | extern struct tvec_base boot_tvec_bases; | 30 | extern struct tvec_base boot_tvec_bases; |
27 | 31 | ||
32 | #ifdef CONFIG_LOCKDEP | ||
33 | /* | ||
34 | * NB: because we have to copy the lockdep_map, setting the lockdep_map key | ||
35 | * (second argument) here is required, otherwise it could be initialised to | ||
36 | * the copy of the lockdep_map later! We use the pointer to and the string | ||
37 | * "<file>:<line>" as the key resp. the name of the lockdep_map. | ||
38 | */ | ||
39 | #define __TIMER_LOCKDEP_MAP_INITIALIZER(_kn) \ | ||
40 | .lockdep_map = STATIC_LOCKDEP_MAP_INIT(_kn, &_kn), | ||
41 | #else | ||
42 | #define __TIMER_LOCKDEP_MAP_INITIALIZER(_kn) | ||
43 | #endif | ||
44 | |||
28 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ | 45 | #define TIMER_INITIALIZER(_function, _expires, _data) { \ |
29 | .entry = { .prev = TIMER_ENTRY_STATIC }, \ | 46 | .entry = { .prev = TIMER_ENTRY_STATIC }, \ |
30 | .function = (_function), \ | 47 | .function = (_function), \ |
31 | .expires = (_expires), \ | 48 | .expires = (_expires), \ |
32 | .data = (_data), \ | 49 | .data = (_data), \ |
33 | .base = &boot_tvec_bases, \ | 50 | .base = &boot_tvec_bases, \ |
51 | __TIMER_LOCKDEP_MAP_INITIALIZER( \ | ||
52 | __FILE__ ":" __stringify(__LINE__)) \ | ||
34 | } | 53 | } |
35 | 54 | ||
36 | #define DEFINE_TIMER(_name, _function, _expires, _data) \ | 55 | #define DEFINE_TIMER(_name, _function, _expires, _data) \ |
37 | struct timer_list _name = \ | 56 | struct timer_list _name = \ |
38 | TIMER_INITIALIZER(_function, _expires, _data) | 57 | TIMER_INITIALIZER(_function, _expires, _data) |
39 | 58 | ||
40 | void init_timer(struct timer_list *timer); | 59 | void init_timer_key(struct timer_list *timer, |
41 | void init_timer_deferrable(struct timer_list *timer); | 60 | const char *name, |
61 | struct lock_class_key *key); | ||
62 | void init_timer_deferrable_key(struct timer_list *timer, | ||
63 | const char *name, | ||
64 | struct lock_class_key *key); | ||
65 | |||
66 | #ifdef CONFIG_LOCKDEP | ||
67 | #define init_timer(timer) \ | ||
68 | do { \ | ||
69 | static struct lock_class_key __key; \ | ||
70 | init_timer_key((timer), #timer, &__key); \ | ||
71 | } while (0) | ||
72 | |||
73 | #define init_timer_deferrable(timer) \ | ||
74 | do { \ | ||
75 | static struct lock_class_key __key; \ | ||
76 | init_timer_deferrable_key((timer), #timer, &__key); \ | ||
77 | } while (0) | ||
78 | |||
79 | #define init_timer_on_stack(timer) \ | ||
80 | do { \ | ||
81 | static struct lock_class_key __key; \ | ||
82 | init_timer_on_stack_key((timer), #timer, &__key); \ | ||
83 | } while (0) | ||
84 | |||
85 | #define setup_timer(timer, fn, data) \ | ||
86 | do { \ | ||
87 | static struct lock_class_key __key; \ | ||
88 | setup_timer_key((timer), #timer, &__key, (fn), (data));\ | ||
89 | } while (0) | ||
90 | |||
91 | #define setup_timer_on_stack(timer, fn, data) \ | ||
92 | do { \ | ||
93 | static struct lock_class_key __key; \ | ||
94 | setup_timer_on_stack_key((timer), #timer, &__key, \ | ||
95 | (fn), (data)); \ | ||
96 | } while (0) | ||
97 | #else | ||
98 | #define init_timer(timer)\ | ||
99 | init_timer_key((timer), NULL, NULL) | ||
100 | #define init_timer_deferrable(timer)\ | ||
101 | init_timer_deferrable_key((timer), NULL, NULL) | ||
102 | #define init_timer_on_stack(timer)\ | ||
103 | init_timer_on_stack_key((timer), NULL, NULL) | ||
104 | #define setup_timer(timer, fn, data)\ | ||
105 | setup_timer_key((timer), NULL, NULL, (fn), (data)) | ||
106 | #define setup_timer_on_stack(timer, fn, data)\ | ||
107 | setup_timer_on_stack_key((timer), NULL, NULL, (fn), (data)) | ||
108 | #endif | ||
42 | 109 | ||
43 | #ifdef CONFIG_DEBUG_OBJECTS_TIMERS | 110 | #ifdef CONFIG_DEBUG_OBJECTS_TIMERS |
44 | extern void init_timer_on_stack(struct timer_list *timer); | 111 | extern void init_timer_on_stack_key(struct timer_list *timer, |
112 | const char *name, | ||
113 | struct lock_class_key *key); | ||
45 | extern void destroy_timer_on_stack(struct timer_list *timer); | 114 | extern void destroy_timer_on_stack(struct timer_list *timer); |
46 | #else | 115 | #else |
47 | static inline void destroy_timer_on_stack(struct timer_list *timer) { } | 116 | static inline void destroy_timer_on_stack(struct timer_list *timer) { } |
48 | static inline void init_timer_on_stack(struct timer_list *timer) | 117 | static inline void init_timer_on_stack_key(struct timer_list *timer, |
118 | const char *name, | ||
119 | struct lock_class_key *key) | ||
49 | { | 120 | { |
50 | init_timer(timer); | 121 | init_timer_key(timer, name, key); |
51 | } | 122 | } |
52 | #endif | 123 | #endif |
53 | 124 | ||
54 | static inline void setup_timer(struct timer_list * timer, | 125 | static inline void setup_timer_key(struct timer_list * timer, |
126 | const char *name, | ||
127 | struct lock_class_key *key, | ||
55 | void (*function)(unsigned long), | 128 | void (*function)(unsigned long), |
56 | unsigned long data) | 129 | unsigned long data) |
57 | { | 130 | { |
58 | timer->function = function; | 131 | timer->function = function; |
59 | timer->data = data; | 132 | timer->data = data; |
60 | init_timer(timer); | 133 | init_timer_key(timer, name, key); |
61 | } | 134 | } |
62 | 135 | ||
63 | static inline void setup_timer_on_stack(struct timer_list *timer, | 136 | static inline void setup_timer_on_stack_key(struct timer_list *timer, |
137 | const char *name, | ||
138 | struct lock_class_key *key, | ||
64 | void (*function)(unsigned long), | 139 | void (*function)(unsigned long), |
65 | unsigned long data) | 140 | unsigned long data) |
66 | { | 141 | { |
67 | timer->function = function; | 142 | timer->function = function; |
68 | timer->data = data; | 143 | timer->data = data; |
69 | init_timer_on_stack(timer); | 144 | init_timer_on_stack_key(timer, name, key); |
70 | } | 145 | } |
71 | 146 | ||
72 | /** | 147 | /** |
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 08e088334dba..8615d661ab60 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -252,8 +252,6 @@ struct tty_operations { | |||
252 | void (*set_ldisc)(struct tty_struct *tty); | 252 | void (*set_ldisc)(struct tty_struct *tty); |
253 | void (*wait_until_sent)(struct tty_struct *tty, int timeout); | 253 | void (*wait_until_sent)(struct tty_struct *tty, int timeout); |
254 | void (*send_xchar)(struct tty_struct *tty, char ch); | 254 | void (*send_xchar)(struct tty_struct *tty, char ch); |
255 | int (*read_proc)(char *page, char **start, off_t off, | ||
256 | int count, int *eof, void *data); | ||
257 | int (*tiocmget)(struct tty_struct *tty, struct file *file); | 255 | int (*tiocmget)(struct tty_struct *tty, struct file *file); |
258 | int (*tiocmset)(struct tty_struct *tty, struct file *file, | 256 | int (*tiocmset)(struct tty_struct *tty, struct file *file, |
259 | unsigned int set, unsigned int clear); | 257 | unsigned int set, unsigned int clear); |
@@ -264,6 +262,7 @@ struct tty_operations { | |||
264 | int (*poll_get_char)(struct tty_driver *driver, int line); | 262 | int (*poll_get_char)(struct tty_driver *driver, int line); |
265 | void (*poll_put_char)(struct tty_driver *driver, int line, char ch); | 263 | void (*poll_put_char)(struct tty_driver *driver, int line, char ch); |
266 | #endif | 264 | #endif |
265 | const struct file_operations *proc_fops; | ||
267 | }; | 266 | }; |
268 | 267 | ||
269 | struct tty_driver { | 268 | struct tty_driver { |
diff --git a/include/linux/wait.h b/include/linux/wait.h index a210ede73b56..5d631c17eaee 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -135,8 +135,11 @@ static inline void __remove_wait_queue(wait_queue_head_t *head, | |||
135 | void __wake_up_common(wait_queue_head_t *q, unsigned int mode, | 135 | void __wake_up_common(wait_queue_head_t *q, unsigned int mode, |
136 | int nr_exclusive, int sync, void *key); | 136 | int nr_exclusive, int sync, void *key); |
137 | void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); | 137 | void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); |
138 | extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); | 138 | void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, void *key); |
139 | extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); | 139 | void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode, int nr, |
140 | void *key); | ||
141 | void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); | ||
142 | void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); | ||
140 | void __wake_up_bit(wait_queue_head_t *, void *, int); | 143 | void __wake_up_bit(wait_queue_head_t *, void *, int); |
141 | int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); | 144 | int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); |
142 | int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); | 145 | int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); |
@@ -155,21 +158,17 @@ wait_queue_head_t *bit_waitqueue(void *, int); | |||
155 | #define wake_up_interruptible_all(x) __wake_up(x, TASK_INTERRUPTIBLE, 0, NULL) | 158 | #define wake_up_interruptible_all(x) __wake_up(x, TASK_INTERRUPTIBLE, 0, NULL) |
156 | #define wake_up_interruptible_sync(x) __wake_up_sync((x), TASK_INTERRUPTIBLE, 1) | 159 | #define wake_up_interruptible_sync(x) __wake_up_sync((x), TASK_INTERRUPTIBLE, 1) |
157 | 160 | ||
158 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
159 | /* | 161 | /* |
160 | * macro to avoid include hell | 162 | * Wakeup macros to be used to report events to the targets. |
161 | */ | 163 | */ |
162 | #define wake_up_nested(x, s) \ | 164 | #define wake_up_poll(x, m) \ |
163 | do { \ | 165 | __wake_up(x, TASK_NORMAL, 1, (void *) (m)) |
164 | unsigned long flags; \ | 166 | #define wake_up_locked_poll(x, m) \ |
165 | \ | 167 | __wake_up_locked_key((x), TASK_NORMAL, (void *) (m)) |
166 | spin_lock_irqsave_nested(&(x)->lock, flags, (s)); \ | 168 | #define wake_up_interruptible_poll(x, m) \ |
167 | wake_up_locked(x); \ | 169 | __wake_up(x, TASK_INTERRUPTIBLE, 1, (void *) (m)) |
168 | spin_unlock_irqrestore(&(x)->lock, flags); \ | 170 | #define wake_up_interruptible_sync_poll(x, m) \ |
169 | } while (0) | 171 | __wake_up_sync_key((x), TASK_INTERRUPTIBLE, 1, (void *) (m)) |
170 | #else | ||
171 | #define wake_up_nested(x, s) wake_up(x) | ||
172 | #endif | ||
173 | 172 | ||
174 | #define __wait_event(wq, condition) \ | 173 | #define __wait_event(wq, condition) \ |
175 | do { \ | 174 | do { \ |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 7300ecdc480c..93445477f86a 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -109,8 +109,8 @@ extern int dirty_background_ratio; | |||
109 | extern unsigned long dirty_background_bytes; | 109 | extern unsigned long dirty_background_bytes; |
110 | extern int vm_dirty_ratio; | 110 | extern int vm_dirty_ratio; |
111 | extern unsigned long vm_dirty_bytes; | 111 | extern unsigned long vm_dirty_bytes; |
112 | extern int dirty_writeback_interval; | 112 | extern unsigned int dirty_writeback_interval; |
113 | extern int dirty_expire_interval; | 113 | extern unsigned int dirty_expire_interval; |
114 | extern int vm_highmem_is_dirtyable; | 114 | extern int vm_highmem_is_dirtyable; |
115 | extern int block_dump; | 115 | extern int block_dump; |
116 | extern int laptop_mode; | 116 | extern int laptop_mode; |
diff --git a/include/video/aty128.h b/include/video/aty128.h index 51ac69f05bdc..f0851e3bb7cc 100644 --- a/include/video/aty128.h +++ b/include/video/aty128.h | |||
@@ -415,7 +415,7 @@ | |||
415 | #define PWR_MGT_SLOWDOWN_MCLK 0x00002000 | 415 | #define PWR_MGT_SLOWDOWN_MCLK 0x00002000 |
416 | 416 | ||
417 | #define PMI_PMSCR_REG 0x60 | 417 | #define PMI_PMSCR_REG 0x60 |
418 | 418 | ||
419 | /* used by ATI bug fix for hardware ROM */ | 419 | /* used by ATI bug fix for hardware ROM */ |
420 | #define RAGE128_MPP_TB_CONFIG 0x01c0 | 420 | #define RAGE128_MPP_TB_CONFIG 0x01c0 |
421 | 421 | ||
diff --git a/include/video/cirrus.h b/include/video/cirrus.h index b2776b6c8679..9a5e9ee30782 100644 --- a/include/video/cirrus.h +++ b/include/video/cirrus.h | |||
@@ -32,7 +32,6 @@ | |||
32 | #define CL_VSSM2 0x3c3 /* Motherboard Sleep */ | 32 | #define CL_VSSM2 0x3c3 /* Motherboard Sleep */ |
33 | 33 | ||
34 | /*** VGA Sequencer Registers ***/ | 34 | /*** VGA Sequencer Registers ***/ |
35 | #define CL_SEQR0 0x0 /* Reset */ | ||
36 | /* the following are from the "extension registers" group */ | 35 | /* the following are from the "extension registers" group */ |
37 | #define CL_SEQR6 0x6 /* Unlock ALL Extensions */ | 36 | #define CL_SEQR6 0x6 /* Unlock ALL Extensions */ |
38 | #define CL_SEQR7 0x7 /* Extended Sequencer Mode */ | 37 | #define CL_SEQR7 0x7 /* Extended Sequencer Mode */ |
@@ -71,6 +70,7 @@ | |||
71 | #define CL_CRT1B 0x1b /* Extended Display Controls */ | 70 | #define CL_CRT1B 0x1b /* Extended Display Controls */ |
72 | #define CL_CRT1C 0x1c /* Sync adjust and genlock register */ | 71 | #define CL_CRT1C 0x1c /* Sync adjust and genlock register */ |
73 | #define CL_CRT1D 0x1d /* Overlay Extended Control register */ | 72 | #define CL_CRT1D 0x1d /* Overlay Extended Control register */ |
73 | #define CL_CRT1E 0x1e /* Another overflow register */ | ||
74 | #define CL_CRT25 0x25 /* Part Status Register */ | 74 | #define CL_CRT25 0x25 /* Part Status Register */ |
75 | #define CL_CRT27 0x27 /* ID Register */ | 75 | #define CL_CRT27 0x27 /* ID Register */ |
76 | #define CL_CRT51 0x51 /* P4 disable "flicker fixer" */ | 76 | #define CL_CRT51 0x51 /* P4 disable "flicker fixer" */ |
diff --git a/include/video/newport.h b/include/video/newport.h index 1f5ebeaa818f..001b935e71c4 100644 --- a/include/video/newport.h +++ b/include/video/newport.h | |||
@@ -453,7 +453,7 @@ static __inline__ int newport_wait(struct newport_regs *regs) | |||
453 | { | 453 | { |
454 | int t = BUSY_TIMEOUT; | 454 | int t = BUSY_TIMEOUT; |
455 | 455 | ||
456 | while (t--) | 456 | while (--t) |
457 | if (!(regs->cset.status & NPORT_STAT_GBUSY)) | 457 | if (!(regs->cset.status & NPORT_STAT_GBUSY)) |
458 | break; | 458 | break; |
459 | return !t; | 459 | return !t; |
@@ -463,7 +463,7 @@ static __inline__ int newport_bfwait(struct newport_regs *regs) | |||
463 | { | 463 | { |
464 | int t = BUSY_TIMEOUT; | 464 | int t = BUSY_TIMEOUT; |
465 | 465 | ||
466 | while (t--) | 466 | while (--t) |
467 | if(!(regs->cset.status & NPORT_STAT_BBUSY)) | 467 | if(!(regs->cset.status & NPORT_STAT_BBUSY)) |
468 | break; | 468 | break; |
469 | return !t; | 469 | return !t; |
diff --git a/include/video/radeon.h b/include/video/radeon.h index e072b16b39ab..56b188abfb54 100644 --- a/include/video/radeon.h +++ b/include/video/radeon.h | |||
@@ -5,12 +5,12 @@ | |||
5 | #define RADEON_REGSIZE 0x4000 | 5 | #define RADEON_REGSIZE 0x4000 |
6 | 6 | ||
7 | 7 | ||
8 | #define MM_INDEX 0x0000 | 8 | #define MM_INDEX 0x0000 |
9 | #define MM_DATA 0x0004 | 9 | #define MM_DATA 0x0004 |
10 | #define BUS_CNTL 0x0030 | 10 | #define BUS_CNTL 0x0030 |
11 | #define HI_STAT 0x004C | 11 | #define HI_STAT 0x004C |
12 | #define BUS_CNTL1 0x0034 | 12 | #define BUS_CNTL1 0x0034 |
13 | #define I2C_CNTL_1 0x0094 | 13 | #define I2C_CNTL_1 0x0094 |
14 | #define CNFG_CNTL 0x00E0 | 14 | #define CNFG_CNTL 0x00E0 |
15 | #define CNFG_MEMSIZE 0x00F8 | 15 | #define CNFG_MEMSIZE 0x00F8 |
16 | #define CNFG_APER_0_BASE 0x0100 | 16 | #define CNFG_APER_0_BASE 0x0100 |
@@ -18,8 +18,8 @@ | |||
18 | #define CNFG_APER_SIZE 0x0108 | 18 | #define CNFG_APER_SIZE 0x0108 |
19 | #define CNFG_REG_1_BASE 0x010C | 19 | #define CNFG_REG_1_BASE 0x010C |
20 | #define CNFG_REG_APER_SIZE 0x0110 | 20 | #define CNFG_REG_APER_SIZE 0x0110 |
21 | #define PAD_AGPINPUT_DELAY 0x0164 | 21 | #define PAD_AGPINPUT_DELAY 0x0164 |
22 | #define PAD_CTLR_STRENGTH 0x0168 | 22 | #define PAD_CTLR_STRENGTH 0x0168 |
23 | #define PAD_CTLR_UPDATE 0x016C | 23 | #define PAD_CTLR_UPDATE 0x016C |
24 | #define PAD_CTLR_MISC 0x0aa0 | 24 | #define PAD_CTLR_MISC 0x0aa0 |
25 | #define AGP_CNTL 0x0174 | 25 | #define AGP_CNTL 0x0174 |
@@ -27,171 +27,171 @@ | |||
27 | #define CAP0_TRIG_CNTL 0x0950 | 27 | #define CAP0_TRIG_CNTL 0x0950 |
28 | #define CAP1_TRIG_CNTL 0x09c0 | 28 | #define CAP1_TRIG_CNTL 0x09c0 |
29 | #define VIPH_CONTROL 0x0C40 | 29 | #define VIPH_CONTROL 0x0C40 |
30 | #define VENDOR_ID 0x0F00 | 30 | #define VENDOR_ID 0x0F00 |
31 | #define DEVICE_ID 0x0F02 | 31 | #define DEVICE_ID 0x0F02 |
32 | #define COMMAND 0x0F04 | 32 | #define COMMAND 0x0F04 |
33 | #define STATUS 0x0F06 | 33 | #define STATUS 0x0F06 |
34 | #define REVISION_ID 0x0F08 | 34 | #define REVISION_ID 0x0F08 |
35 | #define REGPROG_INF 0x0F09 | 35 | #define REGPROG_INF 0x0F09 |
36 | #define SUB_CLASS 0x0F0A | 36 | #define SUB_CLASS 0x0F0A |
37 | #define BASE_CODE 0x0F0B | 37 | #define BASE_CODE 0x0F0B |
38 | #define CACHE_LINE 0x0F0C | 38 | #define CACHE_LINE 0x0F0C |
39 | #define LATENCY 0x0F0D | 39 | #define LATENCY 0x0F0D |
40 | #define HEADER 0x0F0E | 40 | #define HEADER 0x0F0E |
41 | #define BIST 0x0F0F | 41 | #define BIST 0x0F0F |
42 | #define REG_MEM_BASE 0x0F10 | 42 | #define REG_MEM_BASE 0x0F10 |
43 | #define REG_IO_BASE 0x0F14 | 43 | #define REG_IO_BASE 0x0F14 |
44 | #define REG_REG_BASE 0x0F18 | 44 | #define REG_REG_BASE 0x0F18 |
45 | #define ADAPTER_ID 0x0F2C | 45 | #define ADAPTER_ID 0x0F2C |
46 | #define BIOS_ROM 0x0F30 | 46 | #define BIOS_ROM 0x0F30 |
47 | #define CAPABILITIES_PTR 0x0F34 | 47 | #define CAPABILITIES_PTR 0x0F34 |
48 | #define INTERRUPT_LINE 0x0F3C | 48 | #define INTERRUPT_LINE 0x0F3C |
49 | #define INTERRUPT_PIN 0x0F3D | 49 | #define INTERRUPT_PIN 0x0F3D |
50 | #define MIN_GRANT 0x0F3E | 50 | #define MIN_GRANT 0x0F3E |
51 | #define MAX_LATENCY 0x0F3F | 51 | #define MAX_LATENCY 0x0F3F |
52 | #define ADAPTER_ID_W 0x0F4C | 52 | #define ADAPTER_ID_W 0x0F4C |
53 | #define PMI_CAP_ID 0x0F50 | 53 | #define PMI_CAP_ID 0x0F50 |
54 | #define PMI_NXT_CAP_PTR 0x0F51 | 54 | #define PMI_NXT_CAP_PTR 0x0F51 |
55 | #define PMI_PMC_REG 0x0F52 | 55 | #define PMI_PMC_REG 0x0F52 |
56 | #define PM_STATUS 0x0F54 | 56 | #define PM_STATUS 0x0F54 |
57 | #define PMI_DATA 0x0F57 | 57 | #define PMI_DATA 0x0F57 |
58 | #define AGP_CAP_ID 0x0F58 | 58 | #define AGP_CAP_ID 0x0F58 |
59 | #define AGP_STATUS 0x0F5C | 59 | #define AGP_STATUS 0x0F5C |
60 | #define AGP_COMMAND 0x0F60 | 60 | #define AGP_COMMAND 0x0F60 |
61 | #define AIC_CTRL 0x01D0 | 61 | #define AIC_CTRL 0x01D0 |
62 | #define AIC_STAT 0x01D4 | 62 | #define AIC_STAT 0x01D4 |
63 | #define AIC_PT_BASE 0x01D8 | 63 | #define AIC_PT_BASE 0x01D8 |
64 | #define AIC_LO_ADDR 0x01DC | 64 | #define AIC_LO_ADDR 0x01DC |
65 | #define AIC_HI_ADDR 0x01E0 | 65 | #define AIC_HI_ADDR 0x01E0 |
66 | #define AIC_TLB_ADDR 0x01E4 | 66 | #define AIC_TLB_ADDR 0x01E4 |
67 | #define AIC_TLB_DATA 0x01E8 | 67 | #define AIC_TLB_DATA 0x01E8 |
68 | #define DAC_CNTL 0x0058 | 68 | #define DAC_CNTL 0x0058 |
69 | #define DAC_CNTL2 0x007c | 69 | #define DAC_CNTL2 0x007c |
70 | #define CRTC_GEN_CNTL 0x0050 | 70 | #define CRTC_GEN_CNTL 0x0050 |
71 | #define MEM_CNTL 0x0140 | 71 | #define MEM_CNTL 0x0140 |
72 | #define MC_CNTL 0x0140 | 72 | #define MC_CNTL 0x0140 |
73 | #define EXT_MEM_CNTL 0x0144 | 73 | #define EXT_MEM_CNTL 0x0144 |
74 | #define MC_TIMING_CNTL 0x0144 | 74 | #define MC_TIMING_CNTL 0x0144 |
75 | #define MC_AGP_LOCATION 0x014C | 75 | #define MC_AGP_LOCATION 0x014C |
76 | #define MEM_IO_CNTL_A0 0x0178 | 76 | #define MEM_IO_CNTL_A0 0x0178 |
77 | #define MEM_REFRESH_CNTL 0x0178 | 77 | #define MEM_REFRESH_CNTL 0x0178 |
78 | #define MEM_INIT_LATENCY_TIMER 0x0154 | 78 | #define MEM_INIT_LATENCY_TIMER 0x0154 |
79 | #define MC_INIT_GFX_LAT_TIMER 0x0154 | 79 | #define MC_INIT_GFX_LAT_TIMER 0x0154 |
80 | #define MEM_SDRAM_MODE_REG 0x0158 | 80 | #define MEM_SDRAM_MODE_REG 0x0158 |
81 | #define AGP_BASE 0x0170 | 81 | #define AGP_BASE 0x0170 |
82 | #define MEM_IO_CNTL_A1 0x017C | 82 | #define MEM_IO_CNTL_A1 0x017C |
83 | #define MC_READ_CNTL_AB 0x017C | 83 | #define MC_READ_CNTL_AB 0x017C |
84 | #define MEM_IO_CNTL_B0 0x0180 | 84 | #define MEM_IO_CNTL_B0 0x0180 |
85 | #define MC_INIT_MISC_LAT_TIMER 0x0180 | 85 | #define MC_INIT_MISC_LAT_TIMER 0x0180 |
86 | #define MEM_IO_CNTL_B1 0x0184 | 86 | #define MEM_IO_CNTL_B1 0x0184 |
87 | #define MC_IOPAD_CNTL 0x0184 | 87 | #define MC_IOPAD_CNTL 0x0184 |
88 | #define MC_DEBUG 0x0188 | 88 | #define MC_DEBUG 0x0188 |
89 | #define MC_STATUS 0x0150 | 89 | #define MC_STATUS 0x0150 |
90 | #define MEM_IO_OE_CNTL 0x018C | 90 | #define MEM_IO_OE_CNTL 0x018C |
91 | #define MC_CHIP_IO_OE_CNTL_AB 0x018C | 91 | #define MC_CHIP_IO_OE_CNTL_AB 0x018C |
92 | #define MC_FB_LOCATION 0x0148 | 92 | #define MC_FB_LOCATION 0x0148 |
93 | #define HOST_PATH_CNTL 0x0130 | 93 | #define HOST_PATH_CNTL 0x0130 |
94 | #define MEM_VGA_WP_SEL 0x0038 | 94 | #define MEM_VGA_WP_SEL 0x0038 |
95 | #define MEM_VGA_RP_SEL 0x003C | 95 | #define MEM_VGA_RP_SEL 0x003C |
96 | #define HDP_DEBUG 0x0138 | 96 | #define HDP_DEBUG 0x0138 |
97 | #define SW_SEMAPHORE 0x013C | 97 | #define SW_SEMAPHORE 0x013C |
98 | #define CRTC2_GEN_CNTL 0x03f8 | 98 | #define CRTC2_GEN_CNTL 0x03f8 |
99 | #define CRTC2_DISPLAY_BASE_ADDR 0x033c | 99 | #define CRTC2_DISPLAY_BASE_ADDR 0x033c |
100 | #define SURFACE_CNTL 0x0B00 | 100 | #define SURFACE_CNTL 0x0B00 |
101 | #define SURFACE0_LOWER_BOUND 0x0B04 | 101 | #define SURFACE0_LOWER_BOUND 0x0B04 |
102 | #define SURFACE1_LOWER_BOUND 0x0B14 | 102 | #define SURFACE1_LOWER_BOUND 0x0B14 |
103 | #define SURFACE2_LOWER_BOUND 0x0B24 | 103 | #define SURFACE2_LOWER_BOUND 0x0B24 |
104 | #define SURFACE3_LOWER_BOUND 0x0B34 | 104 | #define SURFACE3_LOWER_BOUND 0x0B34 |
105 | #define SURFACE4_LOWER_BOUND 0x0B44 | 105 | #define SURFACE4_LOWER_BOUND 0x0B44 |
106 | #define SURFACE5_LOWER_BOUND 0x0B54 | 106 | #define SURFACE5_LOWER_BOUND 0x0B54 |
107 | #define SURFACE6_LOWER_BOUND 0x0B64 | 107 | #define SURFACE6_LOWER_BOUND 0x0B64 |
108 | #define SURFACE7_LOWER_BOUND 0x0B74 | 108 | #define SURFACE7_LOWER_BOUND 0x0B74 |
109 | #define SURFACE0_UPPER_BOUND 0x0B08 | 109 | #define SURFACE0_UPPER_BOUND 0x0B08 |
110 | #define SURFACE1_UPPER_BOUND 0x0B18 | 110 | #define SURFACE1_UPPER_BOUND 0x0B18 |
111 | #define SURFACE2_UPPER_BOUND 0x0B28 | 111 | #define SURFACE2_UPPER_BOUND 0x0B28 |
112 | #define SURFACE3_UPPER_BOUND 0x0B38 | 112 | #define SURFACE3_UPPER_BOUND 0x0B38 |
113 | #define SURFACE4_UPPER_BOUND 0x0B48 | 113 | #define SURFACE4_UPPER_BOUND 0x0B48 |
114 | #define SURFACE5_UPPER_BOUND 0x0B58 | 114 | #define SURFACE5_UPPER_BOUND 0x0B58 |
115 | #define SURFACE6_UPPER_BOUND 0x0B68 | 115 | #define SURFACE6_UPPER_BOUND 0x0B68 |
116 | #define SURFACE7_UPPER_BOUND 0x0B78 | 116 | #define SURFACE7_UPPER_BOUND 0x0B78 |
117 | #define SURFACE0_INFO 0x0B0C | 117 | #define SURFACE0_INFO 0x0B0C |
118 | #define SURFACE1_INFO 0x0B1C | 118 | #define SURFACE1_INFO 0x0B1C |
119 | #define SURFACE2_INFO 0x0B2C | 119 | #define SURFACE2_INFO 0x0B2C |
120 | #define SURFACE3_INFO 0x0B3C | 120 | #define SURFACE3_INFO 0x0B3C |
121 | #define SURFACE4_INFO 0x0B4C | 121 | #define SURFACE4_INFO 0x0B4C |
122 | #define SURFACE5_INFO 0x0B5C | 122 | #define SURFACE5_INFO 0x0B5C |
123 | #define SURFACE6_INFO 0x0B6C | 123 | #define SURFACE6_INFO 0x0B6C |
124 | #define SURFACE7_INFO 0x0B7C | 124 | #define SURFACE7_INFO 0x0B7C |
125 | #define SURFACE_ACCESS_FLAGS 0x0BF8 | 125 | #define SURFACE_ACCESS_FLAGS 0x0BF8 |
126 | #define SURFACE_ACCESS_CLR 0x0BFC | 126 | #define SURFACE_ACCESS_CLR 0x0BFC |
127 | #define GEN_INT_CNTL 0x0040 | 127 | #define GEN_INT_CNTL 0x0040 |
128 | #define GEN_INT_STATUS 0x0044 | 128 | #define GEN_INT_STATUS 0x0044 |
129 | #define CRTC_EXT_CNTL 0x0054 | 129 | #define CRTC_EXT_CNTL 0x0054 |
130 | #define RB3D_CNTL 0x1C3C | 130 | #define RB3D_CNTL 0x1C3C |
131 | #define WAIT_UNTIL 0x1720 | 131 | #define WAIT_UNTIL 0x1720 |
132 | #define ISYNC_CNTL 0x1724 | 132 | #define ISYNC_CNTL 0x1724 |
133 | #define RBBM_GUICNTL 0x172C | 133 | #define RBBM_GUICNTL 0x172C |
134 | #define RBBM_STATUS 0x0E40 | 134 | #define RBBM_STATUS 0x0E40 |
135 | #define RBBM_STATUS_alt_1 0x1740 | 135 | #define RBBM_STATUS_alt_1 0x1740 |
136 | #define RBBM_CNTL 0x00EC | 136 | #define RBBM_CNTL 0x00EC |
137 | #define RBBM_CNTL_alt_1 0x0E44 | 137 | #define RBBM_CNTL_alt_1 0x0E44 |
138 | #define RBBM_SOFT_RESET 0x00F0 | 138 | #define RBBM_SOFT_RESET 0x00F0 |
139 | #define RBBM_SOFT_RESET_alt_1 0x0E48 | 139 | #define RBBM_SOFT_RESET_alt_1 0x0E48 |
140 | #define NQWAIT_UNTIL 0x0E50 | 140 | #define NQWAIT_UNTIL 0x0E50 |
141 | #define RBBM_DEBUG 0x0E6C | 141 | #define RBBM_DEBUG 0x0E6C |
142 | #define RBBM_CMDFIFO_ADDR 0x0E70 | 142 | #define RBBM_CMDFIFO_ADDR 0x0E70 |
143 | #define RBBM_CMDFIFO_DATAL 0x0E74 | 143 | #define RBBM_CMDFIFO_DATAL 0x0E74 |
144 | #define RBBM_CMDFIFO_DATAH 0x0E78 | 144 | #define RBBM_CMDFIFO_DATAH 0x0E78 |
145 | #define RBBM_CMDFIFO_STAT 0x0E7C | 145 | #define RBBM_CMDFIFO_STAT 0x0E7C |
146 | #define CRTC_STATUS 0x005C | 146 | #define CRTC_STATUS 0x005C |
147 | #define GPIO_VGA_DDC 0x0060 | 147 | #define GPIO_VGA_DDC 0x0060 |
148 | #define GPIO_DVI_DDC 0x0064 | 148 | #define GPIO_DVI_DDC 0x0064 |
149 | #define GPIO_MONID 0x0068 | 149 | #define GPIO_MONID 0x0068 |
150 | #define GPIO_CRT2_DDC 0x006c | 150 | #define GPIO_CRT2_DDC 0x006c |
151 | #define PALETTE_INDEX 0x00B0 | 151 | #define PALETTE_INDEX 0x00B0 |
152 | #define PALETTE_DATA 0x00B4 | 152 | #define PALETTE_DATA 0x00B4 |
153 | #define PALETTE_30_DATA 0x00B8 | 153 | #define PALETTE_30_DATA 0x00B8 |
154 | #define CRTC_H_TOTAL_DISP 0x0200 | 154 | #define CRTC_H_TOTAL_DISP 0x0200 |
155 | #define CRTC_H_SYNC_STRT_WID 0x0204 | 155 | #define CRTC_H_SYNC_STRT_WID 0x0204 |
156 | #define CRTC_V_TOTAL_DISP 0x0208 | 156 | #define CRTC_V_TOTAL_DISP 0x0208 |
157 | #define CRTC_V_SYNC_STRT_WID 0x020C | 157 | #define CRTC_V_SYNC_STRT_WID 0x020C |
158 | #define CRTC_VLINE_CRNT_VLINE 0x0210 | 158 | #define CRTC_VLINE_CRNT_VLINE 0x0210 |
159 | #define CRTC_CRNT_FRAME 0x0214 | 159 | #define CRTC_CRNT_FRAME 0x0214 |
160 | #define CRTC_GUI_TRIG_VLINE 0x0218 | 160 | #define CRTC_GUI_TRIG_VLINE 0x0218 |
161 | #define CRTC_DEBUG 0x021C | 161 | #define CRTC_DEBUG 0x021C |
162 | #define CRTC_OFFSET_RIGHT 0x0220 | 162 | #define CRTC_OFFSET_RIGHT 0x0220 |
163 | #define CRTC_OFFSET 0x0224 | 163 | #define CRTC_OFFSET 0x0224 |
164 | #define CRTC_OFFSET_CNTL 0x0228 | 164 | #define CRTC_OFFSET_CNTL 0x0228 |
165 | #define CRTC_PITCH 0x022C | 165 | #define CRTC_PITCH 0x022C |
166 | #define OVR_CLR 0x0230 | 166 | #define OVR_CLR 0x0230 |
167 | #define OVR_WID_LEFT_RIGHT 0x0234 | 167 | #define OVR_WID_LEFT_RIGHT 0x0234 |
168 | #define OVR_WID_TOP_BOTTOM 0x0238 | 168 | #define OVR_WID_TOP_BOTTOM 0x0238 |
169 | #define DISPLAY_BASE_ADDR 0x023C | 169 | #define DISPLAY_BASE_ADDR 0x023C |
170 | #define SNAPSHOT_VH_COUNTS 0x0240 | 170 | #define SNAPSHOT_VH_COUNTS 0x0240 |
171 | #define SNAPSHOT_F_COUNT 0x0244 | 171 | #define SNAPSHOT_F_COUNT 0x0244 |
172 | #define N_VIF_COUNT 0x0248 | 172 | #define N_VIF_COUNT 0x0248 |
173 | #define SNAPSHOT_VIF_COUNT 0x024C | 173 | #define SNAPSHOT_VIF_COUNT 0x024C |
174 | #define FP_CRTC_H_TOTAL_DISP 0x0250 | 174 | #define FP_CRTC_H_TOTAL_DISP 0x0250 |
175 | #define FP_CRTC_V_TOTAL_DISP 0x0254 | 175 | #define FP_CRTC_V_TOTAL_DISP 0x0254 |
176 | #define CRT_CRTC_H_SYNC_STRT_WID 0x0258 | 176 | #define CRT_CRTC_H_SYNC_STRT_WID 0x0258 |
177 | #define CRT_CRTC_V_SYNC_STRT_WID 0x025C | 177 | #define CRT_CRTC_V_SYNC_STRT_WID 0x025C |
178 | #define CUR_OFFSET 0x0260 | 178 | #define CUR_OFFSET 0x0260 |
179 | #define CUR_HORZ_VERT_POSN 0x0264 | 179 | #define CUR_HORZ_VERT_POSN 0x0264 |
180 | #define CUR_HORZ_VERT_OFF 0x0268 | 180 | #define CUR_HORZ_VERT_OFF 0x0268 |
181 | #define CUR_CLR0 0x026C | 181 | #define CUR_CLR0 0x026C |
182 | #define CUR_CLR1 0x0270 | 182 | #define CUR_CLR1 0x0270 |
183 | #define FP_HORZ_VERT_ACTIVE 0x0278 | 183 | #define FP_HORZ_VERT_ACTIVE 0x0278 |
184 | #define CRTC_MORE_CNTL 0x027C | 184 | #define CRTC_MORE_CNTL 0x027C |
185 | #define CRTC_H_CUTOFF_ACTIVE_EN (1<<4) | 185 | #define CRTC_H_CUTOFF_ACTIVE_EN (1<<4) |
186 | #define CRTC_V_CUTOFF_ACTIVE_EN (1<<5) | 186 | #define CRTC_V_CUTOFF_ACTIVE_EN (1<<5) |
187 | #define DAC_EXT_CNTL 0x0280 | 187 | #define DAC_EXT_CNTL 0x0280 |
188 | #define FP_GEN_CNTL 0x0284 | 188 | #define FP_GEN_CNTL 0x0284 |
189 | #define FP_HORZ_STRETCH 0x028C | 189 | #define FP_HORZ_STRETCH 0x028C |
190 | #define FP_VERT_STRETCH 0x0290 | 190 | #define FP_VERT_STRETCH 0x0290 |
191 | #define FP_H_SYNC_STRT_WID 0x02C4 | 191 | #define FP_H_SYNC_STRT_WID 0x02C4 |
192 | #define FP_V_SYNC_STRT_WID 0x02C8 | 192 | #define FP_V_SYNC_STRT_WID 0x02C8 |
193 | #define AUX_WINDOW_HORZ_CNTL 0x02D8 | 193 | #define AUX_WINDOW_HORZ_CNTL 0x02D8 |
194 | #define AUX_WINDOW_VERT_CNTL 0x02DC | 194 | #define AUX_WINDOW_VERT_CNTL 0x02DC |
195 | //#define DDA_CONFIG 0x02e0 | 195 | //#define DDA_CONFIG 0x02e0 |
196 | //#define DDA_ON_OFF 0x02e4 | 196 | //#define DDA_ON_OFF 0x02e4 |
197 | #define DVI_I2C_CNTL_1 0x02e4 | 197 | #define DVI_I2C_CNTL_1 0x02e4 |
@@ -199,192 +199,192 @@ | |||
199 | #define GRPH2_BUFFER_CNTL 0x03F0 | 199 | #define GRPH2_BUFFER_CNTL 0x03F0 |
200 | #define VGA_BUFFER_CNTL 0x02F4 | 200 | #define VGA_BUFFER_CNTL 0x02F4 |
201 | #define OV0_Y_X_START 0x0400 | 201 | #define OV0_Y_X_START 0x0400 |
202 | #define OV0_Y_X_END 0x0404 | 202 | #define OV0_Y_X_END 0x0404 |
203 | #define OV0_PIPELINE_CNTL 0x0408 | 203 | #define OV0_PIPELINE_CNTL 0x0408 |
204 | #define OV0_REG_LOAD_CNTL 0x0410 | 204 | #define OV0_REG_LOAD_CNTL 0x0410 |
205 | #define OV0_SCALE_CNTL 0x0420 | 205 | #define OV0_SCALE_CNTL 0x0420 |
206 | #define OV0_V_INC 0x0424 | 206 | #define OV0_V_INC 0x0424 |
207 | #define OV0_P1_V_ACCUM_INIT 0x0428 | 207 | #define OV0_P1_V_ACCUM_INIT 0x0428 |
208 | #define OV0_P23_V_ACCUM_INIT 0x042C | 208 | #define OV0_P23_V_ACCUM_INIT 0x042C |
209 | #define OV0_P1_BLANK_LINES_AT_TOP 0x0430 | 209 | #define OV0_P1_BLANK_LINES_AT_TOP 0x0430 |
210 | #define OV0_P23_BLANK_LINES_AT_TOP 0x0434 | 210 | #define OV0_P23_BLANK_LINES_AT_TOP 0x0434 |
211 | #define OV0_BASE_ADDR 0x043C | 211 | #define OV0_BASE_ADDR 0x043C |
212 | #define OV0_VID_BUF0_BASE_ADRS 0x0440 | 212 | #define OV0_VID_BUF0_BASE_ADRS 0x0440 |
213 | #define OV0_VID_BUF1_BASE_ADRS 0x0444 | 213 | #define OV0_VID_BUF1_BASE_ADRS 0x0444 |
214 | #define OV0_VID_BUF2_BASE_ADRS 0x0448 | 214 | #define OV0_VID_BUF2_BASE_ADRS 0x0448 |
215 | #define OV0_VID_BUF3_BASE_ADRS 0x044C | 215 | #define OV0_VID_BUF3_BASE_ADRS 0x044C |
216 | #define OV0_VID_BUF4_BASE_ADRS 0x0450 | 216 | #define OV0_VID_BUF4_BASE_ADRS 0x0450 |
217 | #define OV0_VID_BUF5_BASE_ADRS 0x0454 | 217 | #define OV0_VID_BUF5_BASE_ADRS 0x0454 |
218 | #define OV0_VID_BUF_PITCH0_VALUE 0x0460 | 218 | #define OV0_VID_BUF_PITCH0_VALUE 0x0460 |
219 | #define OV0_VID_BUF_PITCH1_VALUE 0x0464 | 219 | #define OV0_VID_BUF_PITCH1_VALUE 0x0464 |
220 | #define OV0_AUTO_FLIP_CNTRL 0x0470 | 220 | #define OV0_AUTO_FLIP_CNTRL 0x0470 |
221 | #define OV0_DEINTERLACE_PATTERN 0x0474 | 221 | #define OV0_DEINTERLACE_PATTERN 0x0474 |
222 | #define OV0_SUBMIT_HISTORY 0x0478 | 222 | #define OV0_SUBMIT_HISTORY 0x0478 |
223 | #define OV0_H_INC 0x0480 | 223 | #define OV0_H_INC 0x0480 |
224 | #define OV0_STEP_BY 0x0484 | 224 | #define OV0_STEP_BY 0x0484 |
225 | #define OV0_P1_H_ACCUM_INIT 0x0488 | 225 | #define OV0_P1_H_ACCUM_INIT 0x0488 |
226 | #define OV0_P23_H_ACCUM_INIT 0x048C | 226 | #define OV0_P23_H_ACCUM_INIT 0x048C |
227 | #define OV0_P1_X_START_END 0x0494 | 227 | #define OV0_P1_X_START_END 0x0494 |
228 | #define OV0_P2_X_START_END 0x0498 | 228 | #define OV0_P2_X_START_END 0x0498 |
229 | #define OV0_P3_X_START_END 0x049C | 229 | #define OV0_P3_X_START_END 0x049C |
230 | #define OV0_FILTER_CNTL 0x04A0 | 230 | #define OV0_FILTER_CNTL 0x04A0 |
231 | #define OV0_FOUR_TAP_COEF_0 0x04B0 | 231 | #define OV0_FOUR_TAP_COEF_0 0x04B0 |
232 | #define OV0_FOUR_TAP_COEF_1 0x04B4 | 232 | #define OV0_FOUR_TAP_COEF_1 0x04B4 |
233 | #define OV0_FOUR_TAP_COEF_2 0x04B8 | 233 | #define OV0_FOUR_TAP_COEF_2 0x04B8 |
234 | #define OV0_FOUR_TAP_COEF_3 0x04BC | 234 | #define OV0_FOUR_TAP_COEF_3 0x04BC |
235 | #define OV0_FOUR_TAP_COEF_4 0x04C0 | 235 | #define OV0_FOUR_TAP_COEF_4 0x04C0 |
236 | #define OV0_FLAG_CNTRL 0x04DC | 236 | #define OV0_FLAG_CNTRL 0x04DC |
237 | #define OV0_SLICE_CNTL 0x04E0 | 237 | #define OV0_SLICE_CNTL 0x04E0 |
238 | #define OV0_VID_KEY_CLR_LOW 0x04E4 | 238 | #define OV0_VID_KEY_CLR_LOW 0x04E4 |
239 | #define OV0_VID_KEY_CLR_HIGH 0x04E8 | 239 | #define OV0_VID_KEY_CLR_HIGH 0x04E8 |
240 | #define OV0_GRPH_KEY_CLR_LOW 0x04EC | 240 | #define OV0_GRPH_KEY_CLR_LOW 0x04EC |
241 | #define OV0_GRPH_KEY_CLR_HIGH 0x04F0 | 241 | #define OV0_GRPH_KEY_CLR_HIGH 0x04F0 |
242 | #define OV0_KEY_CNTL 0x04F4 | 242 | #define OV0_KEY_CNTL 0x04F4 |
243 | #define OV0_TEST 0x04F8 | 243 | #define OV0_TEST 0x04F8 |
244 | #define SUBPIC_CNTL 0x0540 | 244 | #define SUBPIC_CNTL 0x0540 |
245 | #define SUBPIC_DEFCOLCON 0x0544 | 245 | #define SUBPIC_DEFCOLCON 0x0544 |
246 | #define SUBPIC_Y_X_START 0x054C | 246 | #define SUBPIC_Y_X_START 0x054C |
247 | #define SUBPIC_Y_X_END 0x0550 | 247 | #define SUBPIC_Y_X_END 0x0550 |
248 | #define SUBPIC_V_INC 0x0554 | 248 | #define SUBPIC_V_INC 0x0554 |
249 | #define SUBPIC_H_INC 0x0558 | 249 | #define SUBPIC_H_INC 0x0558 |
250 | #define SUBPIC_BUF0_OFFSET 0x055C | 250 | #define SUBPIC_BUF0_OFFSET 0x055C |
251 | #define SUBPIC_BUF1_OFFSET 0x0560 | 251 | #define SUBPIC_BUF1_OFFSET 0x0560 |
252 | #define SUBPIC_LC0_OFFSET 0x0564 | 252 | #define SUBPIC_LC0_OFFSET 0x0564 |
253 | #define SUBPIC_LC1_OFFSET 0x0568 | 253 | #define SUBPIC_LC1_OFFSET 0x0568 |
254 | #define SUBPIC_PITCH 0x056C | 254 | #define SUBPIC_PITCH 0x056C |
255 | #define SUBPIC_BTN_HLI_COLCON 0x0570 | 255 | #define SUBPIC_BTN_HLI_COLCON 0x0570 |
256 | #define SUBPIC_BTN_HLI_Y_X_START 0x0574 | 256 | #define SUBPIC_BTN_HLI_Y_X_START 0x0574 |
257 | #define SUBPIC_BTN_HLI_Y_X_END 0x0578 | 257 | #define SUBPIC_BTN_HLI_Y_X_END 0x0578 |
258 | #define SUBPIC_PALETTE_INDEX 0x057C | 258 | #define SUBPIC_PALETTE_INDEX 0x057C |
259 | #define SUBPIC_PALETTE_DATA 0x0580 | 259 | #define SUBPIC_PALETTE_DATA 0x0580 |
260 | #define SUBPIC_H_ACCUM_INIT 0x0584 | 260 | #define SUBPIC_H_ACCUM_INIT 0x0584 |
261 | #define SUBPIC_V_ACCUM_INIT 0x0588 | 261 | #define SUBPIC_V_ACCUM_INIT 0x0588 |
262 | #define DISP_MISC_CNTL 0x0D00 | 262 | #define DISP_MISC_CNTL 0x0D00 |
263 | #define DAC_MACRO_CNTL 0x0D04 | 263 | #define DAC_MACRO_CNTL 0x0D04 |
264 | #define DISP_PWR_MAN 0x0D08 | 264 | #define DISP_PWR_MAN 0x0D08 |
265 | #define DISP_TEST_DEBUG_CNTL 0x0D10 | 265 | #define DISP_TEST_DEBUG_CNTL 0x0D10 |
266 | #define DISP_HW_DEBUG 0x0D14 | 266 | #define DISP_HW_DEBUG 0x0D14 |
267 | #define DAC_CRC_SIG1 0x0D18 | 267 | #define DAC_CRC_SIG1 0x0D18 |
268 | #define DAC_CRC_SIG2 0x0D1C | 268 | #define DAC_CRC_SIG2 0x0D1C |
269 | #define OV0_LIN_TRANS_A 0x0D20 | 269 | #define OV0_LIN_TRANS_A 0x0D20 |
270 | #define OV0_LIN_TRANS_B 0x0D24 | 270 | #define OV0_LIN_TRANS_B 0x0D24 |
271 | #define OV0_LIN_TRANS_C 0x0D28 | 271 | #define OV0_LIN_TRANS_C 0x0D28 |
272 | #define OV0_LIN_TRANS_D 0x0D2C | 272 | #define OV0_LIN_TRANS_D 0x0D2C |
273 | #define OV0_LIN_TRANS_E 0x0D30 | 273 | #define OV0_LIN_TRANS_E 0x0D30 |
274 | #define OV0_LIN_TRANS_F 0x0D34 | 274 | #define OV0_LIN_TRANS_F 0x0D34 |
275 | #define OV0_GAMMA_0_F 0x0D40 | 275 | #define OV0_GAMMA_0_F 0x0D40 |
276 | #define OV0_GAMMA_10_1F 0x0D44 | 276 | #define OV0_GAMMA_10_1F 0x0D44 |
277 | #define OV0_GAMMA_20_3F 0x0D48 | 277 | #define OV0_GAMMA_20_3F 0x0D48 |
278 | #define OV0_GAMMA_40_7F 0x0D4C | 278 | #define OV0_GAMMA_40_7F 0x0D4C |
279 | #define OV0_GAMMA_380_3BF 0x0D50 | 279 | #define OV0_GAMMA_380_3BF 0x0D50 |
280 | #define OV0_GAMMA_3C0_3FF 0x0D54 | 280 | #define OV0_GAMMA_3C0_3FF 0x0D54 |
281 | #define DISP_MERGE_CNTL 0x0D60 | 281 | #define DISP_MERGE_CNTL 0x0D60 |
282 | #define DISP_OUTPUT_CNTL 0x0D64 | 282 | #define DISP_OUTPUT_CNTL 0x0D64 |
283 | #define DISP_LIN_TRANS_GRPH_A 0x0D80 | 283 | #define DISP_LIN_TRANS_GRPH_A 0x0D80 |
284 | #define DISP_LIN_TRANS_GRPH_B 0x0D84 | 284 | #define DISP_LIN_TRANS_GRPH_B 0x0D84 |
285 | #define DISP_LIN_TRANS_GRPH_C 0x0D88 | 285 | #define DISP_LIN_TRANS_GRPH_C 0x0D88 |
286 | #define DISP_LIN_TRANS_GRPH_D 0x0D8C | 286 | #define DISP_LIN_TRANS_GRPH_D 0x0D8C |
287 | #define DISP_LIN_TRANS_GRPH_E 0x0D90 | 287 | #define DISP_LIN_TRANS_GRPH_E 0x0D90 |
288 | #define DISP_LIN_TRANS_GRPH_F 0x0D94 | 288 | #define DISP_LIN_TRANS_GRPH_F 0x0D94 |
289 | #define DISP_LIN_TRANS_VID_A 0x0D98 | 289 | #define DISP_LIN_TRANS_VID_A 0x0D98 |
290 | #define DISP_LIN_TRANS_VID_B 0x0D9C | 290 | #define DISP_LIN_TRANS_VID_B 0x0D9C |
291 | #define DISP_LIN_TRANS_VID_C 0x0DA0 | 291 | #define DISP_LIN_TRANS_VID_C 0x0DA0 |
292 | #define DISP_LIN_TRANS_VID_D 0x0DA4 | 292 | #define DISP_LIN_TRANS_VID_D 0x0DA4 |
293 | #define DISP_LIN_TRANS_VID_E 0x0DA8 | 293 | #define DISP_LIN_TRANS_VID_E 0x0DA8 |
294 | #define DISP_LIN_TRANS_VID_F 0x0DAC | 294 | #define DISP_LIN_TRANS_VID_F 0x0DAC |
295 | #define RMX_HORZ_FILTER_0TAP_COEF 0x0DB0 | 295 | #define RMX_HORZ_FILTER_0TAP_COEF 0x0DB0 |
296 | #define RMX_HORZ_FILTER_1TAP_COEF 0x0DB4 | 296 | #define RMX_HORZ_FILTER_1TAP_COEF 0x0DB4 |
297 | #define RMX_HORZ_FILTER_2TAP_COEF 0x0DB8 | 297 | #define RMX_HORZ_FILTER_2TAP_COEF 0x0DB8 |
298 | #define RMX_HORZ_PHASE 0x0DBC | 298 | #define RMX_HORZ_PHASE 0x0DBC |
299 | #define DAC_EMBEDDED_SYNC_CNTL 0x0DC0 | 299 | #define DAC_EMBEDDED_SYNC_CNTL 0x0DC0 |
300 | #define DAC_BROAD_PULSE 0x0DC4 | 300 | #define DAC_BROAD_PULSE 0x0DC4 |
301 | #define DAC_SKEW_CLKS 0x0DC8 | 301 | #define DAC_SKEW_CLKS 0x0DC8 |
302 | #define DAC_INCR 0x0DCC | 302 | #define DAC_INCR 0x0DCC |
303 | #define DAC_NEG_SYNC_LEVEL 0x0DD0 | 303 | #define DAC_NEG_SYNC_LEVEL 0x0DD0 |
304 | #define DAC_POS_SYNC_LEVEL 0x0DD4 | 304 | #define DAC_POS_SYNC_LEVEL 0x0DD4 |
305 | #define DAC_BLANK_LEVEL 0x0DD8 | 305 | #define DAC_BLANK_LEVEL 0x0DD8 |
306 | #define CLOCK_CNTL_INDEX 0x0008 | 306 | #define CLOCK_CNTL_INDEX 0x0008 |
307 | #define CLOCK_CNTL_DATA 0x000C | 307 | #define CLOCK_CNTL_DATA 0x000C |
308 | #define CP_RB_CNTL 0x0704 | 308 | #define CP_RB_CNTL 0x0704 |
309 | #define CP_RB_BASE 0x0700 | 309 | #define CP_RB_BASE 0x0700 |
310 | #define CP_RB_RPTR_ADDR 0x070C | 310 | #define CP_RB_RPTR_ADDR 0x070C |
311 | #define CP_RB_RPTR 0x0710 | 311 | #define CP_RB_RPTR 0x0710 |
312 | #define CP_RB_WPTR 0x0714 | 312 | #define CP_RB_WPTR 0x0714 |
313 | #define CP_RB_WPTR_DELAY 0x0718 | 313 | #define CP_RB_WPTR_DELAY 0x0718 |
314 | #define CP_IB_BASE 0x0738 | 314 | #define CP_IB_BASE 0x0738 |
315 | #define CP_IB_BUFSZ 0x073C | 315 | #define CP_IB_BUFSZ 0x073C |
316 | #define SCRATCH_REG0 0x15E0 | 316 | #define SCRATCH_REG0 0x15E0 |
317 | #define GUI_SCRATCH_REG0 0x15E0 | 317 | #define GUI_SCRATCH_REG0 0x15E0 |
318 | #define SCRATCH_REG1 0x15E4 | 318 | #define SCRATCH_REG1 0x15E4 |
319 | #define GUI_SCRATCH_REG1 0x15E4 | 319 | #define GUI_SCRATCH_REG1 0x15E4 |
320 | #define SCRATCH_REG2 0x15E8 | 320 | #define SCRATCH_REG2 0x15E8 |
321 | #define GUI_SCRATCH_REG2 0x15E8 | 321 | #define GUI_SCRATCH_REG2 0x15E8 |
322 | #define SCRATCH_REG3 0x15EC | 322 | #define SCRATCH_REG3 0x15EC |
323 | #define GUI_SCRATCH_REG3 0x15EC | 323 | #define GUI_SCRATCH_REG3 0x15EC |
324 | #define SCRATCH_REG4 0x15F0 | 324 | #define SCRATCH_REG4 0x15F0 |
325 | #define GUI_SCRATCH_REG4 0x15F0 | 325 | #define GUI_SCRATCH_REG4 0x15F0 |
326 | #define SCRATCH_REG5 0x15F4 | 326 | #define SCRATCH_REG5 0x15F4 |
327 | #define GUI_SCRATCH_REG5 0x15F4 | 327 | #define GUI_SCRATCH_REG5 0x15F4 |
328 | #define SCRATCH_UMSK 0x0770 | 328 | #define SCRATCH_UMSK 0x0770 |
329 | #define SCRATCH_ADDR 0x0774 | 329 | #define SCRATCH_ADDR 0x0774 |
330 | #define DP_BRUSH_FRGD_CLR 0x147C | 330 | #define DP_BRUSH_FRGD_CLR 0x147C |
331 | #define DP_BRUSH_BKGD_CLR 0x1478 | 331 | #define DP_BRUSH_BKGD_CLR 0x1478 |
332 | #define DST_LINE_START 0x1600 | 332 | #define DST_LINE_START 0x1600 |
333 | #define DST_LINE_END 0x1604 | 333 | #define DST_LINE_END 0x1604 |
334 | #define SRC_OFFSET 0x15AC | 334 | #define SRC_OFFSET 0x15AC |
335 | #define SRC_PITCH 0x15B0 | 335 | #define SRC_PITCH 0x15B0 |
336 | #define SRC_TILE 0x1704 | 336 | #define SRC_TILE 0x1704 |
337 | #define SRC_PITCH_OFFSET 0x1428 | 337 | #define SRC_PITCH_OFFSET 0x1428 |
338 | #define SRC_X 0x1414 | 338 | #define SRC_X 0x1414 |
339 | #define SRC_Y 0x1418 | 339 | #define SRC_Y 0x1418 |
340 | #define SRC_X_Y 0x1590 | 340 | #define SRC_X_Y 0x1590 |
341 | #define SRC_Y_X 0x1434 | 341 | #define SRC_Y_X 0x1434 |
342 | #define DST_Y_X 0x1438 | 342 | #define DST_Y_X 0x1438 |
343 | #define DST_WIDTH_HEIGHT 0x1598 | 343 | #define DST_WIDTH_HEIGHT 0x1598 |
344 | #define DST_HEIGHT_WIDTH 0x143c | 344 | #define DST_HEIGHT_WIDTH 0x143c |
345 | #define DST_OFFSET 0x1404 | 345 | #define DST_OFFSET 0x1404 |
346 | #define SRC_CLUT_ADDRESS 0x1780 | 346 | #define SRC_CLUT_ADDRESS 0x1780 |
347 | #define SRC_CLUT_DATA 0x1784 | 347 | #define SRC_CLUT_DATA 0x1784 |
348 | #define SRC_CLUT_DATA_RD 0x1788 | 348 | #define SRC_CLUT_DATA_RD 0x1788 |
349 | #define HOST_DATA0 0x17C0 | 349 | #define HOST_DATA0 0x17C0 |
350 | #define HOST_DATA1 0x17C4 | 350 | #define HOST_DATA1 0x17C4 |
351 | #define HOST_DATA2 0x17C8 | 351 | #define HOST_DATA2 0x17C8 |
352 | #define HOST_DATA3 0x17CC | 352 | #define HOST_DATA3 0x17CC |
353 | #define HOST_DATA4 0x17D0 | 353 | #define HOST_DATA4 0x17D0 |
354 | #define HOST_DATA5 0x17D4 | 354 | #define HOST_DATA5 0x17D4 |
355 | #define HOST_DATA6 0x17D8 | 355 | #define HOST_DATA6 0x17D8 |
356 | #define HOST_DATA7 0x17DC | 356 | #define HOST_DATA7 0x17DC |
357 | #define HOST_DATA_LAST 0x17E0 | 357 | #define HOST_DATA_LAST 0x17E0 |
358 | #define DP_SRC_ENDIAN 0x15D4 | 358 | #define DP_SRC_ENDIAN 0x15D4 |
359 | #define DP_SRC_FRGD_CLR 0x15D8 | 359 | #define DP_SRC_FRGD_CLR 0x15D8 |
360 | #define DP_SRC_BKGD_CLR 0x15DC | 360 | #define DP_SRC_BKGD_CLR 0x15DC |
361 | #define SC_LEFT 0x1640 | 361 | #define SC_LEFT 0x1640 |
362 | #define SC_RIGHT 0x1644 | 362 | #define SC_RIGHT 0x1644 |
363 | #define SC_TOP 0x1648 | 363 | #define SC_TOP 0x1648 |
364 | #define SC_BOTTOM 0x164C | 364 | #define SC_BOTTOM 0x164C |
365 | #define SRC_SC_RIGHT 0x1654 | 365 | #define SRC_SC_RIGHT 0x1654 |
366 | #define SRC_SC_BOTTOM 0x165C | 366 | #define SRC_SC_BOTTOM 0x165C |
367 | #define DP_CNTL 0x16C0 | 367 | #define DP_CNTL 0x16C0 |
368 | #define DP_CNTL_XDIR_YDIR_YMAJOR 0x16D0 | 368 | #define DP_CNTL_XDIR_YDIR_YMAJOR 0x16D0 |
369 | #define DP_DATATYPE 0x16C4 | 369 | #define DP_DATATYPE 0x16C4 |
370 | #define DP_MIX 0x16C8 | 370 | #define DP_MIX 0x16C8 |
371 | #define DP_WRITE_MSK 0x16CC | 371 | #define DP_WRITE_MSK 0x16CC |
372 | #define DP_XOP 0x17F8 | 372 | #define DP_XOP 0x17F8 |
373 | #define CLR_CMP_CLR_SRC 0x15C4 | 373 | #define CLR_CMP_CLR_SRC 0x15C4 |
374 | #define CLR_CMP_CLR_DST 0x15C8 | 374 | #define CLR_CMP_CLR_DST 0x15C8 |
375 | #define CLR_CMP_CNTL 0x15C0 | 375 | #define CLR_CMP_CNTL 0x15C0 |
376 | #define CLR_CMP_MSK 0x15CC | 376 | #define CLR_CMP_MSK 0x15CC |
377 | #define DSTCACHE_MODE 0x1710 | 377 | #define DSTCACHE_MODE 0x1710 |
378 | #define DSTCACHE_CTLSTAT 0x1714 | 378 | #define DSTCACHE_CTLSTAT 0x1714 |
379 | #define DEFAULT_PITCH_OFFSET 0x16E0 | 379 | #define DEFAULT_PITCH_OFFSET 0x16E0 |
380 | #define DEFAULT_SC_BOTTOM_RIGHT 0x16E8 | 380 | #define DEFAULT_SC_BOTTOM_RIGHT 0x16E8 |
381 | #define DEFAULT_SC_TOP_LEFT 0x16EC | 381 | #define DEFAULT_SC_TOP_LEFT 0x16EC |
382 | #define SRC_PITCH_OFFSET 0x1428 | 382 | #define SRC_PITCH_OFFSET 0x1428 |
383 | #define DST_PITCH_OFFSET 0x142C | 383 | #define DST_PITCH_OFFSET 0x142C |
384 | #define DP_GUI_MASTER_CNTL 0x146C | 384 | #define DP_GUI_MASTER_CNTL 0x146C |
385 | #define SC_TOP_LEFT 0x16EC | 385 | #define SC_TOP_LEFT 0x16EC |
386 | #define SC_BOTTOM_RIGHT 0x16F0 | 386 | #define SC_BOTTOM_RIGHT 0x16F0 |
387 | #define SRC_SC_BOTTOM_RIGHT 0x16F4 | 387 | #define SRC_SC_BOTTOM_RIGHT 0x16F4 |
388 | #define RB2D_DSTCACHE_MODE 0x3428 | 388 | #define RB2D_DSTCACHE_MODE 0x3428 |
389 | #define RB2D_DSTCACHE_CTLSTAT_broken 0x342C /* do not use */ | 389 | #define RB2D_DSTCACHE_CTLSTAT_broken 0x342C /* do not use */ |
390 | #define LVDS_GEN_CNTL 0x02d0 | 390 | #define LVDS_GEN_CNTL 0x02d0 |
@@ -686,7 +686,7 @@ | |||
686 | #define VERT_FP_LOOP_STRETCH (0x7 << 28) | 686 | #define VERT_FP_LOOP_STRETCH (0x7 << 28) |
687 | #define VERT_STRETCH_RESERVED 0xf1000000 | 687 | #define VERT_STRETCH_RESERVED 0xf1000000 |
688 | 688 | ||
689 | /* DAC_CNTL bit constants */ | 689 | /* DAC_CNTL bit constants */ |
690 | #define DAC_8BIT_EN 0x00000100 | 690 | #define DAC_8BIT_EN 0x00000100 |
691 | #define DAC_4BPP_PIX_ORDER 0x00000200 | 691 | #define DAC_4BPP_PIX_ORDER 0x00000200 |
692 | #define DAC_CRC_EN 0x00080000 | 692 | #define DAC_CRC_EN 0x00080000 |
@@ -700,7 +700,7 @@ | |||
700 | #define DAC_CMP_EN (1 << 3) | 700 | #define DAC_CMP_EN (1 << 3) |
701 | #define DAC_CMP_OUTPUT (1 << 7) | 701 | #define DAC_CMP_OUTPUT (1 << 7) |
702 | 702 | ||
703 | /* DAC_CNTL2 bit constants */ | 703 | /* DAC_CNTL2 bit constants */ |
704 | #define DAC2_EXPAND_MODE (1 << 14) | 704 | #define DAC2_EXPAND_MODE (1 << 14) |
705 | #define DAC2_CMP_EN (1 << 7) | 705 | #define DAC2_CMP_EN (1 << 7) |
706 | #define DAC2_PALETTE_ACCESS_CNTL (1 << 5) | 706 | #define DAC2_PALETTE_ACCESS_CNTL (1 << 5) |
diff --git a/include/video/s1d13xxxfb.h b/include/video/s1d13xxxfb.h index fe41b8407946..c3b2a2aa7140 100644 --- a/include/video/s1d13xxxfb.h +++ b/include/video/s1d13xxxfb.h | |||
@@ -14,13 +14,16 @@ | |||
14 | #define S1D13XXXFB_H | 14 | #define S1D13XXXFB_H |
15 | 15 | ||
16 | #define S1D_PALETTE_SIZE 256 | 16 | #define S1D_PALETTE_SIZE 256 |
17 | #define S1D13506_CHIP_REV 4 /* expected chip revision number for s1d13506 */ | 17 | #define S1D_FBID "S1D13xxx" |
18 | #define S1D13806_CHIP_REV 7 /* expected chip revision number for s1d13806 */ | 18 | #define S1D_DEVICENAME "s1d13xxxfb" |
19 | #define S1D_FBID "S1D13806" | 19 | |
20 | #define S1D_DEVICENAME "s1d13806fb" | 20 | /* S1DREG_REV_CODE register = prod_id (6 bits) + revision (2 bits) */ |
21 | #define S1D13505_PROD_ID 0x3 /* 000011 */ | ||
22 | #define S1D13506_PROD_ID 0x4 /* 000100 */ | ||
23 | #define S1D13806_PROD_ID 0x7 /* 000111 */ | ||
21 | 24 | ||
22 | /* register definitions (tested on s1d13896) */ | 25 | /* register definitions (tested on s1d13896) */ |
23 | #define S1DREG_REV_CODE 0x0000 /* Revision Code Register */ | 26 | #define S1DREG_REV_CODE 0x0000 /* Prod + Rev Code Register */ |
24 | #define S1DREG_MISC 0x0001 /* Miscellaneous Register */ | 27 | #define S1DREG_MISC 0x0001 /* Miscellaneous Register */ |
25 | #define S1DREG_GPIO_CNF0 0x0004 /* General IO Pins Configuration Register 0 */ | 28 | #define S1DREG_GPIO_CNF0 0x0004 /* General IO Pins Configuration Register 0 */ |
26 | #define S1DREG_GPIO_CNF1 0x0005 /* General IO Pins Configuration Register 1 */ | 29 | #define S1DREG_GPIO_CNF1 0x0005 /* General IO Pins Configuration Register 1 */ |
@@ -141,10 +144,11 @@ struct s1d13xxxfb_regval { | |||
141 | u8 value; | 144 | u8 value; |
142 | }; | 145 | }; |
143 | 146 | ||
144 | |||
145 | struct s1d13xxxfb_par { | 147 | struct s1d13xxxfb_par { |
146 | void __iomem *regs; | 148 | void __iomem *regs; |
147 | unsigned char display; | 149 | unsigned char display; |
150 | unsigned char prod_id; | ||
151 | unsigned char revision; | ||
148 | 152 | ||
149 | unsigned int pseudo_palette[16]; | 153 | unsigned int pseudo_palette[16]; |
150 | #ifdef CONFIG_PM | 154 | #ifdef CONFIG_PM |