Re: [PATCH v6 2/3] x86/topology: Avoid wasting 128k for package id array
From: Thomas Gleixner
Date: Fri Nov 17 2017 - 10:00:09 EST
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