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 4218A3EFFA5 for ; Fri, 17 Jul 2026 10:54:32 +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=1784285676; cv=none; b=GYNECE4m6hB2jMzVJNaLNtwmdz5YWl8kKTi5yYUUV/OzVE33dAKKGkqh0ov8p8qIRlwUWoZv0BuIejieszH613tmR/ivB43aDtSLMvw3EGJraEN2Sv48fB+yKXF1VwmztpudsNYHt0iASdajh7jfsfvVNGgLVU4v6M1LDER5zjQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784285676; c=relaxed/simple; bh=e++fRFLE9xONlyH77w/Q1DtmPMosUmEuqZ3QDq01xak=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HTDj0Sbj/jSfgVuz4lx4YzaA8MD7bzn/zhmYMKoitC/YX4fiOm2c3+os1n4bNZTnAfnIaiIhwohn3U4KJBBurdcelqRlnydpahw8gFbatmyvmqTb0ylDsCjSnPQiN212jDp/QKXbPQk7IA08rvMFtfP1+/l1Ub93zSsHX4dzWzc= 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=JjUJsuUB; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=QIE3s5BQ; 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="JjUJsuUB"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="QIE3s5BQ" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66HATM4e1388513 for ; Fri, 17 Jul 2026 10:54:31 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= gbIOXqvXhHXmY126DaOodYajWxb9I3NsGeAgdKh9VZ8=; b=JjUJsuUBIGkFSVnb CBKqo6IhxRT3geWUswYIKZXZjS+RJVtXsx0skqs12O7rIKfyOe5Fo+bCPCmWqKv8 IIM5nDe8i5JJM0fGyITRf+m1KwNS5dHGmitlWCKamxiORbt1HKwC+tHwu7PSsNRH ioU81vQ3JnS7Lkrwy/aSf4sKuTJGlIYrdYa7na6FTJYMvWIHDBp162YUp/QBM8cj XcbwJHTz9cF/3aqtcIJWn3gnlhPlRCO5YSh/U37TaniG+PZJTVZHAFaSJs5UMCvn bnv1LeqQlO0z7+S/cuVaDaIkGJdBZr8Du+GIAMs1jfRRxoET+pPWCEKTj23M6qMw o8zOMA== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fff9p8xqv-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 17 Jul 2026 10:54:31 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-51c069f73e4so16311341cf.1 for ; Fri, 17 Jul 2026 03:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784285671; x=1784890471; darn=vger.kernel.org; h=content-transfer-encoding:content-type: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 :content-type; bh=gbIOXqvXhHXmY126DaOodYajWxb9I3NsGeAgdKh9VZ8=; b=QIE3s5BQQuWxeCBZ210LMeqOym7wgjFb3Jt6y28ZCsZSS3Y+n4MaPdlKlHLwfsGRvX q+JEPrvegNJiimsdvR1D84aOu2eIKFIHVYS8qT43ncAIln+CKDoGYxvALx1Y8GPC46Oq eZ1Ae1B5NDGKmlNBkj7FTOT/nikNHV5f18QciE11/jCuUwA3G4BQnvl2/VrAhc0aBSrC CSQCSXPKeOEsH4ztw5+kybAzH4mbhIb77jfvo7Nr/feBbt53EPXdCfw7yLLsCJZ6t27c fU2Olzt3a/1mygkqhQUvlnskOu0i8LcocULjmzgltIaTFHVAhVDe4F16bKKcB1IlfkoP XHwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784285671; x=1784890471; h=content-transfer-encoding:content-type: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:content-type; bh=gbIOXqvXhHXmY126DaOodYajWxb9I3NsGeAgdKh9VZ8=; b=JGWIdQnakjcBFKMm0t6TYuW+A5ufY53y8tK0RVRaqWnZx6W4booYhIUvAZzywvVQ4V WwwNDTveEbSvMLmC8Kuxh7HoeLh4fXaLQQ7d1x/BsoZgmg3yhDwh0AG5NxbMCTAFCHt7 gUUXEdtSejXaFFnqdN2+jIBofsmnaqZSltCw8iM9LxcAIlprx86U3fgVgvhimQsp6Mgr 1Juqcvi+TIuylS2uJUP6kOXdvQBeteJL9i3+AqdO9Ll0B+upeMCLEuW7M1DyoN3FCYvI ISs0vbFvNNQoWWCU46zaNm6l0tvPrTUs9MMPut5Ou0DdEskVYPr1Dn1yjri0FkL91Exo mLgg== X-Forwarded-Encrypted: i=1; AHgh+Rq7geaQSOAnz4qBtKuObFsMAQvf9CDD+Z4j3YLUsY2KUAkeFuk/O0dZuyh0b8MKrjW8FaBTSSaTSs1ExbE=@vger.kernel.org X-Gm-Message-State: AOJu0YzC2nmr7llCVyetMOOngQm9nWQSbNPv9/t9TA56A3zwlITywAe7 D9wFa1P9mnLPJPGlSdOGZN5ffsYHj8BognnR94uqLx747sgdf662Wr5ycQ2EOIzv9U3qblK/CVI EWQ/PR0dl7A2MkzngosS1QicDRffhdmspB4pdS3ltR/FR1WIpD6/4mD5PgTmhzgJkeiU= X-Gm-Gg: AfdE7clT2cwlJQSEIIWC9aCyOIxFMUkTX87Y8L6418UNy8pve7sJRENPlSqJawYkK+1 q7qiqOq3CIFxokMf26yloGR6rgx09LwxBhdVilb77vSoPFkK7eEnppph63E+9zIwmOMDRM3pyty EnaR/UlTBkQGTrS9nDAH3Gl27u7HIFiznih5Qfjglg+oMTMxpeyQC6dv4OcUqf8cjr9cZpDpg25 Xc2oW1OBnkMsTePtqvzYEDihbEA3AwmqcyAoSLwc2dI1oeFKpEHzFASmrxHs4aRo+tS9IUiqYRI JW8iSiGo3b0rIbFGMPfdgjIkw+lP0QFx5Uqisf+thPSnRgKzo8R+ODmPGPFiavwlX37KWVGOY72 k/rhibm3GkipQb0NgV7UFG5vm X-Received: by 2002:ac8:7e8d:0:b0:51c:857f:9c1c with SMTP id d75a77b69052e-5213f861e63mr12662841cf.11.1784285670795; Fri, 17 Jul 2026 03:54:30 -0700 (PDT) X-Received: by 2002:ac8:7e8d:0:b0:51c:857f:9c1c with SMTP id d75a77b69052e-5213f861e63mr12662631cf.11.1784285670418; Fri, 17 Jul 2026 03:54:30 -0700 (PDT) Received: from [192.168.120.193] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-69e6fee321dsm475960a12.6.2026.07.17.03.54.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Jul 2026 03:54:29 -0700 (PDT) Message-ID: <2be76246-3430-4f76-b6a9-11de39a961e7@oss.qualcomm.com> Date: Fri, 17 Jul 2026 12:54:27 +0200 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: Chunkai Deng , 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> <0585ee18-5bd3-424b-93b1-eb841c26b63d@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <0585ee18-5bd3-424b-93b1-eb841c26b63d@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: llV2z9503_5WFTB52tpA3XTHFFq_Xtz0 X-Proofpoint-ORIG-GUID: llV2z9503_5WFTB52tpA3XTHFFq_Xtz0 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzE3MDEwOCBTYWx0ZWRfXyYKL5EgHx+Cm lZGq8WuvEZCUwjBtU45fBFD6JVIjWi3YSDPIp9JhqdBD0cY+MEVacWRpjQn0qoXdxsdCGMD3OPI tjhnnovsrGukMZGWEVv38wQZ3Oan0jrt5YcXwDRn2oqIhWW2eoqw0X0ra7+q0BZyX5wsD2NTUjq G74cu8lzfQ6PPNvxjUuSD4sI6+dRjO5wq+oyhYMg5yOwk06nA8Wq2akxgkmmx0heHidDJN10DPf y8/TTQWqqU5Wu121kpxcAy2Qh77KXBiJROhRlx8/R+Dy7hWnNmB1jJJrk9py5pK7qnXkRBfpVvA cWW4svRR9he8KvOjig3KmWu+9vysLHX2+869F6sWZ7wBarLwbONOUyt54LMt2kpIKXpKjULXnrR H0351JUOosRbkG3HBJ4E1kmiXa1NmbeUwhYGLoXTno84PdkTCU/Ap0Kh8YvehUySbMY9SG3vV+7 tqmMIsg5erekAGmAH4A== X-Authority-Analysis: v=2.4 cv=TaqmcxQh c=1 sm=1 tr=0 ts=6a5a09e7 cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=qV3TpINTj3GmVv13LMoA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=a_PwQJl-kcHnX1M80qC6:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzE3MDEwOCBTYWx0ZWRfXyzMRkN+FipjC MmfkTiIuxZbpwO1u5QJHhsTECSyl/yt+ZxeNepBaqKGKUqf9QF3XFllyKPDmQo38Fh6S+rec94/ oO6zkVo7mbZa1oAfmW0aDdIFJ6+InM8= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-17_03,2026-07-15_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 suspectscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 spamscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607170108 On 7/6/26 10:59 AM, Chunkai Deng wrote: > 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. Please don't paste AI responses into your email client, there's a human on the other side.. If this patch was also created with the use of a coding agent, it must be disclosed and follow the rules established in: Documentation/process/coding-assistants.rst Konrad