From patchwork Mon Dec 30 12:33:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 182607 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp6283012ild; Mon, 30 Dec 2019 04:31:39 -0800 (PST) X-Google-Smtp-Source: APXvYqzhVHOunCtG4KfjwLb0lBEp7gznNL8IO8JK4ETr27a+N7qIirGM00F2pvC9uyzEFMaPR48+ X-Received: by 2002:aca:d15:: with SMTP id 21mr5221662oin.127.1577709098918; Mon, 30 Dec 2019 04:31:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577709098; cv=none; d=google.com; s=arc-20160816; b=vogbbFhhxmSAV1AiLVRurrdwZh7Jdfnx/3CnxH1jefRVwXwjk/8MmZQd0v6zXYeZ82 qdLNpjn84L/Hyqntjenmnbr1mwFzAFPkPguiuUa8xQdLLIrTpssMk43rsAK7KdQNE94A cmKAqmddJsHF3CtkH4C5RFWfXxaAzqe34Q+pItB0KBwHIwwYkuXJMEqTRfGXi6BcM93I le6fid1sy0wZ3Ka3bpsvCRHe6DbxoG/rMCLT6V9XpenpRV9psNuf3CN0EO2SoC2RSQ7a +aFw1FdkYUvPvOHraIz5h6T+m5z6TJCe8XQfQF/UKvyi3mfUte5Eqn2u+IX7bsQQP3eL K9Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=VtEJU4ab4RUM55E/wEo6hBdB5joL/ciHyw3e3snZOGA=; b=xqgCrD6EE8NIEyhRXN+M7DB/KecAUCa1Cd5eOAZUh0P/lVLk90eFK8yaUt0gCUNq6W mDsTPfezO9sca6kAyLHUxsIz64TN25K36AVbOM3lncJiiXaQ2JUYH4Go5Zjw4oqqexks F5Oa8sGY+9xasAofyp5NipO1ysWxy2ViOcmLEMxc6c7wfOk908gx2R+BWKicsXkjd4/n hIcGS52yZynuGZww+tp3E2gJ04ACcZBGtQLvg7J8U0g3MTkacwTf7ui5kajAhSXHYMyb dHWcyrs06VLZm5UWdQA30Qab90IvwReJ5ahZEEsbp8y3iHt38MSduFHgpzEdSyYMHcyP aFXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="p3v1n3V/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y140si18812335oia.49.2019.12.30.04.31.38; Mon, 30 Dec 2019 04:31:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="p3v1n3V/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727489AbfL3Mbh (ORCPT + 27 others); Mon, 30 Dec 2019 07:31:37 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:60356 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727477AbfL3Mbf (ORCPT ); Mon, 30 Dec 2019 07:31:35 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBUCVNG2039076; Mon, 30 Dec 2019 06:31:23 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1577709083; bh=VtEJU4ab4RUM55E/wEo6hBdB5joL/ciHyw3e3snZOGA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=p3v1n3V/stbuvljQe057ss2Mwvxj5i79vjEypcFk0EyzIHD7NBUW4+y9KWLwfEDQo b3Bs2M5oi1n2pckCLyy5jqEK8mX9tv76zk0rnYswClftBWtA6wadG9TPTPgycJu20d lxjkls/+od90aKMRnR6mnzC2WJWGwgNSl9Aku9kE= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBUCVNUp058554 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 30 Dec 2019 06:31:23 -0600 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Mon, 30 Dec 2019 06:31:23 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Mon, 30 Dec 2019 06:31:22 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBUCVEhO002491; Mon, 30 Dec 2019 06:31:20 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Arnd Bergmann CC: Greg Kroah-Hartman , Bjorn Helgaas , , Subject: [PATCH 2/7] misc: pci_endpoint_test: Do not request or allocate IRQs in probe Date: Mon, 30 Dec 2019 18:03:10 +0530 Message-ID: <20191230123315.31037-3-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191230123315.31037-1-kishon@ti.com> References: <20191230123315.31037-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Allocation of IRQ vectors and requesting IRQ is done as part of PCITEST_SET_IRQTYPE. Do not request or allocate IRQs in probe for AM654 and J721E so that the user space test script has better control of the devices for which the IRQs are configured. Signed-off-by: Kishon Vijay Abraham I --- drivers/misc/pci_endpoint_test.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) -- 2.17.1 Reported-by: kbuild test robot Reported-by: kbuild test robot diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index 743ff4dcb3f0..04505890eae9 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -70,6 +70,9 @@ #define is_am654_pci_dev(pdev) \ ((pdev)->device == PCI_DEVICE_ID_TI_AM654) +#define is_j721e_pci_dev(pdev) \ + ((pdev)->device == PCI_DEVICE_ID_TI_J721E) + static DEFINE_IDA(pci_endpoint_test_ida); #define to_endpoint_test(priv) container_of((priv), struct pci_endpoint_test, \ @@ -688,11 +691,13 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev, pci_set_master(pdev); - if (!pci_endpoint_test_alloc_irq_vectors(test, irq_type)) - goto err_disable_irq; + if (!(is_am654_pci_dev(pdev) || is_j721e_pci_dev(pdev))) { + if (!pci_endpoint_test_alloc_irq_vectors(test, irq_type)) + goto err_disable_irq; - if (!pci_endpoint_test_request_irq(test)) - goto err_disable_irq; + if (!pci_endpoint_test_request_irq(test)) + goto err_disable_irq; + } for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) { if (pci_resource_flags(pdev, bar) & IORESOURCE_MEM) {