From patchwork Fri Aug 16 15:17:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Chaitanya Chundru X-Patchwork-Id: 13766505 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 112D6C3DA4A for ; Fri, 16 Aug 2024 15:26:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:CC:To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=jTIMxHYS5+aU+huatUlsxndjwuYPRmu9uAAoauJIt8Y=; b=GJKg96s3xjP48z rmswsU+Q/xom0UBWEV7CaEDKaTswn3pBecruv0xwiboyPA8A4UQCzrUyzgw11Fp4F5/GNsSSA675f QrmHxoIKjLDUJ2kIfMd3i2UjoI9REw+fcbcTpEJbglOZyFyvo79oHEl/LusvibtvdEFDnV+wQKRqi bipPX+XlorKxQHLmVp0uY+TDJq56CJKIBCxKEBmdR9gntjXYHcmkeFQvUy9fRdjw+L5iYPhqaQumU H8uHcNaQQt78mPb/V/2SCuRSFTpPlLP33pW0hZ2mdItoJoNmuIjhOXeD811eorIr18aWCEwwQkTFB p+Y4UJ57HzoskniJIZvw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seypv-0000000DNMl-1qNI; Fri, 16 Aug 2024 15:25:55 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1seyiL-0000000DLx1-0mhm for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2024 15:18:06 +0000 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47GA7pFF025889; Fri, 16 Aug 2024 15:17:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=jTIMxHYS5+aU+huatUlsxn djwuYPRmu9uAAoauJIt8Y=; b=evjN0GS596ouKXCQTFyZm18gB7qMT2Xggs9w4C fdUXDTvsxGIJ5Hz2/qtawMSLZx9/rclo1E+JKUxc02hxrgPLcURM+JgvTosivqvv XXNyFcYlNyLHAnwfj8gE3L9hIltAA8qv37yW6rmHugpLvAFUFU7U37iOhv5ABkkL LK4yDp530QZm5+icX3SMxdlrPd9Db5AcxJrEdc3wCT0MViNJ1sUQgZOVyEEBNkFx pgGY0Dmu9ziyTGgeqCSFdz7g8vKx+9OkISZ1prpdpxPnb6XvDLUcq02TSFDSYx4P Hc5BZiLI8KAf13IE11/xqFu2PTUvv/lPdpQahlAqrp0y0hdQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 411s5pj78e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Aug 2024 15:17:29 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 47GFHTuf002970 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Aug 2024 15:17:29 GMT Received: from hu-krichai-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Fri, 16 Aug 2024 08:17:22 -0700 From: Krishna chaitanya chundru Subject: [PATCH v2 0/4] perf/dwc_pcie: Fix registration issue in multi PCIe controller instances Date: Fri, 16 Aug 2024 20:47:19 +0530 Message-ID: <20240816-dwc_pmu_fix-v2-0-198b8ab1077c@quicinc.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAH9tv2YC/23OTQ6CMBAF4KuQrq2hLVhk5T0MIdAOMosWLD9qC Hd3gIUbl+8l871Z2AABYWB5tLAAMw7YeQryFDHTVv4BHC1lJmOZxFoJbl+m7N1UNvjmSstrbdU l1Q0wuugDUL1r9+LIAZ4ToeNR/kya2EWZcddiGSY/ogOSuVSZqnVitACbz4JtUIvD2IXP/iVVm /T3oVnwmJsq0VakCtJa3mjdoDdn0zlWrOv6BTcd6wfxAAAA To: Shuai Xue , Jing Zhang , Will Deacon , Mark Rutland , Baolin Wang , "Yicong Yang" , Jonathan Cameron , Jonathan Corbet CC: , , , , , , , , , , "Krishna chaitanya chundru" X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1723821442; l=1813; i=quic_krichai@quicinc.com; s=20230907; h=from:subject:message-id; bh=qObo8kHXnInQBzlR/cNjrltsirAPTB/xtD1p434BQx0=; b=8Zyxb5PmIxPy7bIIXA0DB7dGfalQ090aGkc3m1IgKgeJW5UcI7riqRNPPYzUnsUDSO558lDAI IH8gnAKIHhnDZzWWj3zuP5HwjwjJ8Jr2DPvtAhwRaORcIurOYT2maIi X-Developer-Key: i=quic_krichai@quicinc.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 4X9q1koEuR8ieOz8Q6o_gmqVNIkMUAnv X-Proofpoint-ORIG-GUID: 4X9q1koEuR8ieOz8Q6o_gmqVNIkMUAnv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-16_09,2024-08-16_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 phishscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2408160110 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240816_081805_277937_D56C6EB9 X-CRM114-Status: GOOD ( 13.23 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When there are multiple of instances of PCIe controllers, registration to perf driver fails with this error. This is because of having same bdf value for devices under two different controllers. Update the logic to use sbdf which is a unique number in case of multi instance also. When the PCIe devices are discovered late, the driver can't find the PCIe devices and returns in the init without registering with the bus notifier. Due to that the devices which are discovered late the driver can't register for this. Register for bus notifier & driver even if the device is not found in init. Update the vendor table with QCOM PCIe vendorid to support QCOM devices. Signed-off-by: Krishna chaitanya chundru --- Changes in v2: - Use platform dev id for instead of encoding again (Yicong Yang). - Register for driver always along with bus notifier(Yicong Yang). - Link to v1: https://lore.kernel.org/r/20240731-dwc_pmu_fix-v1-0-ca47d153e5b2@quicinc.com --- Krishna chaitanya chundru (4): perf/dwc_pcie: Fix registration issue in multi PCIe controller instances Documentation: dwc_pcie_pmu: Update bdf to sbdf perf/dwc_pcie: Always register for PCIe bus notifier perf/dwc_pcie: Add support for QCOM vendor devices Documentation/admin-guide/perf/dwc_pcie_pmu.rst | 16 ++++++++-------- drivers/perf/dwc_pcie_pmu.c | 22 +++++++++------------- 2 files changed, 17 insertions(+), 21 deletions(-) --- base-commit: b236787b0da563e3bad0dab1b4b9a5bb54eabd39 change-id: 20240731-dwc_pmu_fix-3729bd3657fe prerequisite-change-id: 20240728-mhi_runtime_pm-2383b74c71ed:v1 prerequisite-patch-id: 90e73ba7ee4538c67f21f7f23ae4d931cb6e9967 Best regards,