Re: [PATCH 2/2] remoteproc: Add support for host virtio rings (vringh)

2013-04-05 Thread Sjur Brændeland
Hi Ohad, On Fri, Mar 15, 2013 at 10:29 AM, Erwan Yvin wrote: > From: Erwan Yvin > > Implement the vringh callback functions in order > to manage host virtio rings and handle kicks. > This allows virtio device to request host-virtio-rings. > > Signed-off-by: Erwan Yvin Any chance that you

Re: [PATCH 2/2] remoteproc: Add support for host virtio rings (vringh)

2013-04-05 Thread Sjur Brændeland
Hi Ohad, On Fri, Mar 15, 2013 at 10:29 AM, Erwan Yvin erwan.y...@stericsson.com wrote: From: Erwan Yvin erwan.y...@stericsson.com Implement the vringh callback functions in order to manage host virtio rings and handle kicks. This allows virtio device to request host-virtio-rings.

Re: [PATCH] CAIF: fix indentation for function arguments

2013-03-06 Thread Sjur Brændeland
even noticed by checkpatch --strict, but it does improve the style... Acked-by: Sjur Brændeland -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH] CAIF: fix indentation for function arguments

2013-03-06 Thread Sjur Brændeland
There is quite a bit of churn for stuff not even noticed by checkpatch --strict, but it does improve the style... Acked-by: Sjur Brændeland sjur.brandel...@stericsson.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

Re: [PATCHv2 vringh 1/3] remoteproc: Add support for vringh (Host vrings)

2013-02-21 Thread Sjur Brændeland
Hi Ohad, On Thu, Feb 21, 2013 at 6:55 PM, Ohad Ben-Cohen wrote: > On Thu, Feb 21, 2013 at 7:28 PM, Sjur Brændeland wrote: >> The motivation for using vringh was to avoid copying buffers >> when sending data from the modem to the host. > > I may be missing something here

Re: [PATCHv2 vringh 1/3] remoteproc: Add support for vringh (Host vrings)

