From patchwork Mon Mar 1 08:42:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12109101 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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 71549C433E0 for ; Mon, 1 Mar 2021 08:50:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 2F82661494 for ; Mon, 1 Mar 2021 08:50:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F82661494 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=Jb+fJSZruzRFglmDSKX0lKdR9JjrQlsSBFBLylZuurs=; b=fza/IlEAsejjcgS1AcsZq0GaI 4lRxXh6hVM2tSbuqiT3C0XRxHgpp93UpTfRfpk0DDAM9C/FvLmI3eMWKiZ4WpOvJFKP9t7ZxLbw4I qHAF9WGZ8ooMH5Cl3uF6KhIYRQQOSOqM5r181LXBEIP0xCG/kqgeSMeVP/ezMfuIhe1y5X1w3D7d/ YPpxf8MORfWh8oNbQWG/bSjwbnyMcELYs3z16mmgPSWHHOiioaZwM1sux1joVIW6KOoI9BT1U1/OF JQymVihgLJ1gWXB9KQgSSxNmzcxYXLdqPGTgRxGo3L6KKW3Tzp0w1600VSy2ACHgkcpb3gC4Bmthb 53+sCXGyQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lGeF3-0001hM-C3; Mon, 01 Mar 2021 08:49:25 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lGeEg-0001Xj-1d for linux-arm-kernel@merlin.infradead.org; Mon, 01 Mar 2021 08:49:02 +0000 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: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=xjnrpEXxWqN295Q5FQN/MKyM59zP4it+2k/oCX23gCw=; b=GUTHjhjVLRbJTH2y8N0f5pXfQt BpcjyqebHUSqkrTfxo9sNnMxsXXi553XjQV00V9WvEhU+FZoA+NR+7JFRo7V+AcJrTEM2A0/NWoUY UQcG1jJvPEvJ62t0+skQ3GOQwTgz9bkJrgJ5bnVxZaxWSLvpKWL69ICJDko8VZPR7xnOkfCwL79i7 gSKcArm/UWJvBLWZ3LQ2LKR9uhK0zIeUIiMijW/QfWAXEvydnu+GXr4VH9gDQxN7matDN8yNDTwzc mzOmEyht23pCYSJg+mpQkr9XEd1UDX2UeQck2jKCZcJqclZ3cNse2Oooee5h2NDsQSuznxuuEfST1 vhs+o1kA==; Received: from [2001:4bb8:19b:e4b7:cdf9:733f:4874:8eb4] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lGeES-00FUwW-Vk; Mon, 01 Mar 2021 08:48:50 +0000 From: Christoph Hellwig To: Joerg Roedel , Will Deacon , Li Yang Subject: [PATCH 17/17] iommu: remove iommu_domain_set_attr Date: Mon, 1 Mar 2021 09:42:57 +0100 Message-Id: <20210301084257.945454-18-hch@lst.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210301084257.945454-1-hch@lst.de> References: <20210301084257.945454-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: freedreno@lists.freedesktop.org, kvm@vger.kernel.org, Michael Ellerman , linuxppc-dev@lists.ozlabs.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, iommu@lists.linux-foundation.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, David Woodhouse , linux-arm-kernel@lists.infradead.org, Lu Baolu Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Signed-off-by: Christoph Hellwig --- drivers/iommu/iommu.c | 17 ----------------- include/linux/iommu.h | 27 --------------------------- 2 files changed, 44 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 8490aefd4b41f8..b04e6cefe8520d 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -2668,23 +2668,6 @@ bool iommu_dma_use_flush_queue(struct iommu_domain *domain) } EXPORT_SYMBOL_GPL(iommu_dma_use_flush_queue); -int iommu_domain_set_attr(struct iommu_domain *domain, - enum iommu_attr attr, void *data) -{ - int ret = 0; - - switch (attr) { - default: - if (domain->ops->domain_set_attr == NULL) - return -EINVAL; - - ret = domain->ops->domain_set_attr(domain, attr, data); - } - - return ret; -} -EXPORT_SYMBOL_GPL(iommu_domain_set_attr); - int iommu_domain_enable_nesting(struct iommu_domain *domain) { if (!domain->ops->domain_enable_nesting) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 39d3ed4d2700ac..62535f563aa491 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -97,20 +97,6 @@ enum iommu_cap { IOMMU_CAP_NOEXEC, /* IOMMU_NOEXEC flag */ }; -/* - * Following constraints are specifc to FSL_PAMUV1: - * -aperture must be power of 2, and naturally aligned - * -number of windows must be power of 2, and address space size - * of each window is determined by aperture size / # of windows - * -the actual size of the mapped region of a window must be power - * of 2 starting with 4KB and physical address must be naturally - * aligned. - */ - -enum iommu_attr { - DOMAIN_ATTR_MAX, -}; - /* These are the possible reserved region types */ enum iommu_resv_type { /* Memory regions which must be mapped 1:1 at all times */ @@ -194,7 +180,6 @@ struct iommu_iotlb_gather { * @device_group: find iommu group for a particular device * @dma_use_flush_queue: Returns %true if a DMA flush queue is used * @dma_enable_flush_queue: Try to enable the DMA flush queue - * @domain_set_attr: Change domain attributes * @domain_enable_nesting: Enable nesting * @domain_set_pgtable_attr: Set io page table attributes * @get_resv_regions: Request list of reserved regions for a device @@ -247,8 +232,6 @@ struct iommu_ops { struct iommu_group *(*device_group)(struct device *dev); bool (*dma_use_flush_queue)(struct iommu_domain *domain); void (*dma_enable_flush_queue)(struct iommu_domain *domain); - int (*domain_set_attr)(struct iommu_domain *domain, - enum iommu_attr attr, void *data); int (*domain_enable_nesting)(struct iommu_domain *domain); int (*domain_set_pgtable_attr)(struct iommu_domain *domain, struct io_pgtable_domain_attr *pgtbl_cfg); @@ -498,11 +481,7 @@ extern struct iommu_domain *iommu_group_default_domain(struct iommu_group *); bool iommu_dma_use_flush_queue(struct iommu_domain *domain); int iommu_domain_set_pgtable_attr(struct iommu_domain *domain, struct io_pgtable_domain_attr *pgtbl_cfg); -extern int iommu_domain_set_attr(struct iommu_domain *domain, enum iommu_attr, - void *data); int iommu_domain_enable_nesting(struct iommu_domain *domain); -int iommu_domain_set_pgtable_attr(struct iommu_domain *domain, - struct io_pgtable_domain_attr *pgtbl_cfg); extern int report_iommu_fault(struct iommu_domain *domain, struct device *dev, unsigned long iova, int flags); @@ -869,12 +848,6 @@ static inline int iommu_group_id(struct iommu_group *group) return -ENODEV; } -static inline int iommu_domain_set_attr(struct iommu_domain *domain, - enum iommu_attr attr, void *data) -{ - return -EINVAL; -} - static inline int iommu_device_register(struct iommu_device *iommu) { return -ENODEV;