Message ID | 20221128064648.1934720-15-baolu.lu@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5475490wrr; Sun, 27 Nov 2022 22:58:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Fsp9BP6pB5/1AvZRsPoN8B1HhLoR+o+D6VaAh1UYY5qMBXWDNmuJZ5+dKc305ZU2iqW9F X-Received: by 2002:aa7:d1c5:0:b0:461:dd11:c1bd with SMTP id g5-20020aa7d1c5000000b00461dd11c1bdmr44693156edp.406.1669618700531; Sun, 27 Nov 2022 22:58:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669618700; cv=none; d=google.com; s=arc-20160816; b=AMzvhf+BCuwmmwhiALAJPfCBrGbpk3IR7M/UyTp4LYxP23vMjxv7wrlHMc/E5y8Bwj bWX2bsoiHxAjFNg4gBK9xe3zXU1S0dDFYLC4b9H3G0H5/E9xJPG15HCN13u+1f+7RD+S Ssm00Jx9oyRCN0Cs9eV09g8kjNqfLnI2mbvGohY7sR00ef//Norazk3bIfFR0G+KE9H6 SS7cfrCfzGipqYXFXW96bYVm+TnSxRT6iYdSxu7f7cb3NKJAidfhhIW63+d6Gk/WJ45Q v8+txfMsGdWbEHz3izLLnVagtxbxkXGY0zYZ1neyDuYrKzroKjf2GsX5c7el4+6Jf9/R ojMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MmFcfZex1Cm3AQUgJrUUafOT8W0hVLPGz2DQWiDar2c=; b=rpCfZO52KrxnrSYNurF7/UfpJ8tnRJdiev2GSs7UAgGxn237Xok8dnKZy5c1x6NEvc Bjdgrth8OUObd0WN4X9j+aymAJSaSRS+7RkVhyr3goWfBcJ7II5nsJDivB65xTgTNiDG dEIW/QhhNAnnnBWLCMRynujrW2UbRVpsPKQ5dZ+hzTKK8YlwVLJ+hX5BDZILXvdgPmMD e4fSNMiy3XHfhDG6FuF0dsqktCCPWk6ieHZxVVpViYlEmrkGPRe5qQk2+/TXxC4yQuz8 mstbkFyMh6hbS2w1TJSvN2dDOT86nDp5qEzS9LHXbfn5xUMb4S6VuM6cv7epvt0q/z+G rkdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nO6mryGu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji11-20020a170907980b00b0078dd22dd569si9193799ejc.121.2022.11.27.22.57.57; Sun, 27 Nov 2022 22:58:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nO6mryGu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229730AbiK1G4j (ORCPT <rfc822;gah0developer@gmail.com> + 99 others); Mon, 28 Nov 2022 01:56:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230022AbiK1G4G (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 28 Nov 2022 01:56:06 -0500 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED01A15A19 for <linux-kernel@vger.kernel.org>; Sun, 27 Nov 2022 22:55:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669618544; x=1701154544; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ff31laKxSfpGr9mFdQQubwFooU0bdzqdYVYXB0kO0dk=; b=nO6mryGu2cs6NBNmObkLlUl31LjuaLmQEESaAsMBsdXyDKmPtwuqnnjA 48FeEiOYnCam1awlxa/Nc3mtSBlNVZY3O5Ju1suiVz7kI//Z7vBh/dkUj LAE2PrRJaEq2rxHBkKuGLCj8dzVQzbGEufi6qnCRMQAc2GYlPO9Xr8aaX nivJ0Iwuvfoq/pZaoT3D7j4AjAejJFaKOOivkdWdH4mMx5HCu5yLzfFha 7Y3QjBm9MZYqXxqV9nCkCXoCu+5upBfnPwLRSrZOTwH6ISbLOnKqArhi9 wUu8VDO+5ZSIeAVwqtMlhCFnyrqDorZy+aNe8VdmLAprSiR14vK17kYgm w==; X-IronPort-AV: E=McAfee;i="6500,9779,10544"; a="294462601" X-IronPort-AV: E=Sophos;i="5.96,199,1665471600"; d="scan'208";a="294462601" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2022 22:55:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10544"; a="674121224" X-IronPort-AV: E=Sophos;i="5.96,199,1665471600"; d="scan'208";a="674121224" Received: from allen-box.sh.intel.com ([10.239.159.48]) by orsmga008.jf.intel.com with ESMTP; 27 Nov 2022 22:55:37 -0800 From: Lu Baolu <baolu.lu@linux.intel.com> To: Joerg Roedel <joro@8bytes.org>, Jason Gunthorpe <jgg@nvidia.com>, Christoph Hellwig <hch@infradead.org>, Kevin Tian <kevin.tian@intel.com>, Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, Jean-Philippe Brucker <jean-philippe@linaro.org> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>, Hector Martin <marcan@marcan.st>, Sven Peter <sven@svenpeter.dev>, Rob Clark <robdclark@gmail.com>, Marek Szyprowski <m.szyprowski@samsung.com>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Yong Wu <yong.wu@mediatek.com>, Matthias Brugger <matthias.bgg@gmail.com>, Heiko Stuebner <heiko@sntech.de>, Matthew Rosato <mjrosato@linux.ibm.com>, Orson Zhai <orsonzhai@gmail.com>, Baolin Wang <baolin.wang@linux.alibaba.com>, Chunyan Zhang <zhang.lyra@gmail.com>, Chen-Yu Tsai <wens@csie.org>, Thierry Reding <thierry.reding@gmail.com>, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Lu Baolu <baolu.lu@linux.intel.com> Subject: [PATCH v3 14/20] iommu/omap: Add set_platform_dma callback Date: Mon, 28 Nov 2022 14:46:42 +0800 Message-Id: <20221128064648.1934720-15-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221128064648.1934720-1-baolu.lu@linux.intel.com> References: <20221128064648.1934720-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750722098557911349?= X-GMAIL-MSGID: =?utf-8?q?1750722098557911349?= |
Series |
iommu: Retire detach_dev callback
|
|
Commit Message
Baolu Lu
Nov. 28, 2022, 6:46 a.m. UTC
This IOMMU driver doesn't support default domain. Add the implementation
of set_platform_dma callback so that the IOMMU core could return the
DMA control.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
drivers/iommu/omap-iommu.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 2fd7702c6709..aa3858a48bbf 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -1566,6 +1566,14 @@ static void omap_iommu_detach_dev(struct iommu_domain *domain, spin_unlock(&omap_domain->lock); } +static void omap_iommu_set_platform_dma(struct device *dev) +{ + struct iommu_domain *domain = iommu_get_domain_for_dev(dev); + + if (domain) + omap_iommu_detach_dev(domain, dev); +} + static struct iommu_domain *omap_iommu_domain_alloc(unsigned type) { struct omap_iommu_domain *omap_domain; @@ -1737,6 +1745,7 @@ static const struct iommu_ops omap_iommu_ops = { .probe_device = omap_iommu_probe_device, .release_device = omap_iommu_release_device, .device_group = omap_iommu_device_group, + .set_platform_dma = omap_iommu_set_platform_dma, .pgsize_bitmap = OMAP_IOMMU_PGSIZES, .default_domain_ops = &(const struct iommu_domain_ops) { .attach_dev = omap_iommu_attach_dev,