From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22B64C07E96 for ; Tue, 6 Jul 2021 10:55:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E458E619C8 for ; Tue, 6 Jul 2021 10:55:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E458E619C8 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pKko5lS6wckFJorX5Bku+j7bJ+pvB0xE4BN17l4qzWQ=; b=VwvLseYrJV7EmE 7yPcXjIL/3LQ63H4M4sy5qv3pNgE1wRT/fl5LlGakI7T+oP5rJNdGKetMwdgmpsFegVjdh+FZh4Xa qDtv2GYPcLHjAKwXLU/L1Y3ZGUsQordG9wwr+FpdwdjLgG6fDE6eATxSXU8ypmMY4lP7Z/2IqGJKe 17GFK5pVKhYRm+AIRHhHh9M1pxPrZj0pUZF1jkXQs2IDX47fMs+JAvi6Hb2s5Co+rYXj+fTBpRWva 5Gl/r9deJi5Xt0kNj160OkmSad1BIV9W0dS6lM0gsrROJHdeapmI9dk5Q4PHRan4bUujikrHiGDvl k0p/3tnB6rdhoy1gi7yQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0igE-00B6JM-Ms; Tue, 06 Jul 2021 10:51:55 +0000 Received: from fllv0015.ext.ti.com ([198.47.19.141]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m0ifV-00B63u-4T for linux-arm-kernel@lists.infradead.org; Tue, 06 Jul 2021 10:51:10 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 166AoxqR120294; Tue, 6 Jul 2021 05:50:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1625568659; bh=J49vfWzT3jgaISF6FLeuW0Uwzh22n7B1mHounVkrx44=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=QRtDLKY+9pv0+c1LStJ41DLBbvBRvLgx33LT6rHrk6+D08jWL42A31fg8pZTU1FRp C1pDoj67iYKP+KuM+5uG/ghlC8fHneDKJn02tmnn2jcQ6LlUiiCJrW9HeWmXp48lSf n7cwPozDyNe3Ozj1lBLHB3H/oUfHbMPWxbib6ajY= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 166Aox1x087000 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Jul 2021 05:50:59 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 6 Jul 2021 05:50:59 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Tue, 6 Jul 2021 05:50:59 -0500 Received: from a0393678-ssd.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 166Aoar5015822; Tue, 6 Jul 2021 05:50:55 -0500 From: Kishon Vijay Abraham I To: Lorenzo Pieralisi , Arnd Bergmann , Rob Herring , Bjorn Helgaas CC: Lokesh Vutla , Kishon Vijay Abraham I , Greg Kroah-Hartman , Tom Joseph , , , , , Nadeem Athani Subject: [PATCH 4/5] misc: pci_endpoint_test: Do not request or allocate IRQs in probe Date: Tue, 6 Jul 2021 16:20:34 +0530 Message-ID: <20210706105035.9915-5-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210706105035.9915-1-kishon@ti.com> References: <20210706105035.9915-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210706_035109_324370_6B43F45B X-CRM114-Status: GOOD ( 13.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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. Since certain user space scripts could rely on allocation of IRQ vectors during probe, remove allocation of IRQs only for TI's K3 platform. Signed-off-by: Kishon Vijay Abraham I --- drivers/misc/pci_endpoint_test.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index c7ee34013485..9740f2a0e7cd 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -79,6 +79,9 @@ #define PCI_DEVICE_ID_RENESAS_R8A774C0 0x002d #define PCI_DEVICE_ID_RENESAS_R8A774E1 0x0025 +#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, \ @@ -810,9 +813,11 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev, pci_set_master(pdev); - if (!pci_endpoint_test_alloc_irq_vectors(test, irq_type)) { - err = -EINVAL; - 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)) { + err = -EINVAL; + goto err_disable_irq; + } } for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) { @@ -850,9 +855,11 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev, goto err_ida_remove; } - if (!pci_endpoint_test_request_irq(test)) { - err = -EINVAL; - goto err_kfree_test_name; + if (!(is_am654_pci_dev(pdev) || is_j721e_pci_dev(pdev))) { + if (!pci_endpoint_test_request_irq(test)) { + err = -EINVAL; + goto err_kfree_test_name; + } } misc_device = &test->miscdev; -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel