mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vinod <vkoul@kernel.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: gregkh@linuxfoundation.org, broonie@kernel.org,
	sdharia@quicinc.com, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org,
	ctatlor97@gmail.com
Subject: Re: [PATCH 1/2] slimbus: stream: add stream support
Date: Mon, 25 Jun 2018 21:51:56 +0530	[thread overview]
Message-ID: <20180625162156.GC2404@vkoul-mobl> (raw)
In-Reply-To: <a922d359-2096-48ed-c442-affc5b0c4ccf@linaro.org>

On 25-06-18, 11:11, Srinivas Kandagatla wrote:

> > > +struct slim_stream_runtime *slim_stream_allocate(struct slim_device *dev,
> > > +						 const char *name)
> > > +{
> > > +	struct slim_stream_runtime *rt;
> > > +	unsigned long flags;
> > > +
> > > +	rt = kzalloc(sizeof(*rt), GFP_KERNEL);
> > > +	if (!rt)
> > > +		return ERR_PTR(-ENOMEM);
> > > +
> > > +	rt->name = kasprintf(GFP_KERNEL, "slim-%s", name);
> > > +	if (!rt->name) {
> > > +		kfree(rt);
> > > +		return ERR_PTR(-ENOMEM);
> > > +	}
> > > +
> > > +	rt->dev = dev;
> > > +	rt->state = SLIM_STREAM_STATE_ALLOCATED;
> > > +	spin_lock_irqsave(&dev->stream_list_lock, flags);
> > > +	list_add_tail(&rt->node, &dev->stream_list);
> > > +	spin_unlock_irqrestore(&dev->stream_list_lock, flags);
> > 
> > Any reason for _irqsave variant? Do you expect stream APIs to be called
> > from ISR?We can move to non irqsave variant here, as i do not see a case
> > where
> this list would be interrupted from irq context.

That's interesting can you please describe how?
Also, won't it be modified from bottom half...

> > > +/*
> > > + * slim_stream_enable() - Enable a prepared SLIMbus Stream
> > 
> > Do you want to check if it is already prepared ..?
> Yep, I think most of the code needs similar state machine check, I will add
> this in next version.

so if you are tying to snd stream states then I don't think you need a
state machine here. ALSA already does that for you so you can skip it :D

-- 
~Vinod

  reply	other threads:[~2018-06-25 16:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21 13:40 [PATCH 0/2] slimbus: Add Stream Support Srinivas Kandagatla
2018-06-21 13:40 ` [PATCH 1/2] slimbus: stream: add stream support Srinivas Kandagatla
2018-06-22 12:50   ` Vinod
2018-06-25 10:11     ` Srinivas Kandagatla
2018-06-25 16:21       ` Vinod [this message]
2018-06-25 16:30         ` Srinivas Kandagatla
2018-06-25 16:12   ` Stephen Boyd
2018-06-25 16:15     ` Srinivas Kandagatla
2018-06-21 13:40 ` [PATCH 2/2] slimbus: ngd: " Srinivas Kandagatla
2018-06-25  4:43   ` Vinod
2018-06-25 10:11     ` Srinivas Kandagatla

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=20180625162156.GC2404@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ctatlor97@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sdharia@quicinc.com \
    --cc=srinivas.kandagatla@linaro.org \
    /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

all inboxes | Powered by JetHome®