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