mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 04:22:44 +00:00
Add udma_barrier definitions for RISC-V
Reviewed by: kib Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
cbc397fd10
commit
8407faa1b3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336620
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user