From: Rob Herring <robherring2@gmail.com>
To: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>,
Will Deacon <will.deacon@arm.com>,
linux-omap@vger.kernel.org, linaro-kernel@lists.linaro.org,
linux-arm-kernel@lists.infradead.org,
Rob Herring <rob.herring@calxeda.com>
Subject: Re: [RFC PATCH v2] ARM: OMAP4/highbank: Flush L2 cache before disabling
Date: Fri, 04 Oct 2013 16:47:28 -0500 [thread overview]
Message-ID: <524F3770.1050609@gmail.com> (raw)
In-Reply-To: <1380920277-31622-1-git-send-email-taras.kondratiuk@linaro.org>
On 10/04/2013 03:57 PM, Taras Kondratiuk wrote:
> Kexec disables outer cache before jumping to reboot code, but it doesn't
> flush it explicitly. Flush is done implicitly inside of l2x0_disable().
> But some SoC's override default .disable handler and don't flush cache.
> This may lead to a corrupted memory during Kexec reboot on these platforms.
>
> This patch adds cache flush inside of OMAP4 and Highbank outer_cache.disable()
> handlers to make it consistent with default l2x0_disable().
> Also it removes redundant outer_flush_all() call just before outer_disable().
>
> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
> ---
> v2: Make the fix specific to platforms that don't use l2x0_disable().
> v1: https://patchwork.kernel.org/patch/2974431/
> ---
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: linaro-kernel@lists.linaro.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-omap@vger.kernel.org
> ---
> arch/arm/mach-highbank/highbank.c | 1 +
> arch/arm/mach-highbank/pm.c | 1 -
> arch/arm/mach-omap2/omap4-common.c | 1 +
> 3 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
> index 8e63ccd..22e6f34 100644
> --- a/arch/arm/mach-highbank/highbank.c
> +++ b/arch/arm/mach-highbank/highbank.c
> @@ -63,6 +63,7 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr)
>
> static void highbank_l2x0_disable(void)
> {
> + outer_flush_all();
> /* Disable PL310 L2 Cache controller */
> highbank_smc1(0x102, 0x0);
> }
> diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c
> index 04eddb4..9a5b8a7 100644
> --- a/arch/arm/mach-highbank/pm.c
> +++ b/arch/arm/mach-highbank/pm.c
> @@ -28,7 +28,6 @@
>
> static int highbank_suspend_finish(unsigned long val)
> {
> - outer_flush_all();
> outer_disable();
>
> highbank_set_pwr_suspend();
> diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
> index 5791143..3f44b16 100644
> --- a/arch/arm/mach-omap2/omap4-common.c
> +++ b/arch/arm/mach-omap2/omap4-common.c
> @@ -163,6 +163,7 @@ void __iomem *omap4_get_l2cache_base(void)
>
> static void omap4_l2x0_disable(void)
> {
> + outer_flush_all();
> /* Disable PL310 L2 Cache controller */
> omap_smc1(0x102, 0x0);
> }
>
WARNING: multiple messages have this Message-ID (diff)
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v2] ARM: OMAP4/highbank: Flush L2 cache before disabling
Date: Fri, 04 Oct 2013 16:47:28 -0500 [thread overview]
Message-ID: <524F3770.1050609@gmail.com> (raw)
In-Reply-To: <1380920277-31622-1-git-send-email-taras.kondratiuk@linaro.org>
On 10/04/2013 03:57 PM, Taras Kondratiuk wrote:
> Kexec disables outer cache before jumping to reboot code, but it doesn't
> flush it explicitly. Flush is done implicitly inside of l2x0_disable().
> But some SoC's override default .disable handler and don't flush cache.
> This may lead to a corrupted memory during Kexec reboot on these platforms.
>
> This patch adds cache flush inside of OMAP4 and Highbank outer_cache.disable()
> handlers to make it consistent with default l2x0_disable().
> Also it removes redundant outer_flush_all() call just before outer_disable().
>
> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
> ---
> v2: Make the fix specific to platforms that don't use l2x0_disable().
> v1: https://patchwork.kernel.org/patch/2974431/
> ---
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: linaro-kernel at lists.linaro.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-omap at vger.kernel.org
> ---
> arch/arm/mach-highbank/highbank.c | 1 +
> arch/arm/mach-highbank/pm.c | 1 -
> arch/arm/mach-omap2/omap4-common.c | 1 +
> 3 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
> index 8e63ccd..22e6f34 100644
> --- a/arch/arm/mach-highbank/highbank.c
> +++ b/arch/arm/mach-highbank/highbank.c
> @@ -63,6 +63,7 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr)
>
> static void highbank_l2x0_disable(void)
> {
> + outer_flush_all();
> /* Disable PL310 L2 Cache controller */
> highbank_smc1(0x102, 0x0);
> }
> diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c
> index 04eddb4..9a5b8a7 100644
> --- a/arch/arm/mach-highbank/pm.c
> +++ b/arch/arm/mach-highbank/pm.c
> @@ -28,7 +28,6 @@
>
> static int highbank_suspend_finish(unsigned long val)
> {
> - outer_flush_all();
> outer_disable();
>
> highbank_set_pwr_suspend();
> diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
> index 5791143..3f44b16 100644
> --- a/arch/arm/mach-omap2/omap4-common.c
> +++ b/arch/arm/mach-omap2/omap4-common.c
> @@ -163,6 +163,7 @@ void __iomem *omap4_get_l2cache_base(void)
>
> static void omap4_l2x0_disable(void)
> {
> + outer_flush_all();
> /* Disable PL310 L2 Cache controller */
> omap_smc1(0x102, 0x0);
> }
>
next prev parent reply other threads:[~2013-10-04 21:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-04 20:57 [RFC PATCH v2] ARM: OMAP4/highbank: Flush L2 cache before disabling Taras Kondratiuk
2013-10-04 20:57 ` Taras Kondratiuk
2013-10-04 21:47 ` Rob Herring [this message]
2013-10-04 21:47 ` Rob Herring
2013-10-04 22:08 ` Santosh Shilimkar
2013-10-04 22:08 ` Santosh Shilimkar
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=524F3770.1050609@gmail.com \
--to=robherring2@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=rob.herring@calxeda.com \
--cc=taras.kondratiuk@linaro.org \
--cc=will.deacon@arm.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.