From patchwork Fri Mar 2 14:55:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 130540 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp1362511lja; Fri, 2 Mar 2018 06:58:36 -0800 (PST) X-Google-Smtp-Source: AG47ELtKPK9CZpAQd3sLzQ7pl/Y2UDoI2zSRjOGBNj8dwDFfj1/3D7gPtPVsJ41zEWdbWG+HkDJr X-Received: by 2002:a17:902:7c84:: with SMTP id y4-v6mr5400038pll.305.1520002716398; Fri, 02 Mar 2018 06:58:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520002716; cv=none; d=google.com; s=arc-20160816; b=U+4gJhnZcHH7f4/Qjw2GrJ9e1IRkWtRfVRNfBlnFLECBiBIM/mLiTFdBJQz7mmYklV Rf7N4ochwwGDUEslLyWvsEnquxuf2PuIQLWCuKKT8nQ+9D7HhizG9jXX+cCtT1n/VE0f upnNfonq+CNGRrO/7TUImp2WBzd/7ddJJz7ltHjr0fRJ5RPeXAH7STVwbxu57QDRolOH X8xxOjK5pVXZB/t9j32q/g3J+1IeNB2iyiXagbyA5dPe6rheN92O4tF8cj9Lg0JFsz1A SahsIVxwxS0h7+3nHrmCrtTkk0LzD00H0lhjf5caJ2xdL4YdLjrGL77l5Dk0hQN+qqpI laOg== 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:dkim-signature:arc-authentication-results; bh=ElYMzOYlFqWMtD7DzDSpINayMXJyu1ZXjzhI1C0ygl0=; b=NoOmlaljogzBPS1AdSzoTnSQAO8GBa1lY1ci5d1U+9ZmbEjv/XZmX1sC3+pK5YATbS YIOKNJtsyzV/iZaFCGnafa+ajf9Sp3YQ9XGHbuB1FJ3Yf/mqL6QESnfLHqiGderDY3C3 yCexjxywcncoZT+t53S2kScYeCV3UEDvq0Ktc5NYASFSQID/b/tXUB6UpPNUmm04JTAq 6vt86FuS6g/tizYVzMiA/U2SpuKeAt/uHW9PWl5gncWPwfsJpjIDWoXu8JF2MXcCscaX QcHYgz3NypbXVNSUkXnclpYuBW7UbrNqfdJNllWp3gXeU+XUh7y1mAqwml3mkhKT87Zy 7dKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FRt0L38O; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d16si4106928pgv.331.2018.03.02.06.58.35; Fri, 02 Mar 2018 06:58:36 -0800 (PST) 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=@linaro.org header.s=google header.b=FRt0L38O; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1428958AbeCBO6c (ORCPT + 28 others); Fri, 2 Mar 2018 09:58:32 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:44838 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1428926AbeCBO63 (ORCPT ); Fri, 2 Mar 2018 09:58:29 -0500 Received: by mail-wr0-f193.google.com with SMTP id v65so10375593wrc.11 for ; Fri, 02 Mar 2018 06:58:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ElYMzOYlFqWMtD7DzDSpINayMXJyu1ZXjzhI1C0ygl0=; b=FRt0L38Oe8pq+1NisRwB8ZbyAWr/OY4kko1b9KvjcvjzVM9k2mCnmVPaz8j5VWNTJT rS9pfM7T3/w+GfbApDXPt/DpEN4SGgAxAk8ptQfS/pyMbzMFkD0jTsaSE01ydukyoUv1 5UTab5vGJkOopiIxYDyddo2xF39TnOXkX41qo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ElYMzOYlFqWMtD7DzDSpINayMXJyu1ZXjzhI1C0ygl0=; b=NoIxJm20SozHmL10uhrPFrY52LilAsII0GvbWz/lU9Vt8BX86oHU8dcPzCRxfCSM2O 4UVhmcoghgjBorpIS2sxQppKGnMD9WRmJofmNl0lTdghvHjYM+Uv6T4lK5YHxQkdA+Ou F2cpx0ACHmeJwygcWRSVxTzFfOqnDHHWeDjgIYA0CmwUcPkzTe2gnr9FhNbAH9vZjg5M JqnlSDz+klznyuooKOP07LfhID37FHOvVB5bWxo7r+p7tlbxCI2lcT8rMkk7CTR0pEUk liGdNQg8e8LCaQSHvcURoA2DzTAYNvT1t4EbOiJ9SunnpBx+pl3kilD1z5akAm1N8Db+ P6qw== X-Gm-Message-State: APf1xPBMLcFbCBRQSvpbL53bUYlu5tRNo0dVWn9Exxfe95ENH/6doscs XzFN301swOWJDbYCSKQbphWaNw== X-Received: by 10.223.187.199 with SMTP id z7mr5461800wrg.58.1520002708567; Fri, 02 Mar 2018 06:58:28 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id b68sm1483168wmi.30.2018.03.02.06.58.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Mar 2018 06:58:28 -0800 (PST) From: srinivas.kandagatla@linaro.org To: will.deacon@arm.com, robin.murphy@arm.com, bjorn.andersson@linaro.org Cc: joro@8bytes.org, ohad@wizery.com, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 1/3] rpmsg: core: export rpmsg bus type Date: Fri, 2 Mar 2018 14:55:29 +0000 Message-Id: <20180302145531.20463-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180302145531.20463-1-srinivas.kandagatla@linaro.org> References: <20180302145531.20463-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Srinivas Kandagatla Export rpmsg bus type so that iommu drivers iommu ops to rpmsg bus type. On Qualcomm SoCs ADSP exposes functions like audio and other which need iommu access, as these drivers are part of rpmsg bus, able to allocate memory from iommus is basic requirement. So expose this bus so that iommu drivers can add ops to this. Signed-off-by: Srinivas Kandagatla --- drivers/rpmsg/rpmsg_core.c | 3 ++- include/linux/rpmsg.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.15.1 diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index 5a081762afcc..e84c71f8d6ab 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -465,7 +465,7 @@ static int rpmsg_dev_remove(struct device *dev) return err; } -static struct bus_type rpmsg_bus = { +struct bus_type rpmsg_bus = { .name = "rpmsg", .match = rpmsg_dev_match, .dev_groups = rpmsg_dev_groups, @@ -473,6 +473,7 @@ static struct bus_type rpmsg_bus = { .probe = rpmsg_dev_probe, .remove = rpmsg_dev_remove, }; +EXPORT_SYMBOL(rpmsg_bus); int rpmsg_register_device(struct rpmsg_device *rpdev) { diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h index ca07366c4c33..869e5946b7df 100644 --- a/include/linux/rpmsg.h +++ b/include/linux/rpmsg.h @@ -49,7 +49,7 @@ struct rpmsg_device; struct rpmsg_endpoint; struct rpmsg_device_ops; struct rpmsg_endpoint_ops; - +extern struct bus_type rpmsg_bus; /** * struct rpmsg_channel_info - channel info representation * @name: name of service From patchwork Fri Mar 2 14:55:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 130543 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp1363064lja; Fri, 2 Mar 2018 06:59:09 -0800 (PST) X-Google-Smtp-Source: AG47ELt6roeSB6UTifzI24I9m0iZisvVYAtK+BeVjSzlyVZ2vR1nZAmMcub85Fec48cZ24+qGVAS X-Received: by 2002:a17:902:7284:: with SMTP id d4-v6mr3556665pll.296.1520002749444; Fri, 02 Mar 2018 06:59:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520002749; cv=none; d=google.com; s=arc-20160816; b=wNyNhP4L5l7u+LqUhvnyUNfadRiRKJEHFmI1gBZr7EUp5Ntnk51d85H6ZehtrD7SU+ NdkE4ll/WiGM8kGi3JO5jzBN6sVUUUZYr4qleOVIWcqfGtKbkk75gKdnGOZa6JuR78nU 86xweJXs0uQaLXhcLxY9Wm9gGKIkuYLjlSQ/Z8djC4Bj0UNiQudPUK/DJQKvaV+xk/SQ t1LNOqIifq+aA5A6sWIsAaDXDRpZipODE3OuVZa5MRaCcTpyPEXK7ot1M/NEiLV2XFtw cfu4Zd4wVTrpIruz6u8smoOQkcISkMCr25+tA8jxLMgNDECilqXhAspDOxVgw1EcUGSj qzRg== 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:dkim-signature:arc-authentication-results; bh=W3ukytPLmphIhDeCNRJIiwK6rG3cGoGMZ5S4jB2QyJA=; b=Qc1LQz/A05oM1cPMeTYisIEJ1UUy2LAYAWK+XAiFF1XD7qEKDmas19/hvrdIXdId2S qm7b2G9qD0MXXOpnAaLPDNxWwgdjlqFBoLajYDIx+o+5iVO41Yr0op/nqj7c68eOzCnK IFc4sqXeh+6+JSUsxXWVnWq1QRti3CJO0v941fFPIDo7hp8OTKVXQNVcuIU6Q0I6cO8G NSJHyyB/pY+Uy75UVUPPxXKtXGFbrrt6IXM5kLEQZsPkFuYhVdg1HEQx8/8p/1M5SlTs SDHz/jtnTP+CeX/f0wohhttdOflUXYoC+R0yiMc1ILCm6sK0XY8GdG958v54XxjRktCv Qmlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Mt9qQby5; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u188si4095606pgc.785.2018.03.02.06.59.09; Fri, 02 Mar 2018 06:59:09 -0800 (PST) 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=@linaro.org header.s=google header.b=Mt9qQby5; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1428979AbeCBO7G (ORCPT + 28 others); Fri, 2 Mar 2018 09:59:06 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:52960 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1428930AbeCBO6a (ORCPT ); Fri, 2 Mar 2018 09:58:30 -0500 Received: by mail-wm0-f67.google.com with SMTP id t3so3676319wmc.2 for ; Fri, 02 Mar 2018 06:58:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=W3ukytPLmphIhDeCNRJIiwK6rG3cGoGMZ5S4jB2QyJA=; b=Mt9qQby5eoW66qm/Ky3GXUMbZVQk0ll+L3m0T+lNF+Ks9SiltprBDlZFq5XDm78Icf 7SyEAsencTKvmxWrXjVfJHOAwm0JC9RjBOBwMMT7/vjCagANR3Q0rFLx0HNTslyKSBMg qT6TcCWBDoeS7HLc01FvtXHaUXvzVdivp3kYQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=W3ukytPLmphIhDeCNRJIiwK6rG3cGoGMZ5S4jB2QyJA=; b=RwsJ+0NeBMBhIw4vLQXbAwvWjAq0JJpMtUPvVmHulFiUXnoQ+2cGGHz5VnLjUynVbQ G6cGzrC99uw0XpLV7OI6sAobDqWjfeEl3DA2bdRrBg4c272grJq48A02hh38v+5GNaJD DBpQrSnWny/8jgydMsUvixGGnpsOSSgqTJj/qr1of4j4ix+XldwOj1Q9zXR9r7f/F2/x J4VpCS2tx/P9od6G2+ToDFPas/xsvbwy2o/26z/m3i9151Jchz+becqTSfDm7Wmg/yYp xDR8XP5Z+jVpkwteuJEnd4fUPiSQzsxdYRxnqeJfWhm8cIwD3pZULoKZDdoDFo+24TPG OE+g== X-Gm-Message-State: AElRT7EguaoeOI/VM/1wXfL5JxaYnKnEm/eJKt57AD2q51Otrfqbs2xD f5I/NVJFwrelJ9mP4T1LsPqsYA== X-Received: by 10.28.35.14 with SMTP id j14mr1611963wmj.43.1520002709531; Fri, 02 Mar 2018 06:58:29 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id b68sm1483168wmi.30.2018.03.02.06.58.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Mar 2018 06:58:29 -0800 (PST) From: srinivas.kandagatla@linaro.org To: will.deacon@arm.com, robin.murphy@arm.com, bjorn.andersson@linaro.org Cc: joro@8bytes.org, ohad@wizery.com, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 2/3] rpmsg: core: make rpmsg bus DMA capable Date: Fri, 2 Mar 2018 14:55:30 +0000 Message-Id: <20180302145531.20463-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180302145531.20463-1-srinivas.kandagatla@linaro.org> References: <20180302145531.20463-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Srinivas Kandagatla Many of the rpmsg clients like audio drivers need to allocate dma memory. Make this bus DMA capable so that the child devices can use dma apis. Signed-off-by: Srinivas Kandagatla --- drivers/rpmsg/rpmsg_core.c | 1 + 1 file changed, 1 insertion(+) -- 2.15.1 diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index e84c71f8d6ab..540a3f3567b8 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -472,6 +472,7 @@ struct bus_type rpmsg_bus = { .uevent = rpmsg_uevent, .probe = rpmsg_dev_probe, .remove = rpmsg_dev_remove, + .force_dma = true, }; EXPORT_SYMBOL(rpmsg_bus); From patchwork Fri Mar 2 14:55:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 130542 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp1362791lja; Fri, 2 Mar 2018 06:58:51 -0800 (PST) X-Google-Smtp-Source: AG47ELuUjvbxddMlPU+u/wyGdXx/+KJ5U4e0MEeGtLWU8EH09JtS+cYcK2eyHXvL5/L3+HTpehpd X-Received: by 10.99.125.29 with SMTP id y29mr4740881pgc.277.1520002731303; Fri, 02 Mar 2018 06:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520002731; cv=none; d=google.com; s=arc-20160816; b=u5gPQ3K5qL5JiPjYsCQalsxf+/G6TGu049cV9WJ8y9GXFx8LUZmOF54RNm/5n/DoH/ El40aj/MvXJCNFlcZE7KbUEbLghQXlS3rWHWd5Dub3wcGvgZEoPcUIWGKzSuW8CIZq1D rOjEkQ9Q/caMa2WmMXucJuPv1Ja/jpYRhf3rJnc3W1RQwUMqomJOTTOGHUWiAuofLKL8 Ik0C2+754RbA3EYBIh2jpmwxWDRoJnBQM1fa+IeI7m1wDv0jnbhHbndV1msHDlfoe40o KgDKDu8IXllyWV8M6inxdOb2H/K2D2Y3XBn+x3MNO2tVvMMISmg8ag+GwQ+rk9rpd4oI zZ1Q== 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:dkim-signature:arc-authentication-results; bh=TYg/RYrUqDpMdA/1qaWvs8FJggDK9XLci+6XgJtdT40=; b=bhAzgnIwrjWE8COv3m1FYQhEm+9nuCL8bDo4prZRP2MUkve3nJ84kG+YrcNd5P8WuF XUKQc0vy97k9EL8olr4FoS6IGY58u+8aySIpYna7CEDIqvv24+foY+r5A3UDuunzhwkS 3S8Z3d2XLXnU6NsWdSVorkad31XwFysPJDNCtdgiALIFxDLz3HnNhunIXTctmirJGmV2 qvDoOF9wSIkrQjIL5ZoWGEkzJ3eBtAs+ZjN9DL1PbWcNlStU37nrnaKzUVYatTZGW150 ODYk0P3fTxRiWt4oPnx9kTot37lbkr3V4EERX5J7aGYxjZ41aDvdNxw6YsIkahzEwnmV L+Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OJdX46mZ; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u188si4095606pgc.785.2018.03.02.06.58.51; Fri, 02 Mar 2018 06:58:51 -0800 (PST) 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=@linaro.org header.s=google header.b=OJdX46mZ; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1428968AbeCBO6q (ORCPT + 28 others); Fri, 2 Mar 2018 09:58:46 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:46373 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1428939AbeCBO6b (ORCPT ); Fri, 2 Mar 2018 09:58:31 -0500 Received: by mail-wr0-f195.google.com with SMTP id m12so10365168wrm.13 for ; Fri, 02 Mar 2018 06:58:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TYg/RYrUqDpMdA/1qaWvs8FJggDK9XLci+6XgJtdT40=; b=OJdX46mZp+AVvEUr4rNHeypAEoGKKjOdAYLAMneo/qdhulUR5OuqM/3tmsclovprOZ +dg4a0AecD4FnP/ndQz1EKjURl4EZsY7JSYeT8QhvuLIPm3PLzQymHvLvZ4Y6I8ExE/V WgEg6D+u7sbzL2Bi7vSE1EzStbxSCYMR3edw0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TYg/RYrUqDpMdA/1qaWvs8FJggDK9XLci+6XgJtdT40=; b=lhVQMUJOzHaOjHJpjQ6DH4vqaHbJCDvICtVJZbYRnBYd/2mN5L3ubCovQINPL2a0MI /CQguaZEYoRBEWGRlnEkibqTZNiysSGuAseNtaj/FfukEQkqQQGUiTyZGxxF7UGHmBKn 8C5Yy2Dh8Gxuag8xb8XXXcMsIFFi2Jr89qh+Nn+Jke8c2xnuylACoFUg1T6X8Q/AHlXr GnTiX1HJr/NjoghhfhzM0+fqsF9AFp5fyTMtye+IicP7Uo72tte27s49rSE+bGJMYVog LRzaqJuxsvz3dd6KP8G+JR+45yxoZAS4dlyw4BZ9rfV+963rN1RBWX/yCcrA3soyBnl4 Tq+A== X-Gm-Message-State: APf1xPBLGY6sfnpazkmgu7JanQ8I36Od6b6tvIXIdeXBU6fJR+COxs0U 9wK7HPNO+HjNq1UmBq1bLb+0QBoiPRI= X-Received: by 10.223.170.78 with SMTP id q14mr5041859wrd.271.1520002710427; Fri, 02 Mar 2018 06:58:30 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id b68sm1483168wmi.30.2018.03.02.06.58.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Mar 2018 06:58:29 -0800 (PST) From: srinivas.kandagatla@linaro.org To: will.deacon@arm.com, robin.murphy@arm.com, bjorn.andersson@linaro.org Cc: joro@8bytes.org, ohad@wizery.com, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 3/3] iommu: armsmmu: set iommu ops for rpmsg bus Date: Fri, 2 Mar 2018 14:55:31 +0000 Message-Id: <20180302145531.20463-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180302145531.20463-1-srinivas.kandagatla@linaro.org> References: <20180302145531.20463-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Srinivas Kandagatla On Qualcomm SoCs, ADSP exposes many functions like audio and others. These services need iommu access to allocate any memory for the DSP. As these drivers are childeren of rpmsg bus, able to allocate memory from iommus is basic requirement. So set arm smmu iommu ops for this bus type. Signed-off-by: Srinivas Kandagatla --- drivers/iommu/arm-smmu.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.15.1 diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index e6920d32ac9e..9b63489af15c 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -53,6 +53,7 @@ #include #include +#include #include "io-pgtable.h" #include "arm-smmu-regs.h" @@ -2168,6 +2169,10 @@ static void arm_smmu_bus_init(void) bus_set_iommu(&pci_bus_type, &arm_smmu_ops); } #endif +#ifdef CONFIG_RPMSG + if (!iommu_present(&rpmsg_bus)) + bus_set_iommu(&rpmsg_bus, &arm_smmu_ops); +#endif } static int arm_smmu_device_probe(struct platform_device *pdev)