Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Apr 2021 17:08:45 GMT
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 6525c2d4de8f - main - mips/octeon SDK: Fix __cvmx_cmd_queue_lock asm for clang 11
Message-ID:  <202104181708.13IH8juU008420@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhibbits:

URL: https://cgit.FreeBSD.org/src/commit/?id=6525c2d4de8f6ddc964f2f5ba9bd41d70bf98660

commit 6525c2d4de8f6ddc964f2f5ba9bd41d70bf98660
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2021-04-18 16:59:04 +0000
Commit:     Justin Hibbits <jhibbits@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)
     );
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104181708.13IH8juU008420>