Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218163/?format=api
{ "id": 2218163, "url": "http://patchwork.ozlabs.org/api/patches/2218163/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260331-parse_iommu_cells-v12-2-decfd305eea9@oss.qualcomm.com/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/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, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260331-parse_iommu_cells-v12-2-decfd305eea9@oss.qualcomm.com>", "list_archive_url": null, "date": "2026-03-31T14:04:47", "name": "[v12,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/people/92739/?format=api", "name": "Vijayanand Jitta", "email": "vijayanand.jitta@oss.qualcomm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260331-parse_iommu_cells-v12-2-decfd305eea9@oss.qualcomm.com/mbox/", "series": [ { "id": 498207, "url": "http://patchwork.ozlabs.org/api/series/498207/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=498207", "date": "2026-03-31T14:04:46", "name": "of: parsing of multi #{iommu,msi}-cells in maps", "version": 12, "mbox": "http://patchwork.ozlabs.org/series/498207/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2218163/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2218163/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-51574-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=ZwBE3med;\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=QdHgpC7I;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-pci+bounces-51574-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=\"ZwBE3med\";\n\tdkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=\"QdHgpC7I\"", "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 tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4flVQt28jcz1y1q\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 01:11:18 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id D0B1030F63F7\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 14:05:59 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id D642F3FADEA;\n\tTue, 31 Mar 2026 14:05:38 +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 E2A7C3FADE0\n\tfor <linux-pci@vger.kernel.org>; Tue, 31 Mar 2026 14:05:32 +0000 (UTC)", "from pps.filterd (m0279873.ppops.net [127.0.0.1])\n\tby mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 62V7svuc430871\n\tfor <linux-pci@vger.kernel.org>; Tue, 31 Mar 2026 14:05:31 GMT", "from mail-pl1-f200.google.com (mail-pl1-f200.google.com\n [209.85.214.200])\n\tby mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4d84bfjv5j-1\n\t(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n\tfor <linux-pci@vger.kernel.org>; Tue, 31 Mar 2026 14:05:31 +0000 (GMT)", "by mail-pl1-f200.google.com with SMTP id\n d9443c01a7336-2b24e45271cso29974335ad.2\n for <linux-pci@vger.kernel.org>; Tue, 31 Mar 2026 07:05:31 -0700 (PDT)", "from hu-vjitta-hyd.qualcomm.com ([202.46.23.25])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b24264292asm118311945ad.4.2026.03.31.07.05.18\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 31 Mar 2026 07:05:28 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774965938; cv=none;\n b=Yo8DTo54anwYClMNB/8rXuFJBZ2Zvk7vHtTSW1P6x1WKHO0MwyLIO8tSbsfYuutxdhPD2c/Kztyshv3zeDWSmrBaV7W9mpiAIh23T0xcv8wENhzZi6HidMjPrPqssz5EZ2Wzy4/bNiXGlCkbRjDcTaro0IJTlUcY7kx7gv7Swe0=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774965938; c=relaxed/simple;\n\tbh=AFVNz1V0mlVDk2rZHCnh21rNF8+JAgNhzyXJ44LFVFE=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=Q6zQCc1IpwSHJAIJF0pPwpCEw/GzN9hM9R2zyKRs2smAVfZohZqffHsUGO79XevVp3YBzBTKBlyOIrJlCKOLaIlIqXcpfyGLy4hZdJWWQAcdLBg1vbEUQ5r6epvNuwLL6S6NQXs+SEvpNM2FwS1ERQwqAnLJBq4swvcAZKXRnKI=", "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=ZwBE3med;\n dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=QdHgpC7I; 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\tVw4qt0eYK9YTsOqpYAiZjJgAyZUidFf8mtBjYqgk2Kw=; b=ZwBE3med9lysXbbD\n\t212MuW8sUcUsa2btNAuYgPAUc+UMpGnl1xbI2vfG6KD4Z4iAiOSf33UySRHOt4Tu\n\tN9IpsAM1db3F7sbefWc9UXpFPAuEeLSkZzG/Fje1feNawGRDd3L4wf5LOQNCJFMr\n\tmb/fEzwnKVxVUaYy2JiVs+kxG0hZ+jTvC8nltX1xjpFFv+8XhPTNkkSdoO3J1lyo\n\tPL0rDcrEXap9W8nJP9png/t8TLhQcsRJ/lAHcsoWQghHFfKP8+C/RUPDtzQNcWxL\n\t4fJ11X89skHYSgjYNDbtZxyTskUMwnQ/p5tLFt3iV0Efy5UrT12rR1I0C3D7yKNy\n\t/EJL8w==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1774965930; x=1775570730;\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=Vw4qt0eYK9YTsOqpYAiZjJgAyZUidFf8mtBjYqgk2Kw=;\n b=QdHgpC7IVfaiBeD5D2j0WvW1aNmG6ClpxL8uV4LaL/C7PJ1OYLXeeJjbGdv5c026I3\n ONS9rRtq1x7VYvD7EbSrYZx+ossZLVksHP1spHO412LfLR0zTUnGK2jCMW7iCU6hJYzW\n +z6C/H2mkCO1qaNhXH5dacLEe3RNsfcKTBgigc59SnuPtRV5Wq1a7aw5j5FLuPv9GTkG\n AKlo8pnsdCGp9aTCVsuYvhCRqaBtfZ7BJJwc7occNqMDmjhrMXrP2TAXiPX/4VecdJLz\n 085m0g4kn1+AJmp1Omuq2MIHWPQKTkBMiccjJnypBKy4ANJcFKfGMkQFd/6x/aeQgSQH\n gl0g==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774965930; x=1775570730;\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=Vw4qt0eYK9YTsOqpYAiZjJgAyZUidFf8mtBjYqgk2Kw=;\n b=dOQASxZuESw6oWmmnvp/S965kWiMohwPGuM1xCJ6lUffH+AaN/l+jt+ag/E2Jt25Y4\n q+GMv5TsRiw1l4loRTLrbzw6O3G4jJ7rir8hTRC/sOb2/yG2e78izfIAFSCopP04Jk1i\n 1zmagJu2AV07KKKdJhHwKLrueOw2hzKzbMNGL8tJyDCVw/fxt5Zh4MZPAHQGYoxLQJ9X\n +Oh1XgHjAakIBat6nEKhZJ/PziRvx9Ym8ehjpII6UhskSRasrRUduROL993Lc0ozCdze\n RCZYFIoGL8bbVByTWqkOjzVHU13qFewgTnglCYXuZeaajuufX6M6hXL+FFMe1e2N9zfu\n 4ZMQ==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCXFpoLKgLn6YRmD9UtE4HogbaaL4tvvG+FI7nbCZ+kOg1gWb8pa0kIvHkmlKIuh8Hj2/X/JH/ASHxg=@vger.kernel.org", "X-Gm-Message-State": "AOJu0Yzbg8Ipf1gjjihA1rDH2yem9UogDPxw3UC3SVsuNzR+ebJpI3Hs\n\tZHbs8Yfrixcd7s29GvetBP6HfbtlzVGHEgsTMuG2i60nAohwgSiamRgi533uvVPjAA7BS/24hOc\n\tIuiNTlDTg/yNJ9EatVRB3cigdcSjG4NBVIZbVzq9Jijg/HQaw8TZ6eZqB4R8cusI=", "X-Gm-Gg": "ATEYQzym52ER85/bphbT4vpAbDGij1avXWaUl2NqmILGT1kl3+gy1+2akR9SWsCdxVE\n\t8fgBW37HeDx8mzojHOg4JfjI3OgVgw0S4sv7n9AqEilmLJYNxBGhGNDn8QNvmN6wcirUzWYUNOa\n\tdQsGjH6+MMwwc5GA7ZuvnAMLtHkaF7xfY0kVfer0ZCJlhJ0lL0+JeofSDY+Tva9GOjUeHNJNAsD\n\tdG7A1vWFJukTujeDgs7O/CUhN4A49X3AHljsafQplPYk6T2VgBxUG4jQ6uYNTwtVtFs1PBePS6h\n\tK//Xaz/kwVAc1BIl0i/98htAAhU1jq4ucK5JHWt+ClgeTYQOwBaiZ/6F9i6OnRO5nbUTuWvxgli\n\tJvnSpJjlJxVcnZlf25DZ0CjfauqGL+QK/lZib8rrQHbNH3W/DNGjr2LDy", "X-Received": [ "by 2002:a17:902:f706:b0:2b2:5a5a:4f2f with SMTP id\n d9443c01a7336-2b25a5a526emr63773645ad.33.1774965929950;\n Tue, 31 Mar 2026 07:05:29 -0700 (PDT)", "by 2002:a17:902:f706:b0:2b2:5a5a:4f2f with SMTP id\n d9443c01a7336-2b25a5a526emr63772865ad.33.1774965929221;\n Tue, 31 Mar 2026 07:05:29 -0700 (PDT)" ], "From": "Vijayanand Jitta <vijayanand.jitta@oss.qualcomm.com>", "Date": "Tue, 31 Mar 2026 19:34:47 +0530", "Subject": "[PATCH v12 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": "<20260331-parse_iommu_cells-v12-2-decfd305eea9@oss.qualcomm.com>", "References": "<20260331-parse_iommu_cells-v12-0-decfd305eea9@oss.qualcomm.com>", "In-Reply-To": "<20260331-parse_iommu_cells-v12-0-decfd305eea9@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=1774965896; l=16797;\n i=vijayanand.jitta@oss.qualcomm.com; s=20260301; h=from:subject:message-id;\n bh=96PMQ0CGK2KUwzmiEbJz9+FKLLeBn/ugSmvWBnHWEG4=;\n b=Sj9HdYruGYOK2x9lzG3NJLUJAImu1Am7r/V4VBBJaBUgTve/cVJ0R0t2vM3asrFtbNrcE4LvP\n tPy5lg1IeDFDU4bBafypwPwg+qNSVlG7PsSaaEMdZgOEyQTEPhZQrN8", "X-Developer-Key": "i=vijayanand.jitta@oss.qualcomm.com; a=ed25519;\n pk=Lpi7Cs3wHe8KZtqvyci7FTOLzsKpEHKGCaPNZw+1zRI=", "X-Authority-Analysis": "v=2.4 cv=INwPywvG c=1 sm=1 tr=0 ts=69cbd4ab cx=c_pps\n a=IZJwPbhc+fLeJZngyXXI0A==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17\n a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10\n a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22\n a=EUspDBNiAAAA:8 a=VwQbUJbxAAAA:8 a=lfH1aMGX5GUcQU68BDUA:9 a=QEXdDO2ut3YA:10\n a=uG9DUKGECoFWVXl0Dc02:22", "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwMzMxMDEzNyBTYWx0ZWRfXzPYP30QrmL2h\n +EAFqPTxiSSdXEAJ3+zukLOS4sq+L1Whsz884KZz39WMWvN2THq2QLfyHyO+vH/ZI7eyqVJhd9r\n CkXSOFHffdCHn5vSuHs4934UCfcAW+YpOPv6TeO56H7ulpNXh2wDJPt2BlF7mb+O9fQ+ETnj4Ha\n gDCi00EjGBNlgdsZHkkulF2UExBEdHQZQu+QPM2m/GetCwtRuJMQ7reXhhH5ZTAHsdNZWbMArRK\n Lc6+WgXrDtb5GOvvpvJmMD3L+gmp9IxWc7Pqoowm2EZaIbzOTfXeNQ+5C9+by7ZnGQaq7USq5Bd\n /nXNc9uWBGfwVmhxNM9E40BU6jB9YsHFLNJoDGA7GI1zIYxJvYewG4HmutKL5tJy64gX+Gc9zHf\n 40zIeBbqbPogF/C0R3HyhwnIbN6RV2Hd7nRFFAmoUWMCuBJnWX1gpuehMRZriUzHIi3NByyOd7G\n yaRwCYdwrLHzOXQPvXg==", "X-Proofpoint-GUID": "Fr1xUnNoDPB0NIZ_6n01XBEbKRUZHj1p", "X-Proofpoint-ORIG-GUID": "Fr1xUnNoDPB0NIZ_6n01XBEbKRUZHj1p", "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-03-31_03,2026-03-31_01,2025-10-01_01", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n suspectscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0\n impostorscore=0 adultscore=0 phishscore=0 priorityscore=1501 spamscore=0\n bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound\n adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001\n definitions=main-2603310137" }, "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\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": [ "v12", "2/3" ] }