On 10/06/2017 12:10 PM, David Gibson wrote: > On Fri, Oct 06, 2017 at 11:53:30AM +0200, Benjamin Herrenschmidt wrote: >> On Fri, 2017-10-06 at 20:07 +1100, David Gibson wrote: >>> Hm. Checking mmu_model doesn't seem right to me. I mean, it'll get >>> the right answer in practice, but the LPCR programming has nothing >>> whatsoever to do with the MMU. >>> >>> I think explicitly checking if cpu_ is a POWER9 instance with >>> object_dynamic_cast would be a better option. >> >> Best is ARCH 300 ... do we hvae arch versions outside of MMU model >> these days ? > > Not that I could spot easily. Apart from implicitly in the cpu > family. >
how about : pcc->pvr_match(pcc, CPU_POWERPC_LOGICAL_3_00); C.