Add more #ifdef arch checks to the linuxkpi
arm, mips, and powerpc all implement pmap_mapdev_attr() and pmap_unmapdev(), so add those archs to the checks. powerpc also includes the atomic_swap_*() functions, so add that to the supported list as well. Not tested except by compiling powerpc. Reviewed by: markj
This commit is contained in:
parent
d90bf7d850
commit
287e7a861a
@ -131,7 +131,8 @@ static inline int
|
||||
atomic_xchg(atomic_t *v, int i)
|
||||
{
|
||||
#if defined(__i386__) || defined(__amd64__) || \
|
||||
defined(__arm__) || defined(__aarch64__)
|
||||
defined(__arm__) || defined(__aarch64__) || \
|
||||
defined(__powerpc__)
|
||||
return (atomic_swap_int(&v->counter, i));
|
||||
#else
|
||||
int ret;
|
||||
|
@ -108,7 +108,8 @@ static inline int64_t
|
||||
atomic64_xchg(atomic64_t *v, int64_t i)
|
||||
{
|
||||
#if defined(__i386__) || defined(__amd64__) || \
|
||||
defined(__arm__) || defined(__aarch64__)
|
||||
defined(__arm__) || defined(__aarch64__) || \
|
||||
defined(__powerpc64__)
|
||||
return (atomic_swap_64(&v->counter, i));
|
||||
#else
|
||||
int64_t ret;
|
||||
|
@ -180,7 +180,8 @@ _outb(u_char data, u_int port)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__i386__) || defined(__amd64__)
|
||||
#if defined(__i386__) || defined(__amd64__) || \
|
||||
defined(__arm__) || defined(__mips__) || defined(__powerpc__)
|
||||
void *_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr);
|
||||
#else
|
||||
#define _ioremap_attr(...) NULL
|
||||
|
@ -1415,7 +1415,8 @@ vmmap_remove(void *addr)
|
||||
return (vmmap);
|
||||
}
|
||||
|
||||
#if defined(__i386__) || defined(__amd64__)
|
||||
#if defined(__i386__) || defined(__amd64__) || \
|
||||
defined(__arm__) || defined(__mips__) || defined(__powerpc__)
|
||||
void *
|
||||
_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr)
|
||||
{
|
||||
@ -1438,7 +1439,8 @@ iounmap(void *addr)
|
||||
vmmap = vmmap_remove(addr);
|
||||
if (vmmap == NULL)
|
||||
return;
|
||||
#if defined(__i386__) || defined(__amd64__)
|
||||
#if defined(__i386__) || defined(__amd64__) || \
|
||||
defined(__arm__) || defined(__mips__) || defined(__powerpc__)
|
||||
pmap_unmapdev((vm_offset_t)addr, vmmap->vm_size);
|
||||
#endif
|
||||
kfree(vmmap);
|
||||
|
Loading…
Reference in New Issue
Block a user