From nobody Mon Feb 9 13:38:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621374980; cv=none; d=zohomail.com; s=zohoarc; b=ZOAwS+qWf+jWrPKGJ5Xp4wHDyBEevhN4lJG9Jf4bFIl7gH5Kehkn0tzDMo2luBmGzmvifyELtsQvtIKJ3WweB34qltrWAmsIy9NXWhHNsBb4fSQXFE52b94M/CJ05HpR8l8a52rfsb8XIllYvPKGcMQlWxkwQFjichkUg+DkFec= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621374980; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=HR1VL7xO46nG3TW0eDU8ydyDYyyww2jJCBLbd9ZBTCg=; b=JenrP+oKGHctZVzR9ykpVASzRrlmLYvmKCUxT7GD9NIMhocQ19GaNkvxQvW4frqYwDHwjmBZkwyVPNPcd3IAkRudtxsppD45G4wbpbHzDMExfFoocKOAPLjG9Jexsto1/cT+o9Fk1VrLLPO/5TqaPCRi3qTE6vp0AkwaWI1sLXI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 162137498011580.4961071984867; Tue, 18 May 2021 14:56:20 -0700 (PDT) Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-10-mf0x7XBxNsCOBVteeiMaLA-1; Tue, 18 May 2021 17:56:17 -0400 Received: by mail-ej1-f70.google.com with SMTP id la2-20020a170906ad82b02903d4bcc8de3bso2943240ejb.4 for ; Tue, 18 May 2021 14:56:17 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id v8sm7164395ejq.62.2021.05.18.14.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 14:56:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621374979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HR1VL7xO46nG3TW0eDU8ydyDYyyww2jJCBLbd9ZBTCg=; b=TTeu+99QYKPij5fe2y7uzY7RfiBEwir3a32rmmogNqcZizJoLxiEH1T0lKKX8PNHByv+gj FAlUSacSs6MyfGbPMOvHCEIGAGau8rxNEsxEvY8EA9C6fFGHyNQJLOneYaJ2KIEcvTjCiO NLCVi1d/sLxqri/1We4gNbM3ytmRvNY= X-MC-Unique: mf0x7XBxNsCOBVteeiMaLA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HR1VL7xO46nG3TW0eDU8ydyDYyyww2jJCBLbd9ZBTCg=; b=ghonVbtdMx9vxuD+rmnfJF6QCv+yP4uunNDD3IgUCNLTz7kI6e1NJ1WJgxnwUBRxBI ltX1f0Q1Yi5lBU5th82sZ0Omob0cl6C2xhTj7W18GOSvltTi0xFuWteRslQ/Mk+iik/w JvgDNfVB74NRe6E8gpXqavJaO1D92uO0fT1kNmFsIR/TUHcFPIGbmbYL5SF5V73GuL+W 9SexdreOwLEpngNGL0pIQguFs7Mr3kEyAz0xAue4aS9XuvDxiUWD8ZYcCGD0GuoGVS6e 8C2x/wWcUBgWlLzvpBupbVmnObeZkGOrhUjKiYlw464adMq5iC5pUL+PXydnM//cilr6 p/xQ== X-Gm-Message-State: AOAM5323HLJsONFsZ4IE+Nsth2UjzCX/XtgP/rDlDUKUUrgNn06cVFC+ W0Z7rh71mzSYEWAzd/2/mJaQSCE0AKn8HcEVUOhjzwKL76iAUVLMQLju4FIAxgxYGe9dMrn5Pau kuX0DRKMppyhB2w== X-Received: by 2002:a05:6402:48f:: with SMTP id k15mr9325853edv.262.1621374976273; Tue, 18 May 2021 14:56:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCSwgJxABwZAVfapYqFe2X4sxUnBxNd9hryF/dFWDfuvAt4BLjCAfg6wKSsr+ykn7jKVwuAA== X-Received: by 2002:a05:6402:48f:: with SMTP id k15mr9325841edv.262.1621374976120; Tue, 18 May 2021 14:56:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: John Snow , qemu-devel@nongnu.org Cc: Elena Ufimtseva , Markus Armbruster , Mark Cave-Ayland , Stefan Hajnoczi , Jagannathan Raman , Thomas Huth , John G Johnson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 06/11] hw/ide: Replace isa_get_irq() by isa_bus_get_irq() Date: Tue, 18 May 2021 23:55:40 +0200 Message-Id: <20210518215545.1793947-7-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210518215545.1793947-1-philmd@redhat.com> References: <20210518215545.1793947-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Both PIIX/VIA objects inherit PCI_IDE, thus have a pointer to an ISA bus. Pass this bus argument to isa_bus_get_irq() instead of calling isa_get_irq() with a NULL device. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/ide/piix.c | 2 +- hw/ide/via.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 3aef9b1e21c..debbc0023dc 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -139,7 +139,7 @@ static void pci_piix_init_ports(PCIIDEState *d) { ide_bus_new(&d->bus[i], sizeof(d->bus[i]), DEVICE(d), i, 2); ide_init_ioport(&d->bus[i], NULL, port_info[i].iobase, port_info[i].iobase2); - ide_init2(&d->bus[i], isa_get_irq(NULL, port_info[i].isairq)); + ide_init2(&d->bus[i], isa_bus_get_irq(d->isa_bus, port_info[i].isa= irq)); =20 bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus =3D &d->bus[i]; diff --git a/hw/ide/via.c b/hw/ide/via.c index 654e15edfed..53545aac474 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -106,6 +106,7 @@ static void bmdma_setup_bar(PCIIDEState *d) static void via_ide_set_irq(void *opaque, int n, int level) { PCIDevice *d =3D PCI_DEVICE(opaque); + PCIIDEState *id =3D PCI_IDE(d); =20 if (level) { d->config[0x70 + n * 8] |=3D 0x80; @@ -113,7 +114,7 @@ static void via_ide_set_irq(void *opaque, int n, int le= vel) d->config[0x70 + n * 8] &=3D ~0x80; } =20 - qemu_set_irq(isa_get_irq(NULL, 14 + n), level); + qemu_set_irq(isa_bus_get_irq(id->isa_bus, 14 + n), level); } =20 static void via_ide_reset(DeviceState *dev) --=20 2.26.3