qemu-patch-raspberry4/hw
Igor Mammedov ba1ba5cca3 arm: drop intermediate cpu_model -> cpu type parsing and use cpu type directly
there are 2 use cases to deal with:
  1: fixed CPU models per board/soc
  2: boards with user configurable cpu_model and fallback to
     default cpu_model if user hasn't specified one explicitly

For the 1st
  drop intermediate cpu_model parsing and use const cpu type
  directly, which replaces:
     typename = object_class_get_name(
           cpu_class_by_name(TYPE_ARM_CPU, cpu_model))
     object_new(typename)
  with
     object_new(FOO_CPU_TYPE_NAME)
  or
     cpu_generic_init(BASE_CPU_TYPE, "my cpu model")
  with
     cpu_create(FOO_CPU_TYPE_NAME)

as result 1st use case doesn't have to invoke not necessary
translation and not needed code is removed.

For the 2nd
 1: set default cpu type with MachineClass::default_cpu_type and
 2: use generic cpu_model parsing that done before machine_init()
    is run and:
    2.1: drop custom cpu_model parsing where pattern is:
       typename = object_class_get_name(
           cpu_class_by_name(TYPE_ARM_CPU, cpu_model))
       [parse_features(typename, cpu_model, &err) ]

    2.2: or replace cpu_generic_init() which does what
         2.1 does + create_cpu(typename) with just
         create_cpu(machine->cpu_type)
