From nobody Sun May 5 18:09:55 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1575578232; cv=none; d=zohomail.com; s=zohoarc; b=QQ2eEQhVDOe3HwwXu08QPLOAWdnd6Zy9ro27lIB7MEEMMlh0vvtDmNVgrGwlqihgt/Yfuk0a+IinrE+OgVt4QR35VSo+DF8ywUdbryrfhRDLXUOn+za+EmB/uiWJQlV76NBmakWTRN3Hs+YC20LI4sUUo3SbnETD9J/mCWl1uOs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575578232; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=yBzWoUW3abdp+FwlbG70WgdbJzP+AgNQr9jNH42YMRM=; b=HVvcvqK8UbJam6asBgusx9QfihBBMNImSLi7zKN/78p3gNcz6yp07c8vxRYHTyiemRT9tAXfBiihSRqclBthy4GR89xShAdnPI4ndJyvRVvIUOQ5YmJ/SdTBxqFMGT715A1vf+dF17hZkTOa98IoJrHaVxHga3grgs7tmPYNbeY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1575578232649190.5210489818304; Thu, 5 Dec 2019 12:37:12 -0800 (PST) Received: from localhost ([::1]:60716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icxs6-00073Z-Q0 for importer@patchew.org; Thu, 05 Dec 2019 15:37:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58225) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icxr9-0006cN-Iz for qemu-devel@nongnu.org; Thu, 05 Dec 2019 15:36:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icxr6-0004yr-A8 for qemu-devel@nongnu.org; Thu, 05 Dec 2019 15:36:10 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:59868 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1icxr2-0004ux-Go for qemu-devel@nongnu.org; Thu, 05 Dec 2019 15:36:06 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-171-Ost6BxqnOhiyzX2q_ULzig-1; Thu, 05 Dec 2019 15:36:00 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 59386107ACC9 for ; Thu, 5 Dec 2019 20:35:59 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-134.ams2.redhat.com [10.36.116.134]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 294005C240; Thu, 5 Dec 2019 20:35:59 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 95A2C1138606; Thu, 5 Dec 2019 21:35:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575578161; 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; bh=yBzWoUW3abdp+FwlbG70WgdbJzP+AgNQr9jNH42YMRM=; b=hKyRA/wy8eSnDwCct39PkhI30oyRWJyRXYw9rRsfN9rMtDyJrPbP1GKX9BQxEyiNXkmOjH Q1oMj7KWn1uM1KVDGkdeYSZWuNgGYDSpgXatxeOEHtD6nKOTVtEC1W3GhiRVvzT1cbjJvo vBWaLVJqPkp83zEoO2TMQHP9HBVt3NY= From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH] hw/misc/ivshmem: Bury dead legacy INTx code Date: Thu, 5 Dec 2019 21:35:57 +0100 Message-Id: <20191205203557.11254-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: Ost6BxqnOhiyzX2q_ULzig-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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: thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Devices "ivshmem-plain" and "ivshmem-doorbell" support only MSI-X. Config space register Interrupt Pin is zero. Device "ivshmem" additionally supported legacy INTx, but it was removed in commit 5a0e75f0a9 "hw/misc/ivshmem: Remove deprecated "ivshmem" legacy device". The commit left ivshmem_update_irq() behind. Since the Interrupt Pin register is zero, the function does nothing. Remove it. Signed-off-by: Markus Armbruster Reviewed-by: Thomas Huth --- hw/misc/ivshmem.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 5e3b05eae0..710cdb7263 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -136,44 +136,11 @@ static inline bool ivshmem_is_master(IVShmemState *s) return s->master =3D=3D ON_OFF_AUTO_ON; } =20 -static void ivshmem_update_irq(IVShmemState *s) -{ - PCIDevice *d =3D PCI_DEVICE(s); - uint32_t isr =3D s->intrstatus & s->intrmask; - - /* - * Do nothing unless the device actually uses INTx. Here's how - * the device variants signal interrupts, what they put in PCI - * config space: - * Device variant Interrupt Interrupt Pin MSI-X cap. - * ivshmem-plain none 0 no - * ivshmem-doorbell MSI-X 1 yes(1) - * ivshmem,msi=3Doff INTx 1 no - * ivshmem,msi=3Don MSI-X 1(2) yes(1) - * (1) if guest enabled MSI-X - * (2) the device lies - * Leads to the condition for doing nothing: - */ - if (ivshmem_has_feature(s, IVSHMEM_MSI) - || !d->config[PCI_INTERRUPT_PIN]) { - return; - } - - /* don't print ISR resets */ - if (isr) { - IVSHMEM_DPRINTF("Set IRQ to %d (%04x %04x)\n", - isr ? 1 : 0, s->intrstatus, s->intrmask); - } - - pci_set_irq(d, isr !=3D 0); -} - static void ivshmem_IntrMask_write(IVShmemState *s, uint32_t val) { IVSHMEM_DPRINTF("IntrMask write(w) val =3D 0x%04x\n", val); =20 s->intrmask =3D val; - ivshmem_update_irq(s); } =20 static uint32_t ivshmem_IntrMask_read(IVShmemState *s) @@ -189,7 +156,6 @@ static void ivshmem_IntrStatus_write(IVShmemState *s, u= int32_t val) IVSHMEM_DPRINTF("IntrStatus write(w) val =3D 0x%04x\n", val); =20 s->intrstatus =3D val; - ivshmem_update_irq(s); } =20 static uint32_t ivshmem_IntrStatus_read(IVShmemState *s) @@ -198,7 +164,6 @@ static uint32_t ivshmem_IntrStatus_read(IVShmemState *s) =20 /* reading ISR clears all interrupts */ s->intrstatus =3D 0; - ivshmem_update_irq(s); return ret; } =20 --=20 2.21.0