ARM: OMAP: Static deps, fiq, omap-smp cleanup
Subsystems (5)
cover ARM: OMAP: Static deps, fiq, omap-smp cleanup
This series tries to clean-up the some of the areas like OMAP4 static deps, FIQ usage in OMAP code, SMP code. The patches are self explanatory and quite independent but since I had them mantained in a branch, am sending them together not to loose track of them.
They have been tested on OMAP4 and OMAP3 devices for boot, suspend and CPUIDLE. OMAP1 patch isn't tested but I don't expect it to cause any breakage since it is just cleaning up the bogus fiq use.
Santosh Shilimkar (8):
ARM: OMAP1: PM: Remove bogus fiq_[enable/disable] tuple
ARM: OMAP2+: PM: Remove bogus fiq_[enable/disable] tuple
ARM: OMAP4+: Remove the un-necessary cache flush from hotplug code
ARM: OMAP4+: Remove un-necessary cacheflush in secondary CPU boot
path
ARM: OMAP4+: Remove out of placed smp_wmb() in secondary wakeup code
ARM: OMAP4+: Move the CPU wakeup prepare code under
smp_prepare_cpus()
ARM: OMAP4: PM: Remove L4 wakeup depedency with MPU since errata fix
exist now
ARM: OMAP4: PM: Now remove L4 per clockdomain static depedency with
MPU
Tero Kristo (1):
ARM: OMAP4+: Use common scratchpad SAR RAM offsets for all
architectures
arch/arm/mach-omap1/pm.c | 6 ---- arch/arm/mach-omap2/cpuidle34xx.c | 4 --- arch/arm/mach-omap2/cpuidle44xx.c | 7 ---- arch/arm/mach-omap2/omap-hotplug.c | 6 ---- arch/arm/mach-omap2/omap-smp.c | 57 +++++++++++--------------------- arch/arm/mach-omap2/omap4-sar-layout.h | 14 ++++---- arch/arm/mach-omap2/pm24xx.c | 11 ++---- arch/arm/mach-omap2/pm34xx.c | 9 +---- arch/arm/mach-omap2/pm44xx.c | 20 +++-------- 9 files changed, 35 insertions(+), 99 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/9 ARM: OMAP4+: Use common scratchpad SAR RAM offsets for all architectures
From: Tero Kristo <[email protected]>
Simplifies code and also allows the re-use as is on OMAP5 devices.
--- arch/arm/mach-omap2/omap4-sar-layout.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/omap4-sar-layout.h +7 -7
@@ -20,13 +20,13 @@#define SAR_BANK4_OFFSET 0x3000/* Scratch pad memory offsets from SAR_BANK1 */ -#define SCU_OFFSET0 0xd00 -#define SCU_OFFSET1 0xd04 -#define OMAP_TYPE_OFFSET 0xd10 -#define L2X0_SAVE_OFFSET0 0xd14 -#define L2X0_SAVE_OFFSET1 0xd18 -#define L2X0_AUXCTRL_OFFSET 0xd1c -#define L2X0_PREFETCH_CTRL_OFFSET 0xd20 +#define SCU_OFFSET0 0xfe4 +#define SCU_OFFSET1 0xfe8 +#define OMAP_TYPE_OFFSET 0xfec +#define L2X0_SAVE_OFFSET0 0xff0 +#define L2X0_SAVE_OFFSET1 0xff4 +#define L2X0_AUXCTRL_OFFSET 0xff8 +#define L2X0_PREFETCH_CTRL_OFFSET 0xffc/* CPUx Wakeup Non-Secure Physical Address offsets in SAR_BANK3 */ #define CPU0_WAKEUP_NS_PA_ADDR_OFFSET 0xa04
Signature · 1 line
1.7.9.5
PATCH 1/9 ARM: OMAP4+: Use common scratchpad SAR RAM offsets for all architectures
Quoted 3 lines · Santosh Shilimkar
From: Tero Kristo <[email protected]>
Simplifies code and also allows the re-use as is on OMAP5 devices.
nit: changelog here is rather weak. It claims "simplifies code" but it's not obvious from the patch how changing a few #defines does that.
Kevin
Quoted 31 lines
Signed-off-by Tero Kristo <[email protected]>Signed-off-by Santosh Shilimkar <[email protected]>--- arch/arm/mach-omap2/omap4-sar-layout.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)arch/arm/mach-omap2/omap4-sar-layout.h +7
-7@@ -20,13 +20,13 @@#define SAR_BANK4_OFFSET 0x3000/* Scratch pad memory offsets from SAR_BANK1 */ -#define SCU_OFFSET0 0xd00 -#define SCU_OFFSET1 0xd04 -#define OMAP_TYPE_OFFSET 0xd10 -#define L2X0_SAVE_OFFSET0 0xd14 -#define L2X0_SAVE_OFFSET1 0xd18 -#define L2X0_AUXCTRL_OFFSET 0xd1c -#define L2X0_PREFETCH_CTRL_OFFSET 0xd20 +#define SCU_OFFSET0 0xfe4 +#define SCU_OFFSET1 0xfe8 +#define OMAP_TYPE_OFFSET 0xfec +#define L2X0_SAVE_OFFSET0 0xff0 +#define L2X0_SAVE_OFFSET1 0xff4 +#define L2X0_AUXCTRL_OFFSET 0xff8 +#define L2X0_PREFETCH_CTRL_OFFSET 0xffc/* CPUx Wakeup Non-Secure Physical Address offsets in SAR_BANK3 */ #define CPU0_WAKEUP_NS_PA_ADDR_OFFSET 0xa04
PATCH 1/9 ARM: OMAP4+: Use common scratchpad SAR RAM offsets for all architectures
Quoted 9 lines · Kevin Hilman
Quoted 3 lines · Santosh Shilimkar
From: Tero Kristo <[email protected]>
Simplifies code and also allows the re-use as is on OMAP5 devices.
nit: changelog here is rather weak. It claims "simplifies code" but it's not obvious from the patch how changing a few #defines does that.
I agree. Basically the offset are chosen such a way that they can work on OMAP4 and OMAP5 instead of having two separate sets. Will expand the changelog to make it clear.
Regards,
Santosh
Tony Lindgren
maintainerPATCH 1/9 ARM: OMAP4+: Use common scratchpad SAR RAM offsets for all architectures
Quoted 5 lines · Santosh Shilimkar
Quoted 4 lines · Kevin Hilman
Quoted 2 lines · Santosh Shilimkar
From: Tero Kristo <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Simplifies code and also allows the re-use as is on OMAP5 devices.
nit: changelog here is rather weak. It claims "simplifies code" but it's not obvious from the patch how changing a few #defines does that.
I agree. Basically the offset are chosen such a way that they can work on OMAP4 and OMAP5 instead of having two separate sets. Will expand the changelog to make it clear.
You might want to mention also that the offsets are only used by the kernel to save and restore registers from so people don't think those are hardare registers and that the patch might break some things.
Regards,
Tony
PATCH 1/9 ARM: OMAP4+: Use common scratchpad SAR RAM offsets for all architectures
Quoted 11 lines · Tony Lindgren
Quoted 10 lines · Santosh Shilimkar
Quoted 9 lines · Kevin Hilman
Quoted 3 lines · Santosh Shilimkar
From: Tero Kristo <[email protected]>
Simplifies code and also allows the re-use as is on OMAP5 devices.
nit: changelog here is rather weak. It claims "simplifies code" but it's not obvious from the patch how changing a few #defines does that.
Quoted 9 lines
Quoted 3 lines
I agree. Basically the offset are chosen such a way that they can work on OMAP4 and OMAP5 instead of having two separate sets. Will expand the changelog to make it clear.
You might want to mention also that the offsets are only used by the kernel to save and restore registers from so people don't think those are hardare registers and that the patch might break some things.
Yeah. Will mention that.
Regards,
Santosh
PATCH 1/9 ARM: OMAP4+: Use common scratchpad SAR RAM offsets for all architectures
Quoted 16 lines · Santosh Shilimkar
Quoted 15 lines · Tony Lindgren
Quoted 13 lines · Santosh Shilimkar
Quoted 9 lines · Kevin Hilman
Quoted 3 lines · Santosh Shilimkar
From: Tero Kristo <[email protected]>
Simplifies code and also allows the re-use as is on OMAP5 devices.
nit: changelog here is rather weak. It claims "simplifies code" but it's not obvious from the patch how changing a few #defines does that.
I agree. Basically the offset are chosen such a way that they can work on OMAP4 and OMAP5 instead of having two separate sets. Will expand the changelog to make it clear.
Quoted 7 lines
Quoted 5 lines
You might want to mention also that the offsets are only used by the kernel to save and restore registers from so people don't think those are hardare registers and that the patch might break some things.
Yeah. Will mention that.
For record, patch with updated changelog end of email.
Regards,
Santosh
Quoted 1 line
From
f98d5fe8079cc4830e4ce22585055822119da5c8Mon Sep 17 00:00:00 2001
From: Tero Kristo <[email protected]>
Date: Wed, 6 Feb 2013 18:39:20 +0530
Subject: [PATCH v2 1/9] ARM: OMAP4+: Use common scratchpad SAR RAM offsets
for all architectures
Choose the common scratch pad offsets, so that same offsets can work for OMAP4 and OMAP5 devices. It simplifies code and also allows the re-use as is on OMAP5 devices. Note that these offsets are used by low power code for various power state management. They are not hardware register offsets.
--- arch/arm/mach-omap2/omap4-sar-layout.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/omap4-sar-layout.h +7 -7
@@ -20,13 +20,13 @@#define SAR_BANK4_OFFSET 0x3000/* Scratch pad memory offsets from SAR_BANK1 */ -#define SCU_OFFSET0 0xd00 -#define SCU_OFFSET1 0xd04 -#define OMAP_TYPE_OFFSET 0xd10 -#define L2X0_SAVE_OFFSET0 0xd14 -#define L2X0_SAVE_OFFSET1 0xd18 -#define L2X0_AUXCTRL_OFFSET 0xd1c -#define L2X0_PREFETCH_CTRL_OFFSET 0xd20 +#define SCU_OFFSET0 0xfe4 +#define SCU_OFFSET1 0xfe8 +#define OMAP_TYPE_OFFSET 0xfec +#define L2X0_SAVE_OFFSET0 0xff0 +#define L2X0_SAVE_OFFSET1 0xff4 +#define L2X0_AUXCTRL_OFFSET 0xff8 +#define L2X0_PREFETCH_CTRL_OFFSET 0xffc/* CPUx Wakeup Non-Secure Physical Address offsets in SAR_BANK3 */ #define CPU0_WAKEUP_NS_PA_ADDR_OFFSET 0xa04
Signature · 1 line
1.7.9.5
PATCH 2/9 ARM: OMAP1: PM: Remove bogus fiq_[enable/disable] tuple
In reply to Santosh ShilimkarOn OMAP platform, FIQ is reserved for secure environment only. If at all the FIQ needs to be disabled, it involves going through security API call. Hence the local_fiq_[enable/disable]() in the OMAP code is bogus.
So just get rid of it.
--- arch/arm/mach-omap1/pm.c | 6 ------ 1 file changed, 6 deletions(-)
arch/arm/mach-omap1/pm.c +0 -6
@@ -111,8 +111,6 @@ void omap1_pm_idle(void)__u32 use_idlect1 = arm_idlect1_mask;int do_sleep =0 ; -local_fiq_disable (); -#if defined(CONFIG_OMAP_MPU_TIMER ) && !defined(CONFIG_OMAP_DM_TIMER )#warning Enable 32kHz OS timer in order to allow sleep states in idle use_idlect1 = use_idlect1 & ~(1 <<9 );
@@ -158,8 +156,6 @@ void omap1_pm_idle(void) }omap_sram_suspend (omap_readl (ARM_IDLECT1 ),omap_readl (ARM_IDLECT2 )); - -local_fiq_enable (); }/*
@@ -235,7 +231,6 @@ void omap1_pm_suspend(void)*/ local_irq_disable (); -local_fiq_disable ();/* * Step 2: save registers
@@ -414,7 +409,6 @@ void omap1_pm_suspend(void)*/ local_irq_enable (); -local_fiq_enable ();omap_serial_wake_trigger (0 );
Signature · 1 line
1.7.9.5
Tony Lindgren
maintainerPATCH 2/9 ARM: OMAP1: PM: Remove bogus fiq_[enable/disable] tuple
Hi,
Quoted 5 lines · Santosh Shilimkar
On OMAP platform, FIQ is reserved for secure environment only. If at all the FIQ needs to be disabled, it involves going through security API call. Hence the local_fiq_[enable/disable]() in the OMAP code is bogus.
So just get rid of it.
This is not true for all omaps, needs to be checked carefully at what point it was made HS omap only. We have at least mach-omap1//ams-delta-fiq.c that's being used.
Regards,
Tony
PATCH 2/9 ARM: OMAP1: PM: Remove bogus fiq_[enable/disable] tuple
Quoted 7 lines · Tony Lindgren
Hi,
Quoted 4 lines · Santosh Shilimkar
On OMAP platform, FIQ is reserved for secure environment only. If at all the FIQ needs to be disabled, it involves going through security API call. Hence the local_fiq_[enable/disable]() in the OMAP code is bogus.
Quoted 6 lines
Quoted 1 line
So just get rid of it.
This is not true for all omaps, needs to be checked carefully at what point it was made HS omap only. We have at least
mach-omap1//ams-delta-fiq.cthat's being used.
This is true for all OMAP2 and onward devices. I assumed it was the case for OMAP1 as well but that doesn't seems to be the case. Sorry I didn't look at OMAP1 code carefully.
So this patch can be dropped then.
Regards
Santosh
PATCH 3/9 ARM: OMAP2+: PM: Remove bogus fiq_[enable/disable] tuple
In reply to Santosh ShilimkarOn OMAP platform, FIQ is reserved for secure environment only. If at all the FIQ needs to be disabled, it involves going through security API call. Hence the local_fiq_[enable/disable]() in the OMAP code is bogus.
So just get rid of it.
--- arch/arm/mach-omap2/cpuidle34xx.c | 4 ---- arch/arm/mach-omap2/cpuidle44xx.c | 7 ------- arch/arm/mach-omap2/pm24xx.c | 11 +++-------- arch/arm/mach-omap2/pm34xx.c | 9 +-------- arch/arm/mach-omap2/pm44xx.c | 4 ---- 5 files changed, 4 insertions(+), 31 deletions(-)
arch/arm/mach-omap2/cpuidle34xx.c +0 -4
@@ -82,8 +82,6 @@ static int __omap3_enter_idle(struct cpuidle_device *dev,struct omap3_idle_statedata *cx = &omap3_idle_data[index];u32 mpu_state = cx->mpu_state, core_state = cx->core_state; -local_fiq_disable (); -pwrdm_set_next_pwrst (mpu_pd, mpu_state);pwrdm_set_next_pwrst (core_pd, core_state);
@@ -121,8 +119,6 @@ static int __omap3_enter_idle(struct cpuidle_device *dev, return_sleep_time: -local_fiq_enable (); -return index; }
arch/arm/mach-omap2/cpuidle44xx.c +0 -7
@@ -70,10 +70,7 @@ static int omap4_enter_idle_simple(struct cpuidle_device *dev,struct cpuidle_driver *drv, int index) { -local_fiq_disable ();omap_do_wfi (); -local_fiq_enable (); -return index; }
@@ -84,8 +81,6 @@ static int omap4_enter_idle_coupled(struct cpuidle_device *dev,struct omap4_idle_statedata *cx = &omap4_idle_data[index];int cpu_id =smp_processor_id (); -local_fiq_disable (); -/* * CPU0 has to wait and stay ON until CPU1 is OFF state. * This is necessary to honour hardware recommondation
@@ -158,8 +153,6 @@ fail:cpuidle_coupled_parallel_barrier (dev, &abort_barrier); cpu_done[dev->cpu] = false; -local_fiq_enable (); -return index; }
arch/arm/mach-omap2/pm24xx.c +3 -8
@@ -213,22 +213,17 @@ static int omap2_can_sleep(void)static void omap2_pm_idle (void ) { -local_fiq_disable (); -if (!omap2_can_sleep ()) {if (omap_irq_pending ()) - goto out; +return ;omap2_enter_mpu_retention (); - goto out; +return ; }if (omap_irq_pending ()) - goto out; +return ;omap2_enter_full_retention (); - -out: -local_fiq_enable (); }static void __init prcm_setup_regs (void )
arch/arm/mach-omap2/pm34xx.c +1 -8
@@ -346,10 +346,8 @@ void omap_sram_idle(void)static void omap3_pm_idle (void ) { -local_fiq_disable (); -if (omap_irq_pending ()) - goto out; +return ;trace_power_start (POWER_CSTATE ,1 ,smp_processor_id ());trace_cpu_idle (1 ,smp_processor_id ());
@@ -358,9 +356,6 @@ static void omap3_pm_idle(void)trace_power_end (smp_processor_id ());trace_cpu_idle (PWR_EVENT_EXIT ,smp_processor_id ()); - -out: -local_fiq_enable (); }#ifdef CONFIG_SUSPEND
@@ -759,14 +754,12 @@ int __init omap3_pm_init(void)pr_err ("Memory allocation failed when allocating for secure sram context\n" );local_irq_disable (); -local_fiq_disable ();omap_dma_global_context_save ();omap3_save_secure_ram_context ();omap_dma_global_context_restore ();local_irq_enable (); -local_fiq_enable (); }omap3_save_scratchpad_contents ();
arch/arm/mach-omap2/pm44xx.c +0 -4
@@ -121,11 +121,7 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)*/ static void omap_default_idle (void ) { -local_fiq_disable (); -omap_do_wfi (); - -local_fiq_enable (); }/**
Signature · 1 line
1.7.9.5
PATCH 3/9 ARM: OMAP2+: PM: Remove bogus fiq_[enable/disable] tuple
Quoted 5 lines · Santosh Shilimkar
On OMAP platform, FIQ is reserved for secure environment only. If at all the FIQ needs to be disabled, it involves going through security API call. Hence the local_fiq_[enable/disable]() in the OMAP code is bogus.
So just get rid of it.
What about GP devices?
Kevin
Quoted 151 lines
Signed-off-by Santosh Shilimkar <[email protected]>--- arch/arm/mach-omap2/cpuidle34xx.c | 4 ---- arch/arm/mach-omap2/cpuidle44xx.c | 7 ------- arch/arm/mach-omap2/pm24xx.c | 11 +++-------- arch/arm/mach-omap2/pm34xx.c | 9 +-------- arch/arm/mach-omap2/pm44xx.c | 4 ---- 5 files changed, 4 insertions(+), 31 deletions(-)arch/arm/mach-omap2/cpuidle34xx.c +0
-4@@ -82,8 +82,6 @@ static int __omap3_enter_idle(struct cpuidle_device *dev,struct omap3_idle_statedata *cx = &omap3_idle_data[index];u32 mpu_state = cx->mpu_state, core_state = cx->core_state; -local_fiq_disable (); -pwrdm_set_next_pwrst (mpu_pd, mpu_state);pwrdm_set_next_pwrst (core_pd, core_state);@@ -121,8 +119,6 @@ static int __omap3_enter_idle(struct cpuidle_device *dev, return_sleep_time: -local_fiq_enable (); -return index; }arch/arm/mach-omap2/cpuidle44xx.c +0
-7@@ -70,10 +70,7 @@ static int omap4_enter_idle_simple(struct cpuidle_device *dev,struct cpuidle_driver *drv, int index) { -local_fiq_disable ();omap_do_wfi (); -local_fiq_enable (); -return index; }@@ -84,8 +81,6 @@ static int omap4_enter_idle_coupled(struct cpuidle_device *dev,struct omap4_idle_statedata *cx = &omap4_idle_data[index];int cpu_id =smp_processor_id (); -local_fiq_disable (); -/* * CPU0 has to wait and stay ON until CPU1 is OFF state. * This is necessary to honour hardware recommondation @@ -158,8 +153,6 @@ fail:cpuidle_coupled_parallel_barrier (dev, &abort_barrier); cpu_done[dev->cpu] = false; -local_fiq_enable (); -return index; }arch/arm/mach-omap2/pm24xx.c +3
-8@@ -213,22 +213,17 @@ static int omap2_can_sleep(void)static void omap2_pm_idle (void ) { -local_fiq_disable (); -if (!omap2_can_sleep ()) {if (omap_irq_pending ()) - goto out; +return ;omap2_enter_mpu_retention (); - goto out; +return ; }if (omap_irq_pending ()) - goto out; +return ;omap2_enter_full_retention (); - -out: -local_fiq_enable (); }static void __init prcm_setup_regs (void )arch/arm/mach-omap2/pm34xx.c +1
-8@@ -346,10 +346,8 @@ void omap_sram_idle(void)static void omap3_pm_idle (void ) { -local_fiq_disable (); -if (omap_irq_pending ()) - goto out; +return ;trace_power_start (POWER_CSTATE ,1 ,smp_processor_id ());trace_cpu_idle (1 ,smp_processor_id ());@@ -358,9 +356,6 @@ static void omap3_pm_idle(void)trace_power_end (smp_processor_id ());trace_cpu_idle (PWR_EVENT_EXIT ,smp_processor_id ()); - -out: -local_fiq_enable (); }#ifdef CONFIG_SUSPEND @@ -759,14 +754,12 @@ int __init omap3_pm_init(void)pr_err ("Memory allocation failed when allocating for secure sram context\n" );local_irq_disable (); -local_fiq_disable ();omap_dma_global_context_save ();omap3_save_secure_ram_context ();omap_dma_global_context_restore ();local_irq_enable (); -local_fiq_enable (); }omap3_save_scratchpad_contents ();arch/arm/mach-omap2/pm44xx.c +0
-4@@ -121,11 +121,7 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)*/ static void omap_default_idle (void ) { -local_fiq_disable (); -omap_do_wfi (); - -local_fiq_enable (); }/**
PATCH 3/9 ARM: OMAP2+: PM: Remove bogus fiq_[enable/disable] tuple
Quoted 10 lines · Kevin Hilman
Quoted 5 lines · Santosh Shilimkar
On OMAP platform, FIQ is reserved for secure environment only. If at all the FIQ needs to be disabled, it involves going through security API call. Hence the local_fiq_[enable/disable]() in the OMAP code is bogus.
So just get rid of it.
What about GP devices?
On GP devices as well FIQ isn't available for non-secure software since its marked secure only in ROM initialization. There has been heavy debate on this since some customers wanted to have it available for debug purpose but some other work-around was done rather than opening it for public.
Regards,
Santosh
PATCH 3/9 ARM: OMAP2+: PM: Remove bogus fiq_[enable/disable] tuple
Quoted 9 lines · Santosh Shilimkar
Quoted 8 lines · Kevin Hilman
Quoted 5 lines · Santosh Shilimkar
On OMAP platform, FIQ is reserved for secure environment only. If at all the FIQ needs to be disabled, it involves going through security API call. Hence the local_fiq_[enable/disable]() in the OMAP code is bogus.
So just get rid of it.
Quoted 8 lines
Quoted 2 lines
What about GP devices?
On GP devices as well FIQ isn't available for non-secure software since its marked secure only in ROM initialization. There has been heavy debate on this since some customers wanted to have it available for debug purpose but some other work-around was done rather than opening it for public.
For record, patch with updated changelog for GP device is end of the email.
Regards,
Santosh
Quoted 1 line
From
6b85638b83caac7bae9ffa202391882a9ad4388fMon Sep 17 00:00:00 2001
From: Santosh Shilimkar <[email protected]>
Date: Mon, 11 Feb 2013 19:29:45 +0530
Subject: [PATCH v2 3/9] ARM: OMAP2+: PM: Remove bogus fiq_[enable/disable]
tuple
On OMAP platform, FIQ is reserved for secure environment only. If at all the FIQ needs to be disabled, it involves going through security API call. Hence the local_fiq_[enable/disable]() in the OMAP code is bogus. On GP devices too, the fiq is disabled for non-secure software.
So just get rid of it.
--- arch/arm/mach-omap2/cpuidle34xx.c | 3 --- arch/arm/mach-omap2/cpuidle44xx.c | 7 ------- arch/arm/mach-omap2/pm24xx.c | 11 +++-------- arch/arm/mach-omap2/pm34xx.c | 9 +-------- arch/arm/mach-omap2/pm44xx.c | 4 ---- 5 files changed, 4 insertions(+), 30 deletions(-)
arch/arm/mach-omap2/cpuidle34xx.c +0 -3
@@ -107,8 +107,6 @@ static int __omap3_enter_idle(struct cpuidle_device *dev, {struct omap3_idle_statedata *cx = &omap3_idle_data[index]; -local_fiq_disable (); -if (omap_irq_pending () ||need_resched ()) goto return_sleep_time;
@@ -143,7 +141,6 @@ static int __omap3_enter_idle(struct cpuidle_device *dev,clkdm_allow_idle (mpu_pd->pwrdm_clkdms[0 ]); return_sleep_time: -local_fiq_enable ();return index; }
arch/arm/mach-omap2/cpuidle44xx.c +0 -7
@@ -70,10 +70,7 @@ static int omap4_enter_idle_simple(struct cpuidle_device *dev,struct cpuidle_driver *drv, int index) { -local_fiq_disable ();omap_do_wfi (); -local_fiq_enable (); -return index; }
@@ -84,8 +81,6 @@ static int omap4_enter_idle_coupled(struct cpuidle_device *dev,struct omap4_idle_statedata *cx = &omap4_idle_data[index];int cpu_id =smp_processor_id (); -local_fiq_disable (); -/* * CPU0 has to wait and stay ON until CPU1 is OFF state. * This is necessary to honour hardware recommondation
@@ -158,8 +153,6 @@ fail:cpuidle_coupled_parallel_barrier (dev, &abort_barrier); cpu_done[dev->cpu] = false; -local_fiq_enable (); -return index; }
arch/arm/mach-omap2/pm24xx.c +3 -8
@@ -200,22 +200,17 @@ static int omap2_can_sleep(void)static void omap2_pm_idle (void ) { -local_fiq_disable (); -if (!omap2_can_sleep ()) {if (omap_irq_pending ()) - goto out; +return ;omap2_enter_mpu_retention (); - goto out; +return ; }if (omap_irq_pending ()) - goto out; +return ;omap2_enter_full_retention (); - -out: -local_fiq_enable (); }static void __init prcm_setup_regs (void )
arch/arm/mach-omap2/pm34xx.c +1 -8
@@ -346,19 +346,14 @@ void omap_sram_idle(void)static void omap3_pm_idle (void ) { -local_fiq_disable (); -if (omap_irq_pending ()) - goto out; +return ;trace_cpu_idle (1 ,smp_processor_id ());omap_sram_idle ();trace_cpu_idle (PWR_EVENT_EXIT ,smp_processor_id ()); - -out: -local_fiq_enable (); }#ifdef CONFIG_SUSPEND
@@ -757,14 +752,12 @@ int __init omap3_pm_init(void)pr_err ("Memory allocation failed when allocating for secure sram context\n" );local_irq_disable (); -local_fiq_disable ();omap_dma_global_context_save ();omap3_save_secure_ram_context ();omap_dma_global_context_restore ();local_irq_enable (); -local_fiq_enable (); }omap3_save_scratchpad_contents ();
arch/arm/mach-omap2/pm44xx.c +0 -4
@@ -131,11 +131,7 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)*/ static void omap_default_idle (void ) { -local_fiq_disable (); -omap_do_wfi (); - -local_fiq_enable (); }/**
Signature · 1 line
1.7.9.5
PATCH 4/9 ARM: OMAP4+: Remove the un-necessary cache flush from hotplug code
In reply to Santosh ShilimkarThis was added with intial port where OMAP PM support wasn't existing and only simple WFI based hooks were used.
This should have been cleaned up while adding the PM support but some how fall through cracks.
--- arch/arm/mach-omap2/omap-hotplug.c | 6 ------ 1 file changed, 6 deletions(-)
arch/arm/mach-omap2/omap-hotplug.c +0 -6
@@ -19,11 +19,8 @@#include <linux/smp.h> #include <linux/io.h> -#include <asm/cacheflush.h> #include "omap-wakeupgen.h" -#include "common.h" -#include "powerdomain.h" /*
@@ -35,9 +32,6 @@ void __ref omap4_cpu_die(unsigned int cpu)unsigned int boot_cpu =0 ;void __iomem *base =omap_get_wakeupgen_base (); -flush_cache_all (); -dsb (); -/* * we're ready for shutdown now, so do it */
Signature · 1 line
1.7.9.5
PATCH 4/9 ARM: OMAP4+: Remove the un-necessary cache flush from hotplug code
Quoted 5 lines · Santosh Shilimkar
This was added with intial port where OMAP PM support wasn't existing and only simple WFI based hooks were used.
This should have been cleaned up while adding the PM support but some how fall through cracks.
Changelog describes a bit of history, but does not it's no longer needed.
Kevin
Quoted 31 lines
Signed-off-by Santosh Shilimkar <[email protected]>--- arch/arm/mach-omap2/omap-hotplug.c | 6 ------ 1 file changed, 6 deletions(-)arch/arm/mach-omap2/omap-hotplug.c +0
-6@@ -19,11 +19,8 @@#include <linux/smp.h> #include <linux/io.h> -#include <asm/cacheflush.h> #include "omap-wakeupgen.h" -#include "common.h" -#include "powerdomain.h" /* @@ -35,9 +32,6 @@ void __ref omap4_cpu_die(unsigned int cpu)unsigned int boot_cpu =0 ;void __iomem *base =omap_get_wakeupgen_base (); -flush_cache_all (); -dsb (); -/* * we're ready for shutdown now, so do it */
PATCH 4/9 ARM: OMAP4+: Remove the un-necessary cache flush from hotplug code
Quoted 11 lines · Kevin Hilman
Quoted 5 lines · Santosh Shilimkar
This was added with intial port where OMAP PM support wasn't existing and only simple WFI based hooks were used.
This should have been cleaned up while adding the PM support but some how fall through cracks.
Changelog describes a bit of history, but does not it's no longer needed.
I thought "This should have been cleaned up while adding PM support" means its no longer needed. At least I meant that way.
Anyway I will just make it explicit.
Regards,
Santosh
PATCH 4/9 ARM: OMAP4+: Remove the un-necessary cache flush from hotplug code
Quoted 9 lines · Santosh Shilimkar
Quoted 8 lines · Kevin Hilman
Quoted 5 lines · Santosh Shilimkar
This was added with intial port where OMAP PM support wasn't existing and only simple WFI based hooks were used.
This should have been cleaned up while adding the PM support but some how fall through cracks.
Quoted 8 lines
Quoted 3 lines
Changelog describes a bit of history, but does not it's no longer needed.
I thought "This should have been cleaned up while adding PM support" means its no longer needed. At least I meant that way.
Anyway I will just make it explicit.
For record, patch with updated changelog end of email.
Regards,
Santosh
Quoted 1 line
From
4df9c29bf6eec23e99e83c9e1531603af69b4b42Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <[email protected]>
Date: Sun, 10 Feb 2013 13:14:17 +0530
Subject: [PATCH v2 4/9] ARM: OMAP4+: Remove the un-necessary cache flush from
hotplug code
This was added with intial port where OMAP PM support wasn't existing and only simple WFI based hooks were used.
This should have been cleaned up while adding the PM support but some how fall through cracks.
So remove the cache flush code which is no longer needed now.
--- arch/arm/mach-omap2/omap-hotplug.c | 6 ------ 1 file changed, 6 deletions(-)
arch/arm/mach-omap2/omap-hotplug.c +0 -6
@@ -19,11 +19,8 @@#include <linux/smp.h> #include <linux/io.h> -#include <asm/cacheflush.h> #include "omap-wakeupgen.h" -#include "common.h" -#include "powerdomain.h" /*
@@ -35,9 +32,6 @@ void __ref omap4_cpu_die(unsigned int cpu)unsigned int boot_cpu =0 ;void __iomem *base =omap_get_wakeupgen_base (); -flush_cache_all (); -dsb (); -/* * we're ready for shutdown now, so do it */
Signature · 1 line
1.7.9.5
PATCH 5/9 ARM: OMAP4+: Remove un-necessary cacheflush in secondary CPU boot path
In reply to Santosh ShilimkarThis was borrowed from ARM versatile code with pen_release mechanism but since OMAP uses hardware register based synchronisation, pen_release stuff was dropped. Unfortunately the cacheflush wasn't dropped along with it.
--- arch/arm/mach-omap2/omap-smp.c | 4 ---- 1 file changed, 4 deletions(-)
arch/arm/mach-omap2/omap-smp.c +0 -4
@@ -20,7 +20,6 @@#include <linux/smp.h> #include <linux/io.h> -#include <asm/cacheflush.h> #include <asm/hardware/gic.h> #include <asm/smp_scu.h>
@@ -103,9 +102,6 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct *else __raw_writel (0x20 , base +OMAP_AUX_CORE_BOOT_0 ); -flush_cache_all (); -smp_wmb (); -if (!cpu1_clkdm) cpu1_clkdm =clkdm_lookup ("mpu1_clkdm" );
Signature · 1 line
1.7.9.5
PATCH 6/9 ARM: OMAP4+: Remove out of placed smp_wmb() in secondary wakeup code
In reply to Santosh ShilimkarThe smp_wmb() here is out of placed and redundant. So remove it. It is a left over of the pain_release cleanup mostly.
--- arch/arm/mach-omap2/omap-smp.c | 2 -- 1 file changed, 2 deletions(-)
arch/arm/mach-omap2/omap-smp.c +0 -2
@@ -186,8 +186,6 @@ static void __init wakeup_secondary(void)__raw_writel (virt_to_phys (omap5_secondary_startup), base +OMAP_AUX_CORE_BOOT_1 ); -smp_wmb (); -/* * Send a 'sev' to wake the secondary core from WFE. * Drain the outstanding writes to memory
Signature · 1 line
1.7.9.5
PATCH 6/9 ARM: OMAP4+: Remove out of placed smp_wmb() in secondary wakeup code
Hello.
Quoted 1 line · Santosh Shilimkar
The
smp_wmb()here is out of placed
s/placed/place/
Quoted 2 lines
and redundant. So remove it. It is
a left over of thepain_release
Sure it's not 'pen_release'?
Quoted 3 lines
cleanup mostly.
Signed-off-by Santosh Shilimkar <[email protected]>
WBR, Sergei
PATCH 6/9 ARM: OMAP4+: Remove out of placed smp_wmb() in secondary wakeup code
Quoted 4 lines · Sergei Shtylyov
Hello.
On 20-02-2013 19:18, Santosh Shilimkar wrote:
Quoted 13 lines
Quoted 1 line
The
smp_wmb()here is out of placeds/placed/place/
Quoted 2 lines
and redundant. So remove it. It is
a left over of thepain_releaseSure it's not '
pen_release'?Quoted 3 lines
cleanup mostly.
Signed-off-by Santosh Shilimkar <[email protected]>
Yes... Will fix.
Regards,
Santosh
PATCH 7/9 ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus()
In reply to Santosh ShilimkarMove the secondary CPU wakeup prepare code under smp_prepare_cpus(). While at it drop the un-necessary sev() and barrier which was under prepare code.
--- arch/arm/mach-omap2/omap-smp.c | 51 ++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 31 deletions(-)
arch/arm/mach-omap2/omap-smp.c +20 -31
@@ -164,36 +164,6 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct *return 0 ; } -static void __init wakeup_secondary (void ) -{ -void *startup_addr = omap_secondary_startup; -void __iomem *base =omap_get_wakeupgen_base (); - -if (cpu_is_omap446x ()) { - startup_addr = omap_secondary_startup_4460; - pm44xx_errata |=PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD ; - } - -/* -* Write the address of secondary startup routine into the -* AuxCoreBoot1 where ROM code will jump and start executing -* on secondary core once out of WFE -* A barrier is added to ensure that write buffer is drained -*/ -if (omap_secure_apis_support ()) -omap_auxcoreboot_addr (virt_to_phys (startup_addr)); -else -__raw_writel (virt_to_phys (omap5_secondary_startup), - base +OMAP_AUX_CORE_BOOT_1 ); - -/* -* Send a 'sev' to wake the secondary core from WFE. -* Drain the outstanding writes to memory -*/ -dsb_sev (); -mb (); -} -/* * Initialise the CPU possible map early - this describes the CPUs * which may be present or become present in the system.
@@ -231,6 +201,8 @@ static void __init omap4_smp_init_cpus(void)static void __init omap4_smp_prepare_cpus (unsigned int max_cpus) { +void *startup_addr = omap_secondary_startup; +void __iomem *base =omap_get_wakeupgen_base ();/* * Initialise the SCU and wake up the secondary core using
@@ -238,7 +210,24 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)*/ if (scu_base)scu_enable (scu_base); -wakeup_secondary (); + +if (cpu_is_omap446x ()) { + startup_addr = omap_secondary_startup_4460; + pm44xx_errata |=PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD ; + } + +/* +* Write the address of secondary startup routine into the +* AuxCoreBoot1 where ROM code will jump and start executing +* on secondary core once out of WFE +* A barrier is added to ensure that write buffer is drained +*/ +if (omap_secure_apis_support ()) +omap_auxcoreboot_addr (virt_to_phys (startup_addr)); +else +__raw_writel (virt_to_phys (omap5_secondary_startup), + base +OMAP_AUX_CORE_BOOT_1 ); + }struct smp_operations omap4_smp_ops__initdata = {
Signature · 1 line
1.7.9.5
PATCH 7/9 ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus()
Quoted 1 line · Santosh Shilimkar
Move the secondary CPU wakeup prepare code under
smp_prepare_cpus().
Why?
Quoted 84 lines
While at
it drop the un-necessarysev()and barrier which was under prepare code.Signed-off-by Santosh Shilimkar <[email protected]>--- arch/arm/mach-omap2/omap-smp.c | 51 ++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 31 deletions(-)arch/arm/mach-omap2/omap-smp.c +20
-31@@ -164,36 +164,6 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct *return 0 ; } -static void __init wakeup_secondary (void ) -{ -void *startup_addr = omap_secondary_startup; -void __iomem *base =omap_get_wakeupgen_base (); - -if (cpu_is_omap446x ()) { - startup_addr = omap_secondary_startup_4460; - pm44xx_errata |=PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD ; - } - -/* -* Write the address of secondary startup routine into the -* AuxCoreBoot1 where ROM code will jump and start executing -* on secondary core once out of WFE -* A barrier is added to ensure that write buffer is drained -*/ -if (omap_secure_apis_support ()) -omap_auxcoreboot_addr (virt_to_phys (startup_addr)); -else -__raw_writel (virt_to_phys (omap5_secondary_startup), - base +OMAP_AUX_CORE_BOOT_1 ); - -/* -* Send a 'sev' to wake the secondary core from WFE. -* Drain the outstanding writes to memory -*/ -dsb_sev (); -mb (); -} -/* * Initialise the CPU possible map early - this describes the CPUs * which may be present or become present in the system. @@ -231,6 +201,8 @@ static void __init omap4_smp_init_cpus(void)static void __init omap4_smp_prepare_cpus (unsigned int max_cpus) { +void *startup_addr = omap_secondary_startup; +void __iomem *base =omap_get_wakeupgen_base ();/* * Initialise the SCU and wake up the secondary core using @@ -238,7 +210,24 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)*/ if (scu_base)scu_enable (scu_base); -wakeup_secondary (); + +if (cpu_is_omap446x ()) { + startup_addr = omap_secondary_startup_4460; + pm44xx_errata |=PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD ; + } + +/* +* Write the address of secondary startup routine into the +* AuxCoreBoot1 where ROM code will jump and start executing +* on secondary core once out of WFE +* A barrier is added to ensure that write buffer is drained +*/ +if (omap_secure_apis_support ()) +omap_auxcoreboot_addr (virt_to_phys (startup_addr)); +else +__raw_writel (virt_to_phys (omap5_secondary_startup), + base +OMAP_AUX_CORE_BOOT_1 ); + }struct smp_operations omap4_smp_ops__initdata = {
PATCH 7/9 ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus()
Quoted 6 lines · Kevin Hilman
Quoted 1 line · Santosh Shilimkar
Move the secondary CPU wakeup prepare code under
smp_prepare_cpus().Why?
Because that code belongs to smp_prepare_cpus(). As I said in earlier patches, it was remainder of the pen release code which was borrowed from ARM code initially.
Regards,
Santosh
PATCH 7/9 ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus()
Quoted 10 lines · Santosh Shilimkar
Quoted 6 lines · Kevin Hilman
Quoted 1 line · Santosh Shilimkar
Move the secondary CPU wakeup prepare code under
smp_prepare_cpus().Why?
Because that code belongs to
smp_prepare_cpus(). As I said in earlier patches, it was remainder of the pen release code which was borrowed from ARM code initially.
Sure, but that should be in the changelog.
Kevin
PATCH 7/9 ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus()
Quoted 7 lines · Kevin Hilman
Quoted 5 lines · Santosh Shilimkar
Quoted 4 lines · Kevin Hilman
Quoted 1 line · Santosh Shilimkar
Move the secondary CPU wakeup prepare code under
smp_prepare_cpus().
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Why?
Because that code belongs to
smp_prepare_cpus(). As I said in earlier patches, it was remainder of the pen release code which was borrowed from ARM code initially.Sure, but that should be in the changelog.
Yep. Will add above info in changelog.
Regards,
Santosh
PATCH 7/9 ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus()
Quoted 10 lines · Santosh Shilimkar
Quoted 9 lines · Kevin Hilman
Quoted 7 lines · Santosh Shilimkar
Quoted 6 lines · Kevin Hilman
Quoted 1 line · Santosh Shilimkar
Move the secondary CPU wakeup prepare code under
smp_prepare_cpus().Why?
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Because that code belongs to
smp_prepare_cpus(). As I said in earlier patches, it was remainder of the pen release code which was borrowed from ARM code initially.Sure, but that should be in the changelog.
Yep. Will add above info in changelog.
For record, patch with updated changelog end of email.
Regards,
Santosh
Quoted 1 line
From
b699ddd19bf3542d43ffe293c6148161e160b1bcMon Sep 17 00:00:00 2001
From: Santosh Shilimkar <[email protected]>
Date: Sun, 10 Feb 2013 13:54:00 +0530
Subject: [PATCH v2 7/9] ARM: OMAP4+: Move the CPU wakeup prepare code under
smp_prepare_cpus()
Move the secondary CPU wakeup prepare code under smp_prepare_cpus() where it belongs. It was remainder of the pen release code which was borrowed from ARM code initially.
While at it drop the un-necessary sev() and barrier which was under prepare code.
--- arch/arm/mach-omap2/omap-smp.c | 51 ++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 31 deletions(-)
arch/arm/mach-omap2/omap-smp.c +20 -31
@@ -164,36 +164,6 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct *return 0 ; } -static void __init wakeup_secondary (void ) -{ -void *startup_addr = omap_secondary_startup; -void __iomem *base =omap_get_wakeupgen_base (); - -if (cpu_is_omap446x ()) { - startup_addr = omap_secondary_startup_4460; - pm44xx_errata |=PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD ; - } - -/* -* Write the address of secondary startup routine into the -* AuxCoreBoot1 where ROM code will jump and start executing -* on secondary core once out of WFE -* A barrier is added to ensure that write buffer is drained -*/ -if (omap_secure_apis_support ()) -omap_auxcoreboot_addr (virt_to_phys (startup_addr)); -else -__raw_writel (virt_to_phys (omap5_secondary_startup), - base +OMAP_AUX_CORE_BOOT_1 ); - -/* -* Send a 'sev' to wake the secondary core from WFE. -* Drain the outstanding writes to memory -*/ -dsb_sev (); -mb (); -} -/* * Initialise the CPU possible map early - this describes the CPUs * which may be present or become present in the system.
@@ -229,6 +199,8 @@ static void __init omap4_smp_init_cpus(void)static void __init omap4_smp_prepare_cpus (unsigned int max_cpus) { +void *startup_addr = omap_secondary_startup; +void __iomem *base =omap_get_wakeupgen_base ();/* * Initialise the SCU and wake up the secondary core using
@@ -236,7 +208,24 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)*/ if (scu_base)scu_enable (scu_base); -wakeup_secondary (); + +if (cpu_is_omap446x ()) { + startup_addr = omap_secondary_startup_4460; + pm44xx_errata |=PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD ; + } + +/* +* Write the address of secondary startup routine into the +* AuxCoreBoot1 where ROM code will jump and start executing +* on secondary core once out of WFE +* A barrier is added to ensure that write buffer is drained +*/ +if (omap_secure_apis_support ()) +omap_auxcoreboot_addr (virt_to_phys (startup_addr)); +else +__raw_writel (virt_to_phys (omap5_secondary_startup), + base +OMAP_AUX_CORE_BOOT_1 ); + }struct smp_operations omap4_smp_ops__initdata = {
Signature · 1 line
1.7.9.5
PATCH 7/9 ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus()
In reply to Santosh ShilimkarQuoted 10 lines · Santosh Shilimkar
Quoted 6 lines · Kevin Hilman
Quoted 1 line · Santosh Shilimkar
Move the secondary CPU wakeup prepare code under
smp_prepare_cpus().Why?
Because that code belongs to
smp_prepare_cpus(). As I said in earlier patches, it was remainder of the pen release code which was borrowed from ARM code initially.
What about hotplug after the system is suspended? Is this setup preserved by the secure ROM?
If not, it really needs to be part of the CPU bringup, not the boot-time-only preparation code.
PATCH 7/9 ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus()
Quoted 12 lines · Russell King - ARM Linux
Quoted 10 lines · Santosh Shilimkar
Quoted 6 lines · Kevin Hilman
Quoted 1 line · Santosh Shilimkar
Move the secondary CPU wakeup prepare code under
smp_prepare_cpus().Why?
Because that code belongs to
smp_prepare_cpus(). As I said in earlier patches, it was remainder of the pen release code which was borrowed from ARM code initially.
Quoted 6 lines
What about hotplug after the system is suspended? Is this setup preserved by the secure ROM?
If not, it really needs to be part of the CPU bringup, not the boot-time-only preparation code.
Its already the case. Hotplug CPU restarts just like CPU bring-up. Initial code, hotplug cpu and last cpu(suspend) were taking identical path for the suspend wakeup. Later you suggested after the discussion that hotplug CPU state need not be saved and can be restarted just like the CPU bring-up path.
So the current code follows above.
Regards,
Santosh
PATCH 7/9 ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus()
Quoted 19 lines · Santosh Shilimkar
Quoted 12 lines · Russell King - ARM Linux
Quoted 10 lines · Santosh Shilimkar
Quoted 6 lines · Kevin Hilman
Quoted 1 line · Santosh Shilimkar
Move the secondary CPU wakeup prepare code under
smp_prepare_cpus().Why?
Because that code belongs to
smp_prepare_cpus(). As I said in earlier patches, it was remainder of the pen release code which was borrowed from ARM code initially.Quoted 6 lines
What about hotplug after the system is suspended? Is this setup preserved by the secure ROM?
If not, it really needs to be part of the CPU bringup, not the boot-time-only preparation code.
Quoted 7 lines
Its already the case. Hotplug CPU restarts just like CPU bring-up. Initial code, hotplug cpu and last cpu(suspend) were taking identical path for the suspend wakeup. Later you suggested after the discussion that hotplug CPU state need not be saved and can be restarted just like the CPU bring-up path.
So the current code follows above.
smp_prepare_cpus() doesn't get run apart from at initial boot.
So, I repeat my question: what restores OMAP_AUX_CORE_BOOT_1 after context loss?
PATCH 7/9 ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus()
Quoted 26 lines · Russell King - ARM Linux
Quoted 25 lines · Santosh Shilimkar
Quoted 12 lines · Russell King - ARM Linux
Quoted 10 lines · Santosh Shilimkar
Quoted 6 lines · Kevin Hilman
Quoted 1 line · Santosh Shilimkar
Move the secondary CPU wakeup prepare code under
smp_prepare_cpus().Why?
Because that code belongs to
smp_prepare_cpus(). As I said in earlier patches, it was remainder of the pen release code which was borrowed from ARM code initially.Quoted 6 lines
What about hotplug after the system is suspended? Is this setup preserved by the secure ROM?
If not, it really needs to be part of the CPU bringup, not the boot-time-only preparation code.
Its already the case. Hotplug CPU restarts just like CPU bring-up. Initial code, hotplug cpu and last cpu(suspend) were taking identical path for the suspend wakeup. Later you suggested after the discussion that hotplug CPU state need not be saved and can be restarted just like the CPU bring-up path.
Quoted 7 lines
Quoted 1 line
So the current code follows above.
smp_prepare_cpus()doesn't get run apart from at initial boot.So, I repeat my question: what restores
OMAP_AUX_CORE_BOOT_1after context loss?
Sorry I missed your point. OMAP_AUX_CORE_BOOT_* registers are maintained across power transitions.
Regards,
Santosh
PATCH 8/9 ARM: OMAP4: PM: Remove L4 wakeup depedency with MPU since errata fix exist now
In reply to Santosh ShilimkarWith commit bfd6d021 {ARM: OMAP3+: Implement timer workaround for errata i103 and i767}, the sync and gptimer synchronization errata got fixed.
Hence the l4_wakeup static dependency with MPU can can be removed now. Static dependency was one of the proposed workaround but from power savings perspective, it isn't an ideal workaround.
--- arch/arm/mach-omap2/pm44xx.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
arch/arm/mach-omap2/pm44xx.c +2 -8
@@ -133,7 +133,7 @@ static void omap_default_idle(void)int __init omap4_pm_init (void ) {int ret; -struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm, *l4wkup; +struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm;struct clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm;if (omap_rev () ==OMAP4430_REV_ES1_0 ) {
@@ -154,19 +154,14 @@ int __init omap4_pm_init(void)* MPUSS -> L4_PER/L3_* and DUCATI -> L3_* doesn't work as * expected. The hardware recommendation is to enable static * dependencies for these to avoid system lock ups or random crashes. -* The L4 wakeup depedency is added to workaround the OCP sync hardware -* BUG with 32K synctimer which lead to incorrect timer value read -* from the 32K counter. The BUG applies for GPTIMER1 and WDT2 which -* are part of L4 wakeup clockdomain. */ mpuss_clkdm =clkdm_lookup ("mpuss_clkdm" ); emif_clkdm =clkdm_lookup ("l3_emif_clkdm" ); l3_1_clkdm =clkdm_lookup ("l3_1_clkdm" ); l3_2_clkdm =clkdm_lookup ("l3_2_clkdm" ); l4_per_clkdm =clkdm_lookup ("l4_per_clkdm" ); - l4wkup =clkdm_lookup ("l4_wkup_clkdm" ); ducati_clkdm =clkdm_lookup ("ducati_clkdm" ); -if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) || (!l4wkup) || +if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) || (!l3_2_clkdm) || (!ducati_clkdm) || (!l4_per_clkdm)) goto err2;
@@ -174,7 +169,6 @@ int __init omap4_pm_init(void) ret |=clkdm_add_wkdep (mpuss_clkdm, l3_1_clkdm); ret |=clkdm_add_wkdep (mpuss_clkdm, l3_2_clkdm); ret |=clkdm_add_wkdep (mpuss_clkdm, l4_per_clkdm); - ret |=clkdm_add_wkdep (mpuss_clkdm, l4wkup); ret |=clkdm_add_wkdep (ducati_clkdm, l3_1_clkdm); ret |=clkdm_add_wkdep (ducati_clkdm, l3_2_clkdm);if (ret) {
Signature · 1 line
1.7.9.5
PATCH 8/9 ARM: OMAP4: PM: Remove L4 wakeup depedency with MPU since errata fix exist now
Quoted 11 lines · Santosh Shilimkar
With commit
bfd6d021{ARM: OMAP3+: Implement timer workaround for errata i103 and i767}, the sync and gptimer synchronization errata got fixed.Hence the
l4_wakeupstatic dependency with MPU can can be removed now. Static dependency was one of the proposed workaround but from power savings perspective, it isn't an ideal workaround.Cc Jon Hunter <[email protected]>Cc Kevin Hilman <[email protected]>Signed-off-by Santosh Shilimkar <[email protected]>
Nice.
PATCH 8/9 ARM: OMAP4: PM: Remove L4 wakeup depedency with MPU since errata fix exist now
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Kevin" == Kevin Hilman <[email protected]> writes:
Quoted 4 lines · Santosh Shilimkar
Quoted 4 lines
With commit
bfd6d021{ARM: OMAP3+: Implement timer workaround for errata i103 and i767}, the sync and gptimer synchronization errata got fixed.Hence the
l4_wakeupstatic dependency with MPU can can be removed
s/can can/can/
Signature · 1 line
Bye, Peter Korsgaard
PATCH 9/9 ARM: OMAP4: PM: Now remove L4 per clockdomain static depedency with MPU
In reply to Santosh ShilimkarUART driver slave idle issue has been taken care by driver using hwmod framework.
So we can now ger rid off the L4 per clockdomain static dependency with MPU which was used to wrok around UART wakeup and console sluggishnesh issue on OMAP4 SOCs.
--- arch/arm/mach-omap2/pm44xx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/pm44xx.c +2 -4
@@ -134,7 +134,7 @@ int __init omap4_pm_init(void) {int ret;struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm; -struct clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm; +struct clockdomain *ducati_clkdm, *l3_2_clkdm;if (omap_rev () ==OMAP4430_REV_ES1_0 ) {WARN (1 ,"Power Management not supported on OMAP4430 ES1.0\n" );
@@ -159,16 +159,14 @@ int __init omap4_pm_init(void) emif_clkdm =clkdm_lookup ("l3_emif_clkdm" ); l3_1_clkdm =clkdm_lookup ("l3_1_clkdm" ); l3_2_clkdm =clkdm_lookup ("l3_2_clkdm" ); - l4_per_clkdm =clkdm_lookup ("l4_per_clkdm" ); ducati_clkdm =clkdm_lookup ("ducati_clkdm" );if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) || - (!l3_2_clkdm) || (!ducati_clkdm) || (!l4_per_clkdm)) + (!l3_2_clkdm) || (!ducati_clkdm)) goto err2; ret =clkdm_add_wkdep (mpuss_clkdm, emif_clkdm); ret |=clkdm_add_wkdep (mpuss_clkdm, l3_1_clkdm); ret |=clkdm_add_wkdep (mpuss_clkdm, l3_2_clkdm); - ret |=clkdm_add_wkdep (mpuss_clkdm, l4_per_clkdm); ret |=clkdm_add_wkdep (ducati_clkdm, l3_1_clkdm); ret |=clkdm_add_wkdep (ducati_clkdm, l3_2_clkdm);if (ret) {
Signature · 1 line
1.7.9.5
PATCH 9/9 ARM: OMAP4: PM: Now remove L4 per clockdomain static depedency with MPU
Quoted 10 lines · Santosh Shilimkar
UART driver slave idle issue has been taken care by driver using hwmod framework.
So we can now ger rid off the L4 per clockdomain static dependency with MPU which was used to wrok around UART wakeup and console sluggishnesh issue on OMAP4 SOCs.
Cc Kevin Hilman <[email protected]>Signed-off-by Santosh Shilimkar <[email protected]>
Nice.
Quoted 35 lines
--- arch/arm/mach-omap2/pm44xx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)arch/arm/mach-omap2/pm44xx.c +2
-4@@ -134,7 +134,7 @@ int __init omap4_pm_init(void) {int ret;struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm; -struct clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm; +struct clockdomain *ducati_clkdm, *l3_2_clkdm;if (omap_rev () ==OMAP4430_REV_ES1_0 ) {WARN (1 ,"Power Management not supported on OMAP4430 ES1.0\n" );@@ -159,16 +159,14 @@ int __init omap4_pm_init(void) emif_clkdm =clkdm_lookup ("l3_emif_clkdm" ); l3_1_clkdm =clkdm_lookup ("l3_1_clkdm" ); l3_2_clkdm =clkdm_lookup ("l3_2_clkdm" ); - l4_per_clkdm =clkdm_lookup ("l4_per_clkdm" ); ducati_clkdm =clkdm_lookup ("ducati_clkdm" );if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) || - (!l3_2_clkdm) || (!ducati_clkdm) || (!l4_per_clkdm)) + (!l3_2_clkdm) || (!ducati_clkdm)) goto err2; ret =clkdm_add_wkdep (mpuss_clkdm, emif_clkdm); ret |=clkdm_add_wkdep (mpuss_clkdm, l3_1_clkdm); ret |=clkdm_add_wkdep (mpuss_clkdm, l3_2_clkdm); - ret |=clkdm_add_wkdep (mpuss_clkdm, l4_per_clkdm); ret |=clkdm_add_wkdep (ducati_clkdm, l3_1_clkdm); ret |=clkdm_add_wkdep (ducati_clkdm, l3_2_clkdm);if (ret) {