From patchwork Fri May 17 18:47:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Isaac J. Manjarres" X-Patchwork-Id: 10948417 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A7E171395 for ; Fri, 17 May 2019 18:48:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9915328421 for ; Fri, 17 May 2019 18:48:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D4252842A; Fri, 17 May 2019 18:48:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D8F8D28421 for ; Fri, 17 May 2019 18:48:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=wO6zq6lqgx60O9BCIUCYGHhG0wR4xh3C/4h7EwBhjJM=; b=ff2HhZzU8BfgZNA9EQyoxOI02G OI9GbidgG3dj3BNOLQPwlXTykOkDt3f5lWSUIBjGzaEbZUZDDmU2SGQfVYzWxkV9L4KkQ5XNG4pJE zSBbp4ALn4TObxdTo03pcsFi6uW8BBqFtrjOYHOX8uC0pkluT9TIXdz6nf/tCzDTLxTyydlpjpoS3 9XfHcr5oYwx6GtnmcxeW3LXziR3NQorLbA9KFguA8Xac8l+fjNdO9ibrEKTLgMdtTySYhSfJ/I+Rs sr6TTc5bhM+cqTS43+yNCYGtsCjehC23Z+t3QZ+1DJwgzSHQQbeQ2ZcMK8szDHOueC9vXc7G/RWh7 rrE9mGRw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRhuK-0006er-M3; Fri, 17 May 2019 18:48:40 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRhu3-0006Xs-4c for linux-arm-kernel@lists.infradead.org; Fri, 17 May 2019 18:48:32 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3EFB161926; Fri, 17 May 2019 18:48:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558118902; bh=szynDbiQZiC2P3ZZa2ZE5dH0th3Xmp6lVJejuhOsIns=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kotxC/gVpeWN8ZXVIuWXQt/mHqfwd/yP0BNPfZEaquVsSOQcuiuh5SaTEsjs5L7Th GIJYJH/bOTHC0pxhLcenw/yZ32dbBwofroI+CBiafdzlRB04jWrcc/VCLkLuFl6v5a nNgx+VzhpuwbvZAOb0xvdwHuwZMHJ+Kk9NES1eyY= Received: from isaacm-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: isaacm@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6534E618EA; Fri, 17 May 2019 18:48:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558118898; bh=szynDbiQZiC2P3ZZa2ZE5dH0th3Xmp6lVJejuhOsIns=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OWCRqzldpIG0aetEHRflxj1Jken3IgDr27PBGDkFBQJ2CVV5W+gIFaPRV8NhSrr0K MSlxvDKDo5FtdvUKPoj5MU2LPuphGmSw+PEg6rWhfnt8kpf8AWyJ3oxf9RJH87zlgl yV5F8UY1eS6J8DlofloLUzyyZkt9Ai2AuA2SZ7iY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6534E618EA Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=isaacm@codeaurora.org From: "Isaac J. Manjarres" To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org Subject: [RFC/PATCH 1/4] of: Export of_phandle_iterator_args() to modules Date: Fri, 17 May 2019 11:47:34 -0700 Message-Id: <1558118857-16912-2-git-send-email-isaacm@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1558118857-16912-1-git-send-email-isaacm@codeaurora.org> References: <1558118857-16912-1-git-send-email-isaacm@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190517_114823_549231_CD2158F9 X-CRM114-Status: GOOD ( 10.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Isaac J. Manjarres" , kernel-team@android.com, robin.murphy@arm.com, joro@8bytes.org, will.deacon@arm.com, lmark@codeaurora.org, robh+dt@kernel.org, bhelgaas@google.com, frowand.list@gmail.com, pratikp@codeaurora.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Kernel modules may want to use of_phandle_iterator_args(), so export it. Signed-off-by: Isaac J. Manjarres Acked-by: Rob Herring --- drivers/of/base.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/of/base.c b/drivers/of/base.c index 20e0e7e..8b9c597 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1388,6 +1388,7 @@ int of_phandle_iterator_args(struct of_phandle_iterator *it, return count; } +EXPORT_SYMBOL_GPL(of_phandle_iterator_args); static int __of_parse_phandle_with_args(const struct device_node *np, const char *list_name, From patchwork Fri May 17 18:47:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Isaac J. Manjarres" X-Patchwork-Id: 10948421 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 640DE1395 for ; Fri, 17 May 2019 18:48:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 536C828421 for ; Fri, 17 May 2019 18:48:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 462F728429; Fri, 17 May 2019 18:48:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C0E1F28421 for ; Fri, 17 May 2019 18:48:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=aW6EBXnv20CvJDQhwAMwoUX1fprQb/FU08nC1cqF8kE=; b=jiKIjdXr9tN6GB0FsnDUoExkju EWcoNEDKd4v9E3BGyq8JAI8+fcE++jNgQEZkEbUFHIpv1o64YTWCu1lKLncKx930PuOGspRSbk1xv 1t6xy2q+0nXcw0igLrLy0gAWtPy5mbEc0t19oxylFq4MlZGm8hG9OAdtnNNVrtVNPhdU3aoJTEQky 80RSNGo28wD8xA1/dkwKoGbVlCdqiYYG49iAEdeCCfItcQWMSQjqFbRdwQeptlq5bRGuz8jvqbAyn +2AfWzGUnlyLlaD1ivMyHrM2Wk3r1fXgrXqc/CotnABZrZcfXW2xqUW7FfTJ/PtG1uF0Qf7yUKnBo XBsUKh8Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRhuZ-0006zf-Ns; Fri, 17 May 2019 18:48:55 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRhu7-0006bt-R7 for linux-arm-kernel@lists.infradead.org; Fri, 17 May 2019 18:48:35 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7E97F61948; Fri, 17 May 2019 18:48:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558118907; bh=P/hWDoOqVaRAA//LwTH4zMFxt0mPSjrmyOPmLTB6goc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ocDpl5KhXGymw6oaz33t0PTeZCVnaYa9Gmx4sQLW/eAfeUFp9RVott6lFTjGT2MDw cZqeoYdBzIbhAbpAyAs5y0kyrNOXuugwo8hMhre70gUvkeDXVQQJjlNKA24Li1X1zv Mo4kcnsuZyI6PLlxcQZ4bcNr3XMJKicieL8vqP7Q= Received: from isaacm-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: isaacm@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4D048618EF; Fri, 17 May 2019 18:48:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558118901; bh=P/hWDoOqVaRAA//LwTH4zMFxt0mPSjrmyOPmLTB6goc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QfpDLnxeIPU6NUIdpUd/TjJOc/ag7MqQuKJcyux/eHC9sh5ZQi5AzegZRawPdGYu3 HfEfHMlFkdkx8diUL2rUMcZDn1zSdN2eYynIbfgQJhNC3fbo3o0uXw2qTMpTaBxMaD iJ/XKPEcjJnh0B6mm4gAH9V965/21KEPbCCkhHsA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4D048618EF Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=isaacm@codeaurora.org From: "Isaac J. Manjarres" To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org Subject: [RFC/PATCH 2/4] PCI: Export PCI ACS and DMA searching functions to modules Date: Fri, 17 May 2019 11:47:35 -0700 Message-Id: <1558118857-16912-3-git-send-email-isaacm@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1558118857-16912-1-git-send-email-isaacm@codeaurora.org> References: <1558118857-16912-1-git-send-email-isaacm@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190517_114828_017635_880C06FA X-CRM114-Status: GOOD ( 10.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Isaac J. Manjarres" , kernel-team@android.com, robin.murphy@arm.com, joro@8bytes.org, will.deacon@arm.com, lmark@codeaurora.org, robh+dt@kernel.org, bhelgaas@google.com, frowand.list@gmail.com, pratikp@codeaurora.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP IOMMU drivers that can be compiled as modules may want to use pci_for_each_dma_alias() and pci_request_acs(), so export those functions. Signed-off-by: Isaac J. Manjarres Acked-by: Bjorn Helgaas --- drivers/pci/pci.c | 1 + drivers/pci/search.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 766f577..3f354c1 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -3124,6 +3124,7 @@ void pci_request_acs(void) { pci_acs_enable = 1; } +EXPORT_SYMBOL_GPL(pci_request_acs); static const char *disable_acs_redir_param; diff --git a/drivers/pci/search.c b/drivers/pci/search.c index 2b5f720..cf9ede9 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c @@ -111,6 +111,7 @@ int pci_for_each_dma_alias(struct pci_dev *pdev, return ret; } +EXPORT_SYMBOL_GPL(pci_for_each_dma_alias); static struct pci_bus *pci_do_find_bus(struct pci_bus *bus, unsigned char busnr) { From patchwork Fri May 17 18:47:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Isaac J. Manjarres" X-Patchwork-Id: 10948419 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 16A4B112C for ; Fri, 17 May 2019 18:48:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 071E928420 for ; Fri, 17 May 2019 18:48:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF47928429; Fri, 17 May 2019 18:48:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9B4A828420 for ; Fri, 17 May 2019 18:48:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=B+7vfYvyHKY46Yb0jgKWGu+2oEcodspYfd4jY75AYYw=; b=JUznQSaHxNOdh+I4zOASxxAqq3 7RHdU28l957RP4KjM3Ygq94wkzYaWJrphs919DN/JQiWasWfZEWneB7dvM2iMV/lO21uBw5ullOPW Akkw9/wg05ydthfFtdgcsu7W9DUiohVRFjgpshNjWdN7O1ZH5BG6b9F8Q3Cz1jBde2I9FqZxt0HDS RADnBZ3dDIHV6R0pxt4WEUJMKRCDFIaU9fJvBaJ6W3zp9Zj8zFtKgFmqJ+wGLzCukOx+p+Hf/U6iY VmMN9TkOHOZzDS2DiXWXsjVx2mceQUGPZ8+t9gOk3h4BB7kA8m9U1GOlEeqXsL3AsncIo+33ecKTj vz3Rb9MQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRhuP-0006lN-Qv; Fri, 17 May 2019 18:48:45 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRhu7-0006bw-TH for linux-arm-kernel@lists.infradead.org; Fri, 17 May 2019 18:48:35 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 97977619C8; Fri, 17 May 2019 18:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558118907; bh=kxktoBS1pRxC6RjcDvLlbVi5FujSN7tU1/fCwkp4N1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KUcy+P/b23uQ8ZbKPaS1lCfaf1sseO3yzGDB6OE1ZztYo4hxd1LQz3dD/CtWEoGK7 dUQeFP+fUpElKxlOW7sGjpIXkCctJti01fyiJSPOUcqQRX4cqTo6mKHBeO0bLgLi6w I9YEZBnBI21mSUcUUyhCeoQ1AcYxwlF8HqB+fims= Received: from isaacm-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: isaacm@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 130DC619B4; Fri, 17 May 2019 18:48:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558118903; bh=kxktoBS1pRxC6RjcDvLlbVi5FujSN7tU1/fCwkp4N1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oah+MUC4XK/B7pkRpWFBUR815EF6RciVl3rKTJKJxLWkgViTrFFKNgKx3dI9zv8jd 39XErz3TKn2EA0vsInFzFBttxOm1NSEbxOfXYfDNb733H3WVCmr2iEWe4ToGQiS3FK S03hvzJMeM+iyTlN2SnGp1vtCSZigZqMzf3s435g= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 130DC619B4 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=isaacm@codeaurora.org From: "Isaac J. Manjarres" To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org Subject: [RFC/PATCH 3/4] iommu: Export core IOMMU functions to kernel modules Date: Fri, 17 May 2019 11:47:36 -0700 Message-Id: <1558118857-16912-4-git-send-email-isaacm@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1558118857-16912-1-git-send-email-isaacm@codeaurora.org> References: <1558118857-16912-1-git-send-email-isaacm@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190517_114828_088404_BE45AA82 X-CRM114-Status: GOOD ( 12.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Isaac J. Manjarres" , kernel-team@android.com, robin.murphy@arm.com, joro@8bytes.org, will.deacon@arm.com, lmark@codeaurora.org, robh+dt@kernel.org, bhelgaas@google.com, frowand.list@gmail.com, pratikp@codeaurora.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP IOMMU drivers that can be compiled as modules need to use some of the IOMMU core functions, so expose them. Signed-off-by: Isaac J. Manjarres --- drivers/iommu/iommu-sysfs.c | 3 +++ drivers/iommu/iommu.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/drivers/iommu/iommu-sysfs.c b/drivers/iommu/iommu-sysfs.c index 44127d5..b3dadb8 100644 --- a/drivers/iommu/iommu-sysfs.c +++ b/drivers/iommu/iommu-sysfs.c @@ -90,6 +90,7 @@ int iommu_device_sysfs_add(struct iommu_device *iommu, put_device(iommu->dev); return ret; } +EXPORT_SYMBOL_GPL(iommu_device_sysfs_add); void iommu_device_sysfs_remove(struct iommu_device *iommu) { @@ -122,6 +123,7 @@ int iommu_device_link(struct iommu_device *iommu, struct device *link) return ret; } +EXPORT_SYMBOL_GPL(iommu_device_link); void iommu_device_unlink(struct iommu_device *iommu, struct device *link) { @@ -131,3 +133,4 @@ void iommu_device_unlink(struct iommu_device *iommu, struct device *link) sysfs_remove_link(&link->kobj, "iommu"); sysfs_remove_link_from_group(&iommu->dev->kobj, "devices", dev_name(link)); } +EXPORT_SYMBOL_GPL(iommu_device_unlink); diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 109de67..2b92f35 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -103,6 +103,7 @@ int iommu_device_register(struct iommu_device *iommu) return 0; } +EXPORT_SYMBOL_GPL(iommu_device_register); void iommu_device_unregister(struct iommu_device *iommu) { @@ -813,6 +814,7 @@ struct iommu_group *iommu_group_ref_get(struct iommu_group *group) kobject_get(group->devices_kobj); return group; } +EXPORT_SYMBOL_GPL(iommu_group_ref_get); /** * iommu_group_put - Decrement group reference @@ -986,6 +988,7 @@ struct iommu_group *generic_device_group(struct device *dev) { return iommu_group_alloc(); } +EXPORT_SYMBOL_GPL(generic_device_group); /* * Use standard PCI bus topology, isolation features, and DMA alias quirks @@ -1053,6 +1056,7 @@ struct iommu_group *pci_device_group(struct device *dev) /* No shared group found, allocate new */ return iommu_group_alloc(); } +EXPORT_SYMBOL_GPL(pci_device_group); /* Get the IOMMU group for device on fsl-mc bus */ struct iommu_group *fsl_mc_device_group(struct device *dev) @@ -1133,6 +1137,7 @@ struct iommu_group *iommu_group_get_for_dev(struct device *dev) return group; } +EXPORT_SYMBOL_GPL(iommu_group_get_for_dev); struct iommu_domain *iommu_group_default_domain(struct iommu_group *group) { @@ -1913,6 +1918,7 @@ struct iommu_resv_region *iommu_alloc_resv_region(phys_addr_t start, region->type = type; return region; } +EXPORT_SYMBOL_GPL(iommu_alloc_resv_region); /* Request that a device is direct mapped by the IOMMU */ int iommu_request_dm_for_dev(struct device *dev) From patchwork Fri May 17 18:47:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Isaac J. Manjarres" X-Patchwork-Id: 10948423 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D2D07112C for ; Fri, 17 May 2019 18:49:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C38EC28420 for ; Fri, 17 May 2019 18:49:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6F2F28426; Fri, 17 May 2019 18:49:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 63B3628420 for ; Fri, 17 May 2019 18:49:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=0BS8HLU2jL5SGd1sn22tcp8EdVtx37RD2+hOLrqd/3M=; b=ArAY+TV1P1fkTdaRi+kn2KN/rd Pe1WEHLXkp1D0Zj+eoFrJNOqqp7WTZ+lUkiWjmBSDX8h+rgL96zPBpTJKLY+Nd0DtRBt4mVpNj9S5 MmavhJIAMyoA/AufG4RWGAS9aIGaBdWu33SECeV5Wk95bpXP6C02GwYurY8d7HTYEKs2uLYjS9POQ UrBycOhUmiLvnfVNiM79PeMTf0miaaniECQgsvWJ3MR5mMwRRgI2oJvHkEqYCF6KS/RG7cwhebMeO bjhAysWCNPR5dVJs7WsLhxPJz2P3ZS28keABwTp2kj5Fq42fcAd/HXESCM2SK0E3mJaR+xKov5iHW RBzn7IRg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRhuj-0007EO-Nv; Fri, 17 May 2019 18:49:05 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hRhuB-0006dI-7e for linux-arm-kernel@lists.infradead.org; Fri, 17 May 2019 18:48:37 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E6286619ED; Fri, 17 May 2019 18:48:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558118910; bh=OV/Plnh2chiiFpl1tPau4te8Ie4x49eB+//wLShrquY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WvJgtdvFG5xvdzJ6SeLvHgYIB4+iX2jh4xkHa7GFOXxriVA/nDgYcpgQPNCnqfmWQ h+fhJdHHbFljAETDngUoAE0qOIeNRcP18Efbki0Lprr/ZesmnIVpROI9q0GNyPylns FCDUBVOFKcnl1TwJoyEOqCSyvitAPo0E60ko9b24= Received: from isaacm-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: isaacm@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id F01AD619CC; Fri, 17 May 2019 18:48:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1558118905; bh=OV/Plnh2chiiFpl1tPau4te8Ie4x49eB+//wLShrquY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q5qKpN3dzD5EBfg8X33uOuhjvsyIAfJF6baPusIbikdtrA7fSJA4JsOWL4C85cVDC 6FtobZvYMtIuxiz15DDKOE+LomXOAc/mc8XvGNFwKs80DvTeeluNDTIpqXyNMmQIN8 HYC2NEdjPmNHGdOTajB64JomRehH+pSN1aUwCpA8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org F01AD619CC Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=isaacm@codeaurora.org From: "Isaac J. Manjarres" To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org Subject: [RFC/PATCH 4/4] iommu: Add probe deferral support for IOMMU kernel modules Date: Fri, 17 May 2019 11:47:37 -0700 Message-Id: <1558118857-16912-5-git-send-email-isaacm@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1558118857-16912-1-git-send-email-isaacm@codeaurora.org> References: <1558118857-16912-1-git-send-email-isaacm@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190517_114831_351323_1753B443 X-CRM114-Status: GOOD ( 15.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Isaac J. Manjarres" , kernel-team@android.com, robin.murphy@arm.com, joro@8bytes.org, will.deacon@arm.com, lmark@codeaurora.org, robh+dt@kernel.org, bhelgaas@google.com, frowand.list@gmail.com, pratikp@codeaurora.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, the IOMMU core assumes that all IOMMU drivers will be built into the kernel. This makes it so that all the IOMMU core will stop deferring probes when all of the builtin kernel drivers have finished probing (i.e. when initcalls are finished). This is problematic if an IOMMU driver is generated as a module, because the registration of the IOMMU driver may happen at an unknown point in time after all builtin drivers have finished probing. Thus, if there exists a chance for the IOMMU driver to be a module, then allow for clients to wait indefinitely for the IOMMU driver to be loaded. Otherwise, rely on the driver core to dictate when clients should stop deferring their probes. Signed-off-by: Isaac J. Manjarres --- drivers/iommu/of_iommu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c index f04a6df..1e7e323 100644 --- a/drivers/iommu/of_iommu.c +++ b/drivers/iommu/of_iommu.c @@ -116,8 +116,12 @@ static int of_iommu_xlate(struct device *dev, * IOMMU device we're waiting for, which will be useful if we ever get * a proper probe-ordering dependency mechanism in future. */ - if (!ops) - return driver_deferred_probe_check_state(dev); + if (!ops) { + if (IS_ENABLED(CONFIG_MODULES)) + return -EPROBE_DEFER; + else + return driver_deferred_probe_check_state(dev); + } return ops->of_xlate(dev, iommu_spec); }