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: 10147261 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8781C601BC for ; Fri, 5 Jan 2018 23:59:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73D7E2896B for ; Fri, 5 Jan 2018 23:59:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65A1F28972; Fri, 5 Jan 2018 23:59:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F31082896B for ; Fri, 5 Jan 2018 23:58:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753455AbeAEX67 (ORCPT ); Fri, 5 Jan 2018 18:58:59 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33942 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753396AbeAEX6U (ORCPT ); Fri, 5 Jan 2018 18:58:20 -0500 Received: by mail-pf0-f193.google.com with SMTP id a90so2815621pfk.1 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=m8IYmwhAMxuVPsJJrMoV+XRRwrTInMqr9jhuvzyyttY6KptgbFPSVblWf8qULRhlwP d7gK1DjsRoG2YDHkdVDlADYKV1UNgzlfxbEMtm0fXdJDKAvoFLirMW4eovQyX1sIkTAE EVReqGNI4oY2DjlRHoOKermVSu1EgoBVbwz3d/vUKbAxdkbfSt7FTe49eBZ5ghZr3YP2 4X6UIc/zWlmHWhVYcRxTWOyRVq0HGP6gkXCG9FlGuBaJr+v6S5goFLSxVNimMGpMASE2 VTCu8MHAEpfGMbdhFV/lWOPQNvZrpyGzTjlGv2Fvr/lZZMOtCRWM2/gA8f4jUmVK6mIP GoCQ== X-Gm-Message-State: AKGB3mKGhULfoUG1mgTh5AMdgUPorZVs1j9MamoldY1i5G+I8BndRQ81 weqEYTEYBOwSxVmEya42mEKXetFMjTU= X-Google-Smtp-Source: ACJfBotrLe9l3lyRCZl6hzIi1vdfuY6GggbRP7OR2fdbpIZ7QfPpv9v9sc3MHC2dotoRzb/JwaFzfQ== 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-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(+) 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) {