All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm_global_timer: Use 64 Bit hw counter for ipipe_tsc
@ 2021-03-05  8:22 Gunter Grau
  2021-03-05 12:27 ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: Gunter Grau @ 2021-03-05  8:22 UTC (permalink / raw)
  To: xenomai

When using the arm_global_timer as source for ipipe_tsc the mask
was configured with 32 Bit.
However this timer is a native 64 Bit counter. So use the complete
hardware register by configuring a 64 Bit mask on initialization.
The ipipe_tsc implementation is already 64 Bit ready and reads this
register as described in the reference manual, so no further
changes needed.

Signed-off-by: Gunter Grau <gunter.grau@philips.com>
---
 drivers/clocksource/arm_global_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c
index 77c116a3e85f..44c10e364f62 100644
--- a/drivers/clocksource/arm_global_timer.c
+++ b/drivers/clocksource/arm_global_timer.c
@@ -82,7 +82,7 @@ static inline void gt_ipipe_cs_setup(void)
                .u = {
                        {
                                .counter_paddr = gt_pbase,
-                               .mask = 0xffffffff,
+                               .mask = CLOCKSOURCE_MASK(64),
                        }
                },
                .refresh_freq = refresh_gt_freq,
--
2.17.1


________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm_global_timer: Use 64 Bit hw counter for ipipe_tsc
  2021-03-05  8:22 [PATCH] arm_global_timer: Use 64 Bit hw counter for ipipe_tsc Gunter Grau
@ 2021-03-05 12:27 ` Jan Kiszka
  2021-03-05 12:52   ` Grau, Gunter
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2021-03-05 12:27 UTC (permalink / raw)
  To: Gunter Grau, xenomai, Greg Gallagher

On 05.03.21 09:22, Gunter Grau via Xenomai wrote:
> When using the arm_global_timer as source for ipipe_tsc the mask
> was configured with 32 Bit.
> However this timer is a native 64 Bit counter. So use the complete
> hardware register by configuring a 64 Bit mask on initialization.
> The ipipe_tsc implementation is already 64 Bit ready and reads this
> register as described in the reference manual, so no further
> changes needed.
> 
> Signed-off-by: Gunter Grau <gunter.grau@philips.com>
> ---
>  drivers/clocksource/arm_global_timer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c
> index 77c116a3e85f..44c10e364f62 100644
> --- a/drivers/clocksource/arm_global_timer.c
> +++ b/drivers/clocksource/arm_global_timer.c
> @@ -82,7 +82,7 @@ static inline void gt_ipipe_cs_setup(void)
>                 .u = {
>                         {
>                                 .counter_paddr = gt_pbase,
> -                               .mask = 0xffffffff,
> +                               .mask = CLOCKSOURCE_MASK(64),
>                         }
>                 },
>                 .refresh_freq = refresh_gt_freq,
> --
> 2.17.1
> 

Thanks for the fixes. You may help Greg with integrating them by telling
us on which kernel versions they apply / have been tested.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] arm_global_timer: Use 64 Bit hw counter for ipipe_tsc
  2021-03-05 12:27 ` Jan Kiszka
@ 2021-03-05 12:52   ` Grau, Gunter
  2021-03-05 12:57     ` Greg Gallagher
  0 siblings, 1 reply; 6+ messages in thread
From: Grau, Gunter @ 2021-03-05 12:52 UTC (permalink / raw)
  To: Jan Kiszka, xenomai, Greg Gallagher

> -----Original Message-----
> From: Jan Kiszka <jan.kiszka@siemens.com>
> Sent: Freitag, 5. März 2021 13:27
> To: Grau, Gunter <gunter.grau@philips.com>; xenomai@xenomai.org; Greg
> Gallagher <greg@embeddedgreg.com>
> Subject: Re: [PATCH] arm_global_timer: Use 64 Bit hw counter for ipipe_tsc
>
> Caution: This e-mail originated from outside of Philips, be careful for
> phishing.
>
>
> On 05.03.21 09:22, Gunter Grau via Xenomai wrote:
> > When using the arm_global_timer as source for ipipe_tsc the mask was
> > configured with 32 Bit.
> > However this timer is a native 64 Bit counter. So use the complete
> > hardware register by configuring a 64 Bit mask on initialization.
> > The ipipe_tsc implementation is already 64 Bit ready and reads this
> > register as described in the reference manual, so no further changes
> > needed.
> >
> > Signed-off-by: Gunter Grau <gunter.grau@philips.com>
> > ---
> >  drivers/clocksource/arm_global_timer.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/clocksource/arm_global_timer.c
> > b/drivers/clocksource/arm_global_timer.c
> > index 77c116a3e85f..44c10e364f62 100644
> > --- a/drivers/clocksource/arm_global_timer.c
> > +++ b/drivers/clocksource/arm_global_timer.c
> > @@ -82,7 +82,7 @@ static inline void gt_ipipe_cs_setup(void)
> >                 .u = {
> >                         {
> >                                 .counter_paddr = gt_pbase,
> > -                               .mask = 0xffffffff,
> > +                               .mask = CLOCKSOURCE_MASK(64),
> >                         }
> >                 },
> >                 .refresh_freq = refresh_gt_freq,
> > --
> > 2.17.1
> >
>
> Thanks for the fixes. You may help Greg with integrating them by telling us
> on which kernel versions they apply / have been tested.
>
> Jan
>
> --
> Siemens AG, T RDA IOT
> Corporate Competence Center Embedded Linux


Hi,

The patches apply to ipipe/master.
But as I have seen so far they should even apply to 5.4.y.

Unfortunately we are currently using a very old kernel on imx6.
So I can report this patches has been tested on 4.1.x only.

Thanks,
Gunter

________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm_global_timer: Use 64 Bit hw counter for ipipe_tsc
  2021-03-05 12:52   ` Grau, Gunter
