| From 39e8cfa5c4ba41ee33ab09f59f6329d7f0dbf04e Mon Sep 17 00:00:00 2001 |
| From: Zhang Rui <rui.zhang@intel.com> |
| Date: Tue, 16 Aug 2022 13:16:26 +0800 |
| Subject: [PATCH] FROMLIST: perf/x86/intel/P4: Fix smp_num_siblings usage |
| |
| smp_num_siblings can be larger than 2. |
| |
| Any value larger than 1 suggests HT is supported. |
| |
| Reviewed-by: Len Brown <len.brown@intel.com> |
| Signed-off-by: Zhang Rui <rui.zhang@intel.com> |
| (am from https://patchwork.kernel.org/patch/12944430/) |
| (also found at https://lore.kernel.org/r/20220816051633.17775-2-rui.zhang@intel.com) |
| |
| BUG=b:239519025 |
| TEST=None |
| |
| Signed-off-by: Srihari Uttanur <srihari.uttanur@intel.corp-partner.google.com> |
| Change-Id: I7caebc424d8e6bf724b0ddda09facdac7cc7f8d2 |
| Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3832282 |
| Tested-by: Altaf Basha <altaf.basha@intel.com> |
| Reviewed-by: Victor Ding <victording@chromium.org> |
| Commit-Queue: Sam McNally <sammc@chromium.org> |
| Commit-Queue: Victor Ding <victording@chromium.org> |
| Reviewed-by: Sam McNally <sammc@chromium.org> |
| Reviewed-by: Sean Paul <sean@poorly.run> |
| --- |
| arch/x86/include/asm/perf_event_p4.h | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/arch/x86/include/asm/perf_event_p4.h b/arch/x86/include/asm/perf_event_p4.h |
| index d65e338b6a5fca1593733cb817423cc91b3296df..7e92aff04fb6b78623848dff11fd9de34c4c900c 100644 |
| --- a/arch/x86/include/asm/perf_event_p4.h |
| +++ b/arch/x86/include/asm/perf_event_p4.h |
| @@ -189,7 +189,7 @@ static inline int p4_ht_active(void) |
| static inline int p4_ht_thread(int cpu) |
| { |
| #ifdef CONFIG_SMP |
| - if (__max_threads_per_core == 2) |
| + if (__max_threads_per_core > 1) |
| return cpu != cpumask_first(this_cpu_cpumask_var_ptr(cpu_sibling_map)); |
| #endif |
| return 0; |
| -- |
| 2.44.0.478.gd926399ef9-goog |
| |