From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 17CFB42E8F2 for ; Mon, 6 Jul 2026 08:59:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783328381; cv=none; b=hoIbmzKWhzGndTjJLiejaxIAU21rajShfljvgpbOclfaB7iXVfecXHfYW+h1l1rhwmwcdXeGGPdwidQuARD2rD3rDsyyV/gvFciJouIaF00tD5PjqEtZIRj5NTQ8wQjhz4LATzrY8xHBOQxhFFNNG608uEkEYuB2+mNMfQF6JgA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783328381; c=relaxed/simple; bh=gyxOXMMbk++wVl7V69/3mnQLURjaC9RM/JwO65/GSoA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FK+Te7VCY9bH/J6sWGtzjdqo+Ug4d4fDe2zXVWWsxYFw3L77KfpVXFa7oEBqRNgc1V+cU0YZg0RHvVYxIhhBEaF2EYu0nqvF/qpCrrl94lkaYtjhBvOcRUo/lYZ9a3T+Qi4qekaGo0NoKftS8IPcPWbot76k0GCWF7OHgbJZ95g= 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=pZK49CXW; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=cHOOIw92; arc=none smtp.client-ip=205.220.168.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="pZK49CXW"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="cHOOIw92" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6668N3qR4072472 for ; Mon, 6 Jul 2026 08:59:24 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= gyxOXMMbk++wVl7V69/3mnQLURjaC9RM/JwO65/GSoA=; b=pZK49CXWT62Lcuy4 Bu+DDwFjHtdU53bRO7cjCi1hK/epxPJSjbJ0PI9VM4CjdiqUziN731mrAvxsYnCM W8P9n92zyDuL7pNL012LpgTA3wNyXLIHj6waerABuZz0Yi11oEYIYIyNjRfet0nl 8HemN1JCkIeuPKZfae8UtFZgJhzOgo6S+5IPYhcHtfHn4sEeChYygtjBL97jpCLK 6OgHBgPzGtojMUybBRdF4KStjZ4mEHUEwzJXcDWaF1xuU6OSUnVaS+iFSKni+/1M tfwPmgWOdomKTouW7FdVvJO4HIwLvczAcWLA5PK/7mXGGQoIyiAlcmfyslogcOWX Z7wORw== Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f88t884q0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 06 Jul 2026 08:59:24 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-847e32ef4caso4456061b3a.2 for ; Mon, 06 Jul 2026 01:59:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783328363; x=1783933163; 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=gyxOXMMbk++wVl7V69/3mnQLURjaC9RM/JwO65/GSoA=; b=cHOOIw92+BgM8uNAoh6xm8AyV9QgQ4c8j4/jVcJAVdjlYd+dXIBehn+qgK5bC+LaYZ Prsp7cGMW02ovY8ipBe+1SPsTR10T0g/nNbgV9arAOGy/XBYFx8WqiCfY1x+1a26xlAz 31CC/1UfcbPIw04j0j5/hZXHfgtlnN/jyYFt2mnRt1jSq3TpFxB1fIMgW2fljM6ocO/q EXTnFhcU7WT/Uxw/pwweWkWfFhu3HleEkORRFL3caDPTSuBeZJx/jghjDs4aZ63W4tYB 3fKzL0AtBceXCuNPEXE+FN+2kwtf0ByFBjIcMNoTbgaZghqij7j0wgPFXdXcbeYHDB4s p9ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783328363; x=1783933163; 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=gyxOXMMbk++wVl7V69/3mnQLURjaC9RM/JwO65/GSoA=; b=gSywZwtp6Fxi9QRn07Jr2AtqyxlPaVInk+ANjxYPSB22BC804A8ywoXhi62ZEx/1dA qyASxbVCk23uVYAkg1V0mN3BupDp3YpHZilI7DZtjFOeZ01tZ8Mdi0dJ30OKQqt9wQu0 IaIPhzlI9ipn5hLVeCjZvabRaKX5UYbItUmaDJCX/C7fan4Vaa5gmgKolBJkpmDcdsrv 0nQ3Y6pxHzZTCtuuGGD3+GTqTA3U9xUuemGnw0tqeHdb3B6+dyu/bzZomNN8ALiXY3VQ e9MmcpLemg2ISEcmnFfZfu3gPaGavqjYnrDWoyidGPLoPul3uzRnAc9497QdA6cS8/Dc C3lg== X-Forwarded-Encrypted: i=1; AHgh+RoGQ5x5tooYFv/j/+Drnamm9uMUVgTXOokk0EWHd2Zl6Vd4JI/MeS10WKF+vH9fF6A1mkVygxQIcpq4Y2U=@vger.kernel.org X-Gm-Message-State: AOJu0YxN9AGpou54EX59DKF3Zw/joidTVNQB2zwVnzqbQX3YcRRwGKoG IuDrQsITNF2Xas0ENBBfh2Ze801U9t1t6sQZ9wSKRidXkd8hdZgmFoYMlObGz8G/ImfQ2+unno1 f8qdXBsu/1UWhPSNsY3eM4Ftnt4s9X+EdphgDVPMA0e7/lg+kO+Nbkir1rLd1gQRt48Q= X-Gm-Gg: AfdE7clzHgL6R7xcC9yRVxVFeQwaXU6Tte3ntL8NQorGVv4Ye5wGKLmhAl+kA7zUksq w01/dcuyFfL5zSScyBMOxyv/CnMyOl68AnZp4DI/qyp15J/VXDa1IXonEn8bXC7DRHmCAhsKDhs n02XT2nYHgHyjw9idIXvWzbNtKZwphXLiGvX1gNiq8USCpW8lQRY9c+UdMB0EFOh7erw5wwu+Z8 1LiuSYBTARjXrU1/GHwyALsYfqiiLnyAPw/ZgSGzYYcvecxRswIoeVqqRV2Kt8S0IjMYW1QLNi/ FwikLWWw+cpaOBasjfV7Dygd2Yhi2CjqM+06KqBfx3dGyClzwLdA4bG3DuAdVT0by9tWR7hsyJO zqWWYVmWHr5h4WtDeeVYkchnB/6QKYO7QTTHGzA0XYDFELYzvRjXR7rqt3MnD4u+FWGHiKdWZnU vqTHXAsQ== X-Received: by 2002:a05:6a00:aa0a:b0:845:4928:8655 with SMTP id d2e1a72fcca58-847f6f0ad41mr8501243b3a.39.1783328363393; Mon, 06 Jul 2026 01:59:23 -0700 (PDT) X-Received: by 2002:a05:6a00:aa0a:b0:845:4928:8655 with SMTP id d2e1a72fcca58-847f6f0ad41mr8501213b3a.39.1783328362871; Mon, 06 Jul 2026 01:59:22 -0700 (PDT) Received: from [10.133.33.82] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-847f6dbd07csm3418527b3a.54.2026.07.06.01.59.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jul 2026 01:59:22 -0700 (PDT) Message-ID: <0585ee18-5bd3-424b-93b1-eb841c26b63d@oss.qualcomm.com> Date: Mon, 6 Jul 2026 16:59:18 +0800 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] rpmsg: glink: Split protocol start out of native_probe To: Konrad Dybcio , Bjorn Andersson , Mathieu Poirier Cc: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, chris.lew@oss.qualcomm.com, tony.truong@oss.qualcomm.com References: <20260618-rpmsg-glink-split-protocol-start-v1-1-c4f93986cdb4@oss.qualcomm.com> <43293037-99bd-457a-b190-31fb24625b1c@oss.qualcomm.com> Content-Language: en-US From: Chunkai Deng In-Reply-To: <43293037-99bd-457a-b190-31fb24625b1c@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNzA2MDA5MCBTYWx0ZWRfX6N6jl3qmzgYo NNCHOSyyRQCdXiFk2yo4ja8GdlNZaDLLVfMGLziTrK36gKoEc0GMysw72tzJabdR231+S32nq65 X7ZRdWCjczw1TzL8VlYs3IPQlDZ0vxY= X-Proofpoint-GUID: 8BQmI1r-RRND6xNiCrNLORg3dxQjr03F X-Authority-Analysis: v=2.4 cv=C6zZDwP+ c=1 sm=1 tr=0 ts=6a4b6e6c cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=7emMc0f38C9vq9mhEe4A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 X-Proofpoint-ORIG-GUID: 8BQmI1r-RRND6xNiCrNLORg3dxQjr03F X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzA2MDA5MCBTYWx0ZWRfX8i1j7JMJoVUI mkRkPMXza6/f3IAVPnvQLvdTl2xVUWzHulDRS31M0QMG8U0xbcEvtthl4pt6JkFYOt3l9Beeh8S c0i086mqV9m4eUm6Ube8gJY7XPRCKnWC4WBI9QT3eLb1RguRYLqNr1t+uhbDCAFecgPHIfU3wsG n0YxGnaqDGRsNrrxxQJxDVOKrbuwNSviCYroflMTFv5lbi1FRJHXqTALnCpk2eXy3Z/Gq/TavIA lmyTXQ9VoaTYmqhGCB3ehgAfmYopftrXcVBkITXGYNlGAN4cSjB809RGTFACLlrHqbp9/PT0RWR 05KfORO314BmM9rdgaEuoOc4gxcvUIlKy2qW4tzZWWXFqedNgvhyT14DY1IehKhXrkzqf5sUdj6 2JJ9F3qyilDAfLpE/oTOM0IQ9fDhyM/hEtoUpRDja2Bke+Nfk54+RbmuxE+F8x8mVidvOQlFuHu PzLVh/DQ15rL3cjlz9A== 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-05_02,2026-07-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 clxscore=1015 spamscore=0 adultscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607060090 On 6/29/2026 8:47 PM, Konrad Dybcio wrote: > On 6/19/26 7:01 AM, Chunkai Deng wrote: >> The SMEM and RPM transports request their receive interrupt with >> IRQF_NO_AUTOEN and enable it only after qcom_glink_native_probe() >> returns. Since native_probe() sends the initial version command, the >> remote may ACK before the local IRQ is enabled, stalling the version >> handshake on a fast remote. >> >> Split the protocol start (qcom_glink_send_version() and >> qcom_glink_create_chrdev()) into a new qcom_glink_native_start(). >> Transports now enable their IRQ first, then call native_start(), so the >> version ACK is guaranteed to be serviced. >> >> Signed-off-by: Chunkai Deng >> --- > Would it not be simpler to just move the devm_request_irq a bit down > and remove the NO_AUTOEN flag then? Thanks for the suggestion. I analyzed and verified it locally,but I'd personally still lean towards keeping the current change as-is. My reasoning: (1) The IRQ must be live before the version handshake — that's the core point that can't change. The version command is sent from native_start(), so we need to request/enable the IRQ first and only then call native_start(). That ordering is only possible with the version send kept out of native_probe(), so the split needs to stay. (2) Dropping IRQF_NO_AUTOEN does make the structure a little simpler, and functionally it's equivalent, but I'd lean towards keeping the request-disabled + explicit enable_irq() form. It makes the ordering constraint visible at the call site: the IRQ is requested up front, and enable_irq() marks the exact point where the handler becomes safe to run(glink assigned) and where we want RX servicing to begin. Folding that into an implicit auto-enable hides that intent, and I think the explicit form is easier to maintain. That said, if you'd prefer the simpler form, I'm happy to do the IRQ cleanup as a separate follow-up patch on top of this fix rather than mixing the refactor into the race fix. Best regards, Chunkai Deng