@ 2021-03-05 12:57     ` Greg Gallagher
  2021-03-22 11:48       ` Grau, Gunter
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Gallagher @ 2021-03-05 12:57 UTC (permalink / raw)
  To: Grau, Gunter; +Cc: Jan Kiszka, xenomai

On Fri, Mar 5, 2021 at 7:52 AM Grau, Gunter <gunter.grau@philips.com> wrote:

> > -----Original Message-----
> > From: Jan Kiszka <jan.kiszka@siemens.com>
> > Sent: Freitag, 5. März 2021 13:27
> > To: Grau, Gunter <gunter.grau@philips.com>; xenomai@xenomai.org; Greg
> > Gallagher <greg@embeddedgreg.com>
> > Subject: Re: [PATCH] arm_global_timer: Use 64 Bit hw counter for
> ipipe_tsc
> >
> > Caution: This e-mail originated from outside of Philips, be careful for
> > phishing.
> >
> >
> > On 05.03.21 09:22, Gunter Grau via Xenomai wrote:
> > > When using the arm_global_timer as source for ipipe_tsc the mask was
> > > configured with 32 Bit.
> > > However this timer is a native 64 Bit counter. So use the complete
> > > hardware register by configuring a 64 Bit mask on initialization.
> > > The ipipe_tsc implementation is already 64 Bit ready and reads this
> > > register as described in the reference manual, so no further changes
> > > needed.
> > >
> > > Signed-off-by: Gunter Grau <gunter.grau@philips.com>
> > > ---
> > >  drivers/clocksource/arm_global_timer.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/clocksource/arm_global_timer.c
> > > b/drivers/clocksource/arm_global_timer.c
> > > index 77c116a3e85f..44c10e364f62 100644
> > > --- a/drivers/clocksource/arm_global_timer.c
> > > +++ b/drivers/clocksource/arm_global_timer.c
> > > @@ -82,7 +82,7 @@ static inline void gt_ipipe_cs_setup(void)
> > >                 .u = {
> > >                         {
> > >                                 .counter_paddr = gt_pbase,
> > > -                               .mask = 0xffffffff,
> > > +                               .mask = CLOCKSOURCE_MASK(64),
> > >                         }
> > >                 },
> > >                 .refresh_freq = refresh_gt_freq,
> > > --
> > > 2.17.1
> > >
> >
> > Thanks for the fixes. You may help Greg with integrating them by telling
> us
> > on which kernel versions they apply / have been tested.
> >
> > Jan
> >
> > --
> > Siemens AG, T RDA IOT
> > Corporate Competence Center Embedded Linux
>
>
> Hi,
>
> The patches apply to ipipe/master.
> But as I have seen so far they should even apply to 5.4.y.
>
> Unfortunately we are currently using a very old kernel on imx6.
> So I can report this patches has been tested on 4.1.x only.
>
> Thanks,
> Gunter
>
> ________________________________
> The information contained in this message may be confidential and legally
> protected under applicable law. The message is intended solely for the
> addressee(s). If you are not the intended recipient, you are hereby
> notified that any use, forwarding, dissemination, or reproduction of this
> message is strictly prohibited and may be unlawful. If you are not the
> intended recipient, please contact the sender by return e-mail and destroy
> all copies of the original message.


Thanks! I can test them out this weekend, I have a bunch of ipipe work to
do.

Thanks

Greg

>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] arm_global_timer: Use 64 Bit hw counter for ipipe_tsc
  2021-03-05 12:57     ` Greg Gallagher
@ 2021-03-22 11:48       ` Grau, Gunter
  2021-05-14  4:42         ` Greg Gallagher
  0 siblings, 1 reply; 6+ messages in thread
From: Grau, Gunter @ 2021-03-22 11:48 UTC (permalink / raw)
  To: Greg Gallagher; +Cc: Jan Kiszka, xenomai



> From: Greg Gallagher <greg@embeddedgreg.com>
> Sent: Freitag, 5. März 2021 13:57
> To: Grau, Gunter <gunter.grau@philips.com>
> Cc: Jan Kiszka <jan.kiszka@siemens.com>; xenomai@xenomai.org
> Subject: Re: [PATCH] arm_global_timer: Use 64 Bit hw counter for ipipe_tsc
>
> Caution: This e-mail originated from outside of Philips, be careful for phishing.
>
> > On Fri, Mar 5, 2021 at 7:52 AM Grau, Gunter <gunter.grau@philips.com> wrote:
> > > -----Original Message-----
> > > From: Jan Kiszka <jan.kiszka@siemens.com>
> > > Sent: Freitag, 5. März 2021 13:27
> > > To: Grau, Gunter <gunter.grau@philips.com>; xenomai@xenomai.org; Greg
> > > Gallagher <greg@embeddedgreg.com>
> > > Subject: Re: [PATCH] arm_global_timer: Use 64 Bit hw counter for ipipe_tsc
> > >
> > > Caution: This e-mail originated from outside of Philips, be careful for
> > > phishing.
> > >
> > >
> > > On 05.03.21 09:22, Gunter Grau via Xenomai wrote:
> > > > When using the arm_global_timer as source for ipipe_tsc the mask was
> > > > configured with 32 Bit.
> > > > However this timer is a native 64 Bit counter. So use the complete
> > > > hardware register by configuring a 64 Bit mask on initialization.
> > > > The ipipe_tsc implementation is already 64 Bit ready and reads this
> > > > register as described in the reference manual, so no further changes
> > > > needed.
> > > >
> > > > Signed-off-by: Gunter Grau <gunter.grau@philips.com>
> > > > ---
> > > >  drivers/clocksource/arm_global_timer.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/clocksource/arm_global_timer.c
> > > > b/drivers/clocksource/arm_global_timer.c
> > > > index 77c116a3e85f..44c10e364f62 100644
> > > > --- a/drivers/clocksource/arm_global_timer.c
> > > > +++ b/drivers/clocksource/arm_global_timer.c
> > > > @@ -82,7 +82,7 @@ static inline void gt_ipipe_cs_setup(void)
> > > >                 .u = {
> > > >                         {
> > > >                                 .counter_paddr = gt_pbase,
> > > > -                               .mask = 0xffffffff,
> > > > +                               .mask = CLOCKSOURCE_MASK(64),
> > > >                         }
> > > >                 },
> > > >                 .refresh_freq = refresh_gt_freq,
> > > > --
> > > > 2.17.1
> > > >
> > >
> > > Thanks for the fixes. You may help Greg with integrating them by telling us
> > > on which kernel versions they apply / have been tested.
> > >
> > > Jan
> > >
> > > --
> > > Siemens AG, T RDA IOT
> > > Corporate Competence Center Embedded Linux
> >
> >
> > Hi,
> >
> > The patches apply to ipipe/master.
> > But as I have seen so far they should even apply to 5.4.y.
> >
> > Unfortunately we are currently using a very old kernel on imx6.
> > So I can report this patches has been tested on 4.1.x only.
> >
> > Thanks,
> > Gunter
> >
> > [...]
> >
>
> Thanks! I can test them out this weekend, I have a bunch of ipipe work to do.
>
> Thanks
>
> Greg
>

Hi Greg,

Did you have the chance to look into the two patches?
Is there anything I can do?

Thanks,
Gunter

________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] arm_global_timer: Use 64 Bit hw counter for ipipe_tsc
  2021-03-22 11:48       ` Grau, Gunter
