path: root/arch/arm/include/asm/bL_switcher.h
diff options
authorDave Martin <dave.martin@linaro.org>2013-02-13 16:20:44 +0000
committerNicolas Pitre <nicolas.pitre@linaro.org>2013-06-20 00:45:30 -0400
commit8e3aa3f1462fc25b810e867059b292675f0d3a94 (patch)
tree474e36c5d066286be965e6b9c3e36d6c6fa739c5 /arch/arm/include/asm/bL_switcher.h
parent21ba6d493d0aa19b1932880ebbab057a99a9a9a1 (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> Signed-off-by: Nicolas Pitre <nico@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 31df916c40a..482383b45c9 100644
--- a/arch/arm/include/asm/bL_switcher.h
+++ b/arch/arm/include/asm/bL_switcher.h
@@ -58,6 +58,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 void bL_switch_request_detach(unsigned int cpu,
@@ -76,6 +77,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; }