Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp110915rdb; Wed, 21 Feb 2024 19:49:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXswRs63XkueeifBdje6cFyd2MVcEKGPeSxGyNl14GP3UGUUL5o/yUMNdUnV2jIWhNYj9kWygcKB8WXEGeSFn5rC4jiCutAP3aY6hAG+g== X-Google-Smtp-Source: AGHT+IGNPOH6N3GTTTvyF4K+t8ygxLvEDv3MRf0Pt6DpcM9+WD4f97usJPP84xall2cMWYxbPQ0G X-Received: by 2002:a05:6808:2108:b0:3c1:5f16:6c47 with SMTP id r8-20020a056808210800b003c15f166c47mr11013785oiw.11.1708573760739; Wed, 21 Feb 2024 19:49:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708573760; cv=pass; d=google.com; s=arc-20160816; b=Rn/KqeYsKoNeJrzr2dTwD/z9YM/le78ji4U1XcwWeD6Lc1oyOD5RArSuexD0jKtwpK H9jE/J96qJi+nOvw9rUvfXjYIbEnZbjNIx6lFYVWAPw5hrDbrv+C3EIvZMNSYFk3OL+c yX3+0E6boxKpg3by8VgQYOLAEwVNLytD0Y4sOr4zln8+jtLIFSTkZT1jbGKPzf+zQMwv jEm3pzJFHZaKetpNVBzVycLQxyBSZI1ZrcCHTnOGCSKOOncuYRPOUBr86QVchCnSrERf Wpc3hqiIo/A8SCwxHg+19d7NO+xewCN6Xpo/Hp7o2VTr4ka9GzJZDxw/iXc/SvmmXYkJ OV3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=escTbVkDL2zJwpgKE5zK2XPiPSWNvmPSK69XJUrJpXA=; fh=Y8Y+VdzWULj+4N0HuaSra4jttQIM9bR1bP5eXzphjiU=; b=p1O0f5NSB5t+u2BnQI/DeNH7QS+XRHXQWoHZmBjBl2YTdWzIjv90lVCQ+C2fPLXOLy 9fZevKd2RGjYMYkmPML3rRL/n7MJe5zA6rs5gaTrqhUNejK7moOIB65wgACxj6GKCC97 maYlP4cs9VVPKR9OJpwrYFfDyo9DaDvjSsfEhyQcekCVWWP+GQKA3AP6Vx4R/2NHW7RX uCSMeefLt2gOF3kr6CkI/PJO4MS44TJAUbwj25ZgYuEXuhQKVmBuIW0oSVNJxmgZD7Bo mozIHaZdRYBOjQg4e5VF/cjVUTCygLa7Y6e6L4kCRRM2Q/BLKqVRdaVH8ylemPo7c36X U7DA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=andestech.com dmarc=pass fromdomain=andestech.com); spf=pass (google.com: domain of linux-kernel+bounces-75874-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75874-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=andestech.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m5-20020a056a00080500b006e4ca20e3c9si558298pfk.155.2024.02.21.19.49.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 19:49:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75874-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=andestech.com dmarc=pass fromdomain=andestech.com); spf=pass (google.com: domain of linux-kernel+bounces-75874-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75874-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=andestech.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 637BD284EFD for ; Thu, 22 Feb 2024 03:49:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2ADFC17755; Thu, 22 Feb 2024 03:49:13 +0000 (UTC) Received: from Atcsqr.andestech.com (60-248-80-70.hinet-ip.hinet.net [60.248.80.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E24BD101EC; Thu, 22 Feb 2024 03:49:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.248.80.70 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708573752; cv=none; b=eepB2x/HIv2oZqQ8InLRcoXLQFde8ZTCrBIOWvhBdS7r4DMq5Xs//3I9w+lELQqcTGZVP+JhNSEtCbfOxBLJwee1x/ujdJxLqNCTL5AHhOjSSuaSTTAiwjw0xbjUD3i4idPeM8oGqbZlmIQAZx+7iBfaB2A5rraY8JJ7mBJ49v4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708573752; c=relaxed/simple; bh=dwf0vhpo2jYUb2gwbg7vwjdYNHNEw2bP9BitRqQMy60=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HL72BgZ846KYTPuEnQN2MqO1sh4PdmbXbHoUhTMQhCb1qd/UrkaL74ercZc//Si5OxBiVbLyRwsiLE5Z2sax6XmaGRsp9MQ7t/XYgzxb3i/A8H1sz7RTzSmNjFCwB3wn2PYkxTIYywvcv5viaiAAuy0/RnSHDI449gm+4HeYJv0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=andestech.com; spf=pass smtp.mailfrom=andestech.com; arc=none smtp.client-ip=60.248.80.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=andestech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=andestech.com Received: from Atcsqr.andestech.com (localhost [127.0.0.2] (may be forged)) by Atcsqr.andestech.com with ESMTP id 41M3PZkX080876; Thu, 22 Feb 2024 11:25:35 +0800 (+08) (envelope-from peterlin@andestech.com) Received: from mail.andestech.com (ATCPCS16.andestech.com [10.0.1.222]) by Atcsqr.andestech.com with ESMTP id 41M3N6Y8080329; Thu, 22 Feb 2024 11:23:06 +0800 (+08) (envelope-from peterlin@andestech.com) Received: from APC323 (10.0.12.98) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.498.0; Thu, 22 Feb 2024 11:23:03 +0800 Date: Thu, 22 Feb 2024 11:23:00 +0800 From: Yu-Chien Peter Lin To: Palmer Dabbelt CC: , , , , , , , , , Conor Dooley , "Conor Dooley" , , Evan Green , , , "Heiko Stuebner" , , , , , , , , , , , , , , Mark Rutland , , , , "Paul Walmsley" , , , , , , Sunil V L , , , , , Will Deacon , , , Subject: Re: [PATCH v8 00/10] Support Andes PMU extension Message-ID: References: <20240129092553.2058043-1-peterlin@andestech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) X-DNSRBL: X-SPAM-SOURCE-CHECK: pass X-MAIL:Atcsqr.andestech.com 41M3PZkX080876 Hi Palmer, On Wed, Feb 21, 2024 at 12:58:31PM -0800, Palmer Dabbelt wrote: > On Mon, 29 Jan 2024 01:25:43 PST (-0800), peterlin@andestech.com wrote: > > Hi All, > > > > This patch series introduces the Andes PMU extension, which serves the > > same purpose as Sscofpmf and Smcntrpmf. Its non-standard local interrupt > > is assigned to bit 18 in the custom S-mode local interrupt enable and > > pending registers (slie/slip), while the interrupt cause is (256 + 18). > > > > Linux patches based on: > > - ed5b7cf ("riscv: errata: andes: Probe for IOCP only once in boot stage") > > It can be found on Andes Technology GitHub: > > - https://github.com/andestech/linux/commits/andes-pmu-support-v8 > > > > The PMU device tree node used on AX45MP: > > - https://github.com/riscv-software-src/opensbi/blob/master/docs/pmu_support.md#example-3 > > > > Locus Wei-Han Chen (1): > > riscv: andes: Support specifying symbolic firmware and hardware raw > > events > > > > Yu Chien Peter Lin (9): > > riscv: errata: Rename defines for Andes > > irqchip/riscv-intc: Allow large non-standard interrupt number > > irqchip/riscv-intc: Introduce Andes hart-level interrupt controller > > dt-bindings: riscv: Add Andes interrupt controller compatible string > > riscv: dts: renesas: r9a07g043f: Update compatible string to use Andes > > INTC > > perf: RISC-V: Eliminate redundant interrupt enable/disable operations > > perf: RISC-V: Introduce Andes PMU to support perf event sampling > > dt-bindings: riscv: Add Andes PMU extension description > > riscv: dts: renesas: Add Andes PMU extension for r9a07g043f > > > > .../devicetree/bindings/riscv/cpus.yaml | 6 +- > > .../devicetree/bindings/riscv/extensions.yaml | 7 + > > arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 4 +- > > arch/riscv/errata/andes/errata.c | 10 +- > > arch/riscv/include/asm/errata_list.h | 13 +- > > arch/riscv/include/asm/hwcap.h | 1 + > > arch/riscv/include/asm/vendorid_list.h | 2 +- > > arch/riscv/kernel/alternative.c | 2 +- > > arch/riscv/kernel/cpufeature.c | 1 + > > drivers/irqchip/irq-riscv-intc.c | 88 ++++++++++-- > > drivers/perf/Kconfig | 14 ++ > > drivers/perf/riscv_pmu_sbi.c | 37 ++++- > > include/linux/soc/andes/irq.h | 18 +++ > > .../arch/riscv/andes/ax45/firmware.json | 68 ++++++++++ > > .../arch/riscv/andes/ax45/instructions.json | 127 ++++++++++++++++++ > > .../arch/riscv/andes/ax45/memory.json | 57 ++++++++ > > .../arch/riscv/andes/ax45/microarch.json | 77 +++++++++++ > > tools/perf/pmu-events/arch/riscv/mapfile.csv | 1 + > > 18 files changed, 494 insertions(+), 39 deletions(-) > > create mode 100644 include/linux/soc/andes/irq.h > > create mode 100644 tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json > > create mode 100644 tools/perf/pmu-events/arch/riscv/andes/ax45/instructions.json > > create mode 100644 tools/perf/pmu-events/arch/riscv/andes/ax45/memory.json > > create mode 100644 tools/perf/pmu-events/arch/riscv/andes/ax45/microarch.json > > Acked-by: Palmer Dabbelt > > in case someone wants to take this via another tree. I'm also OK taking it > via the RISC-V tree, pending a resolution to Thomas' comments on patch 2. > For now I'm going to assume there's a v9 coming. Yes, I'm working on v9, please hold off taking the series, thanks. Regards, Peter Lin > Thanks!