All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Initcall changes for omaps
@ 2015-11-30 16:26 ` Tony Lindgren
  0 siblings, 0 replies; 18+ messages in thread
From: Tony Lindgren @ 2015-11-30 16:26 UTC (permalink / raw)
  To: linux-omap; +Cc: linux-arm-kernel

Hi,

Here are some initcall changes to initialize things a bit later.
This make it easier to make timers into drivers and allows us
to make most of the clocks into regular device drivers.

Regards,

Tony


Tony Lindgren (2):
  ARM: OMAP2+: Initialize timers later with late_time_init
  ARM: OMAP2+: Change core_initcall levels to postcore_initcall

 arch/arm/mach-omap2/omap2-restart.c |  2 +-
 arch/arm/mach-omap2/omap_device.c   |  2 +-
 arch/arm/mach-omap2/omap_hwmod.c    |  2 +-
 arch/arm/mach-omap2/serial.c        |  2 +-
 arch/arm/mach-omap2/timer.c         | 46 ++++++++++++++++++++++++++++++++-----
 5 files changed, 44 insertions(+), 10 deletions(-)

-- 
2.6.2

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

* [PATCH 0/2] Initcall changes for omaps
@ 2015-11-30 16:26 ` Tony Lindgren
  0 siblings, 0 replies; 18+ messages in thread
From: Tony Lindgren @ 2015-11-30 16:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Here are some initcall changes to initialize things a bit later.
This make it easier to make timers into drivers and allows us
to make most of the clocks into regular device drivers.

Regards,

Tony


Tony Lindgren (2):
  ARM: OMAP2+: Initialize timers later with late_time_init
  ARM: OMAP2+: Change core_initcall levels to postcore_initcall

 arch/arm/mach-omap2/omap2-restart.c |  2 +-
 arch/arm/mach-omap2/omap_device.c   |  2 +-
 arch/arm/mach-omap2/omap_hwmod.c    |  2 +-
 arch/arm/mach-omap2/serial.c        |  2 +-
 arch/arm/mach-omap2/timer.c         | 46 ++++++++++++++++++++++++++++++++-----
 5 files changed, 44 insertions(+), 10 deletions(-)

-- 
2.6.2

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

* [PATCH 1/2] ARM: OMAP2+: Initialize timers later with late_time_init
  2015-11-30 16:26 ` Tony Lindgren
@ 2015-11-30 16:26   ` Tony Lindgren
  -1 siblings, 0 replies; 18+ messages in thread
From: Tony Lindgren @ 2015-11-30 16:26 UTC (permalink / raw)
  To: linux-omap
  Cc: Tero Kristo, Paul Walmsley, Grygorii Strashko, Felipe Balbi,
	linux-arm-kernel

We don't need timers right away and initializing them later gives us few
nice things like interrupts and kmalloc. As the timers have a dependency
to the clock framework, we're better off initializing things later rather
than early if things go wrong. And this allows us to make the mux clock
driver needed for system timers into early_platform drivers.

Note that smp_prepare_cpus() will get called later on during the init so
we just need to local_irq_enable/disable for clocksource_probe().

Cc: Felipe Balbi <balbi@ti.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/timer.c | 46 +++++++++++++++++++++++++++++++++++++++------
 1 file changed, 40 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index b18ebbe..68bf482 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -478,36 +478,56 @@ static void __init __omap_sync32k_timer_init(int clkev_nr, const char *clkev_src
 	omap2_gp_clockevent_init(clkev_nr, clkev_src, clkev_prop);
 
 	/* Enable the use of clocksource="gp_timer" kernel parameter */
+	local_irq_disable();
 	if (use_gptimer_clksrc || gptimer)
 		omap2_gptimer_clocksource_init(clksrc_nr, clksrc_src,
 						clksrc_prop);
 	else
 		omap2_sync32k_clocksource_init();
+	local_irq_enable();
 }
 
-void __init omap_init_time(void)
+static void __init omap_init_time_late(void)
 {
 	__omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon",
 			2, "timer_sys_ck", NULL, false);
 
-	if (of_have_populated_dt())
+	if (of_have_populated_dt()) {
+		local_irq_disable();
 		clocksource_probe();
+		local_irq_enable();
+	}
+}
+
+void __init omap_init_time(void)
+{
+	late_time_init = omap_init_time_late;
 }
 
 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM43XX)
-void __init omap3_secure_sync32k_timer_init(void)
+static void __init omap3_secure_sync32k_timer_late_init(void)
 {
 	__omap_sync32k_timer_init(12, "secure_32k_fck", "ti,timer-secure",
 			2, "timer_sys_ck", NULL, false);
 }
+
+void __init omap3_secure_sync32k_timer_init(void)
+{
+	late_time_init = omap3_secure_sync32k_timer_late_init;
+}
 #endif /* CONFIG_ARCH_OMAP3 */
 
 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
-void __init omap3_gptimer_timer_init(void)
+static void __init omap3_gptimer_late_init(void)
 {
 	__omap_sync32k_timer_init(2, "timer_sys_ck", NULL,
 			1, "timer_sys_ck", "ti,timer-alwon", true);
 }
+
+void __init omap3_gptimer_timer_init(void)
+{
+	late_time_init = omap3_gptimer_late_init;
+}
 #endif
 
 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) ||		\
@@ -518,10 +538,17 @@ static void __init omap4_sync32k_timer_init(void)
 			2, "sys_clkin_ck", NULL, false);
 }
 
