From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vDmfJ6j12zDq5Y for ; Fri, 3 Feb 2017 04:08:08 +1100 (AEDT) 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 ozlabs.org (Postfix) with ESMTPS id 3vDmfJ2NKpz9ryb for ; Fri, 3 Feb 2017 04:08:08 +1100 (AEDT) Date: Thu, 2 Feb 2017 10:08:04 -0700 From: Alex Williamson To: Michael Ellerman Cc: aik@ozlabs.ru, linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, gwshan@linux.vnet.ibm.com Subject: Re: [PATCH] vfio: Fix build break when SPAPR_TCE_IOMMU=n Message-ID: <20170202100804.78f1faa3@t450s.home> In-Reply-To: <87shnwc45j.fsf@concordia.ellerman.id.au> References: <1478238521-32203-1-git-send-email-mpe@ellerman.id.au> <87shnwc45j.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 02 Feb 2017 20:50:48 +1100 Michael Ellerman wrote: > Michael Ellerman writes: > > > Currently the kconfig logic for VFIO_IOMMU_SPAPR_TCE and VFIO_SPAPR_EEH > > is broken when SPAPR_TCE_IOMMU=n. Leading to: > > > > warning: (VFIO) selects VFIO_IOMMU_SPAPR_TCE which has unmet direct dependencies (VFIO && SPAPR_TCE_IOMMU) > > warning: (VFIO) selects VFIO_IOMMU_SPAPR_TCE which has unmet direct dependencies (VFIO && SPAPR_TCE_IOMMU) > > drivers/vfio/vfio_iommu_spapr_tce.c:113:8: error: implicit declaration of function 'mm_iommu_find' > > > > This stems from the fact that VFIO selects VFIO_IOMMU_SPAPR_TCE, and > > although it has an if clause, the condition is not correct. > > > > We could fix it by doing select VFIO_IOMMU_SPAPR_TCE if SPAPR_TCE_IOMMU, > > but the cleaner fix is to drop the selects and tie VFIO_IOMMU_SPAPR_TCE > > to the value of VFIO, and express the dependencies in only once place. > > > > Do the same for VFIO_SPAPR_EEH. > > > > The end result is that the values of VFIO_IOMMU_SPAPR_TCE and > > VFIO_SPAPR_EEH follow the value of VFIO, except when SPAPR_TCE_IOMMU=n > > and/or EEH=n. Which is exactly what we want to happen. > > Ping? > > There was a bit of discussion on this patch but I think we decided it > was correct in the end. If there are no other comments or objections, I'll queue this for v4.11. Based on this last comment: eg, using def_tristate you get: # CONFIG_VFIO_IOMMU_SPAPR_TCE is not set # CONFIG_VFIO is not set Whereas using depends all you get is: # CONFIG_VFIO is not set I prefer prefer the solution here that doesn't leave extra unselected config entries when CONFIG_VFIO is also not selected. Thanks, Alex