package/rdma-core: fix mips4 build
PATCH 1/1 package/rdma-core: fix mips4 build
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 the addition of the package in commit ea47e177f093d7378e8e8e1f50d6f4e3fce0a088 and
https://github.com/linux-rdma/rdma-core/commit/b7c428344ea96d446f6ffe31c620a238a7f25c9e:
/tmp/ccrBy9fV.s: Assembler messages:/tmp/ccrBy9fV.s:994: Error: invalid operands `sync 0'
Fixes:
- http://autobuild.buildroot.org/results/2ab22a3ec4287fc15ff6a90d8715b4897b32a933
- http://autobuild.buildroot.org/results/2df58f9b98aacf00960932f53510b29199393461
--- ...-util-udma_barrier.h-fix-mips4-build.patch | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 package/rdma-core/0001-util-udma_barrier.h-fix-mips4-build.patch
package/rdma-core/0001-util-udma_barrier.h-fix-mips4-build.patch new file +56 -0
@@ -0,0 +1,56 @@ +From 1b1ca539f6e1f0b774e989f1022477686e4fc77f Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Sun, 21 Jan 2024 18:55:34 +0100 +Subject: [PATCH] util/udma_barrier.h: fix mips4 build + +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 +https://github.com/linux-rdma/rdma-core/commit/b7c428344ea96d446f6ffe31c620a238a7f25c9e: + +/tmp/ccrBy9fV.s: Assembler messages: +/tmp/ccrBy9fV.s:994: Error: invalid operands `sync 0' + +Fixes: + - http://autobuild.buildroot.org/results/2ab22a3ec4287fc15ff6a90d8715b4897b32a933 + +Signed-off-by: Fabrice Fontaine <[email protected]> +Upstream: https://github.com/linux-rdma/rdma-core/commit/f3f0c06014c6de845032e6fe9f152674919b3ec6 +--- + util/udma_barrier.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/util/udma_barrier.h b/util/udma_barrier.h +index 0a1f8a45b..3793d2f18 100644 +--- a/util/udma_barrier.h ++++ b/util/udma_barrier.h +@@ -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") + #else + #error No architecture specific memory barrier defines found! + #endif +@@ -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") + #else + #error No architecture specific memory barrier defines found! + #endif +@@ -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") + #else + #error No architecture specific memory barrier defines found! + #endif
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
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 the addition of the package in commit
ea47e177f093d7378e8e8e1f50d6f4e3fce0a088and
https://github.com/linux-rdma/rdma-core/commit/b7c428344ea96d446f6ffe31c620a238a7f25c9e:
Quoted 8 lines
/tmp/ccrBy9fV.s: Assembler messages:/tmp/ccrBy9fV.s:994: Error: invalid operands `sync 0'Fixes:
- http://autobuild.buildroot.org/results/2ab22a3ec4287fc15ff6a90d8715b4897b32a933
- http://autobuild.buildroot.org/results/2df58f9b98aacf00960932f53510b29199393461Signed-off-by Fabrice Fontaine <[email protected]>
Committed, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
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 the addition of the package in commit
ea47e177f093d7378e8e8e1f50d6f4e3fce0a088and
https://github.com/linux-rdma/rdma-core/commit/b7c428344ea96d446f6ffe31c620a238a7f25c9e:
Quoted 8 lines
/tmp/ccrBy9fV.s: Assembler messages:/tmp/ccrBy9fV.s:994: Error: invalid operands `sync 0'Fixes:
- http://autobuild.buildroot.org/results/2ab22a3ec4287fc15ff6a90d8715b4897b32a933
- http://autobuild.buildroot.org/results/2df58f9b98aacf00960932f53510b29199393461Signed-off-by Fabrice Fontaine <[email protected]>
Committed to 2023.02.x and 2023.11.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot