Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4691705pxa; Mon, 10 Aug 2020 15:55:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQ0Rahon03pTVaBCzookUCSY7z7ley8wLJv9wf4oQJ4FqZzTeHljHeybb18VZabxcWjtx7 X-Received: by 2002:a17:906:359b:: with SMTP id o27mr24855664ejb.103.1597100139535; Mon, 10 Aug 2020 15:55:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597100139; cv=none; d=google.com; s=arc-20160816; b=RtJTCCErHgQvRWPKMupKVN+KT29RbsBicto1mygTT4KiRIBcGhynr+EfQadRpGcG7s nZmRMAur02OmS0MPNFuLzV8GwIDtLD9Gr2Ai0/OKXVTWCHfuFDBB+dU8jBYwxYcLKVMU LudpcgzZHuv0u7rMPJWer58RAfQUP39CtWf9DCOPiVINyqpW9xF+ot80Cw9gLzxQAxst NjDACgauxblVzm/a8LIkqZQ8MZtoT1M9N6Zz/lRZtG2MO9cfUd9IdrCot3XZakMeZx9k tPi3yrHPjQJ8AD5FrNaI4GNBzSIbfysCXo4ydE+pSCs3YpyrgN649630kkYiUlSSuQvU Zb3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=fKb1XDtHYo4y9AlyAa0W068lkmxD2lT16yayOu1K+QI=; b=bUMI4VD1iuEmwnt2NObjcOx8NxWDRKNk9uew3VtfZaB8CA0etM+SHnJKBQwPunUMwY Bcjl3xt1cW3sJVzgdFJ8UWlpM4n7EYYx+mG0qjJpuqclS9T9kypi4Hym67TYK30624Ez X1BLxkr67V2Q7nYfeHl62R+E6ewXJic61GDgHxQZ+b5pvOkDhYqW7aWuVfXPl0rvQzmw f+j8qWIOa7yF4SKeFZg39rMwWFeANqqApHwR5AuHAs/ZxyQclpgcdu1OPNZ8bkUg4zfA EWnWm5HON7oC1Iy0dUrfewYmbJhIkyldCJIXTT+J3S4b1KZW3pS6OwZW7K7I1gWJFDuN gReQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=szlzA6BX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id u24si12642113edb.159.2020.08.10.15.55.15; Mon, 10 Aug 2020 15:55:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=szlzA6BX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726827AbgHJWyu (ORCPT + 99 others); Mon, 10 Aug 2020 18:54:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726775AbgHJWyt (ORCPT ); Mon, 10 Aug 2020 18:54:49 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A961C061756 for ; Mon, 10 Aug 2020 15:54:49 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id t6so5769352pgq.1 for ; Mon, 10 Aug 2020 15:54:49 -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; bh=fKb1XDtHYo4y9AlyAa0W068lkmxD2lT16yayOu1K+QI=; b=szlzA6BXPZZzYv7tgeeiBI/hmXhcZHAA8oH87hVJwjeA85Xg/l+ifQwGM4YQO05kYa lVvi/JBybmOD6wA4PJc7d/UeaFDTMxI/IQt926VCum9UT7Hs3JeLA3UGyhycIoWHgwxk BMu+OG3PffIKVMJRcsEfVqSVxjxqP6/GV0JZUyL3Dhh8cfE7wizpemJbiN7TFywWMGpl U5zb4KuXamUDsq7moDAydYTNnjtpyCZCaQP8vf2PkKUlZnzhxtQZuKKMuqzo5lHbQH3d 96OYjaEvWw5d07CCxhnFlRC5Rl3JDgSau2idJy+DrIlSCsVZe1sVBgHrb4pNNcUyjfPA 75PQ== 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=fKb1XDtHYo4y9AlyAa0W068lkmxD2lT16yayOu1K+QI=; b=I59CIJmkHnY/EzfSuWxdEdARYcgbUbNdjMKN/ztHjNOkYxmiU2Xtz/j28t5Dfhcp58 fhP1tSYSTa0DACXWHgGOraXQWLzEK5MkRKv9Bu/j3Y1OvYV+BBB/ak43A2fQSRHN+cjO u7MaM5Tj0VylWgkqDHP2OchvC01/RNDvAL7pHzDxlcI5J+BZg60i/f2IWMR3XxIYMSuY Vr6/rRB+gX4dx0EZ/wR9/0Rk6aI92Iw/LiSaGRnlyOQ3iPXGA+XbpIcLwROhrt7R4qu2 XGcymRyp61HxIZ1wNR3iWIsgEoT6YiBfx9Tas55jMX20bvYSLosPlWqdd8TWe/ZWvWcl QH8A== X-Gm-Message-State: AOAM5326bUKVy41LidOwlmGoKer9pnym3nMJDjfjQU+rYNKaVIe59g3d CFinwOQP5mdhGv+OOJxFCXTonA== X-Received: by 2002:a63:545a:: with SMTP id e26mr18363900pgm.60.1597100088918; Mon, 10 Aug 2020 15:54:48 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id y1sm25234135pfr.207.2020.08.10.15.54.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 15:54:48 -0700 (PDT) Date: Mon, 10 Aug 2020 16:54:46 -0600 From: Mathieu Poirier To: Gurbir Arora Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, tsoni@codeaurora.org, psodagud@codeaurora.org, sidgup@codeaurora.org, rishabhb@codeaurora.org Subject: Re: [PATCH 1/3] remoteproc: core: Add coredump to remoteproc ops Message-ID: <20200810225446.GG3223977@xps15> References: <1596843121-82576-1-git-send-email-gurbaror@codeaurora.org> <1596843121-82576-2-git-send-email-gurbaror@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1596843121-82576-2-git-send-email-gurbaror@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 07, 2020 at 04:31:59PM -0700, Gurbir Arora 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. > > Signed-off-by: Rishabh Bhatnagar > Signed-off-by: Siddharth Gupta > Signed-off-by: Gurbir Arora > --- > drivers/remoteproc/remoteproc_core.c | 6 +++++- > include/linux/remoteproc.h | 1 + > 2 files changed, 6 insertions(+), 1 deletion(-) This is not the patch Siddharth sent. Please fix it problem along with the 3 kernel test robot warnings this set has generated and send again after 5.9-rc1 has been released. Thanks, Mathieu > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index 7f90eee..283ecb6 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -1681,7 +1681,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); > @@ -2113,6 +2113,10 @@ static int rproc_alloc_ops(struct rproc *rproc, const struct rproc_ops *ops) > rproc->ops->sanity_check = rproc_elf_sanity_check; > rproc->ops->get_boot_addr = rproc_elf_get_boot_addr; > > + /* Default to rproc_coredump if no coredump functions is specified */ > + if (!rproc->ops->coredump) > + rproc->ops->coredump = rproc_coredump; > + > return 0; > } > > diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h > index 2fa68bf..0ed1a2b 100644 > --- a/include/linux/remoteproc.h > +++ b/include/linux/remoteproc.h > @@ -392,6 +392,7 @@ struct rproc_ops { > int (*load)(struct rproc *rproc, const struct firmware *fw); > int (*sanity_check)(struct rproc *rproc, const struct firmware *fw); > u64 (*get_boot_addr)(struct rproc *rproc, const struct firmware *fw); > + void (*coredump)(struct rproc *rproc); > unsigned long (*panic)(struct rproc *rproc); > }; > > -- > 1.9.1 >