Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp13365538rwd; Fri, 23 Jun 2023 22:07:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4GPHyokAsu402fD5WQVXHYKN7jL+gHtl0nNN9aX/F7/lteSGO7n8yJZv+qSjfSCWjTX2f6 X-Received: by 2002:a17:90a:1c6:b0:262:c223:e40c with SMTP id 6-20020a17090a01c600b00262c223e40cmr1289211pjd.4.1687583225808; Fri, 23 Jun 2023 22:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687583225; cv=none; d=google.com; s=arc-20160816; b=TQGNFqk5050X8fxoMIHztpDGzVMnaZhqjSnatHom8OaFYmQmpMHI90xJdPKCgT6b4q 6nD83ztGdv//dEq5MZ6VMdty4BFK8MWJGznQR8YLi+wiqod658d0EUSitN3vsdOThH3p 3pC9FgYrOQtz6HdppnPyhIX5j6hrn617oBY9WW1oQJnfjD69L+LcXKrpmtbLHR0ijZNn 097FaZTyW1trIXMz+PO9lVGubLfC7+ef/lobQodHmw59jQhjrx7ohyFfX27SPIUX5e0J 1Hr/Jq5ZZrSUhVK+0UErePgqiwvlKlvKtu++MK6RQY0l4Op0Ef2b7zUbY1CWQCbN9YEA ZmhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=TLFRtLHbqy9mcAk+xHrXXOCJJ/mEDZp0v80L7Tby2tk=; fh=ZqFHFKvTZh/7B4YjWJa/2aOhycNttsk4awtqXwhpcUs=; b=mpGuBhbJ/hsLeN2PmsVV1etJmaCrLnVA+28zqe8ITUi1Z/tGMgC9MhSI2IvF2WL8bu fVRBF5qtNwQx5/iVZ2sADOpTdwsO0ZvQs8HjfF1JK9D/lN4soM22rQcLfxxtKI8q8HZw Q7hYQl3R2FaeN/vqYhA+mWXHDdHwHcLBl0T74NrXUbCK8w16oaV66sqbooIHp4erRXqC eM9tnF97fTXcYOx7h8XWXX+rFR+ym7h61iQNFN4sgEYAoD4ttHgq/sf367MgmHynwDGq RXHoSNIDDvI9fSoWi/CDHjdIHtfrvANF9tOE5k5iS5b0Nfyb3FTXQ8PcpgpCOkBJRWNh UoPA== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pc11-20020a17090b3b8b00b0025359a570fesi1119050pjb.19.2023.06.23.22.06.52; Fri, 23 Jun 2023 22:07:05 -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; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229591AbjFXEfS convert rfc822-to-8bit (ORCPT + 99 others); Sat, 24 Jun 2023 00:35:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjFXEfP (ORCPT ); Sat, 24 Jun 2023 00:35:15 -0400 Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5947136; Fri, 23 Jun 2023 21:35:14 -0700 (PDT) Received: by mail-yb1-f177.google.com with SMTP id 3f1490d57ef6-bff89873d34so1030687276.2; Fri, 23 Jun 2023 21:35:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687581314; x=1690173314; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rWcltbx43ICJ2omQWXgRLpaOtwzfz2d8GhcvQRYoRw4=; b=ZLm3kFuvos5KFLwy0y83LjOP+55KK+RhvsgeWOYCn/QnDkYy1dOLWQ9XEmGjQ4pmsN 5epwV+WwDVjA3bXL3GOsW325LDpYYzDs0MetKdZkhZFWard2jWqAREC9j+zO2S5vl/YJ o0NxJtp2yBAqsC2jUE+c+Brt5jcxOsuG5rZONFG4knKU8wy77Z9mVoKGnvQ1YlXiVvYt rFdTA/jSR2HnHubRhetO4+b4RIWNzukF6sPGnln+r/zoBQoGgoNBOpzid2IRDHDULUaO 3TJ0pXaqVYGTsaOjOlWr6WZzO+l3nxooCDfG9rOMDK7rKSj0gr07sfdmEWVOBHhAYiux 6IOA== X-Gm-Message-State: AC+VfDx3wap5sHET/vMvCEPe5DRbM69EmLk6yJrx5Fnddbv5pJwd77gz U6pA4FOlouNfpOgx221BusLF5DZUhGDEzREqcQQ= X-Received: by 2002:a25:e70b:0:b0:bc7:f963:eb48 with SMTP id e11-20020a25e70b000000b00bc7f963eb48mr17036891ybh.32.1687581314012; Fri, 23 Jun 2023 21:35:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Namhyung Kim Date: Fri, 23 Jun 2023 21:35:01 -0700 Message-ID: Subject: Re: [PATCH V3] perf vendor events riscv: add T-HEAD C9xx JSON file To: Inochi Amaoto Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Paul Walmsley , Palmer Dabbelt , Albert Ou , Nikita Shubin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Hello, On Fri, Jun 23, 2023 at 6:33 PM Inochi Amaoto wrote: > > 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. Sure, thanks for letting me know. > > 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? I don't know about the details. Is this CSR available from user space? If not, you could add it somewhere in the sysfs. Thanks, Namhyung > > 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 > >