2013-02-21 Thread Sjur Brændeland
Hi Ohad, > I was wondering - can you please explain your motivation for using > vringh in caif ? > > We have internally discussed supporting multiple remote processors > talking to each other using rpmsg, and in that scenario using vringh > can considerably simplifies the solution (no need to

Re: [PATCH 9/9] remoteproc: Always perserve resource table data

2013-02-21 Thread Sjur Brændeland
Hi Ido, On Wed, Feb 20, 2013 at 11:46 AM, Ido Yariv wrote: > Hi Sjur, > > On Sun, Feb 10, 2013 at 12:39:12PM +0100, sjur.brandel...@stericsson.com > wrote: >> From: Sjur Brændeland >> >> Copy resource table from first to second firmware loading. >> After

Re: [PATCH 9/9] remoteproc: Always perserve resource table data

2013-02-21 Thread Sjur Brændeland
Hi Ido, On Wed, Feb 20, 2013 at 11:46 AM, Ido Yariv i...@wizery.com wrote: Hi Sjur, On Sun, Feb 10, 2013 at 12:39:12PM +0100, sjur.brandel...@stericsson.com wrote: From: Sjur Brændeland sjur.brandel...@stericsson.com Copy resource table from first to second firmware loading. After

Re: [PATCHv2 vringh 1/3] remoteproc: Add support for vringh (Host vrings)

2013-02-21 Thread Sjur Brændeland
Hi Ohad, I was wondering - can you please explain your motivation for using vringh in caif ? We have internally discussed supporting multiple remote processors talking to each other using rpmsg, and in that scenario using vringh can considerably simplifies the solution (no need to decide in

Re: [PATCHv2 vringh 1/3] remoteproc: Add support for vringh (Host vrings)

2013-02-21 Thread Sjur Brændeland
Hi Ohad, On Thu, Feb 21, 2013 at 6:55 PM, Ohad Ben-Cohen o...@wizery.com wrote: On Thu, Feb 21, 2013 at 7:28 PM, Sjur Brændeland sjurb...@gmail.com wrote: The motivation for using vringh was to avoid copying buffers when sending data from the modem to the host. I may be missing something

Re: [PATCHv2 vringh 1/3] remoteproc: Add support for vringh (Host vrings)

2013-02-20 Thread Sjur Brændeland
On Wed, Feb 20, 2013 at 5:05 PM, Ohad Ben-Cohen wrote: > Hi Sjur, > > On Tue, Feb 12, 2013 at 1:49 PM, wrote: >> From: Sjur Brændeland >> >> Add functions for creating, deleting and kicking host-side virtio rings. >> >> The host ring is not integrated

Re: [PATCHv2 vringh 1/3] remoteproc: Add support for vringh (Host vrings)

2013-02-20 Thread Sjur Brændeland
On Wed, Feb 20, 2013 at 5:05 PM, Ohad Ben-Cohen o...@wizery.com wrote: Hi Sjur, On Tue, Feb 12, 2013 at 1:49 PM, sjur.brandel...@stericsson.com wrote: From: Sjur Brændeland sjur.brandel...@stericsson.com Add functions for creating, deleting and kicking host-side virtio rings. The host

Re: [PATCH vringh 2/2] caif_virtio: Introduce caif over virtio

2013-02-16 Thread Sjur Brændeland
> Sjur Brændeland writes: >> How about supporting struct vringh_kiov and struct kvec as well? >> I currently get the following complaints with my V2 patch-set: >> >> drivers/net/caif/caif_virtio.c:486:2: warning: passing argument 1 of >> ‘vringh_iov_init’ from i

Re: [PATCH vringh 2/2] caif_virtio: Introduce caif over virtio

2013-02-16 Thread Sjur Brændeland
Sjur Brændeland sjurb...@gmail.com writes: How about supporting struct vringh_kiov and struct kvec as well? I currently get the following complaints with my V2 patch-set: drivers/net/caif/caif_virtio.c:486:2: warning: passing argument 1 of ‘vringh_iov_init’ from incompatible pointer type

Re: [PATCH vringh 2/2] caif_virtio: Introduce caif over virtio

2013-02-13 Thread Sjur Brændeland
Hi Rusty, On Wed, Feb 13, 2013 at 11:16 AM, Rusty Russell wrote: > Sjur BRENDELAND writes: >>> > +static inline void ctx_prep_iov(struct cfv_napi_context *ctx) >>> > +{ >>> > + if (ctx->riov.allocated) { >>> > + kfree(ctx->riov.iov); >>> > + ctx->riov.iov = NULL; >>> > +

Re: [PATCH vringh 2/2] caif_virtio: Introduce caif over virtio

2013-02-13 Thread Sjur Brændeland
Hi Rusty, On Wed, Feb 13, 2013 at 11:16 AM, Rusty Russell ru...@rustcorp.com.au wrote: Sjur BRENDELAND sjur.brandel...@stericsson.com writes: +static inline void ctx_prep_iov(struct cfv_napi_context *ctx) +{ + if (ctx-riov.allocated) { + kfree(ctx-riov.iov); +

Re: [RFCv2 00/12] Introduce host-side virtio queue and CAIF Virtio.

2013-01-11 Thread Sjur Brændeland
On Fri, Jan 11, 2013 at 7:37 AM, Rusty Russell wrote: >virtio_host: host-side implementation of virtio rings (untested!) > >Getting use of virtio rings correct is tricky, and a recent patch saw >an implementation of in-kernel rings (as separate from userspace). How do you see the in-kernel API

Re: [RFCv2 00/12] Introduce host-side virtio queue and CAIF Virtio.

2013-01-11 Thread Sjur Brændeland
On Fri, Jan 11, 2013 at 12:35 AM, Rusty Russell wrote: > Hi Sjur! > > OK, the Internet was no help here, how do you pronounce Sjur? > I'm guessing "shoor" rhyming with tour until I know better. Thank you for asking! This is pretty close yes. I usually tell people to pronounce it like

Re: [RFCv2 00/12] Introduce host-side virtio queue and CAIF Virtio.

2013-01-11 Thread Sjur Brændeland
On Fri, Jan 11, 2013 at 12:35 AM, Rusty Russell ru...@rustcorp.com.au wrote: Hi Sjur! OK, the Internet was no help here, how do you pronounce Sjur? I'm guessing shoor rhyming with tour until I know better. Thank you for asking! This is pretty close yes. I usually tell people to

Re: [RFCv2 00/12] Introduce host-side virtio queue and CAIF Virtio.

2013-01-11 Thread Sjur Brændeland
On Fri, Jan 11, 2013 at 7:37 AM, Rusty Russell ru...@rustcorp.com.au wrote: virtio_host: host-side implementation of virtio rings (untested!) Getting use of virtio rings correct is tricky, and a recent patch saw an implementation of in-kernel rings (as separate from userspace). How do you see

Re: [RFCv2 00/12] Introduce host-side virtio queue and CAIF Virtio.

2013-01-10 Thread Sjur Brændeland
Hi Rusty, On Thu, Jan 10, 2013 at 11:30 AM, Rusty Russell wrote: ... >I now have some lightly-tested code (via a userspace harness). Great - thank you for looking into this. I will start integrating this with my patches when you send out a proper patch. ... > diff --git

Re: [RFCv2 00/12] Introduce host-side virtio queue and CAIF Virtio.

2013-01-10 Thread Sjur Brændeland
Hi Rusty, On Thu, Jan 10, 2013 at 11:30 AM, Rusty Russell ru...@rustcorp.com.au wrote: ... I now have some lightly-tested code (via a userspace harness). Great - thank you for looking into this. I will start integrating this with my patches when you send out a proper patch. ... diff --git

[RFCv2 03/11] remoteproc: Set vring addresses in resource table

2012-12-14 Thread Sjur Brændeland
Set the vring addresses in the resource table so that the remote device can read the actual addresses used. Signed-off-by: Sjur Brændeland --- drivers/remoteproc/remoteproc_core.c |5 + include/linux/remoteproc.h |2 ++ 2 files changed, 7 insertions(+), 0 deletions

[RFCv2 02/11] remoteproc: Move check on firmware name to rproc_add

2012-12-14 Thread Sjur Brændeland
Verify that firmware name is defined in rproc_add. Signed-off-by: Sjur Brændeland --- drivers/remoteproc/remoteproc_core.c | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index

[RFCv2 00/10] remoteproc: Support bi-directional vdev config space

2012-12-14 Thread Sjur Brændeland
of resources is done before registering the virtio devices. - The virtio device uses resource bits, status and config space in memory shared with the device. Review comments and feedback are welcomed! Thanks, Sjur Sjur Brændeland (11): remoteproc: Code cleanup of resource parsing remoteproc

[RFCv2 08/11] remoteproc: Refactor function rproc_elf_find_rsc_table

2012-12-14 Thread Sjur Brændeland
Refatcor rproc_elf_find_rsc_table and split out the scanning for the section header named resource table. This is done to prepare for loading firmware once. Signed-off-by: Sjur Brændeland --- drivers/remoteproc/remoteproc_elf_loader.c | 83 +--- 1 files changed, 51

[RFCv2 10/11] remoteproc: Find resource table in device memory

2012-12-14 Thread Sjur Brændeland
Call rproc_get_rsctab_addr() to get the address of the resource table in shared memory. Signed-off-by: Sjur Brændeland --- drivers/remoteproc/remoteproc_core.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers

[RFCv2 11/11] remoteproc: Support virtio config space.

2012-12-14 Thread Sjur Brændeland
Support virtio configuration space and device status and feature negotiation with remote device. This virtio device can now access the resource table in shared memory. Signed-off-by: Sjur Brændeland --- drivers/remoteproc/remoteproc_core.c | 10 -- drivers/remoteproc

[RFCv2 09/11] remoteproc: Add operation to find resource table in memory

2012-12-14 Thread Sjur Brændeland
Add function find_rsc_table_va to firmware ops. This function returns the location of the resource table in shared memory after loading. Signed-off-by: Sjur Brændeland --- drivers/remoteproc/remoteproc_elf_loader.c | 16 ++- drivers/remoteproc/remoteproc_internal.h | 13

[RFCv2 07/11] remoteproc: Register virtio devices after vring allocation

2012-12-14 Thread Sjur Brændeland
Postpone the registration of virtio devices until all vritio ring resource has been allocated. This fixes the following bug: The driver's start callback is called before all vring notify ids are allocated and max_notifyid will be increased after starting the remoteproc. Signed-off-by: Sjur

[RFCv2 06/11] remoteproc: Add resource entry number to callbacks

2012-12-14 Thread Sjur Brændeland
Add information on the resource entry sequence number to the callback functions. Signed-off-by: Sjur Brændeland --- drivers/remoteproc/remoteproc_core.c | 19 +++ 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers

[RFCv2 05/11] remoteproc: Load firmware once.

2012-12-14 Thread Sjur Brændeland
are no longer located at start of device memory. But the vring address can be read from the resource table. Also Carveout must be located before the virtio rings in the resource table. Signed-off-by: Sjur Brændeland --- drivers/remoteproc/remoteproc_core.c | 111

[RFCv2 01/11] remoteproc: Code cleanup of resource parsing

2012-12-14 Thread Sjur Brændeland
Combine the almost identical functions rproc_handle_virtio_rsc and rproc_handle_boot_rsc. Signed-off-by: Sjur Brændeland --- drivers/remoteproc/remoteproc_core.c | 51 -- 1 files changed, 12 insertions(+), 39 deletions(-) diff --git a/drivers/remoteproc

[RFCv2 04/11] remoteproc: Add state RPROC_LOADED

2012-12-14 Thread Sjur Brændeland
Add state RPROC_LOADED as firmware loading and startup will be different states. Signed-off-by: Sjur Brændeland --- drivers/remoteproc/remoteproc_debugfs.c |1 + include/linux/remoteproc.h |3 ++- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers

[RFCv2 01/11] remoteproc: Code cleanup of resource parsing

2012-12-14 Thread Sjur Brændeland
Combine the almost identical functions rproc_handle_virtio_rsc and rproc_handle_boot_rsc. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- drivers/remoteproc/remoteproc_core.c | 51 -- 1 files changed, 12 insertions(+), 39 deletions(-) diff

[RFCv2 04/11] remoteproc: Add state RPROC_LOADED

2012-12-14 Thread Sjur Brændeland
Add state RPROC_LOADED as firmware loading and startup will be different states. Signed-off-by: Sjur Brændeland sjur.brandel...@steicsson.com --- drivers/remoteproc/remoteproc_debugfs.c |1 + include/linux/remoteproc.h |3 ++- 2 files changed, 3 insertions(+), 1 deletions

[RFCv2 05/11] remoteproc: Load firmware once.

2012-12-14 Thread Sjur Brændeland
are no longer located at start of device memory. But the vring address can be read from the resource table. Also Carveout must be located before the virtio rings in the resource table. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- drivers/remoteproc

[RFCv2 06/11] remoteproc: Add resource entry number to callbacks

2012-12-14 Thread Sjur Brændeland
Add information on the resource entry sequence number to the callback functions. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- drivers/remoteproc/remoteproc_core.c | 19 +++ 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/remoteproc

[RFCv2 07/11] remoteproc: Register virtio devices after vring allocation

2012-12-14 Thread Sjur Brændeland
Postpone the registration of virtio devices until all vritio ring resource has been allocated. This fixes the following bug: The driver's start callback is called before all vring notify ids are allocated and max_notifyid will be increased after starting the remoteproc. Signed-off-by: Sjur

[RFCv2 09/11] remoteproc: Add operation to find resource table in memory

2012-12-14 Thread Sjur Brændeland
Add function find_rsc_table_va to firmware ops. This function returns the location of the resource table in shared memory after loading. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- drivers/remoteproc/remoteproc_elf_loader.c | 16 ++- drivers/remoteproc

[RFCv2 11/11] remoteproc: Support virtio config space.

2012-12-14 Thread Sjur Brændeland
Support virtio configuration space and device status and feature negotiation with remote device. This virtio device can now access the resource table in shared memory. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- drivers/remoteproc/remoteproc_core.c | 10

[RFCv2 10/11] remoteproc: Find resource table in device memory

2012-12-14 Thread Sjur Brændeland
Call rproc_get_rsctab_addr() to get the address of the resource table in shared memory. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- drivers/remoteproc/remoteproc_core.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/remoteproc

[RFCv2 08/11] remoteproc: Refactor function rproc_elf_find_rsc_table

2012-12-14 Thread Sjur Brændeland
Refatcor rproc_elf_find_rsc_table and split out the scanning for the section header named resource table. This is done to prepare for loading firmware once. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- drivers/remoteproc/remoteproc_elf_loader.c | 83

[RFCv2 00/10] remoteproc: Support bi-directional vdev config space

2012-12-14 Thread Sjur Brændeland
of resources is done before registering the virtio devices. - The virtio device uses resource bits, status and config space in memory shared with the device. Review comments and feedback are welcomed! Thanks, Sjur Sjur Brændeland (11): remoteproc: Code cleanup of resource parsing remoteproc

[RFCv2 03/11] remoteproc: Set vring addresses in resource table

2012-12-14 Thread Sjur Brændeland
Set the vring addresses in the resource table so that the remote device can read the actual addresses used. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- drivers/remoteproc/remoteproc_core.c |5 + include/linux/remoteproc.h |2 ++ 2 files changed, 7

[RFCv2 02/11] remoteproc: Move check on firmware name to rproc_add

2012-12-14 Thread Sjur Brændeland
Verify that firmware name is defined in rproc_add. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- drivers/remoteproc/remoteproc_core.c | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers

[PATCHv9 2/2] virtio_console: Add support for remoteproc serial

2012-12-12 Thread Sjur Brændeland
and disables use of tty console and the virtio control queue. Signed-off-by: Sjur Brændeland Acked-by: Amit Shah --- drivers/char/virtio_console.c | 192 ++- include/uapi/linux/virtio_ids.h |1 + 2 files changed, 170 insertions(+), 23 deletions(-) diff --git

[PATCHv9 0/2] virtio_console: Add rproc_serial driver

2012-12-12 Thread Sjur Brændeland
ng. NOTE: These two patches are identical to first two patches of the V8 patch-set, but are rebased to virtio-next. Regards, Sjur Sjur Brændeland (2): virtio_console: Merge struct buffer_token into struct port_buffer virtio_console: Add support for remoteproc serial drivers/char/virti

[PATCHv9 1/2] virtio_console: Merge struct buffer_token into struct port_buffer

2012-12-12 Thread Sjur Brændeland
Refactoring the splice functionality by unifying the approach for sending scatter-lists and regular buffers. This simplifies buffer handling and reduces code size. Splice will now allocate a port_buffer and send_buf() and free_buf() can always be used for any buffer. Signed-off-by: Sjur

[PATCHv9 0/2] virtio_console: Add rproc_serial driver

2012-12-12 Thread Sjur Brændeland
are identical to first two patches of the V8 patch-set, but are rebased to virtio-next. Regards, Sjur Sjur Brændeland (2): virtio_console: Merge struct buffer_token into struct port_buffer virtio_console: Add support for remoteproc serial drivers/char/virtio_console.c | 317

[PATCHv9 1/2] virtio_console: Merge struct buffer_token into struct port_buffer

2012-12-12 Thread Sjur Brændeland
Refactoring the splice functionality by unifying the approach for sending scatter-lists and regular buffers. This simplifies buffer handling and reduces code size. Splice will now allocate a port_buffer and send_buf() and free_buf() can always be used for any buffer. Signed-off-by: Sjur

[PATCHv9 2/2] virtio_console: Add support for remoteproc serial

2012-12-12 Thread Sjur Brændeland
and disables use of tty console and the virtio control queue. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com Acked-by: Amit Shah amit.s...@redhat.com --- drivers/char/virtio_console.c | 192 ++- include/uapi/linux/virtio_ids.h |1 + 2 files changed

[PATCH] Introduce rproc serial device specification.

2012-12-10 Thread Sjur Brændeland
Signed-off-by: Sjur Brændeland --- >> Please pick the virtio spec from >> >> https://github.com/rustyrussell/virtio-spec >> >> and update the spec with info for remote-proc. > >Hi Sjur, > >I didn't hear back from you on this.. > Hi Amit Sorry f

[PATCH] Introduce rproc serial device specification.

2012-12-10 Thread Sjur Brændeland
Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- Please pick the virtio spec from https://github.com/rustyrussell/virtio-spec and update the spec with info for remote-proc. Hi Sjur, I didn't hear back from you on this.. Hi Amit Sorry for the delay. I've had this ready

Re: [RFC 1/4] remoteproc: Bugfix assign device address to carveout (noiommu)

2012-12-06 Thread Sjur Brændeland
Hi Ohad, On Sat, Aug 11, 2012 at 2:34 PM, Ohad Ben-Cohen wrote: > On Fri, Aug 10, 2012 at 6:30 PM, Ohad Ben-Cohen wrote: >> This will solve all sort of open issues we have (or going to have soon): >> ... > 1. dynamically-allocated address of the vrings can be communicated > 2. vdev statuses can

[RFC 1/5] remoteproc: Refactor function rproc_elf_find_rsc_table

2012-12-06 Thread Sjur Brændeland
Refatcor rproc_elf_find_rsc_table and split out the scanning for the section header named resource table. This is done to prepare for loading firmware once when rproc is registered. Signed-off-by: Sjur Brændeland --- drivers/remoteproc/remoteproc_elf_loader.c | 83

[RFC 4/5] remoteproc: Load firmware to device memory once.

2012-12-06 Thread Sjur Brændeland
crating virtio devices. This enables dynamically-allocated address and kick-ids of vrings to be communicated to the remote device. This also pave the way for implementing bi-directional virtio config-space and virtio feature negotiation. Signed-off-by: Sjur Brændeland --- drivers/remoteproc

[RFC 3/5] remoteproc: Add state RPROC_LOADED

2012-12-06 Thread Sjur Brændeland
Add state RPROC_LOADED. Prepare for the state when the firmware is loaded, but remote device is not started. Signed-off-by: Sjur Brændeland --- drivers/remoteproc/remoteproc_debugfs.c |1 + include/linux/remoteproc.h |3 ++- 2 files changed, 3 insertions(+), 1 deletion

[RFC 5/5] remoteproc: Support virtio config space.

2012-12-06 Thread Sjur Brændeland
Add support for bi-directional virtio configuration space, visibility of device status to remote processor and device feature-bit negotiation with remote device. Signed-off-by: Sjur Brændeland --- drivers/remoteproc/remoteproc_core.c |4 ++-- drivers/remoteproc/remoteproc_virtio.c | 30

[RFC 2/5] remoteproc: Add operation to find resource table in memory

2012-12-06 Thread Sjur Brændeland
Add function find_rsc_table_va to firmware ops. This function returns the location of the resource table in device memory after the firmware is loaded. Signed-off-by: Sjur Brændeland --- drivers/remoteproc/remoteproc_elf_loader.c | 16 ++- drivers/remoteproc/remoteproc_internal.h

[RFC 0/5] remoteproc: Support bi-directional vdev config space.

2012-12-06 Thread Sjur Brændeland
From: Sjur Brændeland This patch-set adds support for shared resource table between Linux kernel and remote devices. Features: 1. dynamically-allocated address of the vrings can be communicated 2. vdev statuses can be communicated 3. virtio config space becomes bi-directional 4. virtio feature

[RFC 0/5] remoteproc: Support bi-directional vdev config space.

2012-12-06 Thread Sjur Brændeland
From: Sjur Brændeland s...@brendeland.net This patch-set adds support for shared resource table between Linux kernel and remote devices. Features: 1. dynamically-allocated address of the vrings can be communicated 2. vdev statuses can be communicated 3. virtio config space becomes bi-directional

[RFC 2/5] remoteproc: Add operation to find resource table in memory

2012-12-06 Thread Sjur Brændeland
Add function find_rsc_table_va to firmware ops. This function returns the location of the resource table in device memory after the firmware is loaded. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- drivers/remoteproc/remoteproc_elf_loader.c | 16 ++- drivers

[RFC 5/5] remoteproc: Support virtio config space.

2012-12-06 Thread Sjur Brændeland
Add support for bi-directional virtio configuration space, visibility of device status to remote processor and device feature-bit negotiation with remote device. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- drivers/remoteproc/remoteproc_core.c |4 ++-- drivers

[RFC 3/5] remoteproc: Add state RPROC_LOADED

2012-12-06 Thread Sjur Brændeland
Add state RPROC_LOADED. Prepare for the state when the firmware is loaded, but remote device is not started. Signed-off-by: Sjur Brændeland sjur.brandel...@steicsson.com --- drivers/remoteproc/remoteproc_debugfs.c |1 + include/linux/remoteproc.h |3 ++- 2 files changed, 3

[RFC 4/5] remoteproc: Load firmware to device memory once.

2012-12-06 Thread Sjur Brændeland
crating virtio devices. This enables dynamically-allocated address and kick-ids of vrings to be communicated to the remote device. This also pave the way for implementing bi-directional virtio config-space and virtio feature negotiation. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com

[RFC 1/5] remoteproc: Refactor function rproc_elf_find_rsc_table

2012-12-06 Thread Sjur Brændeland
Refatcor rproc_elf_find_rsc_table and split out the scanning for the section header named resource table. This is done to prepare for loading firmware once when rproc is registered. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- drivers/remoteproc/remoteproc_elf_loader.c

Re: [RFC 1/4] remoteproc: Bugfix assign device address to carveout (noiommu)

2012-12-06 Thread Sjur Brændeland
Hi Ohad, On Sat, Aug 11, 2012 at 2:34 PM, Ohad Ben-Cohen o...@wizery.com wrote: On Fri, Aug 10, 2012 at 6:30 PM, Ohad Ben-Cohen o...@wizery.com wrote: This will solve all sort of open issues we have (or going to have soon): ... 1. dynamically-allocated address of the vrings can be

Re: [PATCH] virtio: Don't access index after unregister.

2012-11-08 Thread Sjur Brændeland
); > > void unregister_virtio_device(struct virtio_device *dev) > { > + int index = dev->index; /* save for after device release */ > + > device_unregister(>dev); > - ida_simple_remove(_index_ida, dev->index); > + ida_simple_remove(_i

Re: [PATCH resend] virtio_console: Free buffers from out-queue upon close

2012-11-08 Thread Sjur Brændeland
>> > Note: This patch is compile tested only. I have done the removal >> > of buffers from out-queue in handle_control_message() >> > when host has acked the close request. This seems less >> > racy than doing it in the release function. >> >> This confuses me... why are we doing this in case >>

Re: [PATCH resend] virtio_console: Free buffers from out-queue upon close

2012-11-08 Thread Sjur Brændeland
Note: This patch is compile tested only. I have done the removal of buffers from out-queue in handle_control_message() when host has acked the close request. This seems less racy than doing it in the release function. This confuses me... why are we doing this in case

Re: [PATCH] virtio: Don't access index after unregister.

2012-11-08 Thread Sjur Brændeland
; /* save for after device release */ + device_unregister(dev-dev); - ida_simple_remove(virtio_index_ida, dev-index); + ida_simple_remove(virtio_index_ida, index); } EXPORT_SYMBOL_GPL(unregister_virtio_device); Acked-by: Sjur Brændeland sjur.brandel...@stericsson.com Great

Re: [RFC virtio-next 0/4] Introduce CAIF Virtio and reversed Vrings

2012-11-05 Thread Sjur Brændeland
Hi Rusty, > So, this adds another host-side virtqueue implementation. > > Can we combine them together conveniently? You pulled out more stuff > into vring.h which is a start, but it's a bit overloaded. > Perhaps we should separate the common fields into struct vring, and use > it to build: > >

Re: [RFC virtio-next 0/4] Introduce CAIF Virtio and reversed Vrings

2012-11-05 Thread Sjur Brændeland
Hi Rusty, So, this adds another host-side virtqueue implementation. Can we combine them together conveniently? You pulled out more stuff into vring.h which is a start, but it's a bit overloaded. Perhaps we should separate the common fields into struct vring, and use it to build:

[RFC virtio-next 1/4] virtio: Move definitions to header file vring.h

2012-10-31 Thread Sjur Brændeland
From: Sjur Brændeland Move the vring_virtqueue structure, memory barrier and debug macros out from virtio_ring.c to the new header file vring.h. This is done in order to allow other kernel modules to access the virtio internal data-structures. Signed-off-by: Sjur Brændeland --- Tis patch

[RFC virtio-next 2/4] include/vring.h: Add support for reversed vritio rings.

2012-10-31 Thread Sjur Brændeland
From: Sjur Brændeland Add last avilable index to the vring_virtqueue structure, this is done to prepare for implementation of the reversed vring. Signed-off-by: Sjur Brændeland --- drivers/virtio/vring.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/virtio/vring.h b

[RFC virtio-next 4/4] caif_virtio: Add CAIF over virtio

2012-10-31 Thread Sjur Brændeland
From: Sjur Brændeland Add the CAIF Virtio Link layer, used for communicating with a modem over shared memory. Virtio is used as the transport mechanism. In the TX direction the virtio rings are used in the normal fashion, sending data in the available ring. But in the rx direction the the we

[RFC virtio-next 3/4] virtio_ring: Call callback function even when used ring is empty

2012-10-31 Thread Sjur Brændeland
From: Sjur Brændeland Enable option to force call of callback function even if used ring is empty. This is needed for reversed vring. Add a helper function __vring_interrupt and add extra boolean argument for forcing callback when interrupt is called. The original vring_interrupt semantic

[RFC virtio-next 0/4] Introduce CAIF Virtio and reversed Vrings

2012-10-31 Thread Sjur Brændeland
irtio code. There are several options on how to structure this, and feedback is welcomed. Thanks, Sjur Sjur Brændeland (4): virtio: Move definitions to header file vring.h include/vring.h: Add support for reversed vritio rings. virtio_ring: Call callback function even when used ring is empty c

[RFC virtio-next 0/4] Introduce CAIF Virtio and reversed Vrings

2012-10-31 Thread Sjur Brændeland
. There are several options on how to structure this, and feedback is welcomed. Thanks, Sjur Sjur Brændeland (4): virtio: Move definitions to header file vring.h include/vring.h: Add support for reversed vritio rings. virtio_ring: Call callback function even when used ring is empty caif_virtio

[RFC virtio-next 3/4] virtio_ring: Call callback function even when used ring is empty

2012-10-31 Thread Sjur Brændeland
From: Sjur Brændeland sjur.brandel...@stericsson.com Enable option to force call of callback function even if used ring is empty. This is needed for reversed vring. Add a helper function __vring_interrupt and add extra boolean argument for forcing callback when interrupt is called. The original

[RFC virtio-next 4/4] caif_virtio: Add CAIF over virtio

2012-10-31 Thread Sjur Brændeland
From: Sjur Brændeland sjur.brandel...@stericsson.com Add the CAIF Virtio Link layer, used for communicating with a modem over shared memory. Virtio is used as the transport mechanism. In the TX direction the virtio rings are used in the normal fashion, sending data in the available ring

[RFC virtio-next 2/4] include/vring.h: Add support for reversed vritio rings.

2012-10-31 Thread Sjur Brændeland
From: Sjur Brændeland sjur.brandel...@stericsson.com Add last avilable index to the vring_virtqueue structure, this is done to prepare for implementation of the reversed vring. Signed-off-by: Sjur Brændeland sjur.brandel...@stericsson.com --- drivers/virtio/vring.h |3 +++ 1 file changed, 3

[RFC virtio-next 1/4] virtio: Move definitions to header file vring.h

2012-10-31 Thread Sjur Brændeland
From: Sjur Brændeland sjur.brandel...@stericsson.com Move the vring_virtqueue structure, memory barrier and debug macros out from virtio_ring.c to the new header file vring.h. This is done in order to allow other kernel modules to access the virtio internal data-structures. Signed-off-by: Sjur

[PATCH v8 1/3] virtio_console: Merge struct buffer_token into struct port_buffer

2012-10-30 Thread Sjur Brændeland
From: Sjur Brændeland Refactoring the splice functionality by unifying the approach for sending scatter-lists and regular buffers. This simplifies buffer handling and reduces code size. Splice will now allocate a port_buffer and send_buf() and free_buf() can always be used for any buffer

[PATCH v8 2/3] virtio_console: Add support for remoteproc serial

2012-10-30 Thread Sjur Brændeland
From: Sjur Brændeland Add a simple serial connection driver called VIRTIO_ID_RPROC_SERIAL (11) for communicating with a remote processor in an asymmetric multi-processing configuration. This implementation reuses the existing virtio_console implementation, and adds support for DMA allocation

[PATCH v8 3/3] virtio_console: Remove buffers from out_vq at port removal

2012-10-30 Thread Sjur Brændeland
From: Sjur Brændeland Remove buffers from the out-queue when a rproc_serial device is removed. Rproc_serial communicates with remote processors that may crash and leave buffers in the out-queue. But the virtio_console device is not supposed to leave buffers in the out-queue when a port

[PATCHv8 0/3]virtio_console: Add rproc_serial driver

2012-10-30 Thread Sjur Brændeland
From: Sjur Brændeland This patch-set introduces a new virtio type "rproc_serial" for communicating with remote processors over shared memory. The driver depends on the the remoteproc framework. As preparation for introducing "rproc_serial" I've done a refactoring of the tran

[PATCHv8 0/3]virtio_console: Add rproc_serial driver

2012-10-30 Thread Sjur Brændeland
From: Sjur Brændeland sjur.brandel...@stericsson.com This patch-set introduces a new virtio type rproc_serial for communicating with remote processors over shared memory. The driver depends on the the remoteproc framework. As preparation for introducing rproc_serial I've done a refactoring

[PATCH v8 3/3] virtio_console: Remove buffers from out_vq at port removal

2012-10-30 Thread Sjur Brændeland
From: Sjur Brændeland sjur.brandel...@stericsson.com Remove buffers from the out-queue when a rproc_serial device is removed. Rproc_serial communicates with remote processors that may crash and leave buffers in the out-queue. But the virtio_console device is not supposed to leave buffers

[PATCH v8 2/3] virtio_console: Add support for remoteproc serial

2012-10-30 Thread Sjur Brændeland
From: Sjur Brændeland sjur.brandel...@stericsson.com Add a simple serial connection driver called VIRTIO_ID_RPROC_SERIAL (11) for communicating with a remote processor in an asymmetric multi-processing configuration. This implementation reuses the existing virtio_console implementation, and adds

[PATCH v8 1/3] virtio_console: Merge struct buffer_token into struct port_buffer

2012-10-30 Thread Sjur Brændeland
From: Sjur Brændeland sjur.brandel...@stericsson.com Refactoring the splice functionality by unifying the approach for sending scatter-lists and regular buffers. This simplifies buffer handling and reduces code size. Splice will now allocate a port_buffer and send_buf() and free_buf() can always

Re: [PATCHv7 4/4] virtio_console: Add support for remoteproc serial

2012-10-28 Thread Sjur Brændeland
Hi Rusty, > The free-outside-interrupt issue is usually dealt with by offloading to > a wq, but your variant works (and isn't too ugly). Ok, thanks. >> +static void reclaim_dma_bufs(void) >> +{ >> + unsigned long flags; >> + struct port_buffer *buf, *tmp; >> + LIST_HEAD(tmp_list);

Re: [PATCHv7 4/4] virtio_console: Add support for remoteproc serial

2012-10-28 Thread Sjur Brændeland
Hi Rusty, The free-outside-interrupt issue is usually dealt with by offloading to a wq, but your variant works (and isn't too ugly). Ok, thanks. +static void reclaim_dma_bufs(void) +{ + unsigned long flags; + struct port_buffer *buf, *tmp; + LIST_HEAD(tmp_list); + + if

remoteproc open issues (was [RFC 1/4] remoteproc: Bugfix assign device address to carveout (noiommu)

2012-10-19 Thread Sjur Brændeland
Hi, On Fri, Aug 10, 2012 at 5:30 PM, Ohad Ben-Cohen wrote: > The general direction I have in mind is to put the resource table in > its final location while we do the first pass of fw parsing. > > This will solve all sort of open issues we have (or going to have soon): > > 1.

remoteproc open issues (was [RFC 1/4] remoteproc: Bugfix assign device address to carveout (noiommu)

2012-10-19 Thread Sjur Brændeland
Hi, On Fri, Aug 10, 2012 at 5:30 PM, Ohad Ben-Cohen o...@wizery.com wrote: The general direction I have in mind is to put the resource table in its final location while we do the first pass of fw parsing. This will solve all sort of open issues we have (or going to have soon): 1.

Re: [PATCHv4] remoteproc: Add STE modem driver for remoteproc

2012-09-22 Thread Sjur Brændeland
t might be implicitly valid today, but may break in the >>> future). >>> >>> If you want, I can just change that before applying. >> >> Sounds good, please just go ahead and change this before applying. >> Thank you. > > I'm going to squash the below i

Re: [PATCHv4] remoteproc: Add STE modem driver for remoteproc

2012-09-22 Thread Sjur Brændeland
Hi Ohad, > Thanks, it looks good. > > It might be safer though to invoke ->setup() in probe/remove, instead > of in start/stop (just like you essentially did before). > > This way we don't assume that stop is always called before remove (as > assumption that might be implicitly valid today, but

Re: [PATCHv4] remoteproc: Add STE modem driver for remoteproc

2012-09-22 Thread Sjur Brændeland
). If you want, I can just change that before applying. Sounds good, please just go ahead and change this before applying. Thank you. I'm going to squash the below into the patch - please ack before I apply and push - thanks! Looks good, thanks. Acked-by: Sjur Brændeland sjur.brandel

Re: [PATCHv4] remoteproc: Add STE modem driver for remoteproc

2012-09-22 Thread Sjur Brændeland
Hi Ohad, Thanks, it looks good. It might be safer though to invoke -setup() in probe/remove, instead of in start/stop (just like you essentially did before). This way we don't assume that stop is always called before remove (as assumption that might be implicitly valid today, but may break

  1   2   >