[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] arm/percpu: Move {get, set}_processor_id() into current.h
commit 8a3d7a321554b7a10b97c1fd3cc70aea2151ddc1 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Fri Jul 26 20:41:03 2019 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Wed Aug 7 14:06:28 2019 +0100 arm/percpu: Move {get,set}_processor_id() into current.h For cleanup purposes, it is necessary for asm/percpu.h to not use DECLARE_PER_CPU() itself. asm/current.h is arguably a better place for this functionality to live anyway. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Julien Grall <julien.grall@xxxxxxx> --- xen/include/asm-arm/current.h | 9 +++++++++ xen/include/asm-arm/percpu.h | 6 ------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/xen/include/asm-arm/current.h b/xen/include/asm-arm/current.h index c4af66fbb9..1653e89d30 100644 --- a/xen/include/asm-arm/current.h +++ b/xen/include/asm-arm/current.h @@ -39,6 +39,15 @@ static inline struct cpu_info *get_cpu_info(void) #define reset_stack_and_jump(fn) switch_stack_and_jump(get_cpu_info(), fn) +DECLARE_PER_CPU(unsigned int, cpu_id); + +#define get_processor_id() this_cpu(cpu_id) +#define set_processor_id(id) \ +do { \ + WRITE_SYSREG(__per_cpu_offset[(id)], TPIDR_EL2); \ + this_cpu(cpu_id) = (id); \ +} while ( 0 ) + #endif #endif /* __ARM_CURRENT_H__ */ diff --git a/xen/include/asm-arm/percpu.h b/xen/include/asm-arm/percpu.h index 9584b830d4..011016347b 100644 --- a/xen/include/asm-arm/percpu.h +++ b/xen/include/asm-arm/percpu.h @@ -27,12 +27,6 @@ void percpu_init_areas(void); #define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name -DECLARE_PER_CPU(unsigned int, cpu_id); -#define get_processor_id() (this_cpu(cpu_id)) -#define set_processor_id(id) do { \ - WRITE_SYSREG(__per_cpu_offset[id], TPIDR_EL2); \ - this_cpu(cpu_id) = (id); \ -} while(0) #endif #endif /* __ARM_PERCPU_H__ */ -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |