From: Tony Lindgren <tony@atomide.com>
To: "Andrew F. Davis" <afd@ti.com>
Cc: Keerthy <j-keerthy@ti.com>, Tero Kristo <t-kristo@ti.com>,
Russell King <rmk+kernel@armlinux.org.uk>,
Santosh Shilimkar <ssantosh@kernel.org>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv3] ARM: omap2+: Revert omap-smp.c changes resetting CPU1 during boot
Date: Mon, 27 Mar 2017 09:43:09 -0700 [thread overview]
Message-ID: <20170327164308.GK10760@atomide.com> (raw)
In-Reply-To: <aa5d7ee3-2e54-2c6c-df5d-b5efff4b365e@ti.com>
* Andrew F. Davis <afd@ti.com> [170327 09:36]:
> On 03/14/2017 01:05 PM, Tony Lindgren wrote:
> > Commit 3251885285e1 ("ARM: OMAP4+: Reset CPU1 properly for kexec") started
> > unconditionally resetting CPU1 because of a kexec boot issue I was seeing
> > earlier on omap4 when doing kexec boot between two different kernel
> > versions.
> >
> > This caused issues on some systems. We should only reset CPU1 as a last
> > resort option, and try to avoid it where possible. Doing an unconditional
> > CPU1 reset causes issues for example when booting a bootloader configured
> > secure OS running on CPU1 as reported by Andrew F. Davis <afd@ti.com>.
> >
> > We can't completely remove the reset of CPU1 as it would break kexec
> > booting from older kernels. But we can limit the CPU1 reset to cases
> > where CPU1 is wrongly parked within the memory area used by the booting
> > kernel. Then later on we can add support for parking CPU1 for kexec out
> > of the SDRAM back to bootrom.
> >
> > So let's first fix the regression reported by Andrew by making CPU1 reset
> > conditional. To do this, we need to:
> >
> > 1. Save configured AUX_CORE_BOOT_1 for later
> >
> > 2. Modify AUX_CORE_BOOT_0 reading code to for HS SoCs to return
> > the whole register instead of the CPU mask
> >
> > 3. Check if CPU1 is wrongly parked into the booting kernel by the
> > previous kernel and reset if needed
> >
>
> I still don't like this style of workaround, if kexec cannot regain
> control of core1 without a hard core reset than kexec should BUG() and
> force the user to reboot to a sane state.
Yes problems still remains. I think the immediate fix there is to
disable kexec during runtime based on some criteria for your use
case rather than BUG() though. Somehow kexec needs to know if CPU1
reset is acceptable, then reset CPU1 before kexec.
> Anyway, this patch does remove the unconditional reset and fixes my
> use-case is some situations (when not using kexec) so:
>
> Tested-by: Andrew F. Davis <afd@ti.com>
OK thanks for testing.
Regards,
Tony
next prev parent reply other threads:[~2017-03-27 16:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 18:05 [PATCHv3] ARM: omap2+: Revert omap-smp.c changes resetting CPU1 during boot Tony Lindgren
2017-03-15 9:41 ` Keerthy
2017-03-27 16:33 ` Andrew F. Davis
2017-03-27 16:43 ` Tony Lindgren [this message]
2017-03-28 11:36 ` Russell King - ARM Linux
2017-03-28 17:09 ` Tony Lindgren
2017-03-28 17:52 ` Andrew F. Davis
2017-03-28 18:51 ` Tony Lindgren
2017-03-28 19:15 ` Russell King - ARM Linux
2017-03-28 20:12 ` Tony Lindgren
2017-03-28 11:33 ` Russell King - ARM Linux
2017-03-28 17:53 ` Andrew F. Davis
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=20170327164308.GK10760@atomide.com \
--to=tony@atomide.com \
--cc=afd@ti.com \
--cc=j-keerthy@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=rmk+kernel@armlinux.org.uk \
--cc=ssantosh@kernel.org \
--cc=t-kristo@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox