path: root/arch/arm/include/asm/bL_switcher.h
diff options
authorDave Martin <dave.martin@linaro.org>2013-02-13 16:20:44 +0000
committerAndrey Konovalov <andrey.konovalov@linaro.org>2013-05-25 13:05:28 +0400
commitaaf4b25f6cc82715096b0328fc42c466eb44960f (patch)
tree08129d581fde36152d30f808cbc1d051d9ba4cf3 /arch/arm/include/asm/bL_switcher.h
parent0a6da5300c989d978190637506a3a064d3a52492 (diff)
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>
Diffstat (limited to 'arch/arm/include/asm/bL_switcher.h')
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 d60e77d179a..ebf8d9872a6 100644
--- a/arch/arm/include/asm/bL_switcher.h
+++ b/arch/arm/include/asm/bL_switcher.h
@@ -47,6 +47,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);
static inline int bL_switcher_register_notifier(struct notifier_block *nb)
@@ -62,6 +63,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; }