[PATCH 3/5] ARM: pgtable: consolidate set_pte_ext(TOP_PTE, ...) + tlb flush

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Jan 26 15:08:02 EST 2012


On Wed, Jan 25, 2012 at 11:32:48AM +0000, Catalin Marinas wrote:
> On 20 January 2012 10:35, Russell King - ARM Linux
> <linux at arm.linux.org.uk> wrote:
> > A number of places establish a PTE in our top page table and
> > immediately flush the TLB.  Rather than having this at every callsite,
> > provide an inline function for this purpose.
> ...
> > +static inline void set_top_pte(unsigned long va, pte_t pte)
> > +{
> > +       set_pte_ext(TOP_PTE(va), pte, 0);
> > +       local_flush_tlb_kernel_page(va);
> > +}
> 
> There is a difference with some of the call sites where the
> flush_tlb_kernel_page() was used instead of the local variant. The pte
> set up via set_top_pte() is indeed accessed on a single CPU and there
> are locks around that would prevent migration (with CONFIG_PREEMPT).
> So I don't see any problem with this.

That was indeed part of the intention.  I've added a note to the
description to that effect.

> Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>
> 
> -- 
> Catalin



More information about the linux-arm-kernel mailing list