]> Pileus Git - ~andy/linux/commit
perf/x86/intel/P4: Robistify P4 PMU types
authorIngo Molnar <mingo@kernel.org>
Wed, 24 Apr 2013 07:26:30 +0000 (09:26 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 26 Apr 2013 07:31:41 +0000 (09:31 +0200)
commit5ac2b5c2721501a8f5c5e1cd4116cbc31ace6886
tree7edd3d6f36b723c717b7cda85e92f4d4111133a8
parent94f4db3590893c600506105b88dab581c7f6f5c8
perf/x86/intel/P4: Robistify P4 PMU types

Linus found, while extending integer type extension checks in the
sparse static code checker, various fragile patterns of mixed
signed/unsigned  64-bit/32-bit integer use in perf_events_p4.c.

The relevant hardware register ABI is 64 bit wide on 32-bit
kernels as  well, so clean it all up a bit, remove unnecessary
casts, and make sure we  use 64-bit unsigned integers in these
places.

[ Unfortunately this patch was not tested on real P4 hardware,
  those are pretty rare already. If this patch causes any
  problems on P4 hardware then please holler ... ]

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: David Miller <davem@davemloft.net>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20130424072630.GB1780@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/perf_event_p4.h
arch/x86/kernel/cpu/perf_event_p4.c