Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1980346pxb; Thu, 28 Oct 2021 13:51:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKdm3dGgET4+eX+WUa5ieSWnuQM2KqplbS/DIw1nCdwSA7IS6sFEcEpjUbWXV7+krbbHUo X-Received: by 2002:a17:906:fcb7:: with SMTP id qw23mr8134373ejb.448.1635454280062; Thu, 28 Oct 2021 13:51:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635454280; cv=none; d=google.com; s=arc-20160816; b=acYNzvWaYVoNsexktPwbhAtCs8iSoBj5PFQe3SSnBPuNKLaCKQk3FVsirAOqCOoc9Z FrD0ieGT72JPAJN0rdy01GwUOCoMS+zgQ4o6e+CEBYlMfatC2EYueM4/T1UNoOawFHmg QnqMfG0G0kjkwnT7szIddH5LnIKWGLneSRA7nXdrwlK6lWaNa51IQyrgbbJEseipziz5 M6fEmduk72lucz2s4wSyY8oskb0A1QoGifl2iDvCxsS0YAGf1LS6jzCDzItb2Fo2Aq2k CcL1c6W4BGwGqmhFl5heJFRMUixFyZeAubqZ2qsR5Y7xT9s0jzERm3gifQF+N6v5rNL5 A+Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3IvTfylI/s5zjCUTJoTbfVOltBPWwJQSWlH2bF2QUuk=; b=W8zawzohJyYrJ5raVaVxM85Iy6MlN5oAg67qZXliY7pGuPncl5QtNiKvOBoOcR/fzM lZG+GP2a7M3KfRFB1MxJGgYGpAhlgG1KQI1Iv6WAm6QcbhtRZJSK+dJJlC1pz1cDe7gs r80Q230Hrx0bf0n7Efctq+13DgJpguucSfaUSwdMv8BsG6Z7si0bgjM74y8VQdO6Ni/v m4dqq+PuDzDR6uZXuFvZqO7mOizwMVCv8u/XjZMDztp7ASkJd2s/I6BK7VMbTNv2p/CQ vSLGGYEHYI1DojAI25LtW0uI+01bEspe/0dtGPkI9CLxrgKQ26rmC6Vsh8GVeq7ivggR tBTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jrtc27.com header.s=gmail.jrtc27.user header.b=oDbwPY9F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o7si7631674edc.387.2021.10.28.13.50.55; Thu, 28 Oct 2021 13:51:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@jrtc27.com header.s=gmail.jrtc27.user header.b=oDbwPY9F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231272AbhJ1Uvc (ORCPT + 99 others); Thu, 28 Oct 2021 16:51:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231281AbhJ1Uvb (ORCPT ); Thu, 28 Oct 2021 16:51:31 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3C9EC061745 for ; Thu, 28 Oct 2021 13:49:03 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id e4so12349985wrc.7 for ; Thu, 28 Oct 2021 13:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jrtc27.com; s=gmail.jrtc27.user; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=3IvTfylI/s5zjCUTJoTbfVOltBPWwJQSWlH2bF2QUuk=; b=oDbwPY9FhMa5+lI34zwqKLXaGGEJP1uhqTbtRsJgcXK9YE2LdLZaiUk6cnSS0e/z7B NGrVlsXfrFTsjnJAwwqdqoPbDLCN13n0CUMg2Hnu9Bl0kC3Ynqw3gDSy7EFkY5hOaWsV cF0zEMmnNLEFqZq5usfApABvoY2RR5EkszAaoSGt/8bvwq4noNBArvxJqCHhkqxyKzRr TCdGfdedDm8XQDbRwnJRXjlusfgnqW9aWPfo1myOMwH/pLlZhbQeP8c90RfxBdZBXhPs 3Z9fNnvvkFYCsQbWi5xjsw9AsZDY36nun2WGqIOWEjNfzCfRof3UPiUFd7N2JMgiPi4q l/yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3IvTfylI/s5zjCUTJoTbfVOltBPWwJQSWlH2bF2QUuk=; b=cGkJhC3KfjAwF9IATvDYdT8+AIPwo+fYnhzE9MknR+JybgC1cJxAk2in3Ds+8MUheD JO/GFs3rhy7Xx37y5IN15Z8F4GbXQ/St6q3/Y3Rq8m1/0uyxSa48YLoetJ3CKMk4KgVB r7qfd7Vo86r2W8JYE838tw/1+oS6GNHu7Q1lcFyPWtwKTTTk5hNRHxCucjq3WGJYVE6D oUt5OiIv8zojegEH4rn/R5X7ZTkP3cEdN/HhP5mSILstIhV0IXtOnQ3QGp7ucZg5/h+2 fHWH4ZjRMosThTs/QQw15L9h1m5xQCyl5T2WE7vWlblX5BDGAw1smmU1h1anP4a46G96 X/mQ== X-Gm-Message-State: AOAM5323K1dINQL4QK7FU5QwKNBdqOAiAjdLqRFNzTWfXyzeLTM114uy ktGBalxisINLd6iwOeG5ypR+Lg== X-Received: by 2002:adf:a78a:: with SMTP id j10mr8764668wrc.231.1635454142409; Thu, 28 Oct 2021 13:49:02 -0700 (PDT) Received: from Jessicas-MacBook-Pro.local (global-5-141.nat-2.net.cam.ac.uk. [131.111.5.141]) by smtp.gmail.com with ESMTPSA id m34sm2584987wms.25.2021.10.28.13.49.01 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Oct 2021 13:49:02 -0700 (PDT) Received: by Jessicas-MacBook-Pro.local (Postfix, from userid 501) id 6C870927B2D0; Thu, 28 Oct 2021 21:48:54 +0100 (BST) Date: Thu, 28 Oct 2021 21:48:54 +0100 From: Jessica Clarke To: Atish Patra Cc: linux-kernel@vger.kernel.org, Anup Patel , David Abdurachmanov , devicetree@vger.kernel.org, Greentime Hu , Guo Ren , Heinrich Schuchardt , Jonathan Corbet , linux-doc@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, Nick Kossifidis , Palmer Dabbelt , Paul Walmsley , Rob Herring , Vincent Chen Subject: Re: [v4 10/11] riscv: dts: fu740: Add pmu node Message-ID: References: <20211025195350.242914-1-atish.patra@wdc.com> <20211025195350.242914-11-atish.patra@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211025195350.242914-11-atish.patra@wdc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 25, 2021 at 12:53:49PM -0700, Atish Patra wrote: > HiFive unmatched supports HPMCounters but does not implement mcountinhibit > or sscof extension. Thus, perf monitoring can be used on the unmatched > board without sampling. > > Add the PMU node with compatible string so that Linux perf driver can > utilize this to enable PMU. > > Signed-off-by: Atish Patra > --- > arch/riscv/boot/dts/sifive/fu740-c000.dtsi | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi > index abbb960f90a0..b35b96b58820 100644 > --- a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi > +++ b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi > @@ -140,6 +140,9 @@ soc { > #size-cells = <2>; > compatible = "simple-bus"; > ranges; > + pmu { > + compatible = "riscv,pmu"; > + }; This is a property of the user-replaceable firmware, not a property of the hardware, so having this in the device tree under /soc, let alone hard-coded in Linux, is utterly wrong. Why can this not just be probed like any other SBI interface? The "Probe SBI extension" interface is precisely for this kind of thing. Jess