qcacmn: Implement a light weight get_timestamp routine
For some 3rd party platforms, get_timestamp through legacy kernel API is time costing. For spin_lock/unlock statistics info, the resolution in ms level is enough. So use another light weight API to save CPU resource for 3rd party platforms only. Change-Id: I9182f00adda0d3081a2c40b222ab37bb1ca9d6a1 CRs-Fixed: 2796263
このコミットが含まれているのは:
@@ -281,6 +281,21 @@ static inline uint64_t qdf_log_timestamp_to_usecs(uint64_t time)
|
||||
|
||||
return time;
|
||||
}
|
||||
|
||||
/**
|
||||
* qdf_get_log_timestamp_lightweight - get time stamp for logging
|
||||
* For adrastea this API returns QTIMER tick which is needed to synchronize
|
||||
* host and fw log timestamps
|
||||
* For ROME and other discrete solution this API returns system boot time stamp
|
||||
*
|
||||
* Return:
|
||||
* QTIMER ticks(19.2MHz) for adrastea
|
||||
* System tick for rome and other 3rd party platform solutions
|
||||
*/
|
||||
static inline uint64_t qdf_get_log_timestamp_lightweight(void)
|
||||
{
|
||||
return __qdf_get_log_timestamp();
|
||||
}
|
||||
#else
|
||||
#define QDF_LOG_TIMESTAMP_UNIT KERNEL_LOG
|
||||
#define QDF_LOG_TIMESTAMP_CYCLES_PER_10_US 10
|
||||
@@ -290,6 +305,14 @@ static inline uint64_t qdf_log_timestamp_to_usecs(uint64_t time)
|
||||
/* timestamps are already in micro seconds */
|
||||
return time;
|
||||
}
|
||||
|
||||
static inline uint64_t qdf_get_log_timestamp_lightweight(void)
|
||||
{
|
||||
uint64_t timestamp_us;
|
||||
|
||||
timestamp_us = __qdf_system_ticks_to_msecs(qdf_system_ticks()) * 1000;
|
||||
return timestamp_us;
|
||||
}
|
||||
#endif /* end of MSM_PLATFORM */
|
||||
|
||||
static inline void qdf_log_timestamp_to_secs(uint64_t time, uint64_t *secs,
|
||||
|
新しいイシューから参照
ユーザーをブロックする