Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2012480ybh; Tue, 14 Jul 2020 13:08:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2NnlPqoPLwd3aQb/evOHt0wbfCas4e2A5AQJLvX3r3aUP2SMABcdcTCjDUORjW7BGZPwu X-Received: by 2002:a50:e8c9:: with SMTP id l9mr6226794edn.272.1594757308789; Tue, 14 Jul 2020 13:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594757308; cv=none; d=google.com; s=arc-20160816; b=sWnZZhpoieyFMI/NnLmgqG7tZUjCpP9RGtFex0qblh0DYydEY3TYWokUmRkV1EIdXU 6G5hlfCcVNrALuth143bHWh+3rR9U7MIjkNdEuVzNTD7HykJ0trJeqDr8gHRPRWsffsT a3Pogzjv6ToRJBpIasPidvYrQqWdjwom0edyTOqwXSNcjaOK6RfPGywMHWw3JQ+XtSfy yWvfYYhk6zWIxsg2XV/6c4APIXd+SpgPBECbG9PonOFE7BWYwM2v/nnHffndVA1i7zeI AGLslHfdFdl6rR8pOdTHclL3SvzRA1qaayjq9ijWKwi8NJ+G0YXjAp3hWEqKRHt+ZG+5 92KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=h12JhHvSO+bmX99ezv3yaLnOJmMzfHeXrbHb3WDJUWc=; b=w4ag8cJ5CtgyhkDgswjX4mhi7hpY6ePJmis7j/9sERmyir3bFx0FdxzoTI5hs0NJ8n FL8hsrn8iSrA3jOnk4G3thGZ4eY5NrnZ9hO7DPjL4QVnbsLNYC5B/qhuggwGo5T5bOsa jOZsSyKGRLkBgCAlyExvVNNwlam7P3NH7seYLHjDvHWiVINi279bvrSSaL1o2eBX5oJa jGcIqtxYUrZRaX3zwFh7fdg30oks1yFtP4a/aCKn5jZ53x+awHX8wi5Pg/Q8Os9pxVKi oaxt7KCRhOZYGMe5O81LXGqgp1JmQyzD2K0f1hikn51zVxSBUGAgqsWzgH3Fv23U+tcO yyOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DJ7V8b5i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id m4si14949708ejn.10.2020.07.14.13.08.03; Tue, 14 Jul 2020 13:08:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DJ7V8b5i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730268AbgGNUFS (ORCPT + 99 others); Tue, 14 Jul 2020 16:05:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730026AbgGNUE5 (ORCPT ); Tue, 14 Jul 2020 16:04:57 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51689C061755 for ; Tue, 14 Jul 2020 13:04:57 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id n5so691757pgf.7 for ; Tue, 14 Jul 2020 13:04:57 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=h12JhHvSO+bmX99ezv3yaLnOJmMzfHeXrbHb3WDJUWc=; b=DJ7V8b5i+/Tv/OOoy+U5IAmyq8Y7huOUnzJqHDrYYbiKMKAAdMqDBxq0BIKBWDW2Ut rc+fvzDHyx0CTs1SJFC0C/9zNCrGBmp4Ltz/UhnHeINA6Hsug9v4/z5m91Dk5aOAnVhr l2JpMzWwsYGEavJG8gJ1+J4Qts/LLzVsTF3MFAeJay7oWq+meeeFI19vytEZBzyMatPK aKg/aSWDL5iYuvddNeZ1uTbfQ/lcwpt0pX3hPWWCeily6FupPwcdrPjgNKBuLU5OjqwV cWF598r+6Fq8oZMwAnONKN6gvQy3lIAN1k1R+P8Oydladzp4Q5Ftmp/hVxiL6h+eYaYi /7yA== 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:mime-version:content-transfer-encoding; bh=h12JhHvSO+bmX99ezv3yaLnOJmMzfHeXrbHb3WDJUWc=; b=gmiyWoPNpWY5oIeUmSueQgmpa4j2NvS52AdCnznkrVh5bWvG/TnBvuslBzNc1pxYfU XpxNNXd8NVWvEBx+WbILVxQz+Nwe/o46YersfupWOUpvcbjAiOisNDg6YQMFYYBSFWmP tcTWeoJesdVujH3iZ8h8+JFPpEL4fqqpewcHgqktvvKUwRFqkz+KcqmMg8ce17O/pBih bjdzs01US88GPZI7j3kz8wglkePqaGAOdldi7/QSGGor/VbpwnHTyvlLSeWprk7dJxHB z1jQ8obN91P441cqt9C9oqrlPc3gN+vdlxXBtZSEATIaiYGhHKwTSBHon0fyXgG0VtmN IMaQ== X-Gm-Message-State: AOAM532zTs6pPoNIKxKU+JBFC7B+z1iPGwvd2XFkolH5Cqs4UsOpXH6Y gwVB+aK5wtQnGfTTPaszwcYj/A== X-Received: by 2002:a65:6106:: with SMTP id z6mr4816217pgu.310.1594757096888; Tue, 14 Jul 2020 13:04:56 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id t13sm3262959pjs.17.2020.07.14.13.04.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 13:04:56 -0700 (PDT) From: Mathieu Poirier To: ohad@wizery.com, bjorn.andersson@linaro.org, loic.pallardy@st.com, arnaud.pouliquen@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v6 07/11] remoteproc: Make function rproc_resource_cleanup() public Date: Tue, 14 Jul 2020 14:04:41 -0600 Message-Id: <20200714200445.1427257-8-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200714200445.1427257-1-mathieu.poirier@linaro.org> References: <20200714200445.1427257-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make function rproc_resource_cleanup() public so that it can be used by platform drivers when allocating resources to be used by a detached remote processor. Signed-off-by: Mathieu Poirier --- drivers/remoteproc/remoteproc_core.c | 3 ++- include/linux/remoteproc.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 099c76ab198f..6e0f985e9c9a 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -1271,7 +1271,7 @@ static void rproc_coredump_cleanup(struct rproc *rproc) * This function will free all resources acquired for @rproc, and it * is called whenever @rproc either shuts down or fails to boot. */ -static void rproc_resource_cleanup(struct rproc *rproc) +void rproc_resource_cleanup(struct rproc *rproc) { struct rproc_mem_entry *entry, *tmp; struct rproc_debug_trace *trace, *ttmp; @@ -1315,6 +1315,7 @@ static void rproc_resource_cleanup(struct rproc *rproc) rproc_coredump_cleanup(rproc); } +EXPORT_SYMBOL(rproc_resource_cleanup); static int rproc_start(struct rproc *rproc, const struct firmware *fw) { diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index cf5e31556780..7c0567029f7c 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -610,6 +610,7 @@ void rproc_put(struct rproc *rproc); int rproc_add(struct rproc *rproc); int rproc_del(struct rproc *rproc); void rproc_free(struct rproc *rproc); +void rproc_resource_cleanup(struct rproc *rproc); struct rproc *devm_rproc_alloc(struct device *dev, const char *name, const struct rproc_ops *ops, -- 2.25.1