From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63DF7C63697 for ; Sat, 21 Nov 2020 04:05:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 049EB22210 for ; Sat, 21 Nov 2020 04:05:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tGhRRtM9"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="V3ft2O8J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 049EB22210 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JvzZL5daWryh18tIB/l1ip25bPheCxzJ+YTwBYTCrPM=; b=tGhRRtM9efXjtTneFQeNSk6yg EzoWOIs3bFf77uMCv/TfwzaF1nvsAsR3LWacth06crIhcRSV0fPHLDjiAXb4gve/frw5avHStGfKI nNS9cxExAXDfhf8URAhsAYKc5E1s852bgtTz4lt6f/bYblPpucdmJ1S2Z3KGScRphw8bzBNVFzkj2 Pk1V5Xm6LultXwDkfYf/hsKACq2y5NqlLL7xCO+KjzpqvQWjFNymPumU37kou0N5o8ldPMJwkk/lZ /nEu045XbDicHO4wTskDCz+kuN27UW1+uw4FjhiUFQ5CAXt0nl1ieuVT1WexQdA3pL27wmv+X/mOZ gneT8vwyA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kgK7N-0002ad-Gp; Sat, 21 Nov 2020 04:03:21 +0000 Received: from mail-oi1-x243.google.com ([2607:f8b0:4864:20::243]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kgK7K-0002aF-D2 for linux-arm-kernel@lists.infradead.org; Sat, 21 Nov 2020 04:03:19 +0000 Received: by mail-oi1-x243.google.com with SMTP id s18so11785874oih.1 for ; Fri, 20 Nov 2020 20:03:16 -0800 (PST) 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; bh=d+Jt7Kw8tpbR0XZRec6xgDcNSJxFLJiVa/Gv05lalew=; b=V3ft2O8JeSSLMy1nZsUqp23pVt9eilwqNNaJ56mAPY3c4Px4/iFl7M1t8ww4Ilfhru 4Sz1i4Rdgy9ormCWbNs36UPOAAZM7DbHZDP56Qth9Nxgqw6Zn1PGQygV4M3/kQcAx7RL x9+f4zU1depG3fJ1LmEFunDbPTePXby+FCOl3YdEwfmA26Edtg0MuMiYJKUnrn+1HAZE 3u9nXxptvpeVxQ1adajzI/rH4xBMVKsMBte1uHGXMgBTa9ACOKW6FJ1S7zuV8s4wnc5Y tKeHrudxFAgkhGD4XNQxf8+DEWvQdR+3/GoAw2ZgKng94WulU1km7lCF1ejtbJk02zB9 xF/A== 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; bh=d+Jt7Kw8tpbR0XZRec6xgDcNSJxFLJiVa/Gv05lalew=; b=PE2YyJ9QP+rFr7rVk8+t6OxwXmjz8lQBiywatf9HVuY5i0+ADok6CKJiJSPw71pVmv TAly8sDeXJTk1CAz7LGrdmAcquhLegfszae5BtCAqxsKi0cCdSy7RZRTEBVZymlRJfRq 2s3rYMj0nDhpT4GU1zYbqMqkZsbibx1xG8MHCO6tnmOcVzxhv2CZZ2SWoV1KH/0ybBqb /EfgiikJiF0e0/rNQneX62dxd5YH1SWUCTfteF8qE9s5HF5JzZ3SNsHG+QU5xIbWTYIm tWvhURrGfQv/6HFcPpoeNuWHs9R789DYtq14oUSVtn0zUd6If64REGxb6B/styc9I+vR L1tg== X-Gm-Message-State: AOAM532+dzMthjuNmITuJc0gYIh3nYWVei8jcz25jVn2+Mt5a5KBsrpb WBZ8tcZCtM337eJy7tyHIu2O0A== X-Google-Smtp-Source: ABdhPJxVDjWGCc5NwMV+giup5gCgzYtcJnesWwSzwDESxca8dWpFgXUfe5hC+9eX7BMITuhs6jJQIA== X-Received: by 2002:aca:a9c8:: with SMTP id s191mr8025691oie.11.1605931394890; Fri, 20 Nov 2020 20:03:14 -0800 (PST) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id o63sm2781105ooa.10.2020.11.20.20.03.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 20:03:14 -0800 (PST) Date: Fri, 20 Nov 2020 22:03:12 -0600 From: Bjorn Andersson To: Siddharth Gupta Subject: Re: [PATCH v8 1/4] remoteproc: core: Add ops to enable custom coredump functionality Message-ID: <20201121040312.GJ9177@builder.lan> References: <1605819935-10726-1-git-send-email-sidgup@codeaurora.org> <1605819935-10726-2-git-send-email-sidgup@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1605819935-10726-2-git-send-email-sidgup@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201120_230318_453883_6746E509 X-CRM114-Status: GOOD ( 23.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ohad@wizery.com, tsoni@codeaurora.org, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, agross@kernel.org, rishabhb@codeaurora.org, psodagud@codeaurora.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu 19 Nov 15:05 CST 2020, Siddharth Gupta wrote: > Each remoteproc might have different requirements for coredumps and might > want to choose the type of dumps it wants to collect. This change allows > remoteproc drivers to specify their own custom dump function to be executed > in place of rproc_coredump. If the coredump op is not specified by the > remoteproc driver it will be set to rproc_coredump by default. > Reviewed-by: Bjorn Andersson Regards, Bjorn > Signed-off-by: Siddharth Gupta > --- > drivers/remoteproc/remoteproc_core.c | 6 +++++- > include/linux/remoteproc.h | 2 ++ > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index dab2c0f..eba7543 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -1704,7 +1704,7 @@ int rproc_trigger_recovery(struct rproc *rproc) > goto unlock_mutex; > > /* generate coredump */ > - rproc_coredump(rproc); > + rproc->ops->coredump(rproc); > > /* load firmware */ > ret = request_firmware(&firmware_p, rproc->firmware, dev); > @@ -2126,6 +2126,10 @@ static int rproc_alloc_ops(struct rproc *rproc, const struct rproc_ops *ops) > if (!rproc->ops) > return -ENOMEM; > > + /* Default to rproc_coredump if no coredump function is specified */ > + if (!rproc->ops->coredump) > + rproc->ops->coredump = rproc_coredump; > + > if (rproc->ops->load) > return 0; > > diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h > index 3fa3ba6..a419878 100644 > --- a/include/linux/remoteproc.h > +++ b/include/linux/remoteproc.h > @@ -375,6 +375,7 @@ enum rsc_handling_status { > * @get_boot_addr: get boot address to entry point specified in firmware > * @panic: optional callback to react to system panic, core will delay > * panic at least the returned number of milliseconds > + * @coredump: collect firmware dump after the subsystem is shutdown > */ > struct rproc_ops { > int (*prepare)(struct rproc *rproc); > @@ -393,6 +394,7 @@ struct rproc_ops { > int (*sanity_check)(struct rproc *rproc, const struct firmware *fw); > u64 (*get_boot_addr)(struct rproc *rproc, const struct firmware *fw); > unsigned long (*panic)(struct rproc *rproc); > + void (*coredump)(struct rproc *rproc); > }; > > /** > -- > Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel