hw/block/fdc-internal.h | 31 ++++++++++ include/hw/i386/pc.h | 2 + hw/block/fdc-isa.c | 54 +---------------- hw/block/fdc-module.c | 125 ++++++++++++++++++++++++++++++++++++++++ hw/block/fdc-sysbus.c | 54 ++--------------- hw/block/fdc.c | 19 +----- hw/i386/pc.c | 23 ++++++++ hw/i386/pc_piix.c | 8 ++- hw/block/meson.build | 18 +++++- 9 files changed, 211 insertions(+), 123 deletions(-) create mode 100644 hw/block/fdc-module.c
Some code shuffling needed beforehand due to floppy being part of several platforms. While being at it also make floppy optional in pc machine type. Gerd Hoffmann (7): floppy: move isa_fdc_get_drive_type to separate source file. floppy: move isa_fdc_init_drives + fdctrl_init_drives floppy: move fdctrl_init_sysbus floppy: move sun4m_fdctrl_init floppy: move cmos_get_fd_drive_type floppy: build as modules. pc: add floppy=OnOffAuto hw/block/fdc-internal.h | 31 ++++++++++ include/hw/i386/pc.h | 2 + hw/block/fdc-isa.c | 54 +---------------- hw/block/fdc-module.c | 125 ++++++++++++++++++++++++++++++++++++++++ hw/block/fdc-sysbus.c | 54 ++--------------- hw/block/fdc.c | 19 +----- hw/i386/pc.c | 23 ++++++++ hw/i386/pc_piix.c | 8 ++- hw/block/meson.build | 18 +++++- 9 files changed, 211 insertions(+), 123 deletions(-) create mode 100644 hw/block/fdc-module.c -- 2.31.1
+Mark On 8/4/21 4:27 PM, Gerd Hoffmann wrote: > Some code shuffling needed beforehand due to floppy being part of > several platforms. While being at it also make floppy optional > in pc machine type. > floppy: move fdctrl_init_sysbus > floppy: move sun4m_fdctrl_init https://www.mail-archive.com/qemu-block@nongnu.org/msg84008.html Mark suggested: You may be able to simplify this further by removing the global legacy init functions fdctrl_init_sysbus() and sun4m_fdctrl_init(): from what I can see fdctrl_init_sysbus() is only used in hw/mips/jazz.c and sun4m_fdctrl_init() is only used in hw/sparc/sun4m.c so you might as well inline them or move the functions to the relevant files. I did it and plan to send during 6.2. Sounds simpler than module. You could easily rebase your series on top (or I can include your patches while sending).
On Wed, Aug 04, 2021 at 05:19:02PM +0200, Philippe Mathieu-Daudé wrote: > +Mark > > On 8/4/21 4:27 PM, Gerd Hoffmann wrote: > > Some code shuffling needed beforehand due to floppy being part of > > several platforms. While being at it also make floppy optional > > in pc machine type. > > > floppy: move fdctrl_init_sysbus > > floppy: move sun4m_fdctrl_init > > https://www.mail-archive.com/qemu-block@nongnu.org/msg84008.html > > Mark suggested: > > You may be able to simplify this further by removing the > global legacy init functions fdctrl_init_sysbus() and > sun4m_fdctrl_init(): from what I can see fdctrl_init_sysbus() > is only used in hw/mips/jazz.c and sun4m_fdctrl_init() is only > used in hw/sparc/sun4m.c so you might as well inline them or > move the functions to the relevant files. > > I did it and plan to send during 6.2. Sounds simpler than module. > You could easily rebase your series on top (or I can include your > patches while sending). Feel free to include them. But I can also rebase when your patches landed upstream. Your choice ;) take care, Gerd
On Thu, Aug 5, 2021 at 3:12 AM Gerd Hoffmann <kraxel@redhat.com> wrote: > On Wed, Aug 04, 2021 at 05:19:02PM +0200, Philippe Mathieu-Daudé wrote: > > +Mark > > > > On 8/4/21 4:27 PM, Gerd Hoffmann wrote: > > > Some code shuffling needed beforehand due to floppy being part of > > > several platforms. While being at it also make floppy optional > > > in pc machine type. > > > > > floppy: move fdctrl_init_sysbus > > > floppy: move sun4m_fdctrl_init > > > > https://www.mail-archive.com/qemu-block@nongnu.org/msg84008.html > > > > Mark suggested: > > > > You may be able to simplify this further by removing the > > global legacy init functions fdctrl_init_sysbus() and > > sun4m_fdctrl_init(): from what I can see fdctrl_init_sysbus() > > is only used in hw/mips/jazz.c and sun4m_fdctrl_init() is only > > used in hw/sparc/sun4m.c so you might as well inline them or > > move the functions to the relevant files. > > > > I did it and plan to send during 6.2. Sounds simpler than module. > > You could easily rebase your series on top (or I can include your > > patches while sending). > > Feel free to include them. But I can also rebase when your patches > landed upstream. Your choice ;) > > take care, > Gerd > > What's the plan here, what are we trying to solve with this series *exactly*? If Phil sends his cleanups, do we still want/need the modularization here? For now I'm gonna shuffle these off of my review queue and I assume I'll see a respin/rebase from either you or phil during the 6.2 window, let me know if this is wrong. Thanks, --js
Hi John, On 8/16/21 11:55 PM, John Snow wrote: > On Thu, Aug 5, 2021 at 3:12 AM Gerd Hoffmann <kraxel@redhat.com > <mailto:kraxel@redhat.com>> wrote: > > On Wed, Aug 04, 2021 at 05:19:02PM +0200, Philippe Mathieu-Daudé wrote: > > +Mark > > > > On 8/4/21 4:27 PM, Gerd Hoffmann wrote: > > > Some code shuffling needed beforehand due to floppy being part of > > > several platforms. While being at it also make floppy optional > > > in pc machine type. > > > > > floppy: move fdctrl_init_sysbus > > > floppy: move sun4m_fdctrl_init > > > > https://www.mail-archive.com/qemu-block@nongnu.org/msg84008.html > <https://www.mail-archive.com/qemu-block@nongnu.org/msg84008.html> > > > > Mark suggested: > > > > You may be able to simplify this further by removing the > > global legacy init functions fdctrl_init_sysbus() and > > sun4m_fdctrl_init(): from what I can see fdctrl_init_sysbus() > > is only used in hw/mips/jazz.c and sun4m_fdctrl_init() is only > > used in hw/sparc/sun4m.c so you might as well inline them or > > move the functions to the relevant files. > > > > I did it and plan to send during 6.2. Sounds simpler than module. > > You could easily rebase your series on top (or I can include your > > patches while sending). > > Feel free to include them. But I can also rebase when your patches > landed upstream. Your choice ;) > > What's the plan here, what are we trying to solve with this series > *exactly*? > If Phil sends his cleanups, do we still want/need the modularization here? Both series are orthogonal, but if my cleanups get merged first, there is less floppy code to modularize. > For now I'm gonna shuffle these off of my review queue and I assume I'll > see a respin/rebase from either you or phil during the 6.2 window, let > me know if this is wrong. This is OK. Probably easier for everybody if I can rebase/include Gerd's patches along. I'm still not convinced FDC modularization is the right way to go; but the PC machine is one of machines I know the less, and has inherited a lot of odd things, so I need to carefully audit few more things. I'd rather have faithful chipsets modelled. Long term I don't think FDC are going away from QEMU, as they are used by happy hobbyist running old DOS programs from the 80's. But being able to build QEMU without FDC would be nice indeed.
On Tue, Aug 17, 2021 at 5:09 AM Philippe Mathieu-Daudé <philmd@redhat.com> wrote: > Hi John, > > On 8/16/21 11:55 PM, John Snow wrote: > > On Thu, Aug 5, 2021 at 3:12 AM Gerd Hoffmann <kraxel@redhat.com > > <mailto:kraxel@redhat.com>> wrote: > > > > On Wed, Aug 04, 2021 at 05:19:02PM +0200, Philippe Mathieu-Daudé > wrote: > > > +Mark > > > > > > On 8/4/21 4:27 PM, Gerd Hoffmann wrote: > > > > Some code shuffling needed beforehand due to floppy being part of > > > > several platforms. While being at it also make floppy optional > > > > in pc machine type. > > > > > > > floppy: move fdctrl_init_sysbus > > > > floppy: move sun4m_fdctrl_init > > > > > > https://www.mail-archive.com/qemu-block@nongnu.org/msg84008.html > > <https://www.mail-archive.com/qemu-block@nongnu.org/msg84008.html> > > > > > > Mark suggested: > > > > > > You may be able to simplify this further by removing the > > > global legacy init functions fdctrl_init_sysbus() and > > > sun4m_fdctrl_init(): from what I can see fdctrl_init_sysbus() > > > is only used in hw/mips/jazz.c and sun4m_fdctrl_init() is only > > > used in hw/sparc/sun4m.c so you might as well inline them or > > > move the functions to the relevant files. > > > > > > I did it and plan to send during 6.2. Sounds simpler than module. > > > You could easily rebase your series on top (or I can include your > > > patches while sending). > > > > Feel free to include them. But I can also rebase when your patches > > landed upstream. Your choice ;) > > > > What's the plan here, what are we trying to solve with this series > > *exactly*? > > If Phil sends his cleanups, do we still want/need the modularization > here? > > Both series are orthogonal, but if my cleanups get merged first, there > is less floppy code to modularize. > > > For now I'm gonna shuffle these off of my review queue and I assume I'll > > see a respin/rebase from either you or phil during the 6.2 window, let > > me know if this is wrong. > > This is OK. Probably easier for everybody if I can rebase/include Gerd's > patches along. I'm still not convinced FDC modularization is the right > way to go; but the PC machine is one of machines I know the less, and > has inherited a lot of odd things, so I need to carefully audit few more > things. > > I'd rather have faithful chipsets modelled. Long term I don't think > FDC are going away from QEMU, as they are used by happy hobbyist running > old DOS programs from the 80's. But being able to build QEMU without > FDC would be nice indeed. > > OK, Understood -- And you're right, upstream the FDC needs a bit of work and love, because they are used and important. I just ... as you can tell, don't have much time to give them that love myself. *cough* *cough* *nudge* *wink* I'll be sending a patch when 6.2 opens indicating my desire to step down from the device. --js
© 2016 - 2026 Red Hat, Inc.