[PATCH 3/3] powerpc/mm/radix: Flush page walk cache when freeing page table
Aneesh Kumar K.V
aneesh.kumar at linux.vnet.ibm.com
Fri Jun 3 12:59:53 AEST 2016
Benjamin Herrenschmidt <benh at kernel.crashing.org> writes:
> On Thu, 2016-06-02 at 15:16 +0530, Aneesh Kumar K.V wrote:
>>
>>
>> +/*
>> + * flush the page walk cache for the address
>> + */
>> +void flush_tlb_pgtable(struct mmu_gather *tlb, unsigned long address)
>> +{
>> + struct mm_struct *mm = tlb->mm;
>> + /*
>> + * flush the page table walk cache on freeing page table. We already
>> + * have marked the upper/higher level page table entry none by now.
>> + * So it is safe to flush PWC here.
>> + */
>> + if (!radix_enabled())
>> + return;
>> + radix__flush_tlb_mm_pwc(mm);
>
> That means that on hash, we pay the price of a useless function call
> and return. Shouldn't we put the radix_enabled() test in the caller
> instead ?
>
I wil convert that to static inline.
-aneesh
More information about the Linuxppc-dev
mailing list