diff options
author | MyungJoo Ham <myungjoo.ham@samsung.com> | 2015-08-04 21:55:10 -0400 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2015-09-11 01:22:26 -0400 |
commit | 86fa4cdb0f1e16d7e27278e29e4f0b9ba22f1a9b (patch) | |
tree | 64b22ef9f64a89e57171a7798e9d159cd6d05a85 | |
parent | d80f02231a1ee891f56f06ee6e4646db6ba28836 (diff) |
PM / devfreq: exynos-ppmu: bit-wise operation bugfix.
Make it u64 before left-shifting 32bits.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-rw-r--r-- | drivers/devfreq/event/exynos-ppmu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c index f9901f52a225..f312485f1451 100644 --- a/drivers/devfreq/event/exynos-ppmu.c +++ b/drivers/devfreq/event/exynos-ppmu.c | |||
@@ -319,7 +319,8 @@ static int exynos_ppmu_v2_get_event(struct devfreq_event_dev *edev, | |||
319 | case PPMU_PMNCNT3: | 319 | case PPMU_PMNCNT3: |
320 | pmcnt_high = __raw_readl(info->ppmu.base + PPMU_V2_PMCNT3_HIGH); | 320 | pmcnt_high = __raw_readl(info->ppmu.base + PPMU_V2_PMCNT3_HIGH); |
321 | pmcnt_low = __raw_readl(info->ppmu.base + PPMU_V2_PMCNT3_LOW); | 321 | pmcnt_low = __raw_readl(info->ppmu.base + PPMU_V2_PMCNT3_LOW); |
322 | load_count = (u64)((pmcnt_high & 0xff) << 32) + (u64)pmcnt_low; | 322 | load_count = ((u64)((pmcnt_high & 0xff)) << 32) |
323 | + (u64)pmcnt_low; | ||
323 | break; | 324 | break; |
324 | } | 325 | } |
325 | edata->load_count = load_count; | 326 | edata->load_count = load_count; |