Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp359648ybh; Mon, 9 Mar 2020 23:40:50 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt1jj7EfJvNnBXgaiXFzFnZAHxDsf0/voWhCXD9As2cfITnHYZmEMe9T220SV7Uihzrm8vl X-Received: by 2002:a9d:6254:: with SMTP id i20mr16420667otk.130.1583822450381; Mon, 09 Mar 2020 23:40:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583822450; cv=none; d=google.com; s=arc-20160816; b=oFMQCJeoDfNovAzfZ2e+nzS8ZPtr7Ue4xI9TUi3UP0lZhUKtUfQSS2azx4fNLkL93K UU9mHeLZUJScfSi9K4/q4/SqOg/ZRCfnCjEjvCTNq+jzANaZfW5iGmVidLyCU/NSQvh/ DEbygzeX8FEagNYxpeUEQigHIP3SRiLm1HlfFFpv9Yni58zx/l2IZKNWL6Z8Zute9VWb GYF0szOoRqXoE23SntGwdTTMgnhr7PtAVeA9y/9OPmZcpRHqWRNgGWXkNdA5LlvWem8R EWQIH0UOnH4uwUrZSyLZqyvF1VkMbR0YXI1lT8VjTq1/FoInVaL/yN46yalXQPFMpyzK vPsA== 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=Wth+YSNI1ILDm//Nc9zfzczmIG6U29YhiobOLaMSS5A=; b=PIEG9yGz87zxDmIjv49Nyg2raeKwLHYdYtzjp+nXJFA5EwOeFKkQ3Tb8VF+fStz6DA BrlIfEW35Osi58+1F69lX0Heh1vdUPbR4d6UG0bikNLh8otBuDqkNPkMCRLdhnluq6bB dcYF80DstVAtdgfuJIbbk5bh3JvJkwn/iXyd8VqT/dJJObx63mYFp/1RIYPUjg47dEuA w8kJ64zM9tkq1dfUOmxFYQJZROND2atjqMxHTOoynZCI71DpP7+iCzCWmxz43Nt7Mtsh XdM/M5iX469lufq7zY1SJfZHLkkpEDZJdte1A63Bb4f/r8oxW1yDADEnSxyGfHR+6s+/ 0bPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cou9tdhq; 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 m4si7403923otr.64.2020.03.09.23.40.38; Mon, 09 Mar 2020 23:40:50 -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=@linaro.org header.s=google header.b=cou9tdhq; 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 S1726482AbgCJGkC (ORCPT + 99 others); Tue, 10 Mar 2020 02:40:02 -0400 Received: from mail-pj1-f66.google.com ([209.85.216.66]:37786 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726411AbgCJGjz (ORCPT ); Tue, 10 Mar 2020 02:39:55 -0400 Received: by mail-pj1-f66.google.com with SMTP id ca13so10879pjb.2 for ; Mon, 09 Mar 2020 23:39:55 -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=Wth+YSNI1ILDm//Nc9zfzczmIG6U29YhiobOLaMSS5A=; b=cou9tdhqsO28ChyfRFJ7LAFEH7FzhzZXKctfzMAgZPf9ZJ7qnB3p8YQqC6t/EuUjMz DZH65hjX3Cf9bDvbpVqsCNo0/TyUN/cb7+OS3ZJ9VY7sUqUunwMpOI0DB8BfsrDDQiZk Ytoqf2sZyzfR3PfaT51X3gsass7Jt4kmIzi/VXr0Kw45Wj4Jte6ITaX99scuWBXpOEBl hRz5J3rKjjGlgn8H9nvs9IauWfg+HCpoHkFfwsL+eEDtNTiq0rEmffkf/UhfGvESO6mq zFSW5Jiy7850L9GZ7CWQLVb2NZLmJVIqPj8xP7wPHjsOLMYWl3qN0HqdEQ5NylMyyLMr sWzg== 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=Wth+YSNI1ILDm//Nc9zfzczmIG6U29YhiobOLaMSS5A=; b=JfNg+elyOdsbmsYfJ9DhLgOZjYJK6NSqCKonR+MxTDeR8/c1w2IvCGZvPYVMtsWs0v TLYbwPRl4AVUjCrhra+CphT/KQTNNWc4Ss4o7Ru+xPn0EE6YXSrhPi3jGTzqnlYgOTaN XF/Xik0U1NRN8uxC4KF1RjKkWjAfuI8WakeMKdtYABgqTvWWX2ggFwp+tZ/4Wfv3jKqY vY7l7bFCl2206pGuILgYjC0iJ0tTSurHA1MsLVgFP0110gMl0SYZYrnhVxo1zDwGqUhy zmpjiQTu37vT3U07nn1+QK9/rEOl/LJU2gZnwtJxzOI/CFTEG1xEkYc7ZiAYeoduFEG2 rRHg== X-Gm-Message-State: ANhLgQ0XwRP9zQ3eNx24dBgH9cIOD9s3k+1OlCZw2BS/cPw6GlToZMNB iHaJXBiJEiam2kIxRejMdygqfQ== X-Received: by 2002:a17:90a:a617:: with SMTP id c23mr236519pjq.32.1583822394882; Mon, 09 Mar 2020 23:39:54 -0700 (PDT) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id j38sm42398468pgi.51.2020.03.09.23.39.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 23:39:54 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Ohad Ben-Cohen Cc: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Mathieu Poirier Subject: [PATCH v4 4/4] remoteproc: qcom: Introduce panic handler for PAS and ADSP Date: Mon, 9 Mar 2020 23:38:17 -0700 Message-Id: <20200310063817.3344712-5-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200310063817.3344712-1-bjorn.andersson@linaro.org> References: <20200310063817.3344712-1-bjorn.andersson@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 the PAS and ADSP/CDSP remoteproc drivers implement the panic handler that will invoke a stop to prepare the remoteprocs for post mortem debugging. Signed-off-by: Bjorn Andersson --- Change since v3: - Change return type to unsigned long drivers/remoteproc/qcom_q6v5_adsp.c | 8 ++++++++ drivers/remoteproc/qcom_q6v5_pas.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index d5cdff942535..8f1044e8ea3b 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -292,12 +292,20 @@ static void *adsp_da_to_va(struct rproc *rproc, u64 da, int len) return adsp->mem_region + offset; } +static unsigned long adsp_panic(struct rproc *rproc) +{ + struct qcom_adsp *adsp = rproc->priv; + + return qcom_q6v5_panic(&adsp->q6v5); +} + static const struct rproc_ops adsp_ops = { .start = adsp_start, .stop = adsp_stop, .da_to_va = adsp_da_to_va, .parse_fw = qcom_register_dump_segments, .load = adsp_load, + .panic = adsp_panic, }; static int adsp_init_clock(struct qcom_adsp *adsp, const char **clk_ids) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index e64c268e6113..678c0ddfce96 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -243,12 +243,20 @@ static void *adsp_da_to_va(struct rproc *rproc, u64 da, int len) return adsp->mem_region + offset; } +static unsigned long adsp_panic(struct rproc *rproc) +{ + struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; + + return qcom_q6v5_panic(&adsp->q6v5); +} + static const struct rproc_ops adsp_ops = { .start = adsp_start, .stop = adsp_stop, .da_to_va = adsp_da_to_va, .parse_fw = qcom_register_dump_segments, .load = adsp_load, + .panic = adsp_panic, }; static int adsp_init_clock(struct qcom_adsp *adsp) -- 2.24.0