All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/64s: Minor fix for MCE TLB flush for radix
@ 2017-04-16 14:21 Nicholas Piggin
  2017-04-17  5:20 ` Aneesh Kumar K.V
  2017-04-19 22:04 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Nicholas Piggin @ 2017-04-16 14:21 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Nicholas Piggin, Aneesh Kumar K . V

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@gmail.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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] powerpc/64s: Minor fix for MCE TLB flush for radix
  2017-04-16 14:21 [PATCH] powerpc/64s: Minor fix for MCE TLB flush for radix Nicholas Piggin
@ 2017-04-17  5:20 ` Aneesh Kumar K.V
  2017-04-19 22:04 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Aneesh Kumar K.V @ 2017-04-17  5:20 UTC (permalink / raw)
  To: Nicholas Piggin, linuxppc-dev; +Cc: Nicholas Piggin

Nicholas Piggin <npiggin@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@gmail.com>

Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: powerpc/64s: Minor fix for MCE TLB flush for radix
  2017-04-16 14:21 [PATCH] powerpc/64s: Minor fix for MCE TLB flush for radix Nicholas Piggin
  2017-04-17  5:20 ` Aneesh Kumar K.V
@ 2017-04-19 22:04 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2017-04-19 22:04 UTC (permalink / raw)
  To: Nicholas Piggin, linuxppc-dev; +Cc: Aneesh Kumar K . V, Nicholas Piggin

On Sun, 2017-04-16 at 14:21:19 UTC, Nicholas Piggin wrote:
> 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@gmail.com>
> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/95dbdf4fa09823e35b29eab8f70939

cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-19 22:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-16 14:21 [PATCH] powerpc/64s: Minor fix for MCE TLB flush for radix Nicholas Piggin
2017-04-17  5:20 ` Aneesh Kumar K.V
2017-04-19 22:04 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.