From patchwork Thu Sep 1 10:14:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharat Kumar Gogada X-Patchwork-Id: 9308767 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1C6EF607D6 for ; Thu, 1 Sep 2016 10:17:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BE2A292B1 for ; Thu, 1 Sep 2016 10:17:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 003E7292CB; Thu, 1 Sep 2016 10:17:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 375AA292B1 for ; Thu, 1 Sep 2016 10:17:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bfP1y-0007NG-2T; Thu, 01 Sep 2016 10:15:34 +0000 Received: from mail-by2nam03on0079.outbound.protection.outlook.com ([104.47.42.79] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bfP1s-0006FX-Fp for linux-arm-kernel@lists.infradead.org; Thu, 01 Sep 2016 10:15:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=YvgI3AXuSN7xT1aHFL127TjHuS4KBduuFmlrJF6/s38=; b=oQRD0n368ogJFUUSLz8sT1XUvUKkPGHWFwQ3bi7jqSYnHpTDrEe7LR7zKYn+YqHUWLaBje3Da+CWZa6T/B78DBhXMSRoarequPFgmGnnibC7NWcmWCyaQnD0Fv8Tn2QcGE5As+fDMrPVu3IV99sli2k9RTlFD+E7O1M7+VFMy/c= Received: from BN6PR02CA0071.namprd02.prod.outlook.com (10.175.94.161) by BY2PR0201MB1494.namprd02.prod.outlook.com (10.163.153.155) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9; Thu, 1 Sep 2016 10:15:05 +0000 Received: from BL2NAM02FT047.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::205) by BN6PR02CA0071.outlook.office365.com (2603:10b6:404:f9::33) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.13 via Frontend Transport; Thu, 1 Sep 2016 10:15:04 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; wanadoo.fr; dkim=none (message not signed) header.d=none;wanadoo.fr; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT047.mail.protection.outlook.com (10.152.77.9) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.587.6 via Frontend Transport; Thu, 1 Sep 2016 10:15:04 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1bfP1R-00038m-M8; Thu, 01 Sep 2016 03:15:01 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1bfP1S-0002Ls-Ja; Thu, 01 Sep 2016 03:15:02 -0700 Received: from xsj-pvapsmtp01 (xsj-pvapsmtp01.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id u81AEoFH011695; Thu, 1 Sep 2016 03:14:50 -0700 Received: from [172.23.64.217] (helo=xhd-lin64re105.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1bfP1F-0002IX-Nd; Thu, 01 Sep 2016 03:14:50 -0700 Received: by xhd-lin64re105.xilinx.com (Postfix, from userid 45489) id 740ADCA1C4E; Thu, 1 Sep 2016 15:44:48 +0530 (IST) From: Bharat Kumar Gogada To: , , , , , , , , Subject: [PATCH 1/6] PCI: xilinx: Keep both legacy and MSI interrupt references. Date: Thu, 1 Sep 2016 15:44:41 +0530 Message-ID: <1472724886-28301-1-git-send-email-bharatku@xilinx.com> X-Mailer: git-send-email 2.1.1 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22548.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(189002)(199003)(4001430100002)(50466002)(8676002)(189998001)(305945005)(586003)(81166006)(4326007)(229853001)(7846002)(92566002)(107886002)(63266004)(11100500001)(81156014)(5001770100001)(48376002)(52956003)(45336002)(42186005)(86362001)(356003)(87936001)(2201001)(626004)(33646002)(5003940100001)(2906002)(5660300001)(19580395003)(36386004)(106466001)(46386002)(36756003)(8936002)(50226002)(103686003)(90966002)(47776003)(50986999)(19580405001)(7416002)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0201MB1494; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT047; 1:Jcx165VU6eNprXYm/UqbIETA0KM3sBe3Tr1s3FksB3HLGY6BycubNMvL/akOCt+PG6CLk+r0KbJ3/DeZoAIVfps0aRW576u2/kb7nNLkAluNxWzvbxsIilA7LxWxqLS06INcrS/egRYE+XWUy1lxdxgx9AWmc5hMlOQ92AqSG2Dt7YHxQYhZHa7fOAcTyk7+IDkM1ihA4s8y+sqJUW4e8qW7EebovdGqX8jqUExfiPHe2m7OKzcBf4o6v4FHN7kLt+HR5n2DYXz9Y61aQiLO1gHOS50WddTgLTTurim6fGwnilhj+SGZc0y+lzqRyYlfe6yXnL6Vg12ozdObh26MHRhOx2BknO7dTozE6jaX3pGIt/rejzBOJ0jXBOLMEg40gS/IesN8BN4eGMhyKQKD6BK1dm2Jcr/EOfl8VtvptSzfTaQfGImiAMqpdYoYeWFtOpiVACzNlrMbE/f1cCt2IV+YPNcHS3zchAud/BnYWjEnylynEzqp60dBoi4ABZ3IRpXiY/Etax6oS47ijBwQkJpAFYfjZIhPokAopj30rbBBr0BYPAlmkHqJvKBD5tHUauVKruZItQsKU6rGc1UHYoVJvnX398SXktlZI6cJ5qwk0Q3rPbYChcBC78QPNeAA7thGe53YSRctZVObtkuu1g== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 6991b8d6-1471-4974-df1c-08d3d250d785 X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1494; 2:32YlFDFGZlXJTL4dYEiHcdbxfSkPxu6Fg2Y5YocoPrQnuHWNldhDxjRme/trTTUgvCN04vsDRigAzPYiLyT4Kr2GANymv2y+i0hLh6kVB0aCQfkNPcToQgC/JUy0xwhWZYBvweCEtZyd7dq05JM7+BJOroqX/NP9A2jRxvqs0b+wlAhdtRECcp0087aAi90s; 3:KBjjMgLABCuBbkF3NV7sAE/IidRNlyP2e3SWsC0l32VHPMfz0DlMzUB4u47Abn4Y56sRHMmcyAjBDxydsaI7+UItNhSU1BId1FFR5V+T61gC/V0FkKEhjiU952X3wRiQ/sedHfWNohnFB+gNsEN+PUIyir2ArnhQEltggptUCh3B84dhlCD98x8bHlzt+t8FflBwJ6j+27uETcnr+VssNAi6z8DfxKl3xkes2acb/bEFOvxjGBXjtcwqTDt8QqL0x5jEqBmDvCKKfFIkvCYLeA==; 25:Ihn3Ig19qBnnOAW1bbJpwUiuD/ejDY2xyRQoRrxJNZfovzOhTPx9Q/q78Q8uJibntSKZgBJ/mY7kJSm0fxDchUX6+XlYizyC+o8Zs9syBbdEznvGqFqNcWS6YF5AgVF14Wixgafozv0AfbKhiNzXabUVMqbw7ZsQVjLNPwrar69KYOaEBpTJKy2gv4ZZGrZ4BXQ0rnOqr6nE45ppZZ9/LguaNpiD3yD6mBvvNbvkxsr2tmWakevQaf7h3mVHZTKbxriZgXj7doM+GEuTIyrYgXG7pcqudkEweUZeOtpG5hGRLNrHTtoMJhHGRnY97msNBx/WK1kDbR4aJxtbpkGw6h58FcbJEgL5h78I0iSAaREmC3uDDAHVTiuELabRzi3T+LE+xoJOxbY5SZ5B7Mm+x7/cGO6OafhfX88y5x8QGUM= X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:BY2PR0201MB1494; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1494; 31:C2NBbJCWcyl/BYJGJzz/Iui0QDCNSI36k0PsvrSeaPEkBTOidl5ppLeMHGC2Z8jfpgOzWsnRwygVk3gCkTcJXj2AnXX77EZyamqVlvIIlIGCZQwclnwutg6K8F/R5Ub83Bn/FsmGZc+4rl2dkptthZLoZd1Ae15Nc4LeKKcT9eRg3ukWtkQ5J58nNS6WODzcY1wGQgjiUgVlclyYPMzsME+OoNEDrqlRF/yOJ/OCnbw=; 20:c44U40MRobjC6mHaEmvJQBYNBo1JFokDd0MFt27udYOiiZa2euxmSzqpVF1IFHaVJcuKdreHaqneuzCHfaiIpXsm744J6+1DQj/gz5LhOh4Cf0EJrddqiyFPi2qhlMCzmzAmZqTdg+3wEn6bs8mkXj77rjlpDZ1Gk7WO9Su99IgI6Bh3pnr0fy87SB9bRxE8XDbjWpCKA+Qvb7Mpd+zlA2U3x5woDJoti/gSixHaD1JK9zs2mf9BeLOdLlwr2w65dCAnHov8NRWelfOf4T1VsqWvHZu4wFS7KPAc8TUQ01F/frHwG+aQt23bfj8yiF7GPA0aLOFZmHIAD1yObFr1yBbfhV2R/pLIbbPIl5uMkSal9bODJSz75nWZbehCFDz1KDz80y0pf8OitJqLwIzQj2oiWMzeibd0gXIFuUFeHHhfOaO+UQTyhr+ZzFYMX+lTht45X9oJg7nNbEDumk9dM2++U6nq4DIyucguJoH5vQ4DrlMqvg58AYRZI2iIFshW X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(13015025)(13017025)(13024025)(13023025)(13018025)(3002001)(10201501046)(6055026); SRVR:BY2PR0201MB1494; BCL:0; PCL:0; RULEID:; SRVR:BY2PR0201MB1494; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1494; 4:owxK0l4veDmRrhGaw2vnzuPvtI0mmvKhY0TM1XokhsWMUF9cgVZAnAt40TdqKQ3qy44kttb3VNpcvpLcg6iO7oZ2oB1qoJyE/yt8y8S4186uxxXgxnS275H6mZ3GTtH4A6qRp1m2vR5LM6EjLpfFAkwEQT14SQqz8w5k3F/jSqABnGTFjWCEqnY7NfKGfAstdq1gO+Xc9Nh+2O4ieazpCEwCU97F0h3cWT8a1eqJj+WLGlXow0nJu5xb/O9LHfftOqC0zsmFxDa9JQqDoefoDOEtMwa/pF2zfc7bwjTKuFw6fLXyiOkBVkzd1kT2E8bfjczByt0oSofANjRcJ8jSnhw6oLokV0jaupv0Pj7P49wEk4rz72ktPtVYLf0UwiClus+c+wvtrSDxANCz27VLhqNho1rx0jxW7AS+0CauEo6k1Gw4Hw5NvwivYRzOrBEvawyOqCObQFvD3u4vSyTG08DI2mV1jhURjuis5crq2qqTekI2BUAaq5RTa7Ma9KvPgCZsLsXB8TGlBDdaHX3izZuUJqLhT0PiZJaY1CFzdeU= X-Forefront-PRVS: 0052308DC6 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0201MB1494; 23:SssAl5qQxqILn0X09bT3GWcYRs5iKGbNjpLffna?= =?us-ascii?Q?Y7FNYV0eYe+eOL8eUYnYLMXJk7S8Uh7MobsSHE6rdVamj2p/xaYXG2qLgA/+?= =?us-ascii?Q?tGYfkB5l2X4qbj6jlbde0J+gkWrVAuiAV2Rj5czC1aLkWUm9TaFILyIvH63A?= =?us-ascii?Q?f7SIjjPNkdCH5A4+2VBhHmJ/HnTr/IV5sqmOyBPxo/43Bbyu2rVqbBDgTyh3?= =?us-ascii?Q?wJqOhzmi8UHM7V3wYQK2YuX87MubBjAFLhIOdbh+eKG9/xGHlgb2cmEI304M?= =?us-ascii?Q?fQrbIuOzKhBYKgkxCVkbWM/kQyVVqO6FCU7LWwOzg9wSjdnnQnPQ8he5BxZB?= =?us-ascii?Q?MA+Xj4chh9cegNgfRFP7zNQtNZGeTutJxeBWl04kqIQ7TF5eoORcSXXULfdw?= =?us-ascii?Q?Z4bFhUz+dfBhbv+1XBz9adj99k5tUjJrLuzgLbo6yZ6unmtV7lG9zKkUA3uO?= =?us-ascii?Q?Wd27/iB/nR8xltLQ/GFY8ufFraBsE0d1gnfCWvpVB2egj57mrXuWtmH/kbe4?= =?us-ascii?Q?K+PXh3XPra935+iKfq36q12t+GMhR5Zn8Rbf03GR/iFsJx5CUOLFuftQbAjF?= =?us-ascii?Q?EDVpA2Ys0YkI21ql6dDuCLhY5z81Q/EA23smxTPj0DfseiqmkautOK1qRHh1?= =?us-ascii?Q?HFwsgmMxySIWfNFD0nynDiL/5gTbykWiatjcjuqIYSY610viWEGOI2u9Ya7j?= =?us-ascii?Q?57Sx3Fn5zJhvPqH9dsdR1Ap4JEHrsl1HQpWfqWQCy+1l5f7hf+Dh3ofhIGg/?= =?us-ascii?Q?+9vbEvUWhp1Ayfur/fy/sNE64pO15/tvHZ3ktPZdPPsBo+2w11fYEcCSUImH?= =?us-ascii?Q?us1SIn5V4Ew3a15NZks0y60h47yqj2wFiJbUyMw1MqnlY0mjgc+qGh0W9OLo?= =?us-ascii?Q?gvuKOU4TDNRnXViIiMM7OYKgAhGJKviYos1Gbv6WOfGp2JFect1xWUoRitKE?= =?us-ascii?Q?wloryS+3QyYVJvxs6Ug+L90jjeVNDHKTol1fgqjscBo4PEJPArX8RYArnmIC?= =?us-ascii?Q?HG0qJzH+Gtbxdgv9WmFyz/EbeLQG/SunPCWWXOLv7NNy1D4bPBx6mvjcNJkG?= =?us-ascii?Q?ezX/w51o5VNfE0e942gr3vcWZbXDKF/zvrXztWVDc1bu1050eb1IcnYHXWJL?= =?us-ascii?Q?aFTu8U7eYS79s7SoaS7QrX3A7yUNgGNlkdr36tYdVCedwdu2btwtlo/WE7wf?= =?us-ascii?Q?AvfMtyuQ1mYMQ5fw=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1494; 6:7TANQu3rd4ROiR5k2MZOK3kByDIQwq1dL3DOx7DwqRvZ6ryjIqDU2+LAbhylLw2fvKeVBsY/B6bbA0PWM9v7RuYU4HtIsCX/42ogEpPeZbt2Mm8NxNU8BB+luq9Og9bB3Eh1QPsDT0H97I2TOay4z9hwir8OtWJmysmQNLZmwaR1j+EwyQOu8yZ0zZJVXfpvi6+EDSFIqUcnRo+iPBX4S7kdBk5A/Wf6AfY0/zvfUfzaCDj9K1V6RNzNt2rPIKinVWxeoi9EluDCUfv/z/FAO5peOWEPbjgW2o99+JSfQNIQdvgSkysPYX6uOZdEiePxa/ZXHklK+37mRdRP4PmnVQ==; 5:SI3eByxg32WxkOdTpbunSgz/peh+7SjuxEWDVWRS75pxgNoNmJkmRJKN9MF2WO8l/Ju75oTrZTiSIkwCpjh+ILxsdznd++uoB0KKhL9tLnMmx9RN7dqCZjJQJU82mP0X/y5uSJg4gYIbxtXZRv9t+w==; 24:ayI7GQuq8r8otEvKdDZb5TwKkO5mtiwW/tj7aY9adCRJL939uHEaO0IBahDU7JlC25V0kFRB0k5+KA1JUBvXaE9YYMYerbgNQn9vpO+WXoc=; 7:yQVvrbUlsNt/AuV3JUKQb1m1n8eQHYUnCoxXpzGZzXKQYBVa+TCXskJtBygbUPEaib2myNT+us7XYgJsMV2YVDPLAikEGpVxvhB0kCg7L+hKkQVvpFcEP3Unz84jqN/gPpkQYnQ9o02OizXLC7W5pyIyX1mEyfJACqakSd3jCL3jm7Aqs1X3crZaERv2dL935uxEPYh/nCyBmy/B3Cm5bDN3TT6fIlUU+rKTInh61Q12mmGCgYa4Ypxd56Pg0Xd7 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2016 10:15:04.1807 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1494 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160901_031528_569894_24CF0DC8 X-CRM114-Status: GOOD ( 13.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bharat Kumar Gogada , linux-pci@vger.kernel.org, rgummal@xilinx.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When built with MSI support the legacy domain reference is being overwritten with MSI. Instead creating two separate domains for MSI and legacy interrupts. Signed-off-by: Bharat Kumar Gogada --- drivers/pci/host/pcie-xilinx.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c index a30e016..bd64677 100644 --- a/drivers/pci/host/pcie-xilinx.c +++ b/drivers/pci/host/pcie-xilinx.c @@ -101,7 +101,8 @@ * @msi_pages: MSI pages * @root_busno: Root Bus number * @dev: Device pointer - * @irq_domain: IRQ domain pointer + * @msi_domain: MSI IRQ domain pointer + * @leg_domain: Legacy IRQ domain pointer * @resources: Bus Resources */ struct xilinx_pcie_port { @@ -110,7 +111,8 @@ struct xilinx_pcie_port { unsigned long msi_pages; u8 root_busno; struct device *dev; - struct irq_domain *irq_domain; + struct irq_domain *msi_domain; + struct irq_domain *leg_domain; struct list_head resources; }; @@ -281,7 +283,7 @@ static int xilinx_pcie_msi_setup_irq(struct msi_controller *chip, if (hwirq < 0) return hwirq; - irq = irq_create_mapping(port->irq_domain, hwirq); + irq = irq_create_mapping(port->msi_domain, hwirq); if (!irq) return -EINVAL; @@ -443,7 +445,7 @@ static irqreturn_t xilinx_pcie_intr_handler(int irq, void *data) /* Handle INTx Interrupt */ val = ((val & XILINX_PCIE_RPIFR1_INTR_MASK) >> XILINX_PCIE_RPIFR1_INTR_SHIFT) + 1; - generic_handle_irq(irq_find_mapping(port->irq_domain, + generic_handle_irq(irq_find_mapping(port->leg_domain, val)); } } @@ -526,12 +528,14 @@ static void xilinx_pcie_free_irq_domain(struct xilinx_pcie_port *port) } for (i = 0; i < num_irqs; i++) { - irq = irq_find_mapping(port->irq_domain, i); + irq = irq_find_mapping(port->leg_domain, i); if (irq > 0) irq_dispose_mapping(irq); } - - irq_domain_remove(port->irq_domain); + if (port->leg_domain) + irq_domain_remove(port->leg_domain); + if (port->msi_domain) + irq_domain_remove(port->msi_domain); } /** @@ -553,21 +557,21 @@ static int xilinx_pcie_init_irq_domain(struct xilinx_pcie_port *port) return -ENODEV; } - port->irq_domain = irq_domain_add_linear(pcie_intc_node, 4, + port->leg_domain = irq_domain_add_linear(pcie_intc_node, 4, &intx_domain_ops, port); - if (!port->irq_domain) { + if (!port->leg_domain) { dev_err(dev, "Failed to get a INTx IRQ domain\n"); return -ENODEV; } /* Setup MSI */ if (IS_ENABLED(CONFIG_PCI_MSI)) { - port->irq_domain = irq_domain_add_linear(node, + port->msi_domain = irq_domain_add_linear(node, XILINX_NUM_MSI_IRQS, &msi_domain_ops, &xilinx_pcie_msi_chip); - if (!port->irq_domain) { + if (!port->msi_domain) { dev_err(dev, "Failed to get a MSI IRQ domain\n"); return -ENODEV; }