From: Evan Green <evan@rivosinc.com>
To: Palmer Dabbelt <palmer@dabbelt.com>
Cc: "Yangyu Chen" <cyy@cyyself.name>,
"Evan Green" <evan@rivosinc.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Alexandre Ghiti" <alexghiti@rivosinc.com>,
"Andrew Jones" <ajones@ventanamicro.com>,
"Andy Chiu" <andy.chiu@sifive.com>,
"Ben Dooks" <ben.dooks@codethink.co.uk>,
"Björn Töpel" <bjorn@rivosinc.com>,
"Charlie Jenkins" <charlie@rivosinc.com>,
"Clément Léger" <cleger@rivosinc.com>,
"Conor Dooley" <conor.dooley@microchip.com>,
"Costa Shulyupin" <costa.shul@redhat.com>,
"Erick Archer" <erick.archer@gmx.com>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: [PATCH v2 0/2] RISC-V: hwprobe: Misaligned scalar perf fix and rename
Date: Tue, 25 Jun 2024 09:51:19 -0700 [thread overview]
Message-ID: <20240625165121.2160354-1-evan@rivosinc.com> (raw)
The CPUPERF0 hwprobe key was documented and identified in code as
a bitmask value, but its contents were an enum. This produced
incorrect behavior in conjunction with the WHICH_CPUS hwprobe flag.
The first patch in this series fixes the bitmask/enum problem by
creating a new hwprobe key that returns the same data, but is
properly described as a value instead of a bitmask. The second patch
renames the value definitions in preparation for adding vector misaligned
access info. The second patch has the side effect of causing users
using the old key values to fail to compile, which may allow them
to see and update to the new key without breaking binary compatibility
with old programs.
Changes in v2:
- Clarified the distinction of slow and fast refers to misaligned word
accesses. Previously it just said misaligned accesses, leaving it
ambiguous as to which type of access was measured.
- Removed shifts in values (Andrew)
- Renamed key to RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF (Palmer)
- Added patch to rename misaligned perf key values (Palmer)
Evan Green (2):
RISC-V: hwprobe: Add MISALIGNED_PERF key
RISC-V: hwprobe: Add SCALAR to misaligned perf defines
Documentation/arch/riscv/hwprobe.rst | 29 +++++++++++++---------
arch/riscv/include/asm/hwprobe.h | 2 +-
arch/riscv/include/uapi/asm/hwprobe.h | 13 +++++-----
arch/riscv/kernel/sys_hwprobe.c | 11 ++++----
arch/riscv/kernel/traps_misaligned.c | 6 ++---
arch/riscv/kernel/unaligned_access_speed.c | 12 ++++-----
6 files changed, 40 insertions(+), 33 deletions(-)
--
2.34.1
next reply other threads:[~2024-06-25 16:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 16:51 Evan Green [this message]
2024-06-25 16:51 ` [PATCH v2 1/2] RISC-V: hwprobe: Add MISALIGNED_PERF key Evan Green
2024-06-26 14:36 ` Conor Dooley
2024-06-26 15:55 ` Evan Green
2024-06-25 16:51 ` [PATCH v2 2/2] RISC-V: hwprobe: Add SCALAR to misaligned perf defines Evan Green
2024-06-25 18:33 ` Charlie Jenkins
2024-06-25 18:35 ` Conor Dooley
2024-06-25 19:08 ` Evan Green
2024-06-26 14:34 ` Conor Dooley
2024-06-26 15:44 ` Evan Green
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240625165121.2160354-1-evan@rivosinc.com \
--to=evan@rivosinc.com \
--cc=ajones@ventanamicro.com \
--cc=alexghiti@rivosinc.com \
--cc=andy.chiu@sifive.com \
--cc=aou@eecs.berkeley.edu \
--cc=ben.dooks@codethink.co.uk \
--cc=bjorn@rivosinc.com \
--cc=charlie@rivosinc.com \
--cc=cleger@rivosinc.com \
--cc=conor.dooley@microchip.com \
--cc=corbet@lwn.net \
--cc=costa.shul@redhat.com \
--cc=cyy@cyyself.name \
--cc=erick.archer@gmx.com \
--cc=gustavoars@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).