From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 11 Jun 2018 21:24:08 -0000 Received: from aserp2130.oracle.com ([141.146.126.79]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fSUIJ-0003fT-27 for speck@linutronix.de; Mon, 11 Jun 2018 23:24:07 +0200 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5BLKof1151667 for ; Mon, 11 Jun 2018 21:24:00 GMT Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2jg4dkyfqc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 11 Jun 2018 21:24:00 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w5BLNx3s007409 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 11 Jun 2018 21:24:00 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5BLNx5B006744 for ; Mon, 11 Jun 2018 21:23:59 GMT Date: Mon, 11 Jun 2018 17:23:58 -0400 From: Konrad Rzeszutek Wilk Subject: [MODERATED] Re: [patch V2 06/12] x86/cpu: Remove the pointless CPU printout Message-ID: <20180611212358.GF25607@char.us.oracle.com> References: <20180606192714.754943543@linutronix.de> <20180606192807.418632210@linutronix.de> MIME-Version: 1.0 In-Reply-To: <20180606192807.418632210@linutronix.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Wed, Jun 06, 2018 at 09:27:20PM +0200, speck for Thomas Gleixner wrote: > Subject: [patch V2 06/12] x86/cpu: Remove the pointless CPU printout > From: Thomas Gleixner > > 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 Heh, when I was looking at patch #1 I stumbled on this and thought "oh man this looks like it could use some flossing, will cobble up a patch after reviewing this full patchset" and sure enough you did for me :-) Reviewed-by: Konrad Rzeszutek Wilk Thank you! > --- > arch/x86/kernel/cpu/common.c | 19 +++++-------------- > arch/x86/kernel/cpu/topology.c | 10 ---------- > 2 files changed, 5 insertions(+), 24 deletions(-) > > --- a/arch/x86/kernel/cpu/common.c > +++ b/arch/x86/kernel/cpu/common.c > @@ -669,7 +669,7 @@ void detect_ht(struct cpuinfo_x86 *c) > return; > > if (cpu_has(c, X86_FEATURE_CMP_LEGACY)) > - goto out; > + return; > > if (cpu_has(c, X86_FEATURE_XTOPOLOGY)) > return; > @@ -678,14 +678,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); > > @@ -697,15 +697,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 > @@ -33,7 +33,6 @@ int detect_extended_topology(struct cpui > 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 -1; > @@ -86,15 +85,6 @@ int detect_extended_topology(struct cpui > 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; > - } > #endif > return 0; > } >