Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4569815pxv; Tue, 29 Jun 2021 10:02:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzG6FF5Nh0W2rBY97Qm+7B+548vUfxrOBn7hxYsua7X3wGgKFChg4LVZ6LRM+39z1+YjUqd X-Received: by 2002:a05:6402:95a:: with SMTP id h26mr42092813edz.114.1624986132514; Tue, 29 Jun 2021 10:02:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624986132; cv=none; d=google.com; s=arc-20160816; b=wd7pWX6TflXFfVN7T6Y0IycDjwSubX+HDs3G6QgD63nKcvkLuJHFIdAN/IKHSPP3xP 04j2YcSVrn3dg+h9rqN+5qNk01woH7+mK4c4ZD+08fcD2tJDRLm8GEzo//gAGnHxRftr xAE00C3qQl28n81N9BxanRBd2oYmtQjUeWV3Sxu/iqMSmbi/EgfEXChm9k2zIC9tbsiK BjnPw+/MnuL9+zdvMUC90dgPIrCuzTQv6d0jsKNTP/i+z8jjcU9LCgMzx1lZ9LXkHUQL 2MJmqkmdGnA/nV+eydBpQBX35cWYoxP1n98unTCKTTUQERi/af1eHUE+DMX9uoScthF4 waNw== 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=22YCX1gTuHxij8jBkd6zakC86sS35hKmpf8kUxvjUtA=; b=oq81VPEjdV1CVJHOUjo5SXqULXnQ/IXJvkkdygzqyZhN2uwd13hAIwBTmuGUqvxKIK oyfr5/8jhVBYVkj1SziB9c7fJ5Cjk8PCgnXXCwRFB2DCTZLSReBM2aS6tMPiqXeCIcbi DSZvSbOYhO3bIclWEWdZv16X/ZqBhzHLAKYxEWXWLIFuX569wCn5pfQrDqfwtUwot6na EAUsJ0MXBHygw4P1v3ugiuQg7c265AfB4t3qBKYapgGEs8cQv22hm9tLbgoz1cEWLEhZ GisGhvJv+3e8tBybJm1vRFEWFJNTonWi7VXfHnZhpZyoYpAZEPe1RkKlMgexaKtSFDaS sFKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="uNeO5HQ/"; 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 w18si16214613edd.608.2021.06.29.10.01.48; Tue, 29 Jun 2021 10:02:12 -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="uNeO5HQ/"; 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 S232257AbhF2QK0 (ORCPT + 99 others); Tue, 29 Jun 2021 12:10:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234303AbhF2QGR (ORCPT ); Tue, 29 Jun 2021 12:06:17 -0400 Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C389EC061787 for ; Tue, 29 Jun 2021 09:03:48 -0700 (PDT) Received: by mail-oi1-x22a.google.com with SMTP id o6so12204963oic.9 for ; Tue, 29 Jun 2021 09:03:48 -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=22YCX1gTuHxij8jBkd6zakC86sS35hKmpf8kUxvjUtA=; b=uNeO5HQ/ALYrv8nofxfYkzdeDAGS1Xx9YbfqiTXo82HWDllL+J+AvuQpCzIVUM8K+a SKl340JpBbSYnEzjVYXgxousi3t27+S5sloXkIBnbywCuwwUDmadKGIVmFozaPq1S2zo /CQnqX/w48kCBJ4oUo15C37Nx1sSYhDwWr1YcAf0lKMLGuOwwsleJ0t15S65WSS570QZ AtgV6/DxttbW5g7DSxr/F8Mbu7uylHJ9wV0w5LtaeAHRU32gQRnHzz3uB52Ux6cXBsnq RJrfqVVqO5cRx1P2B0dT28h6QzLckbINiLl1dsuoPFfYrYS+Fm8vGnvJ3exh8T6U2qc5 ZUaQ== 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:in-reply-to; bh=22YCX1gTuHxij8jBkd6zakC86sS35hKmpf8kUxvjUtA=; b=nqI9odEVueOc93PmzO7Tp2a0mXYYgV+M+yG4Ge+kqau4fOgZb4C2ZRTmicawhb64uw yyKql1NHKAuXrPBpQ7biKJeXQmQPPX/6JeKMjv/1d6hY5KgTfc9vvElzjGlAttBqkN7m 6p62o3ielJmEhupDasNMOGnwm9jihA2+L0s+Cnu35oKmFXmxjDidAXUaZrSblNGf6HPZ NuusSOZOgfPWU8JTJ3S8BYOvLohWaynzHEjE+S9t0RjKYJL5rFUaOTqtPE2zXu/gQf05 Gqek3UEjCT+oDYoDAtnXL+AsUMWsIxP4d0mqkIi/s2npRRaZosdK1sop0uBQzXMVg4k0 XrrA== X-Gm-Message-State: AOAM533AjcErIB0MDQwEoqpJ9f9o+NCfxgTWIjv00A6vxEIO9/zvlCAj RdfzDU8PtPNZFlyb7CI+S4c0cg== X-Received: by 2002:aca:3285:: with SMTP id y127mr22031113oiy.115.1624982628172; Tue, 29 Jun 2021 09:03:48 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id y18sm3941779oiv.46.2021.06.29.09.03.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Jun 2021 09:03:47 -0700 (PDT) Date: Tue, 29 Jun 2021 11:03:45 -0500 From: Bjorn Andersson To: Phil Chang Cc: linux-remoteproc@vger.kernel.org, ohad@wizery.com, mathieu.poirier@linaro.org, matthias.bgg@gmail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, yj.chiang@mediatek.com, mark-pk.tsai@mediatek.com, weiting.tsai@mediatek.com Subject: Re: [PATCH] remoteproc: export rproc re/unregister to virtio device APIs Message-ID: References: <20210629150002.8050-1-phil.chang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210629150002.8050-1-phil.chang@mediatek.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 29 Jun 10:00 CDT 2021, Phil Chang wrote: > In some case, the remote processor already boot up on previous state, > but still need register to virtio device, so that exported those APIs. > > Signed-off-by: Phil Chang > Signed-off-by: YJ chiang > --- > Hi > > In our case, the remote processor is already boot up in u-boot, > we don't want to boot again or load fw in driver but register to virtio > device for rpmsg. so that needs those API exported. > Furthermore, the rproc_vq_interrupt is exported, so those functions > should be exported also. > Would the recently introduces support in remoteproc for "attaching" to an already running remote processor be useful to you? If you don't need a remoteproc driver, but rather just want e.g. a platform_driver that spawns the appropriate virtio devices, wouldn't virtio_mmio work? Regards, Bjorn > thanks > > drivers/remoteproc/remoteproc_virtio.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c > index 0cc617f76068..e23658a76f5e 100644 > --- a/drivers/remoteproc/remoteproc_virtio.c > +++ b/drivers/remoteproc/remoteproc_virtio.c > @@ -425,6 +425,7 @@ int rproc_add_virtio_dev(struct rproc_vdev *rvdev, int id) > out: > return ret; > } > +EXPORT_SYMBOL(rproc_add_virtio_dev); > > /** > * rproc_remove_virtio_dev() - remove an rproc-induced virtio device > @@ -440,3 +441,4 @@ int rproc_remove_virtio_dev(struct device *dev, void *data) > unregister_virtio_device(vdev); > return 0; > } > +EXPORT_SYMBOL(rproc_remove_virtio_dev); > -- > 2.18.0 >