diff mbox

[3/3] sun4u: expose NVRAM on ebus PCI IO address space

Message ID 1497099616-2615-4-git-send-email-mark.cave-ayland@ilande.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Mark Cave-Ayland June 10, 2017, 1 p.m. UTC
To allow future changes to the sun4u PCI topology.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
 hw/sparc64/sun4u.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé June 10, 2017, 6:05 p.m. UTC | #1
Hi Mark,

I'm not sure having this patch split from the previous (2/3) really 
helps bisecting, I'd rather squash them altogether.

Either way:

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

On 06/10/2017 10:00 AM, Mark Cave-Ayland wrote:
> To allow future changes to the sun4u PCI topology.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
>  hw/sparc64/sun4u.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
> index 19e64be..bf738f8 100644
> --- a/hw/sparc64/sun4u.c
> +++ b/hw/sparc64/sun4u.c
> @@ -492,7 +492,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
>      /* Map NVRAM into I/O (ebus) space */
>      nvram = m48t59_init(NULL, 0, 0, NVRAM_SIZE, 1968, 59);
>      s = SYS_BUS_DEVICE(nvram);
> -    memory_region_add_subregion(get_system_io(), 0x2000,
> +    memory_region_add_subregion(pci_address_space_io(ebus), 0x2000,
>                                  sysbus_mmio_get_region(s, 0));
>
>      initrd_size = 0;
>
Mark Cave-Ayland June 11, 2017, 2:58 p.m. UTC | #2
On 10/06/17 19:05, Philippe Mathieu-Daudé wrote:

> Hi Mark,
> 
> I'm not sure having this patch split from the previous (2/3) really
> helps bisecting, I'd rather squash them altogether.
> 
> Either way:
> 
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> 
> On 06/10/2017 10:00 AM, Mark Cave-Ayland wrote:
>> To allow future changes to the sun4u PCI topology.
>>
>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>> ---
>>  hw/sparc64/sun4u.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
>> index 19e64be..bf738f8 100644
>> --- a/hw/sparc64/sun4u.c
>> +++ b/hw/sparc64/sun4u.c
>> @@ -492,7 +492,7 @@ static void sun4uv_init(MemoryRegion
>> *address_space_mem,
>>      /* Map NVRAM into I/O (ebus) space */
>>      nvram = m48t59_init(NULL, 0, 0, NVRAM_SIZE, 1968, 59);
>>      s = SYS_BUS_DEVICE(nvram);
>> -    memory_region_add_subregion(get_system_io(), 0x2000,
>> +    memory_region_add_subregion(pci_address_space_io(ebus), 0x2000,
>>                                  sysbus_mmio_get_region(s, 0));
>>
>>      initrd_size = 0;
>>

Yes I could probably do that (unless Artyom objects). I agree there
isn't that much in to the patch, and until the PCI topology changes it's
effectively a no-op.


ATB,

Mark.
Artyom Tarasenko June 12, 2017, 9:08 a.m. UTC | #3
On Sun, Jun 11, 2017 at 4:58 PM, Mark Cave-Ayland
<mark.cave-ayland@ilande.co.uk> wrote:
> On 10/06/17 19:05, Philippe Mathieu-Daudé wrote:
>
>> Hi Mark,
>>
>> I'm not sure having this patch split from the previous (2/3) really
>> helps bisecting, I'd rather squash them altogether.
>>
>> Either way:
>>
>> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>
>> On 06/10/2017 10:00 AM, Mark Cave-Ayland wrote:
>>> To allow future changes to the sun4u PCI topology.
>>>
>>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>>> ---
>>>  hw/sparc64/sun4u.c |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
>>> index 19e64be..bf738f8 100644
>>> --- a/hw/sparc64/sun4u.c
>>> +++ b/hw/sparc64/sun4u.c
>>> @@ -492,7 +492,7 @@ static void sun4uv_init(MemoryRegion
>>> *address_space_mem,
>>>      /* Map NVRAM into I/O (ebus) space */
>>>      nvram = m48t59_init(NULL, 0, 0, NVRAM_SIZE, 1968, 59);
>>>      s = SYS_BUS_DEVICE(nvram);
>>> -    memory_region_add_subregion(get_system_io(), 0x2000,
>>> +    memory_region_add_subregion(pci_address_space_io(ebus), 0x2000,
>>>                                  sysbus_mmio_get_region(s, 0));
>>>
>>>      initrd_size = 0;
>>>
>
> Yes I could probably do that (unless Artyom objects).

I won't object einther way.

Acked-By: Artyom Tarasenko <atar4qemu@gmail.com>


Artyom

> I agree there
> isn't that much in to the patch, and until the PCI topology changes it's
> effectively a no-op.
>
>
> ATB,
>
> Mark.
>
diff mbox

Patch

diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index 19e64be..bf738f8 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -492,7 +492,7 @@  static void sun4uv_init(MemoryRegion *address_space_mem,
     /* Map NVRAM into I/O (ebus) space */
     nvram = m48t59_init(NULL, 0, 0, NVRAM_SIZE, 1968, 59);
     s = SYS_BUS_DEVICE(nvram);
-    memory_region_add_subregion(get_system_io(), 0x2000,
+    memory_region_add_subregion(pci_address_space_io(ebus), 0x2000,
                                 sysbus_mmio_get_region(s, 0));
  
     initrd_size = 0;