All of lore.kernel.org
 help / color / mirror / Atom feed
From: Loic PALLARDY <loic.pallardy@st.com>
To: Wendy Liang <sunnyliangjy@gmail.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Ohad Ben-Cohen <ohad@wizery.com>,
	"lee.jones@linaro.org" <lee.jones@linaro.org>,
	"Patrice CHOTARD  <patrice.chotard@st.com>,
	linux-remoteproc@vger.kernel.org"
	<linux-remoteproc@vger.kernel.org>,
	"kernel@stlinux.com" <kernel@stlinux.com>
Subject: RE: [PATCH v1 3/6] include: virtio_rpmsg: add virtio rpmsg configuration structure
Date: Wed, 14 Dec 2016 11:24:19 +0000	[thread overview]
Message-ID: <2c642ba7b9be4cb69a17075f0004306d@SFHDAG6NODE1.st.com> (raw)
In-Reply-To: <CAA07jV9+Tq_WO=ER05qY0uM+8v+dChBGZXn+j_vtc1vR7yHt9g@mail.gmail.com>



> -----Original Message-----
> From: Wendy Liang [mailto:sunnyliangjy@gmail.com]
> Sent: Thursday, December 08, 2016 11:00 PM
> To: Loic PALLARDY <loic.pallardy@st.com>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>; Ohad Ben-Cohen
> <ohad@wizery.com>; lee.jones@linaro.org; Patrice CHOTARD
> <patrice.chotard@st.com>; linux-remoteproc@vger.kernel.org;
> kernel@stlinux.com
> Subject: Re: [PATCH v1 3/6] include: virtio_rpmsg: add virtio rpmsg
> configuration structure
> 
> HI Loic,
> 
Hi Wendy,

> As this introduce a new virtio config. How about to add a new header file for
> virtio_rpmsg in the include/uapi/linux directory just like other virtio device
> driver, such as virtio_blk?

I put this new file in include/linux/rpmsg directory for two reasons (from my pov):
- because there is no API/struct shared with user space (only a struct shared between drivers)
- because virtio_rpmsg.c driver is in drivers/rpmsg directory and not in virtio tree. Goal was to be coherent with c file.

Bjorn, what's your view on this point?

Regards,
Loic
> 
> Thanks,
> Wendy
> 
> On Wed, Dec 7, 2016 at 12:35 PM, Loic Pallardy <loic.pallardy@st.com> wrote:
> > Rpmsg channel configuration should be identical on host and
> > coprocessor side.
> > This patch proposes a new structure named struct virtio_rpmsg_cfg to
> > gather all configuration information to characterize the communication
> > link and.
> > This structure will be exchanged with coprocessor via the resource
> > table, expanding struct fw_rsc_vdev. It will guarantee that host and
> > coprocessor will share the same information.
> > virtio_rpmsg will access it thanks to virtio get and set features.
> > Presence of struct virtio_rpmsg_cfg is optional.
> >
> > Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
> > ---
> >  include/linux/rpmsg/virtio_rpmsg.h | 32
> > ++++++++++++++++++++++++++++++++
> >  1 file changed, 32 insertions(+)
> >  create mode 100644 include/linux/rpmsg/virtio_rpmsg.h
> >
> > diff --git a/include/linux/rpmsg/virtio_rpmsg.h
> > b/include/linux/rpmsg/virtio_rpmsg.h
> > new file mode 100644
> > index 0000000..5f3f0d0
> > --- /dev/null
> > +++ b/include/linux/rpmsg/virtio_rpmsg.h
> > @@ -0,0 +1,32 @@
> > +
> > +#ifndef _LINUX_VIRTIO_RPMSG_H
> > +#define _LINUX_VIRTIO_RPMSG_H
> > +
> > +/* Offset in struct fw_rsc_vdev */
> > +#define RPMSG_CONFIG_OFFSET    0
> > +
> > +/**
> > + * struct virtio_rpmsg_cfg - optional configuration field for virtio
> > +rpmsg
> > + * provided at probe time by virtio (get/set)
> > + * @id: virtio cfg id (as in virtio_ids.h)
> > + * @version: virtio_rpmsg_cfg structure version number
> > + * @va: virtual address (used when buffer allocated by low level
> > +driver)
> > + * @da: device address
> > + * @pa: physical address
> > + * @len: length (in bytes)
> > + * @buf_size: size of rpmsg buffer size (defined by firmware else default
> value
> > + *           used)
> > + * @reserved: reserved (must be zero)  */ struct virtio_rpmsg_cfg {
> > +       u32 id;
> > +       u32 version;
> > +       u64 va;
> > +       u32 da;
> > +       u32 pa;
> > +       u32 len;
> > +       u32 buf_size;
> > +       u32 reserved;
> > +} __packed;
> > +
> > +#endif
> > --
> > 1.9.1
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe
> > linux-remoteproc" in the body of a message to
> > majordomo@vger.kernel.org More majordomo info at
> > http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-12-14 11:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-07 20:35 [PATCH v1 0/6] rtio_rpmsg: make rpmsg channel configurable Loic Pallardy
2016-12-07 20:35 ` [PATCH v1 1/6] rpmsg: virtio_rpmsg: set rpmsg_buf_size customizable Loic Pallardy
2017-01-14  1:39   ` Suman Anna
2017-01-14 19:23     ` Loic PALLARDY
2016-12-07 20:35 ` [PATCH v1 2/6] rpmsg: virtio_rpmsg_bus: fix sg_set_buf() when addr is not a valid kernel address Loic Pallardy
2017-01-14  1:44   ` Suman Anna
2016-12-07 20:35 ` [PATCH v1 3/6] include: virtio_rpmsg: add virtio rpmsg configuration structure Loic Pallardy
2016-12-08 21:59   ` Wendy Liang
2016-12-14 11:24     ` Loic PALLARDY [this message]
2016-12-07 20:35 ` [PATCH v1 4/6] rpmsg: virtio_rpmsg: get buffer configuration from virtio Loic Pallardy
2017-01-14  2:26   ` Suman Anna
2017-01-14 19:30     ` Loic PALLARDY
2016-12-07 20:35 ` [PATCH v1 5/6] rpmsg: virtio_rpmsg: don't allocate buffer if provided by low level driver Loic Pallardy
2017-01-14  2:37   ` Suman Anna
2017-01-14 19:26     ` Loic PALLARDY
2016-12-07 20:35 ` [PATCH v1 6/6] rpmsg: virtio_rpmsg: set buffer configuration to virtio Loic Pallardy
2017-01-14  2:41   ` Suman Anna
2017-01-14 19:36     ` Loic PALLARDY
2017-01-16 15:59       ` Suman Anna
2017-01-13 13:25 ` [PATCH v1 0/6] rtio_rpmsg: make rpmsg channel configurable loic pallardy
2017-01-14  1:36   ` Suman Anna
2017-01-14 19:20     ` Loic PALLARDY
2017-01-16 16:02       ` Suman Anna
2017-02-08 16:35         ` Loic PALLARDY

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c642ba7b9be4cb69a17075f0004306d@SFHDAG6NODE1.st.com \
    --to=loic.pallardy@st.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=kernel@stlinux.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=sunnyliangjy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.