qcacmn: Properly declare nbuf smmu map unmap
With NBUF_MEMORY_DEBUG=n and IPA_OFFLOAD=y, below errors are seen. qdf/linux/src/qdf_nbuf.c:943:12: error: no previous prototype for function 'qdf_nbuf_smmu_map_debug' [-Werror,-Wmissing-prototypes] qdf/linux/src/qdf_nbuf.c:955:12: error: no previous prototype for function 'qdf_nbuf_smmu_unmap_debug' [-Werror,-Wmissing-prototypes] Currently above two APIs are only declared with NBUF_MEMORY_DEBUG=y. Checking their definitions, could see that they have two variants with NBUF_SMMU_MAP_UNMAP_DEBUG=y|n and they should only be valid with IPA_OFFLOAD=y since IPA API is referenced in them. Hence properly declare qdf_nbuf_smmu_map_debug() and qdf_nbuf_smmu_unmap_debug() so that they're only valid with IPA_OFFLOAD=y. With that, two variants are still kept. With NBUF_SMMU_MAP_UNMAP_DEBUG=y, smmu map and unmap operations are tracked. With NBUF_SMMU_MAP_UNMAP_DEBUG=n, no trackings are maintained. Change-Id: I83b08b1152d98b3efed3e52e564af0ebfbe5a7f7 CRs-Fixed: 3348594
This commit is contained in:
@@ -860,6 +860,7 @@ void qdf_nbuf_map_check_for_smmu_leaks(void)
|
||||
qdf_tracker_check_for_leaks(&qdf_nbuf_smmu_map_tracker);
|
||||
}
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
QDF_STATUS qdf_nbuf_smmu_map_debug(qdf_nbuf_t nbuf,
|
||||
uint8_t hdl,
|
||||
uint8_t num_buffers,
|
||||
@@ -906,6 +907,7 @@ QDF_STATUS qdf_nbuf_smmu_unmap_debug(qdf_nbuf_t nbuf,
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_nbuf_smmu_unmap_debug);
|
||||
#endif /* IPA_OFFLOAD */
|
||||
|
||||
static void qdf_nbuf_panic_on_free_if_smmu_mapped(qdf_nbuf_t nbuf,
|
||||
const char *func,
|
||||
@@ -934,7 +936,7 @@ static inline void qdf_net_buf_update_smmu_params(QDF_NBUF_TRACK *p_node)
|
||||
p_node->smmu_map_iova_addr = 0;
|
||||
p_node->smmu_map_pa_addr = 0;
|
||||
}
|
||||
#else
|
||||
#else /* !NBUF_SMMU_MAP_UNMAP_DEBUG */
|
||||
#ifdef NBUF_MEMORY_DEBUG
|
||||
static void qdf_nbuf_smmu_map_tracking_init(void)
|
||||
{
|
||||
@@ -953,7 +955,7 @@ static void qdf_nbuf_panic_on_free_if_smmu_mapped(qdf_nbuf_t nbuf,
|
||||
static inline void qdf_net_buf_update_smmu_params(QDF_NBUF_TRACK *p_node)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
#endif /* NBUF_MEMORY_DEBUG */
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
QDF_STATUS qdf_nbuf_smmu_map_debug(qdf_nbuf_t nbuf,
|
||||
@@ -979,8 +981,8 @@ QDF_STATUS qdf_nbuf_smmu_unmap_debug(qdf_nbuf_t nbuf,
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_nbuf_smmu_unmap_debug);
|
||||
#endif
|
||||
#endif
|
||||
#endif /* IPA_OFFLOAD */
|
||||
#endif /* NBUF_SMMU_MAP_UNMAP_DEBUG */
|
||||
|
||||
#ifdef NBUF_MAP_UNMAP_DEBUG
|
||||
#define qdf_nbuf_map_tracker_bits 11 /* 2048 buckets */
|
||||
|
Reference in New Issue
Block a user