All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remoteproc: export rproc re/unregister to virtio device APIs
@ 2021-06-29 15:00 ` Phil Chang
  0 siblings, 0 replies; 6+ messages in thread
From: Phil Chang @ 2021-06-29 15:00 UTC (permalink / raw)
  To: linux-remoteproc
  Cc: ohad, bjorn.andersson, mathieu.poirier, matthias.bgg,
	linux-kernel, linux-arm-kernel, linux-mediatek, yj.chiang,
	mark-pk.tsai, weiting.tsai, Phil Chang

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 <phil.chang@mediatek.com>
Signed-off-by: YJ chiang <yj.chiang@mediatek.com>
---
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.

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] remoteproc: export rproc re/unregister to virtio device APIs
@ 2021-06-29 15:00 ` Phil Chang
  0 siblings, 0 replies; 6+ messages in thread
From: Phil Chang @ 2021-06-29 15:00 UTC (permalink / raw)
  To: linux-remoteproc
  Cc: ohad, bjorn.andersson, mathieu.poirier, matthias.bgg,
	linux-kernel, linux-arm-kernel, linux-mediatek, yj.chiang,
	mark-pk.tsai, weiting.tsai, Phil Chang

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 <phil.chang@mediatek.com>
Signed-off-by: YJ chiang <yj.chiang@mediatek.com>
---
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.

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
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] remoteproc: export rproc re/unregister to virtio device APIs
@ 2021-06-29 15:00 ` Phil Chang
  0 siblings, 0 replies; 6+ messages in thread
From: Phil Chang @ 2021-06-29 15:00 UTC (permalink / raw)
  To: linux-remoteproc
  Cc: ohad, bjorn.andersson, mathieu.poirier, matthias.bgg,
	linux-kernel, linux-arm-kernel, linux-mediatek, yj.chiang,
	mark-pk.tsai, weiting.tsai, Phil Chang

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 <phil.chang@mediatek.com>
Signed-off-by: YJ chiang <yj.chiang@mediatek.com>
---
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.

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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] remoteproc: export rproc re/unregister to virtio device APIs
  2021-06-29 15:00 ` Phil Chang
  (?)
@ 2021-06-29 16:03   ` Bjorn Andersson
  -1 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2021-06-29 16:03 UTC (permalink / raw)
  To: Phil Chang
  Cc: linux-remoteproc, ohad, mathieu.poirier, matthias.bgg,
	linux-kernel, linux-arm-kernel, linux-mediatek, yj.chiang,
	mark-pk.tsai, weiting.tsai

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 <phil.chang@mediatek.com>
> Signed-off-by: YJ chiang <yj.chiang@mediatek.com>
> ---
> 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
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] remoteproc: export rproc re/unregister to virtio device APIs
@ 2021-06-29 16:03   ` Bjorn Andersson
  0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2021-06-29 16:03 UTC (permalink / raw)
  To: Phil Chang
  Cc: linux-remoteproc, ohad, mathieu.poirier, matthias.bgg,
	linux-kernel, linux-arm-kernel, linux-mediatek, yj.chiang,
	mark-pk.tsai, weiting.tsai

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 <phil.chang@mediatek.com>
> Signed-off-by: YJ chiang <yj.chiang@mediatek.com>
> ---
> 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
> 

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] remoteproc: export rproc re/unregister to virtio device APIs
@ 2021-06-29 16:03   ` Bjorn Andersson
  0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2021-06-29 16:03 UTC (permalink / raw)
  To: Phil Chang
  Cc: linux-remoteproc, ohad, mathieu.poirier, matthias.bgg,
	linux-kernel, linux-arm-kernel, linux-mediatek, yj.chiang,
	mark-pk.tsai, weiting.tsai

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 <phil.chang@mediatek.com>
> Signed-off-by: YJ chiang <yj.chiang@mediatek.com>
> ---
> 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
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-29 16:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 15:00 [PATCH] remoteproc: export rproc re/unregister to virtio device APIs Phil Chang
2021-06-29 15:00 ` Phil Chang
2021-06-29 15:00 ` Phil Chang
2021-06-29 16:03 ` Bjorn Andersson
2021-06-29 16:03   ` Bjorn Andersson
2021-06-29 16:03   ` Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.