qcacmn: Add hif and CE rings to SSR dump
Add hif and CE rings to SSR dump Change-Id: I6a859f46c9a8cf5813ce26a163b30286969edf4a CRs-Fixed: 3604906
This commit is contained in:

committed by
Rahul Choudhary

parent
34d88f5bfc
commit
cf269aa28d
@@ -66,6 +66,7 @@
|
|||||||
#ifdef QCA_WIFI_SUPPORT_SRNG
|
#ifdef QCA_WIFI_SUPPORT_SRNG
|
||||||
#include <hal_api.h>
|
#include <hal_api.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include "qdf_ssr_driver_dump.h"
|
||||||
|
|
||||||
/* Forward references */
|
/* Forward references */
|
||||||
QDF_STATUS hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info);
|
QDF_STATUS hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info);
|
||||||
@@ -2507,6 +2508,116 @@ void ce_disable_polling(void *cestate)
|
|||||||
CE_state->timer_inited = false;
|
CE_state->timer_inited = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_SSR_DRIVER_DUMP
|
||||||
|
#define MAX_CE_STR_LEN 50
|
||||||
|
/**
|
||||||
|
* ce_ring_dump_register_region() - Register CE ring with SSR dump
|
||||||
|
* @CE_state: CE_state pointer
|
||||||
|
* @CE_id: CE id
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
static inline
|
||||||
|
void ce_ring_dump_register_region(struct CE_state *CE_state, unsigned int CE_id)
|
||||||
|
{
|
||||||
|
struct CE_ring_state *ce_ring;
|
||||||
|
char ce[MAX_CE_STR_LEN];
|
||||||
|
char CE_ring_state[MAX_CE_STR_LEN];
|
||||||
|
char srng[MAX_CE_STR_LEN];
|
||||||
|
|
||||||
|
qdf_snprint(ce, MAX_CE_STR_LEN, "%s%d", "ce_", CE_id);
|
||||||
|
qdf_ssr_driver_dump_register_region(ce, CE_state, sizeof(*CE_state));
|
||||||
|
|
||||||
|
if (CE_state->status_ring) {
|
||||||
|
ce_ring = CE_state->status_ring;
|
||||||
|
qdf_snprint(CE_ring_state, MAX_CE_STR_LEN,
|
||||||
|
"%s%s", ce, "_status_ring");
|
||||||
|
qdf_ssr_driver_dump_register_region(CE_ring_state, ce_ring,
|
||||||
|
sizeof(struct CE_ring_state)
|
||||||
|
);
|
||||||
|
qdf_snprint(srng, MAX_CE_STR_LEN,
|
||||||
|
"%s%s", CE_ring_state, "_ctx");
|
||||||
|
qdf_ssr_driver_dump_register_region(srng, ce_ring->srng_ctx,
|
||||||
|
sizeof(struct hal_srng));
|
||||||
|
}
|
||||||
|
if (CE_state->dest_ring) {
|
||||||
|
ce_ring = CE_state->dest_ring;
|
||||||
|
qdf_snprint(CE_ring_state, MAX_CE_STR_LEN,
|
||||||
|
"%s%s", ce, "_dest_ring");
|
||||||
|
qdf_ssr_driver_dump_register_region(CE_ring_state, ce_ring,
|
||||||
|
sizeof(struct CE_ring_state)
|
||||||
|
);
|
||||||
|
qdf_snprint(srng, MAX_CE_STR_LEN,
|
||||||
|
"%s%s", CE_ring_state, "_ctx");
|
||||||
|
qdf_ssr_driver_dump_register_region(srng, ce_ring->srng_ctx,
|
||||||
|
sizeof(struct hal_srng));
|
||||||
|
}
|
||||||
|
if (CE_state->src_ring) {
|
||||||
|
ce_ring = CE_state->src_ring;
|
||||||
|
qdf_snprint(CE_ring_state, MAX_CE_STR_LEN,
|
||||||
|
"%s%s", ce, "_src_ring");
|
||||||
|
qdf_ssr_driver_dump_register_region(CE_ring_state, ce_ring,
|
||||||
|
sizeof(struct CE_ring_state)
|
||||||
|
);
|
||||||
|
qdf_snprint(srng, MAX_CE_STR_LEN,
|
||||||
|
"%s%s", CE_ring_state, "_ctx");
|
||||||
|
qdf_ssr_driver_dump_register_region(srng, ce_ring->srng_ctx,
|
||||||
|
sizeof(struct hal_srng));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ce_ring_dump_unregister_region() - Unregister CE ring with SSR dump
|
||||||
|
* @CE_state: CE_state pointer
|
||||||
|
* @CE_id: CE id
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
ce_ring_dump_unregister_region(struct CE_state *CE_state, unsigned int CE_id)
|
||||||
|
{
|
||||||
|
char ce[MAX_CE_STR_LEN];
|
||||||
|
char CE_ring_state[MAX_CE_STR_LEN];
|
||||||
|
char srng[MAX_CE_STR_LEN];
|
||||||
|
|
||||||
|
qdf_snprint(ce, MAX_CE_STR_LEN, "%s%d", "ce_", CE_id);
|
||||||
|
qdf_ssr_driver_dump_unregister_region(ce);
|
||||||
|
if (CE_state->status_ring) {
|
||||||
|
qdf_snprint(CE_ring_state, MAX_CE_STR_LEN,
|
||||||
|
"%s%s", ce, "_status_ring");
|
||||||
|
qdf_snprint(srng, MAX_CE_STR_LEN,
|
||||||
|
"%s%s", CE_ring_state, "_ctx");
|
||||||
|
qdf_ssr_driver_dump_unregister_region(CE_ring_state);
|
||||||
|
qdf_ssr_driver_dump_unregister_region(srng);
|
||||||
|
}
|
||||||
|
if (CE_state->dest_ring) {
|
||||||
|
qdf_snprint(CE_ring_state, MAX_CE_STR_LEN,
|
||||||
|
"%s%s", ce, "_dest_ring");
|
||||||
|
qdf_snprint(srng, MAX_CE_STR_LEN,
|
||||||
|
"%s%s", CE_ring_state, "_ctx");
|
||||||
|
qdf_ssr_driver_dump_unregister_region(CE_ring_state);
|
||||||
|
qdf_ssr_driver_dump_unregister_region(srng);
|
||||||
|
}
|
||||||
|
if (CE_state->src_ring) {
|
||||||
|
qdf_snprint(CE_ring_state, MAX_CE_STR_LEN,
|
||||||
|
"%s%s", ce, "_src_ring");
|
||||||
|
qdf_snprint(srng, MAX_CE_STR_LEN,
|
||||||
|
"%s%s", CE_ring_state, "_ctx");
|
||||||
|
qdf_ssr_driver_dump_unregister_region(CE_ring_state);
|
||||||
|
qdf_ssr_driver_dump_unregister_region(srng);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline
|
||||||
|
void ce_ring_dump_register_region(struct CE_state *CE_state, unsigned int CE_id)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
ce_ring_dump_unregister_region(struct CE_state *CE_state, unsigned int CE_id)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* Initialize a Copy Engine based on caller-supplied attributes.
|
* Initialize a Copy Engine based on caller-supplied attributes.
|
||||||
* This may be called once to initialize both source and destination
|
* This may be called once to initialize both source and destination
|
||||||
@@ -2727,6 +2838,8 @@ struct CE_handle *ce_init(struct hif_softc *scn,
|
|||||||
ce_mark_datapath(CE_state);
|
ce_mark_datapath(CE_state);
|
||||||
scn->ce_id_to_state[CE_id] = CE_state;
|
scn->ce_id_to_state[CE_id] = CE_state;
|
||||||
|
|
||||||
|
ce_ring_dump_register_region(CE_state, CE_id);
|
||||||
|
|
||||||
mem_status = alloc_mem_ce_debug_history(scn, CE_id, attr->src_nentries);
|
mem_status = alloc_mem_ce_debug_history(scn, CE_id, attr->src_nentries);
|
||||||
if (mem_status != QDF_STATUS_SUCCESS)
|
if (mem_status != QDF_STATUS_SUCCESS)
|
||||||
goto error_target_access;
|
goto error_target_access;
|
||||||
@@ -2982,6 +3095,8 @@ void ce_fini(struct CE_handle *copyeng)
|
|||||||
|
|
||||||
qdf_lro_deinit(CE_state->lro_data);
|
qdf_lro_deinit(CE_state->lro_data);
|
||||||
|
|
||||||
|
ce_ring_dump_unregister_region(CE_state, CE_id);
|
||||||
|
|
||||||
if (CE_state->src_ring) {
|
if (CE_state->src_ring) {
|
||||||
/* Cleanup the datapath Tx ring */
|
/* Cleanup the datapath Tx ring */
|
||||||
ce_h2t_tx_ce_cleanup(copyeng);
|
ce_h2t_tx_ce_cleanup(copyeng);
|
||||||
|
@@ -57,6 +57,7 @@
|
|||||||
#include <pld_common.h>
|
#include <pld_common.h>
|
||||||
#include "ce_internal.h"
|
#include "ce_internal.h"
|
||||||
#include <qdf_tracepoint.h>
|
#include <qdf_tracepoint.h>
|
||||||
|
#include "qdf_ssr_driver_dump.h"
|
||||||
|
|
||||||
void hif_dump(struct hif_opaque_softc *hif_ctx, uint8_t cmd_id, bool start)
|
void hif_dump(struct hif_opaque_softc *hif_ctx, uint8_t cmd_id, bool start)
|
||||||
{
|
{
|
||||||
@@ -1310,6 +1311,7 @@ struct hif_opaque_softc *hif_open(qdf_device_t qdf_ctx,
|
|||||||
hif_init_direct_link_rcv_pipe_num(scn);
|
hif_init_direct_link_rcv_pipe_num(scn);
|
||||||
hif_ce_desc_history_log_register(scn);
|
hif_ce_desc_history_log_register(scn);
|
||||||
hif_desc_history_log_register();
|
hif_desc_history_log_register();
|
||||||
|
qdf_ssr_driver_dump_register_region("hif", scn, sizeof(*scn));
|
||||||
|
|
||||||
out:
|
out:
|
||||||
return GET_HIF_OPAQUE_HDL(scn);
|
return GET_HIF_OPAQUE_HDL(scn);
|
||||||
@@ -1348,6 +1350,7 @@ void hif_close(struct hif_opaque_softc *hif_ctx)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qdf_ssr_driver_dump_unregister_region("hif");
|
||||||
hif_desc_history_log_unregister();
|
hif_desc_history_log_unregister();
|
||||||
hif_ce_desc_history_log_unregister();
|
hif_ce_desc_history_log_unregister();
|
||||||
hif_latency_detect_deinit(scn);
|
hif_latency_detect_deinit(scn);
|
||||||
|
Reference in New Issue
Block a user