diff mbox series

[v2,3/3] RISC-V: hwprobe: not treat KEY_CPUPERF_0 as bitmask

Message ID tencent_01F8E0050FB4B11CC170C3639E43F41A1709@qq.com (mailing list archive)
State New
Headers show
Series docs: riscv: Some clarifies on hwprobe misaligned performance | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR fail PR summary
conchuod/patch-3-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh
conchuod/patch-3-test-2 fail .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh
conchuod/patch-3-test-3 fail .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh
conchuod/patch-3-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh
conchuod/patch-3-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh
conchuod/patch-3-test-6 success .github/scripts/patches/tests/checkpatch.sh
conchuod/patch-3-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh
conchuod/patch-3-test-8 success .github/scripts/patches/tests/header_inline.sh
conchuod/patch-3-test-9 success .github/scripts/patches/tests/kdoc.sh
conchuod/patch-3-test-10 success .github/scripts/patches/tests/module_param.sh
conchuod/patch-3-test-11 success .github/scripts/patches/tests/verify_fixes.sh
conchuod/patch-3-test-12 success .github/scripts/patches/tests/verify_signedoff.sh

Commit Message

Yangyu Chen May 24, 2024, 3:35 a.m. UTC
Since the value in KEY_CPUPERF_0 is not bitmask, remove the wrong code
in hwprobe.h.

Signed-off-by: Yangyu Chen <cyy@cyyself.name>
---
 arch/riscv/include/asm/hwprobe.h | 1 -
 1 file changed, 1 deletion(-)

Comments

Evan Green May 29, 2024, 6:33 p.m. UTC | #1
On Thu, May 23, 2024 at 8:36 PM Yangyu Chen <cyy@cyyself.name> wrote:
>
> Since the value in KEY_CPUPERF_0 is not bitmask, remove the wrong code
> in hwprobe.h.
>
> Signed-off-by: Yangyu Chen <cyy@cyyself.name>

I'd expect a Fixes tag, and ideally some discussion on the reasoning
and ramifications of this change.

I posted the other possible fix, declaring a new key, at [1], mostly
so we could see the two options and discuss. I'm okay with either
patch.
-Evan

[1] https://lore.kernel.org/lkml/20240529182649.2635123-1-evan@rivosinc.com/T/#u

> ---
>  arch/riscv/include/asm/hwprobe.h | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/riscv/include/asm/hwprobe.h b/arch/riscv/include/asm/hwprobe.h
> index 630507dff5ea..f24cad22bbe1 100644
> --- a/arch/riscv/include/asm/hwprobe.h
> +++ b/arch/riscv/include/asm/hwprobe.h
> @@ -20,7 +20,6 @@ static inline bool hwprobe_key_is_bitmask(__s64 key)
>         switch (key) {
>         case RISCV_HWPROBE_KEY_BASE_BEHAVIOR:
>         case RISCV_HWPROBE_KEY_IMA_EXT_0:
> -       case RISCV_HWPROBE_KEY_CPUPERF_0:
>                 return true;
>         }
>
> --
> 2.45.1
>
diff mbox series

Patch

diff --git a/arch/riscv/include/asm/hwprobe.h b/arch/riscv/include/asm/hwprobe.h
index 630507dff5ea..f24cad22bbe1 100644
--- a/arch/riscv/include/asm/hwprobe.h
+++ b/arch/riscv/include/asm/hwprobe.h
@@ -20,7 +20,6 @@  static inline bool hwprobe_key_is_bitmask(__s64 key)
 	switch (key) {
 	case RISCV_HWPROBE_KEY_BASE_BEHAVIOR:
 	case RISCV_HWPROBE_KEY_IMA_EXT_0:
-	case RISCV_HWPROBE_KEY_CPUPERF_0:
 		return true;
 	}