From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXcsH-0005oa-KF for qemu-devel@nongnu.org; Mon, 16 Mar 2015 17:48:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXcsG-0001oW-A5 for qemu-devel@nongnu.org; Mon, 16 Mar 2015 17:48:37 -0400 Message-ID: <55074FA1.3010204@redhat.com> Date: Mon, 16 Mar 2015 17:48:17 -0400 From: John Snow MIME-Version: 1.0 References: <1426351846-6497-1-git-send-email-hpoussin@reactos.org> In-Reply-To: <1426351846-6497-1-git-send-email-hpoussin@reactos.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] fdc: remove sparc sun4m mutations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?SGVydsOpIFBvdXNzaW5lYXU=?= , qemu-devel@nongnu.org Cc: Kevin Wolf , Mark Cave-Ayland , Stefan Hajnoczi , qemu-block@nongnu.org On 03/14/2015 12:50 PM, Herv=C3=A9 Poussineau wrote: > They were introduced in 6f7e9aec5eb5bdfa57a9e458e391b785c283a007 and > 82407d1a4035e5bfefb53ffdcb270872f813b34c and lots of bug fixes were don= e after that. > > This fixes (at least) the detection of the floppy controller on Debian = 4.0r9/SPARC, > and SS-5's OBP initialization routine still works. > Removing workaround code from six years ago in a device we hardly touch=20 seems sane to me if it doesn't appear to break the machine it was=20 originally architected for (SS-5, from 82407d1a's commit message), but I=20 am not well versed in SPARC configurations, unfortunately for us :) It appears this quirk is active for a wide number of machine=20 configurations (basically all that appear under sun4m_machine_init) --=20 What's the risk of us breaking one of those configurations? How did you test SS-5? (Can we test the others similarly? Is there a=20 justification for not doing so?) Thanks, --js > Signed-off-by: Herv=C3=A9 Poussineau > --- > hw/block/fdc.c | 17 ----------------- > 1 file changed, 17 deletions(-) > > diff --git a/hw/block/fdc.c b/hw/block/fdc.c > index 2bf87c9..f72a392 100644 > --- a/hw/block/fdc.c > +++ b/hw/block/fdc.c > @@ -535,8 +535,6 @@ struct FDCtrl { > uint8_t pwrd; > /* Floppy drives */ > uint8_t num_floppies; > - /* Sun4m quirks? */ > - int sun4m; > FDrive drives[MAX_FD]; > int reset_sensei; > uint32_t check_media_rate; > @@ -885,13 +883,6 @@ static void fdctrl_reset_irq(FDCtrl *fdctrl) > > static void fdctrl_raise_irq(FDCtrl *fdctrl) > { > - /* Sparc mutation */ > - if (fdctrl->sun4m && (fdctrl->msr & FD_MSR_CMDBUSY)) { > - /* XXX: not sure */ > - fdctrl->msr &=3D ~FD_MSR_CMDBUSY; > - fdctrl->msr |=3D FD_MSR_RQM | FD_MSR_DIO; > - return; > - } > if (!(fdctrl->sra & FD_SRA_INTPEND)) { > qemu_set_irq(fdctrl->irq, 1); > fdctrl->sra |=3D FD_SRA_INTPEND; > @@ -1080,12 +1071,6 @@ static uint32_t fdctrl_read_main_status(FDCtrl *= fdctrl) > fdctrl->dsr &=3D ~FD_DSR_PWRDOWN; > fdctrl->dor |=3D FD_DOR_nRESET; > > - /* Sparc mutation */ > - if (fdctrl->sun4m) { > - retval |=3D FD_MSR_DIO; > - fdctrl_reset_irq(fdctrl); > - }; > - > FLOPPY_DPRINTF("main status register: 0x%02x\n", retval); > > return retval; > @@ -2241,8 +2226,6 @@ static void sun4m_fdc_initfn(Object *obj) > FDCtrlSysBus *sys =3D SYSBUS_FDC(obj); > FDCtrl *fdctrl =3D &sys->state; > > - fdctrl->sun4m =3D 1; > - > memory_region_init_io(&fdctrl->iomem, obj, &fdctrl_mem_strict_ops= , > fdctrl, "fdctrl", 0x08); > sysbus_init_mmio(sbd, &fdctrl->iomem); >