as result cpu_name -> cpu_type translation is done using
generic machine code one including parsing optional features
if supported/present (removes a bunch of duplicated cpu_model
parsing code) and default cpu type is defined in an uniform way
within machine_class_init callbacks instead of adhoc places
in boadr's machine_init code.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1505318697-77161-6-git-send-email-imammedo@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-09-19 09:09:32 -03:00
..
9pfs 9pfs: local: clarify fchmodat_nofollow() implementation 2017-09-05 17:56:58 +02:00
acpi vmgenid: replace x-write-pointer-available hack 2017-09-08 16:15:17 +03:00
adc STM32F2xx: Add the ADC device 2016-10-04 13:28:07 +01:00
alpha cpu: make cpu_generic_init() abort QEMU on error 2017-09-19 09:09:32 -03:00
arm arm: drop intermediate cpu_model -> cpu type parsing and use cpu type directly 2017-09-19 09:09:32 -03:00
audio audio: intel-hda: do not use old_mmio accesses 2017-09-18 13:13:32 +02:00
block qapi: Mechanically convert FOO_lookup[...] to FOO_str(...) 2017-09-04 13:09:13 +02:00
bt bt: stop the sdp memory allocation craziness 2017-08-01 17:27:33 +02:00
char qapi: Mechanically convert FOO_lookup[...] to FOO_str(...) 2017-09-04 13:09:13 +02:00
core fw_cfg: rename read callback 2017-09-08 16:15:17 +03:00
cpu cpu: don't allow negative core id 2017-08-02 18:30:13 -03:00
cris cris: replace cpu_cris_init() with cpu_generic_init() 2017-09-01 11:54:24 -03:00
display virtio-gpu: don't clear QemuUIInfo information on reset 2017-09-13 09:39:32 +02:00
dma xilinx_axidma: Convert to DEFINE_PROP_LINK 2017-09-07 13:54:51 +01:00
gpio qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable 2017-05-17 10:37:00 -03:00
i2c ppc4xx_i2c: Move to hw/i2c 2017-09-08 09:30:55 +10:00
i386 pc: use generic cpu_model parsing 2017-09-19 09:09:32 -03:00
ide IDE: Do not flush empty CDROM drives 2017-08-10 14:33:43 +01:00
input qapi: Mechanically convert FOO_lookup[...] to FOO_str(...) 2017-09-04 13:09:13 +02:00
intc ppc patch queue 2017-09-15 2017-09-15 19:00:16 +01:00
ipack ipack: Update e-mail address 2016-05-18 15:04:27 +03:00
ipmi qom: enforce readonly nature of link's check callback 2017-07-14 12:04:42 +02:00
isa trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
lm32 cpu: make cpu_generic_init() abort QEMU on error 2017-09-19 09:09:32 -03:00
m68k cpu: make cpu_generic_init() abort QEMU on error 2017-09-19 09:09:32 -03:00
mem qmp: introduce query-memory-size-summary command 2017-09-14 15:52:10 +01:00
microblaze hw: Use new memory_region_init_{ram, rom, rom_device}() functions 2017-07-14 17:59:42 +01:00
mips cpu: make cpu_generic_init() abort QEMU on error 2017-09-19 09:09:32 -03:00
misc mmio-interface: Mark as not user creatable 2017-08-15 17:42:02 +01:00
moxie cpu: make cpu_generic_init() abort QEMU on error 2017-09-19 09:09:32 -03:00
net net: Add SunGEM device emulation as found on Apple UniNorth 2017-09-15 10:29:48 +10:00
nios2 nios2: replace cpu_nios2_init() with cpu_generic_init() 2017-09-01 11:54:24 -03:00
nvram pc, pci, virtio: patches queued before 2.10 2017-09-08 16:04:42 +01:00
openrisc cpu: make cpu_generic_init() abort QEMU on error 2017-09-19 09:09:32 -03:00
pci net: Add SunGEM device emulation as found on Apple UniNorth 2017-09-15 10:29:48 +10:00
pci-bridge hw/pci: add QEMU-specific PCI capability to the Generic PCI Express Root Port 2017-09-08 16:15:17 +03:00
pci-host hw/pci-host/gpex: Implement PCI INTx routing 2017-09-14 18:43:19 +01:00
pcmcia hw: Clean up includes 2016-01-29 15:07:25 +00:00
ppc cpu: make cpu_generic_init() abort QEMU on error 2017-09-19 09:09:32 -03:00
s390x s390x/pci: fixup trap_msix() 2017-08-30 18:23:26 +02:00
scsi scsi: clarify sense codes for LUN0 emulation 2017-08-08 10:40:20 +02:00
sd trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
sh4 cpu: make cpu_generic_init() abort QEMU on error 2017-09-19 09:09:32 -03:00
smbios stubs: move smbios stubs to hw/smbios 2017-01-16 17:52:35 +01:00
sparc cpu: make cpu_generic_init() abort QEMU on error 2017-09-19 09:09:32 -03:00
sparc64 cpu: make cpu_generic_init() abort QEMU on error 2017-09-19 09:09:32 -03:00
ssi xlnx-qspi: add a property for mmio-execution 2017-08-14 14:17:18 +01:00
timer i8254: use QEMU_ALIGN_DOWN 2017-08-31 12:29:07 +02:00
tpm clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
tricore cpu: make cpu_generic_init() abort QEMU on error 2017-09-19 09:09:32 -03:00
unicore32 cpu: make cpu_generic_init() abort QEMU on error 2017-09-19 09:09:32 -03:00
usb usb: only build usb-host with CONFIG_USB=y 2017-09-13 10:44:49 +02:00
vfio vfio, spapr: Fix levels calculation 2017-09-15 10:29:48 +10:00
virtio vhost: Release memory references on cleanup 2017-09-08 16:15:17 +03:00
watchdog watchdog: wdt_aspeed: Add support for the reset width register 2017-09-04 15:21:54 +01:00
xen trace-events: fix code style: %# -> 0x% 2017-08-01 12:13:07 +01:00
xenpv xenfb: remove xen_init_display "temporary" hack 2017-07-07 11:10:03 -07:00
xtensa cpu: make cpu_generic_init() abort QEMU on error 2017-09-19 09:09:32 -03:00
Makefile.objs 9pfs: fix dependencies 2017-08-30 18:23:25 +02:00