From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Andersson Subject: Re: [PATCH] qcom: apr: Make apr callbacks in non-atomic context Date: Wed, 30 Jan 2019 17:16:49 -0800 Message-ID: <20190131011649.GA27190@builder> References: <20181115184904.27223-1-srinivas.kandagatla@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20181115184904.27223-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org To: Srinivas Kandagatla Cc: andy.gross@linaro.org, david.brown@linaro.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org, bgoswami@codeaurora.org, rohitkr@codeaurora.org List-Id: linux-arm-msm@vger.kernel.org On Thu 15 Nov 10:49 PST 2018, Srinivas Kandagatla wrote: > APR communication with DSP is not atomic in nature. > Its request-response type. Trying to pretend that these are atomic > and invoking apr client callbacks directly under atomic/irq context has > endless issues with soundcard. It makes more sense to convert these > to nonatomic calls. This also coverts all the dais to be nonatomic. > Hi Srinivas, Sorry for not looking at this before. Are you sure that you're meeting the latency requirements of low-latency audio with this change? [..] > @@ -303,6 +363,10 @@ static int apr_remove_device(struct device *dev, void *null) > > static void apr_remove(struct rpmsg_device *rpdev) > { > + struct apr *apr = dev_get_drvdata(&rpdev->dev); > + > + flush_workqueue(apr->rxwq); > + destroy_workqueue(apr->rxwq); The devices may still be communicating until you remove them on the next line, wouldn't it make more sense to destroy the work queue after removing the APR devices? > device_for_each_child(&rpdev->dev, NULL, apr_remove_device); > } Regards, Bjorn