From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIsb7-0004PD-6t for qemu-devel@nongnu.org; Fri, 01 Jul 2016 03:10:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIsb2-00076Q-1w for qemu-devel@nongnu.org; Fri, 01 Jul 2016 03:10:44 -0400 Received: from 8.mo53.mail-out.ovh.net ([87.98.185.57]:36502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIsb1-000760-LQ for qemu-devel@nongnu.org; Fri, 01 Jul 2016 03:10:39 -0400 Received: from player158.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo53.mail-out.ovh.net (Postfix) with ESMTP id CD5D7FF8801 for ; Fri, 1 Jul 2016 09:10:38 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Fri, 1 Jul 2016 09:10:10 +0200 Message-Id: <1467357013-4039-2-git-send-email-clg@kaod.org> In-Reply-To: <1467357013-4039-1-git-send-email-clg@kaod.org> References: <1467357013-4039-1-git-send-email-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [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: David Gibson Cc: Alexander Graf , Benjamin Herrenschmidt , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= The segment page shift parameter is never used. Let's remove it. Signed-off-by: C=C3=A9dric 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(-) 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 2.1.4