qemu-e2k/hw
Peter Maydell 76621953c9 hw/arm/exynos4210: Fold combiner splits into exynos4210_init_board_irqs()
At this point, the function exynos4210_init_board_irqs() splits input
IRQ lines to connect them to the input combiner, output combiner and
external GIC.  The function exynos4210_combiner_get_gpioin() splits
some of the combiner input lines further to connect them to multiple
different inputs on the combiner.

Because (unlike qemu_irq_split()) the TYPE_SPLIT_IRQ device has a
configurable number of outputs, we can do all this in one place, by
making exynos4210_init_board_irqs() add extra outputs to the splitter
device when it must be connected to more than one input on each
combiner.

We do this with a new data structure, the combinermap, which is an
array each of whose elements is a list of the interrupt IDs on the
combiner which must be tied together.  As we loop through each
interrupt ID, if we find that it is the first one in one of these
lists, we configure the splitter device with eonugh extra outputs and
wire them up to the other interrupt IDs in the list.

Conveniently, for all the cases where this is necessary, the
lowest-numbered interrupt ID in each group is in the range of the
external combiner, so we only need to code for this in the first of
the two loops in exynos4210_init_board_irqs().

The old code in exynos4210_combiner_get_gpioin() which is being
deleted here had several problems which don't exist in the new code
in its handling of the multi-core timer interrupts:
 (1) the case labels specified bits 4 ... 8, but bit '8' doesn't
     exist; these should have been 4 ... 7
 (2) it used the input irq[EXYNOS4210_COMBINER_GET_IRQ_NUM(1, bit + 4)]
     multiple times as the input of several different splitters,
     which isn't allowed
 (3) in an apparent cut-and-paste error, the cases for all the
     multi-core timer inputs used "bit + 4" even though the
     bit range for the case was (intended to be) 4 ... 7, which
     meant it was looking at non-existent bits 8 ... 11.
None of these exist in the new code.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220404154658.565020-17-peter.maydell@linaro.org
2022-04-21 11:37:04 +01:00
..
9pfs Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
acpi acpi: fix acpi_index migration 2022-04-06 20:03:26 +01:00
adc hw/adc: Add basic Aspeed ADC model 2021-10-12 08:20:08 +02:00
alpha Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
arm hw/arm/exynos4210: Fold combiner splits into exynos4210_init_board_irqs() 2022-04-21 11:37:04 +01:00
audio * Fix stack-overflow due to recursive DMA in intel-hda (CVE-2021-3611) 2022-03-22 20:45:30 +00:00
avr Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
block aspeed queue: 2022-03-09 18:06:40 +00:00
char Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
core hw: Add compat machines for 7.1 2022-04-20 09:36:24 +02:00
cpu cpu/core: Fix "help" of CPU core device types 2021-04-09 16:05:16 -04:00
cris Do not include exec/address-spaces.h if it's not really necessary 2021-05-02 17:24:51 +02:00
display * Add cpu0-id to query-sev-capabilities 2022-04-19 18:22:16 -07:00
dma Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
gpio hw: aspeed_gpio: Cleanup stray semicolon after switch 2022-03-08 09:18:11 +01:00
hppa Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
hyperv hw: hyperv: Initial commit for Synthetic Debugging device 2022-04-06 14:31:56 +02:00
i2c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
i386 hw: Add compat machines for 7.1 2022-04-20 09:36:24 +02:00
ide MIPS patches queue 2022-03-09 09:13:39 +00:00
input Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
intc hw/arm/exynos4210: Move exynos4210_combiner_get_gpioin() into exynos4210.c 2022-04-21 11:37:04 +01:00
ipack qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
ipmi hw/isa: Inline and remove one-line isa_init_irq() 2022-03-08 19:38:17 +01:00
isa hw/isa: Inline and remove one-line isa_init_irq() 2022-03-08 19:38:17 +01:00
m68k hw: Add compat machines for 7.1 2022-04-20 09:36:24 +02:00
mem Mark remaining global TypeInfo instances as const 2022-02-21 13:30:20 +00:00
microblaze Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
mips Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
misc hw/misc: Add a model of the Xilinx Versal CRL 2022-04-21 11:37:03 +01:00
net util/log: Remove qemu_log_flush 2022-04-20 10:51:11 -07:00
nios2 Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
nubus qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
nvme Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
nvram Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
openrisc hw/openrisc/openrisc_sim: Add support for initrd loading 2022-02-26 10:39:36 +09:00
pci Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
pci-bridge pci: expose TYPE_XIO3130_DOWNSTREAM name 2022-03-06 05:08:23 -05:00
pci-host Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
pcmcia hw/pcmcia: Do not register PCMCIA type if not required 2021-05-02 17:24:50 +02:00
ppc hw: Add compat machines for 7.1 2022-04-20 09:36:24 +02:00
rdma Replace qemu_real_host_page variables with inlined functions 2022-04-06 10:50:38 +02:00
remote Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
riscv Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
rtc Replace qemu_gettimeofday() with g_get_real_time() 2022-04-06 10:50:37 +02:00
rx Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
s390x hw: Add compat machines for 7.1 2022-04-20 09:36:24 +02:00
scsi Replace qemu_real_host_page variables with inlined functions 2022-04-06 10:50:38 +02:00
sd Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
sensor hw/sensor: add Renesas raa228000 device 2022-03-08 18:46:48 +01:00
sh4 Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
smbios hw/smbios: Add table 4 parameter, "processor-id" 2022-03-06 05:28:55 -05:00
sparc Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
sparc64 Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
ssi aspeed/smc: Fix error log 2022-03-08 09:18:11 +01:00
timer timer: cadence_ttc: Break out header file to allow embedding 2022-04-21 11:37:03 +01:00
tpm Replace qemu_real_host_page variables with inlined functions 2022-04-06 10:50:38 +02:00
tricore hw/tricore: fix inclusion of tricore_testboard 2021-07-20 20:10:21 +02:00
usb Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
vfio Replace qemu_real_host_page variables with inlined functions 2022-04-06 10:50:38 +02:00
virtio Don't include sysemu/tcg.h if it is not necessary 2022-04-20 12:12:47 -07:00
watchdog watchdog: remove select_watchdog_action 2021-11-02 15:57:27 +01:00
xen util/log: Remove qemu_log_flush 2022-04-20 10:51:11 -07:00
xenpv meson: convert hw/arch* 2020-08-21 06:30:33 -04:00
xtensa Replace TARGET_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
Kconfig hw/arm: xlnx-zcu102: Add Xilinx eFUSE device 2021-09-30 13:42:10 +01:00
meson.build sensor: Move hardware sensors from misc to a sensor directory 2021-06-17 07:10:32 -05:00