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 D12C235C182 for ; Thu, 5 Feb 2026 08:10:04 +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=1770279005; cv=none; b=JqPkyqaSUTc9FIBnYaSXCSYQz0f6oiCAALnrSf1yHutQKmDeVO0pNqGebSl0oI16qwsKm4dm53J0j6+EW2elfkIKmGYMyLu691W4vm9UskZE6tgleBV1AAGc4Cg8xpFjMTVuDyZZFTKR74Bqgk1y9+OWYuCLb8wr9CsYIKklwWA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770279005; c=relaxed/simple; bh=31BKYP0Nlhr52tfXs2A8uGkTeifCfvGi22PcYSAYp/o=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dLwrO8+Od+yCnyUDSD8Fyoo/c16Y9OCVh/3qMG2zijrOexs75STNp/FprWzIVxEfp9cGErYfsAr6Qcc2/+4rAshYtRAvkiNxqmU/au1RUvJgZehuVMfw9VCQad7UhYBD/H8nnW3EDxfiYqUhDgjgDMsNLXqdGA9BIl4XlH90yow= 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=iEUiPBrO; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=EMerfe3Q; 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="iEUiPBrO"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="EMerfe3Q" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6153e10r3246047 for ; Thu, 5 Feb 2026 08:10: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= a8rDuGUPyagZOfVWM+f/BrTixnTf4NeRHC5TK7Tyqkw=; b=iEUiPBrO91RmrhUa NgQ2fl6CgspcdHcFktP7O8JSlhyMfMc11W4F/N03QNnaHvC20g3Zl2YdhuVGkPBj 7o0YC8drrm7VbWw9gWSeQUrK7SkC16k5FEeo34GPlpMfOcts4CSgvlbqp2tbCfRf FLQCG8wnorn6YwH5CWUl6ZQGdZs98X48tAE0vqWbtsz2Jo0AT4Gv10yldJLolAUT jCUNOO7Ke2AIwOCiioRA2Yaq3HAs8JEiUzp/LS3qsIro7WB9i94i7uPVtWjX8See OdZiqA41kskQnR352Apb1tX6f/cBtrPiloUCJYZTd2N0QLiA84ozIY0XI0rajO5a Tu+Vpg== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c4cp51s5a-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 05 Feb 2026 08:10:04 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-34e5a9de94bso1265430a91.0 for ; Thu, 05 Feb 2026 00:10:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770279003; x=1770883803; 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=a8rDuGUPyagZOfVWM+f/BrTixnTf4NeRHC5TK7Tyqkw=; b=EMerfe3Q985LaIxlKWSf08iXTdAIm/7Eqh4zwQTT51Q09dTduWKgdVbnTPeENkiV8e QWFrsNrkkqSYBq5SsmVdaJpwZQ9E9RNIbzBxpEToSvS5jlwTAb54OUOiMmOUGH5eMh5C MoT8dVsAXVUXbfDx8Y8w+vikuJoKn+bly+xsWs31L1SEHQYemsYXpPPVdgWY1z3GmRl+ C9mNI2VRSWYO11Zj4Y1pKECZj6K+Lah/E4Fn5hCTi115lmbQxYsAdNzlLQPmB47au9ru FJM5FEUSYWtJU7Zb0wObXUKI4CVPGgwcuK+0ocb/050R3k7U4cI/06Wyy/i+rrNCm0TF iepg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770279003; x=1770883803; 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=a8rDuGUPyagZOfVWM+f/BrTixnTf4NeRHC5TK7Tyqkw=; b=Q1fhPv3/pwXIuaFoG7tx5PeXZfxYHE53mz14i9NCzVjd/xCY0ZFPj0cvHRZeCGSMUt N6ehSBra9eDQim9HNUJdvmETWRwo4mP+IeKy+ZbMTOAR/QXCM/AFDAwcvfcyREDMr41s iV49185MwztzGWdSap8JpL8w1jQb5y949y5RtyKG1lH8kuO4JZhxzIN8EXdDxAbZSAfb 0ZvsFE17Ha/huAFaukInocSXoC1UDuHGWnF2rU05f7iBy5jDSJ3xPll4zlg4ptDsCp30 s14yHSXeoFHY7lDePJR8QyVD3Em0KCeYEmgqOhCjoySLPYyWnBey0XXzHxtHJoz8Vtv1 CNvQ== X-Forwarded-Encrypted: i=1; AJvYcCV0/7YKY0OPr43xnnjjcfEIK+GTliG7cJjOihvfpXo03cRYpmh1oEHNa2n4HSoTZ5FdnO7cRJJ2+GzZHds=@vger.kernel.org X-Gm-Message-State: AOJu0YwGNia35CeUK2vlRJjM3ifgKhn5XslbSaNOveKxSv8Y6X8KIhFg DeMM8vm2GilG2mYapoWapDR8pv7E2UdxP7NgHsthMRHF19LbN0Dor1GmIJynHe5IbZGnhc52ZOH QyT+yFzOeeBM4nZqtq1cZ1KUBLAfzL04x3MqB9Tk0uvJc9JdccUE91/r0j0YdaKybOCU= X-Gm-Gg: AZuq6aKQ55FWQBQ26TgCGvYfiyulxMWgRshvTIU9d+qlI/7thDc94pwhJBTz7sqRuo9 yzfa5A5ypmlGJED1vaASq6QZawFdWaEXGTFsbKWO0mkTVo3d+tXmoT8Zlm5gQ1WXmZTM3LiYqFr 5Ng9pxyQOUIOIemgfzLc9BCeVGZOPjH1Jv0hgjx7erqo27KZcR7KTgueOVdRkKtwaZOPk0A1j1i 5MpwajkewzqDvjQkFB+gZTQmrpgnp9rhaERf7VmHNt6X5u5sJCSnQoyR2gZhzG+niv8JdSRNF6N w3PK1tdqY0cwaqJvNcW4gPMKygF3PSQHb/ZGRL6EvjRu9m1ixAxTjdFMjvJZb1P9e54cP/AFLyZ Ktji5vZj5DWMAXpHxpB9Y26eqQ640qe+sjr5qGquukSJI X-Received: by 2002:a17:90b:1643:b0:345:badf:f1b7 with SMTP id 98e67ed59e1d1-354871db4e8mr4514490a91.28.1770279003374; Thu, 05 Feb 2026 00:10:03 -0800 (PST) X-Received: by 2002:a17:90b:1643:b0:345:badf:f1b7 with SMTP id 98e67ed59e1d1-354871db4e8mr4514452a91.28.1770279002912; Thu, 05 Feb 2026 00:10:02 -0800 (PST) Received: from [10.219.57.109] ([202.46.23.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3549c09adffsm1642267a91.4.2026.02.05.00.09.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Feb 2026 00:10:02 -0800 (PST) Message-ID: <4835d0b0-06c2-42d1-aa33-34daa0e7a8e7@oss.qualcomm.com> Date: Thu, 5 Feb 2026 13:39: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 2/7] of: factor out of_map_id() code To: Dmitry Baryshkov Cc: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Saravana Kannan , Joerg Roedel , Will Deacon , Robin Murphy , Stefan Schmidt , Hans Verkuil , Krzysztof Kozlowski , Vishnu Reddy , Hans Verkuil , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, Charan Teja Kalla References: <20260126-kaanapali-iris-v1-0-e2646246bfc1@oss.qualcomm.com> <20260126-kaanapali-iris-v1-2-e2646246bfc1@oss.qualcomm.com> <47fbba15-6375-40fc-bd2c-8ebf2788837e@linaro.org> <7d1b5897-8f17-4213-b893-d99d96afef94@oss.qualcomm.com> Content-Language: en-US From: Vijayanand Jitta In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=Oc2VzxTY c=1 sm=1 tr=0 ts=6984505c cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=j4ogTh8yFefVWWEFDRgCtg==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=SBgkrO22ZELSIJHh4VIA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-ORIG-GUID: KpQjFuWxu4s8f3eGYb_Mn9ThYt7gtSqY X-Proofpoint-GUID: KpQjFuWxu4s8f3eGYb_Mn9ThYt7gtSqY X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjA1MDA1NyBTYWx0ZWRfX6Y8rtSpOMg8/ S2SCTDXF6UBgdfYR8yK/EepjRz1u0EbM2OWQTsOCYKO9YzRLYXwgIuPjEsEFsq6rPz9yap3gJC+ XWjklEFZMg+fUttV61PKw67+thdEQW/9sCf9C8BZ2hplujyC/zVRWddkT+W8PP9klWdF1r/BI8l rtwLazLEHAERCFzZMn64fOxRTOM5w4MqVGSjWZanQpd+PClOV9qeHelVli5gHu4Ekhnc4NY4XW7 A8DP3Xdj3FV045tqfJwoXO+OEmtn183KW6m5VRuhlHFyF0HAui5pVmGBSi5+WqVGDsmDa7gsBUU UictYgsWMnx7D/aOUqaP9jghv2+QNQ+f1+j7SQCz+0aGiSNvELqDWfbH85EWmIBRWAhIrddXEMT 0IW0jawa9iJmlcvB2aSdMza2K4N1MDKP/mmCtjc0EzawI5tfGnsJpkZkknuwD28O9OOOoFRreal IxZ9oYGwYXUeGDTetaQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-05_01,2026-02-05_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 bulkscore=0 priorityscore=1501 spamscore=0 impostorscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602050057 On 2/4/2026 6:41 AM, Dmitry Baryshkov wrote: > On Tue, Feb 03, 2026 at 03:43:58PM +0530, Vijayanand Jitta wrote: >> >> >> On 2/2/2026 8:22 PM, Bryan O'Donoghue wrote: >>> On 26/01/2026 12:25, Vikash Garodia wrote: >>>> From: Charan Teja Kalla >>> >>> This commit message is confusing and inaccurate. >>> >>> First up, you're not factoring _out_ of_map_id() - factor out of_map_id() means to remove of_map_id() - you are refactoring of_map_id(). >>> >>> Your patch title should be something like "refactor of_map_id() to prepare for mapping of multiple IDs to a single device" >>> >> >> Sure, will update the commit. >> >>>> Linux interprets multiple mappings for the same input ID as a set of >>>> equivalent choices to pick one. There exists usecases where these set >>>> must be maintained in parallel, ex: on ARM, a dynamically created child >>>> device(s) is referencing multiple input id's in parent iommu-map. >>>> >>>> Factor out the code where multiple mappings needs to be maintained in >>>> parallel can be achieved through callback from this factored out code. >>> >>> Which callback ? There is no ->function(pointer, here...); ?! >>> >>> Just make some plain and straightforward statements about what you are doing and why. There's no need to resort to dissertation-speak. >>> >> >> The callback in introduced in patch 2 of this series. will update the commit descripition as suggested. > > I think, the callback was NAKed already. > > I'll remove the callback and update change such that all entries of iommu-map are always scanned. This would handle the video usecase ( i.e; same input id's mapping to different SIDs ) and in other cases it would result in few additional scans in iommu-map compared to existing implementation (where it just returns after first input id match) , does this look fine ? Thanks, Vijay