Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RISC-V: hwprobe: Add MISALIGNED_PERF key #1108

Closed
wants to merge 1 commit into from

Conversation

bjoto
Copy link

@bjoto bjoto commented Jun 5, 2024

Pull request for series with
subject: RISC-V: hwprobe: Add MISALIGNED_PERF key
version: 1
url: https://patchwork.kernel.org/project/linux-riscv/list/?series=857106

@bjoto
Copy link
Author

bjoto commented Jun 5, 2024

Upstream branch: e2c79b4
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=857106
version: 1

@bjoto
Copy link
Author

bjoto commented Jun 10, 2024

Upstream branch: 83a7eef
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=857106
version: 1

@bjoto
Copy link
Author

bjoto commented Jun 26, 2024

Upstream branch: 04a2aef
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=857106
version: 1

@bjoto
Copy link
Author

bjoto commented Jun 27, 2024

Upstream branch: cc2c169
series: https://patchwork.kernel.org/project/linux-riscv/list/?series=857106
version: 1

RISCV_HWPROBE_KEY_CPUPERF_0 was mistakenly flagged as a bitmask in
hwprobe_key_is_bitmask(), when in reality it was an enum value. This
causes problems when used in conjunction with RISCV_HWPROBE_WHICH_CPUS,
since SLOW, FAST, and EMULATED have values whose bits overlap with
each other. If the caller asked for the set of CPUs that was SLOW or
EMULATED, the returned set would also include CPUs that were FAST.

Introduce a new hwprobe key, RISCV_HWPROBE_KEY_MISALIGNED_PERF, which
returns the same values in response to a direct query (with no flags),
but is properly handled as an enumerated value. As a result, SLOW,
FAST, and EMULATED are all correctly treated as distinct values under
the new key when queried with the WHICH_CPUS flag.

Leave the old key in place to avoid disturbing applications which may
have already come to rely on the broken behavior.

Fixes: e178bf1 ("RISC-V: hwprobe: Introduce which-cpus flag")
Signed-off-by: Evan Green <evan@rivosinc.com>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
@bjoto
Copy link
Author

bjoto commented Jul 3, 2024

At least one diff in series https://patchwork.kernel.org/project/linux-riscv/list/?series=857106 irrelevant now. Closing PR.

@bjoto bjoto added superseded and removed new labels Jul 3, 2024
@bjoto bjoto closed this Jul 3, 2024
@bjoto bjoto deleted the series/857106=>fixes branch July 3, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants