On Mon, 24 Apr 2017 10:13:23 +1000 Benjamin Herrenschmidt <b...@kernel.crashing.org> wrote:
> On Sun, 2017-04-23 at 19:57 +1000, Nicholas Piggin wrote: > > On Sun, 23 Apr 2017 10:39:11 +1000 > > Benjamin Herrenschmidt <b...@kernel.crashing.org> wrote: > > > > > On Sun, 2017-04-23 at 09:14 +1000, Nicholas Piggin wrote: > > > > I think we were going to take another look at moving the setup > > > > code > > > > later, but I think that might wait until 4.13. > > > > > > Except without that we won't boot a post-P9 CPU right ? So we'll > > > end up > > > having to chase distros to backport it :-( Oh well... > > > > Okay, well what if we just move the TLB flushing to somewhere like > > early_init_mmu(_secondary) for power CPUs first? > > > > Non-local tlbie does not seem to have this requirement, so would it > > make it more robust just to execute that once during boot with the > > primary thread? > > I wouldn't do a broadcast before we have LPCR setup... but for no > obvious reason. Also I'm not sure our boot time cleanup does things > properly vs hash & radix. I think we really need 2 passes. I'm just trying to look at the best thing to do for this. In fact we already do broadcast tlbie before all CPUs have their LPCR and other MMU related registers all set up properly (e.g., in update_hid_for_radix / hash and radix_init_pgtable). I was looking at doing a local TLB flush for appropriate machine and MMU mode right at the end of early_init_mmu/early_init_mmu_secondary, so after all registers are set, but before relocation is switched on. Would that be preferable for you? For the next release at least we would just leave in existing earlier flushes too, I guess. Thanks, Nick