Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1280761rwi; Thu, 27 Oct 2022 13:44:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ioYEWB+BneQF6+fQKWcmzbSrlWHob5xTm/ecH8W1JtdyhM3ZOfboxNgnC6FyUknIrJXjP X-Received: by 2002:a05:6402:2b8d:b0:43a:5410:a9fc with SMTP id fj13-20020a0564022b8d00b0043a5410a9fcmr48244670edb.99.1666903463016; Thu, 27 Oct 2022 13:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666903463; cv=none; d=google.com; s=arc-20160816; b=xDTO3IagqVgBGQKYCvi40mkgjMgYJBsPOUE7+5jDnJFxUCqleMRgl+qZnbio5stFAy bCIPJt6V33Ep9rIC5Kq3rW5kvE9GgWSCwiYawH4YT+EjHVvW6ZsjYsEHAtX+Y4IjE9va 8UWDdR4KYWwVrogyhmY0jYqyB6rYZn4PCDJBkGPYkVnjmoXvNbhdtv7lTTFi6Hrn5tza BGvjLf+Q3Z1y4Ea2P4HzfbjYqsiq0gdx1jX+FDKErVL5LIpVEncfEkhe6Av6og1tvrtI jxazLelvC1wTp49Br97evNO8RE5XKMz/DY5JTI6xkecQAkOPdn21k+zVjwyRLzZzbbhY A4uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hUAUSWW7eu0gYm4JDz7xZ5nILZAUALGNQNWp0KZmA7g=; b=zMRvEOLiR7RQPTdcfsVTefOaTE/HFpiSwNI0kmZLvXQqeEEoWz2IDIB3Dc8fprGAhn kj8yu+w4YEl5Ig058Q6XY3M08/Zljsuc66UkfQ/xV8gIOr4ScpAqGjptXigpKAZCpXde qzhkSKddIxFwQSIXh/1D3hdYYGoMAAaQ0KCl8a6FSK7OT5lHni7uqDg6SGFnVhi0WGUz 2Mccc2KVJ8WR1SGiYja945ZyqFqTeGcR7K58ZP6/cbb3g6IYsk9pH0KMb/dFeV70JUIy Ub5/5qmJI+AI2ojuOHgBAknUULnOibFQYH5QWAeDK6QpnupN6YsNB8pLArfThk2ambuM HBsg== 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=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eb8-20020a0564020d0800b00460e691561esi3023609edb.630.2022.10.27.13.43.58; Thu, 27 Oct 2022 13:44:23 -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=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236696AbiJ0Txd (ORCPT + 99 others); Thu, 27 Oct 2022 15:53:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236692AbiJ0Txc (ORCPT ); Thu, 27 Oct 2022 15:53:32 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 810D886802 for ; Thu, 27 Oct 2022 12:53:29 -0700 (PDT) Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oo8wL-0002tI-AN; Thu, 27 Oct 2022 21:53:21 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Palmer Dabbelt Cc: atishp@atishpatra.org, anup@brainfault.org, Will Deacon , mark.rutland@arm.com, Paul Walmsley , aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Conor.Dooley@microchip.com, samuel@sholland.org Subject: Re: [PATCH v6 0/2] riscv_pmu_sbi: add support for PMU variant on T-Head C9xx cores Date: Thu, 27 Oct 2022 21:53:20 +0200 Message-ID: <3621249.aeNJFYEL58@diego> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_SPF_HELO_TEMPERROR 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 Am Donnerstag, 27. Oktober 2022, 07:02:59 CEST schrieb Palmer Dabbelt: > On Tue, 11 Oct 2022 16:18:39 PDT (-0700), heiko@sntech.de wrote: > > The PMU on T-Head C9xx cores is quite similar to the SSCOFPMF extension > > but not completely identical, so this series > > The rest of that sentance got dropped, so I put in > > The PMU on T-Head C9xx cores is quite similar to the SSCOFPMF extension > but not completely identical, so this series adds a T-Head PMU errata > that handlen the differences. > > but LMK if you had a better version, it's still early so I don't mind > swapping it around. sounds just fine and sorry for not finishing that sentence on my own. > b4 also got kind of confused here so I had to merge suff manually. do you still know what b4 complained about? My patch workflow is pretty basic (git format-patch + separate git send-email) so I guess it might be interesting what it was stumbling on. Thanks Heiko > > changes in v6: > > - follow Anup's suggestion and hook into the (pending) cpuinfo patch [2] > > instead of modifying the core sbi_get_* functions > > > > changes in v5: > > - add received Reviews > > - fix sbi caching wrt. negative values (Drew) > > - add comment about specific c9xx arch- and imp-ids (Conor) > > > > changes in v4: > > - add new patch to cache sbi mvendor, march and mimp-ids (Atish) > > - errata dependencies in one line (Conor) > > - make driver detection conditional on CONFIG_ERRATA_THEAD_PMU too (Atish) > > > > changes in v3: > > - improve commit message (Atish, Conor) > > - IS_ENABLED and BIT() in errata probe (Conor) > > > > The change depends on my cpufeature/t-head errata probe cleanup series [1]. > > > > > > changes in v2: > > - use alternatives for the CSR access > > - make the irq num selection a bit nicer > > > > There is of course a matching opensbi-part whose most recent implementation > > can be found on [0]. > > > > > > [0] https://patchwork.ozlabs.org/project/opensbi/cover/20221004164227.1381825-1-heiko@sntech.de > > [1] https://lore.kernel.org/all/20220905111027.2463297-1-heiko@sntech.de/ > > [2] https://lore.kernel.org/r/20220727043829.151794-1-apatel@ventanamicro.com > > > > Heiko Stuebner (2): > > RISC-V: Cache SBI vendor values > > drivers/perf: riscv_pmu_sbi: add support for PMU variant on T-Head > > C9xx cores > > > > arch/riscv/Kconfig.erratas | 13 +++++++++++ > > arch/riscv/errata/thead/errata.c | 19 ++++++++++++++++ > > arch/riscv/include/asm/errata_list.h | 16 ++++++++++++- > > arch/riscv/include/asm/sbi.h | 5 ++++ > > arch/riscv/kernel/cpu.c | 30 +++++++++++++++++++++--- > > drivers/perf/riscv_pmu_sbi.c | 34 ++++++++++++++++++++-------- > > 6 files changed, 103 insertions(+), 14 deletions(-) >