From patchwork Sat Apr 22 03:09:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 13220882 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4AF3C77B76 for ; Sat, 22 Apr 2023 03:09:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229709AbjDVDJi (ORCPT ); Fri, 21 Apr 2023 23:09:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbjDVDJg (ORCPT ); Fri, 21 Apr 2023 23:09:36 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B1EF212D; Fri, 21 Apr 2023 20:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682132975; x=1713668975; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=mIYimCHUd+xZlhl4PkrV2HFz2iF0o6KFaAlHPr3UxyY=; b=OZVE1nyxM0K+U0DzG5cHD/NMsOjOrk3floQBsdanzwwGjfeXLloQpjJA iLC2tS/0xEW07vGsUur5ed/9ucj0cK6jMwxhbNS/nQxMuLNPEqiYZTn5E nlnBJpB8LutRNXKOrgeZ6XAffdaNY1SihKChGOzkwMMq1OhhPD1h5vtzJ 2uTS1jqC1uyg9nLoOYljBdHMTZzN0XroCqTyM6u7rReH4oYeTYI2CN0yB RS4OtDX062+oCJSQ+9TrbDRxR1VIseCdG7Qqq6nt3g+A3nbPU1DBY/nrR sfqbovld0GytlAo0/t9qx0Hl4ij6s9epbm1sapFzZBe7xFr18W3/xA73k A==; X-IronPort-AV: E=McAfee;i="6600,9927,10687"; a="343609056" X-IronPort-AV: E=Sophos;i="5.99,216,1677571200"; d="scan'208";a="343609056" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2023 20:09:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10687"; a="757092264" X-IronPort-AV: E=Sophos;i="5.99,216,1677571200"; d="scan'208";a="757092264" Received: from jwostman-mobl2.amr.corp.intel.com (HELO [192.168.1.200]) ([10.212.111.101]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2023 20:09:33 -0700 From: Vishal Verma Date: Fri, 21 Apr 2023 21:09:25 -0600 Subject: [PATCH 1/4] cxl/pci: Allocate irq vectors earlier in pci probe MIME-Version: 1.0 Message-Id: <20230421-vv-fw_update-v1-1-22468747d72f@intel.com> References: <20230421-vv-fw_update-v1-0-22468747d72f@intel.com> In-Reply-To: <20230421-vv-fw_update-v1-0-22468747d72f@intel.com> To: Alison Schofield , Ira Weiny , Dave Jiang , Ben Widawsky , Dan Williams Cc: linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, Davidlohr Bueso , Russ Weight , Vishal Verma X-Mailer: b4 0.13-dev-2eb1a X-Developer-Signature: v=1; a=openpgp-sha256; l=1159; i=vishal.l.verma@intel.com; h=from:subject:message-id; bh=0+Mnvz+/aDR8bX8YzKcpUzlkn/9vo8RpJOTXggnm6b4=; b=owGbwMvMwCXGf25diOft7jLG02pJDCnO/m89Vnn+2dY3f+Pn+n+HQmo37HjDMkM/iGnOY4fcx oeec7pPdJSyMIhxMciKKbL83fOR8Zjc9nyewARHmDmsTCBDGLg4BWAipdoM/+OiTjxlv/RjfdmV y/Hf3rGGLMn/tmRJeF1t49/SbNHMYycZGc7r/VO7csjp8tPM6U+dPqjkhyUy8DLceP1t9+VDaZ6 dj1gA X-Developer-Key: i=vishal.l.verma@intel.com; a=openpgp; fpr=F8682BE134C67A12332A2ED07AFA61BEA3B84DFF Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org From: Davidlohr Bueso Move the cxl_alloc_irq_vectors() call further up in the probing in order to allow for mailbox interrupt usage. No change in semantics. Signed-off-by: Davidlohr Bueso Link: https://lore.kernel.org/r/20230421092321.12741-2-dave@stgolabs.net Signed-off-by: Vishal Verma Reviewed-by: Jonathan Cameron --- drivers/cxl/pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index 60b23624d167..39b829a29f6c 100644 --- a/drivers/cxl/pci.c +++ b/drivers/cxl/pci.c @@ -757,6 +757,10 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (rc) dev_dbg(&pdev->dev, "Failed to map RAS capability.\n"); + rc = cxl_alloc_irq_vectors(pdev); + if (rc) + return rc; + rc = cxl_pci_setup_mailbox(cxlds); if (rc) return rc; @@ -777,10 +781,6 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (rc) return rc; - rc = cxl_alloc_irq_vectors(pdev); - if (rc) - return rc; - cxlmd = devm_cxl_add_memdev(cxlds); if (IS_ERR(cxlmd)) return PTR_ERR(cxlmd);