Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5090367ybv; Tue, 11 Feb 2020 09:01:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzsL7SS8fvIoAab2yCp0ABTPwakR97ZWAITuuRK2P1DXtcvplCFW7pRTKCjlVvKJkfcnKAg X-Received: by 2002:aca:2b0a:: with SMTP id i10mr3527493oik.137.1581440475689; Tue, 11 Feb 2020 09:01:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581440475; cv=none; d=google.com; s=arc-20160816; b=kKAa+tBCAj0yFOELv2qPuPgotF1Vpg9wxjZpL/kpqdvKX6aHg7IYFnSZyrvRuhCbyd fRcEwaI0OD/LKFJoofL6D8UCtIcpbkkS0HEujlNhbSIw5ozvLrH0fDDu5D6YktGAQPly 1MFfKzgGO0Pzt1SOkdFS/Cc9N4lOnbe+U2WnKhWJ4XNP2AZ6pcJRze/H+RDs2Gea09Ol g2/nO71zpA4QxyNhiYubRY4qQybzWioHaEV8AUt/Gt+qxWH82W/dhl9oaLS4lulDr5xp iH7qVZvR9G7Dl+rZNdSmnuyOjj7qk2MIDI8FqF5CWBTsvuizNoNEurMXVCiws8o2iC7K 8q9g== 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:dkim-signature; bh=D3pXuknUr8PB8oVp11fIBxhFXCtS4CxaLIHKc/xBvMM=; b=JmB3xOK1iWG65onFz/PR2vTcByH5bcEsZ8/nFeFWBT1OZfPD48YgQghh4Quoj0+VAI 7O9Zd3hU17D9jmEJNv5mZvHMS4BDo+gL8/j6UNtKNY4kBPblfPwch3Dfr1YZxBhl6Yu/ +PMk3I0SBssuYvGQtz6DcT5LOcpgE8hr6E6JzLyWB2HAXAbAQzalsj31tw0PeGaG172D jbP3Gsq7joS/12hXddzIMuNGyu/4CHvhqHc1y/DMy1Ka3CX6W+mPaB+rYppZ78jJXAM9 rOHjFVUVZ8XoW/tMLgmgchszCgWB7RmhO6urqX/0GgFbWpejSLpwYB8R+Tm2aMwCHgRx opJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=JVLpeD1j; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y8si2101351otg.309.2020.02.11.09.00.58; Tue, 11 Feb 2020 09:01:15 -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=@ti.com header.s=ti-com-17Q1 header.b=JVLpeD1j; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730484AbgBKPWO (ORCPT + 99 others); Tue, 11 Feb 2020 10:22:14 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:48688 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730470AbgBKPWM (ORCPT ); Tue, 11 Feb 2020 10:22:12 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 01BFMBWU110805; Tue, 11 Feb 2020 09:22:11 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1581434531; bh=D3pXuknUr8PB8oVp11fIBxhFXCtS4CxaLIHKc/xBvMM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=JVLpeD1jaQgY28HEmVLgwgAEWTS8EQg2ZLhMBHqgB9m8ii1fGR0Hyq3bXYkcpLL5C LnrpRJJjkcrpsdcn/IS+P6sl6nM+Jk6NAc1RQ5Gi6S2lJcm25DVVt4dLuefd9bm83c 9HAGNJtvnyqOvuSOGMz3hRzmfls0T5K8fPo4es7w= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 01BFMBrG060028; Tue, 11 Feb 2020 09:22:11 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Tue, 11 Feb 2020 09:22:10 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 11 Feb 2020 09:22:10 -0600 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 01BFLbkp020993; Tue, 11 Feb 2020 09:22:08 -0600 From: Tero Kristo To: , , , CC: , , , Suman Anna , Tero Kristo Subject: [PATCHv6 13/14] remoteproc/omap: report device exceptions and trigger recovery Date: Tue, 11 Feb 2020 17:21:24 +0200 Message-ID: <20200211152125.23819-14-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200211152125.23819-1-t-kristo@ti.com> References: <20200211152125.23819-1-t-kristo@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suman Anna The OMAP remote processors send a special mailbox message (RP_MBOX_CRASH) when they crash and detect an internal device exception. Add support to the mailbox handling function upon detection of this special message to report this crash to the remoteproc core. The remoteproc core can trigger a recovery using the prevailing recovery mechanism, already in use for MMU Fault recovery. Co-developed-by: Subramaniam Chanderashekarapuram Signed-off-by: Subramaniam Chanderashekarapuram Signed-off-by: Suman Anna Signed-off-by: Tero Kristo Reviewed-by: Bjorn Andersson --- drivers/remoteproc/omap_remoteproc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index 490a242130f9..2cc87af0c582 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -381,8 +381,12 @@ static void omap_rproc_mbox_callback(struct mbox_client *client, void *data) switch (msg) { case RP_MBOX_CRASH: - /* just log this for now. later, we'll also do recovery */ + /* + * remoteproc detected an exception, notify the rproc core. + * The remoteproc core will handle the recovery. + */ dev_err(dev, "omap rproc %s crashed\n", name); + rproc_report_crash(oproc->rproc, RPROC_FATAL_ERROR); break; case RP_MBOX_ECHO_REPLY: dev_info(dev, "received echo reply from %s\n", name); -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki