From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJwFf-00056B-DS for qemu-devel@nongnu.org; Mon, 04 Jul 2016 01:17:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJwFb-0005lF-CO for qemu-devel@nongnu.org; Mon, 04 Jul 2016 01:16:58 -0400 Date: Mon, 4 Jul 2016 15:17:12 +1000 From: David Gibson Message-ID: <20160704051712.GH2919@voom.fritz.box> References: <1467357013-4039-1-git-send-email-clg@kaod.org> <1467357013-4039-2-git-send-email-clg@kaod.org> <20160704044651.GF2919@voom.fritz.box> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="54u2kuW9sGWg/X+X" Content-Disposition: inline In-Reply-To: <20160704044651.GF2919@voom.fritz.box> Subject: Re: [Qemu-devel] [PATCH 1/4] ppc: simplify ppc_hash64_hpte_page_shift_noslb() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?C=E9dric?= Le Goater Cc: Alexander Graf , Benjamin Herrenschmidt , qemu-devel@nongnu.org, qemu-ppc@nongnu.org --54u2kuW9sGWg/X+X Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 04, 2016 at 02:46:51PM +1000, David Gibson wrote: > On Fri, Jul 01, 2016 at 09:10:10AM +0200, C=E9dric Le Goater wrote: > > The segment page shift parameter is never used. Let's remove it. >=20 > I think I did have a use case for this in mind when I made it, but I > can't remember what it was now. Oh well, we can always add it back > when I remember. I'll apply this to ppc-for-2.7. Actually.. no I won't. There are some problems in the later patches in this series, and to fix this correctly we're going to need that slb_pshift return value after all. >=20 > >=20 > > Signed-off-by: C=E9dric Le Goater > > --- > > hw/ppc/spapr_hcall.c | 4 ++-- > > target-ppc/mmu-hash64.c | 6 +----- > > target-ppc/mmu-hash64.h | 3 +-- > > 3 files changed, 4 insertions(+), 9 deletions(-) > >=20 > > diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c > > index e011ed4b664b..73af112e1d36 100644 > > --- a/hw/ppc/spapr_hcall.c > > +++ b/hw/ppc/spapr_hcall.c > > @@ -83,12 +83,12 @@ static target_ulong h_enter(PowerPCCPU *cpu, sPAPRM= achineState *spapr, > > target_ulong pte_index =3D args[1]; > > target_ulong pteh =3D args[2]; > > target_ulong ptel =3D args[3]; > > - unsigned apshift, spshift; > > + unsigned apshift; > > target_ulong raddr; > > target_ulong index; > > uint64_t token; > > =20 > > - apshift =3D ppc_hash64_hpte_page_shift_noslb(cpu, pteh, ptel, &sps= hift); > > + apshift =3D ppc_hash64_hpte_page_shift_noslb(cpu, pteh, ptel); > > if (!apshift) { > > /* Bad page size encoding */ > > return H_PARAMETER; > > diff --git a/target-ppc/mmu-hash64.c b/target-ppc/mmu-hash64.c > > index fa26ad2e875b..7d056c1e3b4a 100644 > > --- a/target-ppc/mmu-hash64.c > > +++ b/target-ppc/mmu-hash64.c > > @@ -610,14 +610,12 @@ static unsigned hpte_page_shift(const struct ppc_= one_seg_page_size *sps, > > } > > =20 > > unsigned ppc_hash64_hpte_page_shift_noslb(PowerPCCPU *cpu, > > - uint64_t pte0, uint64_t pte1, > > - unsigned *seg_page_shift) > > + uint64_t pte0, uint64_t pte1) > > { > > CPUPPCState *env =3D &cpu->env; > > int i; > > =20 > > if (!(pte0 & HPTE64_V_LARGE)) { > > - *seg_page_shift =3D 12; > > return 12; > > } > > =20 > > @@ -635,12 +633,10 @@ unsigned ppc_hash64_hpte_page_shift_noslb(PowerPC= CPU *cpu, > > =20 > > shift =3D hpte_page_shift(sps, pte0, pte1); > > if (shift) { > > - *seg_page_shift =3D sps->page_shift; > > return shift; > > } > > } > > =20 > > - *seg_page_shift =3D 0; > > return 0; > > } > > =20 > > diff --git a/target-ppc/mmu-hash64.h b/target-ppc/mmu-hash64.h > > index 13ad060cfefb..f625de03da44 100644 > > --- a/target-ppc/mmu-hash64.h > > +++ b/target-ppc/mmu-hash64.h > > @@ -17,8 +17,7 @@ void ppc_hash64_tlb_flush_hpte(PowerPCCPU *cpu, > > target_ulong pte_index, > > target_ulong pte0, target_ulong pte1); > > unsigned ppc_hash64_hpte_page_shift_noslb(PowerPCCPU *cpu, > > - uint64_t pte0, uint64_t pte1, > > - unsigned *seg_page_shift); > > + uint64_t pte0, uint64_t pte1= ); > > #endif > > =20 > > /* >=20 --=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 --54u2kuW9sGWg/X+X Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXefFYAAoJEGw4ysog2bOSCqsP/RVgqGkn6h2H7mQlf5YvULjd vLnLJ9g+Ge83rkrnfqVgJG3BrO709OuKednjcr7DgWCEbR89NzKUCo1fDg1YLpF5 MmxVhR8gxLZZjveL/P7lmb8f4WbutUJq0l+wp77X6gT0UtI2v77pyFwpHc3rWY2U owxFGfjQPQKZtRXNPdqkwOP4z96pTq5wvBGCQqTFAANpv+7FPAHDzPrRZr2UKcDd goVkWVScqd4gr5uAlkTqzVEXHoWsZxO0Ou9g2C8g9dBSJqNfPMDuCT4WiO5TP9ad hx7ldRAeB9mLCb1DZqpmLfGIUz4fgSr+YUqMxU6AZh112CAziHLvC6l88KWeoy05 WWpBWCCgndJ+wqxNYSGxivOef2gp2lcpkImQFKkgYYbVWuk7APUHim/VyBiZ3eo9 cDZ0UH4F02fGFYLd0AAZfOBExc/dtu3PRcgnIL+47ZoHSVRxNqGqxUq6fiHDXZd4 J+2EfxPT913SI24j4+1VDobVb/phqFQJx2HuV4vMUi+abt6wHeBofee4n8quwor0 n9UcydKewKc5WdAAND+IrmII+i+74aNJmU4fsZjeZ/MX6OWqapNz8/hHXOSqo/fw sbED9zKj22XbVG1YucoaAz4EGDvu62M1xwZoiKDqUufXJrp13aBj6U785NdkX+wv ND7dy78xaxPr1XL6k8VU =azHv -----END PGP SIGNATURE----- --54u2kuW9sGWg/X+X--