Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: mathieu.desnoyers@polymtl.ca (Mathieu Desnoyers)
Subject: [ltt-dev] [patch 7/9] omap trace clock
Date: Fri, 6 Mar 2009 13:02:42 -0500	[thread overview]
Message-ID: <20090306180241.GA14236@Krystal> (raw)
In-Reply-To: <5d5443650903052233u25e63e07x725169a74141f45f@mail.gmail.com>

* Trilok Soni (soni.trilok at gmail.com) wrote:
> Hi Mathieu,
> 
> > +
> > +/*
> > + * Cycle counter management.
> > + */
> > +
> > +static inline void write_pmnc(u32 val)
> > +{
> > + ? ? ? __asm__ __volatile__ ("mcr p15, 0, %0, c9, c12, 0" : : "r" (val));
> > +}
> > +
> > +static inline u32 read_pmnc(void)
> > +{
> > + ? ? ? u32 val;
> > + ? ? ? __asm__ __volatile__ ("mrc p15, 0, %0, c9, c12, 0" : "=r" (val));
> > + ? ? ? ?return val;
> > +}
> > +
> > +static inline void write_ctens(u32 val)
> > +{
> > + ? ? ? __asm__ __volatile__ ("mcr p15, 0, %0, c9, c12, 1" : : "r" (val));
> > +}
> > +
> > +static inline u32 read_ctens(void)
> > +{
> > + ? ? ? u32 val;
> > + ? ? ? __asm__ __volatile__ ("mrc p15, 0, %0, c9, c12, 1" : "=r" (val));
> > + ? ? ? return val;
> > +}
> > +
> > +static inline void write_intenc(u32 val)
> > +{
> > + ? ? ? __asm__ __volatile__ ("mcr p15, 0, %0, c9, c14, 2" : : "r" (val));
> > +}
> > +
> > +static inline u32 read_intenc(void)
> > +{
> > + ? ? ? u32 val;
> > + ? ? ? ?__asm__ __volatile__ ("mrc p15, 0, %0, c9, c14, 2" : "=r" (val));
> > + ? ? ? return val;
> > +}
> > +
> > +static inline void write_useren(u32 val)
> > +{
> > + ? ? ? __asm__ __volatile__ ("mcr p15, 0, %0, c9, c14, 0" : : "r" (val));
> > +}
> > +
> > +static inline u32 read_useren(void)
> > +{
> > + ? ? ? u32 val;
> > + ? ? ? ?__asm__ __volatile__ ("mrc p15, 0, %0, c9, c14, 0" : "=r" (val));
> > + ? ? ? return val;
> > +}
> > +
> > +/*
> > + * Must disable counter before writing to it.
> > + */
> > +static inline void write_ccnt(u32 val)
> > +{
> > + ? ? ? __asm__ __volatile__ ("mcr p15, 0, %0, c9, c13, 0" : : "r" (val));
> > +}
> 
> Isn't is some of this cycle counter management code remain same for
> any cortext-A8 based SoC. I mean this doesn't seem to be specific to
> OMAP3 but to cortex-a8 it seems.
> 

Yes, given the understanding I have of the overall ARM world, I stayed
conservative in what headers files I touched and the configuration
options that I used. If you have hints about locations for .c and .h
files and about the configuration options, I would be glad to hear them.

Thanks !

Mathieu

> 
> 
> -- 
> ---Trilok Soni
> http://triloksoni.wordpress.com
> http://www.linkedin.com/in/triloksoni
> 

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68




  reply	other threads:[~2009-03-06 18:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-19  3:02 [ltt-dev] [patch 0/9] LTTng for ARM OMAP3 (v2) Mathieu Desnoyers
2009-02-19  3:02 ` [ltt-dev] [patch 1/9] omap lttng instrumentation kernel fix Mathieu Desnoyers
2009-02-19  3:02   ` Mathieu Desnoyers
2009-02-19  3:02 ` [ltt-dev] [patch 2/9] LTTng - ARM instrumentation Mathieu Desnoyers
2009-02-19  3:02   ` Mathieu Desnoyers
2009-02-19  3:02 ` [ltt-dev] [patch 3/9] OMAP ltt statedump include irq.h Mathieu Desnoyers
2009-02-19  3:02   ` Mathieu Desnoyers
2009-02-19  3:02 ` [ltt-dev] [patch 4/9] omap lttng use iter div Mathieu Desnoyers
2009-02-19  3:02   ` Mathieu Desnoyers
2009-02-19  3:02 ` [ltt-dev] [patch 5/9] omap lttng statedump arm Mathieu Desnoyers
2009-02-19  3:02   ` Mathieu Desnoyers
2009-02-19  3:02 ` [ltt-dev] [patch 6/9] omap trace clock specialize Mathieu Desnoyers
2009-02-19  3:02   ` Mathieu Desnoyers
2009-02-19  3:02 ` [ltt-dev] [patch 7/9] omap trace clock Mathieu Desnoyers
2009-02-19  3:02   ` Mathieu Desnoyers
2009-03-06  6:33   ` Trilok Soni
2009-03-06 18:02     ` Mathieu Desnoyers [this message]
2009-02-19  3:02 ` [ltt-dev] [patch 8/9] omap trace clock add write value Mathieu Desnoyers
2009-02-19  3:02   ` Mathieu Desnoyers
2009-02-19  3:02 ` [ltt-dev] [patch 9/9] --- arch/arm/mach-omap2/trace-clock.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) Mathieu Desnoyers
2009-02-19  3:02   ` Mathieu Desnoyers
2009-02-19  3:31   ` [ltt-dev] [patch 9/9] OMAP trace clock basic PM fix Mathieu Desnoyers

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=20090306180241.GA14236@Krystal \
    --to=mathieu.desnoyers@polymtl.ca \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox