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 B80CC3CF698 for ; Mon, 16 Mar 2026 17:07:42 +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=1773680864; cv=none; b=pY3iYnitx1YML99jPaEPZq8IprooFTJHvEVWc+cdGETu8/iTuvZf99tv6/dZvEn2FJUH+qzjOBs2GvSCqJggXbna59sixA6KbXdfe5OtpYu6XbhM6KoSTY9ClCK1MUhAMLqdzxcap8L7/X+IYD7bsk2H6GtZ1OTBI25vnFHKMAg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773680864; c=relaxed/simple; bh=ndSyZFZJ0iMwREzqBpvvKbaR/JlX2TVhp1ZhDsVoAMw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=G7laBGNmTt18jSZblXwwqgR/4Asm1gty5OgxOVB+KJQziSPkuKyXXMafCATMaUP9jGm3kOQ1fVxYIeeASFyzP9zKdyKogvJArZCmp9m17yMycfGRXvf7U4+sswZ49YyIGzojFUNFXwhVjfgeszPf/7yUA0KyImhtby9fJ7EfOWI= 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=X+Nlgmj4; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=B4L9wCoC; 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="X+Nlgmj4"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="B4L9wCoC" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62GG6RNM4022277 for ; Mon, 16 Mar 2026 17:07:41 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= n1xeMoYeUM0iSmvPxnEiOO/lpTwBXAxToBC2I8g5MT0=; b=X+Nlgmj4OOaKssRg 4e+d6j+YInLZbUUYEhBCPUFKoIM4YtGoc99GwqQ10TJmPjB/CmSuHpPwmbV7wSg+ gmPOqgVaLk8ZRcWDLGYwb4WoBNwYGGAQu9LwjKdtBF4Vq/PP8ILX80VePosnAn9/ VUBBXlO9VluIzXokZac37bTWrwu/A3+s3GmM9CEKFq++6YzLLn0yfllLDnndTx2S kyronXorVd/CLR6pMaqTIWmB5SUN5szZpHBFg6AuY1JRWB88ClPlvnATCqj73Fae 8wnwP1NqnvRuRn/MfB0lX8kaZ0Fjrfu8XnfDTCed23SOC09MYiYYPVBbVNuAGwNZ /Pg+zA== Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cxn3fg7xn-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 16 Mar 2026 17:07:41 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-82a106b687cso1784745b3a.1 for ; Mon, 16 Mar 2026 10:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1773680861; x=1774285661; darn=lists.linux.dev; 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=n1xeMoYeUM0iSmvPxnEiOO/lpTwBXAxToBC2I8g5MT0=; b=B4L9wCoCNOmXy3s3D7/W5nZ6tWbipBFvcFImuIZNmXUwFmjqCHoGnp//iX8PzQzQvI J0eF+LoocCtFEsJ2Bq54Hj7xSUXPaPtp7gmPElX1ob+YOD68xdzMp6PFgKX/tn4fWnTa EWg/vB3IY4nu/pJF2uIROlNI7GiKdNLBHvcYp2K/MpUOErpeq8hSbkcFbGGPwh39nh6n rcsxk1IOKCrVP5KxOda7coJL+hBd8aJwYxQLRW6yvzokYyVGCyFqz6VAk064KEgeG77d YwamEWHKsFk5gRNWfOXbHOJ4ZGSoT7TTOzxpXgWfYZ2lnywkJVdy8uagYlEIHXqrV9pk wHBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773680861; x=1774285661; 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=n1xeMoYeUM0iSmvPxnEiOO/lpTwBXAxToBC2I8g5MT0=; b=LtzMPDONavkW1KT2QE8Hn3hbAXguMfKPFHBgvzmz7eB2xZe7MIYkv67/34J8bcR4Hd vVbOgrQ8OqgiDe+CTMTsFR9mbcocWtOH0M2/L7MwwsByU9y9hUFJ7rY5AZ19hTAmzSad wtY6AR2rtq8gyTqnofOZhSCCsB5b4gc7FqtnHscaxz7f7I+LVDSEgbzepiiwKTfLjokW dVoe+2UKrfX4MWBCMz/ipxZmn0HZXB4utjnK+rgSgweYtaEZdio0G9XC8wH6xElaQ4Bq In5C65TJUf41fmvx77Goenh/oMm775d3TPEwBSdewVxw1NFV75j65pU5NEm+A3S2/DcA 56FQ== X-Forwarded-Encrypted: i=1; AJvYcCW2SFP5PWxYiJfl49Zfy5Zsaezcvy3SUAqEHrPDGFBy5EdQp6T1ova9dlbVdhRtwWhA03s=@lists.linux.dev X-Gm-Message-State: AOJu0Yzqrzi2d3JP/XUnY06VsEiUz5fcODaKpC7HY9lZoSSZwrqHFOUC SjdyGOhJ0lNjlmXJGTB4vUKQXn0j5Y0LgkM4qfYmQw39b59hjUtHncDATUU5LT6p7XaOXuQtKD+ ktzFhUwpoUcXtS6GM0oCsV2nIKGMEZU8f/Th9YOjVhqOdhfQk1s69DKE= X-Gm-Gg: ATEYQzwxMaSqx7YfS5lpaB8718SzM51+eROK3iPXqH0OfNon/EQgSP23i59nCjyi56P OLkrsZjHs6YBYmhF5M1Q2tLsoQvjKl4DbYJBHa9teBl9hvfysDRuB7/eGZEaME+CH+ZCool6+Rw vhtx3Oxyu+iy8x5QYWEmzDnldeGaergNGkDBcwxKisAxB+47R9AhcD/257uCAh+WgOoLStebcEk NFODXUDypqnunKLJY2bkSu7giejrXSsdBeVn0JzRhJo95nnVHVKXUDT5qqU19vTLmqriL4R60ao w+g4yjJ7yYFlcR7XwG3nopJLBS/dMUxIN8FK9OXlzLWHjX0gvLmNqO/c83qUJF2bKX99IHpap98 aBz0wz6ijxj1cS9TferQLW2r6erX02nCJC+A0QiaTa564KIi3D+xKc3hE4A== X-Received: by 2002:a05:6a00:854:b0:81e:81fb:b392 with SMTP id d2e1a72fcca58-82a196d9795mr12519529b3a.11.1773680860308; Mon, 16 Mar 2026 10:07:40 -0700 (PDT) X-Received: by 2002:a05:6a00:854:b0:81e:81fb:b392 with SMTP id d2e1a72fcca58-82a196d9795mr12519484b3a.11.1773680859759; Mon, 16 Mar 2026 10:07:39 -0700 (PDT) Received: from [192.168.1.12] ([38.254.186.229]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82a072418e9sm14954842b3a.3.2026.03.16.10.07.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Mar 2026 10:07:39 -0700 (PDT) Message-ID: Date: Mon, 16 Mar 2026 22:37:25 +0530 Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v10 2/3] of: factor arguments passed to of_map_id() into a struct To: Dmitry Baryshkov Cc: Nipun Gupta , Nikhil Agarwal , Joerg Roedel , Will Deacon , Robin Murphy , Marc Zyngier , Lorenzo Pieralisi , Thomas Gleixner , Saravana Kannan , Richard Zhu , Lucas Stach , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Bjorn Helgaas , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Konrad Dybcio , Bjorn Andersson , Rob Herring , Conor Dooley , Krzysztof Kozlowski , Prakash Gupta , Vikash Garodia , linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, imx@lists.linux.dev, xen-devel@lists.xenproject.org, linux-arm-msm@vger.kernel.org, Charan Teja Kalla References: <20260309-parse_iommu_cells-v10-0-c62fcaa5a1d8@oss.qualcomm.com> <20260309-parse_iommu_cells-v10-2-c62fcaa5a1d8@oss.qualcomm.com> <27edd195-b0d3-4214-9df3-74a84da1e3e1@oss.qualcomm.com> Content-Language: en-US From: Vijayanand Jitta In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=C5bkCAP+ c=1 sm=1 tr=0 ts=69b838dd cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=FuYIH7Xx0xzBSkYrynBYgw==:17 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=VwQbUJbxAAAA:8 a=GQrJT2J37VpXmJLvS4cA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=OpyuDcXvxspvyRM73sMx:22 X-Proofpoint-GUID: PRkPKeH9dXLMyhcxv6SsWk9BgPCf63DT X-Proofpoint-ORIG-GUID: PRkPKeH9dXLMyhcxv6SsWk9BgPCf63DT X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzE2MDEzMyBTYWx0ZWRfX8BsUKutk2pZb X3M3eOhPgSlZHKuyZRtZtfhpqOiJz6cWr06TFwtgrAuJsVqznP4JnthQwhtzOYVdgDA3XMBrkbm jeCF6lSLcMxul9yAhcQgrXOBG+6mi//2aDBf2FxjBpJ56KbYrkIIet/mnnrmPMmT9doSG3WA/1e JdvfAjTI0wDmAL8BQiPP2guKa/I5E8Cn5WUGnDuOyoLb63HhU64YqLUJ27DJ2zBGc+dnJ3wpY5m wOoUpe0fNdoP6c8pfxPlYI8+E2YkInu667508cisSTJkpfrnF7gztCyep9SGTvWSoUZdOyyDknt OMErSKUnk1qadQmplhYZimhSQM79g/8FZ2GdCFq5DOqj9pmr8/VBwiAswyRO0cC2yav7GJdlKcg VME3M/5E3R5IMSG5zeXgqn3RMYjhaQcXxPnAXd8Cv1cClmwnk7fCmXlROrc51pHTqRyPDQAgZZ4 Pw/aw9jKKJXZHlUg4Mw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-16_04,2026-03-16_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 suspectscore=0 priorityscore=1501 spamscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 impostorscore=0 bulkscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603160133 On 3/12/2026 7:48 PM, Dmitry Baryshkov wrote: > On Thu, Mar 12, 2026 at 05:12:51PM +0530, Vijayanand Jitta wrote: >> >> >> On 3/10/2026 2:53 AM, Dmitry Baryshkov wrote: >>> On Mon, Mar 09, 2026 at 01:03:38AM +0530, Vijayanand Jitta wrote: >>>> From: Charan Teja Kalla >>>> >>>> Change of_map_id() to take a pointer to struct of_phandle_args >>>> instead of passing target device node and translated IDs separately. >>>> Update all callers accordingly. >>>> >>>> Subsequent patch will make use of the args_count field in >>>> struct of_phandle_args. >>>> >>>> Suggested-by: Rob Herring (Arm) >>>> Signed-off-by: Charan Teja Kalla >>>> Signed-off-by: Vijayanand Jitta >>>> --- >>>> drivers/cdx/cdx_msi.c | 5 ++- >>>> drivers/iommu/of_iommu.c | 2 +- >>>> drivers/irqchip/irq-gic-its-msi-parent.c | 11 ++++-- >>>> drivers/of/base.c | 63 ++++++++++++++++---------------- >>>> drivers/of/irq.c | 8 +++- >>>> drivers/pci/controller/dwc/pci-imx6.c | 16 ++++++-- >>>> drivers/pci/controller/pcie-apple.c | 5 ++- >>>> drivers/xen/grant-dma-ops.c | 4 +- >>>> include/linux/of.h | 12 +++--- >>>> 9 files changed, 76 insertions(+), 50 deletions(-) >>>> >>>> diff --git a/drivers/cdx/cdx_msi.c b/drivers/cdx/cdx_msi.c >>>> index 63b3544ec997..03232b5ffbca 100644 >>>> --- a/drivers/cdx/cdx_msi.c >>>> +++ b/drivers/cdx/cdx_msi.c >>>> @@ -121,6 +121,7 @@ static int cdx_msi_prepare(struct irq_domain *msi_domain, >>>> struct device *dev, >>>> int nvec, msi_alloc_info_t *info) >>>> { >>>> + struct of_phandle_args msi_spec = { .np = NULL }; >>> >>> Why do you need to set it? Parse functions ignore passed args, don't >>> they? >>> >> >> The parse function does check arg->np on input — if it is non-NULL, >> it is used to match only entries targeting that specific node. >> >> Also, there is this existing path in drivers/pci/msi/irqdomain.c which >> pre-sets the node and passes it as input to of_msi_xlate(), so the node >> pointer is not ignored by the parse code: > > Is it only being used for MSIs? If so, can we make that explicit in the > API by having the 'filter' device_node pointer? > Yes, I see this is used only in the MSI path via of_msi_xlate(). By filter do you mean the below changes ? here of_map_id() and of_map_msi_id() would accept the filter as a separate parameter so that arg becomes a pure output: int of_map_id(const struct device_node *np, u32 id, const char *map_name, const char *cells_name, const char *map_mask_name, const struct device_node *filter_np, struct of_phandle_args *arg); int of_map_msi_id(const struct device_node *np, u32 id, const struct device_node *filter_np, struct of_phandle_args *arg); of_msi_xlate() would then pass *msi_np as filter_np down to of_map_msi_id and IOMMU callers would pass NULL to of_map_id. Does this look fine ? I can include this in v11. Thanks, Vijay >> >> u32 pci_msi_domain_get_msi_rid(struct irq_domain *domain, struct pci_dev *pdev) >> { >> struct device_node *of_node; >> u32 rid = pci_dev_id(pdev); >> >> pci_for_each_dma_alias(pdev, get_msi_id_cb, &rid); >> >> of_node = irq_domain_get_of_node(domain); >> rid = of_node ? of_msi_xlate(&pdev->dev, &of_node, rid) : >> iort_msi_map_id(&pdev->dev, rid); >> >> return rid; >> } >> >