diff mbox

[10/13] OMAP3: PM: export the v7_flush_dcache_all API to modules

Message ID 1305739950-11695-11-git-send-email-j-pihet@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jean Pihet May 18, 2011, 5:32 p.m. UTC
From: Jean Pihet <j-pihet@ti.com>

Provide the the assembly function v7_flush_dcache_all to the
OMAP3 PM module, under CONFIG_CPU_V7.
v7_flush_dcache_all is used by the low level sleep code.

Signed-off-by: Jean Pihet <j-pihet@ti.com>
---
 arch/arm/mach-omap2/pm.c |    4 ++++
 arch/arm/mach-omap2/pm.h |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

Comments

Santosh Shilimkar May 19, 2011, 8:04 a.m. UTC | #1
On 5/18/2011 11:02 PM, jean.pihet@newoldbits.com wrote:
> From: Jean Pihet<j-pihet@ti.com>
>
> Provide the the assembly function v7_flush_dcache_all to the
> OMAP3 PM module, under CONFIG_CPU_V7.
> v7_flush_dcache_all is used by the low level sleep code.
>
> Signed-off-by: Jean Pihet<j-pihet@ti.com>
> ---
>   arch/arm/mach-omap2/pm.c |    4 ++++
>   arch/arm/mach-omap2/pm.h |    4 ++++
>   2 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
> index 2e43fd6..ab69c5a 100644
> --- a/arch/arm/mach-omap2/pm.c
> +++ b/arch/arm/mach-omap2/pm.c
> @@ -325,6 +325,10 @@ unsigned long omap_pm_tick_nohz_get_sleep_length_us(void)
>   EXPORT_SYMBOL(omap_pm_tick_nohz_get_sleep_length_us);
>   #endif
>
> +#ifdef CONFIG_CPU_V7
> +EXPORT_SYMBOL(v7_flush_dcache_all);
> +#endif
> +
You have already mentioned, this export is wrong and indeed it
is wrong. You can use "flush_cache_all()" instead here which will
pick the right asm function. The downside is it will invalidate
I cache as well but that's ok because it's get invalidated anyways
in wakeup path.

Regards
Santosh
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jean Pihet May 25, 2011, 12:21 p.m. UTC | #2
Hi Santosh,

On Thu, May 19, 2011 at 10:04 AM, Santosh Shilimkar
<santosh.shilimkar@ti.com> wrote:
> On 5/18/2011 11:02 PM, jean.pihet@newoldbits.com wrote:
>>
>> From: Jean Pihet<j-pihet@ti.com>
>>
>> Provide the the assembly function v7_flush_dcache_all to the
>> OMAP3 PM module, under CONFIG_CPU_V7.
>> v7_flush_dcache_all is used by the low level sleep code.
>>
>> Signed-off-by: Jean Pihet<j-pihet@ti.com>
>> ---
>>  arch/arm/mach-omap2/pm.c |    4 ++++
>>  arch/arm/mach-omap2/pm.h |    4 ++++
>>  2 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
>> index 2e43fd6..ab69c5a 100644
>> --- a/arch/arm/mach-omap2/pm.c
>> +++ b/arch/arm/mach-omap2/pm.c
>> @@ -325,6 +325,10 @@ unsigned long
>> omap_pm_tick_nohz_get_sleep_length_us(void)
>>  EXPORT_SYMBOL(omap_pm_tick_nohz_get_sleep_length_us);
>>  #endif
>>
>> +#ifdef CONFIG_CPU_V7
>> +EXPORT_SYMBOL(v7_flush_dcache_all);
>> +#endif
>> +
>
> You have already mentioned, this export is wrong and indeed it
> is wrong. You can use "flush_cache_all()" instead here which will
> pick the right asm function.
I could not find a usable flush cache function that is exported for
use by the modules. I will re-submit the next version of the patches
and specifically ask about it on l-a-k ML as well.

>The downside is it will invalidate
> I cache as well but that's ok because it's get invalidated anyways
> in wakeup path.
That should be ok.

>
> Regards
> Santosh
>

Thanks,
Jean
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 2e43fd6..ab69c5a 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -325,6 +325,10 @@  unsigned long omap_pm_tick_nohz_get_sleep_length_us(void)
 EXPORT_SYMBOL(omap_pm_tick_nohz_get_sleep_length_us);
 #endif
 
+#ifdef CONFIG_CPU_V7
+EXPORT_SYMBOL(v7_flush_dcache_all);
+#endif
+
 #ifdef CONFIG_SUSPEND
 void omap_pm_suspend_set_ops(struct platform_suspend_ops *pm_ops)
 {
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index d1bc6a3..194e883 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -80,6 +80,10 @@  extern u32 sleep_while_idle;
 extern unsigned long omap_pm_tick_nohz_get_sleep_length_us(void);
 #endif
 
+#ifdef CONFIG_CPU_V7
+extern void v7_flush_dcache_all(void);
+#endif
+
 #ifdef CONFIG_SUSPEND
 extern void omap_pm_suspend_set_ops(struct platform_suspend_ops *pm_ops);
 #endif