summaryrefslogtreecommitdiffstats
path: root/arch/csky
diff options
context:
space:
mode:
authorMao Han <han_mao@c-sky.com>2019-09-25 11:23:02 +0200
committerGuo Ren <ren_guo@c-sky.com>2019-09-30 04:26:33 +0200
commit3a09d8e2893b2403a043890e5832966e8640feaf (patch)
tree223e7acd6759948b7561d310b447ae766dd795a6 /arch/csky
parentcsky: Fixup add zero_fp fixup perf backtrace panic (diff)
downloadlinux-3a09d8e2893b2403a043890e5832966e8640feaf.tar.xz
linux-3a09d8e2893b2403a043890e5832966e8640feaf.zip
csky: Fixup csky_pmu.max_period assignment
The csky_pmu.max_period has type u64, and BIT() can only return 32 bits unsigned long on C-SKY. The initialization for max_period will be incorrect when count_width is bigger than 32. Use BIT_ULL() Signed-off-by: Mao Han <han_mao@c-sky.com> Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Diffstat (limited to 'arch/csky')
-rw-r--r--arch/csky/kernel/perf_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/csky/kernel/perf_event.c b/arch/csky/kernel/perf_event.c
index 4c1a1934d76a..7570109cddc6 100644
--- a/arch/csky/kernel/perf_event.c
+++ b/arch/csky/kernel/perf_event.c
@@ -1306,7 +1306,7 @@ int csky_pmu_device_probe(struct platform_device *pdev,
&csky_pmu.count_width)) {
csky_pmu.count_width = DEFAULT_COUNT_WIDTH;
}
- csky_pmu.max_period = BIT(csky_pmu.count_width) - 1;
+ csky_pmu.max_period = BIT_ULL(csky_pmu.count_width) - 1;
csky_pmu.plat_device = pdev;