Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp286562pxu; Fri, 11 Dec 2020 02:17:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2G3p8VsZO6F5aYEuDVztry5zZDRUdjsCtHmryVwA+8peA+srvSm4Vr2n3F0kJQjgpVrxb X-Received: by 2002:aa7:c84c:: with SMTP id g12mr10923407edt.193.1607681870066; Fri, 11 Dec 2020 02:17:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607681870; cv=none; d=google.com; s=arc-20160816; b=KnADUJVhYBzpFPFGPnC2nd5zWJhOBURrquTxCL7/mhmg4XP9OWFxi8yDkH7lP/0qy0 3sVnv8HIZpWvNaNoxnPG0i5mbt84yh4/0PGBbRBRVBEpv3tMtxXx3RarHwDwB0z6i4vh V0+dLV0gz5WMpPbubdif0/JKFPHfY2kd5sylqeOko6ZsQS6YIqpmBnD0hlIfzERGGOLt uWPFKZ9dAGjIcVdCEpLSFe4e27/5e3DsB7n6wEm/fg3/BEFD25NRbdaobJQT2MAEHyMK cbjGE41kB3TpDcaydoF7TDUxe3vkzTI6uNUMPZzQiJIhuRtGtgWkrO+oEQstO2HhHZdO w1RA== 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:from:in-reply-to :references:mime-version:dkim-signature; bh=mzGzF5GAFCWv110dU766f4qmS6PHGlLIganzCuy95NU=; b=zWP22z3qVnK8UA+D6yl3I7oKqt0tMYZycY7gtlSDVAU2AJprHc5xd3C6EJp1ikxEbn YHRgYcZQg+NtE/gAXtTSpBf7nz01D+atx9r2pBhnQl9DpoS5vdsp4N2ZzZIplqEeVUoz XM6YU3OEqThdEa9OSxxpHzMLRl4xISLT7CUEzOIWSyBdBwgQPlBrMdMT7awMDIyKDR0P i4mXP8S4Xw+wzxnLv0OHbxsjwkULYocSOuCIiBHiUYwfsyF5b9XUHIhfVKXAnAaJSOJN MKdE08jxW2YlwxcJqhh/U00mKtDu7riJURtahywnN4Q9LK8jy04t3970pZwSQ5QMBKYw uVmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="TnrcK/mo"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt17si591024ejb.333.2020.12.11.02.17.27; Fri, 11 Dec 2020 02:17:50 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b="TnrcK/mo"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389369AbgLJXLx (ORCPT + 99 others); Thu, 10 Dec 2020 18:11:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:49374 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389345AbgLJXLa (ORCPT ); Thu, 10 Dec 2020 18:11:30 -0500 X-Gm-Message-State: AOAM531u9jIXpKuhEDHnYCx1lG6NqCpVqiZxkm/neSfPtPqkYQ31ca0B NEFaiY4uAWktETvPQo01fhulC7NTNtkLwPOuTw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607641849; bh=PCQQKOjc6YjZumEOD1HngXXOffpY7WJSVffGBmVE2eY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TnrcK/moE7nkwoA3Zz9FgXqwnQlEGkMjC7dyAIYEyp2dwR1PKUkk2X8Wb3bhY0+K8 cS4FeGf5HoRyJmhDcyJgPk0Osl8ZPnv2OUnMbuVOtkLK13FsRVFNsaQxriZnynzOgF UVJ96bMZKQq3Em7/+bk/3SeY1JXlEPZyAmU0GDJ7NfkWDAOoPZdN8OfOi0RomumxpU 5aIY2eK92ra5Qq6STHHjPMCc0bT0lB890owNxnlBAdCq/bEpgHO6SjhF0vMNDr4OAE 9GxbTEg2FisGYERWI5hR1XT/2aVNH4u6Ji6XIN2NUwSs/UNHvw9rxy5m7/DJkfzu1d SDJqGXjRmKGOg== X-Received: by 2002:a05:6402:1841:: with SMTP id v1mr9392182edy.194.1607641848145; Thu, 10 Dec 2020 15:10:48 -0800 (PST) MIME-Version: 1.0 References: <20201126210642.897302-1-mathieu.poirier@linaro.org> <20201126210642.897302-2-mathieu.poirier@linaro.org> <20201130173321.GB2662913@robh.at.kernel.org> <20201201234327.GA1248055@xps15> In-Reply-To: <20201201234327.GA1248055@xps15> From: Rob Herring Date: Thu, 10 Dec 2020 17:10:36 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 01/15] dt-bindings: remoteproc: Add bindind to support autonomous processors To: Mathieu Poirier Cc: Ohad Ben-Cohen , Bjorn Andersson , "open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM" , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Arnaud POULIQUEN Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 1, 2020 at 5:43 PM Mathieu Poirier wrote: > > Hi Rob, > > On Mon, Nov 30, 2020 at 10:33:21AM -0700, Rob Herring wrote: > > On Thu, Nov 26, 2020 at 02:06:28PM -0700, Mathieu Poirier wrote: > > > This patch adds a binding to guide the remoteproc core on how to deal with > > > remote processors in two cases: > > > > > > 1) When an application holding a reference to a remote processor character > > > device interface crashes. > > > > > > 2) when the platform driver for a remote processor is removed. > > > > > > In both cases if "autonomous-on-core-reboot" is specified in the remote > > > processor DT node, the remoteproc core will detach the remote processor > > > rather than switching it off. > > > > > > Signed-off-by: Mathieu Poirier > > > --- > > > .../bindings/remoteproc/remoteproc-core.yaml | 25 +++++++++++++++++++ > > > 1 file changed, 25 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/remoteproc/remoteproc-core.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/remoteproc/remoteproc-core.yaml b/Documentation/devicetree/bindings/remoteproc/remoteproc-core.yaml > > > new file mode 100644 > > > index 000000000000..3032734f42a3 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/remoteproc/remoteproc-core.yaml > > > @@ -0,0 +1,25 @@ > > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: "http://devicetree.org/schemas/remoteproc/remoteproc-core.yaml#" > > > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > > > + > > > +title: Binding for the remoteproc core applicable to all remote processors > > > + > > > +maintainers: > > > + - Bjorn Andersson > > > + - Mathieu Poirier > > > + > > > +description: > > > + This document defines the binding recognised by the remoteproc core that can > > > + be used by any remote processor in the subsystem. > > > + > > > +properties: > > > + autonomous-on-core-reboot: > > > + $ref: /schemas/types.yaml#/definitions/flag > > > + description: > > > + Used in two situations, i.e when a user space application releases the > > > + handle it has on the remote processor's character driver interface and > > > + when a remote processor's platform driver is being removed. If defined, > > > + this flag instructs the remoteproc core to detach the remote processor > > > + rather than turning it off. > > > > Userspace? character driver? platform driver? remoteproc core? Please > > explain this without OS specific terms. > > The remoteproc state machine is gaining in complexity and having technical terms > in the binding's description helps understand when and how it should be used. I > could make it more generic but that will lead to confusion and abuse. Explaining in Linux specific terms will confuse any other OS user. > Should I > make it "rproc,autonomous-on-core-reboot" ? No, 'rproc' is not a vendor. > > > > Seems to me this would be implied by functionality the remote proc > > provides. > > Exactly - this binding is used by the remoteproc core itself. It is specified > in the remote processor DT nodes but the individual platform drivers don't do > anything with it - the core takes care of enacting the desired behavior on their > behalf. Otherwise each platform driver would end up adding the same code, which > nobody wants to see happening. The platform drivers just need to set a flag to enable some behavior that the core code checks and handles. That should be 1 to a few lines in the drivers. It's not really any different, just a question of where the flag lives. Rob