[RFC PATCH] ARM: SOCFPGA: Enable PMU through the CTI

Jon Hunter jgchunter at gmail.com
Thu Jun 13 12:41:26 EDT 2013


On 15/05/13 10:12, Will Deacon wrote:
> Hello,
> 
> [adding Jon Hunter]
> 
> On Wed, May 15, 2013 at 03:58:02AM +0100, dinguyen at altera.com wrote:
>> From: Dinh Nguyen <dinguyen at altera.com>
>>
>> SOCFPGA has a PMU(Performance Measurement Unit) that has its
>> IRQs routed through Coresight using the CTI(Cross-Trigger Interface).
>>
>> This patch enables the PMU and initializes the CTI for usage by
>> oprofile/perfmon.
>>
>> A lot of the code/idea was taken from this:
>> https://patchwork.kernel.org/patch/1432541/
>>
>> Signed-off-by: Dinh Nguyen <dinguyen at altera.com>
>> CC: Ming Lei <ming.lei at canonical.com>
>> CC: Will Deacon <will.deacon at arm.com>
>> Cc: Paul Walmsley <paul at pwsan.com>
>> Cc: Russell King <linux at arm.linux.org.uk>
>> CC: Arnd Bergmann <arnd at arndb.de>
>> CC: Olof Johansson <olof at lixom.net>
>> Cc: Pavel Machek <pavel at denx.de>
>> ---
>>  arch/arm/boot/dts/socfpga.dtsi      |   18 +++++
>>  arch/arm/include/asm/pmu.h          |    3 +
>>  arch/arm/kernel/perf_event.c        |   16 +++++
>>  arch/arm/mach-socfpga/Makefile      |    1 +
>>  arch/arm/mach-socfpga/socfpga.c     |   21 +++++-
>>  arch/arm/mach-socfpga/socfpga_cti.c |  125 +++++++++++++++++++++++++++++++++++
>>  arch/arm/mach-socfpga/socfpga_cti.h |   16 +++++
>>  7 files changed, 199 insertions(+), 1 deletion(-)
>>  create mode 100644 arch/arm/mach-socfpga/socfpga_cti.c
>>  create mode 100644 arch/arm/mach-socfpga/socfpga_cti.h
> 
> Whilst it's great to see somebody else making use of CTI, I think this would
> benefit from Jon's separate CTI driver that he posted once:
> 
>   http://lists.infradead.org/pipermail/linux-arm-kernel/2012-December/137156.html
> 
> Jon -- would you be interested in reviving that work so the socfpga guys can
> make use of it?

Sorry the delay I have been moving house!

Anyway, although I would be interesting in reviving and completing the
work on cti, realistically, I am not sure when I would get to it now. I
do have the latest code on my github account [1]. However, probably
still needs more work before it is ready for the mainline in sorting out
the DT bindings, etc. I was also thinking about making the cti look like
a interrupt controller in DT as that is the way it is currently being
used. However, I am not implemented that but should not be much work.

Cheers
Jon

[1] https://github.com/jonhunter/linux/commits/dev-cti



More information about the linux-arm-kernel mailing list