diff options
Diffstat (limited to 'include/linux/io-mapping.h')
| -rw-r--r-- | include/linux/io-mapping.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 8cdcc2a199ad..e44e84f0156c 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | * The io_mapping mechanism provides an abstraction for mapping | 27 | * The io_mapping mechanism provides an abstraction for mapping |
| 28 | * individual pages from an io device to the CPU in an efficient fashion. | 28 | * individual pages from an io device to the CPU in an efficient fashion. |
| 29 | * | 29 | * |
| 30 | * See Documentation/io_mapping.txt | 30 | * See Documentation/io-mapping.txt |
| 31 | */ | 31 | */ |
| 32 | 32 | ||
| 33 | #ifdef CONFIG_HAVE_ATOMIC_IOMAP | 33 | #ifdef CONFIG_HAVE_ATOMIC_IOMAP |
| @@ -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 */ |
