diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2015-09-29 10:14:58 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2015-10-15 10:52:13 -0400 |
commit | eee06e060ebd536a1ac9610fdcb41406142b88f0 (patch) | |
tree | 3bb88c25927ae61651a4a24b969afa246d8d2e88 /src/x86.h | |
parent | 1dcf02b06797309676a2915454d1388b8ef0434d (diff) | |
download | seabios-eee06e060ebd536a1ac9610fdcb41406142b88f0.tar.gz |
virtio: Move standard definitions from virtio-ring.h to standard headers
Move PAGE_SHIFT / virt_to_phys() to memmap.h and smp_[rw]mb() to
x86.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/x86.h')
-rw-r--r-- | src/x86.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -190,6 +190,14 @@ static inline void outsl(u16 port, u32 *data, u32 count) { : "+c"(count), "+S"(data) : "d"(port) : "memory"); } +/* Compiler barrier is enough as an x86 CPU does not reorder reads or writes */ +static inline void smp_rmb(void) { + barrier(); +} +static inline void smp_wmb(void) { + barrier(); +} + static inline void writel(void *addr, u32 val) { barrier(); *(volatile u32 *)addr = val; |