diff options
Diffstat (limited to 'include/linux/io-mapping.h')
-rw-r--r-- | include/linux/io-mapping.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index e399029b68c5..645ad06b5d52 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
@@ -100,14 +100,16 @@ io_mapping_unmap_atomic(void __iomem *vaddr) | |||
100 | } | 100 | } |
101 | 101 | ||
102 | static inline void __iomem * | 102 | static inline void __iomem * |
103 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | 103 | io_mapping_map_wc(struct io_mapping *mapping, |
104 | unsigned long offset, | ||
105 | unsigned long size) | ||
104 | { | 106 | { |
105 | resource_size_t phys_addr; | 107 | resource_size_t phys_addr; |
106 | 108 | ||
107 | BUG_ON(offset >= mapping->size); | 109 | BUG_ON(offset >= mapping->size); |
108 | phys_addr = mapping->base + offset; | 110 | phys_addr = mapping->base + offset; |
109 | 111 | ||
110 | return ioremap_wc(phys_addr, PAGE_SIZE); | 112 | return ioremap_wc(phys_addr, size); |
111 | } | 113 | } |
112 | 114 | ||
113 | static inline void | 115 | static inline void |
@@ -155,7 +157,9 @@ io_mapping_unmap_atomic(void __iomem *vaddr) | |||
155 | 157 | ||
156 | /* Non-atomic map/unmap */ | 158 | /* Non-atomic map/unmap */ |
157 | static inline void __iomem * | 159 | static inline void __iomem * |
158 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | 160 | io_mapping_map_wc(struct io_mapping *mapping, |
161 | unsigned long offset, | ||
162 | unsigned long size) | ||
159 | { | 163 | { |
160 | return ((char __force __iomem *) mapping) + offset; | 164 | return ((char __force __iomem *) mapping) + offset; |
161 | } | 165 | } |