]> git.proxmox.com Git - qemu.git/commitdiff
Merge remote-tracking branch 'jliu/or32' into staging
authorAnthony Liguori <aliguori@us.ibm.com>
Fri, 26 Jul 2013 18:04:07 +0000 (13:04 -0500)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 26 Jul 2013 18:04:07 +0000 (13:04 -0500)
# By Jia Liu
# Via Jia Liu
* jliu/or32:
  target-openrisc: Free typename in openrisc_cpu_class_by_name
  hw/openrisc: Use stderr output instead of qemu_log
  hw/openrisc: Indent typo

Message-id: 1374576458-22808-1-git-send-email-proljc@gmail.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
1  2 
target-openrisc/cpu.c

diff --combined target-openrisc/cpu.c
index 3da5a7a8b11a60f1d27d07e01bdf5304ede981d8,e348df0fef8668690a4532ef1e35d3b261e3ac78..7718820eccb09d95ebe8e7778b8370603f667ee9
  #include "cpu.h"
  #include "qemu-common.h"
  
 +static void openrisc_cpu_set_pc(CPUState *cs, vaddr value)
 +{
 +    OpenRISCCPU *cpu = OPENRISC_CPU(cs);
 +
 +    cpu->env.pc = value;
 +}
 +
  /* CPUClass::reset() */
  static void openrisc_cpu_reset(CPUState *s)
  {
@@@ -106,6 -99,7 +106,7 @@@ static ObjectClass *openrisc_cpu_class_
  
      typename = g_strdup_printf("%s-" TYPE_OPENRISC_CPU, cpu_model);
      oc = object_class_by_name(typename);
+     g_free(typename);
      if (oc != NULL && (!object_class_dynamic_cast(oc, TYPE_OPENRISC_CPU) ||
                         object_class_is_abstract(oc))) {
          return NULL;
@@@ -153,11 -147,7 +154,11 @@@ static void openrisc_cpu_class_init(Obj
      cc->class_by_name = openrisc_cpu_class_by_name;
      cc->do_interrupt = openrisc_cpu_do_interrupt;
      cc->dump_state = openrisc_cpu_dump_state;
 -    device_class_set_vmsd(dc, &vmstate_openrisc_cpu);
 +    cc->set_pc = openrisc_cpu_set_pc;
 +#ifndef CONFIG_USER_ONLY
 +    cc->get_phys_page_debug = openrisc_cpu_get_phys_page_debug;
 +    dc->vmsd = &vmstate_openrisc_cpu;
 +#endif
  }
  
  static void cpu_register(const OpenRISCCPUInfo *info)