Loading arch/arm/mach-msm/rpm_stats.c +11 −5 Original line number Original line Diff line number Diff line Loading @@ -54,7 +54,7 @@ struct msm_rpmstats_private_data{ u32 num_records; u32 num_records; u32 read_idx; u32 read_idx; u32 len; u32 len; char buf[256]; char buf[320]; struct msm_rpmstats_platform_data *platform_data; struct msm_rpmstats_platform_data *platform_data; }; }; Loading @@ -64,7 +64,8 @@ struct msm_rpm_stats_data_v2 { u64 last_entered_at; u64 last_entered_at; u64 last_exited_at; u64 last_exited_at; u64 accumulated; u64 accumulated; u32 reserved[4]; u32 client_votes; u32 reserved[3]; }; }; static inline u64 get_time_in_sec(u64 counter) static inline u64 get_time_in_sec(u64 counter) Loading Loading @@ -99,9 +100,11 @@ static inline int msm_rpmstats_append_data_to_buf(char *buf, return snprintf(buf , buflength, return snprintf(buf , buflength, "RPM Mode:%s\n\t count:%d\ntime in last mode(msec):%llu\n" "RPM Mode:%s\n\t count:%d\ntime in last mode(msec):%llu\n" "time since last mode(sec):%llu\n actual last sleep(msec):%llu\n", "time since last mode(sec):%llu\nactual last sleep(msec):%llu\n" "client votes: %#010x\n\n", stat_type, data->count, time_in_last_mode, stat_type, data->count, time_in_last_mode, time_since_last_mode, actual_last_sleep); time_since_last_mode, actual_last_sleep, data->client_votes); } } static inline u32 msm_rpmstats_read_long_register_v2(void __iomem *regbase, static inline u32 msm_rpmstats_read_long_register_v2(void __iomem *regbase, Loading Loading @@ -147,6 +150,9 @@ static inline int msm_rpmstats_copy_stats_v2( data.accumulated = msm_rpmstats_read_quad_register_v2(reg, data.accumulated = msm_rpmstats_read_quad_register_v2(reg, i, offsetof(struct msm_rpm_stats_data_v2, i, offsetof(struct msm_rpm_stats_data_v2, accumulated)); accumulated)); data.client_votes = msm_rpmstats_read_long_register_v2(reg, i, offsetof(struct msm_rpm_stats_data_v2, client_votes)); length += msm_rpmstats_append_data_to_buf(prvdata->buf + length, length += msm_rpmstats_append_data_to_buf(prvdata->buf + length, &data, sizeof(prvdata->buf) - length); &data, sizeof(prvdata->buf) - length); prvdata->read_idx++; prvdata->read_idx++; Loading Loading
arch/arm/mach-msm/rpm_stats.c +11 −5 Original line number Original line Diff line number Diff line Loading @@ -54,7 +54,7 @@ struct msm_rpmstats_private_data{ u32 num_records; u32 num_records; u32 read_idx; u32 read_idx; u32 len; u32 len; char buf[256]; char buf[320]; struct msm_rpmstats_platform_data *platform_data; struct msm_rpmstats_platform_data *platform_data; }; }; Loading @@ -64,7 +64,8 @@ struct msm_rpm_stats_data_v2 { u64 last_entered_at; u64 last_entered_at; u64 last_exited_at; u64 last_exited_at; u64 accumulated; u64 accumulated; u32 reserved[4]; u32 client_votes; u32 reserved[3]; }; }; static inline u64 get_time_in_sec(u64 counter) static inline u64 get_time_in_sec(u64 counter) Loading Loading @@ -99,9 +100,11 @@ static inline int msm_rpmstats_append_data_to_buf(char *buf, return snprintf(buf , buflength, return snprintf(buf , buflength, "RPM Mode:%s\n\t count:%d\ntime in last mode(msec):%llu\n" "RPM Mode:%s\n\t count:%d\ntime in last mode(msec):%llu\n" "time since last mode(sec):%llu\n actual last sleep(msec):%llu\n", "time since last mode(sec):%llu\nactual last sleep(msec):%llu\n" "client votes: %#010x\n\n", stat_type, data->count, time_in_last_mode, stat_type, data->count, time_in_last_mode, time_since_last_mode, actual_last_sleep); time_since_last_mode, actual_last_sleep, data->client_votes); } } static inline u32 msm_rpmstats_read_long_register_v2(void __iomem *regbase, static inline u32 msm_rpmstats_read_long_register_v2(void __iomem *regbase, Loading Loading @@ -147,6 +150,9 @@ static inline int msm_rpmstats_copy_stats_v2( data.accumulated = msm_rpmstats_read_quad_register_v2(reg, data.accumulated = msm_rpmstats_read_quad_register_v2(reg, i, offsetof(struct msm_rpm_stats_data_v2, i, offsetof(struct msm_rpm_stats_data_v2, accumulated)); accumulated)); data.client_votes = msm_rpmstats_read_long_register_v2(reg, i, offsetof(struct msm_rpm_stats_data_v2, client_votes)); length += msm_rpmstats_append_data_to_buf(prvdata->buf + length, length += msm_rpmstats_append_data_to_buf(prvdata->buf + length, &data, sizeof(prvdata->buf) - length); &data, sizeof(prvdata->buf) - length); prvdata->read_idx++; prvdata->read_idx++; Loading