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

Catalin Marinas catalin.marinas at arm.com
Wed Jan 25 06:32:48 EST 2012


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.

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

-- 
Catalin



More information about the linux-arm-kernel mailing list