Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2957920pxb; Fri, 8 Oct 2021 20:39:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy21W8s/8aQOgy0xGeE9I2/4NcWOKdUu+xwHaRv9+y37uHuKj1Gi5Ob7qoHfHaih/Vurx3q X-Received: by 2002:a17:906:29d0:: with SMTP id y16mr9230654eje.477.1633750791531; Fri, 08 Oct 2021 20:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633750791; cv=none; d=google.com; s=arc-20160816; b=oOalGuNq5d/DLbBDR4h3zS7dkF1MA6vkYN+AnUR2juUlHhrjf5pV5S6pqBHdgbtxRs Rz5U9A8XXq+Crz5yeQcksLkGBkxd461LSQcfXq7EPKHvBoFISEhinMDRZcxogF3ZnSU/ dj/uEsvS08M+gFsRKz/dAXAM5+odOYEn+vMMOMmEY+Kn/usIkAwTu1xJfC0qqBl4paQS gHn5Iueh1WHh2z5nsWRaf3LYaZ22t/FuPf8aOlGQ0onBN+X1bZqAzYEIkJn7gy47dwvt IlmDYQC97O4hfA+wctlVyoiveb6z8yZQCksS/eyqSBV0pKyreVphh+Uxuy7JKD9qe/5p 6PGQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4bSpNJPwT1vNF1+AfYe0YCy792p+0Ep8kGezfzAgQtY=; b=Y85SxKR+iGUxPjAFiS7xkgYBJkkgSVkWXv1bZrk59Lsq0D//LJWakHP1GHf88JbVei Rykav1QMcp8InKqzvNiYHs+LzKh+RsLFH1kh+h8H4uAts0KveFgAtSAwPolphRn88A9p pgHjZ1AD0a5yEGLkaEtPvP1HWb1L6+6NuwzgG69jzn9Y+zdmHPPnkdUcNtdYiXC0X89P kNvFG9XBgA2YKDFkHWf6Cw1nUKb4qXHsGfYOyZENP0IvXmsFWmzjo5DXETvblLAd7blU Ilfx1KIqoZJlTc7hZlrQisPxcVh4a4stSOA8KhSm7jQOZSWmDCzDuWYH7EJ1FbaEhY/p c+Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DHngEJe1; 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 o6si2009777edi.516.2021.10.08.20.39.27; Fri, 08 Oct 2021 20:39:51 -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=DHngEJe1; 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 S229561AbhJIDiA (ORCPT + 99 others); Fri, 8 Oct 2021 23:38:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229970AbhJIDh7 (ORCPT ); Fri, 8 Oct 2021 23:37:59 -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 87C49C061570 for ; Fri, 8 Oct 2021 20:36:03 -0700 (PDT) Received: by mail-ot1-x336.google.com with SMTP id l7-20020a0568302b0700b0054e40740571so8251431otv.0 for ; Fri, 08 Oct 2021 20:36:03 -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=4bSpNJPwT1vNF1+AfYe0YCy792p+0Ep8kGezfzAgQtY=; b=DHngEJe1oZcDoy9FWK6YfExDfhAM35H4sK9yztoZ9RAL2HE94VKG2iO5zTejlkOqVF HgJtOG63wpgRxOxpMkqwHuNdwJ06u8HMsoRrItl3svlMaa9jssnUCdgOOxNc8yPlboFo 7gxrlt8APJeBIIkLcovevN/nmkJBW5i1f8gnxGSiZWpA6+kMDcv1PIxwkH1OAtGeWqL8 hgB2xC6FY6aTKzUNS5Zu89jFvGHmzNeMhm+NH7zwfjvI6Ig5R/JE+51d0s3D5woEAdgt +6q1Al51Gsjif1dcNGyXd3wZ5vd6A7mPFNd6iIMALu+ztlZDiQs8hd8PlrO5EknG+h4s DbGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4bSpNJPwT1vNF1+AfYe0YCy792p+0Ep8kGezfzAgQtY=; b=AkODariCqcsxGzoGkyRmadQCYo0r8zEKm9SNtmr5ghbQkK/kz3G4c5tAWfgH1F97Jy 9EkzGjO9aJOuFhYMDYOtdHPUrxWHskAo2PRcJ/5IfInLmKlOc2xpcJp8R+IjkUVkLk7T d52qPnixua3r+Vc7LjSVG+rUUwqecliERwOTPAOp6qmZjZ9tiFW/lfwB1zDHw6/7cPK8 JlSExqf8pBOdExqtxCfMQAaOmBKnD26Hjgp7Rfd67zcwqk/mFGRfc2WLy2weK1PeSA+J 9WfrxpXZqBaGz1vixbUPtiOH7oAC1gVChxPyHM9TNHpbCtFj8hx+ribYwaR240g1q3qr gwPg== X-Gm-Message-State: AOAM532zUwFhEcBcLKQeHtmlTOGX51KneRcInggkZ+pWg4royEf4nlrP AUgaGRJrBUEqHog9fGyu6dfutA== X-Received: by 2002:a05:6830:1d8b:: with SMTP id y11mr11561729oti.291.1633750562871; Fri, 08 Oct 2021 20:36:02 -0700 (PDT) Received: from builder.lan ([2600:1700:a0:3dc8:3697:f6ff:fe85:aac9]) by smtp.gmail.com with ESMTPSA id j12sm283806ota.47.2021.10.08.20.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 20:36:02 -0700 (PDT) Date: Fri, 8 Oct 2021 22:36:00 -0500 From: Bjorn Andersson To: Arnaud Pouliquen Cc: Ohad Ben-Cohen , Mathieu Poirier , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Rob Herring , Christoph Hellwig , Stefano Stabellini , Bruce Ashfield Subject: Re: [RFC PATCH 4/7] remoteproc: create the REMOTEPROC_VIRTIO config Message-ID: References: <20211001101234.4247-1-arnaud.pouliquen@foss.st.com> <20211001101234.4247-5-arnaud.pouliquen@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211001101234.4247-5-arnaud.pouliquen@foss.st.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 01 Oct 05:12 CDT 2021, Arnaud Pouliquen wrote: > Create the config to associate to the remoteproc virtio. > > Notice that the REMOTEPROC_VIRTIO config can not set to m. the reason > is that it defines API that is used by the built-in remote proc core. > Functions such are rproc_add_virtio_dev can be called during the > Linux boot phase. > Please don't introduce new Kconfig options for everything. Consider that the expectation should be that everyone runs the default defconfig on their boards - and if someone actually needs this level of control, they are welcome to present patches with numbers showing the benefit of the savings. Thanks, Bjorn > Signed-off-by: Arnaud Pouliquen > --- > drivers/remoteproc/Kconfig | 11 +++++++++- > drivers/remoteproc/Makefile | 2 +- > drivers/remoteproc/remoteproc_internal.h | 28 ++++++++++++++++++++++++ > 3 files changed, 39 insertions(+), 2 deletions(-) > > diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig > index 9a6eedc3994a..f271552c0d84 100644 > --- a/drivers/remoteproc/Kconfig > +++ b/drivers/remoteproc/Kconfig > @@ -6,7 +6,7 @@ config REMOTEPROC > depends on HAS_DMA > select CRC32 > select FW_LOADER > - select VIRTIO > + select REMOTEPROC_VIRTIO > select WANT_DEV_COREDUMP > help > Support for remote processors (such as DSP coprocessors). These > @@ -14,6 +14,15 @@ config REMOTEPROC > > if REMOTEPROC > > +config REMOTEPROC_VIRTIO > + bool "Remoteproc virtio device " > + select VIRTIO > + help > + Say y here to have a virtio device support for the remoteproc > + communication. > + > + It's safe to say N if you don't use the virtio for the IPC. > + > config REMOTEPROC_CDEV > bool "Remoteproc character device interface" > help > diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile > index bb26c9e4ef9c..73d2384a76aa 100644 > --- a/drivers/remoteproc/Makefile > +++ b/drivers/remoteproc/Makefile > @@ -8,8 +8,8 @@ remoteproc-y := remoteproc_core.o > remoteproc-y += remoteproc_coredump.o > remoteproc-y += remoteproc_debugfs.o > remoteproc-y += remoteproc_sysfs.o > -remoteproc-y += remoteproc_virtio.o > remoteproc-y += remoteproc_elf_loader.o > +obj-$(CONFIG_REMOTEPROC_VIRTIO) += remoteproc_virtio.o > obj-$(CONFIG_REMOTEPROC_CDEV) += remoteproc_cdev.o > obj-$(CONFIG_IMX_REMOTEPROC) += imx_rproc.o > obj-$(CONFIG_INGENIC_VPU_RPROC) += ingenic_rproc.o > diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h > index 152fe2e8668a..4ce012c353c0 100644 > --- a/drivers/remoteproc/remoteproc_internal.h > +++ b/drivers/remoteproc/remoteproc_internal.h > @@ -30,10 +30,38 @@ int rproc_of_parse_firmware(struct device *dev, int index, > const char **fw_name); > > /* from remoteproc_virtio.c */ > +#if IS_ENABLED(CONFIG_REMOTEPROC_VIRTIO) > + > int rproc_rvdev_add_device(struct rproc_vdev *rvdev); > irqreturn_t rproc_vq_interrupt(struct rproc *rproc, int vq_id); > void rproc_vdev_release(struct kref *ref); > > +#else > + > +int rproc_rvdev_add_device(struct rproc_vdev *rvdev) > +{ > + /* This shouldn't be possible */ > + WARN_ON(1); > + > + return -ENXIO; > +} > + > +static inline irqreturn_t rproc_vq_interrupt(struct rproc *rproc, int vq_id) > +{ > + /* This shouldn't be possible */ > + WARN_ON(1); > + > + return IRQ_NONE; > +} > + > +static inline void rproc_vdev_release(struct kref *ref) > +{ > + /* This shouldn't be possible */ > + WARN_ON(1); > +} > + > +#endif > + > /* from remoteproc_debugfs.c */ > void rproc_remove_trace_file(struct dentry *tfile); > struct dentry *rproc_create_trace_file(const char *name, struct rproc *rproc, > -- > 2.17.1 >