mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
msm: ipa3: Add proper checks for low lat pipe and 32-bit specific
For some targets lowlat support is not present. Add changes to check if low lat support is present or not. Also for 32-bit targets observed count shift error. Added proper checks to overcome the issue. Change-Id: Iab3b7d460b48ce8ff4e98da297eb2e7b69e3db13 Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
This commit is contained in:
parent
68c091ef5e
commit
94386db8e6
4 changed files with 17 additions and 11 deletions
|
|
@ -681,8 +681,9 @@ static ssize_t gsi_read_gsi_hw_profiling_stats(struct file *file,
|
|||
totalCycles = stats.mcs_busy_cnt + stats.mcs_idle_cnt +
|
||||
stats.bp_and_pending_cnt;
|
||||
if (totalCycles != 0)
|
||||
util = (100 * (stats.mcs_busy_cnt + stats.bp_and_pending_cnt)) /
|
||||
totalCycles;
|
||||
util = div_u64(
|
||||
100 * (stats.mcs_busy_cnt + stats.bp_and_pending_cnt),
|
||||
totalCycles);
|
||||
else
|
||||
util = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -7629,11 +7629,14 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
|
|||
goto fail_wwan_init;
|
||||
}
|
||||
|
||||
result = ipa3_rmnet_ctl_init();
|
||||
if (result) {
|
||||
IPAERR(":ipa3_rmnet_ctl_init err=%d\n", -result);
|
||||
result = -ENODEV;
|
||||
goto fail_rmnet_ctl_init;
|
||||
if (ipa3_ctx->rmnet_ctl_enable) {
|
||||
result = ipa3_rmnet_ctl_init();
|
||||
if (result) {
|
||||
IPAERR(":ipa3_rmnet_ctl_init err=%d\n",
|
||||
-result);
|
||||
result = -ENODEV;
|
||||
goto fail_rmnet_ctl_init;
|
||||
}
|
||||
}
|
||||
}
|
||||
mutex_init(&ipa3_ctx->app_clock_vote.mutex);
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ static int ipa3_wdi_gsi_db(phys_addr_t* db_addr, struct ipa3_ep_context *ep_ctx)
|
|||
/* write channel scratch */
|
||||
memset(&gsi_ch_scratch, 0, sizeof(gsi_ch_scratch));
|
||||
gsi_ch_scratch.wdi3.db_addr_wp_lsb = (u32)mem.phys_base;
|
||||
gsi_ch_scratch.wdi3.db_addr_wp_msb = (u32)(mem.phys_base >> 32);
|
||||
gsi_ch_scratch.wdi3.db_addr_wp_msb = (u32)((mem.phys_base & 0xFFFFFFFF00000000) >> 32);
|
||||
IPADBG("gsi written lsb value 0x%x\n", gsi_ch_scratch.wdi3.db_addr_wp_lsb);
|
||||
IPADBG("gsi written msb value 0x%x\n", gsi_ch_scratch.wdi3.db_addr_wp_msb);
|
||||
|
||||
|
|
|
|||
|
|
@ -2755,9 +2755,11 @@ static int ipa3_wwan_remove(struct platform_device *pdev)
|
|||
|
||||
IPAWANINFO("rmnet_ipa started deinitialization\n");
|
||||
mutex_lock(&rmnet_ipa3_ctx->pipe_handle_guard);
|
||||
ret = ipa3_teardown_apps_low_lat_pipes();
|
||||
if (ret < 0)
|
||||
IPAWANERR("Failed to teardown IPA->APPS qmap pipe\n");
|
||||
if (ipa3_ctx->rmnet_ctl_enable) {
|
||||
ret = ipa3_teardown_apps_low_lat_pipes();
|
||||
if (ret < 0)
|
||||
IPAWANERR("Failed to teardown IPA->APPS qmap pipe\n");
|
||||
}
|
||||
ret = ipa3_teardown_sys_pipe(rmnet_ipa3_ctx->ipa3_to_apps_hdl);
|
||||
if (ret < 0)
|
||||
IPAWANERR("Failed to teardown IPA->APPS pipe\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue