linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: ls1021a: utilize hrtimer based broadcast mode
@ 2015-07-10  9:39 Alison Wang
  2015-07-10 15:00 ` Mark Rutland
  0 siblings, 1 reply; 3+ messages in thread
From: Alison Wang @ 2015-07-10  9:39 UTC (permalink / raw)
  To: shawnguo, kernel, linux-arm-kernel, linux-kernel; +Cc: Alison Wang

Hrtimer based broadcast mode is used instead of
periodic tick broadcast to provide high resolution
clock in SMP.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
---
 arch/arm/mach-imx/mach-ls1021a.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/mach-imx/mach-ls1021a.c b/arch/arm/mach-imx/mach-ls1021a.c
index b89c858..1a1a115 100644
--- a/arch/arm/mach-imx/mach-ls1021a.c
+++ b/arch/arm/mach-imx/mach-ls1021a.c
@@ -8,9 +8,19 @@
  */
 
 #include <asm/mach/arch.h>
+#include <linux/clk-provider.h>
+#include <linux/clockchips.h>
+#include <linux/clocksource.h>
 
 #include "common.h"
 
+static void __init ls1021a_init_time(void)
+{
+	of_clk_init(NULL);
+	clocksource_of_init();
+	tick_setup_hrtimer_broadcast();
+}
+
 static const char * const ls1021a_dt_compat[] __initconst = {
 	"fsl,ls1021a",
 	NULL,
@@ -18,5 +28,6 @@ static const char * const ls1021a_dt_compat[] __initconst = {
 
 DT_MACHINE_START(LS1021A, "Freescale LS1021A")
 	.smp		= smp_ops(ls1021a_smp_ops),
+	.init_time	= ls1021a_init_time,
 	.dt_compat	= ls1021a_dt_compat,
 MACHINE_END
-- 
2.1.0.27.g96db324


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

* Re: [PATCH] arm: ls1021a: utilize hrtimer based broadcast mode
  2015-07-10  9:39 [PATCH] arm: ls1021a: utilize hrtimer based broadcast mode Alison Wang
@ 2015-07-10 15:00 ` Mark Rutland
  2015-07-14  9:57   ` Huan Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Rutland @ 2015-07-10 15:00 UTC (permalink / raw)
  To: Alison Wang; +Cc: shawnguo, kernel, linux-arm-kernel, linux-kernel, Alison Wang

On Fri, Jul 10, 2015 at 10:39:05AM +0100, Alison Wang wrote:
> Hrtimer based broadcast mode is used instead of
> periodic tick broadcast to provide high resolution
> clock in SMP.
> 
> Signed-off-by: Alison Wang <alison.wang@freescale.com>
> ---
>  arch/arm/mach-imx/mach-ls1021a.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm/mach-imx/mach-ls1021a.c b/arch/arm/mach-imx/mach-ls1021a.c
> index b89c858..1a1a115 100644
> --- a/arch/arm/mach-imx/mach-ls1021a.c
> +++ b/arch/arm/mach-imx/mach-ls1021a.c
> @@ -8,9 +8,19 @@
>   */
>  
>  #include <asm/mach/arch.h>
> +#include <linux/clk-provider.h>
> +#include <linux/clockchips.h>
> +#include <linux/clocksource.h>
>  
>  #include "common.h"
>  
> +static void __init ls1021a_init_time(void)
> +{
> +	of_clk_init(NULL);
> +	clocksource_of_init();
> +	tick_setup_hrtimer_broadcast();
> +}

It would be nicer to place this in the arch time_init() function, as
already happens for arm64 and powerpc. That way everyone can benefit.

Thanks,
Mark.

> +
>  static const char * const ls1021a_dt_compat[] __initconst = {
>  	"fsl,ls1021a",
>  	NULL,
> @@ -18,5 +28,6 @@ static const char * const ls1021a_dt_compat[] __initconst = {
>  
>  DT_MACHINE_START(LS1021A, "Freescale LS1021A")
>  	.smp		= smp_ops(ls1021a_smp_ops),
> +	.init_time	= ls1021a_init_time,
>  	.dt_compat	= ls1021a_dt_compat,
>  MACHINE_END
> -- 
> 2.1.0.27.g96db324
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* RE: [PATCH] arm: ls1021a: utilize hrtimer based broadcast mode
  2015-07-10 15:00 ` Mark Rutland
@ 2015-07-14  9:57   ` Huan Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Huan Wang @ 2015-07-14  9:57 UTC (permalink / raw)
  To: Mark Rutland; +Cc: shawnguo, kernel, linux-arm-kernel, linux-kernel

Hi, Mark,

> On Fri, Jul 10, 2015 at 10:39:05AM +0100, Alison Wang wrote:
> > Hrtimer based broadcast mode is used instead of periodic tick
> > broadcast to provide high resolution clock in SMP.
> >
> > Signed-off-by: Alison Wang <alison.wang@freescale.com>
> > ---
> >  arch/arm/mach-imx/mach-ls1021a.c | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> >
> > diff --git a/arch/arm/mach-imx/mach-ls1021a.c
> > b/arch/arm/mach-imx/mach-ls1021a.c
> > index b89c858..1a1a115 100644
> > --- a/arch/arm/mach-imx/mach-ls1021a.c
> > +++ b/arch/arm/mach-imx/mach-ls1021a.c
> > @@ -8,9 +8,19 @@
> >   */
> >
> >  #include <asm/mach/arch.h>
> > +#include <linux/clk-provider.h>
> > +#include <linux/clockchips.h>
> > +#include <linux/clocksource.h>
> >
> >  #include "common.h"
> >
> > +static void __init ls1021a_init_time(void) {
> > +	of_clk_init(NULL);
> > +	clocksource_of_init();
> > +	tick_setup_hrtimer_broadcast();
> > +}
> 
> It would be nicer to place this in the arch time_init() function, as
> already happens for arm64 and powerpc. That way everyone can benefit.
[Alison Wang] Yes, I think so.
Thanks.
> 
> Thanks,
> Mark.
> 
> > +
> >  static const char * const ls1021a_dt_compat[] __initconst = {
> >  	"fsl,ls1021a",
> >  	NULL,
> > @@ -18,5 +28,6 @@ static const char * const ls1021a_dt_compat[]
> > __initconst = {
> >
> >  DT_MACHINE_START(LS1021A, "Freescale LS1021A")
> >  	.smp		= smp_ops(ls1021a_smp_ops),
> > +	.init_time	= ls1021a_init_time,
> >  	.dt_compat	= ls1021a_dt_compat,
> >  MACHINE_END
> > --
> > 2.1.0.27.g96db324
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> >

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

end of thread, other threads:[~2015-07-14 10:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-10  9:39 [PATCH] arm: ls1021a: utilize hrtimer based broadcast mode Alison Wang
2015-07-10 15:00 ` Mark Rutland
2015-07-14  9:57   ` Huan Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).