@ 2021-05-14  4:42         ` Greg Gallagher
  0 siblings, 0 replies; 6+ messages in thread
From: Greg Gallagher @ 2021-05-14  4:42 UTC (permalink / raw)
  To: Grau, Gunter; +Cc: Jan Kiszka, xenomai

On Mon, Mar 22, 2021 at 7:48 AM Grau, Gunter <gunter.grau@philips.com>
wrote:

>
>
> > From: Greg Gallagher <greg@embeddedgreg.com>
> > Sent: Freitag, 5. März 2021 13:57
> > To: Grau, Gunter <gunter.grau@philips.com>
> > Cc: Jan Kiszka <jan.kiszka@siemens.com>; xenomai@xenomai.org
> > Subject: Re: [PATCH] arm_global_timer: Use 64 Bit hw counter for
> ipipe_tsc
> >
> > Caution: This e-mail originated from outside of Philips, be careful for
> phishing.
> >
> > > On Fri, Mar 5, 2021 at 7:52 AM Grau, Gunter <gunter.grau@philips.com>
> wrote:
> > > > -----Original Message-----
> > > > From: Jan Kiszka <jan.kiszka@siemens.com>
> > > > Sent: Freitag, 5. März 2021 13:27
> > > > To: Grau, Gunter <gunter.grau@philips.com>; xenomai@xenomai.org;
> Greg
> > > > Gallagher <greg@embeddedgreg.com>
> > > > Subject: Re: [PATCH] arm_global_timer: Use 64 Bit hw counter for
> ipipe_tsc
> > > >
> > > > Caution: This e-mail originated from outside of Philips, be careful
> for
> > > > phishing.
> > > >
> > > >
> > > > On 05.03.21 09:22, Gunter Grau via Xenomai wrote:
> > > > > When using the arm_global_timer as source for ipipe_tsc the mask
> was
> > > > > configured with 32 Bit.
> > > > > However this timer is a native 64 Bit counter. So use the complete
> > > > > hardware register by configuring a 64 Bit mask on initialization.
> > > > > The ipipe_tsc implementation is already 64 Bit ready and reads this
> > > > > register as described in the reference manual, so no further
> changes
> > > > > needed.
> > > > >
> > > > > Signed-off-by: Gunter Grau <gunter.grau@philips.com>
> > > > > ---
> > > > >  drivers/clocksource/arm_global_timer.c | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/drivers/clocksource/arm_global_timer.c
> > > > > b/drivers/clocksource/arm_global_timer.c
> > > > > index 77c116a3e85f..44c10e364f62 100644
> > > > > --- a/drivers/clocksource/arm_global_timer.c
> > > > > +++ b/drivers/clocksource/arm_global_timer.c
> > > > > @@ -82,7 +82,7 @@ static inline void gt_ipipe_cs_setup(void)
> > > > >                 .u = {
> > > > >                         {
> > > > >                                 .counter_paddr = gt_pbase,
> > > > > -                               .mask = 0xffffffff,
> > > > > +                               .mask = CLOCKSOURCE_MASK(64),
> > > > >                         }
> > > > >                 },
> > > > >                 .refresh_freq = refresh_gt_freq,
> > > > > --
> > > > > 2.17.1
> > > > >
> > > >
> > > > Thanks for the fixes. You may help Greg with integrating them by
> telling us
> > > > on which kernel versions they apply / have been tested.
> > > >
> > > > Jan
> > > >
> > > > --
> > > > Siemens AG, T RDA IOT
> > > > Corporate Competence Center Embedded Linux
> > >
> > >
> > > Hi,
> > >
> > > The patches apply to ipipe/master.
> > > But as I have seen so far they should even apply to 5.4.y.
> > >
> > > Unfortunately we are currently using a very old kernel on imx6.
> > > So I can report this patches has been tested on 4.1.x only.
> > >
> > > Thanks,
> > > Gunter
> > >
> > > [...]
> > >
> >
> > Thanks! I can test them out this weekend, I have a bunch of ipipe work
> to do.
> >
> > Thanks
> >
> > Greg
> >
>
> Hi Greg,
>
> Did you have the chance to look into the two patches?
> Is there anything I can do?
>
> Thanks,
> Gunter
>
> ________________________________
> The information contained in this message may be confidential and legally
> protected under applicable law. The message is intended solely for the
> addressee(s). If you are not the intended recipient, you are hereby
> notified that any use, forwarding, dissemination, or reproduction of this
> message is strictly prohibited and may be unlawful. If you are not the
> intended recipient, please contact the sender by return e-mail and destroy
> all copies of the original message.
>

Applied, thanks for the patch. Sorry it took so long, patches will be
released this weekend.

-Greg

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-14  4:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05  8:22 [PATCH] arm_global_timer: Use 64 Bit hw counter for ipipe_tsc Gunter Grau
2021-03-05 12:27 ` Jan Kiszka
2021-03-05 12:52   ` Grau, Gunter
2021-03-05 12:57     ` Greg Gallagher
2021-03-22 11:48       ` Grau, Gunter
2021-05-14  4:42         ` Greg Gallagher

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.