Date: Sun, 22 Jul 2018 22:35:17 +0000 (UTC) From: Li-Wen Hsu <lwhsu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336620 - head/contrib/ofed/include Message-ID: <201807222235.w6MMZHdX030351@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/types.h> #include <machine/atomic.h> #define udma_to_device_barrier() dmb() +#elif defined(__riscv) +#include <sys/types.h> +#include <machine/atomic.h> +#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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807222235.w6MMZHdX030351>