Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2220866/?format=api
{ "id": 2220866, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2220866/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260408-parse_iommu_cells-v13-2-fa921e92661b@oss.qualcomm.com/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/1.1/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null }, "msgid": "<20260408-parse_iommu_cells-v13-2-fa921e92661b@oss.qualcomm.com>", "date": "2026-04-08T10:03:26", "name": "[v13,2/3] of: Factor arguments passed to of_map_id() into a struct", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "a91ea082cf0120ca22b50881246e852135242f6c", "submitter": { "id": 92739, "url": "http://patchwork.ozlabs.org/api/1.1/people/92739/?format=api", "name": "Vijayanand Jitta", "email": "vijayanand.jitta@oss.qualcomm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260408-parse_iommu_cells-v13-2-fa921e92661b@oss.qualcomm.com/mbox/", "series": [ { "id": 499113, "url": "http://patchwork.ozlabs.org/api/1.1/series/499113/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=499113", "date": "2026-04-08T10:03:26", "name": "of: parsing of multi #{iommu,msi}-cells in maps", "version": 13, "mbox": "http://patchwork.ozlabs.org/series/499113/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2220866/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2220866/checks/", "tags": {}, "headers": { "Return-Path": "\n <linux-pci+bounces-52145-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-pci@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=LAiLxO1B;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=AIG7GV9e;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=linux-pci+bounces-52145-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com\n header.b=\"LAiLxO1B\";\n\tdkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=\"AIG7GV9e\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=205.220.180.131", "smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=oss.qualcomm.com" ], "Received": [ "from sto.lore.kernel.org (sto.lore.kernel.org\n [IPv6:2600:3c09:e001:a7::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4frJZd55Kpz1xv0\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 08 Apr 2026 20:04:41 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id CAFAE300D0EC\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 8 Apr 2026 10:04:37 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id D46863B635A;\n\tWed, 8 Apr 2026 10:04:16 +0000 (UTC)", "from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com\n [205.220.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C6033B7754\n\tfor <linux-pci@vger.kernel.org>; Wed, 8 Apr 2026 10:04:07 +0000 (UTC)", "from pps.filterd (m0279872.ppops.net [127.0.0.1])\n\tby mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 6386fTrS1619599\n\tfor <linux-pci@vger.kernel.org>; Wed, 8 Apr 2026 10:04:06 GMT", "from mail-pg1-f200.google.com (mail-pg1-f200.google.com\n [209.85.215.200])\n\tby mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ddacrj7tk-1\n\t(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n\tfor <linux-pci@vger.kernel.org>; Wed, 08 Apr 2026 10:04:05 +0000 (GMT)", "by mail-pg1-f200.google.com with SMTP id\n 41be03b00d2f7-c741f038f7cso3117055a12.2\n for <linux-pci@vger.kernel.org>; Wed, 08 Apr 2026 03:04:05 -0700 (PDT)", "from hu-vjitta-hyd.qualcomm.com ([202.46.23.25])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82cf9b5fb22sm25805584b3a.26.2026.04.08.03.03.53\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 08 Apr 2026 03:04:03 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775642656; cv=none;\n b=LiFNOqL21lXev15+ZW5tlw9VMGfZV4oHtKhvdtiq1WdKEthWbQEh7IBnFzeZ3DhObsHXMZskR0EfiZaLCQnTJ/PPI8i+9woSBhNnUHHCUq2ktuf69LXQEDCJmfci2TqrwrVH7pITkqMN8Dg+7HzXE398qfvgDba/Q7tAvmdEgX4=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775642656; c=relaxed/simple;\n\tbh=SaXV0cjkl0rEXAZpMtfUtkVeqGhBFWu4mFEHkaDohuQ=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=eTyRqk0BtCVpDCPk+lBzOQz8R3dJiZuYZ85gRysE6Rflpf7CfOiH2urNC9LijwEoLmzl7Ui5OYfIC0hRnSNfHbnQVDpkOlLQGeeSwvGVMliH9x4j/9O1VXuqj0hyO3yQy2AjJdIdFvUt5Z8LGcs+fvKlKJxodrQJNpPYa1Bi1T0=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com;\n spf=pass smtp.mailfrom=oss.qualcomm.com;\n dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com\n header.b=LAiLxO1B;\n dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=AIG7GV9e; arc=none smtp.client-ip=205.220.180.131", "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n\tcc:content-transfer-encoding:content-type:date:from:in-reply-to\n\t:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=\n\tLftlAsbVwS/LONmw0RaxWOkTUJkuy159/kDEWiGHeOU=; b=LAiLxO1BD7vh+fCW\n\t9zog4cWFQ2aUUAAU4u97Wiww2EYJV4OyZpi+sDmgi/Np69A+k863UMjoG5PoRdM0\n\tSISI8JUICL+4hTBTJ88QfgXfcWRC17hjjK0GUfb+3hUpS0SYGZ4uH2q+K7TZqZ61\n\t4uNjArmo3J0xlCmHTi+T0AwCUOntmNXdvS2oU9Luw33xLYELWUR57/v8ahWPj+gw\n\thXJv2dh91+vbpOwqQ5whS9Wl2q+Zfq/4/kRS4/+DSvwJclnGCjaQSaHaIYfyHiP2\n\tqlhz+nOpf8NLboTUTZDVRBMzXOsUPybAtlEzmi4rCsikKE4U+OO34UyyxyRQ96A1\n\thPMFPw==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1775642645; x=1776247445;\n darn=vger.kernel.org;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to;\n bh=LftlAsbVwS/LONmw0RaxWOkTUJkuy159/kDEWiGHeOU=;\n b=AIG7GV9eSrxA04Ufgp+wG9e+dBh1F88wRTz2rHfK+2sIAerZLqb4hdTMMeI/eCfjsm\n Q1GRQrVN7UWTM87byMkX9EmzSJZtwyUJ/kSuac+f9xO+TE/NPTSIr86Dn17b5+vnusDb\n HNFxeUkCOuMHtEJJkZISTpd5RQX7XN3EF8UNH27DHHsXy+7rGt09ynSAY1/BI7t9kfI9\n g4suJ4RvsIJEsfRr8tu9yRuJDbICTewnQSnCQxDlOhanC57twg5FWGzPtMB9fVEAaTzx\n frIkffpuge2ZmsgEgxzCMcLDiNQkuvTlYXvHOYwjMChPXHATn8n/gHaL++5rx+okw2Wp\n 5oYQ==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775642645; x=1776247445;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=LftlAsbVwS/LONmw0RaxWOkTUJkuy159/kDEWiGHeOU=;\n b=TqgAPxwiCGAPCJZwbZXb48C/wz0DHc9FLMkb1ZALWheAgvjeyUXtHbJQldz1IVXGIN\n /TciyGG9cBcCYBkHKgz8n82PwoAGtUvzOKerRXyQeBzlJ7qPiakssBm4gsKb4etgIgjA\n 5tODOMw4utXE4gzeuQglVsPNCWj2bWVWDMvAsPsKxtCmfb4TFS6aLIKWMWrnaTlZEmti\n O4HycY6ZtVOpCJLj/cvJ/040DqpmXvSwk7ZFKbaMcWD9K2+/+DlUchbjiploTYOT0pyb\n lId/5kmYPslsGSoIQVh8JwsdedNznszvuhctrBuVfYZA95ZlbxFRcxunSiGCkmW5mGwf\n n54Q==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCWQgblx19Sfr69+VI395obr2wITLG89O8Jw/cm6r8fakZViqX6LwmritK49wfahtnMW8QxWiCEwq1Q=@vger.kernel.org", "X-Gm-Message-State": "AOJu0YyALQk0piouLFh8Uv/D13oLz7zxY5JhdIggVL7YOx2GHhJqbO/Y\n\tkOyHLxkETc/YGHXD66xhd+xvzvbueWjajCpfYxcYjzO5lenisaGq6JECPSiNeimonW9OUg7r7v1\n\tO+tnXUsEFB94Ed3GdrIERGSl1IuTOEwD113Z8TCT7CAQ/V13GrhiQZzzyRdvfiok=", "X-Gm-Gg": "AeBDiet1AqBEbimYOWkit9Z6ZlJTk1KwBEGdWfDnzGWydKhq38kfSz4f4AaWUZRUp1B\n\t4NPk9uWB3Ed7sxnVNYFwXzC1FaXcX8Xca9xsVJA18IMgM6Yegr5iFQQFGCyxfBd7Kgc8C+a+Hj0\n\tDbM9i907o3cCF9pVEMzq4u+P1AedlNfZe3C760zlp1eIH7mea57lygn5JFrbh+fZ1CDYaQhjcf8\n\t9JG6VyaQVbgW7XIySBIyUa2DQ2BSHcSZqI3zleSReCryoQkmZ8I1KxEP4L/K+yOvGDl+qVA+/4B\n\teH8JxpMl/1/exHUUcb65kfrTM7rr36CPP6zwlCwGZNANnij+U0UL3RYczth2ZUJcw+QFTGseHym\n\tkQEQGMNasw2+WkV0GbUhRlldYk54z7Ufgwbp6IwbmkjTlcd74TjCAU3fI", "X-Received": [ "by 2002:aa7:9064:0:b0:823:9b7:9c0e with SMTP id\n d2e1a72fcca58-82d0db3fcadmr19724271b3a.34.1775642644409;\n Wed, 08 Apr 2026 03:04:04 -0700 (PDT)", "by 2002:aa7:9064:0:b0:823:9b7:9c0e with SMTP id\n d2e1a72fcca58-82d0db3fcadmr19724216b3a.34.1775642643764;\n Wed, 08 Apr 2026 03:04:03 -0700 (PDT)" ], "From": "Vijayanand Jitta <vijayanand.jitta@oss.qualcomm.com>", "Date": "Wed, 08 Apr 2026 15:33:26 +0530", "Subject": "[PATCH v13 2/3] of: Factor arguments passed to of_map_id() into a\n struct", "Precedence": "bulk", "X-Mailing-List": "linux-pci@vger.kernel.org", "List-Id": "<linux-pci.vger.kernel.org>", "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20260408-parse_iommu_cells-v13-2-fa921e92661b@oss.qualcomm.com>", "References": "<20260408-parse_iommu_cells-v13-0-fa921e92661b@oss.qualcomm.com>", "In-Reply-To": "<20260408-parse_iommu_cells-v13-0-fa921e92661b@oss.qualcomm.com>", "To": "Nipun Gupta <nipun.gupta@amd.com>,\n Nikhil Agarwal <nikhil.agarwal@amd.com>, Joerg Roedel <joro@8bytes.org>,\n Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>,\n Marc Zyngier <maz@kernel.org>, Lorenzo Pieralisi <lpieralisi@kernel.org>,\n Thomas Gleixner <tglx@kernel.org>, Saravana Kannan <saravanak@kernel.org>,\n Richard Zhu <hongxing.zhu@nxp.com>, Lucas Stach <l.stach@pengutronix.de>,\n\t=?utf-8?q?Krzysztof_Wilczy=C5=84ski?= <kwilczynski@kernel.org>,\n Manivannan Sadhasivam <mani@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>,\n Frank Li <Frank.Li@nxp.com>, Sascha Hauer <s.hauer@pengutronix.de>,\n Pengutronix Kernel Team <kernel@pengutronix.de>,\n Fabio Estevam <festevam@gmail.com>, Juergen Gross <jgross@suse.com>,\n Stefano Stabellini <sstabellini@kernel.org>,\n Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,\n Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,\n Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,\n Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>,\n Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,\n Krzysztof Kozlowski <krzk+dt@kernel.org>,\n Prakash Gupta <prakash.gupta@oss.qualcomm.com>,\n Vikash Garodia <vikash.garodia@oss.qualcomm.com>", "Cc": "linux-kernel@vger.kernel.org, iommu@lists.linux.dev,\n linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,\n linux-pci@vger.kernel.org, imx@lists.linux.dev,\n xen-devel@lists.xenproject.org, linux-arm-msm@vger.kernel.org,\n Vijayanand Jitta <vijayanand.jitta@oss.qualcomm.com>,\n Charan Teja Kalla <charan.kalla@oss.qualcomm.com>", "X-Mailer": "b4 0.15.1", "X-Developer-Signature": "v=1; a=ed25519-sha256; t=1775642611; l=16836;\n i=vijayanand.jitta@oss.qualcomm.com; s=20260301; h=from:subject:message-id;\n bh=+iHtXnzXX7tUfRgnJZTT3PPuzqB/B1rZOKoBHBRglbM=;\n b=IAMyeocADMhmvA4SgwDS0z+JbmH0dY67ow40byP8ue4sGh9U7Nn0o8DY6pFoTPPSfd8PgSH2Y\n cWMN/CtdOuNDmBuTSn54zFukHJBLLndS4B3UZ5Te+nNN953oWTRYqsZ", "X-Developer-Key": "i=vijayanand.jitta@oss.qualcomm.com; a=ed25519;\n pk=Lpi7Cs3wHe8KZtqvyci7FTOLzsKpEHKGCaPNZw+1zRI=", "X-Proofpoint-ORIG-GUID": "bKzW5v1pIzCOWLkM-1C9Z4GV4pB7DmOT", "X-Proofpoint-GUID": "bKzW5v1pIzCOWLkM-1C9Z4GV4pB7DmOT", "X-Authority-Analysis": "v=2.4 cv=WZs8rUhX c=1 sm=1 tr=0 ts=69d62815 cx=c_pps\n a=oF/VQ+ItUULfLr/lQ2/icg==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17\n a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10\n a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22\n a=EUspDBNiAAAA:8 a=8AirrxEcAAAA:8 a=VwQbUJbxAAAA:8 a=NTCK2b4J3l3c-VTkqyoA:9\n a=QEXdDO2ut3YA:10 a=3WC7DwWrALyhR5TkjVHa:22 a=ST-jHhOKWsTCqRlWije3:22", "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDA4MDA5MSBTYWx0ZWRfX0bOThiupJnCD\n dGRURy9mxDxovoqS6nEFIvUQ+IPJRYPDyQf3Sy/FE6yWn8VNS7wsHOWIswS7fUofA2mLaS2N46u\n SP82GRB0Q399vmRCL48bZg0x8UFX8NmgIg40JGLVmKBwdzSxOtluwI5kk72yFq0w9gGlVMs4NEU\n IXKKAIormVwsBBeky8ssuD6OCyId13O8/UGMk9dC6K6ZSBRZuc60IS6oZcs9DHKIyStjh+DkCg3\n NZgMYMZXTJVtfuOJvPJGkO/NtlUc9JYAaKLmgYgEhtc1VICtDOMxZ5VehLK6W6aWrLXJyWkSwKR\n +nxY5qWItXnt6AQ7vZMZBqOn/2RFXydueL0KkMGb3Iuw5aX+PnNl2y94vPZ1hPIPYJpl9BgwJKw\n st1G+O7Swu69kHnrXi8HAbQP3BQX1kXjOh5hctOFNCV4FLyxUylgCR/QCVSX3+THoeRkAri8l55\n 5gEm2xc3TWDr2R/5X2w==", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-08_03,2026-04-08_01,2025-10-01_01", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n suspectscore=0 malwarescore=0 adultscore=0 phishscore=0 clxscore=1015\n bulkscore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 impostorscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604080091" }, "content": "From: Charan Teja Kalla <charan.kalla@oss.qualcomm.com>\n\nChange of_map_id() to take a pointer to struct of_phandle_args\ninstead of passing target device node and translated IDs separately.\nUpdate all callers accordingly.\n\nAdd an explicit filter_np parameter to of_map_id() and of_map_msi_id()\nto separate the filter input from the output. Previously, the target\nparameter served dual purpose: as an input filter (if non-NULL, only\nmatch entries targeting that node) and as an output (receiving the\nmatched node with a reference held). Now filter_np is the explicit\ninput filter and arg->np is the pure output.\n\nPreviously, of_map_id() would call of_node_put() on the matched node\nwhen a filter was provided, making reference ownership inconsistent.\nRemove this internal of_node_put() call so that of_map_id() now always\ntransfers ownership of the matched node reference to the caller via\narg->np. Callers are now consistently responsible for releasing this\nreference with of_node_put(arg->np) when done.\n\nAcked-by: Frank Li <Frank.Li@nxp.com>\nSuggested-by: Rob Herring (Arm) <robh@kernel.org>\nSuggested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>\nSigned-off-by: Charan Teja Kalla <charan.kalla@oss.qualcomm.com>\nSigned-off-by: Vijayanand Jitta <vijayanand.jitta@oss.qualcomm.com>\n---\n drivers/cdx/cdx_msi.c | 7 ++--\n drivers/iommu/of_iommu.c | 4 +-\n drivers/irqchip/irq-gic-its-msi-parent.c | 11 ++++--\n drivers/of/base.c | 68 +++++++++++++++++---------------\n drivers/of/irq.c | 10 ++++-\n drivers/pci/controller/dwc/pci-imx6.c | 32 +++++++--------\n drivers/pci/controller/pcie-apple.c | 5 ++-\n drivers/xen/grant-dma-ops.c | 4 +-\n include/linux/of.h | 14 ++++---\n 9 files changed, 89 insertions(+), 66 deletions(-)", "diff": "diff --git a/drivers/cdx/cdx_msi.c b/drivers/cdx/cdx_msi.c\nindex 63b3544ec997..6924e07c7528 100644\n--- a/drivers/cdx/cdx_msi.c\n+++ b/drivers/cdx/cdx_msi.c\n@@ -121,22 +121,23 @@ static int cdx_msi_prepare(struct irq_domain *msi_domain,\n \t\t\t struct device *dev,\n \t\t\t int nvec, msi_alloc_info_t *info)\n {\n+\tstruct of_phandle_args msi_spec = {};\n \tstruct cdx_device *cdx_dev = to_cdx_device(dev);\n \tstruct device *parent = cdx_dev->cdx->dev;\n \tstruct msi_domain_info *msi_info;\n-\tu32 dev_id;\n \tint ret;\n \n \t/* Retrieve device ID from requestor ID using parent device */\n-\tret = of_map_msi_id(parent->of_node, cdx_dev->msi_dev_id, NULL, &dev_id);\n+\tret = of_map_msi_id(parent->of_node, cdx_dev->msi_dev_id, NULL, &msi_spec);\n \tif (ret) {\n \t\tdev_err(dev, \"of_map_id failed for MSI: %d\\n\", ret);\n \t\treturn ret;\n \t}\n+\tof_node_put(msi_spec.np);\n \n #ifdef GENERIC_MSI_DOMAIN_OPS\n \t/* Set the device Id to be passed to the GIC-ITS */\n-\tinfo->scratchpad[0].ul = dev_id;\n+\tinfo->scratchpad[0].ul = msi_spec.args[0];\n #endif\n \n \tmsi_info = msi_get_domain_info(msi_domain->parent);\ndiff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c\nindex a511ecf21fcd..a18bb60f6f3d 100644\n--- a/drivers/iommu/of_iommu.c\n+++ b/drivers/iommu/of_iommu.c\n@@ -45,10 +45,10 @@ static int of_iommu_configure_dev_id(struct device_node *master_np,\n \t\t\t\t struct device *dev,\n \t\t\t\t const u32 *id)\n {\n-\tstruct of_phandle_args iommu_spec = { .args_count = 1 };\n+\tstruct of_phandle_args iommu_spec = {};\n \tint err;\n \n-\terr = of_map_iommu_id(master_np, *id, &iommu_spec.np, iommu_spec.args);\n+\terr = of_map_iommu_id(master_np, *id, &iommu_spec);\n \tif (err)\n \t\treturn err;\n \ndiff --git a/drivers/irqchip/irq-gic-its-msi-parent.c b/drivers/irqchip/irq-gic-its-msi-parent.c\nindex b63343a227a9..dd5f84b6470a 100644\n--- a/drivers/irqchip/irq-gic-its-msi-parent.c\n+++ b/drivers/irqchip/irq-gic-its-msi-parent.c\n@@ -152,6 +152,8 @@ static int its_v5_pci_msi_prepare(struct irq_domain *domain, struct device *dev,\n static int of_pmsi_get_msi_info(struct irq_domain *domain, struct device *dev, u32 *dev_id,\n \t\t\t\tphys_addr_t *pa)\n {\n+\tstruct device_node *msi_ctrl __free(device_node) = NULL;\n+\tstruct of_phandle_args msi_spec = {};\n \tstruct of_phandle_iterator it;\n \tint ret;\n \n@@ -178,9 +180,12 @@ static int of_pmsi_get_msi_info(struct irq_domain *domain, struct device *dev, u\n \t\t}\n \t}\n \n-\tstruct device_node *msi_ctrl __free(device_node) = NULL;\n-\n-\treturn of_map_msi_id(dev->of_node, dev->id, &msi_ctrl, dev_id);\n+\tret = of_map_msi_id(dev->of_node, dev->id, NULL, &msi_spec);\n+\tif (!ret) {\n+\t\tmsi_ctrl = msi_spec.np;\n+\t\t*dev_id = msi_spec.args[0];\n+\t}\n+\treturn ret;\n }\n \n static int its_pmsi_prepare(struct irq_domain *domain, struct device *dev,\ndiff --git a/drivers/of/base.c b/drivers/of/base.c\nindex ae04487bd614..b3d002015192 100644\n--- a/drivers/of/base.c\n+++ b/drivers/of/base.c\n@@ -2102,36 +2102,37 @@ int of_find_last_cache_level(unsigned int cpu)\n * @id: device ID to map.\n * @map_name: property name of the map to use.\n * @map_mask_name: optional property name of the mask to use.\n- * @target: optional pointer to a target device node.\n- * @id_out: optional pointer to receive the translated ID.\n+ * @filter_np: optional device node to filter matches by, or NULL to match any.\n+ *\tIf non-NULL, only map entries targeting this node will be matched.\n+ * @arg: pointer to a &struct of_phandle_args for the result. On success,\n+ *\t@arg->args[0] will contain the translated ID. If a map entry was\n+ *\tmatched, @arg->np will be set to the target node with a reference\n+ *\theld that the caller must release with of_node_put().\n *\n * Given a device ID, look up the appropriate implementation-defined\n * platform ID and/or the target device which receives transactions on that\n- * ID, as per the \"iommu-map\" and \"msi-map\" bindings. Either of @target or\n- * @id_out may be NULL if only the other is required. If @target points to\n- * a non-NULL device node pointer, only entries targeting that node will be\n- * matched; if it points to a NULL value, it will receive the device node of\n- * the first matching target phandle, with a reference held.\n+ * ID, as per the \"iommu-map\" and \"msi-map\" bindings.\n *\n * Return: 0 on success or a standard error code on failure.\n */\n int of_map_id(const struct device_node *np, u32 id,\n \t const char *map_name, const char *map_mask_name,\n-\t struct device_node **target, u32 *id_out)\n+\t const struct device_node *filter_np, struct of_phandle_args *arg)\n {\n \tu32 map_mask, masked_id;\n \tint map_len;\n \tconst __be32 *map = NULL;\n \n-\tif (!np || !map_name || (!target && !id_out))\n+\tif (!np || !map_name || !arg)\n \t\treturn -EINVAL;\n \n \tmap = of_get_property(np, map_name, &map_len);\n \tif (!map) {\n-\t\tif (target)\n+\t\tif (filter_np)\n \t\t\treturn -ENODEV;\n \t\t/* Otherwise, no map implies no translation */\n-\t\t*id_out = id;\n+\t\targ->args[0] = id;\n+\t\targ->args_count = 1;\n \t\treturn 0;\n \t}\n \n@@ -2173,18 +2174,14 @@ int of_map_id(const struct device_node *np, u32 id,\n \t\tif (!phandle_node)\n \t\t\treturn -ENODEV;\n \n-\t\tif (target) {\n-\t\t\tif (*target)\n-\t\t\t\tof_node_put(phandle_node);\n-\t\t\telse\n-\t\t\t\t*target = phandle_node;\n-\n-\t\t\tif (*target != phandle_node)\n-\t\t\t\tcontinue;\n+\t\tif (filter_np && filter_np != phandle_node) {\n+\t\t\tof_node_put(phandle_node);\n+\t\t\tcontinue;\n \t\t}\n \n-\t\tif (id_out)\n-\t\t\t*id_out = masked_id - id_base + out_base;\n+\t\targ->np = phandle_node;\n+\t\targ->args[0] = masked_id - id_base + out_base;\n+\t\targ->args_count = 1;\n \n \t\tpr_debug(\"%pOF: %s, using mask %08x, id-base: %08x, out-base: %08x, length: %08x, id: %08x -> %08x\\n\",\n \t\t\tnp, map_name, map_mask, id_base, out_base,\n@@ -2193,11 +2190,11 @@ int of_map_id(const struct device_node *np, u32 id,\n \t}\n \n \tpr_info(\"%pOF: no %s translation for id 0x%x on %pOF\\n\", np, map_name,\n-\t\tid, target && *target ? *target : NULL);\n+\t\tid, filter_np);\n \n \t/* Bypasses translation */\n-\tif (id_out)\n-\t\t*id_out = id;\n+\targ->args[0] = id;\n+\targ->args_count = 1;\n \treturn 0;\n }\n EXPORT_SYMBOL_GPL(of_map_id);\n@@ -2207,17 +2204,19 @@ EXPORT_SYMBOL_GPL(of_map_id);\n * @np: root complex device node.\n * @id: Requester ID of the device (e.g. PCI RID/BDF or a platform\n * stream/device ID) used as the lookup key in the iommu-map table.\n- * @target: optional pointer to a target device node.\n- * @id_out: optional pointer to receive the translated ID.\n+ * @arg: pointer to a &struct of_phandle_args for the result. On success,\n+ *\t@arg->args[0] contains the translated ID. If a map entry was matched,\n+ *\t@arg->np holds a reference to the target node that the caller must\n+ *\trelease with of_node_put().\n *\n * Convenience wrapper around of_map_id() using \"iommu-map\" and \"iommu-map-mask\".\n *\n * Return: 0 on success or a standard error code on failure.\n */\n int of_map_iommu_id(const struct device_node *np, u32 id,\n-\t\t struct device_node **target, u32 *id_out)\n+\t\t struct of_phandle_args *arg)\n {\n-\treturn of_map_id(np, id, \"iommu-map\", \"iommu-map-mask\", target, id_out);\n+\treturn of_map_id(np, id, \"iommu-map\", \"iommu-map-mask\", NULL, arg);\n }\n EXPORT_SYMBOL_GPL(of_map_iommu_id);\n \n@@ -2226,16 +2225,21 @@ EXPORT_SYMBOL_GPL(of_map_iommu_id);\n * @np: root complex device node.\n * @id: Requester ID of the device (e.g. PCI RID/BDF or a platform\n * stream/device ID) used as the lookup key in the msi-map table.\n- * @target: optional pointer to a target device node.\n- * @id_out: optional pointer to receive the translated ID.\n+ * @filter_np: optional MSI controller node to filter matches by, or NULL\n+ *\tto match any. If non-NULL, only map entries targeting this node will\n+ *\tbe matched.\n+ * @arg: pointer to a &struct of_phandle_args for the result. On success,\n+ *\t@arg->args[0] contains the translated ID. If a map entry was matched,\n+ *\t@arg->np holds a reference to the target node that the caller must\n+ *\trelease with of_node_put().\n *\n * Convenience wrapper around of_map_id() using \"msi-map\" and \"msi-map-mask\".\n *\n * Return: 0 on success or a standard error code on failure.\n */\n int of_map_msi_id(const struct device_node *np, u32 id,\n-\t\t struct device_node **target, u32 *id_out)\n+\t\t const struct device_node *filter_np, struct of_phandle_args *arg)\n {\n-\treturn of_map_id(np, id, \"msi-map\", \"msi-map-mask\", target, id_out);\n+\treturn of_map_id(np, id, \"msi-map\", \"msi-map-mask\", filter_np, arg);\n }\n EXPORT_SYMBOL_GPL(of_map_msi_id);\ndiff --git a/drivers/of/irq.c b/drivers/of/irq.c\nindex e37c1b3f8736..f86a56bd81fc 100644\n--- a/drivers/of/irq.c\n+++ b/drivers/of/irq.c\n@@ -817,8 +817,16 @@ u32 of_msi_xlate(struct device *dev, struct device_node **msi_np, u32 id_in)\n \t * \"msi-map\" or an \"msi-parent\" property.\n \t */\n \tfor (parent_dev = dev; parent_dev; parent_dev = parent_dev->parent) {\n-\t\tif (!of_map_msi_id(parent_dev->of_node, id_in, msi_np, &id_out))\n+\t\tstruct of_phandle_args msi_spec = {};\n+\n+\t\tif (!of_map_msi_id(parent_dev->of_node, id_in, *msi_np, &msi_spec)) {\n+\t\t\tid_out = msi_spec.args[0];\n+\t\t\tif (!*msi_np)\n+\t\t\t\t*msi_np = msi_spec.np;\n+\t\t\telse\n+\t\t\t\tof_node_put(msi_spec.np);\n \t\t\tbreak;\n+\t\t}\n \t\tif (!of_check_msi_parent(parent_dev->of_node, msi_np))\n \t\t\tbreak;\n \t}\ndiff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c\nindex bff8289f804a..c0544d9c0921 100644\n--- a/drivers/pci/controller/dwc/pci-imx6.c\n+++ b/drivers/pci/controller/dwc/pci-imx6.c\n@@ -1137,30 +1137,32 @@ static void imx_pcie_remove_lut(struct imx_pcie *imx_pcie, u16 rid)\n \n static int imx_pcie_add_lut_by_rid(struct imx_pcie *imx_pcie, u32 rid)\n {\n+\tstruct of_phandle_args iommu_spec = {};\n+\tstruct of_phandle_args msi_spec = {};\n \tstruct device *dev = imx_pcie->pci->dev;\n-\tstruct device_node *target;\n \tu32 sid_i, sid_m;\n \tint err_i, err_m;\n \tu32 sid = 0;\n \n-\ttarget = NULL;\n-\terr_i = of_map_iommu_id(dev->of_node, rid, &target, &sid_i);\n-\tif (target) {\n-\t\tof_node_put(target);\n-\t} else {\n+\terr_i = of_map_iommu_id(dev->of_node, rid, &iommu_spec);\n+\tif (!err_i)\n+\t\tsid_i = iommu_spec.args[0];\n+\tof_node_put(iommu_spec.np);\n+\tif (!err_i && !iommu_spec.np) {\n \t\t/*\n-\t\t * \"target == NULL && err_i == 0\" means RID out of map range.\n-\t\t * Use 1:1 map RID to streamID. Hardware can't support this\n-\t\t * because the streamID is only 6 bits\n+\t\t * \"iommu_spec.np == NULL && err_i == 0\" means RID out of map\n+\t\t * range. Use 1:1 map RID to streamID. Hardware can't support\n+\t\t * this because the streamID is only 6 bits.\n \t\t */\n \t\terr_i = -EINVAL;\n \t}\n \n-\ttarget = NULL;\n-\terr_m = of_map_msi_id(dev->of_node, rid, &target, &sid_m);\n-\n+\terr_m = of_map_msi_id(dev->of_node, rid, NULL, &msi_spec);\n+\tif (!err_m)\n+\t\tsid_m = msi_spec.args[0];\n+\tof_node_put(msi_spec.np);\n \t/*\n-\t * err_m target\n+\t * err_m msi_spec.np\n \t *\t0\tNULL\t\tRID out of range. Use 1:1 map RID to\n \t *\t\t\t\tstreamID, Current hardware can't\n \t *\t\t\t\tsupport it, so return -EINVAL.\n@@ -1168,10 +1170,8 @@ static int imx_pcie_add_lut_by_rid(struct imx_pcie *imx_pcie, u32 rid)\n \t *\t0\t!= NULL\t\tGet correct streamID from RID\n \t *\t!= 0\t!= NULL\t\tInvalid combination\n \t */\n-\tif (!err_m && !target)\n+\tif (!err_m && !msi_spec.np)\n \t\treturn -EINVAL;\n-\telse if (target)\n-\t\tof_node_put(target); /* Find streamID map entry for RID in msi-map */\n \n \t/*\n \t * msi-map iommu-map\ndiff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c\nindex a0937b7b3c4d..c2cffc0659f4 100644\n--- a/drivers/pci/controller/pcie-apple.c\n+++ b/drivers/pci/controller/pcie-apple.c\n@@ -755,6 +755,7 @@ static int apple_pcie_enable_device(struct pci_host_bridge *bridge, struct pci_d\n {\n \tu32 sid, rid = pci_dev_id(pdev);\n \tstruct apple_pcie_port *port;\n+\tstruct of_phandle_args iommu_spec = {};\n \tint idx, err;\n \n \tport = apple_pcie_get_port(pdev);\n@@ -764,10 +765,12 @@ static int apple_pcie_enable_device(struct pci_host_bridge *bridge, struct pci_d\n \tdev_dbg(&pdev->dev, \"added to bus %s, index %d\\n\",\n \t\tpci_name(pdev->bus->self), port->idx);\n \n-\terr = of_map_iommu_id(port->pcie->dev->of_node, rid, NULL, &sid);\n+\terr = of_map_iommu_id(port->pcie->dev->of_node, rid, &iommu_spec);\n \tif (err)\n \t\treturn err;\n \n+\tof_node_put(iommu_spec.np);\n+\tsid = iommu_spec.args[0];\n \tmutex_lock(&port->pcie->lock);\n \n \tidx = bitmap_find_free_region(port->sid_map, port->sid_map_sz, 0);\ndiff --git a/drivers/xen/grant-dma-ops.c b/drivers/xen/grant-dma-ops.c\nindex 1b7696b2d762..2aa1a772a0ff 100644\n--- a/drivers/xen/grant-dma-ops.c\n+++ b/drivers/xen/grant-dma-ops.c\n@@ -319,13 +319,13 @@ static int xen_dt_grant_init_backend_domid(struct device *dev,\n \t\t\t\t\t struct device_node *np,\n \t\t\t\t\t domid_t *backend_domid)\n {\n-\tstruct of_phandle_args iommu_spec = { .args_count = 1 };\n+\tstruct of_phandle_args iommu_spec = {};\n \n \tif (dev_is_pci(dev)) {\n \t\tstruct pci_dev *pdev = to_pci_dev(dev);\n \t\tu32 rid = PCI_DEVID(pdev->bus->number, pdev->devfn);\n \n-\t\tif (of_map_iommu_id(np, rid, &iommu_spec.np, iommu_spec.args)) {\n+\t\tif (of_map_iommu_id(np, rid, &iommu_spec)) {\n \t\t\tdev_dbg(dev, \"Cannot translate ID\\n\");\n \t\t\treturn -ESRCH;\n \t\t}\ndiff --git a/include/linux/of.h b/include/linux/of.h\nindex fe841f3cc747..8548cd9eb4f1 100644\n--- a/include/linux/of.h\n+++ b/include/linux/of.h\n@@ -463,13 +463,13 @@ bool of_console_check(const struct device_node *dn, char *name, int index);\n \n int of_map_id(const struct device_node *np, u32 id,\n \t const char *map_name, const char *map_mask_name,\n-\t struct device_node **target, u32 *id_out);\n+\t const struct device_node *filter_np, struct of_phandle_args *arg);\n \n int of_map_iommu_id(const struct device_node *np, u32 id,\n-\t\t struct device_node **target, u32 *id_out);\n+\t\t struct of_phandle_args *arg);\n \n int of_map_msi_id(const struct device_node *np, u32 id,\n-\t\t struct device_node **target, u32 *id_out);\n+\t\t const struct device_node *filter_np, struct of_phandle_args *arg);\n \n phys_addr_t of_dma_get_max_cpu_address(struct device_node *np);\n \n@@ -935,19 +935,21 @@ static inline void of_property_clear_flag(struct property *p, unsigned long flag\n \n static inline int of_map_id(const struct device_node *np, u32 id,\n \t\t\t const char *map_name, const char *map_mask_name,\n-\t\t\t struct device_node **target, u32 *id_out)\n+\t\t\t const struct device_node *filter_np,\n+\t\t\t struct of_phandle_args *arg)\n {\n \treturn -EINVAL;\n }\n \n static inline int of_map_iommu_id(const struct device_node *np, u32 id,\n-\t\t\t\t struct device_node **target, u32 *id_out)\n+\t\t\t\t struct of_phandle_args *arg)\n {\n \treturn -EINVAL;\n }\n \n static inline int of_map_msi_id(const struct device_node *np, u32 id,\n-\t\t\t\tstruct device_node **target, u32 *id_out)\n+\t\t\t\tconst struct device_node *filter_np,\n+\t\t\t\tstruct of_phandle_args *arg)\n {\n \treturn -EINVAL;\n }\n", "prefixes": [ "v13", "2/3" ] }