diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-alpha/io.h | 6 | ||||
-rw-r--r-- | include/asm-avr32/io.h | 7 | ||||
-rw-r--r-- | include/asm-blackfin/io.h | 4 | ||||
-rw-r--r-- | include/asm-h8300/io.h | 6 | ||||
-rw-r--r-- | include/asm-ia64/io.h | 4 | ||||
-rw-r--r-- | include/asm-m68k/io.h | 6 | ||||
-rw-r--r-- | include/asm-m68knommu/io.h | 6 | ||||
-rw-r--r-- | include/asm-mips/io.h | 2 | ||||
-rw-r--r-- | include/asm-parisc/io.h | 5 | ||||
-rw-r--r-- | include/asm-powerpc/io.h | 17 | ||||
-rw-r--r-- | include/asm-ppc/io.h | 17 | ||||
-rw-r--r-- | include/asm-sh/floppy.h | 2 | ||||
-rw-r--r-- | include/asm-sh/io.h | 25 | ||||
-rw-r--r-- | include/asm-sh64/dma-mapping.h | 6 | ||||
-rw-r--r-- | include/asm-sh64/io.h | 48 | ||||
-rw-r--r-- | include/asm-sparc/io.h | 7 | ||||
-rw-r--r-- | include/asm-sparc64/io.h | 6 | ||||
-rw-r--r-- | include/asm-x86/io_32.h | 11 | ||||
-rw-r--r-- | include/asm-x86/io_64.h | 6 |
19 files changed, 9 insertions, 182 deletions
diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h index ab5b60dcef19..38f18cf18c9d 100644 --- a/include/asm-alpha/io.h +++ b/include/asm-alpha/io.h | |||
@@ -551,12 +551,6 @@ extern void outsl (unsigned long port, const void *src, unsigned long count); | |||
551 | #endif | 551 | #endif |
552 | #define RTC_ALWAYS_BCD 0 | 552 | #define RTC_ALWAYS_BCD 0 |
553 | 553 | ||
554 | /* Nothing to do */ | ||
555 | |||
556 | #define dma_cache_inv(_start,_size) do { } while (0) | ||
557 | #define dma_cache_wback(_start,_size) do { } while (0) | ||
558 | #define dma_cache_wback_inv(_start,_size) do { } while (0) | ||
559 | |||
560 | /* | 554 | /* |
561 | * Some mucking forons use if[n]def writeq to check if platform has it. | 555 | * Some mucking forons use if[n]def writeq to check if platform has it. |
562 | * It's a bloody bad idea and we probably want ARCH_HAS_WRITEQ for them | 556 | * It's a bloody bad idea and we probably want ARCH_HAS_WRITEQ for them |
diff --git a/include/asm-avr32/io.h b/include/asm-avr32/io.h index 64bb92bb6773..8be7ea9c9047 100644 --- a/include/asm-avr32/io.h +++ b/include/asm-avr32/io.h | |||
@@ -298,13 +298,6 @@ extern void __iounmap(void __iomem *addr); | |||
298 | #define ioport_map(port, nr) ioremap(port, nr) | 298 | #define ioport_map(port, nr) ioremap(port, nr) |
299 | #define ioport_unmap(port) iounmap(port) | 299 | #define ioport_unmap(port) iounmap(port) |
300 | 300 | ||
301 | #define dma_cache_wback_inv(_start, _size) \ | ||
302 | flush_dcache_region(_start, _size) | ||
303 | #define dma_cache_inv(_start, _size) \ | ||
304 | invalidate_dcache_region(_start, _size) | ||
305 | #define dma_cache_wback(_start, _size) \ | ||
306 | clean_dcache_region(_start, _size) | ||
307 | |||
308 | /* | 301 | /* |
309 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | 302 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem |
310 | * access | 303 | * access |
diff --git a/include/asm-blackfin/io.h b/include/asm-blackfin/io.h index 525179bf43d7..d1d2e6be3b59 100644 --- a/include/asm-blackfin/io.h +++ b/include/asm-blackfin/io.h | |||
@@ -183,10 +183,6 @@ extern void blkfin_inv_cache_all(void); | |||
183 | #define ioport_map(port, nr) ((void __iomem*)(port)) | 183 | #define ioport_map(port, nr) ((void __iomem*)(port)) |
184 | #define ioport_unmap(addr) | 184 | #define ioport_unmap(addr) |
185 | 185 | ||
186 | #define dma_cache_inv(_start,_size) do { blkfin_inv_cache_all();} while (0) | ||
187 | #define dma_cache_wback(_start,_size) do { } while (0) | ||
188 | #define dma_cache_wback_inv(_start,_size) do { blkfin_inv_cache_all();} while (0) | ||
189 | |||
190 | /* Pages to physical address... */ | 186 | /* Pages to physical address... */ |
191 | #define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT) | 187 | #define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT) |
192 | #define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT) | 188 | #define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT) |
diff --git a/include/asm-h8300/io.h b/include/asm-h8300/io.h index 91b7487cb7ae..7543a57b4ea1 100644 --- a/include/asm-h8300/io.h +++ b/include/asm-h8300/io.h | |||
@@ -264,12 +264,6 @@ static inline void *ioremap_fullcache(unsigned long physaddr, unsigned long size | |||
264 | 264 | ||
265 | extern void iounmap(void *addr); | 265 | extern void iounmap(void *addr); |
266 | 266 | ||
267 | /* Nothing to do */ | ||
268 | |||
269 | #define dma_cache_inv(_start,_size) do { } while (0) | ||
270 | #define dma_cache_wback(_start,_size) do { } while (0) | ||
271 | #define dma_cache_wback_inv(_start,_size) do { } while (0) | ||
272 | |||
273 | /* H8/300 internal I/O functions */ | 267 | /* H8/300 internal I/O functions */ |
274 | static __inline__ unsigned char ctrl_inb(unsigned long addr) | 268 | static __inline__ unsigned char ctrl_inb(unsigned long addr) |
275 | { | 269 | { |
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h index eb17a8692967..4ebed77aa472 100644 --- a/include/asm-ia64/io.h +++ b/include/asm-ia64/io.h | |||
@@ -435,10 +435,6 @@ extern void memcpy_fromio(void *dst, const volatile void __iomem *src, long n); | |||
435 | extern void memcpy_toio(volatile void __iomem *dst, const void *src, long n); | 435 | extern void memcpy_toio(volatile void __iomem *dst, const void *src, long n); |
436 | extern void memset_io(volatile void __iomem *s, int c, long n); | 436 | extern void memset_io(volatile void __iomem *s, int c, long n); |
437 | 437 | ||
438 | #define dma_cache_inv(_start,_size) do { } while (0) | ||
439 | #define dma_cache_wback(_start,_size) do { } while (0) | ||
440 | #define dma_cache_wback_inv(_start,_size) do { } while (0) | ||
441 | |||
442 | # endif /* __KERNEL__ */ | 438 | # endif /* __KERNEL__ */ |
443 | 439 | ||
444 | /* | 440 | /* |
diff --git a/include/asm-m68k/io.h b/include/asm-m68k/io.h index 47bb9cf107b7..baf4f9b8acfc 100644 --- a/include/asm-m68k/io.h +++ b/include/asm-m68k/io.h | |||
@@ -384,12 +384,6 @@ static inline void __iomem *ioremap_fullcache(unsigned long physaddr, | |||
384 | return __ioremap(physaddr, size, IOMAP_FULL_CACHING); | 384 | return __ioremap(physaddr, size, IOMAP_FULL_CACHING); |
385 | } | 385 | } |
386 | 386 | ||
387 | |||
388 | /* m68k caches aren't DMA coherent */ | ||
389 | extern void dma_cache_wback_inv(unsigned long start, unsigned long size); | ||
390 | extern void dma_cache_wback(unsigned long start, unsigned long size); | ||
391 | extern void dma_cache_inv(unsigned long start, unsigned long size); | ||
392 | |||
393 | static inline void memset_io(volatile void __iomem *addr, unsigned char val, int count) | 387 | static inline void memset_io(volatile void __iomem *addr, unsigned char val, int count) |
394 | { | 388 | { |
395 | __builtin_memset((void __force *) addr, val, count); | 389 | __builtin_memset((void __force *) addr, val, count); |
diff --git a/include/asm-m68knommu/io.h b/include/asm-m68knommu/io.h index 8df4cee2a0cd..653d9b2d7ddf 100644 --- a/include/asm-m68knommu/io.h +++ b/include/asm-m68knommu/io.h | |||
@@ -165,12 +165,6 @@ static inline void *ioremap_fullcache(unsigned long physaddr, unsigned long size | |||
165 | 165 | ||
166 | extern void iounmap(void *addr); | 166 | extern void iounmap(void *addr); |
167 | 167 | ||
168 | /* Nothing to do */ | ||
169 | |||
170 | #define dma_cache_inv(_start,_size) do { } while (0) | ||
171 | #define dma_cache_wback(_start,_size) do { } while (0) | ||
172 | #define dma_cache_wback_inv(_start,_size) do { } while (0) | ||
173 | |||
174 | /* Pages to physical address... */ | 168 | /* Pages to physical address... */ |
175 | #define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT) | 169 | #define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT) |
176 | #define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT) | 170 | #define page_to_bus(page) ((page - mem_map) << PAGE_SHIFT) |
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index 2cd8323c8586..e62058b0d28c 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h | |||
@@ -554,6 +554,8 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int | |||
554 | * caches. Dirty lines of the caches may be written back or simply | 554 | * caches. Dirty lines of the caches may be written back or simply |
555 | * be discarded. This operation is necessary before dma operations | 555 | * be discarded. This operation is necessary before dma operations |
556 | * to the memory. | 556 | * to the memory. |
557 | * | ||
558 | * This API used to be exported; it now is for arch code internal use only. | ||
557 | */ | 559 | */ |
558 | #ifdef CONFIG_DMA_NONCOHERENT | 560 | #ifdef CONFIG_DMA_NONCOHERENT |
559 | 561 | ||
diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index 4cc9bcec0564..95f00e11c7b4 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h | |||
@@ -270,11 +270,6 @@ extern void outsl (unsigned long port, const void *src, unsigned long count); | |||
270 | /* IO Port space is : BBiiii where BB is HBA number. */ | 270 | /* IO Port space is : BBiiii where BB is HBA number. */ |
271 | #define IO_SPACE_LIMIT 0x00ffffff | 271 | #define IO_SPACE_LIMIT 0x00ffffff |
272 | 272 | ||
273 | |||
274 | #define dma_cache_inv(_start,_size) do { flush_kernel_dcache_range(_start,_size); } while (0) | ||
275 | #define dma_cache_wback(_start,_size) do { flush_kernel_dcache_range(_start,_size); } while (0) | ||
276 | #define dma_cache_wback_inv(_start,_size) do { flush_kernel_dcache_range(_start,_size); } while (0) | ||
277 | |||
278 | /* PA machines have an MM I/O space from 0xf0000000-0xffffffff in 32 | 273 | /* PA machines have an MM I/O space from 0xf0000000-0xffffffff in 32 |
279 | * bit mode and from 0xfffffffff0000000-0xfffffffffffffff in 64 bit | 274 | * bit mode and from 0xfffffffff0000000-0xfffffffffffffff in 64 bit |
280 | * mode (essentially just sign extending. This macro takes in a 32 | 275 | * mode (essentially just sign extending. This macro takes in a 32 |
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index 0d0589ef8ea6..bf14ab4ef4c9 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
@@ -498,23 +498,6 @@ static inline void name at \ | |||
498 | #define writeq writeq | 498 | #define writeq writeq |
499 | #endif | 499 | #endif |
500 | 500 | ||
501 | #ifdef CONFIG_NOT_COHERENT_CACHE | ||
502 | |||
503 | #define dma_cache_inv(_start,_size) \ | ||
504 | invalidate_dcache_range(_start, (_start + _size)) | ||
505 | #define dma_cache_wback(_start,_size) \ | ||
506 | clean_dcache_range(_start, (_start + _size)) | ||
507 | #define dma_cache_wback_inv(_start,_size) \ | ||
508 | flush_dcache_range(_start, (_start + _size)) | ||
509 | |||
510 | #else /* CONFIG_NOT_COHERENT_CACHE */ | ||
511 | |||
512 | #define dma_cache_inv(_start,_size) do { } while (0) | ||
513 | #define dma_cache_wback(_start,_size) do { } while (0) | ||
514 | #define dma_cache_wback_inv(_start,_size) do { } while (0) | ||
515 | |||
516 | #endif /* !CONFIG_NOT_COHERENT_CACHE */ | ||
517 | |||
518 | /* | 501 | /* |
519 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | 502 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem |
520 | * access | 503 | * access |
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h index 8f58231a8bc6..a0d409a5d80f 100644 --- a/include/asm-ppc/io.h +++ b/include/asm-ppc/io.h | |||
@@ -478,23 +478,6 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | |||
478 | #include <asm/mpc8260_pci9.h> | 478 | #include <asm/mpc8260_pci9.h> |
479 | #endif | 479 | #endif |
480 | 480 | ||
481 | #ifdef CONFIG_NOT_COHERENT_CACHE | ||
482 | |||
483 | #define dma_cache_inv(_start,_size) \ | ||
484 | invalidate_dcache_range(_start, (_start + _size)) | ||
485 | #define dma_cache_wback(_start,_size) \ | ||
486 | clean_dcache_range(_start, (_start + _size)) | ||
487 | #define dma_cache_wback_inv(_start,_size) \ | ||
488 | flush_dcache_range(_start, (_start + _size)) | ||
489 | |||
490 | #else | ||
491 | |||
492 | #define dma_cache_inv(_start,_size) do { } while (0) | ||
493 | #define dma_cache_wback(_start,_size) do { } while (0) | ||
494 | #define dma_cache_wback_inv(_start,_size) do { } while (0) | ||
495 | |||
496 | #endif | ||
497 | |||
498 | /* | 481 | /* |
499 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | 482 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem |
500 | * access | 483 | * access |
diff --git a/include/asm-sh/floppy.h b/include/asm-sh/floppy.h index 942ade98757b..59fbfdc90dfb 100644 --- a/include/asm-sh/floppy.h +++ b/include/asm-sh/floppy.h | |||
@@ -213,7 +213,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) | |||
213 | } | 213 | } |
214 | #endif | 214 | #endif |
215 | 215 | ||
216 | dma_cache_wback_inv(addr, size); | 216 | __flush_purge_region(addr, size); |
217 | 217 | ||
218 | /* actual, physical DMA */ | 218 | /* actual, physical DMA */ |
219 | doing_pdma = 0; | 219 | doing_pdma = 0; |
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h index 1a336cdc75fe..6ed34d8eac5f 100644 --- a/include/asm-sh/io.h +++ b/include/asm-sh/io.h | |||
@@ -327,31 +327,6 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) | |||
327 | __iounmap((addr)) | 327 | __iounmap((addr)) |
328 | 328 | ||
329 | /* | 329 | /* |
330 | * The caches on some architectures aren't dma-coherent and have need to | ||
331 | * handle this in software. There are three types of operations that | ||
332 | * can be applied to dma buffers. | ||
333 | * | ||
334 | * - dma_cache_wback_inv(start, size) makes caches and RAM coherent by | ||
335 | * writing the content of the caches back to memory, if necessary. | ||
336 | * The function also invalidates the affected part of the caches as | ||
337 | * necessary before DMA transfers from outside to memory. | ||
338 | * - dma_cache_inv(start, size) invalidates the affected parts of the | ||
339 | * caches. Dirty lines of the caches may be written back or simply | ||
340 | * be discarded. This operation is necessary before dma operations | ||
341 | * to the memory. | ||
342 | * - dma_cache_wback(start, size) writes back any dirty lines but does | ||
343 | * not invalidate the cache. This can be used before DMA reads from | ||
344 | * memory, | ||
345 | */ | ||
346 | |||
347 | #define dma_cache_wback_inv(_start,_size) \ | ||
348 | __flush_purge_region(_start,_size) | ||
349 | #define dma_cache_inv(_start,_size) \ | ||
350 | __flush_invalidate_region(_start,_size) | ||
351 | #define dma_cache_wback(_start,_size) \ | ||
352 | __flush_wback_region(_start,_size) | ||
353 | |||
354 | /* | ||
355 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | 330 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem |
356 | * access | 331 | * access |
357 | */ | 332 | */ |
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h index de4309960207..e661857f98dc 100644 --- a/include/asm-sh64/dma-mapping.h +++ b/include/asm-sh64/dma-mapping.h | |||
@@ -42,7 +42,11 @@ static inline void dma_free_coherent(struct device *dev, size_t size, | |||
42 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 42 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
43 | enum dma_data_direction dir) | 43 | enum dma_data_direction dir) |
44 | { | 44 | { |
45 | dma_cache_wback_inv((unsigned long)vaddr, size); | 45 | unsigned long s = (unsigned long) vaddr & L1_CACHE_ALIGN_MASK; |
46 | unsigned long e = (vaddr + size) & L1_CACHE_ALIGN_MASK; | ||
47 | |||
48 | for (; s <= e; s += L1_CACHE_BYTES) | ||
49 | asm volatile ("ocbp %0, 0" : : "r" (s)); | ||
46 | } | 50 | } |
47 | 51 | ||
48 | static inline dma_addr_t dma_map_single(struct device *dev, | 52 | static inline dma_addr_t dma_map_single(struct device *dev, |
diff --git a/include/asm-sh64/io.h b/include/asm-sh64/io.h index 3de3ad99f457..7bd7314d38c2 100644 --- a/include/asm-sh64/io.h +++ b/include/asm-sh64/io.h | |||
@@ -182,54 +182,6 @@ unsigned long onchip_remap(unsigned long addr, unsigned long size, const char* n | |||
182 | extern void onchip_unmap(unsigned long vaddr); | 182 | extern void onchip_unmap(unsigned long vaddr); |
183 | 183 | ||
184 | /* | 184 | /* |
185 | * The caches on some architectures aren't dma-coherent and have need to | ||
186 | * handle this in software. There are three types of operations that | ||
187 | * can be applied to dma buffers. | ||
188 | * | ||
189 | * - dma_cache_wback_inv(start, size) makes caches and RAM coherent by | ||
190 | * writing the content of the caches back to memory, if necessary. | ||
191 | * The function also invalidates the affected part of the caches as | ||
192 | * necessary before DMA transfers from outside to memory. | ||
193 | * - dma_cache_inv(start, size) invalidates the affected parts of the | ||
194 | * caches. Dirty lines of the caches may be written back or simply | ||
195 | * be discarded. This operation is necessary before dma operations | ||
196 | * to the memory. | ||
197 | * - dma_cache_wback(start, size) writes back any dirty lines but does | ||
198 | * not invalidate the cache. This can be used before DMA reads from | ||
199 | * memory, | ||
200 | */ | ||
201 | |||
202 | static __inline__ void dma_cache_wback_inv (unsigned long start, unsigned long size) | ||
203 | { | ||
204 | unsigned long s = start & L1_CACHE_ALIGN_MASK; | ||
205 | unsigned long e = (start + size) & L1_CACHE_ALIGN_MASK; | ||
206 | |||
207 | for (; s <= e; s += L1_CACHE_BYTES) | ||
208 | asm volatile ("ocbp %0, 0" : : "r" (s)); | ||
209 | } | ||
210 | |||
211 | static __inline__ void dma_cache_inv (unsigned long start, unsigned long size) | ||
212 | { | ||
213 | // Note that caller has to be careful with overzealous | ||
214 | // invalidation should there be partial cache lines at the extremities | ||
215 | // of the specified range | ||
216 | unsigned long s = start & L1_CACHE_ALIGN_MASK; | ||
217 | unsigned long e = (start + size) & L1_CACHE_ALIGN_MASK; | ||
218 | |||
219 | for (; s <= e; s += L1_CACHE_BYTES) | ||
220 | asm volatile ("ocbi %0, 0" : : "r" (s)); | ||
221 | } | ||
222 | |||
223 | static __inline__ void dma_cache_wback (unsigned long start, unsigned long size) | ||
224 | { | ||
225 | unsigned long s = start & L1_CACHE_ALIGN_MASK; | ||
226 | unsigned long e = (start + size) & L1_CACHE_ALIGN_MASK; | ||
227 | |||
228 | for (; s <= e; s += L1_CACHE_BYTES) | ||
229 | asm volatile ("ocbwb %0, 0" : : "r" (s)); | ||
230 | } | ||
231 | |||
232 | /* | ||
233 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | 185 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem |
234 | * access | 186 | * access |
235 | */ | 187 | */ |
diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h index c23e74a0eaa8..243bf8e9a058 100644 --- a/include/asm-sparc/io.h +++ b/include/asm-sparc/io.h | |||
@@ -310,13 +310,6 @@ extern void sbus_iounmap(volatile void __iomem *vaddr, unsigned long size); | |||
310 | #define RTC_PORT(x) (rtc_port + (x)) | 310 | #define RTC_PORT(x) (rtc_port + (x)) |
311 | #define RTC_ALWAYS_BCD 0 | 311 | #define RTC_ALWAYS_BCD 0 |
312 | 312 | ||
313 | /* Nothing to do */ | ||
314 | /* P3: Only IDE DMA may need these. XXX Verify that it still does... */ | ||
315 | |||
316 | #define dma_cache_inv(_start,_size) do { } while (0) | ||
317 | #define dma_cache_wback(_start,_size) do { } while (0) | ||
318 | #define dma_cache_wback_inv(_start,_size) do { } while (0) | ||
319 | |||
320 | #endif | 313 | #endif |
321 | 314 | ||
322 | #define __ARCH_HAS_NO_PAGE_ZERO_MAPPED 1 | 315 | #define __ARCH_HAS_NO_PAGE_ZERO_MAPPED 1 |
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index 9565a892801e..cd7ef3097ac2 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h | |||
@@ -474,12 +474,6 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | |||
474 | #define sbus_iounmap(__addr, __size) \ | 474 | #define sbus_iounmap(__addr, __size) \ |
475 | release_region((unsigned long)(__addr), (__size)) | 475 | release_region((unsigned long)(__addr), (__size)) |
476 | 476 | ||
477 | /* Nothing to do */ | ||
478 | |||
479 | #define dma_cache_inv(_start,_size) do { } while (0) | ||
480 | #define dma_cache_wback(_start,_size) do { } while (0) | ||
481 | #define dma_cache_wback_inv(_start,_size) do { } while (0) | ||
482 | |||
483 | /* | 477 | /* |
484 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | 478 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem |
485 | * access | 479 | * access |
diff --git a/include/asm-x86/io_32.h b/include/asm-x86/io_32.h index e8e0bd641120..4ea7b1ad3c1d 100644 --- a/include/asm-x86/io_32.h +++ b/include/asm-x86/io_32.h | |||
@@ -237,18 +237,9 @@ static inline void flush_write_buffers(void) | |||
237 | __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory"); | 237 | __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory"); |
238 | } | 238 | } |
239 | 239 | ||
240 | #define dma_cache_inv(_start,_size) flush_write_buffers() | ||
241 | #define dma_cache_wback(_start,_size) flush_write_buffers() | ||
242 | #define dma_cache_wback_inv(_start,_size) flush_write_buffers() | ||
243 | |||
244 | #else | 240 | #else |
245 | 241 | ||
246 | /* Nothing to do */ | 242 | #define flush_write_buffers() do { } while (0) |
247 | |||
248 | #define dma_cache_inv(_start,_size) do { } while (0) | ||
249 | #define dma_cache_wback(_start,_size) do { } while (0) | ||
250 | #define dma_cache_wback_inv(_start,_size) do { } while (0) | ||
251 | #define flush_write_buffers() | ||
252 | 243 | ||
253 | #endif | 244 | #endif |
254 | 245 | ||
diff --git a/include/asm-x86/io_64.h b/include/asm-x86/io_64.h index 7475095c5061..a037b0794332 100644 --- a/include/asm-x86/io_64.h +++ b/include/asm-x86/io_64.h | |||
@@ -249,12 +249,6 @@ void memset_io(volatile void __iomem *a, int b, size_t c); | |||
249 | */ | 249 | */ |
250 | #define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) | 250 | #define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) |
251 | 251 | ||
252 | /* Nothing to do */ | ||
253 | |||
254 | #define dma_cache_inv(_start,_size) do { } while (0) | ||
255 | #define dma_cache_wback(_start,_size) do { } while (0) | ||
256 | #define dma_cache_wback_inv(_start,_size) do { } while (0) | ||
257 | |||
258 | #define flush_write_buffers() | 252 | #define flush_write_buffers() |
259 | 253 | ||
260 | extern int iommu_bio_merge; | 254 | extern int iommu_bio_merge; |