From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xH2cD0Q4ZzDqmv for ; Wed, 26 Jul 2017 01:44:43 +1000 (AEST) Date: Tue, 25 Jul 2017 09:44:39 -0600 From: Alex Williamson To: Murilo Opsfelder =?UTF-8?B?QXJhw7pqbw==?= Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org, , David Gibson Subject: Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH Message-ID: <20170725094439.7859c41c@w520.home> In-Reply-To: References: <20170718172220.9954-1-mopsfelder@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , [cc +Alexey, David] Any comments from the usual suspects for vfio/spapr? Thanks, Alex On Tue, 25 Jul 2017 10:56:38 -0300 Murilo Opsfelder Ara=C3=BAjo wrote: > On 07/18/2017 02:22 PM, Murilo Opsfelder Araujo wrote: > > When CONFIG_EEH=3Dy and CONFIG_VFIO_SPAPR_EEH=3Dn, build fails with the > > following: > >=20 > > drivers/vfio/pci/vfio_pci.o: In function `.vfio_pci_release': > > vfio_pci.c:(.text+0xa98): undefined reference to `.vfio_spapr_pci_e= eh_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' > >=20 > > In this case, vfio_pci.c should use the empty definitions of > > vfio_spapr_pci_eeh_open and vfio_spapr_pci_eeh_release functions. > >=20 > > 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. We= need to > > make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a trist= ate > > option. > >=20 > > This issue was found during a randconfig build. Logs are here: > >=20 > > http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/ > >=20 > > Signed-off-by: Murilo Opsfelder Araujo > > --- > >=20 > > Changes from v1: > > - Rebased on top of next-20170718. =20 >=20 > Hi, Alex. >=20 > Are you applying this? >=20 > Thanks! >=20