[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH 3/9] x86/smp: drop x86_cpu_to_apicid, use cpu_data[cpu].apicid instead
On 8.02.2024 08:29, Jan Beulich wrote: On 14.11.2023 18:50, Krystian Hebel wrote:Both fields held the same data.Supposedly the same data only. They come from different origins, and you're hiding this quite well by leaving all sites in place where the field is written. Both items are also used for entirely separate purposes. So you need to - explain why both sources of information necessarily provide the same data, - especially if there's remaining concern from the above explanation that the two values might end up different in corner cases (running virtualized ourselves comes to mind as a possible example), explain why nevertheless it is fine (risk free) to use the consolidated item for all of the originally separate purposes, - either explain or do away with the multiple places setting this single remaining field. I missed those writes, thanks for pointing this out. I'll have to take a closer look before deciding what to do with this. --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -61,10 +61,8 @@ unsigned int __read_mostly nr_sockets; cpumask_t **__read_mostly socket_cpumask; static cpumask_t *secondary_socket_cpumask;-struct cpuinfo_x86 cpu_data[NR_CPUS];- -u32 x86_cpu_to_apicid[NR_CPUS] __read_mostly = - { [0 ... NR_CPUS-1] = BAD_APICID }; +struct cpuinfo_x86 cpu_data[NR_CPUS] = + { [0 ... NR_CPUS-1] .apicid = BAD_APICID };Nit: Stray blank after closing square bracket. Jan -- Krystian Hebel Firmware Engineer https://3mdeb.com | @3mdeb_com
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |