msm: ipa3: add new mutex lock to update is_modem_up flag
Adding new mutex lock to update is_modem_up flag because in Modem SSR scenarios if we use mutex variable "lock" it is waiting for it to be released by other thread & partially leading to SSR timeout. As we don't need to have a common mutex variable "lock" for this, a new mutex can help in moving further in clean up the pipes. Change-Id: I8e6e4c0181f7765b334aefefd9616329503fdc2c Signed-off-by: Pavan Kumar M <quic_rpavan@quicinc.com> Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
This commit is contained in:

committed by
Pavan Kumar M

parent
6bbe15d334
commit
2536b39004
@@ -9874,6 +9874,7 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
|
|||||||
ipa3_ctx->free_page_task_scheduled = false;
|
ipa3_ctx->free_page_task_scheduled = false;
|
||||||
|
|
||||||
mutex_init(&ipa3_ctx->app_clock_vote.mutex);
|
mutex_init(&ipa3_ctx->app_clock_vote.mutex);
|
||||||
|
mutex_init(&ipa3_ctx->ssr_lock);
|
||||||
ipa3_ctx->is_modem_up = false;
|
ipa3_ctx->is_modem_up = false;
|
||||||
ipa3_ctx->mhi_ctrl_state = IPA_MHI_CTRL_NOT_SETUP;
|
ipa3_ctx->mhi_ctrl_state = IPA_MHI_CTRL_NOT_SETUP;
|
||||||
|
|
||||||
|
@@ -2635,6 +2635,7 @@ struct ipa3_context {
|
|||||||
struct ipa3_page_recycle_stats prev_default_recycle_stats;
|
struct ipa3_page_recycle_stats prev_default_recycle_stats;
|
||||||
struct ipa3_page_recycle_stats prev_low_lat_data_recycle_stats;
|
struct ipa3_page_recycle_stats prev_low_lat_data_recycle_stats;
|
||||||
struct mutex recycle_stats_collection_lock;
|
struct mutex recycle_stats_collection_lock;
|
||||||
|
struct mutex ssr_lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ipa3_plat_drv_res {
|
struct ipa3_plat_drv_res {
|
||||||
|
@@ -13932,17 +13932,17 @@ bool ipa3_is_modem_up(void)
|
|||||||
{
|
{
|
||||||
bool is_up;
|
bool is_up;
|
||||||
|
|
||||||
mutex_lock(&ipa3_ctx->lock);
|
mutex_lock(&ipa3_ctx->ssr_lock);
|
||||||
is_up = ipa3_ctx->is_modem_up;
|
is_up = ipa3_ctx->is_modem_up;
|
||||||
mutex_unlock(&ipa3_ctx->lock);
|
mutex_unlock(&ipa3_ctx->ssr_lock);
|
||||||
return is_up;
|
return is_up;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ipa3_set_modem_up(bool is_up)
|
void ipa3_set_modem_up(bool is_up)
|
||||||
{
|
{
|
||||||
mutex_lock(&ipa3_ctx->lock);
|
mutex_lock(&ipa3_ctx->ssr_lock);
|
||||||
ipa3_ctx->is_modem_up = is_up;
|
ipa3_ctx->is_modem_up = is_up;
|
||||||
mutex_unlock(&ipa3_ctx->lock);
|
mutex_unlock(&ipa3_ctx->ssr_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user