LCOV - code coverage report
Current view: top level - drivers/common/cnxk - roc_sso_dp.h (source / functions) Hit Total Coverage
Test: Code coverage Lines: 0 5 0.0 %
Date: 2025-01-02 22:41:34 Functions: 0 0 -
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 14 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: BSD-3-Clause
       2                 :            :  * Copyright(C) 2022 Marvell.
       3                 :            :  */
       4                 :            : 
       5                 :            : #ifndef _ROC_SSO_DP_H_
       6                 :            : #define _ROC_SSO_DP_H_
       7                 :            : 
       8                 :            : static __plt_always_inline uint64_t
       9                 :            : roc_sso_hws_head_wait(uintptr_t base)
      10                 :            : {
      11                 :          0 :         uintptr_t tag_op = base + SSOW_LF_GWS_TAG;
      12                 :            :         uint64_t tag;
      13                 :            : 
      14                 :            : #if defined(__aarch64__)
      15                 :            :         asm volatile(PLT_CPU_FEATURE_PREAMBLE
      16                 :            :                      "             ldr %[tag], [%[tag_op]]         \n"
      17                 :            :                      "             tbnz %[tag], 35, .Ldone%=       \n"
      18                 :            :                      "             sevl                            \n"
      19                 :            :                      ".Lrty%=:     wfe                             \n"
      20                 :            :                      "             ldr %[tag], [%[tag_op]]         \n"
      21                 :            :                      "             tbz %[tag], 35, .Lrty%=         \n"
      22                 :            :                      ".Ldone%=:                                    \n"
      23                 :            :                      : [tag] "=&r"(tag)
      24                 :            :                      : [tag_op] "r"(tag_op));
      25                 :            : #else
      26                 :            :         do {
      27   [ #  #  #  #  :          0 :                 tag = plt_read64(tag_op);
                   #  # ]
      28   [ #  #  #  #  :          0 :         } while (!(tag & BIT_ULL(35)));
             #  #  #  # ]
      29                 :            : #endif
      30                 :            :         return tag;
      31                 :            : }
      32                 :            : 
      33                 :            : static __plt_always_inline uint8_t
      34                 :            : roc_sso_hws_is_head(uintptr_t base)
      35                 :            : {
      36                 :          0 :         uintptr_t tag_op = base + SSOW_LF_GWS_TAG;
      37                 :            : 
      38                 :          0 :         return !!(plt_read64(tag_op) & BIT_ULL(35));
      39                 :            : }
      40                 :            : 
      41                 :            : #endif /* _ROC_SSO_DP_H_ */

Generated by: LCOV version 1.14