linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: illia.ragozin@grapecom.com (Elijah Ragozin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] [ARM] Feroceon: fix kexec by setting outer_cache.inv_all
Date: Mon, 25 Mar 2013 19:49:11 +0200	[thread overview]
Message-ID: <51508E17.6010701@grapecom.com> (raw)
In-Reply-To: <20130325172113.GC16690@obsidianresearch.com>

Hi Jason,

thanks for your answer.

That's not about the boot path. I have zImage decompression error after 
kexec.

So on this stage boot process is not started yet, enable_l2 is called 
later - after zImage decompressed and started.

Please look at arch/arm/kernel/machine_kexec.c
Just before the run the code which load and run the new kernel we do:
         setup_mm_for_reboot(0);
         flush_cache_all();
         outer_flush_all(); // <- this has no map in cache-feroceon-l2.c 
, do nothing
         outer_disable(); // <- and this has no map in 
cache-feroceon-l2.c , do nothing
         cpu_proc_fin();
         outer_inv_all(); // <- and my patch is supposed to add this 
function, w/o the patch do nothing
         flush_cache_all();
         cpu_reset(reboot_code_buffer_phys);

So there is no actually disable and invalidation cache after the old 
kernel finished and the new one is not started yet, we're not safe to 
relocate and decompress the kernel.

If in your case everything is working could you please send for me 
.config and your kernel version, probably I also miss smth.
But I think the patch is necessary, it just adds the call of function 
used for other ARMs, but missed for Feroceon.
--
BR, Illia.

On 25.03.2013 19:21, Jason Gunthorpe wrote:
> On Sat, Mar 23, 2013 at 10:15:44PM +0200, Elijah Ragozin wrote:
>> Hello,
>>
>> I have a simple fix for kexec on Marvell Feroceon SoC.
>> Originally created and tested on kernel version 2.6.39.2,
>> but appliable for the 3.9 kernel as well.
>> Could you pls review. The patch is below.
> Hmm, I am using kexec on Kirkwood (a Feroceon SOC) and haven't had any
> problems with L2 coherency.. What exactly goes wrong here?
>
> The only reason I could think of that this would make a difference is
> if something along the boot path was turning on/off the L2? However if
> you turn off the L2 then it needs to be invalidated before it is
> turned on again. enable_l2 already does this properly..
>
> Is the decompressor fiddling with the L2?
>
> Jason
>
-- 
Best Regards,
Illia Ragozin.

  reply	other threads:[~2013-03-25 17:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-23 20:15 [PATCH] [ARM] Feroceon: fix kexec by setting outer_cache.inv_all Elijah Ragozin
2013-03-25 17:21 ` Jason Gunthorpe
2013-03-25 17:49   ` Elijah Ragozin [this message]
2013-03-25 18:13     ` Jason Gunthorpe
2013-03-25 18:43       ` Elijah Ragozin

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=51508E17.6010701@grapecom.com \
    --to=illia.ragozin@grapecom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).