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=-8.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 1A184C04AB4 for ; Fri, 17 May 2019 19:06:18 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (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 DFD1F2087B for ; Fri, 17 May 2019 19:06:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="KUcy+P/b"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="oah+MUC4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DFD1F2087B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 342AAC9F; Fri, 17 May 2019 19:05:28 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 02830AB9 for ; Fri, 17 May 2019 18:48:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 9EB545E4 for ; Fri, 17 May 2019 18:48:27 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6CA0C619CA; 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=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-Mailman-Approved-At: Fri, 17 May 2019 19:05:24 +0000 Cc: "Isaac J. Manjarres" , kernel-team@android.com, robin.murphy@arm.com, will.deacon@arm.com, lmark@codeaurora.org, robh+dt@kernel.org, bhelgaas@google.com, frowand.list@gmail.com, pratikp@codeaurora.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: iommu-bounces@lists.linux-foundation.org Errors-To: iommu-bounces@lists.linux-foundation.org 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) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu