From patchwork Tue Jun 6 12:09:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Murilo_Opsfelder_Ara=C3=BAjo?= X-Patchwork-Id: 771820 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3whrBT37Kkz9ryT for ; Tue, 6 Jun 2017 22:11:13 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="E3YDQCHV"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3whrBT1vS6zDqP2 for ; Tue, 6 Jun 2017 22:11:13 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="E3YDQCHV"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-qt0-x242.google.com (mail-qt0-x242.google.com [IPv6:2607:f8b0:400d:c0d::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3whr8k25DszDqLy for ; Tue, 6 Jun 2017 22:09:42 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="E3YDQCHV"; dkim-atps=neutral Received: by mail-qt0-x242.google.com with SMTP id w1so22807701qtg.0 for ; Tue, 06 Jun 2017 05:09:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kRGSvd4N7BxUEe1Up1CpK6zDMMbiEtgA9uw1kglLCsI=; b=E3YDQCHVVgaNCxXtjcrlq4+sJNoODiv0VuFB0gsKkr67EQ79g1fdTGzwpkVLIbXfOY DHlgX5yXkBFAwpYUH9FhsuSIx2Mzy/myTzythnXkQgX+svAMzn3oIwwR/CeUBhrqjLwK YaFw2iUECA05YrjUpx8fa/ZQmhwMaC11Q+c4V4cMQ79C4qge0PnatUypmTsXir9wXENj 9v78tyipgxDRcQDIUS5HtVL5zau/94FI6vSB+3nABeIDKSduFSr51j9jBrZhL5K2nZLc 4V6fed9B0PbU0H42cnXICVtLCspkfdRXdOVqXROQVTCFOJnGJGsqgg6VJA/0V/BHDv1N IepA== 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:mime-version :content-transfer-encoding; bh=kRGSvd4N7BxUEe1Up1CpK6zDMMbiEtgA9uw1kglLCsI=; b=S92g0EECkVUdRixNgWfUMyhsykq5HF4uFbbedSPBBdiDqErMXpu6e1JSWvQtxZ1GPl yd0vBwFmC7F2U4+uPdxdSVU4qwV1msNgv0w/v8DHdMxnJhKezyhGvWznzLbt3mPcfJXF c2WbLK4uxtwZbTGcr9Dw7Nhv4+6N1UefK8pRPHnaGRF3WbRxGClfxcNp58Lhom8Az4jv o3ZNBbHrTp1iY8xdh/VPjN3MNApOAbJoRZ6nd9fJLtZdpFkgAsx2jGBVHOB/U1FMOq7m v0q/oxMLcf4aI1I3CT10Pssu1oGvoCSUrGvvLDqkbkBbfe3EASPHHFDmHWOnlq3Bcih+ TKqQ== X-Gm-Message-State: AODbwcCeIM1CcWqwaUDaaQ3+OwYCBOngvNE9pzXC7/mpcDyg3swmuD3s HzBeLt7KYvAOag== X-Received: by 10.55.71.85 with SMTP id u82mr19832242qka.257.1496750980273; Tue, 06 Jun 2017 05:09:40 -0700 (PDT) Received: from kermit-br-ibm-com.br.ibm.com ([32.104.18.243]) by smtp.gmail.com with ESMTPSA id 52sm6902087qts.25.2017.06.06.05.09.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Jun 2017 05:09:39 -0700 (PDT) From: Murilo Opsfelder Araujo To: linux-kernel@vger.kernel.org Subject: [PATCH] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH Date: Tue, 6 Jun 2017 09:09:14 -0300 Message-Id: <20170606120914.15851-1-mopsfelder@gmail.com> X-Mailer: git-send-email 2.9.4 MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex Williamson , linuxppc-dev@lists.ozlabs.org, Murilo Opsfelder Araujo , kvm@vger.kernel.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" When CONFIG_EEH=y and CONFIG_VFIO_SPAPR_EEH=n, build fails with the following: drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release': vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_eeh_release' drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_open': vfio_pci.c:(.text+0x1420): undefined reference to `.vfio_spapr_pci_eeh_open' In this case, vfio_pci.c should use the empty definitions of vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions. This patch fixes it by guarding these function definitions with CONFIG_VFIO_SPAPR_EEH, the symbol that controls whether vfio_spapr_eeh.c is built, which is where the non-empty versions of these functions are. This issue was found during a randconfig build. Logs are here: http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/ Signed-off-by: Murilo Opsfelder Araujo Acked-by: Michael Ellerman --- include/linux/vfio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/vfio.h b/include/linux/vfio.h index edf9b2c..0a05d57 100644 --- a/include/linux/vfio.h +++ b/include/linux/vfio.h @@ -150,7 +150,7 @@ extern int vfio_set_irqs_validate_and_prepare(struct vfio_irq_set *hdr, size_t *data_size); struct pci_dev; -#ifdef CONFIG_EEH +#ifdef CONFIG_VFIO_SPAPR_EEH extern void vfio_spapr_pci_eeh_open(struct pci_dev *pdev); extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev); extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group, @@ -171,7 +171,7 @@ static inline long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group, { return -ENOTTY; } -#endif /* CONFIG_EEH */ +#endif /* CONFIG_VFIO_SPAPR_EEH */ /* * IRQfd - generic