From patchwork Fri Jan 5 23:58:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 123577 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1428623qgn; Fri, 5 Jan 2018 15:59:02 -0800 (PST) X-Google-Smtp-Source: ACJfBotn9fGsSodvS7uvJDsGXCjym88rqG7cERNPd6oXMsM7i+zOs4Ba1WnXQabQH8zu/prMoYdD X-Received: by 10.99.176.74 with SMTP id z10mr3730732pgo.83.1515196742844; Fri, 05 Jan 2018 15:59:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515196742; cv=none; d=google.com; s=arc-20160816; b=Nh18fAkantZFuXqXRnsgTavwEukUTA9EgqLXEZc+ybw5h7h6frCdL6mod5uD1gV0YJ Zd/a8pPXBLMuJ1RNA+bcbsBHSNyBhMzcuQ8HxKk1EeI7pSMwUbZ8C6LmlyT8tznhQ5Wi 2MEfLaWVcU0Nx2i/CLEHOIoW1AoPwJbHZk0+/z35nuSmm26DzqfLJIMJ9chxCi9+1Bwm VCIr99skxxTRLuHNawiigH1OPG7t3gdm1UHQNKmU2CPtR89uXdcxHGs4rjSqMea95HpZ TKaTTFhPXy4bN5yW0sK5483cXNmxL2f4EC2+50VTCmAlGkNxmtkKXXZD+xR4NMoTCqTn u9mQ== 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=c76S7ibwsj0bv8215EGQcbowDMuGFLZXzMgLuuMZmTw=; b=jiMkyAlSFykZCGGLHoIwOtVWlL5YSrsRb9w4myZg7XaY88n5zXfTcfcMGFRvN//MLd Jff5rYAEglXD8ysYvzhdd/oBKMyVJlTWQJhNStSf9L8E2kubpZrLB+3DoUpUwVUEe/iv 3M6TlWZfmodut5+X+LolH1WAfn0UFqrD4c5tu6f2Hu1AIe0eRsihDSRJl0av/y0sQFPJ AOvF0YbKDURpUr40I2I6oR7mu/NAeMIXZ4+Lxa/P05+TKn5sDIk8c101aAueUWkRnxrd cCkBwtHSNYAyW4xynBdm/1hyRyA2lhiAHFrJGEKRkID2S/IBt10n4PthPbvHyFFaHn2a r2IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OSvMcxcR; 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 e1si4773587plk.761.2018.01.05.15.59.02; Fri, 05 Jan 2018 15:59:02 -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=OSvMcxcR; 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 S1753469AbeAEX7B (ORCPT + 28 others); Fri, 5 Jan 2018 18:59:01 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:46894 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753393AbeAEX6U (ORCPT ); Fri, 5 Jan 2018 18:58:20 -0500 Received: by mail-pf0-f195.google.com with SMTP id c204so2805564pfc.13 for ; Fri, 05 Jan 2018 15:58:20 -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=c76S7ibwsj0bv8215EGQcbowDMuGFLZXzMgLuuMZmTw=; b=OSvMcxcR2vjteXoiD9TwHConzSwfDq/iq/FEP86Nfto77KH09akGKtrtAhak80HJxi TnQezomb8QYEtSwqN0fIeQZGVGVpKpkvVwM8+s2NseBxOmruByzgmel8sVULheH69uho 3gNMatqW7GNATvHeg8W1Lf4rucGbaAc1OSN8M= 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=c76S7ibwsj0bv8215EGQcbowDMuGFLZXzMgLuuMZmTw=; b=Mfb/fMk8pjtt8tqdrEiQe7aCY31qKcMPMELP7kDmBdpR3GZd3Qvhp7YwgNKET5dzPB 9+eTfQGpDjYjNY7/woVAl6e2yT3a+8ApTgVwSt4TPmIpNF4SJxGhTSdPktveTslSwe+s wGfoenidGbaaXY50FP7aGzQ8MXVgBU92+nVPIKeSM2jjuRQq8xgEIv2z3XDQmhfd25IP Va3/4i+MGld12ap+zbNc/m11EID3qtxDoF0OamxXqIt7LxRR/ouGV+zzIDu4R26VVxE7 Uxz5nyQx0ntx83LfLCa3F/mJUK1SvJcxOdZhJlPBAdTbKJtTFYo1v6Tvzq1ulTO+dg/A nvYg== X-Gm-Message-State: AKGB3mIN/Zl2mXeZvw4PMN8Lp5nzu6ujxmbPU2291/htVt5nTtqSCuau Of3sXq3RSOegUBPXlslv/bXhoA== X-Received: by 10.98.13.78 with SMTP id v75mr4395141pfi.59.1515196699606; Fri, 05 Jan 2018 15:58:19 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id x4sm14473188pfk.51.2018.01.05.15.58.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 15:58:18 -0800 (PST) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Loic Pallardy Subject: [PATCH v2 8/8] remoteproc: Reset table_ptr on stop Date: Fri, 5 Jan 2018 15:58:05 -0800 Message-Id: <20180105235805.9948-9-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180105235805.9948-1-bjorn.andersson@linaro.org> References: <20180105235805.9948-1-bjorn.andersson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The installed resource table is no longer accessible after stopping the remote, so update table_ptr to point to the local copy. Signed-off-by: Bjorn Andersson --- Changes since v1: - None drivers/remoteproc/remoteproc_core.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.15.0 diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 84e07d5b7c2c..4170dfbd93bd 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -1000,6 +1000,9 @@ static int rproc_stop(struct rproc *rproc) /* remove any subdevices for the remote processor */ rproc_remove_subdevices(rproc); + /* the installed resource table is no longer accessible */ + rproc->table_ptr = rproc->cached_table; + /* power off the remote processor */ ret = rproc->ops->stop(rproc); if (ret) {