Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp794750imm; Fri, 27 Jul 2018 06:18:14 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeXuUD2zy/l945p5+G9gW0/K34GQ5JGEgrHVbLjjNs8fIxCKfX8O3wYMrvj7CRttkxFuTKN X-Received: by 2002:a63:e452:: with SMTP id i18-v6mr6053440pgk.185.1532697494209; Fri, 27 Jul 2018 06:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532697494; cv=none; d=google.com; s=arc-20160816; b=mMLFtPEJQb+KzXoMR2/8dtlD/RLSNOj7Y+1RTmjq8gCHcp8dQzg/8ABrjlNtNvUH4V ZSmflct68bwGm+aEOrZlEVSu5fansebFCRKaELPvk3BA+baephtvDASufUr2CMHHCCqm okuub1i7T9UixYL9FpMqREqjIG/y6OsYb6cKBZcbo+YiGl487OQAw1lTvvoNZQKQwa6V KRJ4HYfr1tj3tdexvhSfb8CBXqHvhBOKAlRR8iIZMxc+/loT5QdrBbIhq1batMQfpzEQ RnpaFz0A452/buD3E3pKckwmxZzRNIwJMVBl3FvmqI0C4RBUdH1qQKNC8S6ORpY+ZTdp AIeA== 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=8mDzmvDIerlajglodCdgrmpc+S+5EzPLDY3ctAMnq5k=; b=ioB5355lR0xjfcPWB4DVKHqF9jYWanIshKzVv1TfYsTiJsQjebz/lHSGPEupm3yaTD zU5Rhp7wT/TXwoVUMYASp1peJ2jsr0tZvqrwD+OgiadLJSqh8U7RybL70M8iogp24bFn e2Bsw79d0NbDkwg/IXcCExd2+P/zVlPhg77y8MJnveHF9liZJnjNGpAPOIZnY76m12EY 3GwFy7wln1j2coy6gDG0nIObTBIX9ESDEcOvjXAD+XHZDhdx6aMuI+HzfvI9AjaCr1tj dLUn1q0TibBLymfGOCA06hJJWn7ffdKDw8YT0/xnCGMobMC1JdaeZhTh7lX0qdgazQzz mc0w== 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 h90-v6si3472453plb.484.2018.07.27.06.17.59; Fri, 27 Jul 2018 06:18:14 -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 S2388525AbeG0OhU (ORCPT + 99 others); Fri, 27 Jul 2018 10:37:20 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:46594 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388298AbeG0OhU (ORCPT ); Fri, 27 Jul 2018 10:37:20 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w6RDEjsq025001; Fri, 27 Jul 2018 15:15:23 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2kg1up0ns3-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 27 Jul 2018 15:15:22 +0200 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 454F938; Fri, 27 Jul 2018 13:15:22 +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 26E80577A; Fri, 27 Jul 2018 13:15:22 +0000 (GMT) Received: from localhost (10.75.127.50) by SFHDAG7NODE2.st.com (10.75.127.20) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 27 Jul 2018 15:15:21 +0200 From: Loic Pallardy To: , CC: , , , , , Loic Pallardy Subject: [PATCH v4 04/17] remoteproc: add name in rproc_mem_entry struct Date: Fri, 27 Jul 2018 15:14:39 +0200 Message-ID: <1532697292-14272-5-git-send-email-loic.pallardy@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1532697292-14272-1-git-send-email-loic.pallardy@st.com> References: <1532697292-14272-1-git-send-email-loic.pallardy@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG1NODE2.st.com (10.75.127.2) To SFHDAG7NODE2.st.com (10.75.127.20) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-27_06:,, 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 Acked-by: Bjorn Andersson --- drivers/remoteproc/remoteproc_core.c | 1 + drivers/remoteproc/remoteproc_debugfs.c | 1 + include/linux/remoteproc.h | 2 ++ 3 files changed, 4 insertions(+) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 24fe11f..d7e3138 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -752,6 +752,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 a5c29f2..e90135c 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: %pK\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 bef2e83..0e21098 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); }; -- 1.9.1