Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4798900ooa; Tue, 14 Aug 2018 10:42:24 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyNTKvGzLbeMqO/sti12eyKZ1NaW/eMPK54Ssj9HusSIoPextwZRRnKsmGpc4IFFglbM1+H X-Received: by 2002:a63:2c8e:: with SMTP id s136-v6mr21565958pgs.390.1534268543989; Tue, 14 Aug 2018 10:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534268543; cv=none; d=google.com; s=arc-20160816; b=drR2skY/NKZ7SJQ7MB6+EqFWo1Y6fTcyyf627dXCjkvt1gCgZ8qX75+FW4+FixkxPj 6loHG9Ys/ooKNAGMVoQHxSaYArCCO+uTl3NPKCmP9ToPDFnJnNz8H9RE5Y/QdJ+2DBHC AQY9uYJ43740H24ExWKNrSnd9bNO1x9xRQ6oOo7HSs2TvkGX4TkO3//1ABEoe2KSUJMu cm8JP+azSYWr7qdvRnDoe68fRrIk+RZ8XRnau4UrAqIjefPhHjxyi51d+0UR//0WadQ2 lFVUv6nqwnlEY1XHF6u88MvPLZlejorXRqDO41JXLYCtWHGEGwdta0Dq3/ZG16gZMEw1 lCeA== 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=6JnKxJZwj7vkDwieM62Sw45sTw/9dN6zoDKxpV2rGbk=; b=c8vXyn3FTlTFe/n+C4WFAKIXJ0l8PEew4KuEibSwK906CCnosa6NTYPKDdMPtc+K14 w3TyEl8daJyYFwS7iAy6HZOFLmiR+vyXduuYasFgIjeb+cxz5rqvIJckD9A9piYudAY9 84iXDw6ZrOBBsjPVm4xcAy5/Zr1+wIpQlrAQHsngvkTKRce12i+g+e4P0n4xb6b+VODy dw46WIcREWC7ssOQ/j7KD3Aa2kaNpQ5IzDZqreutAXOqtCzsj6K6S9aU0O/VTKJEwuTN 8QEiFCS8rcflcEUceJTYNRscHNZIh0Of6LythawXUWP7wl6BwI5Jwy5D8anBRf2ynCTW 1uPQ== 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 r3-v6si16326991plb.221.2018.08.14.10.42.08; Tue, 14 Aug 2018 10:42:23 -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 S2389960AbeHNU3Y (ORCPT + 99 others); Tue, 14 Aug 2018 16:29:24 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58982 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730892AbeHNU3X (ORCPT ); Tue, 14 Aug 2018 16:29:23 -0400 Received: from localhost (unknown [194.244.16.108]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id AF0D0D83; Tue, 14 Aug 2018 17:41:12 +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 042/107] x86/cpu: Remove the pointless CPU printout Date: Tue, 14 Aug 2018 19:17:05 +0200 Message-Id: <20180814171523.414483900@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 55e6d279abd92cfd7576bba031e7589be8475edb upstream The value of this printout is dubious at best and there is no point in having it in two different places along with convoluted ways to reach it. Remove it completely. 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/common.c | 20 +++++--------------- arch/x86/kernel/cpu/topology.c | 11 ----------- 2 files changed, 5 insertions(+), 26 deletions(-) --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -611,13 +611,12 @@ void detect_ht(struct cpuinfo_x86 *c) #ifdef CONFIG_SMP u32 eax, ebx, ecx, edx; int index_msb, core_bits; - static bool printed; if (!cpu_has(c, X86_FEATURE_HT)) return; if (cpu_has(c, X86_FEATURE_CMP_LEGACY)) - goto out; + return; if (cpu_has(c, X86_FEATURE_XTOPOLOGY)) return; @@ -626,14 +625,14 @@ void detect_ht(struct cpuinfo_x86 *c) smp_num_siblings = (ebx & 0xff0000) >> 16; + if (!smp_num_siblings) + smp_num_siblings = 1; + if (smp_num_siblings == 1) { pr_info_once("CPU0: Hyper-Threading is disabled\n"); - goto out; + return; } - if (smp_num_siblings <= 1) - goto out; - index_msb = get_count_order(smp_num_siblings); c->phys_proc_id = apic->phys_pkg_id(c->initial_apicid, index_msb); @@ -645,15 +644,6 @@ void detect_ht(struct cpuinfo_x86 *c) c->cpu_core_id = apic->phys_pkg_id(c->initial_apicid, index_msb) & ((1 << core_bits) - 1); - -out: - if (!printed && (c->x86_max_cores * smp_num_siblings) > 1) { - pr_info("CPU: Physical Processor ID: %d\n", - c->phys_proc_id); - pr_info("CPU: Processor Core ID: %d\n", - c->cpu_core_id); - printed = 1; - } #endif } --- a/arch/x86/kernel/cpu/topology.c +++ b/arch/x86/kernel/cpu/topology.c @@ -32,7 +32,6 @@ void detect_extended_topology(struct cpu unsigned int eax, ebx, ecx, edx, sub_index; unsigned int ht_mask_width, core_plus_mask_width; unsigned int core_select_mask, core_level_siblings; - static bool printed; if (c->cpuid_level < 0xb) return; @@ -85,15 +84,5 @@ void detect_extended_topology(struct cpu c->apicid = apic->phys_pkg_id(c->initial_apicid, 0); c->x86_max_cores = (core_level_siblings / smp_num_siblings); - - if (!printed) { - pr_info("CPU: Physical Processor ID: %d\n", - c->phys_proc_id); - if (c->x86_max_cores > 1) - pr_info("CPU: Processor Core ID: %d\n", - c->cpu_core_id); - printed = 1; - } - return; #endif }