lkml.org 
[lkml]   [2014]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: Quark: Flush TLB via CR3 not CR4.PGE in setup_arch()
> It talks about:
>
> + /*
> + * 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();
>
> But it is completely silent on the real reason for why we don't
> need a Quark quirk here, which would be something like:
>
> /*
> * On Quark CPUs we still have the PGE bit set so
> * __flush_tlb_all() is not yet doing what it says - but
> * accidentally we have a cr3 flush here which is what is
> * needed - so there's no need to add a Quark quirk here.
> */
>
> Right?

OK.

IMO.

If we're adding a comment though the first thing the comment ought to
say is what the code does for everybody else - stuff CR3 and flush the
TLB, then it should comment on the exception for Quark.

/*
* Locate the page directory and flush the TLB.
*
* On Quark CPUs we still have the PGE bit set so
* __flush_tlb_all() is not yet doing what it says - but
* accidentally we have a cr3 flush here which is what is
* needed - so there's no need to add a Quark quirk here.
*/

?


\
 
 \ /
  Last update: 2014-09-25 17:41    [W:2.474 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site