-void __init omap4_local_timer_init(void)
+static void __init omap4_local_timer_late_init(void)
 {
 	omap4_sync32k_timer_init();
+	local_irq_disable();
 	clocksource_probe();
+	local_irq_enable();
+}
+
+void __init omap4_local_timer_init(void)
+{
+	late_time_init = omap4_local_timer_late_init;
 }
 #endif
 
@@ -640,12 +667,19 @@ sysclk1_based:
 #endif
 }
 
-void __init omap5_realtime_timer_init(void)
+static void __init omap5_realtime_timer_late_init(void)
 {
 	omap4_sync32k_timer_init();
 	realtime_counter_init();
 
+	local_irq_disable();
 	clocksource_probe();
+	local_irq_enable();
+}
+
+void __init omap5_realtime_timer_init(void)
+{
+	late_time_init = omap5_realtime_timer_late_init;
 }
 #endif /* CONFIG_SOC_OMAP5 || CONFIG_SOC_DRA7XX */
 
-- 
2.6.2

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

* [PATCH 1/2] ARM: OMAP2+: Initialize timers later with late_time_init
@ 2015-11-30 16:26   ` Tony Lindgren
  0 siblings, 0 replies; 18+ messages in thread
From: Tony Lindgren @ 2015-11-30 16:26 UTC (permalink / raw)
  To: linux-arm-kernel

We don't need timers right away and initializing them later gives us few
nice things like interrupts and kmalloc. As the timers have a dependency
to the clock framework, we're better off initializing things later rather
than early if things go wrong. And this allows us to make the mux clock
driver needed for system timers into early_platform drivers.

Note that smp_prepare_cpus() will get called later on during the init so
we just need to local_irq_enable/disable for clocksource_probe().

Cc: Felipe Balbi <balbi@ti.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/timer.c | 46 +++++++++++++++++++++++++++++++++++++++------
 1 file changed, 40 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index b18ebbe..68bf482 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -478,36 +478,56 @@ static void __init __omap_sync32k_timer_init(int clkev_nr, const char *clkev_src
 	omap2_gp_clockevent_init(clkev_nr, clkev_src, clkev_prop);
 
 	/* Enable the use of clocksource="gp_timer" kernel parameter */
+	local_irq_disable();
 	if (use_gptimer_clksrc || gptimer)
 		omap2_gptimer_clocksource_init(clksrc_nr, clksrc_src,
 						clksrc_prop);
 	else
 		omap2_sync32k_clocksource_init();
+	local_irq_enable();
 }
 
-void __init omap_init_time(void)
+static void __init omap_init_time_late(void)
 {
 	__omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon",
 			2, "timer_sys_ck", NULL, false);
 
-	if (of_have_populated_dt())
+	if (of_have_populated_dt()) {
+		local_irq_disable();
 		clocksource_probe();
+		local_irq_enable();
+	}
+}
+
+void __init omap_init_time(void)
+{
+	late_time_init = omap_init_time_late;
 }
 
 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM43XX)
-void __init omap3_secure_sync32k_timer_init(void)
+static void __init omap3_secure_sync32k_timer_late_init(void)
 {
 	__omap_sync32k_timer_init(12, "secure_32k_fck", "ti,timer-secure",
 			2, "timer_sys_ck", NULL, false);
 }
+
+void __init omap3_secure_sync32k_timer_init(void)
+{
+	late_time_init = omap3_secure_sync32k_timer_late_init;
+}
 #endif /* CONFIG_ARCH_OMAP3 */
 
 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
-void __init omap3_gptimer_timer_init(void)
+static void __init omap3_gptimer_late_init(void)
 {
 	__omap_sync32k_timer_init(2, "timer_sys_ck", NULL,
 			1, "timer_sys_ck", "ti,timer-alwon", true);
 }
+
+void __init omap3_gptimer_timer_init(void)
+{
+	late_time_init = omap3_gptimer_late_init;
+}
 #endif
 
 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) ||		\
@@ -518,10 +538,17 @@ static void __init omap4_sync32k_timer_init(void)
 			2, "sys_clkin_ck", NULL, false);
 }
 
-void __init omap4_local_timer_init(void)
+static void __init omap4_local_timer_late_init(void)
 {
 	omap4_sync32k_timer_init();
+	local_irq_disable();
 	clocksource_probe();
+	local_irq_enable();
+}
+
+void __init omap4_local_timer_init(void)
+{
+	late_time_init = omap4_local_timer_late_init;
 }
 #endif
 
@@ -640,12 +667,19 @@ sysclk1_based:
 #endif
 }
 
-void __init omap5_realtime_timer_init(void)
+static void __init omap5_realtime_timer_late_init(void)
 {
 	omap4_sync32k_timer_init();
 	realtime_counter_init();
 
+	local_irq_disable();
 	clocksource_probe();
+	local_irq_enable();
+}
+
+void __init omap5_realtime_timer_init(void)
+{
+	late_time_init = omap5_realtime_timer_late_init;
 }
 #endif /* CONFIG_SOC_OMAP5 || CONFIG_SOC_DRA7XX */
 
-- 
2.6.2

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

* [PATCH 2/2] ARM: OMAP2+: Change core_initcall levels to postcore_initcall
  2015-11-30 16:26 ` Tony Lindgren
