Received: by 10.192.165.148 with SMTP id m20csp446070imm; Fri, 4 May 2018 00:12:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq6ug9FGrzmomRJYZzbEl4kl1YjQg6X0hE8MGLVBEjwmmnp17GlFo6IOtheTqTrExHLHUaX X-Received: by 2002:a63:9854:: with SMTP id l20-v6mr21052754pgo.16.1525417968802; Fri, 04 May 2018 00:12:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525417968; cv=none; d=google.com; s=arc-20160816; b=euPHTyNDZIxdDtdJWoj7PwVU4PW193JV1Cm48ykSqC9780od7CG/djZGzROfQc0TY0 5SaoaAmjLK2xZ5g0QbtCalHeRogduO3M5o6PqZ/bl5MqNd0VlAKgItY3A+Zm8Y8DA1Pe sEqhOjgCLNmEoQm1nKNF6fTBzh0PanJH1OEaICGo++FEb09h35GsTvQVKXqy8kJc6WHB SrElkOjzH/mdRHlz+3oDip+PBRPAfJC+guNlQC+oa1/qCbJQtnLIrHEmxknx2vRDL6CE nAXDZQd+X/T9l2FCNEQWj8QAf9BgIC0iSz7uzoMgrQHGxm4ywq1clotbV0T7xDmJhVPh RldQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=9867Z6L1/uUGY7VmpBnqdh3CA1Zo9dms85GO1ooW5MU=; b=zE0s+kmNZxNxenb1Pg/SA2PSEPxdgml5+ftk1NHidWMHjM20prX4nQ1hrGfaIXnk4P BwMhpUQdz8wz6+KDviI8VeXDZwYGIgQHn/cvxE6DPAUA67WwN5cjKEtSFrmpfQQezYec oUruUCQ9azwDd7GD+qrPc46YHK6ep8hFPK6Bc/lWyvbozaCNPnvmkWpTo68Z7ZdQafT9 Fn8Jkv0chxxzw5AfMq4orNKYka7g1ak43VAaMJz7nrMF8ASQbcyQtU4T0UYwpo+bxqHt epO94CoSO6GtQbMDiEa+OvtLGrXIxjVvG129jyljKcurSxlInqiDJmfqTy/iWA0aotYn tVzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=BgBPjxkZ; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZghoulE3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a2-v6si12400949pgq.278.2018.05.04.00.12.34; Fri, 04 May 2018 00:12:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=BgBPjxkZ; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZghoulE3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751415AbeEDHMS (ORCPT + 99 others); Fri, 4 May 2018 03:12:18 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:53182 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751059AbeEDHMQ (ORCPT ); Fri, 4 May 2018 03:12:16 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 1B50860AD4; Fri, 4 May 2018 07:12:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525417936; bh=GaqJsJWaBlnB2vI0hKkn7OHFCBtoH1w4UQvR9/daiGg=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=BgBPjxkZOmFRIJenA03aN+spLEki8QAtbvtEAjJt0yYeUdCLlQ5ikiyVC0+r973tX /SFEMFYF0htCVBrQyWNNQftaAP1w+UO5djezLFd7S5YrTRL4PnyrccToBre3gbB5N7 jqehpD9tX8DBj0GjqgyYgEebZZO0uPLrzFxky3Qk= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.204.110.100] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rohitkr@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id DDC9A607A2; Fri, 4 May 2018 07:12:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525417935; bh=GaqJsJWaBlnB2vI0hKkn7OHFCBtoH1w4UQvR9/daiGg=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ZghoulE3xSvfMmbLYIfNVT1bEy3nVFVTsya7f12e0LSM3XPpOpXG6pMpdZGL7NC0x 8OCnUE8qA4DYOQRe55YhOfPgf9/x1QpR1msGckU4eHFK+k7o+xtAiXDoV0WFvwwfIy 77RNwS6jzr6x0mI+0oFe/dPFr10ELx/BsUmfAWyY= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org DDC9A607A2 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=rohitkr@codeaurora.org Subject: Re: [alsa-devel] [PATCH v7 16/24] ASoC: qdsp6: q6asm: Add support to audio stream apis To: Srinivas Kandagatla , andy.gross@linaro.org, broonie@kernel.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, robh+dt@kernel.org, bgoswami@codeaurora.org Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, rohkumar@qti.qualcomm.com, gregkh@linuxfoundation.org, plai@codeaurora.org, tiwai@suse.com, lgirdwood@gmail.com, david.brown@linaro.org, linux-arm-kernel@lists.infradead.org, spatakok@qti.qualcomm.com, linux-kernel@vger.kernel.org References: <20180501120820.11016-1-srinivas.kandagatla@linaro.org> <20180501120820.11016-17-srinivas.kandagatla@linaro.org> From: Rohit Kumar Message-ID: Date: Fri, 4 May 2018 12:41:56 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180501120820.11016-17-srinivas.kandagatla@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/1/2018 5:38 PM, Srinivas Kandagatla wrote: > +static int __q6asm_run(struct audio_client *ac, uint32_t flags, > + uint32_t msw_ts, uint32_t lsw_ts, bool wait) > +{ > + struct asm_session_cmd_run_v2 *run; > + struct apr_pkt *pkt; > + int pkt_size, rc; > + void *p; > + > + pkt_size = APR_HDR_SIZE + sizeof(*run); > + p = kzalloc(pkt_size, GFP_KERNEL); Should be GFP_ATOMIC as this API is also called from interrupt context > + if (!p) > + return -ENOMEM; > + [..] > +int q6asm_read(struct audio_client *ac) > +{ > + struct asm_data_cmd_read_v2 *read; > + struct audio_port_data *port; > + struct audio_buffer *ab; > + struct apr_pkt *pkt; > + int pkt_size; > + int rc = 0; > + void *p; > + > + if (!(ac->io_mode & ASM_SYNC_IO_MODE)) > + return 0; > + > + pkt_size = APR_HDR_SIZE + sizeof(*read); > + p = kzalloc(pkt_size, GFP_KERNEL); same here. GFP_ATOMIC > + if (!p) > + return -ENOMEM; [..] > +int q6asm_write_async(struct audio_client *ac, uint32_t len, uint32_t msw_ts, > + uint32_t lsw_ts, uint32_t flags) > +{ > + struct asm_data_cmd_write_v2 *write; > + struct audio_port_data *port; > + struct audio_buffer *ab; > + struct apr_pkt *pkt; > + int pkt_size; > + int rc = 0; > + void *p; > + > + pkt_size = APR_HDR_SIZE + sizeof(*write); > + p = kzalloc(pkt_size, GFP_KERNEL); GFP_ATOMIC > + if (!p) > + return -ENOMEM; > Thanks, Rohit -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.