mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
hw: Use new memory_region_init_{ram, rom, rom_device}() functions
Use the new functions memory_region_init_{ram,rom,rom_device}() instead of manually calling the _nomigrate() version and then vmstate_register_ram_global(). Patch automatically created using coccinelle script: spatch --in-place -sp_file scripts/coccinelle/memory-region-init-ram.cocci -dir hw (As it turns out, there are no instances of the rom and rom_device functions that are caught by this script.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1499438577-7674-8-git-send-email-peter.maydell@linaro.org
This commit is contained in:
parent
96d851a64b
commit
98a99ce084
51 changed files with 89 additions and 167 deletions
|
@ -279,9 +279,8 @@ Exynos4210State *exynos4210_init(MemoryRegion *system_mem)
|
|||
&s->chipid_mem);
|
||||
|
||||
/* Internal ROM */
|
||||
memory_region_init_ram_nomigrate(&s->irom_mem, NULL, "exynos4210.irom",
|
||||
memory_region_init_ram(&s->irom_mem, NULL, "exynos4210.irom",
|
||||
EXYNOS4210_IROM_SIZE, &error_fatal);
|
||||
vmstate_register_ram_global(&s->irom_mem);
|
||||
memory_region_set_readonly(&s->irom_mem, true);
|
||||
memory_region_add_subregion(system_mem, EXYNOS4210_IROM_BASE_ADDR,
|
||||
&s->irom_mem);
|
||||
|
@ -295,9 +294,8 @@ Exynos4210State *exynos4210_init(MemoryRegion *system_mem)
|
|||
&s->irom_alias_mem);
|
||||
|
||||
/* Internal RAM */
|
||||
memory_region_init_ram_nomigrate(&s->iram_mem, NULL, "exynos4210.iram",
|
||||
memory_region_init_ram(&s->iram_mem, NULL, "exynos4210.iram",
|
||||
EXYNOS4210_IRAM_SIZE, &error_fatal);
|
||||
vmstate_register_ram_global(&s->iram_mem);
|
||||
memory_region_add_subregion(system_mem, EXYNOS4210_IRAM_BASE_ADDR,
|
||||
&s->iram_mem);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue