lkml.org 
[lkml]   [2017]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 2/3] x86/topology: Avoid wasting 128k for package id array
On Tue, 14 Nov 2017, Prarit Bhargava wrote:
> @@ -389,6 +369,7 @@ void __init smp_store_boot_cpu_info(void)
> *c = boot_cpu_data;
> c->cpu_index = id;
> smp_init_package_map(c, id);
> + cpu_data(id).set = 1;

What's wrong with

c->set ?

Aside of that 'set' is not really descriptive. initialized might be better
suited.

> }
>
> /*
> @@ -399,13 +380,15 @@ void smp_store_cpu_info(int id)
> {
> struct cpuinfo_x86 *c = &cpu_data(id);
>
> - *c = boot_cpu_data;
> + if (cpu_data(id).set == 0)
> + *c = boot_cpu_data;
> c->cpu_index = id;
> /*
> * During boot time, CPU0 has this setup already. Save the info when
> * bringing up AP or offlined CPU0.
> */
> identify_secondary_cpu(c);
> + cpu_data(id).set = 1;

See above.

No need to resend. I'll fix it up.

Thanks,

tglx

\
 
 \ /
  Last update: 2017-11-17 17:21    [W:0.087 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site