Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp803914rwb; Thu, 22 Sep 2022 06:39:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Q+BBTTIOBvHE8fiXZop1fBvTKQR5bF2q2gONBlhNz8IMAGZep0iBjonnivzDOjBeTtOj2 X-Received: by 2002:a17:902:7203:b0:178:3599:5e0d with SMTP id ba3-20020a170902720300b0017835995e0dmr3299705plb.73.1663853987547; Thu, 22 Sep 2022 06:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663853987; cv=none; d=google.com; s=arc-20160816; b=YFu59lzj6rmbqHKoumH9m6YB6l4dlTmzkBzpQnpGOEZ8poFiJCDUinQP/09AWitjHs deTfHmnrmCrZEjbqvuNqkRKnEZl+/cBDu5cFslbNWFJJFrJ/o7O5hIpuSoHWR2E0VVuj N0f1+LI/SZSWN6BjpAslQWLH9ZpM88pb5qxA4zEc45hnqRZsP2w3oAkCqi9eihfKFzlZ fj1ZhB5KwxvYqkCgaF20t4EGASmYjhPnshgV14dHSsOFHP3aWnd2EQx3TNxukgsHZcow oNjbJzrjwXPW1x7xQ0u8qSC05Fg7cdz3VLbvYo6cLIfORsykX7KEr2gP2aCr2cFX6Ss5 vaVw== 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=igZaJ/7Ai2ygj8vlTMkmXly7atlr8fKHJXobV0JnSbQ=; b=h6OIjOVsmbHz6pazY4i1KrQWzyU4eqg8e0gKjSb2My0nRaBJte2wIJt864Y5VMMLo7 2oL7fbx1mZoisCZjP1hpNSfFYz6ZkkP46yxXE1duTKj37TCahAjkSBGDpADW/E188cff QGF036Hx9vGTrZbtQVJMgXDyxiQdTEzZolhPblCmuOa0Vr6XgUYWq9lil5jG7hR9VVpa o1ogJV95pmDqAd30OGQcjmzPPKSk1mdZ3ArH1TZhCaCNF3NjYGjU278fQL8sLOeJSZuO lZ1NkdeRbtXx9/m2bUjVdfy60feYawwTp0ZivGJUIxbrFBA0xtG6ua4HDLx6/vXbNPYp CB2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Dig47Rh4; 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 q127-20020a632a85000000b00439c9310023si5641091pgq.740.2022.09.22.06.39.35; Thu, 22 Sep 2022 06:39:47 -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=Dig47Rh4; 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 S231555AbiIVNfG (ORCPT + 99 others); Thu, 22 Sep 2022 09:35:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231516AbiIVNfC (ORCPT ); Thu, 22 Sep 2022 09:35:02 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27E76760EF; Thu, 22 Sep 2022 06:35:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663853702; x=1695389702; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=zDRjOn0bNlzHygZ+Y/AQDCZ7jTp+MJset84jKlggh44=; b=Dig47Rh4igi2ufHozJ8YRt3f2k0xH4mskSCW/Bz4aL4udRGT5mL5h+oY 5prF5pTDzMZvLQyBKFzcNsEt2Ey3LpoAwqrMwHRWeA277e7ZKQzAv5YN9 K+Yh+nnuGk0MsRESF86NtYv36/mr7eHuYcqKlrZ8SCZwkin4P3fiiy7uM 0RJXKLA3M4LkOsMonSj2UT7myNJpMIw8cMqLwGDzKtVf6WpHqovVZnpc+ M1N4BbOemzDbhRpuKK1VxuwZ7RGmsMJjSnu3n1rozvFFKtRUvIOCMU9En TrpLfEMSjY1AQ7YOT+DdiMlhYBDgHRZMb3BgdplOzOrPL27uvoaSvduow A==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="297894097" X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="297894097" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 06:35:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="619793823" Received: from power-sh.sh.intel.com ([10.239.183.122]) by orsmga002.jf.intel.com with ESMTP; 22 Sep 2022 06:34:57 -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, peterz@infradead.org, corbet@lwn.net, fenghua.yu@intel.com, jdelvare@suse.com, linux@roeck-us.net, len.brown@intel.com, rui.zhang@intel.com Subject: [PATCH V3 1/8] perf/x86/intel/P4: Unify logic for detecting HT Date: Thu, 22 Sep 2022 21:37:53 +0800 Message-Id: <20220922133800.12918-2-rui.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220922133800.12918-1-rui.zhang@intel.com> References: <20220922133800.12918-1-rui.zhang@intel.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE 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 Any value larger than 1 suggests HT is supported. Although smp_num_siblings cannot be larger than 2 on P4 platform, it is better to keep the logic consistent across the kernel. 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