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.
This commit is contained in:
Justin Hibbits 2021-04-18 11:59:04 -05:00
parent 8b1a5062e0
commit 6525c2d4de

View File

@ -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)
);
}