qcacmn: add lockless SRNG access support for Rx Rings
Add lockless SRNG access support for Rx rings. Change-Id: Ia44f612cc5f6e50255aafaaf895044dea7a88aa7 CRs-Fixed: 2868991
This commit is contained in:

committed by
snandini

parent
595bc84a39
commit
07c4fc98d1
@@ -1846,6 +1846,33 @@ int dp_tx_delete_flow_pool(struct dp_soc *soc, struct dp_tx_desc_pool_s *pool,
|
|||||||
bool force);
|
bool force);
|
||||||
#endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
|
#endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
|
||||||
|
|
||||||
|
#ifdef QCA_OL_DP_SRNG_LOCK_LESS_ACCESS
|
||||||
|
static inline int
|
||||||
|
dp_hal_srng_access_start(hal_soc_handle_t soc, hal_ring_handle_t hal_ring_hdl)
|
||||||
|
{
|
||||||
|
return hal_srng_access_start_unlocked(soc, hal_ring_hdl);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
dp_hal_srng_access_end(hal_soc_handle_t soc, hal_ring_handle_t hal_ring_hdl)
|
||||||
|
{
|
||||||
|
hal_srng_access_end_unlocked(soc, hal_ring_hdl);
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
static inline int
|
||||||
|
dp_hal_srng_access_start(hal_soc_handle_t soc, hal_ring_handle_t hal_ring_hdl)
|
||||||
|
{
|
||||||
|
return hal_srng_access_start(soc, hal_ring_hdl);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
dp_hal_srng_access_end(hal_soc_handle_t soc, hal_ring_handle_t hal_ring_hdl)
|
||||||
|
{
|
||||||
|
hal_srng_access_end(soc, hal_ring_hdl);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_DP_EVENT_HISTORY
|
#ifdef WLAN_FEATURE_DP_EVENT_HISTORY
|
||||||
/**
|
/**
|
||||||
* dp_srng_access_start() - Wrapper function to log access start of a hal ring
|
* dp_srng_access_start() - Wrapper function to log access start of a hal ring
|
||||||
@@ -1870,14 +1897,13 @@ void dp_srng_access_end(struct dp_intr *int_ctx, struct dp_soc *dp_soc,
|
|||||||
hal_ring_handle_t hal_ring_hdl);
|
hal_ring_handle_t hal_ring_hdl);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static inline int dp_srng_access_start(struct dp_intr *int_ctx,
|
static inline int dp_srng_access_start(struct dp_intr *int_ctx,
|
||||||
struct dp_soc *dp_soc,
|
struct dp_soc *dp_soc,
|
||||||
hal_ring_handle_t hal_ring_hdl)
|
hal_ring_handle_t hal_ring_hdl)
|
||||||
{
|
{
|
||||||
hal_soc_handle_t hal_soc = dp_soc->hal_soc;
|
hal_soc_handle_t hal_soc = dp_soc->hal_soc;
|
||||||
|
|
||||||
return hal_srng_access_start(hal_soc, hal_ring_hdl);
|
return dp_hal_srng_access_start(hal_soc, hal_ring_hdl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void dp_srng_access_end(struct dp_intr *int_ctx,
|
static inline void dp_srng_access_end(struct dp_intr *int_ctx,
|
||||||
@@ -1886,7 +1912,7 @@ static inline void dp_srng_access_end(struct dp_intr *int_ctx,
|
|||||||
{
|
{
|
||||||
hal_soc_handle_t hal_soc = dp_soc->hal_soc;
|
hal_soc_handle_t hal_soc = dp_soc->hal_soc;
|
||||||
|
|
||||||
return hal_srng_access_end(hal_soc, hal_ring_hdl);
|
return dp_hal_srng_access_end(hal_soc, hal_ring_hdl);
|
||||||
}
|
}
|
||||||
#endif /* WLAN_FEATURE_DP_EVENT_HISTORY */
|
#endif /* WLAN_FEATURE_DP_EVENT_HISTORY */
|
||||||
|
|
||||||
|
@@ -1933,7 +1933,7 @@ int dp_srng_access_start(struct dp_intr *int_ctx, struct dp_soc *dp_soc,
|
|||||||
uint8_t ring_id;
|
uint8_t ring_id;
|
||||||
|
|
||||||
if (!int_ctx)
|
if (!int_ctx)
|
||||||
return hal_srng_access_start(hal_soc, hal_ring_hdl);
|
return dp_hal_srng_access_start(hal_soc, hal_ring_hdl);
|
||||||
|
|
||||||
hal_get_sw_hptp(hal_soc, hal_ring_hdl, &tp, &hp);
|
hal_get_sw_hptp(hal_soc, hal_ring_hdl, &tp, &hp);
|
||||||
ring_id = hal_srng_ring_id_get(hal_ring_hdl);
|
ring_id = hal_srng_ring_id_get(hal_ring_hdl);
|
||||||
@@ -1941,7 +1941,7 @@ int dp_srng_access_start(struct dp_intr *int_ctx, struct dp_soc *dp_soc,
|
|||||||
hif_record_event(dp_soc->hif_handle, int_ctx->dp_intr_id,
|
hif_record_event(dp_soc->hif_handle, int_ctx->dp_intr_id,
|
||||||
ring_id, hp, tp, HIF_EVENT_SRNG_ACCESS_START);
|
ring_id, hp, tp, HIF_EVENT_SRNG_ACCESS_START);
|
||||||
|
|
||||||
return hal_srng_access_start(hal_soc, hal_ring_hdl);
|
return dp_hal_srng_access_start(hal_soc, hal_ring_hdl);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dp_srng_access_end(struct dp_intr *int_ctx, struct dp_soc *dp_soc,
|
void dp_srng_access_end(struct dp_intr *int_ctx, struct dp_soc *dp_soc,
|
||||||
@@ -1952,7 +1952,7 @@ void dp_srng_access_end(struct dp_intr *int_ctx, struct dp_soc *dp_soc,
|
|||||||
uint8_t ring_id;
|
uint8_t ring_id;
|
||||||
|
|
||||||
if (!int_ctx)
|
if (!int_ctx)
|
||||||
return hal_srng_access_end(hal_soc, hal_ring_hdl);
|
return dp_hal_srng_access_end(hal_soc, hal_ring_hdl);
|
||||||
|
|
||||||
hal_get_sw_hptp(hal_soc, hal_ring_hdl, &tp, &hp);
|
hal_get_sw_hptp(hal_soc, hal_ring_hdl, &tp, &hp);
|
||||||
ring_id = hal_srng_ring_id_get(hal_ring_hdl);
|
ring_id = hal_srng_ring_id_get(hal_ring_hdl);
|
||||||
@@ -1960,7 +1960,7 @@ void dp_srng_access_end(struct dp_intr *int_ctx, struct dp_soc *dp_soc,
|
|||||||
hif_record_event(dp_soc->hif_handle, int_ctx->dp_intr_id,
|
hif_record_event(dp_soc->hif_handle, int_ctx->dp_intr_id,
|
||||||
ring_id, hp, tp, HIF_EVENT_SRNG_ACCESS_END);
|
ring_id, hp, tp, HIF_EVENT_SRNG_ACCESS_END);
|
||||||
|
|
||||||
return hal_srng_access_end(hal_soc, hal_ring_hdl);
|
return dp_hal_srng_access_end(hal_soc, hal_ring_hdl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void dp_srng_record_timer_entry(struct dp_soc *dp_soc,
|
static inline void dp_srng_record_timer_entry(struct dp_soc *dp_soc,
|
||||||
|
Reference in New Issue
Block a user