[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] isa: Avoid using obsolete memory_region_set_off

From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH] isa: Avoid using obsolete memory_region_set_offset for old portio
Date: Sun, 18 Sep 2011 21:04:40 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv: Gecko/20080226 SUSE/ Thunderbird/ Mnenhy/

On 2011-09-18 18:46, Avi Kivity wrote:
> On 09/18/2011 07:29 PM, Jan Kiszka wrote:
>> On 2011-09-18 17:57, Avi Kivity wrote:
>> >  On 09/18/2011 03:54 PM, Jan Kiszka wrote:
>> >>  From: Jan Kiszka<address@hidden>
>> >>
>> >>  We can express the offset of old portio completely via
>> >>  MemoryRegionPortio::offset by splitting up regions of different
>> offsets
>> >>  and adjusting those offsets appropriately.
>> >
>> >  Please split into two patches - core and isa.
>> They depend on each other.
> How can memory.c depend on isa.c?
> If you make the core patch add both mr->offset and mrp->offset, then
> change isa to drop memory_region_set_offset(), instead adding the delta
> to mrp->offset, does that not work out?

Nope. The old API accepted arbitrary portio lists per memory region, the
new requires one region with a consistent offset per range. I should
have documented it...

>> >   And I
>> >  don't want to remove memory_region_set_offset() until everything (that
>> >  can potentially use it, at least) has been converted.
>> IMO it's easier to fix those potential users before converting them. You
>> need to review them anyway to decide if an offset might be needed, and
>> which one precisely.
>> Are you aware of any candidates? For PIO, there should be none now.
> For pio, none, but mmio has some:
> hw/sh7750.c:    cpu_register_physical_memory_offset(0x1f000000, 0x1000,
> hw/sh7750.c:    cpu_register_physical_memory_offset(0xff000000, 0x1000,
> hw/sh7750.c:    cpu_register_physical_memory_offset(0x1f800000, 0x1000,
> hw/sh7750.c:    cpu_register_physical_memory_offset(0xff800000, 0x1000,
> hw/sh7750.c:    cpu_register_physical_memory_offset(0x1fc00000, 0x1000,
> hw/sh7750.c:    cpu_register_physical_memory_offset(0xffc00000, 0x1000,
> hw/sh_intc.c:       
> cpu_register_physical_memory_offset(P4ADDR(address), 4,
> hw/sh_intc.c:       
> cpu_register_physical_memory_offset(A7ADDR(address), 4,

Cool, that's all. Trivial to fix, just push the offset math into those
few handler. Then we can drop cpu_register_physical_memory_offset as well.


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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