]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
powerpc/powernv: Fix local TLB flush for boot and MCE on POWER9
authorNicholas Piggin <npiggin@gmail.com>
Thu, 6 Jul 2017 10:51:28 +0000 (20:51 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 11 Jul 2017 02:53:53 +0000 (12:53 +1000)
commit41d0c2ecde19cfe93071ed7b979a53ba60b12840
tree53125a7e90771bad98aa47d756a93e4e9fbf91cc
parent3a6a04706fd08eb5677fdfc086e26fcd5eb154f4
powerpc/powernv: Fix local TLB flush for boot and MCE on POWER9

There are two cases outside the normal address space management
where a CPU's local TLB is to be flushed:

  1. Host boot; in case something has left stale entries in the
     TLB (e.g., kexec).

  2. Machine check; to clean corrupted TLB entries.

CPU state restore from deep idle states also flushes the TLB.
However this seems to be a side effect of reusing the boot code to set
CPU state, rather than a requirement itself.

The current flushing has a number of problems with ISA v3.0B:

- The current radix mode of the MMU is not taken into account. tlbiel
  is undefined if the R field does not match the current radix mode.

- ISA v3.0B hash must flush the partition and process table caches.

- ISA v3.0B radix must flush partition and process scoped translations,
  partition and process table caches, and also the page walk cache.

Add POWER9 cases to handle these, with radix vs hash determined by the
host MMU mode.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/cpu_setup_power.S
arch/powerpc/kernel/dt_cpu_ftrs.c
arch/powerpc/kernel/mce_power.c