New upstream version 17.08
[deb_dpdk.git] / drivers / event / octeontx / ssovf_worker.h
index 300dfae..55f7255 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *   BSD LICENSE
  *
- *   Copyright (C) Cavium networks Ltd. 2017.
+ *   Copyright (C) Cavium, Inc. 2017.
  *
  *   Redistribution and use in source and binary forms, with or without
  *   modification, are permitted provided that the following conditions
@@ -13,7 +13,7 @@
  *       notice, this list of conditions and the following disclaimer in
  *       the documentation and/or other materials provided with the
  *       distribution.
- *     * Neither the name of Cavium networks nor the names of its
+ *     * Neither the name of Cavium, Inc nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
@@ -32,6 +32,7 @@
 
 
 #include <rte_common.h>
+#include <rte_branch_prediction.h>
 
 #include "ssovf_evdev.h"
 
@@ -42,17 +43,13 @@ enum {
        SSO_SYNC_EMPTY
 };
 
-#ifndef force_inline
-#define force_inline inline __attribute__((always_inline))
-#endif
-
 #ifndef __hot
 #define __hot  __attribute__((hot))
 #endif
 
 /* SSO Operations */
 
-static force_inline uint16_t
+static __rte_always_inline uint16_t
 ssows_get_work(struct ssows *ws, struct rte_event *ev)
 {
        uint64_t get_work0, get_work1;
@@ -70,7 +67,7 @@ ssows_get_work(struct ssows *ws, struct rte_event *ev)
        return !!get_work1;
 }
 
-static force_inline void
+static __rte_always_inline void
 ssows_add_work(struct ssows *ws, const uint64_t event_ptr, const uint32_t tag,
                        const uint8_t new_tt, const uint8_t grp)
 {
@@ -80,7 +77,7 @@ ssows_add_work(struct ssows *ws, const uint64_t event_ptr, const uint32_t tag,
        ssovf_store_pair(add_work0, event_ptr, ws->grps[grp]);
 }
 
-static force_inline void
+static __rte_always_inline void
 ssows_swtag_full(struct ssows *ws, const uint64_t event_ptr, const uint32_t tag,
                        const uint8_t new_tt, const uint8_t grp)
 {
@@ -92,7 +89,7 @@ ssows_swtag_full(struct ssows *ws, const uint64_t event_ptr, const uint32_t tag,
                                SSOW_VHWS_OP_SWTAG_FULL0));
 }
 
-static force_inline void
+static __rte_always_inline void
 ssows_swtag_desched(struct ssows *ws, uint32_t tag, uint8_t new_tt, uint8_t grp)
 {
        uint64_t val;
@@ -101,7 +98,7 @@ ssows_swtag_desched(struct ssows *ws, uint32_t tag, uint8_t new_tt, uint8_t grp)
        ssovf_write64(val, ws->base + SSOW_VHWS_OP_SWTAG_DESCHED);
 }
 
-static force_inline void
+static __rte_always_inline void
 ssows_swtag_norm(struct ssows *ws, uint32_t tag, uint8_t new_tt)
 {
        uint64_t val;
@@ -110,27 +107,27 @@ ssows_swtag_norm(struct ssows *ws, uint32_t tag, uint8_t new_tt)
        ssovf_write64(val, ws->base + SSOW_VHWS_OP_SWTAG_NORM);
 }
 
-static force_inline void
+static __rte_always_inline void
 ssows_swtag_untag(struct ssows *ws)
 {
        ssovf_write64(0, ws->base + SSOW_VHWS_OP_SWTAG_UNTAG);
        ws->cur_tt = SSO_SYNC_UNTAGGED;
 }
 
-static force_inline void
+static __rte_always_inline void
 ssows_upd_wqp(struct ssows *ws, uint8_t grp, uint64_t event_ptr)
 {
        ssovf_store_pair((uint64_t)grp << 34, event_ptr, (ws->base +
                                SSOW_VHWS_OP_UPD_WQP_GRP0));
 }
 
-static force_inline void
+static __rte_always_inline void
 ssows_desched(struct ssows *ws)
 {
        ssovf_write64(0, ws->base + SSOW_VHWS_OP_DESCHED);
 }
 
-static force_inline void
+static __rte_always_inline void
 ssows_swtag_wait(struct ssows *ws)
 {
        /* Wait for the SWTAG/SWTAG_FULL operation */