[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 07/13] hw/ide: Extract pci_ide_{cmd,data}_le_ops initializati
From: |
Bernhard Beschow |
Subject: |
Re: [PATCH 07/13] hw/ide: Extract pci_ide_{cmd,data}_le_ops initialization into base class constructor |
Date: |
Mon, 24 Apr 2023 07:45:11 +0000 |
Am 23. April 2023 17:46:18 UTC schrieb "Philippe Mathieu-Daudé"
<philmd@linaro.org>:
>On 22/4/23 17:07, Bernhard Beschow wrote:
>> There is redundant code in cmd646 and via which can be extracted into the
>> base
>> class. In case of piix and sii3112 this is currently unneccessary but
>> shouldn't
>> interfere since the memory regions aren't mapped by those devices. In few
>> commits later this will be changed, i.e. those device models will also make
>> use
>> of these memory regions.
>>
>> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
>> ---
>> hw/ide/cmd646.c | 11 -----------
>> hw/ide/pci.c | 10 ++++++++++
>> hw/ide/via.c | 11 -----------
>> 3 files changed, 10 insertions(+), 22 deletions(-)
>
>
>> diff --git a/hw/ide/pci.c b/hw/ide/pci.c
>> index 65ed6f7f72..a9194313bd 100644
>> --- a/hw/ide/pci.c
>> +++ b/hw/ide/pci.c
>> @@ -543,6 +543,16 @@ static void pci_ide_init(Object *obj)
>> {
>> PCIIDEState *d = PCI_IDE(obj);
>> + memory_region_init_io(&d->data_bar[0], OBJECT(d),
>> &pci_ide_data_le_ops,
>> + &d->bus[0], "pci-ide0-data-ops", 8);
>> + memory_region_init_io(&d->cmd_bar[0], OBJECT(d), &pci_ide_cmd_le_ops,
>> + &d->bus[0], "pci-ide0-cmd-ops", 4);
>> +
>> + memory_region_init_io(&d->data_bar[1], OBJECT(d), &pci_ide_data_le_ops,
>> + &d->bus[1], "pci-ide1-data-ops", 8);
>> + memory_region_init_io(&d->cmd_bar[1], OBJECT(d), &pci_ide_cmd_le_ops,
>> + &d->bus[1], "pci-ide1-cmd-ops", 4);
>
>The trailing "-ops" just adds noise IMO.
I'll remove them in the next iteration.
Best regards,
Bernhard
>
>Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>
[PATCH 07/13] hw/ide: Extract pci_ide_{cmd, data}_le_ops initialization into base class constructor, Bernhard Beschow, 2023/04/22
[PATCH 11/13] hw/ide/sii3112: Reuse PCIIDEState::{cmd,data}_ops, Bernhard Beschow, 2023/04/22
Re: [PATCH 11/13] hw/ide/sii3112: Reuse PCIIDEState::{cmd,data}_ops, Mark Cave-Ayland, 2023/04/26
- Re: [PATCH 11/13] hw/ide/sii3112: Reuse PCIIDEState::{cmd,data}_ops, Bernhard Beschow, 2023/04/26
- Re: [PATCH 11/13] hw/ide/sii3112: Reuse PCIIDEState::{cmd,data}_ops, BALATON Zoltan, 2023/04/26
- Re: [PATCH 11/13] hw/ide/sii3112: Reuse PCIIDEState::{cmd,data}_ops, Mark Cave-Ayland, 2023/04/27
- Re: [PATCH 11/13] hw/ide/sii3112: Reuse PCIIDEState::{cmd,data}_ops, BALATON Zoltan, 2023/04/27