From owner-svn-src-head@freebsd.org Wed Jun 7 18:08:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12FB7D14FFA; Wed, 7 Jun 2017 18:08:13 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E26407D3DC; Wed, 7 Jun 2017 18:08:12 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v57I8CwT019344; Wed, 7 Jun 2017 18:08:12 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v57I8BI7019340; Wed, 7 Jun 2017 18:08:11 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201706071808.v57I8BI7019340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 7 Jun 2017 18:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319656 - in head/sys/compat/linuxkpi/common: include/asm include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2017 18:08:13 -0000 Author: jhibbits Date: Wed Jun 7 18:08:11 2017 New Revision: 319656 URL: https://svnweb.freebsd.org/changeset/base/319656 Log: 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 Modified: head/sys/compat/linuxkpi/common/include/asm/atomic.h head/sys/compat/linuxkpi/common/include/asm/atomic64.h head/sys/compat/linuxkpi/common/include/linux/io.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/asm/atomic.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/atomic.h Wed Jun 7 16:04:34 2017 (r319655) +++ head/sys/compat/linuxkpi/common/include/asm/atomic.h Wed Jun 7 18:08:11 2017 (r319656) @@ -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; Modified: head/sys/compat/linuxkpi/common/include/asm/atomic64.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/atomic64.h Wed Jun 7 16:04:34 2017 (r319655) +++ head/sys/compat/linuxkpi/common/include/asm/atomic64.h Wed Jun 7 18:08:11 2017 (r319656) @@ -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; Modified: head/sys/compat/linuxkpi/common/include/linux/io.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/io.h Wed Jun 7 16:04:34 2017 (r319655) +++ head/sys/compat/linuxkpi/common/include/linux/io.h Wed Jun 7 18:08:11 2017 (r319656) @@ -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 Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Wed Jun 7 16:04:34 2017 (r319655) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Wed Jun 7 18:08:11 2017 (r319656) @@ -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);