Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp534666rwd; Tue, 16 May 2023 04:46:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4SivQGtCw40HNx4mj4kE3VUhKpTw7icwePm0nlIU9RwYPHnxQYWUjiyzP9nPCvBYNMRXil X-Received: by 2002:a17:902:c453:b0:1a2:96d6:7d8 with SMTP id m19-20020a170902c45300b001a296d607d8mr32293060plm.28.1684237581728; Tue, 16 May 2023 04:46:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684237581; cv=none; d=google.com; s=arc-20160816; b=0nMUQr0n986IziHXTv13cLqhItuNW9OchMU8nCejctBqHZnoNCnoazEV8L6XmKkGFR rpsxCd4nygVS2AIXgXDDAGNjeGdWHabEDu9CUV8TVzfziHs0ITtJ5BIe138vcvGEA+Af Ns1CXV41TmRjciT3pOCdLcl/8P2Smfs7u1OO7Bn9N9WKBqX8uwuZTMvmbZQH7G1BwyHM 9baxa15uskg4jW38DhU1yd0KkuIbBQbf7dDbP7kdIV2MGjc6GsySriZv3bWa+qK1uA2L SfSvg65iQRQRTTsUUD1fa3nTJDrSXyRNfv8UN53JlUEH64iHEqdVSnM4mGrkxuk/R8Ez XJBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=lMrZOJIB5Kq7XBazm3gjVU6sMhxH4y9CP6MxFx5bCrg=; b=YbPzstW4Q/11y1tJt6RRG9VgQiv475dbG1b9cXwq0kjNLkHO7k6nfZuAs9n3yl9pOL tFJ2D69/HgUHJ8oddmBHPiXRqxlCZ9fYHfIwvmTfEJwfZXWKoRKqh6OrC77qxWEExzDX R4cAxuj2jSOZ8Ls1TcQGj8JoT46NQ/W1Ugpb5urJhWGyY5l3R4UJm02AL0AKtASPvDIh Mk8+uk44fXYa/W15EJa9rD7+LQU2/ZNC86Aadc4ftROVp2ix3cH1smv/+BH98IeUlvTx c17ncuC2aWHW9oamxhYYZreCGL7p2284hWzEHreMc2J/O5nj8Jh3BI7jquAbdImHeAUG bJ/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=qo5pn4E6; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j4-20020a170902da8400b001a94f85b0besi19769700plx.406.2023.05.16.04.46.09; Tue, 16 May 2023 04:46:21 -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=@maquefel.me header.s=mail header.b=qo5pn4E6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232965AbjEPLRD (ORCPT + 99 others); Tue, 16 May 2023 07:17:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232016AbjEPLQu (ORCPT ); Tue, 16 May 2023 07:16:50 -0400 X-Greylist: delayed 13441 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 16 May 2023 04:16:24 PDT Received: from forward501c.mail.yandex.net (forward501c.mail.yandex.net [IPv6:2a02:6b8:c03:500:1:45:d181:d501]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F5AC7284; Tue, 16 May 2023 04:16:24 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:5508:0:640:704d:0]) by forward501c.mail.yandex.net (Yandex) with ESMTP id DE5B85EC2F; Tue, 16 May 2023 14:15:55 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id rFZKUqBLcmI0-RIroBFBW; Tue, 16 May 2023 14:15:55 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1684235755; bh=lMrZOJIB5Kq7XBazm3gjVU6sMhxH4y9CP6MxFx5bCrg=; h=References:Date:In-Reply-To:Cc:To:From:Subject:Message-ID; b=qo5pn4E6x10c59nkLDhfTnwDxBnodn3LJx3xTeuKTeXxVfhtiGjQjNuiDQQI1FNX6 DrW7a73W2NDiruYW6gJZd84PXw1ppl/Bke6eQNLxMcHli632y1MlByYNGAEhbweUYX HvBYCPhvtwsbiY56ppdgQfKdw8R3ViKdukAX8DUY= Authentication-Results: mail-nwsmtp-smtp-production-main-57.myt.yp-c.yandex.net; dkim=pass header.i=@maquefel.me Message-ID: <28d0792b81db018aeb644096898693694b2841bc.camel@maquefel.me> Subject: Re: [PATCH 1/2] perf tools riscv: Allow get_cpuid return empty MARCH and MIMP From: Nikita Shubin To: Inochi Amaoto Cc: 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 , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org Date: Tue, 16 May 2023 17:15:54 +0300 In-Reply-To: References: <680f2d5d146a38083a28198f1a8a3694654bf8f8.camel@maquefel.me> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.3 MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Tue, 2023-05-16 at 17:43 +0800, Inochi Amaoto wrote: > > > The T-HEAD C9xx series CPU only has MVENDOR defined, and left > > > MARCH > > > and MIMP unimplemented. > >=20 > > According to the docs you can still read them, but it's hardwired > > to > > 64h0. > >=20 > > How it's supposed to distinguish c906 and c910 for example ? >=20 > It is unnecessary to distinguish c9xx, their event index is > compatible. > The dtb and opensbi will final decide which event can be used. >=20 > > What does /proc/cpuinfo shows on c9xx ? Why can't we use zeroes ? >=20 > The content is as follows. >=20 > processor=C2=A0=C2=A0=C2=A0=C2=A0 : 0 > hart=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : 0 > isa=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : rv64ima= fdc > mmu=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : sv39 > uarch=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : thead,c910 > mvendorid=C2=A0=C2=A0=C2=A0=C2=A0 : 0x5b7 > marchid=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : 0x0 > mimpid=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : 0x0 Then why do you need first patch then ? marchid, mimpid will never be NULL they "0x0" and "0x0" strings respectively. How have you tested it ?=C2=A0 There no way "0x5b7-0x0000000000000000-0x[[:xdigit:]]+" will match "0x5b7-0x0-0x0" which cpuid in your case. Just drop this patch. Anyway "PAGER=3Dcat perf list pmu" gives me an empty list on licheerv. >=20 > The `mvendorid`, `marchid`, `mimpid` are the same across allwinner D1 > (C906), > T-HEAD th1520 (C910) and the sophgo mango (C920). It seems T-HEAD use > MCPUID > CSR to store CPU info. But this is not standard and not shown in > cpuinfo. >=20 > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv