.. | .. |
---|
90 | 90 | #define __raw_writew __writew |
---|
91 | 91 | #define __raw_writel __writel |
---|
92 | 92 | |
---|
93 | | -#define mmiowb() barrier() |
---|
94 | | - |
---|
95 | 93 | #ifdef CONFIG_X86_64 |
---|
96 | 94 | |
---|
97 | 95 | build_mmio_read(readq, "q", u64, "=r", :"memory") |
---|
.. | .. |
---|
167 | 165 | { |
---|
168 | 166 | return (unsigned int)virt_to_phys(address); |
---|
169 | 167 | } |
---|
170 | | -#define isa_page_to_bus(page) ((unsigned int)page_to_phys(page)) |
---|
171 | 168 | #define isa_bus_to_virt phys_to_virt |
---|
172 | 169 | |
---|
173 | 170 | /* |
---|
.. | .. |
---|
183 | 180 | * The default ioremap() behavior is non-cached; if you need something |
---|
184 | 181 | * else, you probably want one of the following. |
---|
185 | 182 | */ |
---|
186 | | -extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); |
---|
187 | | -#define ioremap_nocache ioremap_nocache |
---|
188 | 183 | extern void __iomem *ioremap_uc(resource_size_t offset, unsigned long size); |
---|
189 | 184 | #define ioremap_uc ioremap_uc |
---|
190 | | - |
---|
191 | 185 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); |
---|
192 | 186 | #define ioremap_cache ioremap_cache |
---|
193 | 187 | extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size, unsigned long prot_val); |
---|
194 | 188 | #define ioremap_prot ioremap_prot |
---|
| 189 | +extern void __iomem *ioremap_encrypted(resource_size_t phys_addr, unsigned long size); |
---|
| 190 | +#define ioremap_encrypted ioremap_encrypted |
---|
195 | 191 | |
---|
196 | 192 | /** |
---|
197 | 193 | * ioremap - map bus memory into CPU space |
---|
.. | .. |
---|
207 | 203 | * If the area you are trying to map is a PCI BAR you should have a |
---|
208 | 204 | * look at pci_iomap(). |
---|
209 | 205 | */ |
---|
210 | | -static inline void __iomem *ioremap(resource_size_t offset, unsigned long size) |
---|
211 | | -{ |
---|
212 | | - return ioremap_nocache(offset, size); |
---|
213 | | -} |
---|
| 206 | +void __iomem *ioremap(resource_size_t offset, unsigned long size); |
---|
214 | 207 | #define ioremap ioremap |
---|
215 | 208 | |
---|
216 | 209 | extern void iounmap(volatile void __iomem *addr); |
---|
.. | .. |
---|
219 | 212 | extern void set_iounmap_nonlazy(void); |
---|
220 | 213 | |
---|
221 | 214 | #ifdef __KERNEL__ |
---|
| 215 | + |
---|
| 216 | +void memcpy_fromio(void *, const volatile void __iomem *, size_t); |
---|
| 217 | +void memcpy_toio(volatile void __iomem *, const void *, size_t); |
---|
| 218 | +void memset_io(volatile void __iomem *, int, size_t); |
---|
| 219 | + |
---|
| 220 | +#define memcpy_fromio memcpy_fromio |
---|
| 221 | +#define memcpy_toio memcpy_toio |
---|
| 222 | +#define memset_io memset_io |
---|
222 | 223 | |
---|
223 | 224 | #include <asm-generic/iomap.h> |
---|
224 | 225 | |
---|
.. | .. |
---|
369 | 370 | |
---|
370 | 371 | extern bool is_early_ioremap_ptep(pte_t *ptep); |
---|
371 | 372 | |
---|
372 | | -#ifdef CONFIG_XEN |
---|
373 | | -#include <xen/xen.h> |
---|
374 | | -struct bio_vec; |
---|
375 | | - |
---|
376 | | -extern bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, |
---|
377 | | - const struct bio_vec *vec2); |
---|
378 | | - |
---|
379 | | -#define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ |
---|
380 | | - (__BIOVEC_PHYS_MERGEABLE(vec1, vec2) && \ |
---|
381 | | - (!xen_domain() || xen_biovec_phys_mergeable(vec1, vec2))) |
---|
382 | | -#endif /* CONFIG_XEN */ |
---|
383 | | - |
---|
384 | 373 | #define IO_SPACE_LIMIT 0xffff |
---|
385 | 374 | |
---|
386 | 375 | #include <asm-generic/io.h> |
---|
.. | .. |
---|
410 | 399 | extern bool phys_mem_access_encrypted(unsigned long phys_addr, |
---|
411 | 400 | unsigned long size); |
---|
412 | 401 | |
---|
| 402 | +/** |
---|
| 403 | + * iosubmit_cmds512 - copy data to single MMIO location, in 512-bit units |
---|
| 404 | + * @dst: destination, in MMIO space (must be 512-bit aligned) |
---|
| 405 | + * @src: source |
---|
| 406 | + * @count: number of 512 bits quantities to submit |
---|
| 407 | + * |
---|
| 408 | + * Submit data from kernel space to MMIO space, in units of 512 bits at a |
---|
| 409 | + * time. Order of access is not guaranteed, nor is a memory barrier |
---|
| 410 | + * performed afterwards. |
---|
| 411 | + * |
---|
| 412 | + * Warning: Do not use this helper unless your driver has checked that the CPU |
---|
| 413 | + * instruction is supported on the platform. |
---|
| 414 | + */ |
---|
| 415 | +static inline void iosubmit_cmds512(void __iomem *dst, const void *src, |
---|
| 416 | + size_t count) |
---|
| 417 | +{ |
---|
| 418 | + const u8 *from = src; |
---|
| 419 | + const u8 *end = from + count * 64; |
---|
| 420 | + |
---|
| 421 | + while (from < end) { |
---|
| 422 | + movdir64b(dst, from); |
---|
| 423 | + from += 64; |
---|
| 424 | + } |
---|
| 425 | +} |
---|
| 426 | + |
---|
413 | 427 | #endif /* _ASM_X86_IO_H */ |
---|