Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp767427pxb; Wed, 15 Sep 2021 12:41:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9jpiZBrOIOKDUHlNzqaAXIec551o1S2F6ZGBaOt+PGyHwC/G9N+GYorYLPReIRnmS5L6y X-Received: by 2002:a05:6402:1011:: with SMTP id c17mr1917608edu.144.1631734897411; Wed, 15 Sep 2021 12:41:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631734897; cv=none; d=google.com; s=arc-20160816; b=XEGFQuBrvuPT2EgDB3afEJ8HBZsrytgdKhYup2VQOQGFWG51gvnLU0wfzDUTv1oS74 CENQRy+9ngrbDlcmB1soEt2r/Xq2OKzWV4HYBBZHtolvjLncTLXUJ9ZyzAmg57uLfyZO /GvvzW+FZvzzunBirKrRIMQ7al/OGPNzAzeOMbIDu6eMZqLQgsSHyxtuRBwp+1+XYJFF IZXILBge+T4L/i/9bdf1w8dCm26qOSw49Vvm1mgYZoMIcJSUdzj2r2oDhYudAmZ9U3vQ Ig3AjeArGbTNUCO9Ym/pFFPtC6rgtyS3Ct+uLz+TBtI6vGyLEuHBJq2P5yUtC8cboRP0 s4mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=IGGDgeo7WVVIlkSnWinltsDGGWd6kdeJ2zJ+aw6R/WI=; b=SEHm69lURjvkscluYSVQbOhbge+C3LvvsrRRd0HM4l06R3+hJPSH2taaUdOZmvuKtq LKWEWR83JUuRqdyDte/vLNpdyviWCSPTbzXr9FCYud8TMRFwoiD2iQYDkAiaZPXHSa8x k35X5NvZB+9OhTwjUD/9RfnIDqgpntoRFDhFIQYWFjvNJPc048ybaJZC9JA+Gf9RMJOV jI9NEov7tg8a+aHZjYhMM684OnhCbWvuvJB6bbra9po09VfxKMnAEjrzUgWqYSgl5EYB QDPhTfaa6gCY2cJB2PmCDMI7RPIdB97eKa1JqR1Oms0miYGU/NzceRM3tkWu73GD5ioC txXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GUS2hAMg; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay15si850141edb.592.2021.09.15.12.41.11; Wed, 15 Sep 2021 12:41:37 -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=@chromium.org header.s=google header.b=GUS2hAMg; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231487AbhIOTlE (ORCPT + 99 others); Wed, 15 Sep 2021 15:41:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230451AbhIOTlD (ORCPT ); Wed, 15 Sep 2021 15:41:03 -0400 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19B53C061575 for ; Wed, 15 Sep 2021 12:39:44 -0700 (PDT) Received: by mail-ot1-x336.google.com with SMTP id l16-20020a9d6a90000000b0053b71f7dc83so5092714otq.7 for ; Wed, 15 Sep 2021 12:39:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=IGGDgeo7WVVIlkSnWinltsDGGWd6kdeJ2zJ+aw6R/WI=; b=GUS2hAMgT2THzzdYiJDLOPPpMXHleJehii5HTQQ8sTxAHOW276rxND6LOK2QvQFA4u ZusSgHiBg4JbNncoByRn6RQIMW7b2PVv0+wOets/2UphEYO0SohUOndszuIkFXFb2oRk RDrFneIDQXgKYs2QmPxLhVGbi/W+xAtXFEH1Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=IGGDgeo7WVVIlkSnWinltsDGGWd6kdeJ2zJ+aw6R/WI=; b=zc4BSqZD4n9wUOyI9wNcbKctaLf04fstF92J479Gb/Jr0WLcpJYu2w5MpqA1+jgxLg d6sYOK3aRRP1kiYqrzIbrnSY4OvgrC6GG9y8hlU34vwaqANhdig3qqq/Z9oFCRlXJknQ sqZ9Yk3Oz2VttRnwbq1+EJC51mdtCYg0rMK4JVaYCh9LawQVOrWk0cxvTnGurOyQBZS2 ck1U4WXv90zD6cDXquLYkQnx0HiLZTHOCkEUdmeXRj6MOEdzfXNuWzUeSPDBAvpna1oj z6bVHYcnGpsMAfg2tWH0hflOXIxtq0+JTs5VVupyoSedyZ0/tY5NnW9jcEpReMT/0IhS Xftw== X-Gm-Message-State: AOAM531Q46WMswpSdPmD5MM93yMays9eAsYwz3lAVtO5WPrtbd0vjxKw tZZPc0QrwB1Zi5WKLbNmnEl2KJW287OUiILZ0WQmjw== X-Received: by 2002:a05:6830:1212:: with SMTP id r18mr1440354otp.159.1631734783359; Wed, 15 Sep 2021 12:39:43 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 15 Sep 2021 12:39:42 -0700 MIME-Version: 1.0 In-Reply-To: <8c1fdf2d0807f07ec57b232497b405f1@codeaurora.org> References: <20200730095350.13925-1-stanimir.varbanov@linaro.org> <20200730095350.13925-3-stanimir.varbanov@linaro.org> <159718256557.1360974.458611240360821676@swboyd.mtv.corp.google.com> <8c1fdf2d0807f07ec57b232497b405f1@codeaurora.org> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Wed, 15 Sep 2021 12:39:42 -0700 Message-ID: Subject: Re: [PATCH v5 2/3] venus: Add a debugfs file for SSR trigger To: dikshita@codeaurora.org Cc: Stanimir Varbanov , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, jim.cromie@gmail.com, Joe Perches , Jason Baron , Greg Kroah-Hartman , linux-media-owner@vger.kernel.org, Akinobu Mita Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting dikshita@codeaurora.org (2021-09-15 02:13:09) > Hi Stephen, > > Reviving the discussion on this change as we need to pull this in. > > As per your suggestion, I explored the fault injection framework to > implement this functionality. > But I don't think that meets our requirements. > > We need a way to trigger subsystem restart from the client-side, it's > not derived from the driver. Just to confirm, this is all for debugging purposes right? > > while fault injection framework enables the driver to trigger an > injection > when a specific event occurs for eg: page allocation failure or memory > access failure. > > So, IMO, we will have to use custom debugfs only. Can you use DECLARE_FAULT_ATTR()? Or you need it to be active instead of passive, i.e. it shouldn't wait for should_fail() to return true, but actively trigger something on the remoteproc? > > Please feel free to correct me in case my understanding of the framework > is wrong. > I presume the fault injection framework could get a new feature that lets the fault be injected immediately upon writing the debugfs file. My goal is to consolidate this sort of logic into one place and then put it behind some config option that distros can disable so the kernel isn't bloated with debug features that end users will never care about.