qemu-e2k/hw/arm
Peter Maydell 42874d3a8c Switch non-CPU callers from ld/st*_phys to address_space_ld/st*
Switch all the uses of ld/st*_phys to address_space_ld/st*,
except for those cases where the address space is the CPU's
(ie cs->as). This was done with the following script which
generates a Coccinelle patch.

A few over-80-columns lines in the result were rewrapped by
hand where Coccinelle failed to do the wrapping automatically,
as well as one location where it didn't put a line-continuation
'\' when wrapping lines on a change made to a match inside
a macro definition.

===begin===
#!/bin/sh -e
# Usage:
# ./ldst-phys.spatch.sh > ldst-phys.spatch
# spatch -sp_file ldst-phys.spatch -dir . | sed -e '/^+/s/\t/        /g' > out.patch
# patch -p1 < out.patch

for FN in ub uw_le uw_be l_le l_be q_le q_be uw l q; do
cat <<EOF
@ cpu_matches_ld_${FN} @
expression E1,E2;
identifier as;
@@

ld${FN}_phys(E1->as,E2)

@ other_matches_ld_${FN} depends on !cpu_matches_ld_${FN} @
expression E1,E2;
@@

-ld${FN}_phys(E1,E2)
+address_space_ld${FN}(E1,E2, MEMTXATTRS_UNSPECIFIED, NULL)

EOF

done

for FN in b w_le w_be l_le l_be q_le q_be w l q; do
cat <<EOF
@ cpu_matches_st_${FN} @
expression E1,E2,E3;
identifier as;
@@

st${FN}_phys(E1->as,E2,E3)

@ other_matches_st_${FN} depends on !cpu_matches_st_${FN} @
expression E1,E2,E3;
@@

-st${FN}_phys(E1,E2,E3)
+address_space_st${FN}(E1,E2,E3, MEMTXATTRS_UNSPECIFIED, NULL)

EOF

done
===endit===

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
2015-04-26 16:49:24 +01:00
..
allwinner-a10.c hw: Mark device misusing nd_table[] FIXME 2015-04-02 15:30:32 +02:00
armv7m.c target_arm: Parameterise the irq lines for armv7m_init 2015-02-05 13:37:21 +00:00
boot.c Switch non-CPU callers from ld/st*_phys to address_space_ld/st* 2015-04-26 16:49:24 +01:00
collie.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
cubieboard.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
digic_boards.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
digic.c hw/arm/digic: add UART support 2013-12-17 20:12:51 +00:00
exynos4_boards.c machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
exynos4210.c error: Use error_report_err() where appropriate 2015-02-18 10:51:09 +01:00
gumstix.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
highbank.c Switch non-CPU callers from ld/st*_phys to address_space_ld/st* 2015-04-26 16:49:24 +01:00
integratorcp.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
kzm.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
mainstone.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
Makefile.objs netduino2: Add the Netduino 2 Machine 2015-03-11 13:21:06 +00:00
musicpal.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
netduino2.c netduino2: Add the Netduino 2 Machine 2015-03-11 13:21:06 +00:00
nseries.c arm/nseries: Fix warnings from Sparse 2015-03-19 11:11:55 +03:00
omap1.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
omap2.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
omap_sx1.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
palm.c memory: add parameter errp to memory_region_init_ram 2014-09-09 13:41:43 +02:00
pxa2xx_gpio.c hw/arm/pxa2xx_gpio: Correct and register vmstate 2014-06-29 18:38:40 +01:00
pxa2xx_pic.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
pxa2xx.c hw/usb: simplified usb_enabled 2015-01-08 17:32:27 +00:00
realview.c error: Use error_report_err() where appropriate 2015-02-18 10:51:09 +01:00
spitz.c sysbus: Make devices picking up backends unavailable with -device 2015-04-02 15:30:44 +02:00
stellaris.c target_arm: Parameterise the irq lines for armv7m_init 2015-02-05 13:37:21 +00:00
stm32f205_soc.c stm32f205: Add the stm32f205 SoC 2015-03-11 13:21:06 +00:00
strongarm.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
strongarm.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
tosa.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
versatilepb.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
vexpress.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
virt.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
xilinx_zynq.c arm: memory: Replace memory_region_init_ram with memory_region_allocate_system_memory 2015-04-08 17:30:36 +01:00
z2.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00