mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-07 13:53:24 +00:00
x86: remove double copy of show_cpuinfo_core for 32 and 64 bit
Impact: unification show_cpuinfo_core is identical for 32 and 64 bit and can be unified, and CONFIG_X86_HT inherently depends on CONFIG_X86_SMP. Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
9f361c2219
commit
327f4387e3
@ -7,11 +7,10 @@
|
|||||||
/*
|
/*
|
||||||
* Get CPU information for use by the procfs.
|
* Get CPU information for use by the procfs.
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_X86_32
|
|
||||||
static void show_cpuinfo_core(struct seq_file *m, struct cpuinfo_x86 *c,
|
static void show_cpuinfo_core(struct seq_file *m, struct cpuinfo_x86 *c,
|
||||||
unsigned int cpu)
|
unsigned int cpu)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_X86_HT
|
#ifdef CONFIG_SMP
|
||||||
if (c->x86_max_cores * smp_num_siblings > 1) {
|
if (c->x86_max_cores * smp_num_siblings > 1) {
|
||||||
seq_printf(m, "physical id\t: %d\n", c->phys_proc_id);
|
seq_printf(m, "physical id\t: %d\n", c->phys_proc_id);
|
||||||
seq_printf(m, "siblings\t: %d\n",
|
seq_printf(m, "siblings\t: %d\n",
|
||||||
@ -24,6 +23,7 @@ static void show_cpuinfo_core(struct seq_file *m, struct cpuinfo_x86 *c,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86_32
|
||||||
static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
|
static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -50,22 +50,6 @@ static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
|
|||||||
c->wp_works_ok ? "yes" : "no");
|
c->wp_works_ok ? "yes" : "no");
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static void show_cpuinfo_core(struct seq_file *m, struct cpuinfo_x86 *c,
|
|
||||||
unsigned int cpu)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_SMP
|
|
||||||
if (c->x86_max_cores * smp_num_siblings > 1) {
|
|
||||||
seq_printf(m, "physical id\t: %d\n", c->phys_proc_id);
|
|
||||||
seq_printf(m, "siblings\t: %d\n",
|
|
||||||
cpus_weight(per_cpu(cpu_core_map, cpu)));
|
|
||||||
seq_printf(m, "core id\t\t: %d\n", c->cpu_core_id);
|
|
||||||
seq_printf(m, "cpu cores\t: %d\n", c->booted_cores);
|
|
||||||
seq_printf(m, "apicid\t\t: %d\n", c->apicid);
|
|
||||||
seq_printf(m, "initial apicid\t: %d\n", c->initial_apicid);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
|
static void show_cpuinfo_misc(struct seq_file *m, struct cpuinfo_x86 *c)
|
||||||
{
|
{
|
||||||
seq_printf(m,
|
seq_printf(m,
|
||||||
|
Loading…
Reference in New Issue
Block a user