@ 2015-11-30 16:26   ` Tony Lindgren
  -1 siblings, 0 replies; 18+ messages in thread
From: Tony Lindgren @ 2015-11-30 16:26 UTC (permalink / raw)
  To: linux-omap
  Cc: Tero Kristo, Paul Walmsley, Grygorii Strashko, Felipe Balbi,
	linux-arm-kernel

We want to be able to probe a few selected device drivers before hwmod
code populates the clocks in omap_hwmod_setup_all(). This allows us to
convert most of the clock drivers into regular device drivers.

We only need a few minimal clock drivers early for the system timers to
select between the 32KiHz clock and the high frequency oscillator.

With these changes, initializing the clock drivers can be just done at
core_initcall time with something like:

np = of_find_node_by_name(NULL, "plls");
if (np)
	of_platform_populate(np, NULL, NULL, NULL);

And then these clocks will be available for the interconnect code to use.

Having most of the clock drivers being regular device drivers allows
us to use the nice things like devm_* functions and dev_err and dev_dbg.
As an extra bonus, this also allows us to develop the clock drivers for
new SoCs as loadable modules initially for cases where we can boot up
the system based on the bootloader configured clocks.

To do this, let's change the core_initcalls to postcore_initcall under
mach-omap2.

Cc: Felipe Balbi <balbi@ti.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap2-restart.c | 2 +-
 arch/arm/mach-omap2/omap_device.c   | 2 +-
 arch/arm/mach-omap2/omap_hwmod.c    | 2 +-
 arch/arm/mach-omap2/serial.c        | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/omap2-restart.c b/arch/arm/mach-omap2/omap2-restart.c
index d937b2e..497269d 100644
--- a/arch/arm/mach-omap2/omap2-restart.c
+++ b/arch/arm/mach-omap2/omap2-restart.c
@@ -62,4 +62,4 @@ static int __init omap2xxx_common_look_up_clks_for_reset(void)
 
 	return 0;
 }
-omap_core_initcall(omap2xxx_common_look_up_clks_for_reset);
+omap_postcore_initcall(omap2xxx_common_look_up_clks_for_reset);
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 72ebc4c..3750ed1 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -869,7 +869,7 @@ static int __init omap_device_init(void)
 	bus_register_notifier(&platform_bus_type, &platform_nb);
 	return 0;
 }
-omap_core_initcall(omap_device_init);
+omap_postcore_initcall(omap_device_init);
 
 /**
  * omap_device_late_idle - idle devices without drivers
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index cc8a987..49d5376 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3307,7 +3307,7 @@ static int __init omap_hwmod_setup_all(void)
 
 	return 0;
 }
-omap_core_initcall(omap_hwmod_setup_all);
+omap_postcore_initcall(omap_hwmod_setup_all);
 
 /**
  * omap_hwmod_enable - enable an omap_hwmod
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 5fb50fe..f164c6b 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -213,7 +213,7 @@ static int __init omap_serial_early_init(void)
 
 	return 0;
 }
-omap_core_initcall(omap_serial_early_init);
+omap_postcore_initcall(omap_serial_early_init);
 
 /**
  * omap_serial_init_port() - initialize single serial port
-- 
2.6.2

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

* [PATCH 2/2] ARM: OMAP2+: Change core_initcall levels to postcore_initcall
@ 2015-11-30 16:26   ` Tony Lindgren
  0 siblings, 0 replies; 18+ messages in thread
From: Tony Lindgren @ 2015-11-30 16:26 UTC (permalink / raw)
  To: linux-arm-kernel

We want to be able to probe a few selected device drivers before hwmod
code populates the clocks in omap_hwmod_setup_all(). This allows us to
convert most of the clock drivers into regular device drivers.

We only need a few minimal clock drivers early for the system timers to
select between the 32KiHz clock and the high frequency oscillator.

With these changes, initializing the clock drivers can be just done at
core_initcall time with something like:

np = of_find_node_by_name(NULL, "plls");
if (np)
	of_platform_populate(np, NULL, NULL, NULL);

And then these clocks will be available for the interconnect code to use.

Having most of the clock drivers being regular device drivers allows
us to use the nice things like devm_* functions and dev_err and dev_dbg.
As an extra bonus, this also allows us to develop the clock drivers for
new SoCs as loadable modules initially for cases where we can boot up
the system based on the bootloader configured clocks.

To do this, let's change the core_initcalls to postcore_initcall under
mach-omap2.

Cc: Felipe Balbi <balbi@ti.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap2-restart.c | 2 +-
 arch/arm/mach-omap2/omap_device.c   | 2 +-
 arch/arm/mach-omap2/omap_hwmod.c    | 2 +-
 arch/arm/mach-omap2/serial.c        | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/omap2-restart.c b/arch/arm/mach-omap2/omap2-restart.c
index d937b2e..497269d 100644
--- a/arch/arm/mach-omap2/omap2-restart.c
+++ b/arch/arm/mach-omap2/omap2-restart.c
@@ -62,4 +62,4 @@ static int __init omap2xxx_common_look_up_clks_for_reset(void)
 
 	return 0;
 }
-omap_core_initcall(omap2xxx_common_look_up_clks_for_reset);
+omap_postcore_initcall(omap2xxx_common_look_up_clks_for_reset);
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 72ebc4c..3750ed1 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -869,7 +869,7 @@ static int __init omap_device_init(void)
 	bus_register_notifier(&platform_bus_type, &platform_nb);
 	return 0;
 }
