diff mbox

[15/52] target-ppc: do not make PowerPCCPUClass depend on target-specific symbols

Message ID 1463589381-66853-5-git-send-email-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paolo Bonzini May 18, 2016, 4:36 p.m. UTC
Just leave some members in even if they are unused on e.g.
32-bit PPC or user-mode emulation.  This avoids complications
when using PowerPCCPUClass in code that is compiled just
once (because it applies to both 32-bit and 64-bit PPC
for example) but still needs to peek at PPC-specific members.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target-ppc/cpu-qom.h | 4 ----
 1 file changed, 4 deletions(-)

Comments

Thomas Huth May 19, 2016, 3:49 a.m. UTC | #1
On 18.05.2016 18:36, Paolo Bonzini wrote:
> Just leave some members in even if they are unused on e.g.
> 32-bit PPC or user-mode emulation.  This avoids complications
> when using PowerPCCPUClass in code that is compiled just
> once (because it applies to both 32-bit and 64-bit PPC
> for example) but still needs to peek at PPC-specific members.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  target-ppc/cpu-qom.h | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/target-ppc/cpu-qom.h b/target-ppc/cpu-qom.h
> index bab501f..6f4e929 100644
> --- a/target-ppc/cpu-qom.h
> +++ b/target-ppc/cpu-qom.h
> @@ -67,14 +67,10 @@ typedef struct PowerPCCPUClass {
>      uint32_t flags;
>      int bfd_mach;
>      uint32_t l1_dcache_size, l1_icache_size;
> -#if defined(TARGET_PPC64)
>      const struct ppc_segment_page_sizes *sps;
> -#endif
>      void (*init_proc)(CPUPPCState *env);
>      int  (*check_pow)(CPUPPCState *env);
> -#if defined(CONFIG_SOFTMMU)
>      int (*handle_mmu_fault)(PowerPCCPU *cpu, vaddr eaddr, int rwx, int mmu_idx);
> -#endif
>      bool (*interrupts_big_endian)(PowerPCCPU *cpu);
>  } PowerPCCPUClass;
>  
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox

Patch

diff --git a/target-ppc/cpu-qom.h b/target-ppc/cpu-qom.h
index bab501f..6f4e929 100644
--- a/target-ppc/cpu-qom.h
+++ b/target-ppc/cpu-qom.h
@@ -67,14 +67,10 @@  typedef struct PowerPCCPUClass {
     uint32_t flags;
     int bfd_mach;
     uint32_t l1_dcache_size, l1_icache_size;
-#if defined(TARGET_PPC64)
     const struct ppc_segment_page_sizes *sps;
-#endif
     void (*init_proc)(CPUPPCState *env);
     int  (*check_pow)(CPUPPCState *env);
-#if defined(CONFIG_SOFTMMU)
     int (*handle_mmu_fault)(PowerPCCPU *cpu, vaddr eaddr, int rwx, int mmu_idx);
-#endif
     bool (*interrupts_big_endian)(PowerPCCPU *cpu);
 } PowerPCCPUClass;