qemu/include/hw/ssi
Alex Bennée db96605a49 ssi: cache SSIPeripheralClass to avoid GET_CLASS()
Investigating why some BMC models are so slow compared to a plain ARM
virt machines I did some profiling of:

  ./qemu-system-arm -M romulus-bmc -nic user \
    -drive
    file=obmc-phosphor-image-romulus.static.mtd,format=raw,if=mtd \
    -nographic -serial mon:stdio

And saw that object_class_dynamic_cast_assert was dominating the
profile times. We have a number of cases in this model of the SSI bus.
As the class is static once the object is created we just cache it and
use it instead of the dynamic case macros.

Profiling against:

  ./tests/venv/bin/avocado run \
    tests/avocado/machine_aspeed.py:test_arm_ast2500_romulus_openbmc_v2_9_0

Before: 35.565 s ±  0.087 s
After: 15.713 s ±  0.287 s

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Cédric Le Goater <clg@kaod.org>
Tested-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220811151413.3350684-6-alex.bennee@linaro.org>
Message-Id: <20220923084803.498337-6-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2022-10-24 11:20:15 +02:00
..
aspeed_smc.h aspeed/smc: Rename 'max_peripherals' to 'cs_num_max' 2022-03-08 09:18:11 +01:00
ibex_spi_host.h hw/ssi: ibex_spi: fixup/add rw1c functionality 2022-10-14 14:29:50 +10:00
imx_spi.h hw/ssi: imx_spi: Use a macro for number of chip selects supported 2021-02-02 17:00:54 +00:00
mss-spi.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
npcm7xx_fiu.h hw/ssi: NPCM7xx Flash Interface Unit device model 2020-09-14 14:24:59 +01:00
pl022.h arm: Update infocenter.arm.com URLs 2021-02-11 11:50:14 +00:00
sifive_spi.h hw/ssi: Add SiFive SPI controller support 2021-03-04 09:43:29 -05:00
ssi.h ssi: cache SSIPeripheralClass to avoid GET_CLASS() 2022-10-24 11:20:15 +02:00
stm32f2xx_spi.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
xilinx_spips.h hw/ssi: xilinx_spips: Remove DMA related dead codes from zynqmp_spips 2021-03-10 13:54:51 +00:00
xlnx-versal-ospi.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00