The pit_read_sched_clock mean to getting the current counter value,
and the vf pit timer is a down count timer, this should return
the counter value or the cycles elapsed.
Signed-off-by: Xiubo Li <[email protected]>
---
drivers/clocksource/vf_pit_timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/vf_pit_timer.c b/drivers/clocksource/vf_pit_timer.c
index 02821b0..a918bc4 100644
--- a/drivers/clocksource/vf_pit_timer.c
+++ b/drivers/clocksource/vf_pit_timer.c
@@ -54,7 +54,7 @@ static inline void pit_irq_acknowledge(void)
static u64 pit_read_sched_clock(void)
{
- return __raw_readl(clksrc_base + PITCVAL);
+ return ~__raw_readl(clksrc_base + PITCVAL);
}
static int __init pit_clocksource_init(unsigned long rate)
--
1.8.4
On 04/15/2014 12:48 PM, Xiubo Li wrote:
> The pit_read_sched_clock mean to getting the current counter value,
> and the vf pit timer is a down count timer, this should return
> the counter value or the cycles elapsed.
>
> Signed-off-by: Xiubo Li <[email protected]>
> ---
> drivers/clocksource/vf_pit_timer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/vf_pit_timer.c b/drivers/clocksource/vf_pit_timer.c
> index 02821b0..a918bc4 100644
> --- a/drivers/clocksource/vf_pit_timer.c
> +++ b/drivers/clocksource/vf_pit_timer.c
> @@ -54,7 +54,7 @@ static inline void pit_irq_acknowledge(void)
>
> static u64 pit_read_sched_clock(void)
> {
> - return __raw_readl(clksrc_base + PITCVAL);
> + return ~__raw_readl(clksrc_base + PITCVAL);
> }
>
> static int __init pit_clocksource_init(unsigned long rate)
>
Hi Xiubo,
thanks for the patch but this has already been fixed [1] and is
available in the timers/urgent branch.
Thanks
-- Daniel
[1]
https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=timers/urgent&id=224aa3ed45c8735ae02bb2ecca002409fa6aa772
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
On Tue, 15 Apr 2014, Daniel Lezcano wrote:
> On 04/15/2014 12:48 PM, Xiubo Li wrote:
> > The pit_read_sched_clock mean to getting the current counter value,
> > and the vf pit timer is a down count timer, this should return
> > the counter value or the cycles elapsed.
> >
> > Signed-off-by: Xiubo Li <[email protected]>
> > ---
> > drivers/clocksource/vf_pit_timer.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/clocksource/vf_pit_timer.c
> > b/drivers/clocksource/vf_pit_timer.c
> > index 02821b0..a918bc4 100644
> > --- a/drivers/clocksource/vf_pit_timer.c
> > +++ b/drivers/clocksource/vf_pit_timer.c
> > @@ -54,7 +54,7 @@ static inline void pit_irq_acknowledge(void)
> >
> > static u64 pit_read_sched_clock(void)
> > {
> > - return __raw_readl(clksrc_base + PITCVAL);
> > + return ~__raw_readl(clksrc_base + PITCVAL);
> > }
> >
> > static int __init pit_clocksource_init(unsigned long rate)
> >
>
> Hi Xiubo,
>
> thanks for the patch but this has already been fixed [1] and is available in
> the timers/urgent branch.
It's in Linus tree already and tagged for stable.
Thanks,
tglx
> > diff --git a/drivers/clocksource/vf_pit_timer.c
> b/drivers/clocksource/vf_pit_timer.c
> > index 02821b0..a918bc4 100644
> > --- a/drivers/clocksource/vf_pit_timer.c
> > +++ b/drivers/clocksource/vf_pit_timer.c
> > @@ -54,7 +54,7 @@ static inline void pit_irq_acknowledge(void)
> >
> > static u64 pit_read_sched_clock(void)
> > {
> > - return __raw_readl(clksrc_base + PITCVAL);
> > + return ~__raw_readl(clksrc_base + PITCVAL);
> > }
> >
> > static int __init pit_clocksource_init(unsigned long rate)
> >
>
> Hi Xiubo,
>
> thanks for the patch but this has already been fixed [1] and is
> available in the timers/urgent branch.
>
Good news and I will pull it.
Thanks,
BRs
Xiubo
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m????????????I?
> >
> > thanks for the patch but this has already been fixed [1] and is available in
> > the timers/urgent branch.
>
> It's in Linus tree already and tagged for stable.
>
Yes, I have found it, I was developing this in the old tree...
:)
Thanks,
BRs
Xiubo