On 17.11.2023 13:24, Oleksii Kurochko wrote: > --- a/xen/arch/ppc/include/asm/current.h > +++ b/xen/arch/ppc/include/asm/current.h > @@ -4,6 +4,8 @@ > > #include <xen/percpu.h> > > +#include <asm/processor.h> > + > #ifndef __ASSEMBLY__ > > struct vcpu; > @@ -38,6 +40,10 @@ static inline struct cpu_info *get_cpu_info(void) > > #define guest_cpu_user_regs() (&get_cpu_info()->guest_cpu_user_regs) > > +#define smp_processor_id() 0 /* TODO: Fix this */ > + > +#define get_per_cpu_offset() smp_processor_id()
This 2nd item can't be quite right either, so likely also wants a FIXME comment. Shawn will have the ultimate say here anyway. > --- a/xen/include/xen/percpu.h > +++ b/xen/include/xen/percpu.h > @@ -1,8 +1,6 @@ > #ifndef __XEN_PERCPU_H__ > #define __XEN_PERCPU_H__ > > -#include <asm/percpu.h> > - > #define DECLARE_PER_CPU(type, name) \ > extern __typeof__(type) per_cpu__ ## name > > @@ -29,6 +27,8 @@ > > #define get_per_cpu_var(var) (per_cpu__##var) > > +#include <asm/percpu.h> > + > /* Linux compatibility. */ > #define get_cpu_var(var) this_cpu(var) > #define put_cpu_var(var) While you explain the reason for this movement, it still feels a little fragile to me. Jan