mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86: Quark: Add comment on TLB flush to setup_arch
@ 2014-09-24 20:26 Bryan O'Donoghue
  2014-09-25  4:54 ` [tip:x86/platform] x86/intel/quark: Add comment on TLB flush to setup_arch() tip-bot for Bryan O'Donoghue
  0 siblings, 1 reply; 2+ messages in thread
From: Bryan O'Donoghue @ 2014-09-24 20:26 UTC (permalink / raw)
  To: hpa, mingo, tglx, x86; +Cc: linux-kernel, pure.logic

Quark X1000 requires CR3 to be rewritten to flush TLB entries
irrespective of the PGE bits in CR4 or PTE.PGE

Add a comment to setup_arch to indicate that the code

load_cr3(swapper_pg_dir);
__flush_tlb_all();

Will already have flushed the TLB @ the CR3 reload allowing us
to skip over a potential if/else for Quark

Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
---
 arch/x86/kernel/setup.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 41ead8d..e7d7f6e 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -878,6 +878,11 @@ void __init setup_arch(char **cmdline_p)
 			initial_page_table + KERNEL_PGD_BOUNDARY,
 			KERNEL_PGD_PTRS);
 
+	/*
+	 * Locate the page directory and flush the TLB.
+	 * On Quark X1000 rewriting CR3 flushes the TLB no if/else is required
+	 * to choose between __flush_tlb() and __flush_tlb_all()
+	 */
 	load_cr3(swapper_pg_dir);
 	__flush_tlb_all();
 #else
-- 
1.9.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:x86/platform] x86/intel/quark: Add comment on TLB flush to setup_arch()
  2014-09-24 20:26 [PATCH] x86: Quark: Add comment on TLB flush to setup_arch Bryan O'Donoghue
@ 2014-09-25  4:54 ` tip-bot for Bryan O'Donoghue
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Bryan O'Donoghue @ 2014-09-25  4:54 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, pure.logic, tglx

Commit-ID:  02276a3a677d681f0cd227d7111c71fdbce23832
Gitweb:     http://git.kernel.org/tip/02276a3a677d681f0cd227d7111c71fdbce23832
Author:     Bryan O'Donoghue <pure.logic@nexus-software.ie>
AuthorDate: Wed, 24 Sep 2014 21:26:03 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 25 Sep 2014 06:52:15 +0200

x86/intel/quark: Add comment on TLB flush to setup_arch()

Quark X1000 requires CR3 to be rewritten to flush TLB entries
irrespective of the PGE bits in CR4 or PTE.PGE.

Add a comment to setup_arch() to indicate that the code:

  load_cr3(swapper_pg_dir);
  __flush_tlb_all();

Will already have flushed the TLB @ the CR3 reload allowing us
to skip over a potential if/else for Quark.

Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Link: http://lkml.kernel.org/r/1411590363-8052-1-git-send-email-pure.logic@nexus-software.ie
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/setup.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 41ead8d..e7d7f6e 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -878,6 +878,11 @@ void __init setup_arch(char **cmdline_p)
 			initial_page_table + KERNEL_PGD_BOUNDARY,
 			KERNEL_PGD_PTRS);
 
+	/*
+	 * Locate the page directory and flush the TLB.
+	 * On Quark X1000 rewriting CR3 flushes the TLB no if/else is required
+	 * to choose between __flush_tlb() and __flush_tlb_all()
+	 */
 	load_cr3(swapper_pg_dir);
 	__flush_tlb_all();
 #else

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-25  4:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-24 20:26 [PATCH] x86: Quark: Add comment on TLB flush to setup_arch Bryan O'Donoghue
2014-09-25  4:54 ` [tip:x86/platform] x86/intel/quark: Add comment on TLB flush to setup_arch() tip-bot for Bryan O'Donoghue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome