From patchwork Wed Mar 6 03:43:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 225259 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B41AA2C0376 for ; Wed, 6 Mar 2013 14:46:21 +1100 (EST) Received: from localhost ([::1]:51288 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UD5J5-0004Zk-VI for incoming@patchwork.ozlabs.org; Tue, 05 Mar 2013 22:46:19 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UD5Hl-00047S-Jg for qemu-devel@nongnu.org; Tue, 05 Mar 2013 22:45:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UD5Hd-0007nL-FX for qemu-devel@nongnu.org; Tue, 05 Mar 2013 22:44:57 -0500 Received: from ozlabs.org ([2402:b800:7003:1:1::1]:47802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UD5Hd-0007mS-2g; Tue, 05 Mar 2013 22:44:49 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id DC2222C0377; Wed, 6 Mar 2013 14:44:41 +1100 (EST) From: David Gibson To: agraf@suse.de Date: Wed, 6 Mar 2013 14:43:50 +1100 Message-Id: <1362541473-4365-3-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1362541473-4365-1-git-send-email-david@gibson.dropbear.id.au> References: <1362541473-4365-1-git-send-email-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2402:b800:7003:1:1::1 Cc: David Gibson , qemu-ppc@nongnu.org, afaerber@suse.de, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 02/45] target-ppc: Trivial cleanups in mmu_helper.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This removes the never-used pte64_invalidate() function, and makes ppcmas_tlb_check() static, since it's only used within that file. Signed-off-by: David Gibson --- target-ppc/cpu.h | 3 --- target-ppc/mmu_helper.c | 11 +++-------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index dc1fccb..475f75e 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -1188,9 +1188,6 @@ void store_40x_dbcr0 (CPUPPCState *env, uint32_t val); void store_40x_sler (CPUPPCState *env, uint32_t val); void store_booke_tcr (CPUPPCState *env, target_ulong val); void store_booke_tsr (CPUPPCState *env, target_ulong val); -int ppcmas_tlb_check(CPUPPCState *env, ppcmas_tlb_t *tlb, - hwaddr *raddrp, target_ulong address, - uint32_t pid); void ppc_tlb_invalidate_all (CPUPPCState *env); void ppc_tlb_invalidate_one (CPUPPCState *env, target_ulong addr); #endif diff --git a/target-ppc/mmu_helper.c b/target-ppc/mmu_helper.c index 2f01b31..3570e91 100644 --- a/target-ppc/mmu_helper.c +++ b/target-ppc/mmu_helper.c @@ -98,11 +98,6 @@ static inline int pte64_is_valid(target_ulong pte0) { return pte0 & 0x0000000000000001ULL ? 1 : 0; } - -static inline void pte64_invalidate(target_ulong *pte0) -{ - *pte0 &= ~0x0000000000000001ULL; -} #endif #define PTE_PTEM_MASK 0x7FFFFFBF @@ -1309,9 +1304,9 @@ static hwaddr booke206_tlb_to_page_size(CPUPPCState *env, } /* TLB check function for MAS based SoftTLBs */ -int ppcmas_tlb_check(CPUPPCState *env, ppcmas_tlb_t *tlb, - hwaddr *raddrp, - target_ulong address, uint32_t pid) +static int ppcmas_tlb_check(CPUPPCState *env, ppcmas_tlb_t *tlb, + hwaddr *raddrp, + target_ulong address, uint32_t pid) { target_ulong mask; uint32_t tlb_pid;