All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: speck@linutronix.de
Subject: [MODERATED] Re: [patch V2 06/12] x86/cpu: Remove the pointless CPU printout
Date: Mon, 11 Jun 2018 17:23:58 -0400	[thread overview]
Message-ID: <20180611212358.GF25607@char.us.oracle.com> (raw)
In-Reply-To: <20180606192807.418632210@linutronix.de>

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 <tglx@linutronix.de>
> 
> 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 <tglx@linutronix.de>

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 <konrad.wilk@oracle.com>

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;
>  }
> 

  reply	other threads:[~2018-06-11 21:24 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06 19:27 [patch V2 00/12] cpu/hotplug: SMT control Thomas Gleixner
2018-06-06 19:27 ` [patch V2 01/12] sched/smt: Update sched_smt_present at runtime Thomas Gleixner
2018-06-11 18:35   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-15 13:17     ` Thomas Gleixner
2018-06-21 11:22     ` [MODERATED] " Peter Zijlstra
2018-06-06 19:27 ` [patch V2 02/12] x86/smp: Provide topology_is_primary_thread() Thomas Gleixner
2018-06-11 19:32   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-11 20:15     ` Konrad Rzeszutek Wilk
2018-06-12 10:27       ` Andrew Cooper
2018-06-12  8:05     ` Thomas Gleixner
2018-06-12 10:31       ` [MODERATED] " Andrew Cooper
2018-06-12 20:02         ` Konrad Rzeszutek Wilk
2018-06-06 19:27 ` [patch V2 03/12] cpu/hotplug: Make bringup/teardown of smp threads symmetric Thomas Gleixner
2018-06-11 20:55   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-06 19:27 ` [patch V2 04/12] cpu/hotplug: Split do_cpu_down() Thomas Gleixner
2018-06-11 20:56   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-06 19:27 ` [patch V2 05/12] cpu/hotplug: Provide knob to control SMT Thomas Gleixner
2018-06-11 21:22   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-20 20:00   ` Dave Hansen
2018-06-20 20:11     ` Thomas Gleixner
2018-06-20 20:25   ` [MODERATED] " Dave Hansen
2018-06-20 20:52     ` Thomas Gleixner
2018-06-06 19:27 ` [patch V2 06/12] x86/cpu: Remove the pointless CPU printout Thomas Gleixner
2018-06-11 21:23   ` Konrad Rzeszutek Wilk [this message]
2018-06-06 19:27 ` [patch V2 07/12] x86/cpu/AMD: Remove the pointless detect_ht() call Thomas Gleixner
2018-06-11 21:24   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-06 19:27 ` [patch V2 08/12] x86/cpu/common: Provide detect_ht_early() Thomas Gleixner
2018-06-12 20:22   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-06 19:27 ` [patch V2 09/12] x86/cpu/topology: Provide detect_extended_topology_early() Thomas Gleixner
2018-06-12 20:33   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-06 19:27 ` [patch V2 10/12] x86/cpu/intel: Evaluate smp_num_siblings early Thomas Gleixner
2018-06-12 20:44   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-15 14:02     ` Thomas Gleixner
2018-06-06 19:27 ` [patch V2 11/12] x86/cpu/AMD: " Thomas Gleixner
2018-06-06 19:27 ` [patch V2 12/12] x86/apic: Ignore secondary threads if nosmt=force Thomas Gleixner
2018-06-06 19:59   ` [MODERATED] " Linus Torvalds
2018-06-06 21:50     ` Thomas Gleixner
2018-06-12 20:51   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-15 14:11     ` Thomas Gleixner
2018-06-06 23:16 ` [MODERATED] Re: [patch V2 00/12] cpu/hotplug: SMT control Andi Kleen
2018-06-07  6:50   ` Thomas Gleixner
2018-06-07  7:42     ` [MODERATED] " Jiri Kosina
2018-06-07 20:36       ` Andi Kleen
2018-06-07 20:42     ` Andi Kleen
2018-06-07 15:30 ` Konrad Rzeszutek Wilk
2018-06-07 15:43   ` Thomas Gleixner
2018-06-08 17:51 ` [MODERATED] " Josh Poimboeuf
2018-06-11 19:40 ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180611212358.GF25607@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=speck@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.