aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/perf/hv-gpci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/perf/hv-gpci.c')
-rw-r--r--arch/powerpc/perf/hv-gpci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/perf/hv-gpci.c b/arch/powerpc/perf/hv-gpci.c
index d48413e28c39..c756228a081f 100644
--- a/arch/powerpc/perf/hv-gpci.c
+++ b/arch/powerpc/perf/hv-gpci.c
@@ -175,7 +175,7 @@ static unsigned long single_gpci_request(u32 req, u32 starting_index,
*/
count = 0;
for (i = offset; i < offset + length; i++)
- count |= arg->bytes[i] << (i - offset);
+ count |= (u64)(arg->bytes[i]) << ((length - 1 - (i - offset)) * 8);
*value = count;
out: