From nobody Sun Feb 8 22:07:21 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1641554879591506.5519448806016; Fri, 7 Jan 2022 03:27:59 -0800 (PST) Received: from localhost ([::1]:53370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5nPa-000244-GJ for importer@patchew.org; Fri, 07 Jan 2022 06:27:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5n2h-0000M1-Hp for qemu-devel@nongnu.org; Fri, 07 Jan 2022 06:04:19 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:59369) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5n2f-0001tQ-V8 for qemu-devel@nongnu.org; Fri, 07 Jan 2022 06:04:19 -0500 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-547-CRz9_MpQNKuLjYY9st1TPQ-1; Fri, 07 Jan 2022 06:04:16 -0500 Received: by mail-wm1-f72.google.com with SMTP id b20-20020a05600c4e1400b003457da1c91eso698448wmq.4 for ; Fri, 07 Jan 2022 03:04:16 -0800 (PST) Received: from redhat.com ([2.55.16.192]) by smtp.gmail.com with ESMTPSA id t6sm1978007wry.84.2022.01.07.03.04.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jan 2022 03:04:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641553457; 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=J3xpoxaSN5NdlrS8+eCK2NDrLznN6O18Ki1VxrmK5/M=; b=N+7aXXaJH7XTrgnQ7lb6hvPkd97KUJTs/NXLxIy65DdSrtfNowPfwk0MxgN8ORxu7d26zr SNXmqgHxVP5zLXDQoUixJdlBoU9iFahqRIzJX0hmQftzTFxd5D7Hoox6uaLklNoYXl087a +Yvo151M/5034oyCqHto+oPJLdL73QI= X-MC-Unique: CRz9_MpQNKuLjYY9st1TPQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=J3xpoxaSN5NdlrS8+eCK2NDrLznN6O18Ki1VxrmK5/M=; b=dys9pmn7c320dmiaUkcQOg9owpzlkJ/TLhM5/27atyk5AtRF+2jM/XhtCigU9hVXia BKXpIE1wr0Z7mtlQIesTwXiPzOLVfMZWS001XIEttTWz+HcBlcitvBp78VmR5Yw65ZM2 6dJ06UFtT38zlFjKD9+xu95yN+Ll2F1EyeKGGSwJE26KBWag3ERrVG1w8rns1lUrR6Tv e+vxdFS3ihgTiudjhlHsQWK6b1fIAC5r2MtxjOTrmdiF0ZvbnWcGxRXlszhecCpVjZ5m 7hkoy7FKS8JS4wVbWesfrBylR2p2A2Q4Hnrotovm8BggWZ7lVbmSBA+S3YcC7jChOwdL 6XCg== X-Gm-Message-State: AOAM5327RF8dshCIXgv27zsl2r8zo/YJFDwLs3+k3Uf/jlGXNVQJyGsk Vn946pNzJSjfUlDjD69TJHvoGYbK2w2rFT+2xrO+O54nqB0792YRi/Nj0m6wr7RZJgYsQSdyQ3u bTEIHJB366A5rbgCRjnv2BocnASAMdCjtsdO1/K82UBjuEsDsc96sukHFl6Mp X-Received: by 2002:a7b:ce01:: with SMTP id m1mr10230061wmc.115.1641553455229; Fri, 07 Jan 2022 03:04:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwtS2e+I6TXBt9Zjd6KpBtpU7cRWblWQfvLJvyMt57gFvQK1EUszdo4aA9GaikXXrv2tJEACw== X-Received: by 2002:a7b:ce01:: with SMTP id m1mr10230042wmc.115.1641553454947; Fri, 07 Jan 2022 03:04:14 -0800 (PST) Date: Fri, 7 Jan 2022 06:04:12 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL v2 23/55] pci: Export the pci_intx() function Message-ID: <20220107102526.39238-24-mst@redhat.com> References: <20220107102526.39238-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20220107102526.39238-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.372, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frederic Barrat , Peter Maydell , =?utf-8?Q?C=C3=A9dric?= Le Goater Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1641554881830100001 From: Frederic Barrat Move the pci_intx() definition to the PCI header file, so that it can be called from other PCI files. It is used by the next patch. Signed-off-by: Frederic Barrat Message-Id: <20211116170133.724751-3-fbarrat@linux.ibm.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: C=C3=A9dric Le Goater --- include/hw/pci/pci.h | 5 +++++ hw/pci/pci.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 5b36334a28..483d5c7c72 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -735,6 +735,11 @@ void lsi53c8xx_handle_legacy_cmdline(DeviceState *lsi_= dev); qemu_irq pci_allocate_irq(PCIDevice *pci_dev); void pci_set_irq(PCIDevice *pci_dev, int level); =20 +static inline int pci_intx(PCIDevice *pci_dev) +{ + return pci_get_byte(pci_dev->config + PCI_INTERRUPT_PIN) - 1; +} + static inline void pci_irq_assert(PCIDevice *pci_dev) { pci_set_irq(pci_dev, 1); diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 322ba450e7..5d30f9ca60 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1497,11 +1497,6 @@ static void pci_irq_handler(void *opaque, int irq_nu= m, int level) pci_change_irq_level(pci_dev, irq_num, change); } =20 -static inline int pci_intx(PCIDevice *pci_dev) -{ - return pci_get_byte(pci_dev->config + PCI_INTERRUPT_PIN) - 1; -} - qemu_irq pci_allocate_irq(PCIDevice *pci_dev) { int intx =3D pci_intx(pci_dev); --=20 MST