]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86/intel/uncore: Fix uncore num_counters
authorKan Liang <kan.liang@intel.com>
Thu, 11 Aug 2016 14:30:20 +0000 (07:30 -0700)
committerIngo Molnar <mingo@kernel.org>
Fri, 12 Aug 2016 06:35:04 +0000 (08:35 +0200)
commit3386dd7db915b0e7fbffd5a095c1c2116af641bd
tree7f90d252acec7c7805b0dcbb3923961ddb22f306
parent7084355ce68ae3e3a4275bc63032facb261baf4a
perf/x86/intel/uncore: Fix uncore num_counters

Some uncore boxes' num_counters value for Haswell server and
Broadwell server are not correct (too large, off by one).

This issue was found by comparing the code with the document. Although
there is no bug report from users yet, accessing non-existent counters
is dangerous and the behavior is undefined: it may cause miscounting or
even crashes.

This patch makes them consistent with the uncore document.

Reported-by: Lukasz Odzioba <lukasz.odzioba@intel.com>
Signed-off-by: Kan Liang <kan.liang@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: <stable@vger.kernel.org>
Link: http://lkml.kernel.org/r/1470925820-59847-1-git-send-email-kan.liang@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/events/intel/uncore_snbep.c