mbox series

[v2,0/6] arch_init.c cleanup

Message ID 20201125205636.3305257-1-ehabkost@redhat.com
Headers show
Series arch_init.c cleanup | expand

Message

Eduardo Habkost Nov. 25, 2020, 8:56 p.m. UTC
This series gets rid of most of the code in arch_init.c.  It
moves the QEMU_ARCH macro definitions to corresponding cpu.h
files, and gets rid of kvm_available() and xen_available().

After this series, only two things remain in arch_init.c:
- the arch_type variable, which seems to be a useful feature; and
- the initialization of graphic_width/graphic_height/graphic_depth,
  which is a hack we must eventually get rid of.

Gerd got rid of the graphic_* initialization hack once (in 2017),
but the series was never merged:
https://lore.kernel.org/qemu-devel/1487715299-21102-5-git-send-email-kraxel@redhat.com

Eduardo Habkost (6):
  arch_init: Move QEMU_ARCH definitions to cpu.h
  accel: accel_available() function
  kvm: Remove kvm_available() function
  xen: Delete xen_available() function
  Remove unnecessary usage of arch_init.h
  Rename arch_init.h to arch_type.h

 include/sysemu/accel.h                      |  1 +
 include/sysemu/{arch_init.h => arch_type.h} |  3 -
 target/alpha/cpu.h                          |  1 +
 target/arm/cpu.h                            |  1 +
 target/avr/cpu.h                            |  1 +
 target/cris/cpu.h                           |  1 +
 target/hppa/cpu.h                           |  1 +
 target/i386/cpu.h                           |  1 +
 target/lm32/cpu.h                           |  1 +
 target/m68k/cpu.h                           |  1 +
 target/microblaze/cpu.h                     |  1 +
 target/mips/cpu.h                           |  1 +
 target/moxie/cpu.h                          |  1 +
 target/nios2/cpu.h                          |  1 +
 target/openrisc/cpu.h                       |  1 +
 target/ppc/cpu.h                            |  1 +
 target/riscv/cpu.h                          |  1 +
 target/rx/cpu.h                             |  1 +
 target/s390x/cpu.h                          |  1 +
 target/sh4/cpu.h                            |  1 +
 target/sparc/cpu.h                          |  1 +
 target/tricore/cpu.h                        |  1 +
 target/unicore32/cpu.h                      |  1 +
 target/xtensa/cpu.h                         |  1 +
 accel/accel.c                               |  6 +-
 blockdev.c                                  |  2 +-
 hw/i386/pc.c                                |  1 -
 hw/i386/pc_piix.c                           |  1 -
 hw/i386/pc_q35.c                            |  1 -
 hw/mips/jazz.c                              |  1 -
 hw/mips/malta.c                             |  1 -
 hw/ppc/prep.c                               |  1 -
 hw/riscv/sifive_e.c                         |  1 -
 hw/riscv/sifive_u.c                         |  1 -
 hw/riscv/spike.c                            |  1 -
 hw/riscv/virt.c                             |  1 -
 monitor/qmp-cmds.c                          |  3 +-
 softmmu/arch_init.c                         | 66 +--------------------
 softmmu/qdev-monitor.c                      |  2 +-
 softmmu/vl.c                                |  8 +--
 stubs/arch_type.c                           |  2 +-
 target/i386/cpu.c                           |  1 -
 target/s390x/cpu.c                          |  1 -
 target/s390x/cpu_models.c                   |  1 -
 target/ppc/translate_init.c.inc             |  1 -
 45 files changed, 37 insertions(+), 92 deletions(-)
 rename include/sysemu/{arch_init.h => arch_type.h} (94%)

Comments

Roman Bolshakov Nov. 25, 2020, 10:23 p.m. UTC | #1
On Wed, Nov 25, 2020 at 03:56:30PM -0500, Eduardo Habkost wrote:
> This series gets rid of most of the code in arch_init.c.  It
> moves the QEMU_ARCH macro definitions to corresponding cpu.h
> files, and gets rid of kvm_available() and xen_available().
> 

For the series:
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>

Thanks,
Roman