git: 6525c2d4de8f - main - mips/octeon SDK: Fix __cvmx_cmd_queue_lock asm for clang 11
Justin Hibbits
jhibbits at FreeBSD.org
Sun Apr 18 17:08:45 UTC 2021
The branch main has been updated by jhibbits:
URL: https://cgit.FreeBSD.org/src/commit/?id=6525c2d4de8f6ddc964f2f5ba9bd41d70bf98660
commit 6525c2d4de8f6ddc964f2f5ba9bd41d70bf98660
Author: Justin Hibbits <jhibbits at FreeBSD.org>
AuthorDate: 2021-04-18 16:59:04 +0000
Commit: Justin Hibbits <jhibbits at FreeBSD.org>
CommitDate: 2021-04-18 17:05:55 +0000
mips/octeon SDK: Fix __cvmx_cmd_queue_lock asm for clang 11
The 'ticket' and 'my_ticket' arguments are both read and written within
the same asm block. Clang is stricter with the constraints than gcc4
was, so accepts the '=r' at face value and will happily overwrite
registers that "should" be preserved.
Mark these operands to not clobber other operands, so they get their own
registers.
This fixes a panic on bringing up the octe interfaces.
---
sys/contrib/octeon-sdk/cvmx-cmd-queue.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/contrib/octeon-sdk/cvmx-cmd-queue.h b/sys/contrib/octeon-sdk/cvmx-cmd-queue.h
index 5a7a543aae26..a97016f29b78 100644
--- a/sys/contrib/octeon-sdk/cvmx-cmd-queue.h
+++ b/sys/contrib/octeon-sdk/cvmx-cmd-queue.h
@@ -282,8 +282,8 @@ static inline void __cvmx_cmd_queue_lock(cvmx_cmd_queue_id_t queue_id, __cvmx_cm
".set pop\n"
: [ticket_ptr] "=m" (__cvmx_cmd_queue_state_ptr->ticket[__cvmx_cmd_queue_get_index(queue_id)]),
[now_serving] "=m" (qptr->now_serving),
- [ticket] "=r" (tmp),
- [my_ticket] "=r" (my_ticket)
+ [ticket] "=&r" (tmp),
+ [my_ticket] "=&r" (my_ticket)
);
}
More information about the dev-commits-src-all
mailing list