diff options
-rw-r--r-- | arch/x86/mm/ioremap.c | 11 | ||||
-rw-r--r-- | include/asm-x86/io_32.h | 13 | ||||
-rw-r--r-- | include/asm-x86/io_64.h | 13 |
3 files changed, 14 insertions, 23 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index e84c09e7d2c1..8777bb7688f4 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -106,8 +106,8 @@ static int ioremap_change_attr(unsigned long phys_addr, unsigned long size, | |||
106 | * have to convert them into an offset in a page-aligned mapping, but the | 106 | * have to convert them into an offset in a page-aligned mapping, but the |
107 | * caller shouldn't need to know that small detail. | 107 | * caller shouldn't need to know that small detail. |
108 | */ | 108 | */ |
109 | void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, | 109 | static void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, |
110 | unsigned long flags) | 110 | unsigned long flags) |
111 | { | 111 | { |
112 | void __iomem *addr; | 112 | void __iomem *addr; |
113 | struct vm_struct *area; | 113 | struct vm_struct *area; |
@@ -164,7 +164,6 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, | |||
164 | 164 | ||
165 | return (void __iomem *) (offset + (char __iomem *)addr); | 165 | return (void __iomem *) (offset + (char __iomem *)addr); |
166 | } | 166 | } |
167 | EXPORT_SYMBOL(__ioremap); | ||
168 | 167 | ||
169 | /** | 168 | /** |
170 | * ioremap_nocache - map bus memory into CPU space | 169 | * ioremap_nocache - map bus memory into CPU space |
@@ -193,6 +192,12 @@ void __iomem *ioremap_nocache(unsigned long phys_addr, unsigned long size) | |||
193 | } | 192 | } |
194 | EXPORT_SYMBOL(ioremap_nocache); | 193 | EXPORT_SYMBOL(ioremap_nocache); |
195 | 194 | ||
195 | void __iomem *ioremap_cache(unsigned long phys_addr, unsigned long size) | ||
196 | { | ||
197 | return __ioremap(phys_addr, size, 0); | ||
198 | } | ||
199 | EXPORT_SYMBOL(ioremap_cache); | ||
200 | |||
196 | /** | 201 | /** |
197 | * iounmap - Free a IO remapping | 202 | * iounmap - Free a IO remapping |
198 | * @addr: virtual address from ioremap_* | 203 | * @addr: virtual address from ioremap_* |
diff --git a/include/asm-x86/io_32.h b/include/asm-x86/io_32.h index 059a1fee4de3..586d7aa54ceb 100644 --- a/include/asm-x86/io_32.h +++ b/include/asm-x86/io_32.h | |||
@@ -100,8 +100,6 @@ static inline void * phys_to_virt(unsigned long address) | |||
100 | */ | 100 | */ |
101 | #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) | 101 | #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) |
102 | 102 | ||
103 | extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); | ||
104 | |||
105 | /** | 103 | /** |
106 | * ioremap - map bus memory into CPU space | 104 | * ioremap - map bus memory into CPU space |
107 | * @offset: bus address of the memory | 105 | * @offset: bus address of the memory |
@@ -116,18 +114,13 @@ extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsign | |||
116 | * If the area you are trying to map is a PCI BAR you should have a | 114 | * If the area you are trying to map is a PCI BAR you should have a |
117 | * look at pci_iomap(). | 115 | * look at pci_iomap(). |
118 | */ | 116 | */ |
119 | extern void __iomem * ioremap_nocache(unsigned long offset, unsigned long size); | 117 | extern void __iomem *ioremap_nocache(unsigned long offset, unsigned long size); |
120 | 118 | extern void __iomem *ioremap_cache(unsigned long offset, unsigned long size); | |
121 | static inline void __iomem * | ||
122 | ioremap_cache(unsigned long offset, unsigned long size) | ||
123 | { | ||
124 | return __ioremap(offset, size, 0); | ||
125 | } | ||
126 | 119 | ||
127 | /* | 120 | /* |
128 | * The default ioremap() behavior is non-cached: | 121 | * The default ioremap() behavior is non-cached: |
129 | */ | 122 | */ |
130 | static inline void __iomem * ioremap(unsigned long offset, unsigned long size) | 123 | static inline void __iomem *ioremap(unsigned long offset, unsigned long size) |
131 | { | 124 | { |
132 | return ioremap_nocache(offset, size); | 125 | return ioremap_nocache(offset, size); |
133 | } | 126 | } |
diff --git a/include/asm-x86/io_64.h b/include/asm-x86/io_64.h index 7dee3c6e9c39..ee7a5c955962 100644 --- a/include/asm-x86/io_64.h +++ b/include/asm-x86/io_64.h | |||
@@ -150,8 +150,6 @@ static inline void * phys_to_virt(unsigned long address) | |||
150 | 150 | ||
151 | #include <asm-generic/iomap.h> | 151 | #include <asm-generic/iomap.h> |
152 | 152 | ||
153 | extern void __iomem *__ioremap(unsigned long offset, unsigned long size, unsigned long flags); | ||
154 | |||
155 | extern void *early_ioremap(unsigned long addr, unsigned long size); | 153 | extern void *early_ioremap(unsigned long addr, unsigned long size); |
156 | extern void early_iounmap(void *addr, unsigned long size); | 154 | extern void early_iounmap(void *addr, unsigned long size); |
157 | 155 | ||
@@ -160,18 +158,13 @@ extern void early_iounmap(void *addr, unsigned long size); | |||
160 | * it's useful if some control registers are in such an area and write combining | 158 | * it's useful if some control registers are in such an area and write combining |
161 | * or read caching is not desirable: | 159 | * or read caching is not desirable: |
162 | */ | 160 | */ |
163 | extern void __iomem * ioremap_nocache(unsigned long offset, unsigned long size); | 161 | extern void __iomem *ioremap_nocache(unsigned long offset, unsigned long size); |
164 | 162 | extern void __iomem *ioremap_cache(unsigned long offset, unsigned long size); | |
165 | static inline void __iomem * | ||
166 | ioremap_cache(unsigned long offset, unsigned long size) | ||
167 | { | ||
168 | return __ioremap(offset, size, 0); | ||
169 | } | ||
170 | 163 | ||
171 | /* | 164 | /* |
172 | * The default ioremap() behavior is non-cached: | 165 | * The default ioremap() behavior is non-cached: |
173 | */ | 166 | */ |
174 | static inline void __iomem * ioremap(unsigned long offset, unsigned long size) | 167 | static inline void __iomem *ioremap(unsigned long offset, unsigned long size) |
175 | { | 168 | { |
176 | return ioremap_cache(offset, size); | 169 | return ioremap_cache(offset, size); |
177 | } | 170 | } |