From: jamie@jamieiles.com (Jamie Iles)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] arm: provide a mechanism to reserve performance counters
Date: Fri, 11 Dec 2009 18:07:02 +0000 [thread overview]
Message-ID: <20091211180702.GL4164@wear.picochip.com> (raw)
In-Reply-To: <000401ca7a88$370adc40$a52094c0$@deacon@arm.com>
On Fri, Dec 11, 2009 at 05:34:38PM -0000, Will Deacon wrote:
> > From: Jamie Iles [mailto:jamie.iles at picochip.com]
> > Sent: 11 December 2009 17:30
>
> > I was just looking at that. I've changed all of the oprofile models but I'm
> > not sure what to do for mpcore as it also has the SCU and the setup. How about
> > I also add the following calls?
> >
> > /* Reserve the SCU in the same manner as the PMU. */
> > struct pmu_irqs *reserve_scu(void):
> >
> > /* Release the SCU in the same manner as the PMU. */
> > void release_scu(struct pmu_irqs *);
> >
> > /* Initialise the PMU. For SMP systems this will be setting the IRQ affinity.
> > * For other systems this may be a nop. */
> > int init_pmu(void);
> >
> > /* Initialise the SCU. For SMP systems this will be setting the IRQ affinity.
> > * For other systems this may be a nop. */
> > int init_scu(void);
>
> I'm not sure I like that as much since the SCU is only explicitly used for v6 profiling.
> In v7, the SCU events are accessed and programmed via the PMU interface. Additionally, the
> SCU is parameterised by its base address as well as its interrupts.
>
> Perhaps you could add it with #ifdef CONFIG_CPU_V6 around the SCU functions and then
> perf and oprofile can use the functions only when they are actually needed.
Ok, I agree with you on that. Actually, the only v6 SMP system that uses the
SCU in mainline is realview. My patches for perf events only use the PMU so
the only user of the SCU is oprofile so lets leave it where it is. If someone
else adds support for the SCU in the perf events code then we can revisit this
later.
I'll make the {reserve,release}_pmu() functions take/return const pointers and
I'll add the init_pmu() call for setting the IRQ affinity as the perf events
code will need this too.
Jamie
next prev parent reply other threads:[~2009-12-11 18:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-11 15:31 [PATCH 1/4] arm: provide a mechanism to reserve performance counters Will Deacon
2009-12-11 15:41 ` Jamie Iles
2009-12-11 17:17 ` Will Deacon
2009-12-11 17:30 ` Jamie Iles
2009-12-11 17:34 ` Will Deacon
2009-12-11 18:07 ` Jamie Iles [this message]
2009-12-11 21:09 ` Russell King - ARM Linux
-- strict thread matches above, loose matches on Subject: below --
2009-12-11 9:44 perf events for ARMv6 Jamie Iles
2009-12-11 9:44 ` [PATCH 1/4] arm: provide a mechanism to reserve performance counters Jamie Iles
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091211180702.GL4164@wear.picochip.com \
--to=jamie@jamieiles.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.