-omap_core_initcall(omap_device_init);
+omap_postcore_initcall(omap_device_init);
 
 /**
  * omap_device_late_idle - idle devices without drivers
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index cc8a987..49d5376 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3307,7 +3307,7 @@ static int __init omap_hwmod_setup_all(void)
 
 	return 0;
 }
-omap_core_initcall(omap_hwmod_setup_all);
+omap_postcore_initcall(omap_hwmod_setup_all);
 
 /**
  * omap_hwmod_enable - enable an omap_hwmod
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 5fb50fe..f164c6b 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -213,7 +213,7 @@ static int __init omap_serial_early_init(void)
 
 	return 0;
 }
-omap_core_initcall(omap_serial_early_init);
+omap_postcore_initcall(omap_serial_early_init);
 
 /**
  * omap_serial_init_port() - initialize single serial port
-- 
2.6.2

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

* Re: [PATCH 1/2] ARM: OMAP2+: Initialize timers later with late_time_init
  2015-11-30 16:26   ` Tony Lindgren
@ 2015-12-01 13:52     ` Grygorii Strashko
  -1 siblings, 0 replies; 18+ messages in thread
From: Grygorii Strashko @ 2015-12-01 13:52 UTC (permalink / raw)
  To: Tony Lindgren, linux-omap
  Cc: Tero Kristo, Paul Walmsley, Felipe Balbi, linux-arm-kernel

On 11/30/2015 06:26 PM, Tony Lindgren wrote:
> We don't need timers right away and initializing them later gives us few
> nice things like interrupts and kmalloc. As the timers have a dependency
> to the clock framework, we're better off initializing things later rather
> than early if things go wrong. And this allows us to make the mux clock
> driver needed for system timers into early_platform drivers.
> 
> Note that smp_prepare_cpus() will get called later on during the init so
> we just need to local_irq_enable/disable for clocksource_probe().
> 
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Tero Kristo <t-kristo@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>   arch/arm/mach-omap2/timer.c | 46 +++++++++++++++++++++++++++++++++++++++------
>   1 file changed, 40 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index b18ebbe..68bf482 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -478,36 +478,56 @@ static void __init __omap_sync32k_timer_init(int clkev_nr, const char *clkev_src
>   	omap2_gp_clockevent_init(clkev_nr, clkev_src, clkev_prop);
>   
>   	/* Enable the use of clocksource="gp_timer" kernel parameter */
> +	local_irq_disable();
>   	if (use_gptimer_clksrc || gptimer)
>   		omap2_gptimer_clocksource_init(clksrc_nr, clksrc_src,
>   						clksrc_prop);
>   	else
>   		omap2_sync32k_clocksource_init();
> +	local_irq_enable();

So, this will be called now after sched_clock_postinit() and to W/A warnings
you've added local_irq_disable()/local_irq_enable(). Am I right?

Are you sure this is safe?


-- 
regards,
-grygorii

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

* [PATCH 1/2] ARM: OMAP2+: Initialize timers later with late_time_init
@ 2015-12-01 13:52     ` Grygorii Strashko
  0 siblings, 0 replies; 18+ messages in thread
From: Grygorii Strashko @ 2015-12-01 13:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/30/2015 06:26 PM, Tony Lindgren wrote:
> We don't need timers right away and initializing them later gives us few
> nice things like interrupts and kmalloc. As the timers have a dependency
> to the clock framework, we're better off initializing things later rather
> than early if things go wrong. And this allows us to make the mux clock
> driver needed for system timers into early_platform drivers.
> 
> Note that smp_prepare_cpus() will get called later on during the init so
> we just need to local_irq_enable/disable for clocksource_probe().
> 
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Tero Kristo <t-kristo@ti.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>   arch/arm/mach-omap2/timer.c | 46 +++++++++++++++++++++++++++++++++++++++------
>   1 file changed, 40 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index b18ebbe..68bf482 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -478,36 +478,56 @@ static void __init __omap_sync32k_timer_init(int clkev_nr, const char *clkev_src
>   	omap2_gp_clockevent_init(clkev_nr, clkev_src, clkev_prop);
>   
>   	/* Enable the use of clocksource="gp_timer" kernel parameter */
> +	local_irq_disable();
>   	if (use_gptimer_clksrc || gptimer)
>   		omap2_gptimer_clocksource_init(clksrc_nr, clksrc_src,
>   						clksrc_prop);
>   	else
>   		omap2_sync32k_clocksource_init();
> +	local_irq_enable();

So, this will be called now after sched_clock_postinit() and to W/A warnings
you've added local_irq_disable()/local_irq_enable(). Am I right?

Are you sure this is safe?


-- 
regards,
-grygorii

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

* Re: [PATCH 1/2] ARM: OMAP2+: Initialize timers later with late_time_init
  2015-12-01 13:52     ` Grygorii Strashko
