From patchwork Mon Apr 29 14:44:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 163036 Delivered-To: patch@linaro.org Received: by 2002:a92:7e86:0:0:0:0:0 with SMTP id q6csp1973635ill; Mon, 29 Apr 2019 07:45:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8Yr7jjG4RUWAMZ3HTkd3+0LDy8sEaew+Zu05jkCM+YuBJhz3iwPlKkHz7RM1H1rVmD41d X-Received: by 2002:a63:9dc8:: with SMTP id i191mr49270902pgd.91.1556549104222; Mon, 29 Apr 2019 07:45:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556549104; cv=none; d=google.com; s=arc-20160816; b=la67fXNc9Qzpl2/fdUDSLoCNuabm+kbZ2NWH7hslAWTJKlEGcXx+8hGT0bv5gqSd51 FvZc2WWS/8yw5FNt0sD9ptQCn08LIQdLrynE4rCkdExI9UdSLw0VDm9V7lZHejBuaT18 SalvM+qE106Z8YdneBqyjOy564Icpf6EFR/WI5vqKZTtJ5kHoMw7ds+eNaXB7xHfy/Yr qSWrovYOh3cm2RI5JJpqV6mUnjIUDRhrOQxuzEQ+t2cTkXdtkkDaBs9NjfykmfL8cTRv ddGbEQeTs1pTFG1AAOCcrfITAn1bzATNO95os/ubOG0LALa9B791D9DbgB1Rj1O9C9EW lUug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=ClC7ljKpJUPltPxjDxK/RRLr6w0h/jUeU8rfdiPyI2U=; b=DYX1HVHkcTP6hm7eNXPy0ZLeUULmibTYmvenWkOamy1TEqil6mW83AN9ULz/FfadIf cxrsgZoZnMlYf8ddTnihO/JjbKqEdCfa/3QwvsUTZcWr6llhi7LWXQpRMzvklHFiakMa +llpHZ6qwNb8mbZCj6nx74JguobM6d6y5IacPpxJeiVSPztJD5PPMxyfa0fLDhVrg8br RpbtPPqFZvltmeDF8rw3SnmehZJLnlznMl+J93SMuabEAqOuJ/TMOAglXJsjVI3LOKZy gQjXK8eR4ftbU8kL3Fjh0v9A3aElnn96Xh7zsxBEdEt+A+Rz7t0v2rZoksDTghdPpYTS FXjA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si14204126plk.353.2019.04.29.07.45.03; Mon, 29 Apr 2019 07:45:04 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728550AbfD2OpC (ORCPT + 30 others); Mon, 29 Apr 2019 10:45:02 -0400 Received: from foss.arm.com ([217.140.101.70]:59058 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728331AbfD2Oo4 (ORCPT ); Mon, 29 Apr 2019 10:44:56 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C73A01682; Mon, 29 Apr 2019 07:44:55 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 782303F5C1; Mon, 29 Apr 2019 07:44:53 -0700 (PDT) From: Julien Grall To: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org Cc: logang@deltatee.com, douliyangs@gmail.com, miquel.raynal@bootlin.com, marc.zyngier@arm.com, jason@lakedaemon.net, tglx@linutronix.de, joro@8bytes.org, robin.murphy@arm.com, bigeasy@linutronix.de, linux-rt-users@vger.kernel.org, Julien Grall Subject: [PATCH v2 7/7] iommu/dma-iommu: Remove iommu_dma_map_msi_msg() Date: Mon, 29 Apr 2019 15:44:28 +0100 Message-Id: <20190429144428.29254-8-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190429144428.29254-1-julien.grall@arm.com> References: <20190429144428.29254-1-julien.grall@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A recent change split iommu_dma_map_msi_msg() in two new functions. The function was still implemented to avoid modifying all the callers at once. Now that all the callers have been reworked, iommu_dma_map_msi_msg() can be removed. Signed-off-by: Julien Grall --- Changes in v2: - Rework the commit message --- drivers/iommu/dma-iommu.c | 20 -------------------- include/linux/dma-iommu.h | 5 ----- 2 files changed, 25 deletions(-) -- 2.11.0 Reviewed-by: Robin Murphy Reviewed-by: Eric Auger diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index 2309f59cefa4..12f4464828a4 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -936,23 +936,3 @@ void iommu_dma_compose_msi_msg(struct msi_desc *desc, msg->address_lo &= cookie_msi_granule(domain->iova_cookie) - 1; msg->address_lo += lower_32_bits(msi_page->iova); } - -void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg) -{ - struct msi_desc *desc = irq_get_msi_desc(irq); - phys_addr_t msi_addr = (u64)msg->address_hi << 32 | msg->address_lo; - - if (WARN_ON(iommu_dma_prepare_msi(desc, msi_addr))) { - /* - * We're called from a void callback, so the best we can do is - * 'fail' by filling the message with obviously bogus values. - * Since we got this far due to an IOMMU being present, it's - * not like the existing address would have worked anyway... - */ - msg->address_hi = ~0U; - msg->address_lo = ~0U; - msg->data = ~0U; - } else { - iommu_dma_compose_msi_msg(desc, msg); - } -} diff --git a/include/linux/dma-iommu.h b/include/linux/dma-iommu.h index 3fc48fbd6f63..ddd217c197df 100644 --- a/include/linux/dma-iommu.h +++ b/include/linux/dma-iommu.h @@ -82,7 +82,6 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr); void iommu_dma_compose_msi_msg(struct msi_desc *desc, struct msi_msg *msg); -void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg); void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list); #else @@ -122,10 +121,6 @@ static inline void iommu_dma_compose_msi_msg(struct msi_desc *desc, { } -static inline void iommu_dma_map_msi_msg(int irq, struct msi_msg *msg) -{ -} - static inline void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list) { }