From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOfuv-0007TF-72 for qemu-devel@nongnu.org; Thu, 28 Jan 2016 01:18:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOfut-0003bF-HN for qemu-devel@nongnu.org; Thu, 28 Jan 2016 01:18:53 -0500 Date: Thu, 28 Jan 2016 16:55:27 +1100 From: David Gibson Message-ID: <20160128055527.GB23043@voom.redhat.com> References: <1453889591-30968-1-git-send-email-david@gibson.dropbear.id.au> <1453889591-30968-7-git-send-email-david@gibson.dropbear.id.au> <1453954838.3148.51.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lEGEL1/lMxI0MVQ2" Content-Disposition: inline In-Reply-To: <1453954838.3148.51.camel@kernel.crashing.org> Subject: Re: [Qemu-devel] [PATCHv2 06/10] target-ppc: Remove unused mmu models from ppc_tlb_invalidate_one List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt Cc: lvivier@redhat.com, thuth@redhat.com, aik@ozlabs.ru, agraf@suse.de, qemu-devel@nongnu.org, qemu-ppc@nongnu.org --lEGEL1/lMxI0MVQ2 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 28, 2016 at 03:20:38PM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2016-01-27 at 21:13 +1100, David Gibson wrote: > > ppc_tlb_invalidate_one() has a big switch handling many different MMU > > types.=A0=A0However, most of those branches can never be reached: > >=20 > > It is called from 3 places: from remove_hpte() and h_protect() in > > spapr_hcall.c (which always has a 64-bit hash MMU type), and from > > helper_tlbie() in mmu_helper.c. > >=20 > > Calls to helper_tlbie() are generated from gen_tlbiel, gen_tlbiel and > > gen_tlbiva.=A0=A0The first two are only used with the PPC_MEM_TLBIE fla= g, > > set only with 32-bit or 64-bit hash MMU models, and gen_tlbiva() is > > used only on 440 and 460 models with the BookE mmu model. > >=20 > > These means the exhaustive list of MMU types which may call > > ppc_tlb_invalidate_one() is: POWERPC_MMU_SOFT_6xx, POWERPC_MMU_601, > > POWERPC_MMU_32B, POWERPC_MMU_SOFT_74xx, POWERPC_MMU_64B, > > POWERPC_MMU_2_03, > > POWERPC_MMU_2_06, POWERPC_MMU_2_07 and POWERPC_MMU_BOOKE. > >=20 > > Clean up by removing logic for all other MMU types from > > ppc_tlb_invalidate_one(). >=20 > I would argue to move hash64 out of it as well anyway. First what we do > in there is dumb, but the way I change it with lazy inval differs and > tlbie does provide additional information on server processors that > we would need should we chose to implemented fine grained invalidations > (such as the page size). I agree, but I didn't want to postpone the current things I'm working on while I did that. =20 > In the meantime: >=20 > Acked-by: Benjamin Herrenschmidt --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --lEGEL1/lMxI0MVQ2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWqa1PAAoJEGw4ysog2bOSVuUQAMu3YJ/SAm/XtkPvDnP5X0e9 DqFfqzwSrzMrGLtVuyr3L6koh9SGArMc+m/4au7wK6GlMOZ96mT18mkols6p+xOJ gm3gtw16JPVmM4/ZRk2Sft/qpmnxaeeQ8YKTOM3sEvdg+RBGjPR0EtfgN/6qGca0 tEgwq63cvRjsslhqMInNxZxil+9NmT3K0BkM1/VOEjsVutTzHZ4PQkPo/aIAgLpv HQq+ck7KMTZwdaRx+vmtOH7yfUW9tIHweD7F7P0Hdj1ytAWhCwUrVhf7V72QRCjW YZCEzUmiRMrCePnao9Kr+UzER9TfThYLRa+HJzOCIhzm6poEBRk2hVpbtww4qJjC JJcOYoP5+hpAvcQCm/aMpWsVTNLVLmstltOpZsJotMynx81fMVUuHJQcPExkoxmw f84KP7qcF92ARaOfQFZ/aziPgF3VADkhYfZ0a8ykfNJeRo7Ly8nusERpwBB+SwAg tROLgAdRv/uJb3gjTGxsj9n1hJG+qqXroVqPF2CNIRSk/b2Zodbzit3+MdEf+I1x XkK/bExA+QNZ7R4nyl7tGJliVMcJc/P7/KQFa4+F9+Guw7Yz/Fz6jIluWSfQT+Ba Q0QNH+i47RA5pkX6tq1SlthAshzOQxp7dIpAtNszMjY7V3fwulEt2nyOEbpQ9nA7 cJ+PQ8RN3HRqj9xC1LQ8 =nzDz -----END PGP SIGNATURE----- --lEGEL1/lMxI0MVQ2--