Changeset View
Changeset View
Standalone View
Standalone View
head/sys/compat/linuxkpi/common/include/linux/io.h
Show First 20 Lines • Show All 390 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) || defined(__aarch64__) | #if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) || defined(__aarch64__) | ||||
void *_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr); | void *_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr); | ||||
#else | #else | ||||
#define _ioremap_attr(...) NULL | #define _ioremap_attr(...) NULL | ||||
#endif | #endif | ||||
#ifdef VM_MEMATTR_DEVICE | |||||
#define ioremap_nocache(addr, size) \ | #define ioremap_nocache(addr, size) \ | ||||
_ioremap_attr((addr), (size), VM_MEMATTR_DEVICE) | |||||
#define ioremap_wt(addr, size) \ | |||||
_ioremap_attr((addr), (size), VM_MEMATTR_DEVICE) | |||||
#define ioremap(addr, size) \ | |||||
_ioremap_attr((addr), (size), VM_MEMATTR_DEVICE) | |||||
#else | |||||
#define ioremap_nocache(addr, size) \ | |||||
_ioremap_attr((addr), (size), VM_MEMATTR_UNCACHEABLE) | _ioremap_attr((addr), (size), VM_MEMATTR_UNCACHEABLE) | ||||
#define ioremap_wc(addr, size) \ | |||||
_ioremap_attr((addr), (size), VM_MEMATTR_WRITE_COMBINING) | |||||
#define ioremap_wb(addr, size) \ | |||||
_ioremap_attr((addr), (size), VM_MEMATTR_WRITE_BACK) | |||||
#define ioremap_wt(addr, size) \ | #define ioremap_wt(addr, size) \ | ||||
_ioremap_attr((addr), (size), VM_MEMATTR_WRITE_THROUGH) | _ioremap_attr((addr), (size), VM_MEMATTR_WRITE_THROUGH) | ||||
#define ioremap(addr, size) \ | #define ioremap(addr, size) \ | ||||
_ioremap_attr((addr), (size), VM_MEMATTR_UNCACHEABLE) | _ioremap_attr((addr), (size), VM_MEMATTR_UNCACHEABLE) | ||||
#endif | |||||
#define ioremap_wc(addr, size) \ | |||||
_ioremap_attr((addr), (size), VM_MEMATTR_WRITE_COMBINING) | |||||
#define ioremap_wb(addr, size) \ | |||||
_ioremap_attr((addr), (size), VM_MEMATTR_WRITE_BACK) | |||||
void iounmap(void *addr); | void iounmap(void *addr); | ||||
#define memset_io(a, b, c) memset((a), (b), (c)) | #define memset_io(a, b, c) memset((a), (b), (c)) | ||||
#define memcpy_fromio(a, b, c) memcpy((a), (b), (c)) | #define memcpy_fromio(a, b, c) memcpy((a), (b), (c)) | ||||
#define memcpy_toio(a, b, c) memcpy((a), (b), (c)) | #define memcpy_toio(a, b, c) memcpy((a), (b), (c)) | ||||
static inline void | static inline void | ||||
__iowrite32_copy(void *to, void *from, size_t count) | __iowrite32_copy(void *to, void *from, size_t count) | ||||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |