Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3474218rwb; Mon, 5 Sep 2022 12:20:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR56KmGgdAidup5ppeEUor5pvyKeDwbzvgXYHv4Eufqe/W68amA6aHSKXn52Jv12ngBQq2Ei X-Received: by 2002:aa7:8551:0:b0:538:22ec:d965 with SMTP id y17-20020aa78551000000b0053822ecd965mr41640411pfn.16.1662405638931; Mon, 05 Sep 2022 12:20:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662405638; cv=none; d=google.com; s=arc-20160816; b=rm3Qjkx+q7tFHk7A5RkopHvVt0gEQpeYujVdeyBlXHJVaiNozD6nd/RJLq97zrUwil nJIs6H4BQMGSMzonSOcpjY4ybgRAzXs+ESntCthLZ/FLRHuWFOhXW1AI+IQdXtNAL4b8 lp2SuW9JvDC/+2Dqa5Xr+gjDLDOPQ9iYWNkiQJW870q6gCmeZO5dQa3sh1cHJzzX/cXH PSiS4W6+VCkzdHzMQKlJjV0MQ6Bg0dF2g1FXO8sYVOgHA9EZ+Fi1nlpA7NVOZZXZThVC iZ9isTopahl8083TzbO1OkcB1MtzxOmip+pUhP4IPaqg62bUCUsTzZV5lu5edyKgDoDE Ps7g== 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=auzO3/W9vf/Bw0z2PJb7xUW1rRQMsFhli5k2dKEQem0=; b=kQPQVRlNH4WrLHdCA4cKXDbhvo28sbsmJvFEjigfVJ2Kt1kR5HWiq948XTaFGIx2RO KoKNMlORVfyd0HDil/9i+oK4lS852hBJeT5yFZskBnedAat0yS4crGoqpyH3VRtVePx2 kP7S+CLcFM1JLlmi/6ZUjOyP7Z5FgrQajXnkW8VOYhZL7amBNvpOZMaMZR1GmF+YfP0q CKCIci2TziGMsFcUPkqs3MmGmpHNuxKZeVjHVlDTDlEjkKaxn5dJ8oWDzT8JBb60ggkl nxvfXJqfXJ+i+5mZhXPsOY1ogFTkCV2j6JEVv/2Qz+IWEHV5vjS6pJyBh/njnsGUQ/s/ hOKQ== 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 l197-20020a633ece000000b0042b4d1b0dcbsi12520935pga.216.2022.09.05.12.20.27; Mon, 05 Sep 2022 12:20:38 -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 S231791AbiIETAO (ORCPT + 99 others); Mon, 5 Sep 2022 15:00:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231466AbiIETAM (ORCPT ); Mon, 5 Sep 2022 15:00:12 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 938B33AE56 for ; Mon, 5 Sep 2022 12:00:07 -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 1oVHK7-0001BA-Tp; Mon, 05 Sep 2022 20:59:55 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Andreas Schwab Cc: atishp@atishpatra.org, anup@brainfault.org, will@kernel.org, mark.rutland@arm.com, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Conor.Dooley@microchip.com Subject: Re: [PATCH v3] drivers/perf: riscv_pmu_sbi: add support for PMU variant on T-Head C9xx cores Date: Mon, 05 Sep 2022 20:59:53 +0200 Message-ID: <8712127.JRmrKFJ9eK@diego> In-Reply-To: References: <20220905141644.2468891-1-heiko@sntech.de> 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_SCC_BODY_TEXT_LINE,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 Hi Andreas, Am Montag, 5. September 2022, 16:30:48 CEST schrieb Andreas Schwab: > On Sep 05 2022, Heiko Stuebner wrote: > > To work properly, this requires a matching change in SBI, though the actual > > interface between kernel and SBI does not change. > > What happens if you mix different kernel and SBI versions? The interface kernel <-> sbi itself is not changed at all and this of course only matters to t-head c9xx cpu cores, so I guess we have the cases: - non-t-head core: no behaviour change independent of versions - t-head core with everything "old": would just uses the regular sbi pmu setup, but as the necessary sbi-side pmu config for the c9xx isn't set from u-boot (dt-properties mapping sbi-events to the values needed to be written to mhpmevent*), this is broken anyway with standard sbi - t-head core with "old" kernel, "new" sbi: kernel does not detect the extended features, so should fall back to just use the standard pmu features - t-head core with "new" kernel", "old" sbi: Same as everything "old", pmu isn't setup correctly in sbi anyway for the c9xx at the moment Heiko