qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 03/10] softmmu/ioport: Remove unused functions


From: Bernhard Beschow
Subject: Re: [PATCH v2 03/10] softmmu/ioport: Remove unused functions
Date: Mon, 06 Feb 2023 00:20:08 +0000


Am 5. Februar 2023 21:37:01 UTC schrieb Mark Cave-Ayland 
<mark.cave-ayland@ilande.co.uk>:
>On 26/01/2023 21:17, Bernhard Beschow wrote:
>
>> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
>> ---
>>   include/exec/ioport.h |  2 --
>>   softmmu/ioport.c      | 24 ------------------------
>>   2 files changed, 26 deletions(-)
>> 
>> diff --git a/include/exec/ioport.h b/include/exec/ioport.h
>> index ec3e8e5942..1ef5aebba3 100644
>> --- a/include/exec/ioport.h
>> +++ b/include/exec/ioport.h
>> @@ -67,7 +67,5 @@ void portio_list_init(PortioList *piolist, Object *owner,
>>                         void *opaque, const char *name,
>>                         MemoryRegion *address_space_io, uint16_t start);
>>   void portio_list_set_flush_coalesced(PortioList *piolist);
>> -void portio_list_destroy(PortioList *piolist);
>> -void portio_list_del(PortioList *piolist);
>>     #endif /* IOPORT_H */
>> diff --git a/softmmu/ioport.c b/softmmu/ioport.c
>> index c92e3cb27d..0a55d39196 100644
>> --- a/softmmu/ioport.c
>> +++ b/softmmu/ioport.c
>> @@ -118,19 +118,6 @@ void portio_list_set_flush_coalesced(PortioList 
>> *piolist)
>>       piolist->flush_coalesced_mmio = true;
>>   }
>>   -void portio_list_destroy(PortioList *piolist)
>> -{
>> -    MemoryRegionPortioList *mrpio;
>> -    unsigned i;
>> -
>> -    for (i = 0; i < piolist->nr; ++i) {
>> -        mrpio = container_of(piolist->regions[i], MemoryRegionPortioList, 
>> mr);
>> -        object_unparent(OBJECT(&mrpio->mr));
>> -        g_free(mrpio);
>> -    }
>> -    g_free(piolist->regions);
>> -}
>> -
>>   static const MemoryRegionPortio *find_portio(MemoryRegionPortioList *mrpio,
>>                                                uint64_t offset, unsigned 
>> size,
>>                                                bool write)
>> @@ -280,14 +267,3 @@ void portio_list_init(PortioList *piolist, Object 
>> *owner,
>>       /* There will always be an open sub-list.  */
>>       portio_list_add_1(piolist, pio_start, count, start, off_low, off_high);
>>   }
>> -
>> -void portio_list_del(PortioList *piolist)
>> -{
>> -    MemoryRegionPortioList *mrpio;
>> -    unsigned i;
>> -
>> -    for (i = 0; i < piolist->nr; ++i) {
>> -        mrpio = container_of(piolist->regions[i], MemoryRegionPortioList, 
>> mr);
>> -        memory_region_del_subregion(piolist->address_space, &mrpio->mr);
>> -    }
>> -}
>
>I think it may be worth leaving these functions. There were previous 
>discussions around the cmd646 and via PCI-IDE interfaces which have a bit in 
>PCI configuration space that switches the chip between compatibility (ISA) 
>mode and PCI mode. I could see that switching the device to PCI mode would 
>require removal of the old ISA ports, for example, as in PCI mode the 
>registers would be accessed exclusively via the PCI BAR.

Sure, I can skip this patch.

BR,
Bernhard

>
>
>ATB,
>
>Mark.



reply via email to

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