Received: by 10.192.165.148 with SMTP id m20csp503354imm; Fri, 4 May 2018 01:25:26 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqvLWXtVEQBWfitZ2YwIPDPsGowCGlHQlCkpHqlFpccNjbtCAD9qmwAeuLnI1E65joT0SPX X-Received: by 2002:a17:902:2f:: with SMTP id 44-v6mr27481825pla.187.1525422326461; Fri, 04 May 2018 01:25:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525422326; cv=none; d=google.com; s=arc-20160816; b=A8S5GotDp/abhfgDDCBIlS8ShQWvHAG/P3/Fpj/AapOHtKJqP17rnANDWEFFaOjHVA FUGamM9u4tPQvdKrEnX8QnCSl++P47VaxyK+9kT9yyQZ5TI5j8x0l5X3na42Yu0+Hdio uMSVNW8XWekNKkAhc7cRO5Mib2LB2KG88a4xLsgFMP+BNBEZUkPi+/qLKuO55ElhDS6i aBWCfWdKC5QMOjx6Q1JALYh5ObMordJcIwZ3ybfw6GN+iEBpqv9poxkDqQWLD8nV3bJe Slu5mzWcAYD8CjDT89zCf8xDGE5r/oYW3E5fwC25JqYONHh1Z1eQUvFKFrUt6guBkIDT UGcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=OyKJLr+kOfs3EYteNku65oVbKNb42VH8zsYCQGGKqgk=; b=bQDQnEs8y7CkqJ5NsFbkBobLwzyAPCIoT7JY6LFgCPL0Bj0Cg+6mFLrBq2otluCPIP YaA2UDqE2C8mnekAZfnm8rbu+mysPppMmbNaJIK+kY/ZraR277lmerkZAGAqYTbbzLml 4HttS1csipxMthhDx0qWuTqjo7d0XWMW9lo0kWdfEC/B0FGOPBONWZlpZm9rR1KEiRdP 7/KcgFe3pOmjZZb67m/JEXPjXUhxlUDlzJ2jt+a5v1qsqg/yed4G1y576+7nZqqzzJJP TosHQXKAFz0hTbLzj2XpmCgMG4JLWNnx/1ll8fPOOh8Z3lGZVRMrMuRvWObvMpJshPvc xhFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IsTmGZup; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k4-v6si12539229pgq.683.2018.05.04.01.25.12; Fri, 04 May 2018 01:25:26 -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=@linaro.org header.s=google header.b=IsTmGZup; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751881AbeEDIYW (ORCPT + 99 others); Fri, 4 May 2018 04:24:22 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:37174 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751853AbeEDIYT (ORCPT ); Fri, 4 May 2018 04:24:19 -0400 Received: by mail-wm0-f68.google.com with SMTP id l1-v6so3180040wmb.2 for ; Fri, 04 May 2018 01:24:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OyKJLr+kOfs3EYteNku65oVbKNb42VH8zsYCQGGKqgk=; b=IsTmGZupjSEDYyhHcemjBfm7XolBvD92VGQJEaNk5GchWNfuxkpRJEAWES51Lw1sVl PrzLmpodBDCknhHUfKwmPrrScdK+v8fDoR4qgcYp1VJ5IfiDtBjGAus0cQfcOJ1o53nJ S9og5z82vkxCZkUtxmQSdtZ+tnKl/pUtZh7ZE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OyKJLr+kOfs3EYteNku65oVbKNb42VH8zsYCQGGKqgk=; b=pPaJ/4spFSiZVrqa+a8uGmQ7/VySRsssxYSHbHSkcbOzQ4ZfDa7pRlenPD5ynrfpr7 E06RkTZeypswPXrIZeCKmIOtFIJ0ye9y5n1I94oYJDZRjqE13I/hrGGYPCkxqXz8piHH +ms92U1dkkCeUZqCXBuW1jzHk/MwAV+j0//scZf4k7mRMnEHX8oGNxxRDkQ+JkIzCdsv wHneRUa4vBe/EIu3rDsoQAX0TFMUyKEqte07wNGGGYZCn1fIFsvPX/4b+y+dnnUoGRdT 4pNaCbdjc4OCzo01ZkxmNWl7xDITK3YpHdk2PKQNwBFTkJqe452Slmaq/oKtJqLf7TFD xjFA== X-Gm-Message-State: ALQs6tCrdnL0sxId72geljWrdgG2S96vxqg9TSiEP9LU4tajAt6jUX4q 1ZSqpFT64Qc0hJXR74cvOMX9vnXy5KQ= X-Received: by 10.28.218.80 with SMTP id r77mr15597742wmg.105.1525422258317; Fri, 04 May 2018 01:24:18 -0700 (PDT) Received: from [192.168.0.18] (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.googlemail.com with ESMTPSA id 123sm1533961wmt.19.2018.05.04.01.24.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 May 2018 01:24:17 -0700 (PDT) Subject: Re: [alsa-devel] [PATCH v7 16/24] ASoC: qdsp6: q6asm: Add support to audio stream apis To: Rohit Kumar , 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: Srinivas Kandagatla Message-ID: <196824c5-2b0c-1f1b-edd9-0ba6e82ac0f7@linaro.org> Date: Fri, 4 May 2018 09:24:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks Rohit for testing this! On 04/05/18 08:11, Rohit Kumar wrote: > > > 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 Yes, these should be a GFP_ATOMIC, Will fix this up in next version. thanks, srini >> + 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 >