android_kernel_xiaomi_sm8350/arch/arm/kernel
Will Deacon 446a5a8b1e ARM: 6205/1: perf: ensure counter delta is treated as unsigned
Hardware performance counters on ARM are 32-bits wide but atomic64_t
variables are used to represent counter data in the hw_perf_event structure.

The armpmu_event_update function right-shifts a signed 64-bit delta variable
and adds the result to the event count. This can lead to shifting in sign-bits
if the MSB of the 32-bit counter value is set. This results in perf output
such as:

 Performance counter stats for 'sleep 20':

 18446744073460670464  cycles             <-- 0xFFFFFFFFF12A6000
        7783773  instructions             #      0.000 IPC
            465  context-switches
            161  page-faults
        1172393  branches

   20.154242147  seconds time elapsed

This patch ensures that the delta value is treated as unsigned so that the
right shift sets the upper bits to zero.

Cc: <stable@kernel.org>
Acked-by: Jamie Iles <jamie.iles@picochip.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-04 23:11:37 +01:00
..
.gitignore
armksyms.c
arthur.c
asm-offsets.c
atags.c
atags.h
bios32.c ARM: 6058/1: Add support for PCI domains 2010-04-22 21:38:11 +01:00
calls.S Add generic sys_old_mmap() 2010-03-12 15:52:32 -08:00
compat.c
compat.h
crunch-bits.S
crunch.c
debug.S
dma-isa.c
dma.c ARM: dma: add /proc/dma support to arch/arm/kernel/dma.c 2010-04-14 13:13:30 +01:00
early_printk.c
ecard.c
ecard.h
elf.c
entry-armv.S ARM: 6068/1: Fix build break with KPROBES enabled 2010-05-01 11:32:53 +01:00
entry-common.S
entry-header.S ARM: 5991/1: Fix regression in restore_user_regs macro 2010-03-15 17:20:08 +00:00
etm.c
fiq.c
ftrace.c ARM: fix build error in arch/arm/kernel/process.c 2010-04-21 08:45:21 +01:00
head-common.S
head-nommu.S
head.S
init_task.c
io.c
irq.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
isa.c
iwmmxt.S
kgdb.c kgdb: core changes to support kdb 2010-05-20 21:04:21 -05:00
kprobes-decode.c
kprobes.c Merge branch 'master' into export-slabh 2010-04-05 11:37:28 +09:00
leds.c
machine_kexec.c
Makefile Merge branch 'misc2' into devel 2010-02-25 22:09:41 +00:00
module.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
perf_event.c ARM: 6205/1: perf: ensure counter delta is treated as unsigned 2010-07-04 23:11:37 +01:00
pmu.c ARM: 6064/1: pmu: register IRQs at runtime 2010-05-17 11:53:57 +01:00
process.c ARM: fix build error in arch/arm/kernel/process.c 2010-04-21 08:45:21 +01:00
ptrace.c arm: use generic ptrace_resume code 2010-03-12 15:52:38 -08:00
ptrace.h arm: use generic ptrace_resume code 2010-03-12 15:52:38 -08:00
relocate_kernel.S
return_address.c
setup.c ARM: 5939/1: ARM: Add option CMDLINE_FORCE to force usage of the in-kernel cmdline 2010-05-24 20:45:00 +01:00
signal.c ARM: 6051/1: VFP: preserve the HW context when calling signal handlers 2010-04-14 11:11:30 +01:00
signal.h
smp_scu.c
smp_twd.c ARM: 6125/1: ARM TWD: move TWD registers to common header 2010-05-12 11:18:13 +01:00
smp.c Merge branch 'devel-stable' into devel 2010-05-17 17:24:04 +01:00
stacktrace.c
sys_arm.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sys_oabi-compat.c Add generic sys_ipc wrapper 2010-03-12 15:52:32 -08:00
tcm.c
tcm.h
thumbee.c
time.c ARM: convert arm to arch_gettimeoffset() 2010-03-24 08:08:58 +00:00
traps.c
unwind.c ARM: 6140/1: silence a bogus sparse warning in unwind.c 2010-05-24 20:42:03 +01:00
vmlinux.lds.S
xscale-cp0.c