From owner-svn-src-head@freebsd.org Sun Jul 22 22:35:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C27D10314C3; Sun, 22 Jul 2018 22:35:18 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1B718899E; Sun, 22 Jul 2018 22:35:17 +0000 (UTC) (envelope-from lwhsu@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3A2214268; Sun, 22 Jul 2018 22:35:17 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6MMZH7Y030352; Sun, 22 Jul 2018 22:35:17 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MMZHdX030351; Sun, 22 Jul 2018 22:35:17 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201807222235.w6MMZHdX030351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Sun, 22 Jul 2018 22:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336620 - head/contrib/ofed/include X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/contrib/ofed/include X-SVN-Commit-Revision: 336620 X-SVN-Commit-Repository: base 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.27 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: Sun, 22 Jul 2018 22:35:18 -0000 Author: lwhsu (ports committer) Date: Sun Jul 22 22:35:17 2018 New Revision: 336620 URL: https://svnweb.freebsd.org/changeset/base/336620 Log: Add udma_barrier definitions for RISC-V Reviewed by: kib Sponsored by: The FreeBSD Foundation Modified: head/contrib/ofed/include/udma_barrier.h Modified: head/contrib/ofed/include/udma_barrier.h ============================================================================== --- head/contrib/ofed/include/udma_barrier.h Sun Jul 22 22:34:20 2018 (r336619) +++ head/contrib/ofed/include/udma_barrier.h Sun Jul 22 22:35:17 2018 (r336620) @@ -104,6 +104,10 @@ #include #include #define udma_to_device_barrier() dmb() +#elif defined(__riscv) +#include +#include +#define udma_to_device_barrier() fence() #else #error No architecture specific memory barrier defines found! #endif @@ -140,6 +144,8 @@ #define udma_from_device_barrier() mips_sync() #elif defined(__arm__) #define udma_from_device_barrier() dmb() +#elif defined(__riscv) +#define udma_from_device_barrier() fence() #else #error No architecture specific memory barrier defines found! #endif @@ -208,6 +214,8 @@ #define mmio_flush_writes() mips_sync() #elif defined(__arm__) #define mmio_flush_writes() dmb() +#elif defined(__riscv) +#define mmio_flush_writes() fence() #else #error No architecture specific memory barrier defines found! #endif