[PATCH] powerpc/64s: Minor fix for MCE TLB flush for radix
Aneesh Kumar K.V
aneesh.kumar at linux.vnet.ibm.com
Mon Apr 17 15:20:20 AEST 2017
Nicholas Piggin <npiggin at gmail.com> writes:
> The TLB flush for radix first flushes TLB for radix configuration,
> then flushes for hash configuration. The second flush is unnecessary
> but does not affect correctness.
>
> Fixes: 1a472c9dba6b9 ("powerpc/mm/radix: Add tlbflush routines")
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>
> ---
> arch/powerpc/kernel/mce_power.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/kernel/mce_power.c b/arch/powerpc/kernel/mce_power.c
> index 763d6f58caa8..7b765aa9f2ff 100644
> --- a/arch/powerpc/kernel/mce_power.c
> +++ b/arch/powerpc/kernel/mce_power.c
> @@ -72,10 +72,13 @@ void __flush_tlb_power8(unsigned int action)
>
> void __flush_tlb_power9(unsigned int action)
> {
> - if (radix_enabled())
> - flush_tlb_206(POWER9_TLB_SETS_RADIX, action);
> + unsigned int num_sets;
>
> - flush_tlb_206(POWER9_TLB_SETS_HASH, action);
> + if (radix_enabled())
> + num_sets = POWER9_TLB_SETS_RADIX;
> + else
> + num_sets = POWER9_TLB_SETS_HASH;
> + flush_tlb_206(num_sets, action);
> }
>
>
> --
> 2.11.0
More information about the Linuxppc-dev
mailing list