Message ID | 20231205024310.1593100-4-atishp@rivosinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3177363vqy; Mon, 4 Dec 2023 18:44:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvj08dRE0bFB+Ffpz/V2HVhc7tA9vx7iRkCzXHuLkffbknNcRW8te+cqOvoOOPGtQI7VzX X-Received: by 2002:a05:6a00:938b:b0:6cd:dfae:1b44 with SMTP id ka11-20020a056a00938b00b006cddfae1b44mr716765pfb.34.1701744256619; Mon, 04 Dec 2023 18:44:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701744256; cv=none; d=google.com; s=arc-20160816; b=Ht1DYxtMedr/SlaDNrffevMcy2VaQFfgtPrjkZTLj93/U3ExXLhr17jxr1YbbA63Uh ykOmE38WnhnQ5wKZKoVzoGbPAOJQbV90atSpBrxa8siZmF7UVSIZWPpJ9gWEm74fZCBF dj57Qnd/nWJXeHkhgNW9QQZObdy/GKBmQUF7XM3ZmCvSd3HrXfj70aOdqF/HI3FwVh0b B5JWyKU8ooaL25rsq7YCPTXNM2B6GxeebmL+LtsQWBBzh4wzG9IOE7LeADA2by4s1M7M 2XykY2pWqGjmf0JLZ1UP1xJSsJ3/8qoDxqKAnKw1XZm9vnWvz9RmrhiSLa8TXxObzFzP 5c0A== 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 :dkim-signature; bh=0t/9Xz5DiK/wXH2NqGUZGNOtmRM2KXduxsMbe0LSN5g=; fh=hdWWmqr42gXb2LKR5pVlTakVhLV/lVdx71bRf5NvIOA=; b=ZXIvjzs2PT/RVgivpWaGwKNLJTU3TA/WDmwUQsPNJIRfJ4ACZ0PDB7z+1Ru7gRfE2F M+nc6lvuU/nCvXGxF6cYaUyw2vNIKlOrR6nXMSE8eM3IdKmm6Ji8THPX2oBHMgcK7abD LmEoOYY5pQ/s/s3cYze7IiqwfKLpVDOtsmDZNkfkeMMn8uOdZbkZ6wSSsuw6wwNX5fwB j17cCpF6GQsRmDpHhBqCOuw8IT+Bt8GOyOjRZHZCfeGa5yXx3ran0ZQFBUK2702uAV1P vA2zIzomQqABSrbDye2lyz4y4CnDox0BkEA04m1mkEcOOMdJvuUjZoNfePdO+DKnAFA1 aDAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=rhY+hiRg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id cm3-20020a056a020a0300b0057755b2f032si2519766pgb.542.2023.12.04.18.44.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 18:44:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=rhY+hiRg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B75008058A0F; Mon, 4 Dec 2023 18:44:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346691AbjLECne (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Mon, 4 Dec 2023 21:43:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346662AbjLECna (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 4 Dec 2023 21:43:30 -0500 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 942E0A4 for <linux-kernel@vger.kernel.org>; Mon, 4 Dec 2023 18:43:36 -0800 (PST) Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-6d855efb920so2943868a34.1 for <linux-kernel@vger.kernel.org>; Mon, 04 Dec 2023 18:43:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1701744215; x=1702349015; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0t/9Xz5DiK/wXH2NqGUZGNOtmRM2KXduxsMbe0LSN5g=; b=rhY+hiRgeh/1Mf/In9gQYD8QCUPWj5f5fJw3PNkcHgOKcvUSSRsski2xZ28ICISpcx tSBr1mmxDtP2iTQ92wjrdaEQw7EYLSroqUbJfeIbPC8U4WX/7rfj7LgBZHuJ2EmAXTfe Ioa2oMUtrGS9yF9R8HurzNp7K1GL0LkHEtvscFgS+EZ8GM4f00uN3BEPQL0eJObse9Ch GxYlBmWIhUDPSDDhN9M/fgixu5pemWX4hSJ9HNTQ9A6yqO1pZaRhcTWLfHcCX1vkbulc OhM8JkU9H5BDp49zqmaTxbFYy/9Q48uwsu+/Fleh7D33rsyC+fBHdiQH7xwBKwS0YM4f SvEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701744215; x=1702349015; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0t/9Xz5DiK/wXH2NqGUZGNOtmRM2KXduxsMbe0LSN5g=; b=uh3kNHO8qQL+EiDKGnaR8P03F/jNjwFAch/im7gSelHqdiZfruWtDRQqk0vGi9Oqpw iANoAtAN/yO9ocbL9oeaPCQplHK1Ze28qR/063O12kcXO/h3d5C0jdCJEMOqJKm84blh S9kgdB+HkPQcujyXindnG3v7o2uj9kfBT+x18cEIYCYpSslfH3DDjoGyrBqF8jahls4X LAPCvOgkiFEAY7x7wkAiG3UBygugsP7a5BE6qZ1a4dmvHIF8r6PvKJmTrjDYMcC09D0D ed4kd9LDxWKbtnrCTzQJuHYr54yudza+6BEjoxV85lxgCg+ATf/6SQjteqL3YP/to6lK Re9w== X-Gm-Message-State: AOJu0YyZKqZVkTd8w754/FicWKdJf4j50eYGEzztzPItZKzY+l3kHKqO nR1GppOsw7W79l4nR/kOqxhkmCOpqEbXZ0/YPAx/qg== X-Received: by 2002:a05:6830:100f:b0:6d8:a456:d99d with SMTP id a15-20020a056830100f00b006d8a456d99dmr3450114otp.5.1701744215637; Mon, 04 Dec 2023 18:43:35 -0800 (PST) Received: from atishp.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id z17-20020a9d62d1000000b006b9848f8aa7sm2157655otk.45.2023.12.04.18.43.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 18:43:35 -0800 (PST) From: Atish Patra <atishp@rivosinc.com> To: linux-kernel@vger.kernel.org Cc: Atish Patra <atishp@rivosinc.com>, Alexandre Ghiti <alexghiti@rivosinc.com>, Andrew Jones <ajones@ventanamicro.com>, Anup Patel <anup@brainfault.org>, Atish Patra <atishp@atishpatra.org>, Conor Dooley <conor.dooley@microchip.com>, Guo Ren <guoren@kernel.org>, Icenowy Zheng <uwu@icenowy.me>, kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-riscv@lists.infradead.org, Mark Rutland <mark.rutland@arm.com>, Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul.walmsley@sifive.com>, Will Deacon <will@kernel.org> Subject: [RFC 3/9] RISC-V: Add FIRMWARE_READ_HI definition Date: Mon, 4 Dec 2023 18:43:04 -0800 Message-Id: <20231205024310.1593100-4-atishp@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231205024310.1593100-1-atishp@rivosinc.com> References: <20231205024310.1593100-1-atishp@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 04 Dec 2023 18:44:09 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784408185560351884 X-GMAIL-MSGID: 1784408185560351884 |
Series |
RISC-V SBI v2.0 PMU improvements and Perf sampling in KVM guest
|
|
Commit Message
Atish Patra
Dec. 5, 2023, 2:43 a.m. UTC
SBI v2.0 added another function to SBI PMU extension to read
the upper bits of a counter with width larger than XLEN.
Add the definition for that function.
Signed-off-by: Atish Patra <atishp@rivosinc.com>
---
arch/riscv/include/asm/sbi.h | 1 +
1 file changed, 1 insertion(+)
Comments
On Mon, Dec 04, 2023 at 06:43:04PM -0800, Atish Patra wrote: > SBI v2.0 added another function to SBI PMU extension to read > the upper bits of a counter with width larger than XLEN. This definition here is quite a lot less specific than that in 11/1 of the spec. I don't think that really matters much in reality since we only support exactly one XLEN where that is the case. Acked-by: Conor Dooley <conor.dooley@microchip.com> Cheers, Conor. > Add the definition for that function. > > Signed-off-by: Atish Patra <atishp@rivosinc.com> > --- > arch/riscv/include/asm/sbi.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h > index 0892f4421bc4..f3eeca79a02d 100644 > --- a/arch/riscv/include/asm/sbi.h > +++ b/arch/riscv/include/asm/sbi.h > @@ -121,6 +121,7 @@ enum sbi_ext_pmu_fid { > SBI_EXT_PMU_COUNTER_START, > SBI_EXT_PMU_COUNTER_STOP, > SBI_EXT_PMU_COUNTER_FW_READ, > + SBI_EXT_PMU_COUNTER_FW_READ_HI, > }; > > union sbi_pmu_ctr_info { > -- > 2.34.1 >
On Tue, Dec 5, 2023 at 8:13 AM Atish Patra <atishp@rivosinc.com> wrote: > > SBI v2.0 added another function to SBI PMU extension to read > the upper bits of a counter with width larger than XLEN. > > Add the definition for that function. > > Signed-off-by: Atish Patra <atishp@rivosinc.com> LGTM. Reviewed-by: Anup Patel <anup@brainfault.org> Regards, Anup > --- > arch/riscv/include/asm/sbi.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h > index 0892f4421bc4..f3eeca79a02d 100644 > --- a/arch/riscv/include/asm/sbi.h > +++ b/arch/riscv/include/asm/sbi.h > @@ -121,6 +121,7 @@ enum sbi_ext_pmu_fid { > SBI_EXT_PMU_COUNTER_START, > SBI_EXT_PMU_COUNTER_STOP, > SBI_EXT_PMU_COUNTER_FW_READ, > + SBI_EXT_PMU_COUNTER_FW_READ_HI, > }; > > union sbi_pmu_ctr_info { > -- > 2.34.1 >
diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h index 0892f4421bc4..f3eeca79a02d 100644 --- a/arch/riscv/include/asm/sbi.h +++ b/arch/riscv/include/asm/sbi.h @@ -121,6 +121,7 @@ enum sbi_ext_pmu_fid { SBI_EXT_PMU_COUNTER_START, SBI_EXT_PMU_COUNTER_STOP, SBI_EXT_PMU_COUNTER_FW_READ, + SBI_EXT_PMU_COUNTER_FW_READ_HI, }; union sbi_pmu_ctr_info {