[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+sq2CcSJXjUmTqgojDUb=GVuv34-mzVA9e5TwHN3rO=5Vk01Q@mail.gmail.com>
Date: Tue, 19 Nov 2019 13:02:18 +0530
From: Sunil Kovvuri <sunil.kovvuri@...il.com>
To: David Miller <davem@...emloft.net>
Cc: Linux Netdev List <netdev@...r.kernel.org>,
Andrew Pinski <apinski@...vell.com>,
Pavan Nikhilesh <pbhagavatula@...vell.com>,
Sunil Goutham <sgoutham@...vell.com>
Subject: Re: [PATCH 12/15] octeontx2-af: Add TIM unit support.
On Mon, Nov 18, 2019 at 12:06 AM David Miller <davem@...emloft.net> wrote:
>
> From: sunil.kovvuri@...il.com
> Date: Sun, 17 Nov 2019 21:44:23 +0530
>
> > +static u64 get_tenns_tsc(void)
> > +{
> > + u64 tsc = 0;
> > +
> > +#if defined(CONFIG_ARM64)
> > + asm volatile("mrs %0, cntvct_el0" : "=r" (tsc));
> > +#endif
> > + return tsc;
> > +}
> > +
> > +static u64 get_tenns_clk(void)
> > +{
> > + u64 tsc = 0;
> > +
> > +#if defined(CONFIG_ARM64)
> > + asm volatile("mrs %0, cntfrq_el0" : "=r" (tsc));
> > +#endif
> > + return tsc;
> > +}
>
> You cannot do this.
>
> Read the tick register of the cpu in a portable way, we have interfaces for
> this. If not, create one.
>
Will fix and resubmit.
Thanks,
Sunil.
Powered by blists - more mailing lists