From patchwork Mon Apr 30 09:01:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 155816 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 B81EFB6F13 for ; Mon, 30 Apr 2012 19:01:26 +1000 (EST) Received: from localhost ([::1]:37365 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOmU0-0002v5-M1 for incoming@patchwork.ozlabs.org; Mon, 30 Apr 2012 05:01:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOmTq-0002kq-C4 for qemu-devel@nongnu.org; Mon, 30 Apr 2012 05:01:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SOmTo-00010N-Dk for qemu-devel@nongnu.org; Mon, 30 Apr 2012 05:01:13 -0400 Received: from cantor2.suse.de ([195.135.220.15]:54855 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOmTo-00010A-3u; Mon, 30 Apr 2012 05:01:12 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id A7059A39CE; Mon, 30 Apr 2012 11:01:10 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1257) From: Alexander Graf In-Reply-To: Date: Mon, 30 Apr 2012 11:01:09 +0200 Message-Id: <4AFA7960-86F9-42F0-A58F-804F553B002F@suse.de> References: To: Blue Swirl X-Mailer: Apple Mail (2.1257) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: qemu-ppc@nongnu.org, qemu-devel Subject: Re: [Qemu-devel] [PATCH 14/22] ppc: cleanup MMU merge 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 On 22.04.2012, at 15:25, Blue Swirl wrote: > Remove useless wrappers. In some cases 'int' parameters are > changed to uint32_t. > > Make internal functions static. > > Signed-off-by: Blue Swirl > --- > target-ppc/cpu.h | 22 --------- > target-ppc/mmu_helper.c | 122 ++++++++++++++--------------------------------- > 2 files changed, 36 insertions(+), 108 deletions(-) > > diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h > index 6216fd9..46204dc 100644 > --- a/target-ppc/cpu.h > +++ b/target-ppc/cpu.h > @@ -1118,24 +1118,10 @@ void do_interrupt (CPUPPCState *env); > void ppc_hw_interrupt (CPUPPCState *env); > > #if !defined(CONFIG_USER_ONLY) > -void ppc6xx_tlb_store (CPUPPCState *env, target_ulong EPN, int way, > int is_code, > - target_ulong pte0, target_ulong pte1); > -void ppc_store_ibatu (CPUPPCState *env, int nr, target_ulong value); > -void ppc_store_ibatl (CPUPPCState *env, int nr, target_ulong value); > -void ppc_store_dbatu (CPUPPCState *env, int nr, target_ulong value); > -void ppc_store_dbatl (CPUPPCState *env, int nr, target_ulong value); > -void ppc_store_ibatu_601 (CPUPPCState *env, int nr, target_ulong value); > -void ppc_store_ibatl_601 (CPUPPCState *env, int nr, target_ulong value); > void ppc_store_sdr1 (CPUPPCState *env, target_ulong value); > #if defined(TARGET_PPC64) > void ppc_store_asr (CPUPPCState *env, target_ulong value); > -target_ulong ppc_load_slb (CPUPPCState *env, int slb_nr); > -target_ulong ppc_load_sr (CPUPPCState *env, int sr_nr); > -int ppc_store_slb (CPUPPCState *env, target_ulong rb, target_ulong rs); This function is used by kvm on ppc64. I'll just quickly merge this patch with yours: Alex diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 46204dc..b034d6b 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -1121,6 +1121,7 @@ void ppc_hw_interrupt (CPUPPCState *env); void ppc_store_sdr1 (CPUPPCState *env, target_ulong value); #if defined(TARGET_PPC64) void ppc_store_asr (CPUPPCState *env, target_ulong value); +int ppc_store_slb (CPUPPCState *env, target_ulong rb, target_ulong rs); #endif /* defined(TARGET_PPC64) */ #endif /* !defined(CONFIG_USER_ONLY) */ void ppc_store_msr (CPUPPCState *env, target_ulong value); diff --git a/target-ppc/mmu_helper.c b/target-ppc/mmu_helper.c index 36eaab6..2260c1d 100644 --- a/target-ppc/mmu_helper.c +++ b/target-ppc/mmu_helper.c @@ -758,7 +758,7 @@ void helper_slbie(CPUPPCState *env, target_ulong addr) } } -static int ppc_store_slb(CPUPPCState *env, target_ulong rb, target_ulong rs) +int ppc_store_slb(CPUPPCState *env, target_ulong rb, target_ulong rs) { int slot = rb & 0xfff; ppc_slb_t *slb = &env->slb[slot];