qcacmn: Add support for fragmented history recording

Currently the history recording for any debug purpose
is done using a contiguous memory chunk. For certain
history like tx_hw_ring, tx desc or tx completion desc
history, the amount of contiguous memory required is
very huge (order 7 or 8 allocation), which have a
higher probability of failing.

In order to mitigate the above scenario, introduce the
support for recording debug history into fragmented
chunks of memory, thereby reducing the requirement of
contiguous memory.

Change-Id: Iac4fb38b6d4b095766520899853e68b4c2b83afc
CRs-Fixed: 3282269
This commit is contained in:
Rakesh Pillai
2022-09-01 10:44:05 -07:00
committed by Madan Koyyalamudi
부모 04dd6c626a
커밋 d706698dd1
5개의 변경된 파일183개의 추가작업 그리고 46개의 파일을 삭제

파일 보기

@@ -904,18 +904,22 @@ dp_tx_hw_desc_update_evt(uint8_t *hal_tx_desc_cached,
hal_ring_handle_t hal_ring_hdl,
struct dp_soc *soc)
{
struct dp_tx_hw_desc_history *tx_hw_desc_history =
&soc->tx_hw_desc_history;
struct dp_tx_hw_desc_evt *evt;
uint64_t idx = 0;
uint32_t idx = 0;
uint16_t slot = 0;
if (!soc->tx_hw_desc_history)
if (!tx_hw_desc_history->allocated)
return;
idx = ++soc->tx_hw_desc_history->index;
if (idx == DP_TX_HW_DESC_HIST_MAX)
soc->tx_hw_desc_history->index = 0;
idx = qdf_do_div_rem(idx, DP_TX_HW_DESC_HIST_MAX);
dp_get_frag_hist_next_atomic_idx(&tx_hw_desc_history->index, &idx,
&slot,
DP_TX_HW_DESC_HIST_SLOT_SHIFT,
DP_TX_HW_DESC_HIST_PER_SLOT_MAX,
DP_TX_HW_DESC_HIST_MAX);
evt = &soc->tx_hw_desc_history->entry[idx];
evt = &tx_hw_desc_history->entry[slot][idx];
qdf_mem_copy(evt->tcl_desc, hal_tx_desc_cached, HAL_TX_DESC_LEN_BYTES);
evt->posted = qdf_get_log_timestamp();
hal_get_sw_hptp(soc->hal_soc, hal_ring_hdl, &evt->tp, &evt->hp);