Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3350360rwb; Tue, 16 Aug 2022 00:59:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR5D5t5CnzInR77KEV+GrVCmPXK1MlvU/a8schr+9HpIweVnzHWC+U0e75hupsLPc9L+Rapw X-Received: by 2002:a17:90a:1c02:b0:1e0:df7:31f2 with SMTP id s2-20020a17090a1c0200b001e00df731f2mr31195927pjs.222.1660636746138; Tue, 16 Aug 2022 00:59:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660636746; cv=none; d=google.com; s=arc-20160816; b=snKKMTKlzeTHVkrdNNTDdPAOBIzs8FCmzKXhsciTvIjV23aLvcdTVsxRGVMzNH5fg3 N6msNOhPE1U4MW+Q7i9YXYncVzu8U0hefUEtaAUiitoFuhTzZup+0uAggIVjJ8S6bmIt D7YD1y3MVtclYM9Vg2L3WfrRzI9Cj6gEMyOzz7YnOd3ivanQPIKTniwOT1LcWFro6UTR kJMN8hbHijb7EFrm0qc8YGu97Gm38Fg3V41uuLaviSfGGkGJ4A3nmUmrY7mvgOouhDyS vpcKL5vNIVKYgNdPn4HUS93chBdtAoh7YHVX5cyJpJ8vb//YFKXeTRz+BnLjOQBTm2rz Io5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=Nz1bBTSaoP5QfXCjp+DLxWoSz1iEVF9dWEJkvAE3zFs=; b=Pp2aaqLvlZM2FTxTG+s/1jOCuEoKgYgY+abWKws1cKAX8FxAqO9SzkLdkKLLFG+ar1 JRtauF1OTXrkqaFr1BvrVDFMDaEcy2BKeFb/4CvCzthj+aft3PELjGCNvTta9FSEBgJ1 +mtI7GdKl+Ud5vBXqk+UtXbPtevOl1XKPPzKIOhCN+6qvE5snTpwImBi/Yp+4AO7ealI YQEc5XU6gkGE+aRq7UHX/4HY76h6IxBsD2douxfmtxCDx6Kmch45mW0gY1Ytdr6grsnP SrR0BL/QftydvwcQgoPtG93iNkRcatRVUP2G+/QmAyYEeyU9YcxkTO0eyvPPvKtXVY1n A4vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bAmqzXqc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 6-20020a170902c20600b0016f1c879eacsi11861886pll.109.2022.08.16.00.58.55; Tue, 16 Aug 2022 00:59:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bAmqzXqc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229966AbiHPH5a (ORCPT + 99 others); Tue, 16 Aug 2022 03:57:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231319AbiHPH4m (ORCPT ); Tue, 16 Aug 2022 03:56:42 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B670E5280E; Mon, 15 Aug 2022 22:12:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660626771; x=1692162771; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=FboYUogSe9ihPrbF4l07tSAlrq3YvoBAcJ7puMFHbZ4=; b=bAmqzXqcik+rK5YlAyd0LsdTfjCmBZBrkisKsYhvR7xMSztAkkzU77w3 ryE0LP1RnFhphyzdi6GjP/BcSsMiDn9mAAnOeMgYZEiP/8ydg9DSAJ5P9 8lQ0ERfOxeB70R0eP50e6rcHJvjKz4Nm7BIbWb4mWDo4kvnyZOWppzx4P FIJsiA7m+YYca+oJUlLuVsR8/y9LhsaLvCOCRuXS93jkr1BIWf8UXHpfI WalHZ8ecdZZmJF7eQ8m3JzJKf1hP3AK/dyDt6A0TP7tw0Q+cmAaP0eOzm 0NYy3smc5DEjqUSQSk9xkB/NnM5usuXX+Z8uih13Wq2t1cM+MMpFEzmXK g==; X-IronPort-AV: E=McAfee;i="6400,9594,10440"; a="356130129" X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="356130129" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Aug 2022 22:12:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="666953450" Received: from power-sh.sh.intel.com ([10.239.183.122]) by fmsmga008.fm.intel.com with ESMTP; 15 Aug 2022 22:12:48 -0700 From: Zhang Rui To: linux-kernel@vger.kernel.org, x86@kernel.org, linux-hwmon@vger.kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, corbet@lwn.net, fenghua.yu@intel.com, jdelvare@suse.com, linux@roeck-us.net, len.brown@intel.com, rui.zhang@intel.com Subject: [PATCH V2 1/8] perf/x86/intel/P4: Fix smp_num_siblings usage Date: Tue, 16 Aug 2022 13:16:26 +0800 Message-Id: <20220816051633.17775-2-rui.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220816051633.17775-1-rui.zhang@intel.com> References: <20220816051633.17775-1-rui.zhang@intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org smp_num_siblings can be larger than 2. Any value larger than 1 suggests HT is supported. Reviewed-by: Len Brown Signed-off-by: Zhang Rui --- 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 94de1a05aeba..b14e9a20a7c0 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 (smp_num_siblings == 2) + if (smp_num_siblings > 1) return cpu != cpumask_first(this_cpu_cpumask_var_ptr(cpu_sibling_map)); #endif return 0; -- 2.25.1