From nobody Mon Feb 9 00:06:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=eik.bme.hu Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1634260801279666.0879089471861; Thu, 14 Oct 2021 18:20:01 -0700 (PDT) Received: from localhost ([::1]:60834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mbBtA-0005mc-2r for importer@patchew.org; Thu, 14 Oct 2021 21:20:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbBqO-0000mx-I3 for qemu-devel@nongnu.org; Thu, 14 Oct 2021 21:17:13 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:28384) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbBqH-0006a5-Ew for qemu-devel@nongnu.org; Thu, 14 Oct 2021 21:17:06 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 45C3575604D; Fri, 15 Oct 2021 03:16:58 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id C6E65748F58; Fri, 15 Oct 2021 03:16:57 +0200 (CEST) Message-Id: <778c04dc2c8affac060b8edf9e8d7dab3c3e04eb.1634259980.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH 2/4] vt82c686: Add a method to VIA_ISA to raise ISA interrupts Date: Fri, 15 Oct 2021 03:06:20 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Huacai Chen , Gerd Hoffmann , Philippe M-D Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1634260803420100001 Content-Type: text/plain; charset="utf-8" Other functions in the VT82xx chips need to raise ISA interrupts. Keep a reference to them in the device state and add via_isa_set_irq() to allow setting their state. Signed-off-by: BALATON Zoltan Reviewed-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/vt82c686.c | 10 +++++++++- include/hw/isa/vt82c686.h | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 5b41539f2c..8f656251b8 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -542,6 +542,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(ViaISAState, VIA_ISA) struct ViaISAState { PCIDevice dev; qemu_irq cpu_intr; + qemu_irq *isa_irqs; ISABus *isa_bus; ViaSuperIOState *via_sio; }; @@ -567,6 +568,12 @@ static const TypeInfo via_isa_info =3D { }, }; =20 +void via_isa_set_irq(PCIDevice *d, int n, int level) +{ + ViaISAState *s =3D VIA_ISA(d); + qemu_set_irq(s->isa_irqs[n], level); +} + static void via_isa_request_i8259_irq(void *opaque, int irq, int level) { ViaISAState *s =3D opaque; @@ -584,7 +591,8 @@ static void via_isa_realize(PCIDevice *d, Error **errp) isa_irq =3D qemu_allocate_irqs(via_isa_request_i8259_irq, s, 1); s->isa_bus =3D isa_bus_new(dev, get_system_memory(), pci_address_space= _io(d), &error_fatal); - isa_bus_irqs(s->isa_bus, i8259_init(s->isa_bus, *isa_irq)); + s->isa_irqs =3D i8259_init(s->isa_bus, *isa_irq); + isa_bus_irqs(s->isa_bus, s->isa_irqs); i8254_pit_init(s->isa_bus, 0x40, 0, NULL); i8257_dma_init(s->isa_bus, 0); mc146818_rtc_init(s->isa_bus, 2000, NULL); diff --git a/include/hw/isa/vt82c686.h b/include/hw/isa/vt82c686.h index 0f01aaa471..56ac141be3 100644 --- a/include/hw/isa/vt82c686.h +++ b/include/hw/isa/vt82c686.h @@ -1,6 +1,8 @@ #ifndef HW_VT82C686_H #define HW_VT82C686_H =20 +#include "hw/pci/pci.h" + #define TYPE_VT82C686B_ISA "vt82c686b-isa" #define TYPE_VT82C686B_PM "vt82c686b-pm" #define TYPE_VT8231_ISA "vt8231-isa" @@ -8,4 +10,6 @@ #define TYPE_VIA_AC97 "via-ac97" #define TYPE_VIA_MC97 "via-mc97" =20 +void via_isa_set_irq(PCIDevice *d, int n, int level); + #endif --=20 2.21.4