From: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
To: "H. Peter Anvin" <hpa@zytor.com>,
mingo@kernel.org, linux-kernel@vger.kernel.org,
tglx@linutronix.de, stable@vger.kernel.org, bp@alien8.de,
linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/platform] x86/intel/quark: Switch off CR4.PGE so TLB flush uses CR3 instead
Date: Wed, 24 Sep 2014 17:07:12 +0100 [thread overview]
Message-ID: <5422EC30.10206@nexus-software.ie> (raw)
In-Reply-To: <5422EA13.1080706@nexus-software.ie>
On 24/09/14 16:58, Bryan O'Donoghue wrote:
>
>>
>> I believe there is one more change needed: there is a __flush_tlb_all()
>> in the early code which gets executed before the above code runs; the
>> easiest fix is to just add a __flush_tlb() immediately after it.
>>
>> This should have been pushed upstream, and not stayed in the BSP kernel.
>
> Peter.
>
> You're talking about void __init setup_arch() right ?
>
> The code looks like this
>
> load_cr3(swapper_pg_dir);
> __flush_tlb_all();
>
> Note that on Quark the method to invalidate the TLB is by reloading CR3
> - which is immediately prior to __flush_tlb_all();
>
> So __flush_tlb_all(); will do nothing but that's OK since load_cr3()
> already flushed the TLB - including any PTE with PGE set
I take your point though.
It's probably better to be explicit and do the whole
if (quark)
__flush_tlb();
else
__flush_tlb_all();
So that we aren't relying on the side effects of the previous statement.
next prev parent reply other threads:[~2014-09-24 16:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1411514784-14885-1-git-send-email-pure.logic@nexus-software.ie>
[not found] ` <20140924071221.GB990@gmail.com>
2014-09-24 10:15 ` [PATCH] x86: Quark: Switch of CR4.PGE TLB flush use CR3 instead Bryan O'Donoghue
2014-09-24 15:01 ` [tip:x86/platform] x86/intel/quark: Switch off CR4.PGE so TLB flush uses " tip-bot for Bryan O'Donoghue
2014-09-24 15:52 ` H. Peter Anvin
2014-09-24 15:58 ` Bryan O'Donoghue
2014-09-24 16:07 ` Bryan O'Donoghue [this message]
2014-09-24 18:42 ` H. Peter Anvin
2014-09-24 18:43 ` H. Peter Anvin
2014-09-24 20:22 ` Bryan O'Donoghue
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=5422EC30.10206@nexus-software.ie \
--to=pure.logic@nexus-software.ie \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
/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.