diff mbox

[08/36] vmstate: machine.c is only compiled for !CONFIG_USER_ONLY

Message ID daa7c90c150507d28078ab773b940976aaff353d.1332197811.git.quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela March 19, 2012, 10:57 p.m. UTC
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 target-ppc/machine.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

Comments

Andreas Färber March 21, 2012, 6:09 p.m. UTC | #1
Confirmed, in Makefile.target machine.o is confined to ifdef CONFIG_SOFTMMU.

Am 19.03.2012 23:57, schrieb Juan Quintela:
> Signed-off-by: Juan Quintela <quintela@redhat.com>

I verified that the right #endifs were removed and compile-tested it.

Acked-by: Andreas Färber <afaerber@suse.de>

Andreas
Peter Maydell March 21, 2012, 7:20 p.m. UTC | #2
On 19 March 2012 22:57, Juan Quintela <quintela@redhat.com> wrote:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  target-ppc/machine.c |    8 --------
>  1 files changed, 0 insertions(+), 8 deletions(-)

Could we give this patch a more informative commit message,
please? In particular it doesn't actually say that this is
fixing a ppc-only problem. My suggestion:

===begin===
target-ppc/machine.c: Drop unnecessary ifdefs

machine.c is only compiled for softmmu targets, so checks for
!defined(CONFIG_USER_ONLY) are unnecessary and can be dropped.
===endit===

-- PMM
Andreas Färber April 15, 2012, 4:28 p.m. UTC | #3
Am 21.03.2012 20:20, schrieb Peter Maydell:
> On 19 March 2012 22:57, Juan Quintela <quintela@redhat.com> wrote:
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>>  target-ppc/machine.c |    8 --------
>>  1 files changed, 0 insertions(+), 8 deletions(-)
> 
> Could we give this patch a more informative commit message,
> please? In particular it doesn't actually say that this is
> fixing a ppc-only problem. My suggestion:
> 
> ===begin===
> target-ppc/machine.c: Drop unnecessary ifdefs
> 
> machine.c is only compiled for softmmu targets, so checks for
> !defined(CONFIG_USER_ONLY) are unnecessary and can be dropped.
> ===endit===

Thanks, applied with the suggested commit message to ppc-next:
http://repo.or.cz/w/qemu/agraf.git/shortlog/refs/heads/ppc-next

Andreas
diff mbox

Patch

diff --git a/target-ppc/machine.c b/target-ppc/machine.c
index 70e2582..d6c2ee4 100644
--- a/target-ppc/machine.c
+++ b/target-ppc/machine.c
@@ -32,7 +32,6 @@  void cpu_save(QEMUFile *f, void *opaque)
     }
     qemu_put_be32s(f, &env->fpscr);
     qemu_put_sbe32s(f, &env->access_type);
-#if !defined(CONFIG_USER_ONLY)
 #if defined(TARGET_PPC64)
     qemu_put_betls(f, &env->asr);
     qemu_put_sbe32s(f, &env->slb_nr);
@@ -62,7 +61,6 @@  void cpu_save(QEMUFile *f, void *opaque)
     }
     for (i = 0; i < 4; i++)
         qemu_put_betls(f, &env->pb[i]);
-#endif
     for (i = 0; i < 1024; i++)
         qemu_put_betls(f, &env->spr[i]);
     qemu_put_be32s(f, &env->vscr);
@@ -72,7 +70,6 @@  void cpu_save(QEMUFile *f, void *opaque)
     qemu_put_be32s(f, &env->flags);
     qemu_put_sbe32s(f, &env->error_code);
     qemu_put_be32s(f, &env->pending_interrupts);
-#if !defined(CONFIG_USER_ONLY)
     qemu_put_be32s(f, &env->irq_input_state);
     for (i = 0; i < POWERPC_EXCP_NB; i++)
         qemu_put_betls(f, &env->excp_vectors[i]);
@@ -81,7 +78,6 @@  void cpu_save(QEMUFile *f, void *opaque)
     qemu_put_betls(f, &env->ivor_mask);
     qemu_put_betls(f, &env->ivpr_mask);
     qemu_put_betls(f, &env->hreset_vector);
-#endif
     qemu_put_betls(f, &env->nip);
     qemu_put_betls(f, &env->hflags);
     qemu_put_betls(f, &env->hflags_nmsr);
@@ -120,7 +116,6 @@  int cpu_load(QEMUFile *f, void *opaque, int version_id)
     }
     qemu_get_be32s(f, &env->fpscr);
     qemu_get_sbe32s(f, &env->access_type);
-#if !defined(CONFIG_USER_ONLY)
 #if defined(TARGET_PPC64)
     qemu_get_betls(f, &env->asr);
     qemu_get_sbe32s(f, &env->slb_nr);
@@ -150,7 +145,6 @@  int cpu_load(QEMUFile *f, void *opaque, int version_id)
     }
     for (i = 0; i < 4; i++)
         qemu_get_betls(f, &env->pb[i]);
-#endif
     for (i = 0; i < 1024; i++)
         qemu_get_betls(f, &env->spr[i]);
     ppc_store_sdr1(env, sdr1);
@@ -161,7 +155,6 @@  int cpu_load(QEMUFile *f, void *opaque, int version_id)
     qemu_get_be32s(f, &env->flags);
     qemu_get_sbe32s(f, &env->error_code);
     qemu_get_be32s(f, &env->pending_interrupts);
-#if !defined(CONFIG_USER_ONLY)
     qemu_get_be32s(f, &env->irq_input_state);
     for (i = 0; i < POWERPC_EXCP_NB; i++)
         qemu_get_betls(f, &env->excp_vectors[i]);
@@ -170,7 +163,6 @@  int cpu_load(QEMUFile *f, void *opaque, int version_id)
     qemu_get_betls(f, &env->ivor_mask);
     qemu_get_betls(f, &env->ivpr_mask);
     qemu_get_betls(f, &env->hreset_vector);
-#endif
     qemu_get_betls(f, &env->nip);
     qemu_get_betls(f, &env->hflags);
     qemu_get_betls(f, &env->hflags_nmsr);