Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp964480ybx; Wed, 30 Oct 2019 07:54:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmmvac7Jasm1pAIdyZsK0fagI4euyOq8ruFO1rBsM25zPZSRTXTBrI03ONgFytF/jxu/UW X-Received: by 2002:a17:906:497:: with SMTP id f23mr9130876eja.234.1572447295953; Wed, 30 Oct 2019 07:54:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572447295; cv=none; d=google.com; s=arc-20160816; b=CTCcwm55Vlqlti5EE2ozz8rOQtkTwUoAUbW3zzff3GJA7l05YszA2Zcpg4gv3011ck LLh/l4FfqeTFsouPiCNFSq5Ovu/5iw9IIPBCQh1JC4QC7ErJlz5uSqHxcvwN+O8c/q1d zl4MvjKXlgqXwFrufFmFwm4gtajNjqZrkFcsyze952k4mKyM8JBSFuc93ydUyMzyp0cN decEsJvaOevj6V3uxduVioX22or5NkS4Zauwoy5sAGV2710V7mqgzxeHxPYdf0tNN5Ek WnUddAJwEMDTuwayTAnt5ssAYmTlDq8SvQ3tFGH1hbb+a/+1altL0bt58XH//LNRYn/H ecyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1AEcb1HL3xJCcUCfX/JfdYjiI5HpCUBhdquWsh+gfSY=; b=xbWC5nY+XHsbL3cD+e1kJN5CUTBF6RZL9KI0Z6cabVQZ4X4PANPKcH30Cr2BkRDsxW aTF8gMB9QYwAf9VBGgeO+60BqkP3XB+Wh/HcDYeYGb7jYYl/vtn5tK9JhZ1xUwcGFSJk YIg2lDfK+YiISeyjc2PrjAHhEiOJ+ib7pC34wOpVFimlTPyozC6l+ErCJvSAwIBIh4CT 8doc823cKqNz7dWkGmZ8vUd5hExthlX4Er+DosnyA4KOPoZUT+2HIUM6W9Az810dfL1j KzmupYaKGImXCFSXYDN/1DF9u53pPVL2GSKyruuT1jwUcFHlyV2xeNDbeiyECU4YvF1l k3mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WPrsBLdA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 17si1266124ejt.419.2019.10.30.07.54.32; Wed, 30 Oct 2019 07:54:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WPrsBLdA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726634AbfJ3OvV (ORCPT + 99 others); Wed, 30 Oct 2019 10:51:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:57572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726259AbfJ3OvV (ORCPT ); Wed, 30 Oct 2019 10:51:21 -0400 Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2CD51208E3; Wed, 30 Oct 2019 14:51:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572447080; bh=JGGnstkDH41N5UsOM8CcbyP/LjMW3A1v+bSruf55Xec=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WPrsBLdAqQcrF8QiUqWybb5qH3vWTVnaW6pzgfsTxfdPqvT2cmCMj5EUA8qxNs1Tt dQBD74rttmEklO7C+QFkznuvr8O6gVoHr3jI89O0609cjfQ605KV+VqKbbgchjxUSn iuX5EVTG1vDCzSNNYqhvGijymfxryWuza9C9AW3Q= From: Will Deacon To: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Cc: Will Deacon , Robin Murphy , Joerg Roedel , Bjorn Helgaas , Lorenzo Pieralisi Subject: [PATCH 1/7] drivers/iommu: Export core IOMMU API symbols to permit modular drivers Date: Wed, 30 Oct 2019 14:51:06 +0000 Message-Id: <20191030145112.19738-2-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191030145112.19738-1-will@kernel.org> References: <20191030145112.19738-1-will@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building IOMMU drivers as modules requires that the core IOMMU API symbols are exported as GPL symbols. Signed-off-by: Will Deacon --- drivers/iommu/iommu-sysfs.c | 5 +++++ drivers/iommu/iommu.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/drivers/iommu/iommu-sysfs.c b/drivers/iommu/iommu-sysfs.c index e436ff813e7e..99869217fbec 100644 --- a/drivers/iommu/iommu-sysfs.c +++ b/drivers/iommu/iommu-sysfs.c @@ -87,6 +87,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) { @@ -94,6 +95,8 @@ void iommu_device_sysfs_remove(struct iommu_device *iommu) device_unregister(iommu->dev); iommu->dev = NULL; } +EXPORT_SYMBOL_GPL(iommu_device_sysfs_remove); + /* * IOMMU drivers can indicate a device is managed by a given IOMMU using * this interface. A link to the device will be created in the "devices" @@ -119,6 +122,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) { @@ -128,3 +132,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 d658c7c6a2ab..c1aadb570145 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -141,6 +141,7 @@ int iommu_device_register(struct iommu_device *iommu) spin_unlock(&iommu_device_lock); return 0; } +EXPORT_SYMBOL_GPL(iommu_device_register); void iommu_device_unregister(struct iommu_device *iommu) { @@ -148,6 +149,7 @@ void iommu_device_unregister(struct iommu_device *iommu) list_del(&iommu->list); spin_unlock(&iommu_device_lock); } +EXPORT_SYMBOL_GPL(iommu_device_unregister); static struct iommu_param *iommu_get_dev_param(struct device *dev) { @@ -886,6 +888,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 @@ -1259,6 +1262,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 @@ -1326,6 +1330,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) @@ -1338,6 +1343,7 @@ struct iommu_group *fsl_mc_device_group(struct device *dev) group = iommu_group_alloc(); return group; } +EXPORT_SYMBOL_GPL(fsl_mc_device_group); /** * iommu_group_get_for_dev - Find or create the IOMMU group for a device @@ -1406,6 +1412,7 @@ struct iommu_group *iommu_group_get_for_dev(struct device *dev) return group; } +EXPORT_SYMBOL(iommu_group_get_for_dev); struct iommu_domain *iommu_group_default_domain(struct iommu_group *group) { @@ -2185,6 +2192,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); static int request_default_domain_for_dev(struct device *dev, unsigned long type) -- 2.24.0.rc0.303.g954a862665-goog