From nobody Sun Oct 5 12:23:55 2025 Received: from mx08-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AFFB286D4C; Mon, 4 Aug 2025 17:11:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.93 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754327476; cv=none; b=SC/4OwWvwY+QhhDXdhCN2S/RkyAV05HgMUgKT6ybcZiZtCmINpuag1Hc1/ZVc1WkK4n3q2kHGcaNmMKjEl7u4T6GeLvrNx4zpxcdUhhULHXfBE2nxrG7xFDHER8NXOdN1U1OVss72jBQIXE7I+SVxtr/goACsw6UR9VMsERqkSg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754327476; c=relaxed/simple; bh=uYW9z2WNCyHjIzdfSxpI3ii9BXoUNa5A54xjWIWkxN8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BYJn+raJ4WW2KBdhua38fUHabg7Q9doGnfeJnY81tEnXnknlYyvIFDyvf0TdATMthu5UEKt3vhqOCiwTtOxxxnQgUVyjy0Te6dK2pbNFhjijMfFj1OEe8DDJNBbuOWujSbDxa3wN6wF+J6MYx5aI5PhvRqwihFbaEm5SffiN6U0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=fnCZgdl7; arc=none smtp.client-ip=91.207.212.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="fnCZgdl7" Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 574GZRkY001319; Mon, 4 Aug 2025 19:10:58 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=selector1; bh= 9uKKmqbVZuwnVZLU/O1ek2FINN8x4otsdSb1ip8igdU=; b=fnCZgdl7b7e6o4rH 9pp1xsSjjja6Osmo0xSE0KMhKOSYeXs2pu3+wXvXQdBoXoE7O9iT85kN8y2PjW+o qBqQn6LwKAySbc16lJD/sdNSyivLaH/DezwxarkJI/teM/NRIXkxDo1ij4Nv8ZzL BwOXgq59/r5xQ+oj+ISNf4iPNh0sZ9AciadyV56jiFLp/z5yC+5bXdBbVlRTJeyo 0PzeDUQAgOfVwbO0eePJrL6np1rkE/CK+Qxl7W8wr8S2eKWKqiIauXwTQn1SzMbU ChKeAyu8jHNEJ96gCkbve12KbU0HiymFZoPo+CBFb/qDiqxmhK/KUT2c5p9GKjNs oarmKA== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 489wmnwt6f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Aug 2025 19:10:58 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id B3B5D4004C; Mon, 4 Aug 2025 19:10:09 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id BDA30B74702; Mon, 4 Aug 2025 19:09:33 +0200 (CEST) Received: from localhost (10.130.77.120) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 4 Aug 2025 19:09:33 +0200 From: Christian Bruel To: , , , , , CC: , , , Christian Bruel Subject: [PATCH 1/3] misc: pci_endpoint_test: Skip IRQ tests if irq is out of range Date: Mon, 4 Aug 2025 19:09:14 +0200 Message-ID: <20250804170916.3212221-2-christian.bruel@foss.st.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250804170916.3212221-1-christian.bruel@foss.st.com> References: <20250804170916.3212221-1-christian.bruel@foss.st.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-04_07,2025-08-04_01,2025-03-28_01 Content-Type: text/plain; charset="utf-8" The pci_endpoint_test tests the 32-bit MSI range. However, the device might not have all vectors configured. For example, if msi_interrupts is 8 in the ep function space or if the MSI Multiple Message Capable value is configured as 4 (maximum 16 vectors). In this case, do not attempt to run the test to avoid timeouts and directly return the error value. Signed-off-by: Christian Bruel --- drivers/misc/pci_endpoint_test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_t= est.c index 1c156a3f845e..54f66ece25cd 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -436,7 +436,11 @@ static int pci_endpoint_test_msi_irq(struct pci_endpoi= nt_test *test, { struct pci_dev *pdev =3D test->pdev; u32 val; - int ret; + int irq; + + irq =3D pci_irq_vector(pdev, msi_num - 1); + if (irq < 0) + return irq; =20 pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_IRQ_TYPE, msix ? PCITEST_IRQ_TYPE_MSIX : @@ -450,11 +454,7 @@ static int pci_endpoint_test_msi_irq(struct pci_endpoi= nt_test *test, if (!val) return -ETIMEDOUT; =20 - ret =3D pci_irq_vector(pdev, msi_num - 1); - if (ret < 0) - return ret; - - if (ret !=3D test->last_irq) + if (irq !=3D test->last_irq) return -EIO; =20 return 0; --=20 2.34.1 From nobody Sun Oct 5 12:23:55 2025 Received: from mx08-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97F682853EA; Mon, 4 Aug 2025 17:11:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.93 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754327475; cv=none; b=NrgczLIKx785RVRpCXf0pa/LUOo/FAxJHnalAiENUGsmETqjzst+WsBA3TRgxvMPbiDj5GMErzjw0sPqArYmEWO7XblrDPXE0KkHY/kXunNvAOmTYgk6MA7t9lGAeG7uqnulg+BVcgzM9+peGDzLSTWtb4dRHCJUR1SIC76DhCA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754327475; c=relaxed/simple; bh=CX4MRQzSLCpObdmO0Ri+x1gMm0Gh5g+Vz+U+OFPO/UI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AFJf3BAm57ceMtNOSMLY69klC5IDXQfg4S9mIoagrgqIfmUK0q3lXo5ebLtAFRxn7/9Lxm6Iadj51LYC9f+r7ogDGoA+VHwto7BQWJ56JE+7FswhW54LqCCVQkq9xbqU1B1CVl2kS/z5BBEVKA58ADBC5LT1pTqCk7NoNZSMjXk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=4iTugo/b; arc=none smtp.client-ip=91.207.212.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="4iTugo/b" Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 574GahS1002647; Mon, 4 Aug 2025 19:10:58 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=selector1; bh= vq3y/jUui0k3fPwqXOmQKZ/g5tWzod1LVKLPMlunJBI=; b=4iTugo/b9LBjHp+B mtIB018K2CtdkFdVmTMae/ZCctdumcx/KP1WCq30jwe6dS7ZJSQ+k/ILcTd1uKi/ rbaFZPpRI11iv9Dy7Ygw0wuYJfh6VCQM3DVo4zyE720aXYBsLv0914HVEvwPFswe F3fEO3GNSt6E1jFMqfv9ZpNYdnfIKlPZ3/BfShiyge1j7rc7x0XHs3BCBU3HkG4m 9MerW6GYudVu25CBtoAAIvMcTy0BBFi9y91FcmX4oUXZh+Wwqjqd8O/QLgorYmjO tXaY20SpyAU9EPoc8y5LQblUdNUcq7ReQOgVfkrxekh+HL0Uzipuh6IMHe0qo6yM nGcysw== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 489wmnwt6e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Aug 2025 19:10:58 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id ADEE040047; Mon, 4 Aug 2025 19:10:12 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 33489B74700; Mon, 4 Aug 2025 19:09:35 +0200 (CEST) Received: from localhost (10.130.77.120) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 4 Aug 2025 19:09:34 +0200 From: Christian Bruel To: , , , , , CC: , , , Christian Bruel Subject: [PATCH 2/3] misc: pci_endpoint_test: Cleanup extra 0 initialization Date: Mon, 4 Aug 2025 19:09:15 +0200 Message-ID: <20250804170916.3212221-3-christian.bruel@foss.st.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250804170916.3212221-1-christian.bruel@foss.st.com> References: <20250804170916.3212221-1-christian.bruel@foss.st.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-04_07,2025-08-04_01,2025-03-28_01 Content-Type: text/plain; charset="utf-8" NIT, memory is already set to 0 by devm_kzalloc. Signed-off-by: Christian Bruel --- drivers/misc/pci_endpoint_test.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_t= est.c index 54f66ece25cd..fbdffe7bb739 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -1020,8 +1020,6 @@ static int pci_endpoint_test_probe(struct pci_dev *pd= ev, if (!test) return -ENOMEM; =20 - test->test_reg_bar =3D 0; - test->alignment =3D 0; test->pdev =3D pdev; test->irq_type =3D PCITEST_IRQ_TYPE_UNDEFINED; =20 --=20 2.34.1 From nobody Sun Oct 5 12:23:55 2025 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AF8D26056A; Mon, 4 Aug 2025 17:11:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.93 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754327476; cv=none; b=XrSrdy4x8rKwH+7wYPXSgKUstpTxr45v2/Va8hfCCbMJT0qoJerB9+BAkQ/CgpNWaXV/p6dagnTApKjxgnr9HO+Zsd7O/dBWlBhoZd/b3qRm5nISSQ+1oGSvlBF5+HIUlJ47WDItPI1A4GI25FikfKr+buntCJ+HiiwcM0fZmkQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754327476; c=relaxed/simple; bh=YGjDe8g2XeL8OuTZqUT8rSnAIDqJbibYSb2+lgGodSE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KTukqbwoAK6+WRvVLNpFq0cmFG55qk/8ePS2fsShGcXo+N9bPQMETXPAL/B1mMeZRD87lkzfarI3CqBsUCbWCaWq7OntADI9NFxDfl3EIXjw+x1MpUiswFziuteKn7nK6JveJtElmtnG9xfDns8pSaeMmzRBrHAgBl6dMVzr93Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=Bc8hkHoH; arc=none smtp.client-ip=91.207.212.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="Bc8hkHoH" Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 574GIavG020246; Mon, 4 Aug 2025 19:10:58 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=selector1; bh= w9nB0wEZMjsj5QGB6VntU2EQFGOUf+h0V/Em0LxA/4Q=; b=Bc8hkHoHGEJ0w1Zb M5UgA3wLBVW2bDARuMu7OT2iWPAMdqsrKORaplPEd+5qnLPJLCVcpUkejy0Nijim 4NPnSgUhicKVNJZezZ34zROuWty0q0tTP8/Rpmsxn3u3CvNBjnbSWaRorivsuowe IteSGSJfqeX2sm7w/Ia/ofNoruhiYvZTEmhay5mpZJpwvTa4dZEzBgDK8Gvs89jU f/BcjfjumuUzJarJjHFoEmRQapfJgiePLfvPVvy2NSxzzaybwrxLMv4LUqOfGWQ/ wso217l7L9+XVTveZisdDi02t+8fto7YjcJqH8qk6Dx5FGlA3OKJrApMCezJ5M+R iYWzPg== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 4897t8reat-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Aug 2025 19:10:58 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 53BD840052; Mon, 4 Aug 2025 19:10:13 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 90D42B7470A; Mon, 4 Aug 2025 19:09:36 +0200 (CEST) Received: from localhost (10.130.77.120) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 4 Aug 2025 19:09:36 +0200 From: Christian Bruel To: , , , , , CC: , , , Christian Bruel Subject: [PATCH 3/3] selftests: pci_endpoint: Skip IRQ test if irq is out of range. Date: Mon, 4 Aug 2025 19:09:16 +0200 Message-ID: <20250804170916.3212221-4-christian.bruel@foss.st.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250804170916.3212221-1-christian.bruel@foss.st.com> References: <20250804170916.3212221-1-christian.bruel@foss.st.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-08-04_07,2025-08-04_01,2025-03-28_01 Content-Type: text/plain; charset="utf-8" The pcie_endpoint_framework tests the entire MSI(x) range, which generate false errors on platforms that do not support the whole range. This patch skips the test in such cases and reports accordingly. Signed-off-by: Christian Bruel --- tools/testing/selftests/pci_endpoint/pci_endpoint_test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c b/too= ls/testing/selftests/pci_endpoint/pci_endpoint_test.c index da0db0e7c969..cd9075444c32 100644 --- a/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c +++ b/tools/testing/selftests/pci_endpoint/pci_endpoint_test.c @@ -121,6 +121,8 @@ TEST_F(pci_ep_basic, MSI_TEST) =20 for (i =3D 1; i <=3D 32; i++) { pci_ep_ioctl(PCITEST_MSI, i); + if (ret =3D=3D -EINVAL) + SKIP(return, "MSI%d is disabled", i); EXPECT_FALSE(ret) TH_LOG("Test failed for MSI%d", i); } } @@ -137,6 +139,8 @@ TEST_F(pci_ep_basic, MSIX_TEST) =20 for (i =3D 1; i <=3D 2048; i++) { pci_ep_ioctl(PCITEST_MSIX, i); + if (ret =3D=3D -EINVAL) + SKIP(return, "MSI-X%d is disabled", i); EXPECT_FALSE(ret) TH_LOG("Test failed for MSI-X%d", i); } } --=20 2.34.1