From patchwork Thu Mar 1 16:23:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Pallardy X-Patchwork-Id: 130329 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp3006201edc; Thu, 1 Mar 2018 08:26:11 -0800 (PST) X-Google-Smtp-Source: AG47ELuhHeDw0oda2hXkuaXnngvyyRyog1Ld6BPaqykXQhTI+RKiU7utape2gY5JnRmmhB9DEHIj X-Received: by 2002:a17:902:8b82:: with SMTP id ay2-v6mr2425118plb.12.1519921571737; Thu, 01 Mar 2018 08:26:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519921571; cv=none; d=google.com; s=arc-20160816; b=xklvOPfgrlnOUzF1VC6H3ozKaQGqKRhiOtS1uDwXY1zxN8eXeaCVLK8fzLb6yl2VU+ nvfPt5lyheEfqwFuGNvK6/SDDYu7evbJjPAaWbvf8L+4mys+vXXIni9qO0gHF3uyKZsh Xzx868Lk7Fj4O2zX2QF4tHKna+lJ4HyorV3tkw5QLqlRTl9Eee63bnvB2Z6FJfgFXc/d PveqKGJRPAL6wOZRm+s2eZWSssRFDPl800hClfPoxQgmPC9Ck21QoaILQLfwV/20CXsU niL8cs+GfDnm0G4oom5wRMOr3I26ozlnMccjTAvGOp9WKMvhjuoc29I89udLxp01YEJR f0ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=cQmWSV6UzqHtqFk1IDj1qgd5zLQl4YYVp7srPPW4suk=; b=dmag3Xk/cV711ItUS9oBraUnYmVxeYz9CLoDPDP5JzzbiEZTR+3poG6k8gamD9upCF s+dvjQmZiivdcdhwE3JBXSGqs3y7ptlBSgDObWq4/huVnuNfPz6jRPLvt45IdEnJcsjv Vj5i4xJOjQCuXMw6pR73De+fIa1Sxw2z+lXkefShszfc5Q6r5gC9eXHeqUh2s1ReeVwS 0BiJycZbYyWJI0pjad2pPMZAmAqIp7ILEofTQ13rp4hgvPLx2zcdhm2xVnYGJYByrFw8 9VLaMq1wcd1m5x8Eqy1RJrpHAYIrOXhTqH9pF7KAYFxbQcZoKZhYBD3q4jS2u4SXBrCC 2eAg== 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 n3si2657723pgc.12.2018.03.01.08.26.11; Thu, 01 Mar 2018 08:26:11 -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; 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 S1032995AbeCAQYT (ORCPT + 28 others); Thu, 1 Mar 2018 11:24:19 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:43966 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1032698AbeCAQYQ (ORCPT ); Thu, 1 Mar 2018 11:24:16 -0500 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w21GJKNv002391; Thu, 1 Mar 2018 17:24:14 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2gaytjb7jt-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 01 Mar 2018 17:24:14 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 617D53A; Thu, 1 Mar 2018 16:24:13 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag7node2.st.com [10.75.127.20]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4F39C51FD; Thu, 1 Mar 2018 16:24:13 +0000 (GMT) Received: from localhost (10.75.127.51) by SFHDAG7NODE2.st.com (10.75.127.20) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 1 Mar 2018 17:24:12 +0100 From: Loic Pallardy To: , CC: , , , , Loic Pallardy Subject: [PATCH v3 04/13] remoteproc: add name in rproc_mem_entry struct Date: Thu, 1 Mar 2018 17:23:51 +0100 Message-ID: <1519921440-21356-5-git-send-email-loic.pallardy@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1519921440-21356-1-git-send-email-loic.pallardy@st.com> References: <1519921440-21356-1-git-send-email-loic.pallardy@st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG7NODE2.st.com (10.75.127.20) To SFHDAG7NODE2.st.com (10.75.127.20) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-01_08:, , signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add name field in struct rproc_mem_entry. This new field will be used to match memory area requested in resource table with pre-registered carveout. Signed-off-by: Loic Pallardy --- drivers/remoteproc/remoteproc_core.c | 1 + drivers/remoteproc/remoteproc_debugfs.c | 1 + include/linux/remoteproc.h | 2 ++ 3 files changed, 4 insertions(+) -- 1.9.1 Acked-by: Bjorn Andersson diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 5f11536..f73a0cf 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -749,6 +749,7 @@ static int rproc_handle_carveout(struct rproc *rproc, carveout->dma = dma; carveout->da = rsc->da; carveout->release = rproc_release_carveout; + strlcpy(carveout->name, rsc->name, sizeof(carveout->name)); list_add_tail(&carveout->node, &rproc->carveouts); diff --git a/drivers/remoteproc/remoteproc_debugfs.c b/drivers/remoteproc/remoteproc_debugfs.c index a204883..fc0e570 100644 --- a/drivers/remoteproc/remoteproc_debugfs.c +++ b/drivers/remoteproc/remoteproc_debugfs.c @@ -260,6 +260,7 @@ static int rproc_carveouts_show(struct seq_file *seq, void *p) list_for_each_entry(carveout, &rproc->carveouts, node) { seq_puts(seq, "Carveout memory entry:\n"); + seq_printf(seq, "\tName: %s\n", carveout->name); seq_printf(seq, "\tVirtual address: %p\n", carveout->va); seq_printf(seq, "\tDMA address: %pad\n", &carveout->dma); seq_printf(seq, "\tDevice address: 0x%x\n", carveout->da); diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index dedc138..2202c08 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -315,6 +315,7 @@ struct fw_rsc_vdev { * @da: device address * @release: release associated memory * @priv: associated data + * @name: associated memory region name (optional) * @node: list node */ struct rproc_mem_entry { @@ -323,6 +324,7 @@ struct rproc_mem_entry { int len; u32 da; void *priv; + char name[32]; struct list_head node; int (*release)(struct rproc *rproc, struct rproc_mem_entry *mem); };