[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1 18/29] xen/asm-generic: introduce stub header smp.h
On Thu, 2023-10-19 at 12:58 +0200, Jan Beulich wrote: > On 14.09.2023 16:56, Oleksii Kurochko wrote: > > The patch introduces header stub necessry for full Xen build. > > > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> > > Assuming you expect RISC-V to get away without its own smp.h, just > one remark: Not really, I've introduced only things necessary for Xen's full build. It looks like we have a situation as with device.h header ( in this patch series) . Probably smp.h header should be only in an arch- specific folder. I'll apply to smp.h the same solution as for device.h when we get to the same page on it. Except what I introduced in this patch other functions and macros will be in smp.h. Such as: raw_smp_processor_id smp_processor_id extern void smp_clear_cpu_maps (void); extern void smp_init_cpus(void); extern unsigned int smp_get_max_cpus(void); void smp_setup_processor_id(unsigned long boot_cpu_id); /* * Mapping between linux logical cpu index and hartid. */ extern unsigned long __cpuid_to_hartid_map[NR_CPUS]; #define cpuid_to_hartid_map(cpu) __cpuid_to_hartid_map[cpu] #define cpu_physical_id(cpu) cpuid_to_hartid_map(cpu) Mostly all of the header can be generic but again all the mentioned above functions are used only for RISC-V and ARM. ( probably I missed something ). > > > --- /dev/null > > +++ b/xen/include/asm-generic/smp.h > > @@ -0,0 +1,30 @@ > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > +#ifndef __ASM_GENERIC_SMP_H > > +#define __ASM_GENERIC_SMP_H > > + > > +#ifndef __ASSEMBLY__ > > +#include <xen/cpumask.h> > > +#include <xen/percpu.h> > > +#endif > > This #endif need moving ... > > > +DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_mask); > > +DECLARE_PER_CPU(cpumask_var_t, cpu_core_mask); > > ... at least down here, if #includ-ing by assembly files is really > necessary to permit. Preferably the #ifndef would be dropped, though. > > Jan ~ Oleksii
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |