Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1451879ybh; Fri, 13 Mar 2020 01:18:57 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuwCMiYFKBKMB6PpnRwz5GzB5MADkg3PUHjs02+yJmQ6bZLiFyFr7yCxp1ynjVpx+hh94xo X-Received: by 2002:a9d:4c10:: with SMTP id l16mr9466481otf.109.1584087537285; Fri, 13 Mar 2020 01:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584087537; cv=none; d=google.com; s=arc-20160816; b=zRlxXe3Obxor7VnmC/wXIyRCBczyfeNDX4NoPqEUJM8nTy/PHAevCgrLVt00vcropV bd5MGINHbCoNue5DaRcoBVn1tJVACCFxj2a0F86xHRzkuapcBXWf1r/B7eghm4wBe2g5 sYDofqZPHkumsV1Ljl550rZ1/cEPgIYPlf1JBb2BvkurddT7Tv2keVfskPa/3lYvjxZI 27w6xxl10rCeyy713bDNX+Vxwxq8oMmr7GaPfCweTTZGTfYddgi9H0RnENvBh7ZfYWRW URRTGkqtltK/QcB525EJR5YxsmjXye9wUTFonWchSmOpIGl9QgVK0RmsVCoYoGhp5iZw eaZg== 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=IaFqnCAxGg6QfO8RvZqQWbd4kU8xE3ZjWCsuhoZVVFs=; b=nbZEohUsRuvvYcQntiBcQBkDSpK1YA/Ze8yZkAg/0aHXQjZgSuO9+f+WmAX+ZFg31+ S+qfaEo3giwQWd7lg/C8E6uoMXdH5Ulr99dxEchLbRqSP4X6Ql+jiMO0kx1MTM7oJpxi cKRH/td+rnRvjLk4QHJXbokftBpVmmFN9hRJLxlOAB+jABY9juOiGtaUT+Y5Gh2fpKdE srcq+Ct0vV1Lkt4FpAb0DdaaQhvLz08A950b4ynO+vBZo+sXNQEpDcBheUf3webNlwbF 3Q+zYv3po4AHP4/xs8A2cp43oHDcYqTJve6zdPcmiRQYZucY38+siVcf+ZLmtlZTzdmN eXvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=SqtEmuh9; 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 h3si4093057otm.254.2020.03.13.01.18.43; Fri, 13 Mar 2020 01:18:57 -0700 (PDT) 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=SqtEmuh9; 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 S1726776AbgCMISC (ORCPT + 99 others); Fri, 13 Mar 2020 04:18:02 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:57408 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726514AbgCMISA (ORCPT ); Fri, 13 Mar 2020 04:18:00 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 02D8HwlT117772; Fri, 13 Mar 2020 03:17:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1584087478; bh=IaFqnCAxGg6QfO8RvZqQWbd4kU8xE3ZjWCsuhoZVVFs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=SqtEmuh9EPp00EvUwG57Ox97zFl04NjqbR2UpwQAgPqR1PjtFfTLSlZl4OO9c34fA 4Ux/tDBSl/W5TYf3nnGibZaZxpf2aZt+UkSn9CUwih/euIGZMcM59zM2hBgBXG/9Q5 IxgxFQCrVuJnpRHyKZReVfz1ZOWDRuFz2M/9ReNs= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 02D8Hwmr047590 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 13 Mar 2020 03:17:58 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Fri, 13 Mar 2020 03:17:58 -0500 Received: from localhost.localdomain (10.64.41.19) by DLEE101.ent.ti.com (157.170.170.31) 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; Fri, 13 Mar 2020 03:17:58 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by localhost.localdomain (8.15.2/8.15.2) with ESMTP id 02D8HQlj097835; Fri, 13 Mar 2020 03:17:56 -0500 From: Tero Kristo To: , , CC: , , , , Tero Kristo Subject: [PATCHv8 13/15] remoteproc/omap: Report device exceptions and trigger recovery Date: Fri, 13 Mar 2020 10:17:16 +0200 Message-ID: <20200313081718.30612-14-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200313081718.30612-1-t-kristo@ti.com> References: <20200313081718.30612-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 Reviewed-by: Andrew F. Davis Acked-by: Mathieu Poirier --- 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 ba7c1a1c17d6..ece60a183e19 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -383,8 +383,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