From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: vfp: always clear vfp_current_hw_state when forcing reload
Date: Fri, 11 Oct 2013 13:07:29 +0100 [thread overview]
Message-ID: <20131011120729.GW25034@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAFUV4K1CkzGZVEwkXGX38jG0HxerqQq--d-qFiqF9J6wi88xYQ@mail.gmail.com>
On Thu, Oct 10, 2013 at 11:00:18AM -0500, Yuanyuan ZHONG wrote:
> Hi Russell, et al
>
> If there is no further comments, I'll submit it to patch system.
> Thanks.
No, I still don't agree with your patch as being the correct fix. Look
at the code that you're creating:
if (vfp_state_in_hw(cpu, thread)) {
fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
vfp_current_hw_state[cpu] = NULL;
}
#ifdef CONFIG_SMP
thread->vfpstate.hard.cpu = NR_CPUS;
vfp_current_hw_state[cpu] = NULL;
#endif
So when SMP is enabled we unconditionally blat out the vfp_current_hw_state
pointer for this CPU?
What actually needs fixing is the call to this function in the hotplug
thread:
vfp_force_reload((long)hcpu, current_thread_info());
I'd suggest this becomes:
unsigned cpu = (long)hcpu;
if (vfp_current_hw_state[cpu])
vfp_force_reload(cpu, vfp_current_hw_state[cpu]);
That will force the right hw_state to be forced to reload, rather than
passing in the wrong thread state.
next prev parent reply other threads:[~2013-10-11 12:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-02 21:59 [PATCH] arm: vfp: always clear vfp_current_hw_state when forcing reload Yuanyuan Zhong
2013-10-02 22:11 ` Russell King - ARM Linux
2013-10-02 22:21 ` Yuanyuan ZHONG
2013-10-10 16:00 ` Yuanyuan ZHONG
2013-10-11 12:07 ` Russell King - ARM Linux [this message]
2013-10-11 16:12 ` Yuanyuan ZHONG
2013-10-11 16:26 ` Russell King - ARM Linux
2013-10-11 18:08 ` Yuanyuan ZHONG
2013-10-13 5:32 ` Yuanyuan ZHONG
2014-01-05 19:48 ` Murali N
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=20131011120729.GW25034@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).