Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753010AbdGYPoo convert rfc822-to-8bit (ORCPT ); Tue, 25 Jul 2017 11:44:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61849 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752986AbdGYPom (ORCPT ); Tue, 25 Jul 2017 11:44:42 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 51BBCA101E Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=alex.williamson@redhat.com 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 Content-Transfer-Encoding: 8BIT X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 25 Jul 2017 15:44:41 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1455 Lines: 43 [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újo wrote: > On 07/18/2017 02:22 PM, Murilo Opsfelder Araujo wrote: > > 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. We need to > > make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate > > option. > > > > 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 > > --- > > > > Changes from v1: > > - Rebased on top of next-20170718. > > Hi, Alex. > > Are you applying this? > > Thanks! >