Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp13234032rwd; Fri, 23 Jun 2023 18:50:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6vvWTQA2YhdEsOyBOqbYDytUh+m36iJd4lflBImMcPqYv1p1rl8T/B83NZyYRrO8Nr+fTL X-Received: by 2002:a17:902:a705:b0:1b1:a9e7:5d4b with SMTP id w5-20020a170902a70500b001b1a9e75d4bmr811368plq.22.1687571432727; Fri, 23 Jun 2023 18:50:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687571432; cv=pass; d=google.com; s=arc-20160816; b=SLsajjlKvryrDxJqXKTIzCOOVqZa/XSEdzqskt4zkTtG78Dqa7mKouAGXZo/U6cnL2 nCV1EhNMXeY2ymCAjh4KT4dGV/p60coK8LNuQuTDkuPCDFpz9wxtd+dLMu5WqK6tBF5l ACUWDuw8P2nfDuThvOWHsh48n6LTrkie/b6Fp7IzPDM5pGI0UE3+12CwyF6HvreCh7tD +RFnodJBLt0+bO1DKcJYF0kDT4+dxjgxrZGynKDtBDvJWRkstjJvZ84Mo5ST/7HqOO9d 9h2ItHtVJEeGU0ddKiaEwM+bI4K0YcqIHQu2hSEYMYf91QgNygd1Kedyrffq8kAMOaSQ 8BXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=epj5RkMTe1qH451XeDGCIcNXYLWU2TjaWr8Ff7Q9Cn0=; fh=5psEE+yDZx/pt2dgJKVZDoYchphh4SmSEGv4gyqXCHY=; b=J99Cskip/MSlCtiIQ4JqYJfTPTAaz5AXNfIMjY6++oSB///Fmifhv8ChbwWk7haxOd lkTHn0bG3iRpo3HlQDyzBpMnTs3/K7w9BLsKtO8W3E0/3Rf84PP7qtTSfXUj3ivA0MS+ zowwYY6wA70x/lSWMrza4n25Rft/GIFWl3WwaHV5KwVNmjoeIM+WZ1r3GlOyVPJjpFNE CjYx7lFGetaSjSjDAANxIAZVwPpc4n/AcXAQGWHGz3DNGnCfb8DJ8s96L2rZij8eR8ml PRzn85Q/GLPAkeWFlAXWVg75XZJqX+HQTY//EejgMneAg9lLxmCCo/X57uAsj2+hEwTZ l+uw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b=jz+5Wgc2; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u1-20020a170902e5c100b001a6b6085041si451794plf.512.2023.06.23.18.50.20; Fri, 23 Jun 2023 18:50:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b=jz+5Wgc2; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231627AbjFXBdA (ORCPT + 99 others); Fri, 23 Jun 2023 21:33:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229630AbjFXBc7 (ORCPT ); Fri, 23 Jun 2023 21:32:59 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12olkn2074.outbound.protection.outlook.com [40.92.22.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 207A7213A; Fri, 23 Jun 2023 18:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Keiz1DeIdmfqLgq9VJX9wSB7CQd0GHi943+X2Y5rzbgL5Uojgl+YxmAI/fpvueWlNHbUEoGKRw1mwunKtnp/RRTF9x8zCOw5VRjzc+GmaUvptbXZWTF+YaLrgSyq+ZWPacqNNt42fb/8+yI6Ccw8xUpiHS+nI16K0bI5Xa75U6B4+mMyjeDx+HXy1XSI71JG+XcP8dH+ZJ+K07kQLASEVKHhTIeGpn4Sn6BxFrJqUzQLb9MecXKBbfB7aUsZZplWWIHyh3Wx+VbtGTTbPk9uLYR7nsDp1aChD4D8yX1TMhPZvrmST0UsirzZkrr3WrtzFHv035bSfCeGOCORNVV7CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=epj5RkMTe1qH451XeDGCIcNXYLWU2TjaWr8Ff7Q9Cn0=; b=etdMCMjsU+7AzHtils77jG2Zj4dwMq7/HA7WconPvaNomfST3L6iyODj3SJByRV7Fo69Q2vHSOKEFuQPGZOK52Nhws0Ux5x16OmiMRMMKN/7xegCLMuilEWxYK2G936pO1Sd7lp99QV5sSwn3Hl/BBk8VisMdvb8z7AwyUpOPraWXOv2KqKoWT9TRe79MeRZskh5uCKwgcoQufPgOG0TWxbFUOMGAJuAYFs2CXrNdjqOGCMg67XxLwXmL3B8xs+vS8JcPqUdnoNhXa83WO5G0plfmVuBnBp8CJmEB248TrlAmiUlij70+xbWvSzho07WiNN92I/CDHIHhVJhMxCs9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=epj5RkMTe1qH451XeDGCIcNXYLWU2TjaWr8Ff7Q9Cn0=; b=jz+5Wgc2UrE5uDXGiLFyYJ/MaCR31NEPUn5qn/FLivx76ibcFwTiqpQoQFvO7PNpfcA3AzadSRce9kYldL33xFxIfhJG7ukKxIn0htcZ28+iT/g+QoZ8y+tlnm/jfa8S+QbPVPn6iOOgjDmxUEu4zIUz0O2PORpzshmPuSO9/ioOBmrrLC+Xg9oHivOBPED7QId44VrcqP5/ly5yfyaU3Wd5Xc1QSQuVVXC6P+7M63nLlDK2YmCOvssxJx49M51Shx0WAK00cctdpaGDuz6R5e8SZVpjS0Smrp7rhMZFWWbvO2EFCBemsAAwqHpdhjM4zv95Wzp7YJ5GeZry7WbC+g== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by BL3PR20MB4921.namprd20.prod.outlook.com (2603:10b6:208:3b0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Sat, 24 Jun 2023 01:32:53 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::1818:77d9:407b:dcd6]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::1818:77d9:407b:dcd6%3]) with mapi id 15.20.6521.024; Sat, 24 Jun 2023 01:32:53 +0000 From: Inochi Amaoto To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nikita Shubin , Inochi Amaoto Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH V3] perf vendor events riscv: add T-HEAD C9xx JSON file Date: Sat, 24 Jun 2023 09:32:47 +0800 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TMN: [7u+aWMwo2m9INaTxe+Eho1G0RkY10PFGTMFvocVS5TpesSz0DVl6sJq3H/9uzvKB] X-ClientProxiedBy: TYCPR01CA0048.jpnprd01.prod.outlook.com (2603:1096:405:1::36) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20230624013248.637913-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|BL3PR20MB4921:EE_ X-MS-Office365-Filtering-Correlation-Id: ad13cc2a-1e40-4faa-5ab9-08db7452edde X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nDUp8bIAwOWCqxT2NJSXd59YvOqHkdZDz7oZGh5TQfLlKLXKvcdMKEnuCmNZT935VLDxAli34rrEx6P2ku1YLyULx/hLbCkhjYnHlT6KWNYJRPuyFv9mJPg3dO0tJOHUaMyRC3FPOm6XoFJIns6Lv9opn/dMd7pqT+91iwRv6bAsKJoU1L8flBWtcforBXjdf2j10Gs6cheu7xr3U2h7pzj+wyirmOhEyGasS1g+6Up2jTKvnCeffcXBbQNcdNdt/iDdWRJ1rAdpyuGHEyFFv0IsbZGgJd8aa8m/04rrQlIdeKdOchIRJ3a4iqWEEIbQtYijUhO1qUAUWMSBZsdgoNrZKKBLrhsbpd/RPiDm0nHnkp0tXmhUGATQuQwSetvPQ19o+glHa1LNsnGX4ojcug5MUIhLTUvgj91peOVv1b5NGsl9lpZgos9F45WHOZCe9ZrAl/na+BvaRKkSsbqWZNclm+OKLoT4QBmnOZbKJ7UawO3rrOdqOxf9yDS9q3itjKjL9U3218Zs3pyzYDcOmrRXZO3DphTX1TZ94guWMoTVkuEimkhjHhjKAU/fZ/CyagKPI2NS+BLKnnygb67tH0PNGmGWvrJiEvwEzRE+AyoD46be4eOEIj9IvnxQF1R7rmUu39zUM51F8bCyyRds/bMBAnXeX40w1bU/XuvDVwx/u/1tg7Gc8pj1IJ5VJDRNurnzTqsMlMc1CLqU19QYUW52VcE3ROyqV2HA8qNE61q1pb4uiDOIjrRw3vDENybtHHtD1UaKcErqdVUi5NxY2L X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wycFMgHQNObQ/p46Ti2bShRarHjKxFJLxVaqVNGHtoRL2nuv4CXdSGQqJDPE0asLFxZHgZulBVnXAsRIHfAzU+ibt8wgXJPT+dHCj4OJFbV/ZX2Da9ulpUO3eIdJc8/tW+5nb/BdxQrE0QetPpaFfLw+kcv/VoGAWjNHKMTsq1krW5CdJ1BU6Rg9DXe5IMr3NVuLNibqnnvkfZqbn4uY/ZZWKTFZ/Z2xlu2R8dKuZpZex+E8T+UQAn1CkIqEjzEa+SWFIi5zK8+Qpk4GjVukO+jtqJkqG/kOAkjtKbjdnyNZRwh/qLVUmf3cfdEZayNfAnxfae0+JFIMYP8FZME9pWYYfOiJlRj3LjTJXhCVc1VLDyJwRK5ZqZYteowKa+3yligmGn2CpH3p85vm0DauPtrF4aaujc7PCPnM1kkkraC/TpaPhrG494FNlmjYz/2ey7vs7n2Qy8nB36c6WmPci2tj7WqNgulT2W5Nral6UwyCiMmRoLFJOKNqPSPGJrJ8ORW0Xgajkx6L4Ss4ga28eRLOABwsOdS3uG2+7J3l+vD4LXcFW3fuyhwXEsB0z2NuAXErR7Hz+y1LOmtPTQAOxvIx7x5rfrM6K545EPZauQtqJ4CQkTo06IQcQw0U887f X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QldHbDZmbnN0cm51a1E1NTJpanovQzZMTjdLbDltN21XZUNkaHMwTG1xaXEv?= =?utf-8?B?NFRaTU1GSTFHZXk3SjI4WjUxY0d3S1YvTmJJN1VqM3I1dk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4Y2hmZzc4cGdyTjhpZ3FWWmp1YnBkUWNV?= =?utf-8?B?L3JGclBGcUNKZjUxOGc0WUxFU3hTaDljOVpoWDF5QjVobm5aVUdKSjhGc2di?= =?utf-8?B?bThTRjJoQUpJMzQ4aVl3NGNEUjdSRzE2bUM5OEFqMlFJdHo3YjZMZlNIbk8y?= =?utf-8?B?cStZSFI3K2VkbWFwRFBKQTNENUtTbWpic2hTbTI3TlUvM1FvWXZsektxYWVu?= =?utf-8?B?VjRJWjRReHJIQlFEVEpCVFJSSVhiWkhBWmhUUDhXWmdwd1hndytTWG1uUnBD?= =?utf-8?B?RG1oUHEwQ05nMlRCd1BRTi9FbkVxTUtzZC9IYXVyZDRzSG9YZlBCSXEyMXlJ?= =?utf-8?B?UzY2TXZuaTAvemJKYUhuM0xlRXFkODl4SS9GREZwdThUUUorb3pQYkExZHJv?= =?utf-8?B?bmp1dVd1dmZiclo4VEd4SXhGcnl1YWpHKytMMDJIT05kLzdUdVBpWXE2R0c3?= =?utf-8?B?NlBFTytEOFFDYklPaHJTdEthaE5paGJpYTlKMnh3Q2lMdDk4QlJLR0RYYlRk?= =?utf-8?B?VWZRakR0eEtCY1RISHdraWRON2sxOEkzL2x6ZW9CcHREcWJucDFsckJhTUFJ?= =?utf-8?B?T2RJZFQzbXpKR1loZC9kWlZDRTFhZ2NTbUhaWjVNZi9nM0dwU21USGJyN0Za?= =?utf-8?B?YVJIUGJqOWt1MkRMbkVVOGlzdFNlZTNjQ2ZVYmEwOUJxemNTM1pqTWRUYzA4?= =?utf-8?B?cWxvSWtnS0IwTTJiTHdWUDF2SWcyL0JBSkRXcEhQMnl5dCtXa0NDWVdRPT0=?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad13cc2a-1e40-4faa-5ab9-08db7452edde X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2023 01:32:53.3424 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR20MB4921 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Namhyung Since there is a fault in T-HEAD documentation, I am not sure whether the perf events are correct. As a result, I suggest temporarily suppressing this patch until I extract the correct events from its vendor perf driver. I will prepare a new V4 patch once it is finished. As for c9xx wildcard, the T-HEAD provides a `MCPUID` vendor CSR to allow its CKLINK to get the detail CPU info. The format of this CSR are: ------------------------------------------------ |31 28|27 26|25 22|21 18|17 8|7 0| | index | WLRL | family | class | model | WLRL | ------------------------------------------------ And for C9xx series (only index 0000 is vaild for us, as `MCPUID` also provides other index). | 0000 | xx | 0100 | class | xxxxxxxxxx | xxxxxxxx | The class codes are: C910: 0011 c906: 0100 The CSR is a M-mode only CSR, so now I'm exploring a clean way to integrate this CSR into the kernel. Any advice? Thanks, Inochi > Hello, > > On Thu, May 18, 2023 at 2:50 AM Inochi Amaoto wrote: > > > >> licheerv # perf record > >> [ 432.015618] watchdog: BUG: soft lockup - CPU#0 stuck for 26s! > >> [perf:117] > >> [ 460.015617] watchdog: BUG: soft lockup - CPU#0 stuck for 52s! > >> [perf:117] > >> [ 488.015616] watchdog: BUG: soft lockup - CPU#0 stuck for 78s! > >> [perf:117] > >> [ 516.015617] watchdog: BUG: soft lockup - CPU#0 stuck for 104s! > >> [perf:117] > >> > >> But that's not related to your patch anyway. > > > > Same issue on c920, but it did not always occur. > > Like a sbi issue for T-HEAD cpus. > > > >> I am strongly against using "c9xx" wildcard, i would prefer declaring > >> them separate (especially taking in mind that c920 is c910 with vector > >> - AFAIK), but that's up to Arnaldo to decide. > > > > AFAIK, there is no reliable way to distinguish c906 and c910 cores. And > > the events of c910 and c920 are the same (according to the draft document > > of the c920). > > > > Anyway, I agree to let Arnaldo decide. > > > >> Tested-by: Nikita Shubin > > I'm collecting patches on behalf of Arnaldo this time. > It seems this patch was not picked up for a long time. > > I think we can make changes for the c9xx wildcard later > if needed. I'll process it in the current form. > > Thanks, > Namhyung >