diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/io-mapping.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 8cdcc2a199ad..1feeb5263565 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
@@ -117,6 +117,8 @@ io_mapping_unmap(void __iomem *vaddr) | |||
117 | 117 | ||
118 | #else | 118 | #else |
119 | 119 | ||
120 | #include <linux/uaccess.h> | ||
121 | |||
120 | /* this struct isn't actually defined anywhere */ | 122 | /* this struct isn't actually defined anywhere */ |
121 | struct io_mapping; | 123 | struct io_mapping; |
122 | 124 | ||
@@ -138,12 +140,14 @@ static inline void __iomem * | |||
138 | io_mapping_map_atomic_wc(struct io_mapping *mapping, | 140 | io_mapping_map_atomic_wc(struct io_mapping *mapping, |
139 | unsigned long offset) | 141 | unsigned long offset) |
140 | { | 142 | { |
143 | pagefault_disable(); | ||
141 | return ((char __force __iomem *) mapping) + offset; | 144 | return ((char __force __iomem *) mapping) + offset; |
142 | } | 145 | } |
143 | 146 | ||
144 | static inline void | 147 | static inline void |
145 | io_mapping_unmap_atomic(void __iomem *vaddr) | 148 | io_mapping_unmap_atomic(void __iomem *vaddr) |
146 | { | 149 | { |
150 | pagefault_enable(); | ||
147 | } | 151 | } |
148 | 152 | ||
149 | /* Non-atomic map/unmap */ | 153 | /* Non-atomic map/unmap */ |