mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
soc: qcom: rpmh_master_stat: skip apss stats if rpmh_unit_base available
APSS master stats can be read in two ways with APSS SMEM ID and rpmh unit_base. This change adds support to skip reading apss master stats from SMEM when rpmh_unit_base present. Change-Id: I13ba0474dac8c8d0f506ffab1008e696b583fc20 Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
This commit is contained in:
parent
2b4df556b2
commit
9e3208b935
1 changed files with 7 additions and 2 deletions
|
|
@ -131,19 +131,24 @@ static ssize_t msm_rpmh_master_stats_show(struct kobject *kobj,
|
|||
ssize_t length = 0;
|
||||
int i = 0;
|
||||
struct msm_rpmh_master_stats *record = NULL;
|
||||
bool skip_apss = false;
|
||||
|
||||
mutex_lock(&rpmh_stats_mutex);
|
||||
|
||||
/* First Read APSS master stats */
|
||||
|
||||
if (rpmh_unit_base)
|
||||
if (rpmh_unit_base) {
|
||||
length = msm_rpmh_master_stats_print_data(buf, PAGE_SIZE,
|
||||
&apss_master_stats,
|
||||
"APSS");
|
||||
|
||||
skip_apss = true;
|
||||
}
|
||||
/* Read SMEM data written by other masters */
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(rpmh_masters); i++) {
|
||||
if (skip_apss && i == 0)
|
||||
continue;
|
||||
|
||||
record = (struct msm_rpmh_master_stats *) qcom_smem_get(
|
||||
rpmh_masters[i].pid,
|
||||
rpmh_masters[i].smem_id, NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue