Skip to content

Commit

Permalink
util/udma_barrier.h: fix mips4 build
Browse files Browse the repository at this point in the history
The 'sync' instruction for MIPS was defined in MIPS-II as taking no
operands. MIPS32 extended the define of 'sync' as taking an optional
unsigned 5 bit immediate.

As a result, replace "sync 0" by "sync" to fix the following build
failure on mips4 raised since version 43.0 and
b7c4283:

/tmp/ccrBy9fV.s: Assembler messages:
/tmp/ccrBy9fV.s:994: Error: invalid operands `sync 0'

Fixes:
 - http:https://autobuild.buildroot.org/results/2ab22a3ec4287fc15ff6a90d8715b4897b32a933

Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine committed Jan 21, 2024
1 parent 88d13e3 commit 1b1ca53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions util/udma_barrier.h
Expand Up @@ -101,7 +101,7 @@
#elif defined(__riscv)
#define udma_to_device_barrier() asm volatile("fence ow,ow" ::: "memory")
#elif defined(__mips__)
#define udma_to_device_barrier() asm volatile("sync 0" ::: "memory")
#define udma_to_device_barrier() asm volatile("sync" ::: "memory")

Check failure on line 104 in util/udma_barrier.h

View check run for this annotation

Azure Pipelines / linux-rdma.rdma-core (Build Compile Tests)

util/udma_barrier.h#L104

util/udma_barrier.h(104,): error COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses

Check failure on line 104 in util/udma_barrier.h

View check run for this annotation

Azure Pipelines / linux-rdma.rdma-core

util/udma_barrier.h#L104

util/udma_barrier.h(104,): error COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#else
#error No architecture specific memory barrier defines found!
#endif
Expand Down Expand Up @@ -139,7 +139,7 @@
#elif defined(__riscv)
#define udma_from_device_barrier() asm volatile("fence ir,ir" ::: "memory")
#elif defined(__mips__)
#define udma_from_device_barrier() asm volatile("sync 0" ::: "memory")
#define udma_from_device_barrier() asm volatile("sync" ::: "memory")

Check failure on line 142 in util/udma_barrier.h

View check run for this annotation

Azure Pipelines / linux-rdma.rdma-core (Build Compile Tests)

util/udma_barrier.h#L142

util/udma_barrier.h(142,): error COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses

Check failure on line 142 in util/udma_barrier.h

View check run for this annotation

Azure Pipelines / linux-rdma.rdma-core

util/udma_barrier.h#L142

util/udma_barrier.h(142,): error COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#else
#error No architecture specific memory barrier defines found!
#endif
Expand Down Expand Up @@ -212,7 +212,7 @@
#include "s390_mmio_insn.h"
#define mmio_flush_writes() s390_pciwb()
#elif defined(__mips__)
#define mmio_flush_writes() asm volatile("sync 0" ::: "memory")
#define mmio_flush_writes() asm volatile("sync" ::: "memory")

Check failure on line 215 in util/udma_barrier.h

View check run for this annotation

Azure Pipelines / linux-rdma.rdma-core (Build Compile Tests)

util/udma_barrier.h#L215

util/udma_barrier.h(215,): error COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses

Check failure on line 215 in util/udma_barrier.h

View check run for this annotation

Azure Pipelines / linux-rdma.rdma-core

util/udma_barrier.h#L215

util/udma_barrier.h(215,): error COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#else
#error No architecture specific memory barrier defines found!
#endif
Expand Down

0 comments on commit 1b1ca53

Please sign in to comment.