qcacmn: Add data structures for SWLM

Add the necessary data structures for the
software latency manager.

Change-Id: Ibf55f0eef7ee6602b007de39a28f09c4622bd356
CRs-Fixed: 2769004
This commit is contained in:
Rakesh Pillai
2020-08-24 04:55:01 -07:00
committed by snandini
부모 4b6f9e082b
커밋 21af5ba8cf
8개의 변경된 파일213개의 추가작업 그리고 5개의 파일을 삭제

파일 보기

@@ -984,6 +984,30 @@ hal_srng_access_start_unlocked(hal_soc_handle_t hal_soc_hdl,
return 0;
}
/**
* hal_srng_try_access_start - Try to start (locked) ring access
*
* @hal_soc: Opaque HAL SOC handle
* @hal_ring_hdl: Ring pointer (Source or Destination ring)
*
* Return: 0 on success; error on failure
*/
static inline int hal_srng_try_access_start(hal_soc_handle_t hal_soc_hdl,
hal_ring_handle_t hal_ring_hdl)
{
struct hal_srng *srng = (struct hal_srng *)hal_ring_hdl;
if (qdf_unlikely(!hal_ring_hdl)) {
qdf_print("Error: Invalid hal_ring\n");
return -EINVAL;
}
if (!SRNG_TRY_LOCK(&(srng->lock)))
return -EINVAL;
return hal_srng_access_start_unlocked(hal_soc_hdl, hal_ring_hdl);
}
/**
* hal_srng_access_start - Start (locked) ring access
*

파일 보기

@@ -209,6 +209,7 @@ enum hal_srng_dir {
#define hal_srng_lock_t qdf_spinlock_t
#define SRNG_LOCK_INIT(_lock) qdf_spinlock_create(_lock)
#define SRNG_LOCK(_lock) qdf_spin_lock_bh(_lock)
#define SRNG_TRY_LOCK(_lock) qdf_spin_trylock_bh(_lock)
#define SRNG_UNLOCK(_lock) qdf_spin_unlock_bh(_lock)
#define SRNG_LOCK_DESTROY(_lock) qdf_spinlock_destroy(_lock)