All of lore.kernel.org
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Huacai Chen <chenhuacai@kernel.org>, John Snow <jsnow@redhat.com>,
	qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH 4/4] via-ide: Avoid using isa_get_irq()
Date: Sun, 17 Oct 2021 22:34:27 +0200 (CEST)	[thread overview]
Message-ID: <96d8f6f-58b3-6076-1bdd-eef41e3b057@eik.bme.hu> (raw)
In-Reply-To: <b15cb6c9-7166-02c4-29f4-d1bbd3976f69@amsat.org>

[-- Attachment #1: Type: text/plain, Size: 2144 bytes --]

On Sun, 17 Oct 2021, Philippe Mathieu-Daudé wrote:
> On 10/17/21 20:44, BALATON Zoltan wrote:
>> On Sun, 17 Oct 2021, Philippe Mathieu-Daudé wrote:
>>> On 10/15/21 03:06, BALATON Zoltan wrote:
>>>> Use via_isa_set_irq() which better encapsulates irq handling in the
>>>> vt82xx model and avoids using isa_get_irq() that has a comment saying
>>>> it should not be used.
>>>>
>>>> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
>>>> ---
>>>>  hw/ide/via.c | 4 ++--
>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/hw/ide/via.c b/hw/ide/via.c
>>>> index 94cc2142c7..252d18f4ac 100644
>>>> --- a/hw/ide/via.c
>>>> +++ b/hw/ide/via.c
>>>> @@ -29,7 +29,7 @@
>>>>  #include "migration/vmstate.h"
>>>>  #include "qemu/module.h"
>>>>  #include "sysemu/dma.h"
>>>> -
>>>> +#include "hw/isa/vt82c686.h"
>>>>  #include "hw/ide/pci.h"
>>>>  #include "trace.h"
>>>>
>>>> @@ -112,7 +112,7 @@ static void via_ide_set_irq(void *opaque, int n,
>>>> int level)
>>>>          d->config[0x70 + n * 8] &= ~0x80;
>>>>      }
>>>>
>>>> -    qemu_set_irq(isa_get_irq(NULL, 14 + n), level);
>>>> +    via_isa_set_irq(pci_get_function_0(d), 14 + n, level);
>>>
>>> Since pci_get_function_0() is expensive, we should cache
>>> 'PCIDevice *func0' in PCIIDEState, setting the pointer in
>>> via_ide_realize(). Do you mind sending a follow-up patch?
>>
>> I can do that but waiting for a decision on how to proceed. Will Gerd
>> take my first series this is based on as is then this should be a
>> separate series doing the clean up using pci_get_function_0 or should
>> these two series be merged? I'd also squash setting user_creatable =
>> false into this patch (and do similar for the usb one) unless you guys
>> think it should be a separate patch?
>
> I don't know what Gerd will do with the USB patches.
> Your VIA patches are orthogonal, so I'm queuing them (1, 2, 4
> and extra user_creatable) via mips-next.

I'm confused. So you don't need another version from the last two at 
least? And patch 2 is useless without the rest of the series that's why I 
said you can cherry pick 1.

Regards,
BALATON Zoltan

  reply	other threads:[~2021-10-17 20:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15  1:06 [PATCH 0/4] Avoid using isa_get_irq in vt82c686 model BALATON Zoltan
2021-10-15  1:06 ` [PATCH 1/4] vt82c686: Move common code to via_isa_realize BALATON Zoltan
2021-10-15 21:48   ` Jiaxun Yang
2021-10-17 16:22   ` Philippe Mathieu-Daudé
2021-10-15  1:06 ` [PATCH 4/4] via-ide: Avoid using isa_get_irq() BALATON Zoltan
2021-10-17 16:31   ` Philippe Mathieu-Daudé
2021-10-17 18:44     ` BALATON Zoltan
2021-10-17 20:28       ` Philippe Mathieu-Daudé
2021-10-17 20:34         ` BALATON Zoltan [this message]
2021-10-18  6:19         ` Gerd Hoffmann
2021-10-18  9:46           ` BALATON Zoltan
2021-10-17 19:39     ` BALATON Zoltan
2021-10-17 20:25       ` Philippe Mathieu-Daudé
2021-10-17 20:31         ` BALATON Zoltan
2021-10-15  1:06 ` [PATCH 2/4] vt82c686: Add a method to VIA_ISA to raise ISA interrupts BALATON Zoltan
2021-10-15 21:49   ` Jiaxun Yang
2021-10-17 16:23   ` Philippe Mathieu-Daudé
2021-10-15  1:06 ` [PATCH 3/4] hw/usb/vt82c686-uhci-pci: Avoid using isa_get_irq() BALATON Zoltan
2021-10-17 16:24   ` Philippe Mathieu-Daudé
2021-10-15  9:16 ` [PATCH] via-ide: Set user_creatable to false BALATON Zoltan
2021-10-17 16:19   ` Philippe Mathieu-Daudé

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=96d8f6f-58b3-6076-1bdd-eef41e3b057@eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=chenhuacai@kernel.org \
    --cc=f4bug@amsat.org \
    --cc=jsnow@redhat.com \
    --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.