diff options
Diffstat (limited to 'arch/x86/include/asm/io_64.h')
-rw-r--r-- | arch/x86/include/asm/io_64.h | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/arch/x86/include/asm/io_64.h b/arch/x86/include/asm/io_64.h index 563c16270ba6..244067893af4 100644 --- a/arch/x86/include/asm/io_64.h +++ b/arch/x86/include/asm/io_64.h | |||
@@ -136,73 +136,12 @@ __OUTS(b) | |||
136 | __OUTS(w) | 136 | __OUTS(w) |
137 | __OUTS(l) | 137 | __OUTS(l) |
138 | 138 | ||
139 | #define IO_SPACE_LIMIT 0xffff | ||
140 | |||
141 | #if defined(__KERNEL__) && defined(__x86_64__) | 139 | #if defined(__KERNEL__) && defined(__x86_64__) |
142 | 140 | ||
143 | #include <linux/vmalloc.h> | 141 | #include <linux/vmalloc.h> |
144 | 142 | ||
145 | #ifndef __i386__ | ||
146 | /* | ||
147 | * Change virtual addresses to physical addresses and vv. | ||
148 | * These are pretty trivial | ||
149 | */ | ||
150 | static inline unsigned long virt_to_phys(volatile void *address) | ||
151 | { | ||
152 | return __pa(address); | ||
153 | } | ||
154 | |||
155 | static inline void *phys_to_virt(unsigned long address) | ||
156 | { | ||
157 | return __va(address); | ||
158 | } | ||
159 | #endif | ||
160 | |||
161 | /* | ||
162 | * Change "struct page" to physical address. | ||
163 | */ | ||
164 | #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) | ||
165 | |||
166 | #include <asm-generic/iomap.h> | 143 | #include <asm-generic/iomap.h> |
167 | 144 | ||
168 | /* | ||
169 | * This one maps high address device memory and turns off caching for that area. | ||
170 | * it's useful if some control registers are in such an area and write combining | ||
171 | * or read caching is not desirable: | ||
172 | */ | ||
173 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); | ||
174 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); | ||
175 | extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size, | ||
176 | unsigned long prot_val); | ||
177 | |||
178 | /* | ||
179 | * The default ioremap() behavior is non-cached: | ||
180 | */ | ||
181 | static inline void __iomem *ioremap(resource_size_t offset, unsigned long size) | ||
182 | { | ||
183 | return ioremap_nocache(offset, size); | ||
184 | } | ||
185 | |||
186 | extern void iounmap(volatile void __iomem *addr); | ||
187 | |||
188 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); | ||
189 | |||
190 | /* | ||
191 | * ISA I/O bus memory addresses are 1:1 with the physical address. | ||
192 | */ | ||
193 | #define isa_virt_to_bus virt_to_phys | ||
194 | #define isa_page_to_bus page_to_phys | ||
195 | #define isa_bus_to_virt phys_to_virt | ||
196 | |||
197 | /* | ||
198 | * However PCI ones are not necessarily 1:1 and therefore these interfaces | ||
199 | * are forbidden in portable PCI drivers. | ||
200 | * | ||
201 | * Allow them on x86 for legacy drivers, though. | ||
202 | */ | ||
203 | #define virt_to_bus virt_to_phys | ||
204 | #define bus_to_virt phys_to_virt | ||
205 | |||
206 | void __memcpy_fromio(void *, unsigned long, unsigned); | 145 | void __memcpy_fromio(void *, unsigned long, unsigned); |
207 | void __memcpy_toio(unsigned long, const void *, unsigned); | 146 | void __memcpy_toio(unsigned long, const void *, unsigned); |
208 | 147 | ||