mbox series

[0/5] Refactor common PCI IDE functions from CMD646

Message ID cover.1547166960.git.balaton@eik.bme.hu (mailing list archive)
Headers show
Series Refactor common PCI IDE functions from CMD646 | expand

Message

BALATON Zoltan Jan. 11, 2019, 12:36 a.m. UTC
Hello,

This series is a small refactoring that moves some common PCI IDE io
mem ops functions from the CMD646 model to the PCI IDE model so a
CMD646 specific type can be dropped from PCIIDEState, removes code
duplication from SiI3112 model (also fixing a bug) and allows these
functions to be used by future PCI IDE implementations.

Also cc'd Mark and Richard because the CMD646 seems to be used by
Sparc, HPPA and Alpha machines.

Regards,
BALATON Zoltan

BALATON Zoltan (5):
  cmd646: Remove unused variable
  cmd646: Remove IDEBus from CMD646BAR
  cmd646: Move PCI IDE specific functions to ide/pci.c
  ide: Get rid of CMD646BAR struct
  sii3112: Remove duplicated code and use PCI IDE ops instead

 hw/ide/cmd646.c      | 102 ++++++++-------------------------------------------
 hw/ide/pci.c         |  65 ++++++++++++++++++++++++++++++++
 hw/ide/sii3112.c     |  52 ++++----------------------
 include/hw/ide/pci.h |  14 ++-----
 4 files changed, 93 insertions(+), 140 deletions(-)

Comments

John Snow Jan. 15, 2019, 11:05 p.m. UTC | #1
On 1/10/19 7:36 PM, BALATON Zoltan wrote:
> Hello,
> 
> This series is a small refactoring that moves some common PCI IDE io
> mem ops functions from the CMD646 model to the PCI IDE model so a
> CMD646 specific type can be dropped from PCIIDEState, removes code
> duplication from SiI3112 model (also fixing a bug) and allows these
> functions to be used by future PCI IDE implementations.
> 
> Also cc'd Mark and Richard because the CMD646 seems to be used by
> Sparc, HPPA and Alpha machines.
> 
> Regards,
> BALATON Zoltan
> 
> BALATON Zoltan (5):
>   cmd646: Remove unused variable
>   cmd646: Remove IDEBus from CMD646BAR
>   cmd646: Move PCI IDE specific functions to ide/pci.c
>   ide: Get rid of CMD646BAR struct
>   sii3112: Remove duplicated code and use PCI IDE ops instead
> 
>  hw/ide/cmd646.c      | 102 ++++++++-------------------------------------------
>  hw/ide/pci.c         |  65 ++++++++++++++++++++++++++++++++
>  hw/ide/sii3112.c     |  52 ++++----------------------
>  include/hw/ide/pci.h |  14 ++-----
>  4 files changed, 93 insertions(+), 140 deletions(-)
> 

Hi, just a note to let you know I just got back from vacation and I will
take a little while to get to this as I unbury.

--js
Mark Cave-Ayland Jan. 18, 2019, 1:46 p.m. UTC | #2
On 11/01/2019 00:36, BALATON Zoltan wrote:

> Hello,
> 
> This series is a small refactoring that moves some common PCI IDE io
> mem ops functions from the CMD646 model to the PCI IDE model so a
> CMD646 specific type can be dropped from PCIIDEState, removes code
> duplication from SiI3112 model (also fixing a bug) and allows these
> functions to be used by future PCI IDE implementations.
> 
> Also cc'd Mark and Richard because the CMD646 seems to be used by
> Sparc, HPPA and Alpha machines.
> 
> Regards,
> BALATON Zoltan
> 
> BALATON Zoltan (5):
>   cmd646: Remove unused variable
>   cmd646: Remove IDEBus from CMD646BAR
>   cmd646: Move PCI IDE specific functions to ide/pci.c
>   ide: Get rid of CMD646BAR struct
>   sii3112: Remove duplicated code and use PCI IDE ops instead
> 
>  hw/ide/cmd646.c      | 102 ++++++++-------------------------------------------
>  hw/ide/pci.c         |  65 ++++++++++++++++++++++++++++++++
>  hw/ide/sii3112.c     |  52 ++++----------------------
>  include/hw/ide/pci.h |  14 ++-----
>  4 files changed, 93 insertions(+), 140 deletions(-)

