From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D025E38E5FF; Thu, 2 Jul 2026 06:46:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782974783; cv=none; b=mmxSgKQ7c4/UDTUY/LAoPXkeMoxaa6FzbC9NFIUGefxHiXKYdRDnQ657U1QNXB6ztHcyQPnN2Cj9l+de0BMSq5VA0vgXQHMnIBZLdnVXmLqRolvv6Tzwq3N7U8rNuTwnnN3ptdG9jtHxCdFzuyCUKe1dZbIKBeD+q81759YkMgo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782974783; c=relaxed/simple; bh=Ksx5JsEelRXaz7v2nCwiUP0K/C234Y0sMeDvSbokESw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=BO4axZ3ZnhFiuUVKKTh+/gGjG6oVlVCv4bJOt6ap1JIgnRbsKn3gERILFc3/SPFAeQ4ynAUThH5g50me+X+43lD+CAcI4KCrNYJ86FQiPp2bVkTOiBspvM+MhdCBcRp1BjLEjvbGW82ezZK7fd2AdA98ebor4vpUKhQgefVh70I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RJ3h/KPe; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RJ3h/KPe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 856DE1F000E9; Thu, 2 Jul 2026 06:46:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782974782; bh=AD8tasXyN/lhxwoWmvOAqfCV0TTermi5k/ZYYd4C0Og=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=RJ3h/KPe9Ckf3zjaojadowu7ZZWn7KYNjLvHZePNlZZxzQdxndvZJLHX7PcH6vK9D k5mL8KaqFhKqGxlzUMbmqj1fELpv3HAiUoVShP5BubHrtyLGYd2HI7CrQJgz1Vz7Y0 SSxrBaBFrhdrno6avLqnaUOPSieiFaUl1oAVdoF6FRT4q3bCZSYpUQzuUJt7PaYRGT JkxlFXAOco5A6ahqlUVC0ZmzbgqAHm5ldIaP//sUjxzepiKKhI7BgvCj8ItO/m60xj JoYLPA74Ne4aBudLHUwp7qbQ4EeEApqi45kcYmysn3d+km9NpiIq8FiOSwjFiV+MCZ hO+Zlgs5TrqUg== Message-ID: <51bad771-aa21-4394-8243-2fa7f275cb36@kernel.org> Date: Thu, 2 Jul 2026 07:46:08 +0100 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 3/4] misc: fastrpc: Allocate entire reserved memory for Audio PD in probe To: Ekansh Gupta , Srinivas Kandagatla , Jianping Li , Amol Maheshwari Cc: Arnd Bergmann , Greg Kroah-Hartman , Abel Vesa , Jorge Ramirez-Ortiz , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, quic_chennak@quicinc.com, stable@kernel.org References: <20260609025938.457-1-jianping.li@oss.qualcomm.com> <20260609025938.457-4-jianping.li@oss.qualcomm.com> Content-Language: en-US From: Srinivas Kandagatla In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 7/2/26 5:02 AM, Ekansh Gupta wrote: >>> @@ -1409,8 +1395,17 @@ static int fastrpc_init_create_static_process(struct fastrpc_user *fl, >>> args[1].length = inbuf.namelen; >>> args[1].fd = -1; >>> >>> - pages[0].addr = fl->cctx->remote_heap->dma_addr; >>> - pages[0].size = fl->cctx->remote_heap->size; >>> + spin_lock_irqsave(&cctx->lock, flags); >>> + if (!cctx->audio_init_mem) { >>> + pages[0].addr = cctx->remote_heap->dma_addr; >>> + pages[0].size = cctx->remote_heap->size; >>> + cctx->audio_init_mem = true; >>> + inbuf.pageslen = 1; >>> + } else { >>> + pages[0].addr = 0; >>> + pages[0].size = 0; >> What is the expected behavoiur in this case? > Audio daemon is expected to take the memory information to DSP audio PD > only the first time it goes and attaches there. > > This is the case where daemon was killed but audio PD session is still > running. In such cases, daemon is not expected to take any memory > information to audio PD as the earlier shared information is already > there with audio PD which it is using irrespective of daemon state.> Wow, this behavior is not documented or pl consider adding a comment here, Can we not query the dsp before creating new audiopd service? Does it make sense to attach instead of creating? --srini >>> + } >>> + spin_unlock_irqrestore(&cctx->lock, flags); >>> >>> args[2].ptr = (u64)(uintptr_t) pages; >>> args[2].length = sizeof(*pages);