The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Winkler, Tomas" <tomas.winkler@intel.com>
Cc: "Usyskin, Alexander" <alexander.usyskin@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Grumbach, Emmanuel" <emmanuel.grumbach@intel.com>
Subject: Re: [char-misc-next 6/6] mei: bus: add client dma interface
Date: Sat, 6 Feb 2021 17:30:25 +0100	[thread overview]
Message-ID: <YB7EIciZrmBrEqUA@kroah.com> (raw)
In-Reply-To: <2a9b40090acd41438fc6b1d2fb49f38d@intel.com>

On Sat, Feb 06, 2021 at 03:04:34PM +0000, Winkler, Tomas wrote:
> > On Sat, Feb 06, 2021 at 04:43:25PM +0200, Tomas Winkler wrote:
> > > From: Alexander Usyskin <alexander.usyskin@intel.com>
> > >
> > > Expose the client dma mapping via mei client bus interface.
> > >
> > > Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
> > > Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> > > ---
> > >  drivers/misc/mei/bus.c     | 46
> > ++++++++++++++++++++++++++++++++++++++
> > >  drivers/misc/mei/hw.h      |  5 +++++
> > >  include/linux/mei_cl_bus.h |  3 +++
> > >  3 files changed, 54 insertions(+)
> > >
> > > diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index
> > > 34fb5e541fe5..d430710a5fe5 100644
> > > --- a/drivers/misc/mei/bus.c
> > > +++ b/drivers/misc/mei/bus.c
> > > @@ -636,6 +636,52 @@ static void mei_cl_bus_vtag_free(struct
> > mei_cl_device *cldev)
> > >  	kfree(cl_vtag);
> > >  }
> > >
> > > +void *mei_cldev_dma_map(struct mei_cl_device *cldev, u8 buffer_id,
> > > +size_t size) {
> > > +	struct mei_device *bus;
> > > +	struct mei_cl *cl;
> > > +	int ret;
> > > +
> > > +	if (!cldev || !buffer_id || !size)
> > > +		return ERR_PTR(-EINVAL);
> > > +
> > > +	if (!IS_ALIGNED(size, MEI_FW_PAGE_SIZE)) {
> > > +		dev_err(&cldev->dev, "Map size should be aligned to %lu\n",
> > > +			MEI_FW_PAGE_SIZE);
> > > +		return ERR_PTR(-EINVAL);
> > > +	}
> > > +
> > > +	cl = cldev->cl;
> > > +	bus = cldev->bus;
> > > +
> > > +	mutex_lock(&bus->device_lock);
> > > +	ret = mei_cl_dma_alloc_and_map(cl, NULL, buffer_id, size);
> > > +	mutex_unlock(&bus->device_lock);
> > > +	if (ret)
> > > +		return ERR_PTR(ret);
> > > +	return cl->dma.vaddr;
> > > +}
> > > +EXPORT_SYMBOL_GPL(mei_cldev_dma_map);
> > 
> > Why are you exporting symbols without a user of them?
> > 
> > That's a sure way to get them removed by someone right after this lands in
> > the tree :)
> > 
> > Please only add infrastructure for when you have a real user.
> You are right,  the user is coming from wifi tree. We need merge before they do.
> If you prefer we can merge that all from the wifi tree.

That wasn't documented well at all in your changelog comment :(

It can go through whatever tree needs it.

thanks,

greg k-h

  reply	other threads:[~2021-02-06 16:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-06 14:43 [char-misc-next 1/6] mei: use sprintf in tx_queue_limit_show sysfs Tomas Winkler
2021-02-06 14:43 ` [char-misc-next 2/6] mei: allow clients on bus to communicate in remove callback Tomas Winkler
2021-02-06 14:43 ` [char-misc-next 3/6] mei: add support for client dma capability Tomas Winkler
2021-02-06 14:43 ` [char-misc-next 4/6] mei: hbm: add client dma hbm messages Tomas Winkler
2021-02-06 14:43 ` [char-misc-next 5/6] mei: implement client dma setup Tomas Winkler
2021-02-06 14:43 ` [char-misc-next 6/6] mei: bus: add client dma interface Tomas Winkler
2021-02-06 14:48   ` Greg Kroah-Hartman
2021-02-06 15:04     ` Winkler, Tomas
2021-02-06 16:30       ` Greg Kroah-Hartman [this message]
2021-02-07 14:03         ` Winkler, Tomas
2021-02-07 14:33           ` Greg Kroah-Hartman
2021-02-07 19:04             ` Grumbach, Emmanuel
2021-02-06 14:46 ` [char-misc-next 1/6] mei: use sprintf in tx_queue_limit_show sysfs Greg Kroah-Hartman
2021-02-06 14:58   ` Winkler, Tomas

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=YB7EIciZrmBrEqUA@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alexander.usyskin@intel.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomas.winkler@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox