All of lore.kernel.org
 help / color / mirror / Atom feed
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: linux-omap@vger.kernel.org
Cc: Kevin Hilman <khilman@linaro.org>,
	tony@atomide.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/9] ARM: OMAP2+: PM: Remove bogus fiq_[enable/disable] tuple
Date: Thu, 28 Mar 2013 13:07:13 +0530	[thread overview]
Message-ID: <5153F329.8010602@ti.com> (raw)
In-Reply-To: <51534235.6030506@ti.com>

On Thursday 28 March 2013 12:32 AM, Santosh Shilimkar wrote:
> On Thursday 28 March 2013 12:06 AM, Kevin Hilman wrote:
>> Santosh Shilimkar <santosh.shilimkar@ti.com> writes:
>>
>>> 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.
> 

For record, patch with updated changelog for GP device is end of
the email.

Regards,
Santosh

>From 6b85638b83caac7bae9ffa202391882a9ad4388f Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
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.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 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(-)

diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 80392fc..06f567f 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -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;
 }
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
index d639aef..944e64a 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -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;
 }
 
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index b59d939..ce956b0 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -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)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 2d93d8b..c018593 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -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();
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index ea62e75..9e9095c 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -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();
 }
 
 /**
-- 
1.7.9.5


WARNING: multiple messages have this Message-ID (diff)
From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/9] ARM: OMAP2+: PM: Remove bogus fiq_[enable/disable] tuple
Date: Thu, 28 Mar 2013 13:07:13 +0530	[thread overview]
Message-ID: <5153F329.8010602@ti.com> (raw)
In-Reply-To: <51534235.6030506@ti.com>

On Thursday 28 March 2013 12:32 AM, Santosh Shilimkar wrote:
> On Thursday 28 March 2013 12:06 AM, Kevin Hilman wrote:
>> Santosh Shilimkar <santosh.shilimkar@ti.com> writes:
>>
>>> 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.
> 

For record, patch with updated changelog for GP device is end of
the email.

Regards,
Santosh

>From 6b85638b83caac7bae9ffa202391882a9ad4388f Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
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.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 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(-)

diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 80392fc..06f567f 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -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;
 }
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
index d639aef..944e64a 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -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;
 }
 
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index b59d939..ce956b0 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -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)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 2d93d8b..c018593 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -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();
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index ea62e75..9e9095c 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -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();
 }
 
 /**
-- 
1.7.9.5

  reply	other threads:[~2013-03-28  7:35 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-20 15:18 [PATCH 0/9] ARM: OMAP: Static deps, fiq, omap-smp cleanup Santosh Shilimkar
2013-02-20 15:18 ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 1/9] ARM: OMAP4+: Use common scratchpad SAR RAM offsets for all architectures Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-03-27 18:41   ` Kevin Hilman
2013-03-27 18:41     ` Kevin Hilman
2013-03-27 20:49     ` Santosh Shilimkar
2013-03-27 20:49       ` Santosh Shilimkar
2013-03-27 20:49       ` Tony Lindgren
2013-03-27 20:49         ` Tony Lindgren
2013-03-27 20:52         ` Santosh Shilimkar
2013-03-27 20:52           ` Santosh Shilimkar
2013-03-28  7:32           ` Santosh Shilimkar
2013-03-28  7:32             ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 2/9] ARM: OMAP1: PM: Remove bogus fiq_[enable/disable] tuple Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-02-20 16:09   ` Tony Lindgren
2013-02-20 16:09     ` Tony Lindgren
2013-02-20 16:14     ` Santosh Shilimkar
2013-02-20 16:14       ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 3/9] ARM: OMAP2+: " Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-03-27 18:36   ` Kevin Hilman
2013-03-27 18:36     ` Kevin Hilman
2013-03-27 19:02     ` Santosh Shilimkar
2013-03-27 19:02       ` Santosh Shilimkar
2013-03-28  7:37       ` Santosh Shilimkar [this message]
2013-03-28  7:37         ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 4/9] ARM: OMAP4+: Remove the un-necessary cache flush from hotplug code Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-03-27 18:43   ` Kevin Hilman
2013-03-27 18:43     ` Kevin Hilman
2013-03-27 20:47     ` Santosh Shilimkar
2013-03-27 20:47       ` Santosh Shilimkar
2013-03-28  7:29       ` Santosh Shilimkar
2013-03-28  7:29         ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 5/9] ARM: OMAP4+: Remove un-necessary cacheflush in secondary CPU boot path Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 6/9] ARM: OMAP4+: Remove out of placed smp_wmb() in secondary wakeup code Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-02-21 12:55   ` Sergei Shtylyov
2013-02-21 12:55     ` Sergei Shtylyov
2013-02-21 12:59     ` Santosh Shilimkar
2013-02-21 12:59       ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 7/9] ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus() Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-03-27 18:45   ` Kevin Hilman
2013-03-27 18:45     ` Kevin Hilman
2013-03-27 19:04     ` Santosh Shilimkar
2013-03-27 19:04       ` Santosh Shilimkar
2013-03-27 19:54       ` Kevin Hilman
2013-03-27 19:54         ` Kevin Hilman
2013-03-27 20:50         ` Santosh Shilimkar
2013-03-27 20:50           ` Santosh Shilimkar
2013-03-28  7:35           ` Santosh Shilimkar
2013-03-28  7:35             ` Santosh Shilimkar
2013-03-28  9:46       ` Russell King - ARM Linux
2013-03-28  9:46         ` Russell King - ARM Linux
2013-03-28  9:58         ` Santosh Shilimkar
2013-03-28  9:58           ` Santosh Shilimkar
2013-03-28 12:04           ` Russell King - ARM Linux
2013-03-28 12:04             ` Russell King - ARM Linux
2013-03-28 12:09             ` Santosh Shilimkar
2013-03-28 12:09               ` Santosh Shilimkar
2013-02-20 15:18 ` [PATCH 8/9] ARM: OMAP4: PM: Remove L4 wakeup depedency with MPU since errata fix exist now Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-03-27 18:46   ` Kevin Hilman
2013-03-27 18:46     ` Kevin Hilman
2013-03-27 19:01     ` Peter Korsgaard
2013-03-27 19:01       ` Peter Korsgaard
2013-02-20 15:18 ` [PATCH 9/9] ARM: OMAP4: PM: Now remove L4 per clockdomain static depedency with MPU Santosh Shilimkar
2013-02-20 15:18   ` Santosh Shilimkar
2013-03-27 18:46   ` Kevin Hilman
2013-03-27 18:46     ` Kevin Hilman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5153F329.8010602@ti.com \
    --to=santosh.shilimkar@ti.com \
    --cc=khilman@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.