diff options
Diffstat (limited to 'include/linux/io-mapping.h')
| -rw-r--r-- | include/linux/io-mapping.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 25085ddd955f..0a6b3d5c490c 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
| 23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
| 24 | #include <asm/page.h> | 24 | #include <asm/page.h> |
| 25 | #include <asm/iomap.h> | ||
| 26 | 25 | ||
| 27 | /* | 26 | /* |
| 28 | * The io_mapping mechanism provides an abstraction for mapping | 27 | * The io_mapping mechanism provides an abstraction for mapping |
| @@ -33,6 +32,8 @@ | |||
| 33 | 32 | ||
| 34 | #ifdef CONFIG_HAVE_ATOMIC_IOMAP | 33 | #ifdef CONFIG_HAVE_ATOMIC_IOMAP |
| 35 | 34 | ||
| 35 | #include <asm/iomap.h> | ||
| 36 | |||
| 36 | struct io_mapping { | 37 | struct io_mapping { |
| 37 | resource_size_t base; | 38 | resource_size_t base; |
| 38 | unsigned long size; | 39 | unsigned long size; |
| @@ -79,7 +80,9 @@ io_mapping_free(struct io_mapping *mapping) | |||
| 79 | 80 | ||
| 80 | /* Atomic map/unmap */ | 81 | /* Atomic map/unmap */ |
| 81 | static inline void * | 82 | static inline void * |
| 82 | io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) | 83 | io_mapping_map_atomic_wc(struct io_mapping *mapping, |
| 84 | unsigned long offset, | ||
| 85 | int slot) | ||
| 83 | { | 86 | { |
| 84 | resource_size_t phys_addr; | 87 | resource_size_t phys_addr; |
| 85 | unsigned long pfn; | 88 | unsigned long pfn; |
| @@ -87,13 +90,13 @@ io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) | |||
| 87 | BUG_ON(offset >= mapping->size); | 90 | BUG_ON(offset >= mapping->size); |
| 88 | phys_addr = mapping->base + offset; | 91 | phys_addr = mapping->base + offset; |
| 89 | pfn = (unsigned long) (phys_addr >> PAGE_SHIFT); | 92 | pfn = (unsigned long) (phys_addr >> PAGE_SHIFT); |
| 90 | return iomap_atomic_prot_pfn(pfn, KM_USER0, mapping->prot); | 93 | return iomap_atomic_prot_pfn(pfn, slot, mapping->prot); |
| 91 | } | 94 | } |
| 92 | 95 | ||
| 93 | static inline void | 96 | static inline void |
| 94 | io_mapping_unmap_atomic(void *vaddr) | 97 | io_mapping_unmap_atomic(void *vaddr, int slot) |
| 95 | { | 98 | { |
| 96 | iounmap_atomic(vaddr, KM_USER0); | 99 | iounmap_atomic(vaddr, slot); |
| 97 | } | 100 | } |
| 98 | 101 | ||
| 99 | static inline void * | 102 | static inline void * |
| @@ -133,13 +136,15 @@ io_mapping_free(struct io_mapping *mapping) | |||
| 133 | 136 | ||
| 134 | /* Atomic map/unmap */ | 137 | /* Atomic map/unmap */ |
| 135 | static inline void * | 138 | static inline void * |
| 136 | io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) | 139 | io_mapping_map_atomic_wc(struct io_mapping *mapping, |
| 140 | unsigned long offset, | ||
| 141 | int slot) | ||
| 137 | { | 142 | { |
| 138 | return ((char *) mapping) + offset; | 143 | return ((char *) mapping) + offset; |
| 139 | } | 144 | } |
| 140 | 145 | ||
| 141 | static inline void | 146 | static inline void |
| 142 | io_mapping_unmap_atomic(void *vaddr) | 147 | io_mapping_unmap_atomic(void *vaddr, int slot) |
| 143 | { | 148 | { |
| 144 | } | 149 | } |
| 145 | 150 | ||
