All of lore.kernel.org
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Huacai Chen <chenhuacai@kernel.org>,
	qemu-devel@nongnu.org, Philippe M-D <f4bug@amsat.org>
Subject: Re: [PATCH v3] hw/usb/vt82c686-uhci-pci: Use ISA instead of PCI interrupts
Date: Thu, 14 Oct 2021 19:48:03 +0200 (CEST)	[thread overview]
Message-ID: <d53117db-137c-a81a-d2d7-78142fccca4e@eik.bme.hu> (raw)
In-Reply-To: <338972bc-7256-e648-83d6-b31de2aaf34c@eik.bme.hu>

On Thu, 14 Oct 2021, BALATON Zoltan wrote:
> On Thu, 14 Oct 2021, Gerd Hoffmann wrote:
>> On Thu, Oct 14, 2021 at 12:22:58PM +0200, BALATON Zoltan wrote:
>>> On Thu, 14 Oct 2021, Gerd Hoffmann wrote:
>>>> On Wed, Oct 13, 2021 at 02:13:09PM +0200, BALATON Zoltan wrote:
>>>>> This device is part of a superio/ISA bridge chip and IRQs from it are
>>>>> routed to an ISA interrupt set by the Interrupt Line PCI config
>>>>> register. Change uhci_update_irq() to allow this and implement it in
>>>>> vt82c686-uhci-pci.
>>>> 
>>>> Looks good.  There are some unrelated changes in though (whitespace,
>>>> comments, ...), and the vt82c686-uhci-pci.c changes should be a
>>>> separate patch.
>>> 
>>> So you mean split it into a series of three small patches? Should I do a 
>>> w4
>>> with that?
>> 
>> I was thinking about two patches: drop the unrelated stuff, one patch
>> for the irq signaling change, and one for the vt82c686 changes.
>> 
>> But of course you can add more patches for the other changes, i.e.
>> dropping the else branch for level = 0 and other small tweaks.
>
> The tewak for the comment is needed for checkpach, dropping the else is just 
> to make the function shorter and IMO more readable. I can do this in a 
> previous patch so checkpatch won't complain on the pci irq change or need at 
> least the comment change in that patch. I'm thinking about an alternative way 
> for the vt82c686 part to avoid using isa_get_irq which has a comment saying 
> it should be dropped but not sure about that yet, I'll try it and submit a v4 
> with at least breaking it up to smaller patches.

I've tried it and it's just not worth it. By moving isa reference to 
vt82c686.c we end up doing the same, just with a lot more code changes 
(which is harder to understand) and less efficiently (at every interrupt 
need to jump through hoops and do some QOM casts and additional calls to 
reach the same effect). These are basically modelling functions of the 
same device just split up in parts to categorise and reuse parts of 
similar models so accesing isa parts of the chip from usb part does not 
seem to be that bad and it's simple this way. So I ended up just splitting 
the patch for v4.

Thanks,
BALATON Zoltan


      reply	other threads:[~2021-10-14 17:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 12:13 [PATCH v3] hw/usb/vt82c686-uhci-pci: Use ISA instead of PCI interrupts BALATON Zoltan
2021-10-13 14:14 ` Philippe Mathieu-Daudé
2021-10-13 15:21   ` BALATON Zoltan
2021-10-13 15:39     ` BALATON Zoltan
2021-10-13 15:26   ` BALATON Zoltan
2021-10-14  9:12   ` Gerd Hoffmann
2021-10-14 13:28     ` Philippe Mathieu-Daudé
2021-10-14  9:10 ` Gerd Hoffmann
2021-10-14 10:22   ` BALATON Zoltan
2021-10-14 13:01     ` Gerd Hoffmann
2021-10-14 13:08       ` BALATON Zoltan
2021-10-14 17:48         ` BALATON Zoltan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d53117db-137c-a81a-d2d7-78142fccca4e@eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=chenhuacai@kernel.org \
    --cc=f4bug@amsat.org \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.