Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2215822/?format=api
{ "id": 2215822, "url": "http://patchwork.ozlabs.org/api/patches/2215822/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260325-parse_iommu_cells-v11-2-1fefa5c0e82c@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": "<20260325-parse_iommu_cells-v11-2-1fefa5c0e82c@oss.qualcomm.com>", "list_archive_url": null, "date": "2026-03-25T11:08:23", "name": "[v11,2/3] of: Factor arguments passed to of_map_id() into a struct", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "5ff3bdaeeddfa9f562cace19c130a6bfdaba6888", "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/20260325-parse_iommu_cells-v11-2-1fefa5c0e82c@oss.qualcomm.com/mbox/", "series": [ { "id": 497422, "url": "http://patchwork.ozlabs.org/api/series/497422/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=497422", "date": "2026-03-25T11:08:21", "name": "of: parsing of multi #{iommu,msi}-cells in maps", "version": 11, "mbox": "http://patchwork.ozlabs.org/series/497422/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2215822/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2215822/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-51052-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=ElBL7M58;\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=R9peUXe9;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-51052-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=\"ElBL7M58\";\n\tdkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=\"R9peUXe9\"", "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 sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::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 4fgkvD39JGz1y1K\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 22:19:20 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 018C6317E973\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 11:10:13 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 38BCC3CEB8F;\n\tWed, 25 Mar 2026 11:09:37 +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 7EA133CE48B\n\tfor <linux-pci@vger.kernel.org>; Wed, 25 Mar 2026 11:09:34 +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 62P7dSo72276783\n\tfor <linux-pci@vger.kernel.org>; Wed, 25 Mar 2026 11:09:33 GMT", "from mail-pf1-f200.google.com (mail-pf1-f200.google.com\n [209.85.210.200])\n\tby mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4d40ratu5e-1\n\t(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n\tfor <linux-pci@vger.kernel.org>; Wed, 25 Mar 2026 11:09:33 +0000 (GMT)", "by mail-pf1-f200.google.com with SMTP id\n d2e1a72fcca58-82c2054b584so16314899b3a.2\n for <linux-pci@vger.kernel.org>; Wed, 25 Mar 2026 04:09:33 -0700 (PDT)", "from hu-vjitta-hyd.qualcomm.com ([202.46.23.25])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82b040da7besm14615911b3a.49.2026.03.25.04.09.20\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 25 Mar 2026 04:09:31 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774436976; cv=none;\n b=JziouALx00i4PFJktWh9Vp3JYF9HVIekXNS7bYDKCJaQpTf4ivPl3bLHJ63GaTBcFM7x9iTH7zzv/Drla1m1Rv0EJpBCXk80Q5NopszrvTnWwDlIbANK4rZzcB8XfADSRymhkW8D1GzHlc0Qe9Lga4U/oGhXblIOkqBFGTao3aE=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774436976; c=relaxed/simple;\n\tbh=50/McAzCfnfZeAKLApvc4GVUf6TH117s5hb7iCyl0RY=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=gCPClqXKKEK0YRFaTQwGnhwQAZctJpCwIFRmfR3+raVOcu0dhJ9TXD5MDpuMJu8GDPY0UbLEJOUSinpRxdQuyWq7ds71R1ouiYNB6Z5NWTemaHcj+TmBngiw9v9vw4TnL3S+RfKXpk2tESk+kt/Odp5v2Rkjh+OMauQn5FcoMH8=", "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=ElBL7M58;\n dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=R9peUXe9; 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\tlgE7Zsp3SLiKEODF/sUpup/AAiqq/KxN2EHDiN7r6NY=; b=ElBL7M58XLrUhGkH\n\thc/3bNYY22usBRcqSpIiXXXfiQ/1JbJkaSSDb22QEvJGB1w2HZLUW8BCavwgToTW\n\t7iA9b3n1jWAQbCJILAMozSjaMMmc7C+WYfHJp+VzHSpfTqAf2E0q1w9MeMiP/vyM\n\tBGgnfelVK1SoVvlfx97PpcLNU7niq+b/ZTJ+sCX0aKtXma1XQRZOC5+3AHWUIoA6\n\tKGRBjvM+V7CPnExeVIqaM1551EcRcHGwi42+0l4KD6/5VcYhP3IEExMdDFcwnm9J\n\tWGDrl6/lbJ2KnS2ClRIDs3zttRvyg0mxstze7zvwGQuK4vS6Uax+8jy0iPCFo6B0\n\tH77FOQ==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1774436972; x=1775041772;\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=lgE7Zsp3SLiKEODF/sUpup/AAiqq/KxN2EHDiN7r6NY=;\n b=R9peUXe9t9CG6ywCG2mk3Px6B0XxrxYkIsA2yXRtJzwxraDK/cmSe2hGReWA4TIxyX\n yfr4ihb77Mo8woHeadGOBZv2BRpd/HuYzpLR/iDXWItCCVqcsnYp3wDwhZ3ysE2f6U0/\n jje6ZPFIIY5RGUq/T+bI1Bv2pCUYgn01ong9efnlyhulxBbiJ0fZjLugqb8ggIl0/1D0\n 7zo+IuCjdwPNhuk9z0pAdW+hAOMN9cYjV5+HJn/iD9Q15POem6L5CLEvetSQZ8S8SzRz\n 2n5JeZcVx7f31BP7WLAW/5EP+HeJUoDzFlCsjC+lVlZPTQglbKM/zaloyxgeoXGNEakm\n N2AQ==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774436972; x=1775041772;\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=lgE7Zsp3SLiKEODF/sUpup/AAiqq/KxN2EHDiN7r6NY=;\n b=QbqhmlMgSAvYOPgCG+bdeOK7JLqWI+af05NtVllk2Fy0eAG/YOOPsdHKnn4eheVOwt\n iFr2pT7hk5hE+9PQr2Z9fFObBJ1Zx7r2NNOwxFp3QiFh6PiE9V2wIyagojliSK5/wVTS\n QOz6tJbxaaQO++b+CgVQUe5oTCta4+5EInsIRSigm/NluLxq4bL3Rd6dNPgZAG7MIngT\n clqGgGM8QvV4VowLsCrn0o37GdGG84GDkVX4d8Afdkwmx19j1RqPcijLGqiaLlnXuQbK\n 3GphcjaNv+OnP3bYr0Ige1rqBb6ddb3qf7t0cv30RntC5SLJm/gSX9+fMfUKgV0va1x2\n cMhA==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCXTxbryMiE35d07pV0YlrdWvtWyoyYZVlu8jM2U+/ItNyVIOh4Q7OuqrxYWfCTEzeUwUvwAlPJ1Seg=@vger.kernel.org", "X-Gm-Message-State": "AOJu0Ywp9KlNL2hLxD2TJG2tTqrAJPV4Z5yWC2kourY7IGenlBjOaHYg\n\tbo8SJ01Omv4X/zf/viCmne7HtJnaSMmEsIvE8mUpqVow0alJFDw3orrsQLCuMZs3i/vdRsTcyRn\n\tgmRl/kYr18o/FZslJzYorq/kXn7NrTnQMK78WpD3z8B3EMabyXWnceisCeAyw9Zs=", "X-Gm-Gg": "ATEYQzzUNbQfigaMJr/AVSXTU8+5gCb2BZPjyEjd9gIBr3PshRZAiQs++U/tER5UOCN\n\tOXcXIKNMGML4cmYRwUVaRUeuI9snEiQEwJducG4+TGDYrAgImtjcJsBOGRfVKibf2CcdPcrPuql\n\tOZxLVfxFMW9eMLvXPBcLYqbiBi7mKJQtWq/NQK8nbbz6V4JL+IVnuC+yy3pmedwo2by9GPYdOpe\n\tjcKFdodi5MpvTdGiY45x+6VLTBEro4Y2j67nM9ECUpKPvnH+HzjuTOwbSLD8G24+ve9UjXkiK/L\n\tWjaGEV+FSvNmfk8tnIh/Y4+8W98PCXZ8bO+Z2o9XBeQEjUT9l96DJrCashv1/jPwreVBvPtVPeA\n\tc2bNgo1a6bMzz7SQ/C4hzlP3OgLrOq0JKnGfq/YwUfeRSQTbaPHOEDx2U", "X-Received": [ "by 2002:a05:6a00:10cf:b0:829:9c5d:4342 with SMTP id\n d2e1a72fcca58-82c6e15d271mr2811222b3a.54.1774436972243;\n Wed, 25 Mar 2026 04:09:32 -0700 (PDT)", "by 2002:a05:6a00:10cf:b0:829:9c5d:4342 with SMTP id\n d2e1a72fcca58-82c6e15d271mr2811177b3a.54.1774436971553;\n Wed, 25 Mar 2026 04:09:31 -0700 (PDT)" ], "From": "Vijayanand Jitta <vijayanand.jitta@oss.qualcomm.com>", "Date": "Wed, 25 Mar 2026 16:38:23 +0530", "Subject": "[PATCH v11 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": "<20260325-parse_iommu_cells-v11-2-1fefa5c0e82c@oss.qualcomm.com>", "References": "<20260325-parse_iommu_cells-v11-0-1fefa5c0e82c@oss.qualcomm.com>", "In-Reply-To": "<20260325-parse_iommu_cells-v11-0-1fefa5c0e82c@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.12.3", "X-Developer-Signature": "v=1; a=ed25519-sha256; t=1774436939; l=16000;\n i=vijayanand.jitta@oss.qualcomm.com; s=20260301; h=from:subject:message-id;\n bh=gxyh8n3UqUiPA5dAPelXlk+6i5RBUb4GI89qh+AaKkQ=;\n b=cmC+TnDCTT7br0djfe9TJoPc8+8f1hTHJV9CIDTZRNBzWhCXkwhBe4lpX9dunABLkIBgsSpny\n Cd2K8mf9v2aDmz80oQoKSUpbWQg3qYP/LgX0C1TVvUKvw6nxE063Mxx", "X-Developer-Key": "i=vijayanand.jitta@oss.qualcomm.com; a=ed25519;\n pk=Lpi7Cs3wHe8KZtqvyci7FTOLzsKpEHKGCaPNZw+1zRI=", "X-Authority-Analysis": "v=2.4 cv=Jvr8bc4C c=1 sm=1 tr=0 ts=69c3c26d cx=c_pps\n a=mDZGXZTwRPZaeRUbqKGCBw==: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=bNhV2RZpjyF2osP7l7QA:9 a=QEXdDO2ut3YA:10\n a=zc0IvFSfCIW2DFIPzwfm:22", "X-Proofpoint-ORIG-GUID": "SjtIJZHZw_-KofaI917RmBmyU5iWM3gn", "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwMzI1MDA3OSBTYWx0ZWRfX1zz6wWqjDJnm\n ouWAY5ukpwUjossM5RlhVi4txsMyUcabnrk07e0A0rbqbTgxZHA7KZZACFgWPVF3UMf485Eqzeb\n AikrCZNic364bz1lDJQkZZAJ0y1ATJKqgel1uHSwmywkkiCxjOVH9/RDNPW9AMP7pqfXL/6c89y\n akPNUAFXlN878ReT9upBe419/Bi2EL7VxQdewZg4cPcI187wqVhnVbF++OwPcM7ukhPq258xygx\n bSXbPsUMtLbDc0bqjxUYflcpAANLpYDZZgubHK3BCXJu2fyMPFmgA+R8mbbI/1931Ee1bZiNAwo\n oUXnFX1lisFx5p9jLaNUnQlSPpwUKcdewaws3JGUHlQ68CKfOpZvocMpiEZdcsAdBEi3Sr/YMkA\n ISz95YtupfczUWdj3rIU7GnXRE+oXhd9Y6EzOt8hg4V1SMYjYhiB/8LDJss9L2Vsmj1UFx3yzBs\n WlnOhk1jgud0RQP/fiw==", "X-Proofpoint-GUID": "SjtIJZHZw_-KofaI917RmBmyU5iWM3gn", "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-25_03,2026-03-24_01,2025-10-01_01", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n lowpriorityscore=0 adultscore=0 impostorscore=0 suspectscore=0 phishscore=0\n priorityscore=1501 spamscore=0 clxscore=1015 bulkscore=0 malwarescore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603250079" }, "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 | 16 ++++++--\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, 86 insertions(+), 53 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..cfd5eb8783b6 100644\n--- a/drivers/pci/controller/dwc/pci-imx6.c\n+++ b/drivers/pci/controller/dwc/pci-imx6.c\n@@ -1137,6 +1137,8 @@ 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@@ -1144,7 +1146,12 @@ static int imx_pcie_add_lut_by_rid(struct imx_pcie *imx_pcie, u32 rid)\n \tu32 sid = 0;\n \n \ttarget = NULL;\n-\terr_i = of_map_iommu_id(dev->of_node, rid, &target, &sid_i);\n+\terr_i = of_map_iommu_id(dev->of_node, rid, &iommu_spec);\n+\tif (!err_i) {\n+\t\ttarget = iommu_spec.np;\n+\t\tsid_i = iommu_spec.args[0];\n+\t}\n+\n \tif (target) {\n \t\tof_node_put(target);\n \t} else {\n@@ -1156,8 +1163,11 @@ static int imx_pcie_add_lut_by_rid(struct imx_pcie *imx_pcie, u32 rid)\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+\terr_m = of_map_msi_id(dev->of_node, rid, NULL, &msi_spec);\n+\tif (!err_m) {\n+\t\ttarget = msi_spec.np;\n+\t\tsid_m = msi_spec.args[0];\n+\t}\n \n \t/*\n \t * err_m target\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": [ "v11", "2/3" ] }