From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJwFf-00056A-Cs 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-0005l9-5J for qemu-devel@nongnu.org; Mon, 04 Jul 2016 01:16:58 -0400 Date: Mon, 4 Jul 2016 14:46:51 +1000 From: David Gibson Message-ID: <20160704044651.GF2919@voom.fritz.box> References: <1467357013-4039-1-git-send-email-clg@kaod.org> <1467357013-4039-2-git-send-email-clg@kaod.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3yNHWXBV/QO9xKNm" Content-Disposition: inline In-Reply-To: <1467357013-4039-2-git-send-email-clg@kaod.org> 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 --3yNHWXBV/QO9xKNm Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. 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. >=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, sPAPRMac= hineState *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, &spshi= ft); > + 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_on= e_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(PowerPCCP= U *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 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 --3yNHWXBV/QO9xKNm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXeeo7AAoJEGw4ysog2bOSyBIP+QH0kHImsEkrliGEjR8CvO7P qW27oKLN0yjk1ExA1YFhy2okRC2A3flXxvW6VCbqm2upmWwbHSJrqLmFjm/ugaQR GZzyVzS9BfgpVdU9ewrIuXYW2Wzt1t22yu9M+Yvrc0fUZsJrEtWCesHWEQvWOKAv n7bHeo/HvHcXm+VMbdn5b6Lcolto9G49UmaBVitOq+4iqH1Z/Jn2MAQmPRweCjAd d8L7gGqWdVj9ZO/wOUhRdtxkX1uMa9UVaKDXTiCLYNGvKk+u/xa48KStIfyfb8m+ wJ+johm97kqQFccu3r/C1xRhKk8orHnBVb7HCnTs7/Qp3FAF7MOT99NeXIlgVGrJ t38uQN3kX4GLYuoB5aHN+sTVa8WaF9K1x7DprZVtTShs8Vc0xmNn3oq1P+A8N77R g/y4VMRMXeWSQELHRzunh4GrcmcnwhZIPvj+Sco32/V1eTsxkjt6Y8Gcpclqq01w 8lyHdWtWGRjSjKbjDtBhB/t93Y792YOR/I1KuHLubTfgMUQzWWMh14fzhSGuB3Gw V8npFpMBuU2ikZwrs0L1qUGEpNyV8zky+GhXv3LSvJ6BLMztXp1khKcRS1SJMLhx RydUV4QAdfLeATOmGX1YRmH+TjSdPh6ZLRYhQQLVRYzLSCpAvfKHmYxTAubr7CQN +HnvOOozphD6ysDIJ061 =Ef88 -----END PGP SIGNATURE----- --3yNHWXBV/QO9xKNm--