@ 2015-12-01 15:47       ` Tony Lindgren
  -1 siblings, 0 replies; 18+ messages in thread
From: Tony Lindgren @ 2015-12-01 15:47 UTC (permalink / raw)
  To: Grygorii Strashko
  Cc: Tero Kristo, Paul Walmsley, linux-omap, Felipe Balbi, linux-arm-kernel

* Grygorii Strashko <grygorii.strashko@ti.com> [151201 05:53]:
> On 11/30/2015 06:26 PM, Tony Lindgren wrote:
> > We don't need timers right away and initializing them later gives us few
> > nice things like interrupts and kmalloc. As the timers have a dependency
> > to the clock framework, we're better off initializing things later rather
> > than early if things go wrong. And this allows us to make the mux clock
> > driver needed for system timers into early_platform drivers.
> > 
> > Note that smp_prepare_cpus() will get called later on during the init so
> > we just need to local_irq_enable/disable for clocksource_probe().
> > 
> > Cc: Felipe Balbi <balbi@ti.com>
> > Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> > Cc: Paul Walmsley <paul@pwsan.com>
> > Cc: Tero Kristo <t-kristo@ti.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> >   arch/arm/mach-omap2/timer.c | 46 +++++++++++++++++++++++++++++++++++++++------
> >   1 file changed, 40 insertions(+), 6 deletions(-)
> > 
> > diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> > index b18ebbe..68bf482 100644
> > --- a/arch/arm/mach-omap2/timer.c
> > +++ b/arch/arm/mach-omap2/timer.c
> > @@ -478,36 +478,56 @@ static void __init __omap_sync32k_timer_init(int clkev_nr, const char *clkev_src
> >   	omap2_gp_clockevent_init(clkev_nr, clkev_src, clkev_prop);
> >   
> >   	/* Enable the use of clocksource="gp_timer" kernel parameter */
> > +	local_irq_disable();
> >   	if (use_gptimer_clksrc || gptimer)
> >   		omap2_gptimer_clocksource_init(clksrc_nr, clksrc_src,
> >   						clksrc_prop);
> >   	else
> >   		omap2_sync32k_clocksource_init();
> > +	local_irq_enable();
> 
> So, this will be called now after sched_clock_postinit() and to W/A warnings
> you've added local_irq_disable()/local_irq_enable(). Am I right?
> 
> Are you sure this is safe?

Hmm good point, update_sched_clock() is never called again and so it's
running on jiffies. We could separate out the sched_clock when the 32k
source or a local timer is used. But that does allow initializing the
gptimer later on. Anyways, clearly this needs more work.

Regards,

Tony

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

* [PATCH 1/2] ARM: OMAP2+: Initialize timers later with late_time_init
@ 2015-12-01 15:47       ` Tony Lindgren
  0 siblings, 0 replies; 18+ messages in thread
From: Tony Lindgren @ 2015-12-01 15:47 UTC (permalink / raw)
  To: linux-arm-kernel

