From patchwork Wed May 11 14:58:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cornelia Huck X-Patchwork-Id: 9071691 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 662099F30C for ; Wed, 11 May 2016 15:04:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2D9B20114 for ; Wed, 11 May 2016 15:04:33 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 23E972010B for ; Wed, 11 May 2016 15:04:33 +0000 (UTC) Received: from localhost ([::1]:52771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0Vge-0003V5-6F for patchwork-qemu-devel@patchwork.kernel.org; Wed, 11 May 2016 11:04:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0Var-0000C7-Ul for qemu-devel@nongnu.org; Wed, 11 May 2016 10:58:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0Vaj-0007Lo-58 for qemu-devel@nongnu.org; Wed, 11 May 2016 10:58:33 -0400 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:34985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0Vai-0007LG-Or for qemu-devel@nongnu.org; Wed, 11 May 2016 10:58:25 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 11 May 2016 15:58:23 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 11 May 2016 15:58:21 +0100 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: cornelia.huck@de.ibm.com X-IBM-RcptTo: qemu-devel@nongnu.org Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id DA44717D805A for ; Wed, 11 May 2016 15:59:17 +0100 (BST) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u4BEwKgZ23200006 for ; Wed, 11 May 2016 14:58:20 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u4BEwJ9E000699 for ; Wed, 11 May 2016 08:58:20 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u4BEwDBa032732 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA256 bits=256 verify=NO); Wed, 11 May 2016 08:58:19 -0600 From: Cornelia Huck To: qemu-devel@nongnu.org Date: Wed, 11 May 2016 16:58:07 +0200 Message-Id: <1462978692-33738-16-git-send-email-cornelia.huck@de.ibm.com> X-Mailer: git-send-email 2.6.6 In-Reply-To: <1462978692-33738-1-git-send-email-cornelia.huck@de.ibm.com> References: <1462978692-33738-1-git-send-email-cornelia.huck@de.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16051114-0009-0000-0000-000017874245 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.108 Subject: [Qemu-devel] [PATCH v2 for-2.7 15/20] s390x/pci: export pci_dereg_ioat and pci_dereg_irqs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, Yi Min Zhao , agraf@suse.de Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yi Min Zhao dereg_irqs and dereg_ioat are needed by external functions. Let's rename and export both of them in s390-pci-inst.h. Signed-off-by: Yi Min Zhao Reviewed-by: Pierre Morel Signed-off-by: Cornelia Huck --- hw/s390x/s390-pci-inst.c | 10 +++++----- hw/s390x/s390-pci-inst.h | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index eb03f48..4b4dd63 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -662,7 +662,7 @@ out: return ret; } -static int dereg_irqs(S390PCIBusDevice *pbdev) +int pci_dereg_irqs(S390PCIBusDevice *pbdev) { release_indicator(&pbdev->routes.adapter, pbdev->summary_ind); release_indicator(&pbdev->routes.adapter, pbdev->indicator); @@ -710,7 +710,7 @@ static int reg_ioat(CPUS390XState *env, S390PCIBusDevice *pbdev, ZpciFib fib) return 0; } -static void dereg_ioat(S390PCIBusDevice *pbdev) +void pci_dereg_ioat(S390PCIBusDevice *pbdev) { s390_pci_iommu_disable(pbdev); pbdev->pba = 0; @@ -758,7 +758,7 @@ int mpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar) } break; case ZPCI_MOD_FC_DEREG_INT: - dereg_irqs(pbdev); + pci_dereg_irqs(pbdev); break; case ZPCI_MOD_FC_REG_IOAT: if (reg_ioat(env, pbdev, fib)) { @@ -766,10 +766,10 @@ int mpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar) } break; case ZPCI_MOD_FC_DEREG_IOAT: - dereg_ioat(pbdev); + pci_dereg_ioat(pbdev); break; case ZPCI_MOD_FC_REREG_IOAT: - dereg_ioat(pbdev); + pci_dereg_ioat(pbdev); if (reg_ioat(env, pbdev, fib)) { cc = ZPCI_PCI_LS_ERR; } diff --git a/hw/s390x/s390-pci-inst.h b/hw/s390x/s390-pci-inst.h index 70fa713..9fc94e9 100644 --- a/hw/s390x/s390-pci-inst.h +++ b/hw/s390x/s390-pci-inst.h @@ -14,6 +14,7 @@ #ifndef HW_S390_PCI_INST_H #define HW_S390_PCI_INST_H +#include "s390-pci-bus.h" #include /* CLP common request & response block size */ @@ -277,6 +278,8 @@ typedef struct ZpciFib { uint32_t gd; } QEMU_PACKED ZpciFib; +int pci_dereg_irqs(S390PCIBusDevice *pbdev); +void pci_dereg_ioat(S390PCIBusDevice *pbdev); int clp_service_call(S390CPU *cpu, uint8_t r2); int pcilg_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2); int pcistg_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2);