From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 DBAC1358384 for ; Thu, 2 Jul 2026 08:44:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782981847; cv=none; b=kAb5kkT8aBnwd7vCYkthrFuHy5rYddCuQsgnsEeOb7yWI0Pkj1t2uMVExTmZGcs2fpEHcYjllgn24jy7K7F1mGPe/KneOTSX/fU+sHxpky7jYQfhqVCtpvwWLxihQO9DultoJbC9Qh+gehD0y6K6s0kF+hT1rSkQ383gFpqBZJE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782981847; c=relaxed/simple; bh=aFjPtbFaTbHr0nxBfP1HfHlfocAM+3tsSwxLphBgKi4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=g4gK8NmtLDmuxXq8kfrR301EZSfDfJwFkV7/IU030rbe/QaX7E5smXRtCE8D7IqcquFMIe4IazeC3Lw0hhSjW84HzqDo6nyNKs7OJtgzP+UW3DNXW0vziO2DII6uGyDzgfEcgENs+ker6s2Stx394yQk3lA09gvy2Wt8TkZUSEY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=WXOHK9ek; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=XvB0mfBg; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="WXOHK9ek"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="XvB0mfBg" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6628VGRa3046717 for ; Thu, 2 Jul 2026 08:44:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Iqb43rGi0YNDdCvsKO8e7oyCe1ZkrH5pxWX7o9Wo7qA=; b=WXOHK9ekTmFJgtdo V7tMlxdMTUzrpb3tlSe8uNUTBtKsC13TgM6GUuf87fmO9EgOUZGzUHvzExHX/hyq JLVgvfn8UvKOKipjsBwz+dYgvoScFgMFeYK+6pGX70l522p9V1M/frLBQjIbrnOL 6P8+9z62LtI16mSgSRAAfKQLUzgFEzapO+oUHlbU8djLBaJmi3QFJ9/p3v+qRjbh HqyqLAuXiODMNOZYNy0ZSXPRl1rPAuAAiFkswlcxLA7C9JzKx8Tyabat0MbV1QEy KlO1CMHoJ/jXATAgKaYFKBOv4cMb5Y/jv71yn6qt/5WySne3VrxC7IdyC5pnb/4e 2radxw== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f58k3amr8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 02 Jul 2026 08:44:04 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2c7f385887bso39492765ad.0 for ; Thu, 02 Jul 2026 01:44:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1782981843; x=1783586643; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Iqb43rGi0YNDdCvsKO8e7oyCe1ZkrH5pxWX7o9Wo7qA=; b=XvB0mfBgVnZGOHvHp3q6KJxOLnC0pwvyg+UsnpcKFw+BBSEy9EZWHITohuhSVHlKfW 6KUuwbZz//uFQmB7H/ZWnLhvd0LbXYqErQntILaoRWWW78CC+AjiHHrmDt4txdasKIf9 QxY5ej5PtB7QPd6dPDKj6s3Ic547LBVG36vboL4pmtDUAZiuNz4reeX3dsmTvwMyX+p1 UsKpsF5+X7qNPhAUR4PeSRErmp0bopGoddYnTI40et5QMyn9oINjE/Tp+7vQ/6l1e/ho K0gYpOt27Eu810xQqFgDJWB1qg4LwU5afamM92NIsLSfRKrlLI4Oc2jY4znmDYB/MSGm IN4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782981843; x=1783586643; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Iqb43rGi0YNDdCvsKO8e7oyCe1ZkrH5pxWX7o9Wo7qA=; b=aRMQvXl8MFtmAYolnnFiFesJ5HYOoUtN7FRn3vDnlg1o5jYsxjneGhxR0JTcnFQNHc ak7RlwaT0huhWv2ypxgq8sQfUOFW1t0PTqAtaypaDMRpTUY1SjkBq2byQdsnzvXVg+ql bt9+Hb/7+sZXz2Mxw8eB0pDxX8M43y8X8hCf9Pu6CFyVFunic7BJtaySBzUcRBe8Lc72 wyNppjIg7f+EpgUTH/+f7Gw4twr5pbQP/b40opBFUN30kUwHzVccyYhTuirAIcvx8ieM IosSs5rb1vQc/ZhIUryXM+AS9sWhx3tQO8RKgxv59Ueeef0mwPbqejriv4udH+iEPO38 snmg== X-Forwarded-Encrypted: i=1; AHgh+RqA1/xl2T8o1LPMFLXOKfmjG/PUo9wjP8pYNUpMQoWRCGF1Jng3flIn5DpVvEOIlcGiOGKj3IuEU+w+myc=@vger.kernel.org X-Gm-Message-State: AOJu0YzUDHCuZ3Eh9cVPBjxaGLOCf4pOXsC7zPKBG41qp1SKnOcSX5na rmXX92Kw6j0UO0JeUqCpIf+j6SJxDiDYKbmP4VJvdEwxsB43041XUTOWhQWLk80Wzn/lEmYD7hj 9WNtB9Xm+nvJOXN8qwuRwpDdwBbf4HQHXswo7GZwNhe6B4aHbzvHMpbKQHD0Yl105DTk= X-Gm-Gg: AfdE7cmBOBxOlynW89aZVYGSeBw/BEvFAlI8q/eRRjLBngGN5J/+ujv7gpq2Q441H0y 80rLgRIpH8RCmDDHMtJ7/NAZ0w4baiajABMC+UaFY3WQwCIKSbI7DWC+89JjxLfpWTr6axqpHig fiBp2CjblqqaRXWKoXvbmwCWSMp/S88yiTYtpNXcsJbQhScvsw2ESPR5gMGUBZrjFXQUlW8rkEf GtvXXKZo2Mh0O7PD7ncBVYEZXM2ZnKAZzXbVyCI70sKmHylcGZ9IaAkiEvKp6Dw3CbU4LOCQYpK xmt9ka1RhLAlA9rhf34c1jIWi8T604bMdjZWhjyJAHxV54UYPb2/Df7QZGHThxyczYCjlnTWcv5 JElNatmxBA7zLlXQTpZ1woCyU+y7bQPcFay5wVnpaHfWiBg== X-Received: by 2002:a17:903:4b50:b0:2c9:97a7:3277 with SMTP id d9443c01a7336-2ca7e8adaafmr57776805ad.40.1782981843020; Thu, 02 Jul 2026 01:44:03 -0700 (PDT) X-Received: by 2002:a17:903:4b50:b0:2c9:97a7:3277 with SMTP id d9443c01a7336-2ca7e8adaafmr57776525ad.40.1782981842418; Thu, 02 Jul 2026 01:44:02 -0700 (PDT) Received: from [10.151.55.41] ([152.59.198.180]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ca9a9fda23sm10229555ad.67.2026.07.02.01.43.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jul 2026 01:44:02 -0700 (PDT) Message-ID: Date: Thu, 2 Jul 2026 14:13:54 +0530 Precedence: bulk X-Mailing-List: linux-kernel@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: 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> <51bad771-aa21-4394-8243-2fa7f275cb36@kernel.org> Content-Language: en-US From: Ekansh Gupta In-Reply-To: <51bad771-aa21-4394-8243-2fa7f275cb36@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzAyMDA4OSBTYWx0ZWRfXzzJZugdOr37t S/ouqxtFHkROivvxxtXg9sm73/BdM8uOwVT8gJe7RGzN7OagcVlxJAbV9NoOKokwKhQ0SPbcGTe IVDgjXlgcz2LO1yDy7uaGOSvrTjUiOzkAnUP6yY3SEvQlhr/1nXo0/4iKcfIPEMvk6JQcNuxpaL SGT3vEDtUZJmKTaiAYOMel5xhKDVDZMuHd6S8Q3kHwJax6lwopYGSywn21KX1dJeem6yxbCfs5W PSr1BSNwnQhG93t0JUTa0kTm8p6PbaDTT0kMT+ZwxdynmXf0ydJRAG3cMpxln2xjpxXc0GarhOZ UWJWSe55wPyWx93HLSZPOLvZpMh+IoxCfMj4VLSh0Cv5fO1AytrBrzwavbwhHO28pmrQ+6oTXx2 u+UwyI9wO6FL7R6x25BqEDQLwenwh5S0OgdUCQaSG1tPxnxe1+GAervmeLA4E8yrLhzueus1btI kU6hJQelZj2xLs/9isg== X-Authority-Analysis: v=2.4 cv=SuGgLvO0 c=1 sm=1 tr=0 ts=6a4624d4 cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=9m3hvakvPwWhOvli1bnDMA==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=HOC0WB5RhlNe5Vyk8xEA:9 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzAyMDA4OSBTYWx0ZWRfX7d+x4lnwB/IK yHd6meqUMyB8eKdFD0eX7yaTUYutoFfx454lYpvyxezWu3lQRYmr3RB451eziyYumuiublClJ5m ZnYX1iomR6IvNNhC+lNc48eNdQ5mkRg= X-Proofpoint-ORIG-GUID: CHiK4-zHR_nydRpW-b-Z3YWmuneYGynK X-Proofpoint-GUID: CHiK4-zHR_nydRpW-b-Z3YWmuneYGynK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-07-02_01,2026-06-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 adultscore=0 impostorscore=0 phishscore=0 malwarescore=0 suspectscore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607020089 On 02-07-2026 12:16, Srinivas Kandagatla wrote: > > > 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? Agree with your point about documentation, maybe Jianping can add the information. audio PD is generally not aware/affected by the state of daemon process(other than the reverse request break) and there is no such query supported to see if the audio PD already has the memory information.> > > Does it make sense to attach instead of creating? Calling it attach as PD creation is not done by the daemon, PD is statically created upon DSP boot-up, the daemon just acts as a listener for that PD to take up reverse fastrpc request.> > --srini > >>>> + } >>>> + spin_unlock_irqrestore(&cctx->lock, flags); >>>> >>>> args[2].ptr = (u64)(uintptr_t) pages; >>>> args[2].length = sizeof(*pages); >