* Grygorii Strashko <grygorii.strashko@ti.com> [151201 05:53]:
> On 11/30/2015 06:26 PM, Tony Lindgren wrote:
> > We don't need timers right away and initializing them later gives us few
> > nice things like interrupts and kmalloc. As the timers have a dependency
> > to the clock framework, we're better off initializing things later rather
> > than early if things go wrong. And this allows us to make the mux clock
> > driver needed for system timers into early_platform drivers.
> > 
> > Note that smp_prepare_cpus() will get called later on during the init so
> > we just need to local_irq_enable/disable for clocksource_probe().
> > 
> > Cc: Felipe Balbi <balbi@ti.com>
> > Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> > Cc: Paul Walmsley <paul@pwsan.com>
> > Cc: Tero Kristo <t-kristo@ti.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> >   arch/arm/mach-omap2/timer.c | 46 +++++++++++++++++++++++++++++++++++++++------
> >   1 file changed, 40 insertions(+), 6 deletions(-)
> > 
> > diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> > index b18ebbe..68bf482 100644
> > --- a/arch/arm/mach-omap2/timer.c
> > +++ b/arch/arm/mach-omap2/timer.c
> > @@ -478,36 +478,56 @@ static void __init __omap_sync32k_timer_init(int clkev_nr, const char *clkev_src
> >   	omap2_gp_clockevent_init(clkev_nr, clkev_src, clkev_prop);
> >   
> >   	/* Enable the use of clocksource="gp_timer" kernel parameter */
> > +	local_irq_disable();
> >   	if (use_gptimer_clksrc || gptimer)
> >   		omap2_gptimer_clocksource_init(clksrc_nr, clksrc_src,
> >   						clksrc_prop);
> >   	else
> >   		omap2_sync32k_clocksource_init();
> > +	local_irq_enable();
> 
> So, this will be called now after sched_clock_postinit() and to W/A warnings
> you've added local_irq_disable()/local_irq_enable(). Am I right?
> 
> Are you sure this is safe?

Hmm good point, update_sched_clock() is never called again and so it's
running on jiffies. We could separate out the sched_clock when the 32k
source or a local timer is used. But that does allow initializing the
gptimer later on. Anyways, clearly this needs more work.

Regards,

Tony

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

* Re: [PATCH 2/2] ARM: OMAP2+: Change core_initcall levels to postcore_initcall
  2015-11-30 16:26   ` Tony Lindgren
@ 2015-12-03 16:00     ` Tony Lindgren
  -1 siblings, 0 replies; 18+ messages in thread
From: Tony Lindgren @ 2015-12-03 16:00 UTC (permalink / raw)
  To: linux-omap
  Cc: Tero Kristo, Paul Walmsley, Grygorii Strashko, Felipe Balbi,
	linux-arm-kernel

* Tony Lindgren <tony@atomide.com> [151130 08:29]:
> We want to be able to probe a few selected device drivers before hwmod
> code populates the clocks in omap_hwmod_setup_all(). This allows us to
> convert most of the clock drivers into regular device drivers.
> 
> We only need a few minimal clock drivers early for the system timers to
> select between the 32KiHz clock and the high frequency oscillator.
> 
> With these changes, initializing the clock drivers can be just done at
> core_initcall time with something like:
> 
> np = of_find_node_by_name(NULL, "plls");
> if (np)
> 	of_platform_populate(np, NULL, NULL, NULL);
> 
> And then these clocks will be available for the interconnect code to use.
> 
> Having most of the clock drivers being regular device drivers allows
> us to use the nice things like devm_* functions and dev_err and dev_dbg.
> As an extra bonus, this also allows us to develop the clock drivers for
> new SoCs as loadable modules initially for cases where we can boot up
> the system based on the bootloader configured clocks.
> 
> To do this, let's change the core_initcalls to postcore_initcall under
> mach-omap2.

FYI I'm applying this one into omap-for-v4.5/soc today, the first patch
in this series needs more work as discussed.

Regards,

Tony

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

* [PATCH 2/2] ARM: OMAP2+: Change core_initcall levels to postcore_initcall
@ 2015-12-03 16:00     ` Tony Lindgren
  0 siblings, 0 replies; 18+ messages in thread
From: Tony Lindgren @ 2015-12-03 16:00 UTC (permalink / raw)
  To: linux-arm-kernel

* Tony Lindgren <tony@atomide.com> [151130 08:29]:
> We want to be able to probe a few selected device drivers before hwmod
> code populates the clocks in omap_hwmod_setup_all(). This allows us to
> convert most of the clock drivers into regular device drivers.
> 
> We only need a few minimal clock drivers early for the system timers to
> select between the 32KiHz clock and the high frequency oscillator.
> 
> With these changes, initializing the clock drivers can be just done at
> core_initcall time with something like:
> 
> np = of_find_node_by_name(NULL, "plls");
> if (np)
> 	of_platform_populate(np, NULL, NULL, NULL);
> 
> And then these clocks will be available for the interconnect code to use.
> 
> Having most of the clock drivers being regular device drivers allows
> us to use the nice things like devm_* functions and dev_err and dev_dbg.
> As an extra bonus, this also allows us to develop the clock drivers for
> new SoCs as loadable modules initially for cases where we can boot up
> the system based on the bootloader configured clocks.
> 
> To do this, let's change the core_initcalls to postcore_initcall under
> mach-omap2.

FYI I'm applying this one into omap-for-v4.5/soc today, the first patch
in this series needs more work as discussed.

Regards,

Tony

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

* Re: [PATCH 2/2] ARM: OMAP2+: Change core_initcall levels to postcore_initcall
  2015-12-03 16:00     ` Tony Lindgren
@ 2015-12-03 16:34       ` Grygorii Strashko
  -1 siblings, 0 replies; 18+ messages in thread
From: Grygorii Strashko @ 2015-12-03 16:34 UTC (permalink / raw)
  To: Tony Lindgren, linux-omap
  Cc: Tero Kristo, Paul Walmsley, Felipe Balbi, linux-arm-kernel

On 12/03/2015 06:00 PM, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [151130 08:29]:
>> We want to be able to probe a few selected device drivers before hwmod
>> code populates the clocks in omap_hwmod_setup_all(). This allows us to
>> convert most of the clock drivers into regular device drivers.

if understand things right, ti clks now will be populated and initialized
from 
__omap_sync32k_timer_init
 - omap_clk_init()
   - .. 
   - of_clk_init()
   - ..
   - omap_clk_soc_init()

and __omap_sync32k_timer_init(), in turn, will be called from:
arch/arm/kernel/time.c
 - time_init()
	machine_desc->init_time();
(without your patch 1).

So, I don't see real dependency here between clk initialization and hwmods :(


>>
>> We only need a few minimal clock drivers early for the system timers to
>> select between the 32KiHz clock and the high frequency oscillator.
>>
>> With these changes, initializing the clock drivers can be just done at
>> core_initcall time with something like:
>>
>> np = of_find_node_by_name(NULL, "plls");
>> if (np)
>> 	of_platform_populate(np, NULL, NULL, NULL);
>>
>> And then these clocks will be available for the interconnect code to use.
>>
>> Having most of the clock drivers being regular device drivers allows
>> us to use the nice things like devm_* functions and dev_err and dev_dbg.
>> As an extra bonus, this also allows us to develop the clock drivers for
>> new SoCs as loadable modules initially for cases where we can boot up
>> the system based on the bootloader configured clocks.
>>
>> To do this, let's change the core_initcalls to postcore_initcall under
>> mach-omap2.
> 
> FYI I'm applying this one into omap-for-v4.5/soc today, the first patch
> in this series needs more work as discussed.
> 

To be honest I don't see how this will help to convert ti clks in regular
devices right now.
Wouldn't it be better to move forward with this patch together with future patches?
So it will be clear what benefits will this approach provide.

In other words, I think it should be a part of some bigger series.

-- 
regards,
-grygorii

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

* [PATCH 2/2] ARM: OMAP2+: Change core_initcall levels to postcore_initcall
@ 2015-12-03 16:34       ` Grygorii Strashko
  0 siblings, 0 replies; 18+ messages in thread
From: Grygorii Strashko @ 2015-12-03 16:34 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/03/2015 06:00 PM, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [151130 08:29]:
>> We want to be able to probe a few selected device drivers before hwmod
>> code populates the clocks in omap_hwmod_setup_all(). This allows us to
>> convert most of the clock drivers into regular device drivers.

if understand things right, ti clks now will be populated and initialized
from 
__omap_sync32k_timer_init
 - omap_clk_init()
   - .. 
   - of_clk_init()
   - ..
   - omap_clk_soc_init()

and __omap_sync32k_timer_init(), in turn, will be called from:
arch/arm/kernel/time.c
 - time_init()
	machine_desc->init_time();
(without your patch 1).

So, I don't see real dependency here between clk initialization and hwmods :(


>>
>> We only need a few minimal clock drivers early for the system timers to
>> select between the 32KiHz clock and the high frequency oscillator.
>>
>> With these changes, initializing the clock drivers can be just done at
>> core_initcall time with something like:
>>
>> np = of_find_node_by_name(NULL, "plls");
>> if (np)
>> 	of_platform_populate(np, NULL, NULL, NULL);
>>
>> And then these clocks will be available for the interconnect code to use.
>>
>> Having most of the clock drivers being regular device drivers allows
>> us to use the nice things like devm_* functions and dev_err and dev_dbg.
>> As an extra bonus, this also allows us to develop the clock drivers for
>> new SoCs as loadable modules initially for cases where we can boot up
>> the system based on the bootloader configured clocks.
>>
>> To do this, let's change the core_initcalls to postcore_initcall under
>> mach-omap2.
> 
> FYI I'm applying this one into omap-for-v4.5/soc today, the first patch
> in this series needs more work as discussed.
> 

To be honest I don't see how this will help to convert ti clks in regular
devices right now.
Wouldn't it be better to move forward with this patch together with future patches?
So it will be clear what benefits will this approach provide.

In other words, I think it should be a part of some bigger series.

-- 
regards,
-grygorii

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

* Re: [PATCH 2/2] ARM: OMAP2+: Change core_initcall levels to postcore_initcall
  2015-12-03 16:34       ` Grygorii Strashko
@ 2015-12-03 16:41         ` Tony Lindgren
  -1 siblings, 0 replies; 18+ messages in thread
From: Tony Lindgren @ 2015-12-03 16:41 UTC (permalink / raw)
  To: Grygorii Strashko
  Cc: Tero Kristo, Paul Walmsley, linux-omap, Felipe Balbi, linux-arm-kernel

* Grygorii Strashko <grygorii.strashko@ti.com> [151203 08:35]:
> On 12/03/2015 06:00 PM, Tony Lindgren wrote:
> > * Tony Lindgren <tony@atomide.com> [151130 08:29]:
> >> We want to be able to probe a few selected device drivers before hwmod
> >> code populates the clocks in omap_hwmod_setup_all(). This allows us to
> >> convert most of the clock drivers into regular device drivers.
> 
> if understand things right, ti clks now will be populated and initialized
> from 
> __omap_sync32k_timer_init
>  - omap_clk_init()
>    - .. 
>    - of_clk_init()
>    - ..
>    - omap_clk_soc_init()
> 
> and __omap_sync32k_timer_init(), in turn, will be called from:
> arch/arm/kernel/time.c
>  - time_init()
> 	machine_desc->init_time();
> (without your patch 1).

Yes that's the current approach, but we can do better. We only need the following
clocks for system timers at that point:

- mux clocks to select between the 32k and hf oscillator source

- clkctrl driver to gate the ocp clock

All the other clocks can be initialized at core_initcall time with this change.

> So, I don't see real dependency here between clk initialization and hwmods :(

You don't because it's only implemented so far for the dm814x ADPLL clock :)

