summaryrefslogtreecommitdiffstats
path: root/scripts/coccinelle/memory-region-housekeeping.cocci
Commit message (Collapse)AuthorAgeFilesLines
* scripts/cocci: Patch to let devices own their MemoryRegionsPhilippe Mathieu-Daudé2020-03-171-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a device creates a MemoryRegion without setting its ownership, the MemoryRegion is added to the machine "/unattached" container in the QOM tree. Example with the Samsung SMDKC210 board: $ arm-softmmu/qemu-system-arm -M smdkc210 -S -monitor stdio (qemu) info qom-tree /machine (smdkc210-machine) /unattached (container) /io[0] (qemu:memory-region) /exynos4210.dram0[0] (qemu:memory-region) /exynos4210.irom[0] (qemu:memory-region) /exynos4210.iram[0] (qemu:memory-region) /exynos4210.chipid[0] (qemu:memory-region) ... /device[26] (exynos4210.uart) /exynos4210.uart[0] (qemu:memory-region) /soc (exynos4210) ^ \__ [*] The irom/iram/chipid regions should go under 'soc' at [*]. Add a semantic patch to let the device own the memory region. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* scripts/cocci: Patch to remove unnecessary memory_region_set_readonly()Philippe Mathieu-Daudé2020-03-171-0/+15
| | | | | | | Add a semantic patch to remove memory_region_set_readonly() calls on ROM memory regions. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* scripts/cocci: Patch to detect potential use of memory_region_init_romPhilippe Mathieu-Daudé2020-03-171-0/+19
| | | | | | | Add a semantic patch to detect potential replacement of memory_region_init_ram(readonly) by memory_region_init_rom(). Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* scripts/cocci: Patch to replace memory_region_init_{ram,readonly -> rom}Philippe Mathieu-Daudé2020-03-171-0/+18
| | | | | | | Add a semantic patch to replace memory_region_init_ram(readonly) by memory_region_init_rom(). Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* scripts/cocci: Rename memory-region-{init-ram -> housekeeping}Philippe Mathieu-Daudé2020-03-171-0/+51
As we are going to add various semantic changes related to the memory region API, rename this script to be more generic. Add a 'usage' header, and an entry in MAINTAINERS to avoid checkpatch warning. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>