This looks like a good tidy-up to me. I've applied these patches locally and tried a
quick boot test under qemu-system-sparc64 and it seems to work, so:

Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


ATB,

Mark.
John Snow Jan. 22, 2019, 1:44 a.m. UTC | #3
On 1/10/19 7:36 PM, BALATON Zoltan wrote:
> Hello,
> 
> This series is a small refactoring that moves some common PCI IDE io
> mem ops functions from the CMD646 model to the PCI IDE model so a
> CMD646 specific type can be dropped from PCIIDEState, removes code
> duplication from SiI3112 model (also fixing a bug) and allows these
> functions to be used by future PCI IDE implementations.
> 
> Also cc'd Mark and Richard because the CMD646 seems to be used by
> Sparc, HPPA and Alpha machines.
> 
> Regards,
> BALATON Zoltan
> 
> BALATON Zoltan (5):
>   cmd646: Remove unused variable
>   cmd646: Remove IDEBus from CMD646BAR
>   cmd646: Move PCI IDE specific functions to ide/pci.c
>   ide: Get rid of CMD646BAR struct
>   sii3112: Remove duplicated code and use PCI IDE ops instead
> 
>  hw/ide/cmd646.c      | 102 ++++++++-------------------------------------------
>  hw/ide/pci.c         |  65 ++++++++++++++++++++++++++++++++
>  hw/ide/sii3112.c     |  52 ++++----------------------
>  include/hw/ide/pci.h |  14 ++-----
>  4 files changed, 93 insertions(+), 140 deletions(-)
> 

Richard, any strong feelings on this? I'm inclined to pull it this weekend.

--js
Richard Henderson Jan. 22, 2019, 8:26 p.m. UTC | #4
On 1/21/19 5:44 PM, John Snow wrote:
>> BALATON Zoltan (5):
>>   cmd646: Remove unused variable
>>   cmd646: Remove IDEBus from CMD646BAR
>>   cmd646: Move PCI IDE specific functions to ide/pci.c
>>   ide: Get rid of CMD646BAR struct
>>   sii3112: Remove duplicated code and use PCI IDE ops instead
>>
>>  hw/ide/cmd646.c      | 102 ++++++++-------------------------------------------
>>  hw/ide/pci.c         |  65 ++++++++++++++++++++++++++++++++
>>  hw/ide/sii3112.c     |  52 ++++----------------------
>>  include/hw/ide/pci.h |  14 ++-----
>>  4 files changed, 93 insertions(+), 140 deletions(-)
>>
> 
> Richard, any strong feelings on this? I'm inclined to pull it this weekend.

Please do.


r~
John Snow Jan. 23, 2019, 11:59 p.m. UTC | #5
On 1/10/19 7:36 PM, BALATON Zoltan wrote:
> Hello,
> 
> This series is a small refactoring that moves some common PCI IDE io
> mem ops functions from the CMD646 model to the PCI IDE model so a
> CMD646 specific type can be dropped from PCIIDEState, removes code
> duplication from SiI3112 model (also fixing a bug) and allows these
> functions to be used by future PCI IDE implementations.
> 
> Also cc'd Mark and Richard because the CMD646 seems to be used by
> Sparc, HPPA and Alpha machines.
> 
> Regards,
> BALATON Zoltan
> 
> BALATON Zoltan (5):
>   cmd646: Remove unused variable
>   cmd646: Remove IDEBus from CMD646BAR
>   cmd646: Move PCI IDE specific functions to ide/pci.c
>   ide: Get rid of CMD646BAR struct
>   sii3112: Remove duplicated code and use PCI IDE ops instead
> 
>  hw/ide/cmd646.c      | 102 ++++++++-------------------------------------------
>  hw/ide/pci.c         |  65 ++++++++++++++++++++++++++++++++
>  hw/ide/sii3112.c     |  52 ++++----------------------
>  include/hw/ide/pci.h |  14 ++-----
>  4 files changed, 93 insertions(+), 140 deletions(-)
> 

Pushed to my staging branch, thanks.