diff options
author | Dave Martin <dave.martin@linaro.org> | 2013-02-13 16:20:44 +0000 |
---|---|---|
committer | Nicolas Pitre <nicolas.pitre@linaro.org> | 2013-09-23 18:47:31 -0400 |
commit | d08e2e09042bd3f7ef66a35cb4bb92794ab26bb2 (patch) | |
tree | e34b0ae05a946887e11432db8f09d0110c9d6077 /arch/arm/include/asm/bL_switcher.h | |
parent | 29064b88466ee725613db16d8c05b0ec5443a309 (diff) | |
download | blackbird-op-linux-d08e2e09042bd3f7ef66a35cb4bb92794ab26bb2.tar.gz blackbird-op-linux-d08e2e09042bd3f7ef66a35cb4bb92794ab26bb2.zip |
ARM: bL_switcher: Add query interface to discover CPU affinities
When the switcher is active, there is no straightforward way to
figure out which logical CPU a given physical CPU maps to.
This patch provides a function
bL_switcher_get_logical_index(mpidr), which is analogous to
get_logical_index().
This function returns the logical CPU on which the specified
physical CPU is grouped (or -EINVAL if unknown).
If the switcher is inactive or not present, -EUNATCH is returned instead.
Signed-off-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Diffstat (limited to 'arch/arm/include/asm/bL_switcher.h')
-rw-r--r-- | arch/arm/include/asm/bL_switcher.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/include/asm/bL_switcher.h b/arch/arm/include/asm/bL_switcher.h index 8ada5a885c70..1714800fa113 100644 --- a/arch/arm/include/asm/bL_switcher.h +++ b/arch/arm/include/asm/bL_switcher.h @@ -55,6 +55,7 @@ bool bL_switcher_get_enabled(void); void bL_switcher_put_enabled(void); int bL_switcher_trace_trigger(void); +int bL_switcher_get_logical_index(u32 mpidr); #else static inline int bL_switcher_register_notifier(struct notifier_block *nb) @@ -70,6 +71,7 @@ static inline int bL_switcher_unregister_notifier(struct notifier_block *nb) static inline bool bL_switcher_get_enabled(void) { return false; } static inline void bL_switcher_put_enabled(void) { } static inline int bL_switcher_trace_trigger(void) { return 0; } +static inline int bL_switcher_get_logical_index(u32 mpidr) { return -EUNATCH; } #endif /* CONFIG_BL_SWITCHER */ #endif |