Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4800770ooa; Tue, 14 Aug 2018 10:44:02 -0700 (PDT) X-Google-Smtp-Source: AA+uWPy5z+gxglqWRuNq+1WfXuNnd1UGB08F1UHAc/fsdRIJLlqsvtU7DVkpJEvzchW2otOq1jAm X-Received: by 2002:a17:902:9b93:: with SMTP id y19-v6mr16984505plp.113.1534268642394; Tue, 14 Aug 2018 10:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534268642; cv=none; d=google.com; s=arc-20160816; b=bKk7GscVEKAiXEEYM8lC4dwYIQ0C2oNL4pGNJB6HKXaGuV4CHsbCMMfo+1U8JvSvPv gX9tverpeVpm7Do6UuYT04NLxkATuNlD1Z5A+WAT4m/OHyaTAe5+VQ7IqJHCJNl9sSVW JZTNtUsNHCeJtvXQNkGpDNmcwdMMOW/cmGRj0qqvu2bquFD9tGT/Kswys2wyv5lQtpph dZVOPDivqOftTa7sPMw5AmP5tIObah/QyrHrsrkPiWdiqcJc/gsV0YPEH/f3/G9pr3Ra b6SoCgM0z8pc4tBROWs3JK9T1waRKO0vIeRJeA9s7smwvRHu9I0DhV7zXqkWd8MErbMy Qu7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=sXNij2oEl1tfmKVJ1op9UYajNwOAK14hx9KSQJ64Dcc=; b=WFrKUfM4SEXJ87nTbEACb/S6zNwPzkU9JhpADzxJYM5o/mubvJE4ejpK95VxY1R/en JseibJltmK4bfGwPHPMpsK5LYV/jDrupkJ5a4tVa9DHGS3VlUw+f4vr1XrY2gXbDZa9A hEkhDpzbjgFqiXafSomcrMprOrI28gnMLD4VtbUv5Ce1MDr58IBiQ6BfQXedmrrgW+R/ u1eVg0bWQ64VRIGAylkeNVDZriTrggLHQhClQ3WFn+JveOObf4d6vvvIf11bMDsjuAj1 u0kaOG9oHA3UtkT12dUGTq8s+nz7kc9oOg2CpkayOKFdoutmwahE3+SBuaAuMIH00Z/f mT4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h66-v6si23764041pfa.238.2018.08.14.10.43.47; Tue, 14 Aug 2018 10:44:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389995AbeHNU3q (ORCPT + 99 others); Tue, 14 Aug 2018 16:29:46 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59030 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730587AbeHNU3q (ORCPT ); Tue, 14 Aug 2018 16:29:46 -0400 Received: from localhost (unknown [194.244.16.108]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CE515D4A; Tue, 14 Aug 2018 17:41:35 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Gleixner , Konrad Rzeszutek Wilk , Ingo Molnar , David Woodhouse Subject: [PATCH 4.9 046/107] x86/cpu/intel: Evaluate smp_num_siblings early Date: Tue, 14 Aug 2018 19:17:09 +0200 Message-Id: <20180814171523.950121153@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180814171520.883143803@linuxfoundation.org> References: <20180814171520.883143803@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Gleixner commit 1910ad5624968f93be48e8e265513c54d66b897c upstream Make use of the new early detection function to initialize smp_num_siblings on the boot cpu before the MP-Table or ACPI/MADT scan happens. That's required for force disabling SMT. Signed-off-by: Thomas Gleixner Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Ingo Molnar Signed-off-by: David Woodhouse Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/intel.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -283,6 +283,13 @@ static void early_init_intel(struct cpui } check_mpx_erratum(c); + + /* + * Get the number of SMT siblings early from the extended topology + * leaf, if available. Otherwise try the legacy SMT detection. + */ + if (detect_extended_topology_early(c) < 0) + detect_ht_early(c); } #ifdef CONFIG_X86_32