That I posted as "[PATCH 0/2] Clock driver for dm814x ADPLL". Note how it's
just a regular device driver that also works as loadable module on boards that
have all the necessary clocks enabled already by the bootloader.

Regards,

Tony

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

* [PATCH 2/2] ARM: OMAP2+: Change core_initcall levels to postcore_initcall
@ 2015-12-03 16:41         ` Tony Lindgren
  0 siblings, 0 replies; 18+ messages in thread
From: Tony Lindgren @ 2015-12-03 16:41 UTC (permalink / raw)
  To: linux-arm-kernel

* Grygorii Strashko <grygorii.strashko@ti.com> [151203 08:35]:
> On 12/03/2015 06:00 PM, Tony Lindgren wrote:
> > * Tony Lindgren <tony@atomide.com> [151130 08:29]:
> >> We want to be able to probe a few selected device drivers before hwmod
> >> code populates the clocks in omap_hwmod_setup_all(). This allows us to
> >> convert most of the clock drivers into regular device drivers.
> 
> if understand things right, ti clks now will be populated and initialized
> from 
> __omap_sync32k_timer_init
>  - omap_clk_init()
>    - .. 
>    - of_clk_init()
>    - ..
>    - omap_clk_soc_init()
> 
> and __omap_sync32k_timer_init(), in turn, will be called from:
> arch/arm/kernel/time.c
>  - time_init()
> 	machine_desc->init_time();
> (without your patch 1).

Yes that's the current approach, but we can do better. We only need the following
clocks for system timers at that point:

- mux clocks to select between the 32k and hf oscillator source

- clkctrl driver to gate the ocp clock

All the other clocks can be initialized at core_initcall time with this change.

> So, I don't see real dependency here between clk initialization and hwmods :(

You don't because it's only implemented so far for the dm814x ADPLL clock :)

That I posted as "[PATCH 0/2] Clock driver for dm814x ADPLL". Note how it's
just a regular device driver that also works as loadable module on boards that
have all the necessary clocks enabled already by the bootloader.

Regards,

Tony

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

* Re: [PATCH 2/2] ARM: OMAP2+: Change core_initcall levels to postcore_initcall
  2015-12-03 16:41         ` Tony Lindgren
