Re: [PATCH 3/3] x86: Quark: Comment setup_arch for TLB/PGE bugfix

From: Thomas Gleixner
Date: Tue Sep 30 2014 - 16:03:36 EST


On Tue, 30 Sep 2014, Bryan O'Donoghue wrote:
>
> + /*
> + * Locate the page directory and flush the TLB.

s/Locate/Load/ ?

Thats what we do here. CR3 is used by the CPU to locate the page
directory.

> + *
> + * On Quark X1000 CPUs we still have the PGE bit incorrectly set
> + * due to a processor erratum, so __flush_tlb_all() is not yet
> + * doing what it says. Fortunately we have a cr3 load here,
> + * which is what is needed on this processor to flush TLBs, so
> + * there's no need to add a Quark X1000 quirk here.
> + *
> + * early_init_intel will unset the X86_FEATURE_PGE flag later
> + * and __flush_tlb_all() will flush via cr3

Can we please write that a bit less convoluted?

> + */
> load_cr3(swapper_pg_dir);

/*
* Note: Quark X1000 CPUs advertise PGE incorrectly and require
* a cr3 based tlb flush, so the following __flush_tlb_all()
* will not flush anything because the cpu quirk which clears
* X86_FEATURE_PGE has not been invoked yet. Though due to the
* load_cr3() above the TLB has been flushed already. The
* quirk is invoked before subsequent calls to __flush_tlb_all()
* so proper operation is guaranteed.
*/
> __flush_tlb_all();

Thanks,

tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/