]> git.baikalelectronics.ru Git - kernel.git/commit
x86: Quark: Comment setup_arch() to document TLB/PGE bug
authorBryan O'Donoghue <pure.logic@nexus-software.ie>
Tue, 7 Oct 2014 00:19:48 +0000 (01:19 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 8 Oct 2014 08:07:46 +0000 (10:07 +0200)
commit8eb917c041b05f36613f67eaa29132e6054a0a0f
tree5f3cd12038b8a1f784407a4012e35b6035e9ab23
parentef9dd481be1a0629a3e01a9fbcefdb1e095c52f1
x86: Quark: Comment setup_arch() to document TLB/PGE bug

Quark SoC X1000 advertises Page Global Enable for it's
Translation Lookaside Buffer via cpuid. The silicon does not
in fact support PGE and hence will not flush the TLB when CR4.PGE
is rewritten. The Quark documentation makes clear the necessity to
instead rewrite CR3 in order to flush any TLB entries, irrespective
of the state of CR4.PGE or an individual PTE.PGE

See Intel Quark Core DevMan_001.pdf section 6.4.11

In setup.c setup_arch() the code will load_cr3() and then do a
__flush_tlb_all().

On Quark the entire TLB will be flushed at the load_cr3().
The __flush_tlb_all() have no effect and can be safely ignored.

Later on in the boot process we switch off the flag for cpu_has_pge()
which means that subsequent calls to __flush_tlb_all() will
call __flush_tlb() not __flush_tlb_global() flushing the TLB in the
correct way via load_cr3() not CR4.PGE rewrite

This patch documents the behaviour of flushing the TLB for Quark in
setup_arch()

Comment text suggested by Thomas Gleixner

Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Cc: davej@redhat.com
Cc: hmh@hmh.eng.br
Link: http://lkml.kernel.org/r/1412641189-12415-2-git-send-email-pure.logic@nexus-software.ie
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/setup.c