From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9C02C433ED for ; Sun, 4 Apr 2021 19:27:41 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B700561365 for ; Sun, 4 Apr 2021 19:27:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B700561365 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FD3hp629cz3bcW for ; Mon, 5 Apr 2021 05:27:38 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=KcAI/2B7; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=infradead.org (client-ip=2001:8b0:10b:1236::1; helo=casper.infradead.org; envelope-from=rdunlap@infradead.org; receiver=) Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FD3hH6QZWz2xyC for ; Mon, 5 Apr 2021 05:27:05 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=3pF1jOma3Z1mWr7uQzP/TbmpInXypLLHfdO7biubeG0=; b=KcAI/2B7QYcwQmHemGdmiqb/22 WcJqCV7Xvce5EAv/H5X8WlaIg3QuzN8y25lrJlQ/3d7qzRAkEpo0nJAJa/q178R8IHwFZn2d2aINk z6o4zqaMPeQ+UTz4GSEjTpER76QhKd7vwVWN2tSHg9tWAbFQAsNfUCy+7bncfgWhE9vOK2MW8rdd3 gRRzCLG3vE49nX3BRLL6U0ZQ84ywIvtED6rKb0R4AYItT8Dj4aRkCFMVoHSZPiDVen2vkgs5ODVM1 fAaxeHMgu0F9kV3cxJu0iQX5buaI/KzlLXApVlOEJfpidLMJ7K9VpL//l9b+GDeupHcN6ubY5LdP+ zTYq3qBQ==; Received: from [2601:1c0:6280:3f0::e0e1] (helo=smtpauth.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lT8OB-00ATM1-M4; Sun, 04 Apr 2021 19:26:30 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Subject: [PATCH v2] powerpc: iommu: fix build when neither PCI or IBMVIO is set Date: Sun, 4 Apr 2021 12:26:23 -0700 Message-Id: <20210404192623.10697-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Randy Dunlap , linuxppc-dev@lists.ozlabs.org, kernel test robot , Anton Blanchard Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" When neither CONFIG_PCI nor CONFIG_IBMVIO is set/enabled, iommu.c has a build error. The fault injection code is not useful in that kernel config, so make the FAIL_IOMMU option depend on PCI || IBMVIO. Prevents this build error (warning escalated to error): ../arch/powerpc/kernel/iommu.c:178:30: error: 'fail_iommu_bus_notifier' defined but not used [-Werror=unused-variable] 178 | static struct notifier_block fail_iommu_bus_notifier = { Fixes: d6b9a81b2a45 ("powerpc: IOMMU fault injection") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Suggested-by: Michael Ellerman Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Cc: Anton Blanchard --- I was supposed to update this about one month ago, but then I lost some email and also took a break for a few weeks, then I remembered, so here it is. arch/powerpc/Kconfig.debug | 1 + 1 file changed, 1 insertion(+) --- lnx-512-rc1.orig/arch/powerpc/Kconfig.debug +++ lnx-512-rc1/arch/powerpc/Kconfig.debug @@ -353,6 +353,7 @@ config PPC_EARLY_DEBUG_CPM_ADDR config FAIL_IOMMU bool "Fault-injection capability for IOMMU" depends on FAULT_INJECTION + depends on PCI || IBMVIO help Provide fault-injection capability for IOMMU. Each device can be selectively enabled via the fail_iommu property.