aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2021-04-18 16:59:04 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2021-04-18 17:05:55 +0000
commit6525c2d4de8f6ddc964f2f5ba9bd41d70bf98660 (patch)
tree6e05218dfb38207631b5e6235e23565270bd33dc /sys
parent8b1a5062e05431b1a122753f0a2fac310dad70b9 (diff)
downloadsrc-6525c2d4de8f6ddc964f2f5ba9bd41d70bf98660.tar.gz
src-6525c2d4de8f6ddc964f2f5ba9bd41d70bf98660.zip
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/contrib/octeon-sdk/cvmx-cmd-queue.h4
1 files 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)
);
}