qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io()


From: Peter Xu
Subject: Re: [PATCH 1/2] hw/mips/jazz: Use generic I/O bus via get_system_io()
Date: Wed, 10 Mar 2021 14:49:24 -0500

On Wed, Mar 10, 2021 at 08:12:54PM +0100, Philippe Mathieu-Daudé wrote:
> No need to create a local ISA I/O MemoryRegion, use get_system_io().
> 
> This partly reverts commit 5c63bcf7501527b844f61624957bdba254d75bfc.

I think it's not a clean revert of that, see below.

> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/mips/jazz.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
> index 1a0888a0fd5..9ac9361b7eb 100644
> --- a/hw/mips/jazz.c
> +++ b/hw/mips/jazz.c
> @@ -158,7 +158,6 @@ static void mips_jazz_init(MachineState *machine,
>      rc4030_dma *dmas;
>      IOMMUMemoryRegion *rc4030_dma_mr;
>      MemoryRegion *isa_mem = g_new(MemoryRegion, 1);
> -    MemoryRegion *isa_io = g_new(MemoryRegion, 1);
>      MemoryRegion *rtc = g_new(MemoryRegion, 1);
>      MemoryRegion *i8042 = g_new(MemoryRegion, 1);
>      MemoryRegion *dma_dummy = g_new(MemoryRegion, 1);
> @@ -259,11 +258,10 @@ static void mips_jazz_init(MachineState *machine,
>      memory_region_add_subregion(address_space, 0x8000d000, dma_dummy);
>  
>      /* ISA bus: IO space at 0x90000000, mem space at 0x91000000 */
> -    memory_region_init(isa_io, NULL, "isa-io", 0x00010000);
>      memory_region_init(isa_mem, NULL, "isa-mem", 0x01000000);
> -    memory_region_add_subregion(address_space, 0x90000000, isa_io);
> +    memory_region_add_subregion(address_space, 0x90000000, get_system_io());

The old code has an alias created just for adding subregion into address_space:

-    /* ISA IO space at 0x90000000 */
-    memory_region_init_alias(isa, NULL, "isa_mmio",
-                             get_system_io(), 0, 0x01000000);
-    memory_region_add_subregion(address_space, 0x90000000, isa);
-    isa_mem_base = 0x11000000;

While you didn't revert that part.  Maybe that's the issue?

-- 
Peter Xu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]