mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Cc: hpa@zytor.com, mingo@redhat.com, tglx@linutronix.de,
	davej@redhat.com, boon.leong.ong@intel.com, x86@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] x86: Quark: Add if/else to setup_arch for Quark TLB bug
Date: Fri, 26 Sep 2014 17:59:55 -0300	[thread overview]
Message-ID: <20140926205955.GA22407@khazad-dum.debian.net> (raw)
In-Reply-To: <1411754118-11665-1-git-send-email-pure.logic@nexus-software.ie>

On Fri, 26 Sep 2014, Bryan O'Donoghue wrote:
> Quark X1000 incorrectly advertises PGE. In later stages of boot
> specifically in early_init_intel we setup_clear_cpu_cap for PGE.
> At this point in time cpu_has_pge() will still be true.
> 
> Use the boot_cpu_data to decide if __flush_tlb_all() or __flush_tlb()
> should be called subsequent to loading CR3

...

>  	load_cr3(swapper_pg_dir);
> -	__flush_tlb_all();
> +
> +	/*
> +	 * Flush the TLB after loading CR3
> +	 *
> +	 * Quark X1000 wrongly advertises PGE. Use boot_cpu_data to
> +	 * to make sure ithe TLB is flushed correctly in the early
> +	 * stage of setup_arch() for Quark X1000.
> +	 * X86_FEATURE_PGE flag is only setup later stage at
> +	 * early_cpu_init();
> +	 */
> +	if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
> +	    boot_cpu_data.x86 == 5 && boot_cpu_data.x86_model == 9)
> +		__flush_tlb();
> +	else
> +		__flush_tlb_all();
>  #else
>  	printk(KERN_INFO "Command line: %s\n", boot_command_line);
>  #endif

I'm confused, now.

Wasn't the other patch -- which just added a comment -- the one selected as
a better fix, because there is absolutely no point in calling __flush_tlb()
on Quark X1000 *right after* you just flushed the TLB [on these processors]
by doing a load_cr3() ?

Should this one ([PATCH v2] x86: Quark: Add if/else to setup_arch for Quark
TLB bug) be ignored?  Or should the other one which just adds a comment be
ignored?

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

  reply	other threads:[~2014-09-26 21:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 17:55 Bryan O'Donoghue
2014-09-26 20:59 ` Henrique de Moraes Holschuh [this message]
2014-09-26 21:28   ` Bryan O'Donoghue
2014-09-30  1:46     ` Ong, Boon Leong
2014-09-30  2:27       ` 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=20140926205955.GA22407@khazad-dum.debian.net \
    --to=hmh@hmh.eng.br \
    --cc=boon.leong.ong@intel.com \
    --cc=davej@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pure.logic@nexus-software.ie \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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

all inboxes | Powered by JetHome®