From patchwork Thu Nov 30 16:46:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Pallardy X-Patchwork-Id: 120248 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp24112qgn; Thu, 30 Nov 2017 08:49:41 -0800 (PST) X-Google-Smtp-Source: AGs4zMaaNV9jul/U+d5GlrBxKTuh1w6M7YYhdd6GMbm57eVRpRXBpE2R74SqWKMgQ2O6DZIMb5wF X-Received: by 10.159.254.19 with SMTP id r19mr3139380pls.271.1512060581465; Thu, 30 Nov 2017 08:49:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512060581; cv=none; d=google.com; s=arc-20160816; b=TlIZagClvy9W0iJwOzDkLWgmzHjPC5uUHH9inPuudG2ZMwgkKxBNd854uMjknUnY2c Cmts0UYaT4det4nADJfaeHqX8dly25TMCigLfe6//pMvcn+U8VWTdg5J4AN36AyIgwat VdpSRN8O71qIHczuKChwno97kLkpQ0NZ1jK6C/Tfc0xvs90TUiJWCvyNtn+4rhO92zoH RsM+pjhTvhswgRq7PyNNvPqqI/yycv5qvW6pWpqLqMaJ6CkEN39gLIvQPLlv85MonVbL 28MR9NgN3JRKFxvc0RGda4e0nEcOmTeQHawWLqTwNCbZqrqoNPUoN0nYxhS3sKiB3QBi 17qw== 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=fchbx1KjzorG4odxpMxrCOoy2aJwRMqSeubL5eNcz6M=; b=RWyUrQppMS770mbM9RgiDcQqcO+yr9yN8547SYDcvXDTqbMUL1aEruxjGsDjFJUpLf PXtqpajOhtOEqPGTTG7kWghWSpJBy/GcL7teUVtvA7F7kbIev99+zYxDC5XgbV/u5lWM 2o0fMAwPu0OcJt3VDa9SsZkg3XRoOjGEvFhqrDcWi74i3IXmosDV+birmKGrHfyGarrz EvjkQyJgkh/CJzZcANTAmZ0ss4ODwvWSjZs4D0o30VD2cCc9pVmH49LhmsZocLqsEH25 n3Yok0mpUAkQ6rX/IgnlmJ614GhKp+sqos06pU1rQ6EHYISMe+DOoBTzpFYyqMA61ndq OG8g== 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 l6si924819pgq.358.2017.11.30.08.49.41; Thu, 30 Nov 2017 08:49:41 -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 S1753714AbdK3Qti (ORCPT + 28 others); Thu, 30 Nov 2017 11:49:38 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:57880 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753762AbdK3QrT (ORCPT ); Thu, 30 Nov 2017 11:47:19 -0500 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAUGiEpd001563; Thu, 30 Nov 2017 17:47:17 +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 2eexh9v2ru-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 30 Nov 2017 17:47:17 +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 1A17B3D; Thu, 30 Nov 2017 16:47:17 +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 F34F3537B; Thu, 30 Nov 2017 16:47:16 +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; Thu, 30 Nov 2017 17:47:16 +0100 From: Loic Pallardy To: , CC: , , , , Loic Pallardy Subject: [PATCH v2 08/16] remoteproc: add name in rproc_mem_entry struct Date: Thu, 30 Nov 2017 17:46:43 +0100 Message-ID: <1512060411-729-9-git-send-email-loic.pallardy@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1512060411-729-1-git-send-email-loic.pallardy@st.com> References: <1512060411-729-1-git-send-email-loic.pallardy@st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG7NODE2.st.com (10.75.127.20) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-11-30_05:, , 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 struc 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 diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index bdc99cd..cc53247 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -835,6 +835,7 @@ static int rproc_handle_carveout(struct rproc *rproc, carveout->da = rsc->da; carveout->release = rproc_release_carveout; carveout->priv = (void *)CARVEOUT_RSC_ALLOCATED; + strncpy(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 5bd5175..66e6863 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 { @@ -324,6 +325,7 @@ struct rproc_mem_entry { u32 da; int (*release)(struct rproc *rproc, struct rproc_mem_entry *mem); void *priv; + char name[32]; struct list_head node; };