Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4200012ybb; Mon, 23 Mar 2020 15:46:16 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsitPVuxhyEMQZD6cuV6Kz99LyJgBGzdgSqkN5ZvIc6C7zp56/9OxUubmUk0IBU9HjWk/ok X-Received: by 2002:a05:6830:1ad4:: with SMTP id r20mr20309099otc.316.1585003576066; Mon, 23 Mar 2020 15:46:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585003576; cv=none; d=google.com; s=arc-20160816; b=kda8vXb+C3D7BK6VMfhmsikgLunU2iIMzPpOwlEDeJp96u51jspvEWoHTj20YESa/T N2wQ9H2M/URzAfhIs8kNbKEDkaflCyr4ZEge4dLDr++QdALry6dDAPoDCDOee/Uo+xwv UE5t+qu467HUk9cG3U0WsHG4isLMMRtqScCXGMFbk09F0ssDSeclXSVATnQL0PW820m+ t3JxGpxjp8fw8+02zUyswZ21lKB4ZcUdF5LKtpfrRj52zQ/8Vmbijhb1PpSVYcoA7x3m dQusuoJre6OM6NA3aL31snwinjyFJj78hhD7xYqSFdNqg/nGrh9FNJ6hwf0UnpQY3BIX w4/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TtecznepabbAupu5OhOJc88aU0NaofKjnQBnVaXn4N0=; b=F7067+O3OUITXbc0TqvPQerepJjPPECG5USATPMcM438tcYJFn7bdN96N3/WFFhEFY 0HoKR1AIetpStTrZqksrwQsH47PpLFtEtuzBFuA7pmZs11tlYRL8Ma5uJ5o+Cr4LMhQt 8rfaleKCeab9uFrbf2V5ekjxRiX98yQeF7XgNv0C3scSxaypiri67ZZhjnKhkyr+bQXj mOws92fC29afzchq4aO+hXkpf5yTTD5xPvtkzWQW6UkpBFGkmN/wp87GW/V+HRM6Uhei gAFatWa6Qk6+4S7Ah16WFBvWmoN95MpeFa10ra9R1kZ8lXgZzR0imyiBHGD8MSqOqawc Kcfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IjNaZRyR; 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 c13si7971427oig.220.2020.03.23.15.46.00; Mon, 23 Mar 2020 15:46:16 -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=IjNaZRyR; 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 S1725897AbgCWWpl (ORCPT + 99 others); Mon, 23 Mar 2020 18:45:41 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:44010 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726128AbgCWWpl (ORCPT ); Mon, 23 Mar 2020 18:45:41 -0400 Received: by mail-pf1-f195.google.com with SMTP id f206so8255283pfa.10 for ; Mon, 23 Mar 2020 15:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TtecznepabbAupu5OhOJc88aU0NaofKjnQBnVaXn4N0=; b=IjNaZRyRYGMcE0x6dwwZkBtuw57R2TXwcrpUx9acHodEYtVrFi2TRISrhMH1zS6FXa lhc2ZjvhReJVfj99jl6Ouimr/xKCRphxnaXm7MlXv16EnADSwT2syqhfllDVSRIzDYW8 KfspzlCde6336YXWInAYnEJWipEoiKWX3XL/xv6CT5huoO7/Rmm+wDlewDFSVaW734N8 afFeZ8eeVydh7pkemF5N7VASjgAubIYC5atJ/5AQXESzuXFciWhNMKAxNA0RYf1GVYUy BkpGAYI2SqpAnbDSsKbR8biPgWYasibtetHE2JbS3XvfJz7/l5kirAu81G/8goa+5/mG wIqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TtecznepabbAupu5OhOJc88aU0NaofKjnQBnVaXn4N0=; b=Ih68tY1roopke9RzNMKELqzi6PBpK/2/P/utm3YdN7z+dz72eaA+unP5++tyneDjU+ rkTSX1vGkwPhS+B1OoGF2hHiLFoFx3Bl5ocF30hx3j/+7zbXqgWxESYYCSThs93tGwek 9D3Q0RCAwOxXFzRnN0lL6FT4kTSBygK1AihpyWoRAPoe4Owy3cJGygRFeUuD7p6uQQQB gOsaHnlu4C/n59MSfhQd0rKX6tdPT4nv7sYFeOuBH4QnuwUrl93NJRS3JFDb3IZTBDe1 O9MPJDffWhdxA0VEMfM6q01A7wzT2KReAm4ssxc0AKFtKJBPB515ibrH/vMoA1qpAvw6 2RRQ== X-Gm-Message-State: ANhLgQ1JxPCjMdztZAjBxznxJx7LwU/HOb3wwleSTLyUj54COD+6YTJw Xh8zOxKNfCTf7VVNfpGESeRrfQ== X-Received: by 2002:a63:fe58:: with SMTP id x24mr23348015pgj.170.1585003539852; Mon, 23 Mar 2020 15:45:39 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id y9sm10286254pfo.135.2020.03.23.15.45.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2020 15:45:39 -0700 (PDT) Date: Mon, 23 Mar 2020 16:45:36 -0600 From: Mathieu Poirier To: Bjorn Andersson Cc: Andy Gross , Ohad Ben-Cohen , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 4/4] remoteproc: qcom: Introduce panic handler for PAS and ADSP Message-ID: <20200323224536.GE30464@xps15> References: <20200310063817.3344712-1-bjorn.andersson@linaro.org> <20200310063817.3344712-5-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200310063817.3344712-5-bjorn.andersson@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 09, 2020 at 11:38:17PM -0700, Bjorn Andersson wrote: > 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; Above rproc->priv is not casted but it is here... Not a problem, just consistency. Reviewed-by: Mathieu Poirier > + > + 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 >