Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751681AbdGZCGb (ORCPT ); Tue, 25 Jul 2017 22:06:31 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35627 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750880AbdGZCG3 (ORCPT ); Tue, 25 Jul 2017 22:06:29 -0400 From: Alexey Kardashevskiy Subject: Re: [PATCH v2] include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH To: Alex Williamson , =?UTF-8?Q?Murilo_Opsfelder_Ara=c3=bajo?= Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org, David Gibson References: <20170718172220.9954-1-mopsfelder@gmail.com> <20170725094439.7859c41c@w520.home> Message-ID: <56e79980-8935-097f-86f8-065d7b55f535@ozlabs.ru> Date: Wed, 26 Jul 2017 12:06:23 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170725094439.7859c41c@w520.home> Content-Type: text/plain; charset=utf-8 Content-Language: en-AU Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1896 Lines: 61 On 26/07/17 01:44, Alex Williamson wrote: > [cc +Alexey, David] > > Any comments from the usual suspects for vfio/spapr? Thanks, [trying once again as mailists rejected the previous response due to broken outgoing mail encoding config in my thunderbird] Reviewed-by: Alexey Kardashevskiy Having EEH + VFIO_PCI and not having VFIO_SPAPR_EEH does not make practical sense and won't be seen in the wild so EEH + VFIO should enforce VFIO_SPAPR_EEH but this is for another patch. > > 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! >> > -- Alexey