@ 2015-12-03 18:08           ` Grygorii Strashko
  -1 siblings, 0 replies; 18+ messages in thread
From: Grygorii Strashko @ 2015-12-03 18:08 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Tero Kristo, Paul Walmsley, linux-omap, Felipe Balbi, linux-arm-kernel

On 12/03/2015 06:41 PM, Tony Lindgren wrote:
> * Grygorii Strashko <grygorii.strashko@ti.com> [151203 08:35]:
>> On 12/03/2015 06:00 PM, Tony Lindgren wrote:
>>> * Tony Lindgren <tony@atomide.com> [151130 08:29]:
>>>> We want to be able to probe a few selected device drivers before hwmod
>>>> code populates the clocks in omap_hwmod_setup_all(). This allows us to
>>>> convert most of the clock drivers into regular device drivers.
>>
>> if understand things right, ti clks now will be populated and initialized
>> from
>> __omap_sync32k_timer_init
>>   - omap_clk_init()
>>     - ..
>>     - of_clk_init()
>>     - ..
>>     - omap_clk_soc_init()
>>
>> and __omap_sync32k_timer_init(), in turn, will be called from:
>> arch/arm/kernel/time.c
>>   - time_init()
>> 	machine_desc->init_time();
>> (without your patch 1).
> 
> Yes that's the current approach, but we can do better. We only need the following
> clocks for system timers at that point:
> 
> - mux clocks to select between the 32k and hf oscillator source
> 
> - clkctrl driver to gate the ocp clock
> 
> All the other clocks can be initialized at core_initcall time with this change.
> 
>> So, I don't see real dependency here between clk initialization and hwmods :(
> 
> You don't because it's only implemented so far for the dm814x ADPLL clock :)
> 
> That I posted as "[PATCH 0/2] Clock driver for dm814x ADPLL". Note how it's
> just a regular device driver that also works as loadable module on boards that
> have all the necessary clocks enabled already by the bootloader.
> 

Ah. Thanks. I see it now.

-- 
regards,
-grygorii

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

* [PATCH 2/2] ARM: OMAP2+: Change core_initcall levels to postcore_initcall
@ 2015-12-03 18:08           ` Grygorii Strashko
  0 siblings, 0 replies; 18+ messages in thread
From: Grygorii Strashko @ 2015-12-03 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/03/2015 06:41 PM, Tony Lindgren wrote:
> * Grygorii Strashko <grygorii.strashko@ti.com> [151203 08:35]:
>> On 12/03/2015 06:00 PM, Tony Lindgren wrote:
>>> * Tony Lindgren <tony@atomide.com> [151130 08:29]:
>>>> We want to be able to probe a few selected device drivers before hwmod
>>>> code populates the clocks in omap_hwmod_setup_all(). This allows us to
>>>> convert most of the clock drivers into regular device drivers.
>>
>> if understand things right, ti clks now will be populated and initialized
>> from
>> __omap_sync32k_timer_init
>>   - omap_clk_init()
>>     - ..
>>     - of_clk_init()
>>     - ..
>>     - omap_clk_soc_init()
>>
>> and __omap_sync32k_timer_init(), in turn, will be called from:
>> arch/arm/kernel/time.c
>>   - time_init()
>> 	machine_desc->init_time();
>> (without your patch 1).
> 
> Yes that's the current approach, but we can do better. We only need the following
> clocks for system timers at that point:
> 
> - mux clocks to select between the 32k and hf oscillator source
> 
> - clkctrl driver to gate the ocp clock
> 
> All the other clocks can be initialized at core_initcall time with this change.
> 
>> So, I don't see real dependency here between clk initialization and hwmods :(
> 
> You don't because it's only implemented so far for the dm814x ADPLL clock :)
> 
> That I posted as "[PATCH 0/2] Clock driver for dm814x ADPLL". Note how it's
> just a regular device driver that also works as loadable module on boards that
> have all the necessary clocks enabled already by the bootloader.
> 

Ah. Thanks. I see it now.

-- 
regards,
-grygorii

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

end of thread, other threads:[~2015-12-03 18:08 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 16:26 [PATCH 0/2] Initcall changes for omaps Tony Lindgren
2015-11-30 16:26 ` Tony Lindgren
2015-11-30 16:26 ` [PATCH 1/2] ARM: OMAP2+: Initialize timers later with late_time_init Tony Lindgren
2015-11-30 16:26   ` Tony Lindgren
2015-12-01 13:52   ` Grygorii Strashko
2015-12-01 13:52     ` Grygorii Strashko
2015-12-01 15:47     ` Tony Lindgren
2015-12-01 15:47       ` Tony Lindgren
2015-11-30 16:26 ` [PATCH 2/2] ARM: OMAP2+: Change core_initcall levels to postcore_initcall Tony Lindgren
2015-11-30 16:26   ` Tony Lindgren
2015-12-03 16:00   ` Tony Lindgren
2015-12-03 16:00     ` Tony Lindgren
2015-12-03 16:34     ` Grygorii Strashko
2015-12-03 16:34       ` Grygorii Strashko
2015-12-03 16:41       ` Tony Lindgren
2015-12-03 16:41         ` Tony Lindgren
2015-12-03 18:08         ` Grygorii Strashko
2015-12-03 18:08           ` Grygorii Strashko

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.