[patch] initial perf_event support for Raspberry-Pi

Vince Weaver vincent.weaver at maine.edu
Tue Dec 31 13:54:16 PST 2013

The following patch enables performance counter support on Raspberry-Pi.

We have this working on the 2708 based rasp-pi kernels by manually putting
the device registration in the platform files.

This change does things properly in a device tree.  The boot messages look 
proper, but my rasp-pi hangs somewhere in USB enabling when running a 
stock 3.13-rc6 kernel so I have been unable to fully test this change.

I also understand that the rasp-pi 1176 pmu support is missing the 
overflow interrupt.  I'm not sure if that's true of all 2835 
implementations.  If not, then this patch will need to be changed a bit.

Signed-off-by: Vince Weaver <vincent.weaver at maine.edu> 

diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi
index aa537ed..d28dada 100644
--- a/arch/arm/boot/dts/bcm2835.dtsi
+++ b/arch/arm/boot/dts/bcm2835.dtsi
@@ -22,6 +22,10 @@
 			clock-frequency = <1000000>;
+		arm-pmu {
+			compatible = "arm,arm1176-pmu";
+		};
 		intc: interrupt-controller {
 			compatible = "brcm,bcm2835-armctrl-ic";
 			reg = <0x7e00b200 0x200>;

More information about the linux-rpi-kernel mailing list