Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp708921rwb; Tue, 4 Oct 2022 09:32:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM62RGxOp2IR96Vu2dUiV6PEJqXDGsLneZgx30+/VhZAOk9ZEdxzBo32yBP9a4qxphUwDfF4 X-Received: by 2002:a17:907:2e0d:b0:77e:999f:dea3 with SMTP id ig13-20020a1709072e0d00b0077e999fdea3mr19308412ejc.317.1664901151397; Tue, 04 Oct 2022 09:32:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664901151; cv=none; d=google.com; s=arc-20160816; b=QU4m6rQk5o+mFaNQwn8WFX7oqdRaC8lk/W8d05naYqpFXiif8TES/9DkntoHAcK0Nx ZRua02p8UHjeLSa/PvTTKAs+fZlEZ2V/ih1GjkCkc/U4CxIBWUdiQ0IoOXRw44y9M1PD EDtmydyJMdBY0xV30h7CHTBf0S8u1v17FbFsH7/lJ2mwVKy+k5ORl0amL+y9RX3t0yDm umpOmzoEdcflFZhDJvVCeP6vMOeMrTKT3THbFkfcqHHBJbGo9ZcXgyPu7DSp4fFl+CwG 5Igvg9TMQxeCHvzyKnz61Qws3JQpMvdFA7RjNtPbL4wMua57CHJ7weDpru0COzER0sJ7 MXRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=yDMKyG65ckdC56hoAnM4nP4F4DEhQI3AW8B11BrUlAQ=; b=0z1DbJZu5jkan2r81fe3xcO2kShXNAu+sSUu39OhLXuW8/FEodLzyDfdz6AKK+pbQm Az5GN1z6YdU4enMLrLR4HggrKNVistv4qtOAGhvDMZKsfJNGV37RHybcsnbQAxB/xmHu kjDbaj4gKU53VSwDgvRnBnzD9BvK9r7M/PnHCfFmBut3ppU6cxW3pqTuBradVwXm86b2 bbzukMJUlk4yKUwnaK9es+ToKeusY4KHs6njYViZZySR5EqqwVD6r0cRS6OX4Wbg5BEL TFGDCesosH5TEuelcgnppyx4Q7biyDV1P1KAhFeaE4ZwXii485dOhc5xyGq4ma+kNWyw V+Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=lH268rpk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u10-20020a170906780a00b007817a869a3bsi9768592ejm.179.2022.10.04.09.32.03; Tue, 04 Oct 2022 09:32:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=lH268rpk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229994AbiJDQYR (ORCPT + 99 others); Tue, 4 Oct 2022 12:24:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229908AbiJDQYH (ORCPT ); Tue, 4 Oct 2022 12:24:07 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C6F7DEF0; Tue, 4 Oct 2022 09:24:06 -0700 (PDT) Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 294BuvS5022266; Tue, 4 Oct 2022 18:23:49 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=yDMKyG65ckdC56hoAnM4nP4F4DEhQI3AW8B11BrUlAQ=; b=lH268rpkEPHoxuFVf3Cp3y9sJ/n2RIAc+d6vJA5LZac6+1UILc+iGaqk08+KYbyszyiO 8Lcp5NcB8rol/XYkSTDMFeLPsdF4Ot7L9hcGsYG5K4fyHlM43FemJR1i/YJi6W9kqxRw IXFM463RP4Zj9LrUpzAkCnlWD3gQ6G98dopMfNEKxlIcCWzrxdzNUZjG6XzNdiktiiGA 5SQatfa4tGsBcq7bSOehZsV0wSPwpEHaPlzBrFVFNkAypn8LRXMPwTUpc2pqWmUFXdzT DJ4zc0OIpYJtpoDLS4wJ6hRaOrUXXRbmH8BDVafsSxk4dpN7/JKBUg72jExPtmOcwgCN 4A== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3jxapc1xda-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Oct 2022 18:23:49 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 128A610002A; Tue, 4 Oct 2022 18:23:43 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 848FF245510; Tue, 4 Oct 2022 18:23:43 +0200 (CEST) Received: from [10.211.7.73] (10.75.127.121) by SHFDAG1NODE2.st.com (10.75.129.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2375.31; Tue, 4 Oct 2022 18:23:40 +0200 Message-ID: <97d1e574-ab68-cbd8-9300-b1a81f2dc2a9@foss.st.com> Date: Tue, 4 Oct 2022 18:23:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v9 4/4] remoteproc: virtio: Create platform device for the remoteproc_virtio Content-Language: en-US To: Rob Herring CC: Bjorn Andersson , Mathieu Poirier , , , , Christoph Hellwig , Stefano Stabellini , Bruce Ashfield References: <20220921135044.917140-1-arnaud.pouliquen@foss.st.com> <20220921135044.917140-5-arnaud.pouliquen@foss.st.com> <20221004143954.GA1479221-robh@kernel.org> From: Arnaud POULIQUEN In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.121] X-ClientProxiedBy: GPXDAG2NODE4.st.com (10.75.127.68) To SHFDAG1NODE2.st.com (10.75.129.70) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-10-04_07,2022-09-29_03,2022-06-22_01 X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/4/22 17:43, Rob Herring wrote: > On Tue, Oct 4, 2022 at 10:18 AM Arnaud POULIQUEN > wrote: >> >> Hello Rob, >> >> On 10/4/22 16:39, Rob Herring wrote: >>> On Wed, Sep 21, 2022 at 03:50:44PM +0200, Arnaud Pouliquen wrote: >>>> Define a platform driver to manage the remoteproc virtio device as >>>> a platform devices. >>>> >>>> The platform device allows to pass rproc_vdev_data platform data to >>>> specify properties that are stored in the rproc_vdev structure. >>>> >>>> Such approach will allow to preserve legacy remoteproc virtio device >>>> creation but also to probe the device using device tree mechanism. >>>> >>>> remoteproc_virtio.c update: >>>> - Add rproc_virtio_driver platform driver. The probe ops replaces >>>> the rproc_rvdev_add_device function. >>>> - All reference to the rvdev->dev has been updated to rvdev-pdev->dev. >>>> - rproc_rvdev_release is removed as associated to the rvdev device. >>>> - The use of rvdev->kref counter is replaced by get/put_device on the >>>> remoteproc virtio platform device. >>>> - The vdev device no longer increments rproc device counter. >>>> increment/decrement is done in rproc_virtio_probe/rproc_virtio_remove >>>> function in charge of the vrings allocation/free. >>>> >>>> remoteproc_core.c update: >>>> Migrate from the rvdev device to the rvdev platform device. >>>> From this patch, when a vdev resource is found in the resource table >>>> the remoteproc core register a platform device. >>>> >>>> Signed-off-by: Arnaud Pouliquen >>>> Reviewed-by: Mathieu Poirier >>>> --- >>>> drivers/remoteproc/remoteproc_core.c | 12 +- >>>> drivers/remoteproc/remoteproc_internal.h | 2 - >>>> drivers/remoteproc/remoteproc_virtio.c | 143 ++++++++++++----------- >>>> include/linux/remoteproc.h | 6 +- >>>> 4 files changed, 82 insertions(+), 81 deletions(-) >>> >>> [...] >>> >>>> +/* Platform driver */ >>>> +static const struct of_device_id rproc_virtio_match[] = { >>>> + { .compatible = "virtio,rproc" }, >>> >>> This is not documented. Add a binding schema if you need DT support. >> >> >> Mathieu also pointed this out to me in V8, you can see the discussion here [1] >> >> Here is an extract: >> "Yes I saw the warning, but for this first series it is not possible to declare >> the associated "rproc-virtio" device in device tree. >> So at this step it seems not make senses to create the devicetree bindings file. >> More than that I don't know how I could justify the properties in bindings if >> there is not driver code associated. >> >> So i would be in favor of not adding the bindings in this series but to define >> bindings in the first patch of my "step 2" series; as done on my github: >> https://github.com/arnopo/linux/commit/9616d89a4f478cf78865a244efcde108d900f69f >> " > > Okay, since I only just started checking this (in a more reliable way > than checkpatch does). > > But why do you need the DT match entry if it is not usable yet? You > could just add that in later when the binding is defined. Review of > the binding could say that 'virtio,rproc' should be something else and > you'd have to change it. Probably because I am too formatted to add a compatible when I create a driver, this solution yet logical did not come to my mind... I will send a fix to suppress the compatible. Thanks, Arnaud > > Rob