Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1583107pxk; Fri, 25 Sep 2020 20:36:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXdf8cS/Ty6GCn2TNIgGYQHiUNq82hCkT0tVbDniw8G/0RJnPNhZKD+3AMpNARfIxQs6gR X-Received: by 2002:a17:906:edd6:: with SMTP id sb22mr5443028ejb.499.1601091418298; Fri, 25 Sep 2020 20:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601091418; cv=none; d=google.com; s=arc-20160816; b=MaTP9AOJ1+bHGL9iBckVC7OWFWtblCdTjGq7t3kofBH3b15NczLmJ65uS70v3HGVUO yMTyL9mOEIwsKH6CQtLV2E/x7XlhR9/U0QAxhw+JIzJ38PXjLNs/+rzhb8GbKWnQv7KC OZWhPH1gEJ12NGbsoDavMIeG/wOSxd/txEuW/d1mbwkBP2AHAWjFfbvMjEuGGiDwnyId wqtEcUELZsVPdFSLdeaXMfgYBqvZLzfFWoF9OT3OaFy3UtA9v253U8zxzZtIg4mDjxFH dSaTNOFz3Kln2BtLbMIRwVU0dWYCkiutTUMkxvS9WCK/VuXcqVDGxRV9ryG8WE6Azz6r lWZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=r41cvb1N5LxHmvk4/Z1u+DVLxLHsiY0eJOMeFd/1FUI=; b=1LGGrTpOrQG+KaK0yAesfUG9kboRMzJgWPTM05+Yp6mwEDY3wfDJcTA9aTkCz5a9yx zSV7AuE1EdiNS3LLYYPK0NuEU3nGZlBylYyAXH1GgKs5Fioc7LbNYVdOBoI/Ld8NU0CC qRw1rWnx8KdgvhSul47VKTRAem6ss+ax6MPBDvLkhObs5VamYwlaW8gWJrK/hBLUHYGK VnmkwGZFAQhPe3JTCWr/7K0/eXIZx6I7Vs2Z7kEpPNWhY9Bpe7EC61hd34PEr9+Gbu7o jvL9D1cBB1soxpsoqcmqwfVuOcXJDpVTFOxOdJfUpYpAb6hQASr9gapBZeXMNYUSfpoz dtZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H5Ew1dx9; 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 n10si2970419ejb.405.2020.09.25.20.36.35; Fri, 25 Sep 2020 20:36:58 -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=H5Ew1dx9; 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 S1729926AbgIZDfo (ORCPT + 99 others); Fri, 25 Sep 2020 23:35:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726210AbgIZDfo (ORCPT ); Fri, 25 Sep 2020 23:35:44 -0400 Received: from mail-ot1-x343.google.com (mail-ot1-x343.google.com [IPv6:2607:f8b0:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ED6BC0613D3 for ; Fri, 25 Sep 2020 20:35:44 -0700 (PDT) Received: by mail-ot1-x343.google.com with SMTP id g96so4223669otb.12 for ; Fri, 25 Sep 2020 20:35:44 -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:content-transfer-encoding:in-reply-to; bh=r41cvb1N5LxHmvk4/Z1u+DVLxLHsiY0eJOMeFd/1FUI=; b=H5Ew1dx9RWLp2Zv3wrDGwnWJ9kvtovj/or5SuxWG5TW34gvkP1WCt38X0STzwaQApU GKIaAcgUbc9S4lHb9nOf889CwIuOKJOqT/pKmtmDVU6d/IznJ0qhGPtt73jl4KZcWqG3 wg3392eGxhSA0yu4/NnqKGS9Dm8qg4tcbOaMof9vZpTWjIW/Ps6wT2W7EWq5XIHg+b1V hycKIor7N599PF/QigzHhsI2clYn1/SbwHkBorQeZExOShoxPuizepodAY0E6CL6/SE7 XHfiBtHiD+MmTIXfeJLKzgiaLRmNmqrNQ+F5gZSV9PAk4+aRZ87p5S06Jx7vzLMJqg9H IrQQ== 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:content-transfer-encoding :in-reply-to; bh=r41cvb1N5LxHmvk4/Z1u+DVLxLHsiY0eJOMeFd/1FUI=; b=RDI3czG1L6ytlZxwNxDw/hoWvFPve/NxwmPzIKqx59PZkCPsA9zBpKGAvZELvmNPJI 2cHymQJaLGrow0wcYKDIvoecguBLkE+7WiMk5NRzh+xs6wPV7AT2FZFQYxWPsKPPvnX4 eWl3qe8rx0TYpbKsdQPBH5kLcJDGGb0/gqMosUzP7AQSTAUJjBZEBY8WpBPeRRJU3idv 6T23r0eOJoUTeI8aEJsqaWYLrdtGBEDlhcI4zJM+8YizXIAY6/vFliGRSYZZq5ROO7DM Znpx9Ank3Sm5kaU+hiO1YIGzjEHzl5VguViMqOHbCnYsM88pJkj2ROL9+ybwOO3S5Svb +kzQ== X-Gm-Message-State: AOAM531mrIw7HyKN2upoCY8o81PKg4k2qf2gxJnUku87x2mqcyOyybqI H3CMStFMptGxx/zXvo8hi/jA0Q== X-Received: by 2002:a9d:6a8b:: with SMTP id l11mr2433175otq.273.1601091343437; Fri, 25 Sep 2020 20:35:43 -0700 (PDT) Received: from builder.lan (99-135-181-32.lightspeed.austtx.sbcglobal.net. [99.135.181.32]) by smtp.gmail.com with ESMTPSA id z20sm333543oor.3.2020.09.25.20.35.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 20:35:42 -0700 (PDT) Date: Fri, 25 Sep 2020 20:31:09 -0700 From: Bjorn Andersson To: Arnaud POULIQUEN Cc: Rishabh Bhatnagar , "linux-remoteproc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "mathieu.poirier@linaro.org" , "tsoni@codeaurora.org" , "psodagud@codeaurora.org" , "sidgup@codeaurora.org" Subject: Re: [PATCH v2 0/3] Expose recovery/coredump configuration from sysfs Message-ID: <20200926033109.GA10036@builder.lan> References: <1598557731-1566-1-git-send-email-rishabhb@codeaurora.org> <7ad40d80-5ac4-97a5-5e05-c83dc08896a2@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7ad40d80-5ac4-97a5-5e05-c83dc08896a2@st.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 15 Sep 02:51 PDT 2020, Arnaud POULIQUEN wrote: > Hi Rishabh, > > On 8/27/20 9:48 PM, Rishabh Bhatnagar wrote: > > From Android R onwards Google has restricted access to debugfs in user > > and user-debug builds. This restricts access to most of the features > > exposed through debugfs. This patch series adds a configurable option > > to move the recovery/coredump interfaces to sysfs. If the feature > > flag is selected it would move these interfaces to sysfs and remove > > the equivalent debugfs interface. 'Coredump' and 'Recovery' are critical > > interfaces that are required for remoteproc to work on Qualcomm Chipsets. > > Coredump configuration needs to be set to "inline" in debug/test build > > and "disabled" in production builds. Whereas recovery needs to be > > "disabled" for debugging purposes and "enabled" on production builds. > > The remoteproc_cdev had been created to respond to some sysfs limitations. The limitation here is in debugfs not being available on all systems, sysfs is present and I really do like the idea of being able to change these things without having to compile a tool to invoke the ioctl... > I wonder if this evolution should not also be implemented in the cdev. > In this case an additional event could be addedd to inform the application > that a crash occurred and that a core dump is available. > Specifically for userspace to know when a coredump is present there's already uevents being sent when the devcoredump is ready. That said, having some means to getting notified about remoteproc state changes does sounds reasonable. If there is a use case we should discuss that. > Of course it's only a suggestion... As it would be a redesign. A very valid suggestion. I don't think it's a redesign, but more of an extension of what we have today. Regards, Bjorn > I let Bj?rn and Mathieu comment. > > Regards, > Arnaud > > > > > Changelog: > > > > v1 -> v2: > > - Correct the contact name in the sysfs documentation. > > - Remove the redundant write documentation for coredump/recovery sysfs > > - Add a feature flag to make this interface switch configurable. > > > > Rishabh Bhatnagar (3): > > remoteproc: Expose remoteproc configuration through sysfs > > remoteproc: Add coredump configuration to sysfs > > remoteproc: Add recovery configuration to sysfs > > > > Documentation/ABI/testing/sysfs-class-remoteproc | 44 ++++++++ > > drivers/remoteproc/Kconfig | 12 +++ > > drivers/remoteproc/remoteproc_debugfs.c | 10 +- > > drivers/remoteproc/remoteproc_sysfs.c | 126 +++++++++++++++++++++++ > > 4 files changed, 190 insertions(+), 2 deletions(-) > >