]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c
perf intel-pt: Fix packet decoding of CYC packets
[mirror_ubuntu-bionic-kernel.git] / tools / perf / util / intel-pt-decoder / intel-pt-pkt-decoder.c
index ba4c9dd186434a33c8c33a59ab8884fd7c679dd3..d426761a549d02d67756c541ea7ab0b2a0495e68 100644 (file)
@@ -366,7 +366,7 @@ static int intel_pt_get_cyc(unsigned int byte, const unsigned char *buf,
                if (len < offs)
                        return INTEL_PT_NEED_MORE_BYTES;
                byte = buf[offs++];
-               payload |= (byte >> 1) << shift;
+               payload |= ((uint64_t)byte >> 1) << shift;
        }
 
        packet->type = INTEL_PT_CYC;