From: Suzuki K. Poulose Date: Wed, 18 Mar 2015 12:24:42 +0000 (+0000) Subject: arm-cci: Fix CCI PMU event validation X-Git-Tag: omap-for-v4.2/o2_dc~52^2~3^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=874c571414d5617f4042298986b6a826816ee885;p=pandora-kernel.git arm-cci: Fix CCI PMU event validation We mask the event with the CCI_PMU_EVENT_MASK, before passing the config to pmu_validate_hw_event(), which causes extra bits to be ignored and qualifies an invalid event code as valid. e.g, $ perf stat -a -C 0 -e CCI_400/config=0x1ff,name=cycles/ sleep 1 Performance counter stats for 'system wide': 506951142 cycles 1.013879626 seconds time elapsed where, cycles has an event coding of 0xff. This patch also removes the unnecessary 'event' mask in pmu_write_register, since the config_base is set by the pmu code after the event is validated. Acked-by: Punit Agrawal Reviewed-by: Will Deacon Signed-off-by: Suzuki K. Poulose Signed-off-by: Will Deacon --- Reading git-diff-tree failed