qemu-e2k/hw
Greg Kurz 9929301ee1 mac_newworld: simplify IRQ wiring
The OpenPIC have 5 outputs per connected CPU. The machine init code hence
needs a bi-dimensional array (smp_cpu lines, 5 columns) to wire up the irqs
between the PIC and the CPUs.

The current code first allocates an array of smp_cpus pointers to qemu_irq
type, then it allocates another array of smp_cpus * 5 qemu_irq and fills the
first array with pointers to each line of the second array. This is rather
convoluted.

Simplify the logic by introducing a structured type that describes all the
OpenPIC outputs for a single CPU, ie, fixed size of 5 qemu_irq, and only
allocate a smp_cpu sized array of those.

This also allows to use g_new(T, n) instead of g_malloc(sizeof(T) * n)
as recommended in HACKING.

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-12-21 09:24:23 +11:00
..
9pfs 9p: remove support for the "handle" backend 2018-12-12 14:18:10 +01:00
acpi qmp hmp: Make system_wakeup check wake-up support and run state 2018-12-18 07:55:47 +01:00
adc
alpha hw/alpha/typhoon: Remove unuseful code 2018-10-24 06:44:59 -03:00
arm miscellaneous patches: 2018-12-16 16:32:43 +00:00
audio audio/hda: fix guest triggerable assert 2018-11-27 07:47:57 +01:00
block miscellaneous patches: 2018-12-16 16:32:43 +00:00
bt
char qmp hmp: Make system_wakeup check wake-up support and run state 2018-12-18 07:55:47 +01:00
core miscellaneous patches: 2018-12-16 16:32:43 +00:00
cpu hw/cpu/a15mpcore: If CPU has EL2, enable it on the GIC and wire it up 2018-08-24 13:17:34 +01:00
cris hw/cris: Use the IEC binary prefix definitions 2018-07-02 15:41:15 +02:00
display display/g364fb: Convert sysbus init function to realize function 2018-12-13 13:47:57 +00:00
dma dma/puv3_dma: Convert sysbus init function to realize function 2018-12-13 13:47:58 +00:00
gpio gpio/puv3_gpio: Convert sysbus init function to realize function 2018-12-13 13:47:58 +00:00
hppa hw/hppa/dino: Remove unuseful code 2018-10-24 06:44:59 -03:00
hyperv hw/hyperv: fix NULL dereference with pure-kvm SynIC 2018-11-26 14:14:38 -02:00
i2c i2c: Move typedef of bitbang_i2c_interface to i2c.h 2018-12-12 10:01:13 +01:00
i386 qmp: query-current-machine with wakeup-suspend-support 2018-12-18 07:55:47 +01:00
ide replay: replay BH for IDE trim operation 2018-10-02 19:09:13 +02:00
input qmp hmp: Make system_wakeup check wake-up support and run state 2018-12-18 07:55:47 +01:00
intc miscellaneous patches: 2018-12-16 16:32:43 +00:00
ipack
ipmi ipmi: Use proper struct reference for BT vmstate 2018-08-23 18:46:25 +02:00
isa configs: Add a CONFIG_SMC37C669 switch for the "smc37c669-superio" device 2018-10-24 07:33:44 +01:00
lm32 milkymist: Check for failure trying to load BIOS image 2018-11-06 11:32:14 +00:00
m68k
mem memory-device: avoid overflows on very huge devices 2018-12-11 15:45:22 -02:00
microblaze hw/microblaze/xlnx-zynqmp-pmu: Fix introspection problem in 'xlnx, zynqmp-pmu-soc' 2018-07-23 15:21:25 +01:00
mips hw/mips/malta: Remove unuseful code 2018-10-24 06:44:59 -03:00
misc miscellaneous patches: 2018-12-16 16:32:43 +00:00
moxie change get_image_size return type to int64_t 2018-10-02 19:08:49 +02:00
net net: cadence_gem: Remove incorrect assert() 2018-11-26 13:41:42 +00:00
nios2 hw/nios2: Use the IEC binary prefix definitions 2018-07-02 15:41:15 +02:00
nvram nvram/ds1225y: Convert sysbus init function to realize function 2018-12-13 13:48:00 +00:00
openrisc
pci hw/pci/pci.c: Don't use load_image() 2018-12-14 13:30:51 +00:00
pci-bridge pci-bridge/dec: Convert sysbus init function to realize function 2018-12-13 13:48:00 +00:00
pci-host ppc patch queue 2018-11-08 2018-11-08 14:42:37 +00:00
pcmcia
ppc mac_newworld: simplify IRQ wiring 2018-12-21 09:24:23 +11:00
rdma Clean up includes 2018-12-20 10:29:08 +01:00
riscv hw/riscv/virt: Free the test device tree node name 2018-11-13 15:12:13 -08:00
s390x error: Remove NULL checks on error_propagate() calls 2018-12-18 14:57:48 +01:00
scsi vmstate: constify VMStateField 2018-11-27 15:35:15 +01:00
sd hw/sd/sdhci: Don't leak memory region in sdhci_sysbus_realize() 2018-12-14 13:30:54 +00:00
sh4 hw/sh4/sh_pci: Use DeviceState::realize rather than SysBusDevice::init 2018-10-24 06:44:59 -03:00
smbios hw/smbios/smbios.c: Don't use load_image() 2018-12-14 13:30:50 +00:00
sparc Rename cpu_physical_memory_write_rom() to address_space_write_rom() 2018-12-14 13:30:48 +00:00
sparc64 hw/sparc64/niagara: Model the I/O Bridge with the 'unimplemented_device' 2018-10-24 06:44:59 -03:00
ssi hw/ssi/xilinx_spi: Use DeviceState::realize rather than SysBusDevice::init 2018-10-24 06:44:59 -03:00
timer qmp hmp: Make system_wakeup check wake-up support and run state 2018-12-18 07:55:47 +01:00
tpm tpm: Make sure the locality received from backend is valid 2018-12-04 10:21:25 -05:00
tricore hw/tricore: Use the IEC binary prefix definitions 2018-07-02 15:41:14 +02:00
unicore32
usb usb: fixes for mtp, ehci, usb-host and pvusb (xen). 2018-12-16 12:05:08 +00:00
vfio Clean up includes 2018-12-20 10:29:08 +01:00
virtio Trivial patches (2018-12-11) 2018-12-11 22:26:44 +00:00
watchdog qapi: Drop qapi_event_send_FOO()'s Error ** argument 2018-08-28 18:21:38 +02:00
xen xen_backend: remove xen_sysdev_init() function 2018-12-13 13:48:02 +00:00
xenpv
xtensa target/xtensa: xtfpga: provide default memory sizes 2018-11-21 10:53:21 -08:00
Makefile.objs memory-device: introduce separate config option 2018-10-24 06:44:59 -03:00