Patchwork [14/22] ppc: cleanup MMU merge

login
register
mail settings
Submitter Alexander Graf
Date April 30, 2012, 9:01 a.m.
Message ID <4AFA7960-86F9-42F0-A58F-804F553B002F@suse.de>
Download mbox | patch
Permalink /patch/155816/
State New
Headers show

Comments

Alexander Graf - April 30, 2012, 9:01 a.m.
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 <blauwirbel@gmail.com>
> ---
> 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

Patch

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];