diff options
author | Paul Burton <paul.burton@imgtec.com> | 2017-08-12 19:49:42 -0700 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-08-30 00:57:28 +0200 |
commit | 3c9b4166213d415afa09bf2be104074f3a1161c8 (patch) | |
tree | 090628d88c17fe1458da3497a0ded39b922f11a4 /arch/mips/include/asm/mips-cm.h | |
parent | e83f7e02af50c763ed9f953b565a4fbce6235fdf (diff) | |
download | linux-3c9b4166213d415afa09bf2be104074f3a1161c8.tar.gz |
MIPS: CPS: Cluster support for topology functions
Modify the functions we use to read information about the topology of
the system (the number of cores, VPs & IOCUs that it contains) in order
to take into account multiple clusters, and provide a new function to
determine the number of clusters in the system.
Users of these functions are modified only such that they continue to
build successfully - having them actually handle multiple clusters is
left to further patches.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17016/
Patchwork: https://patchwork.linux-mips.org/patch/17218/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/mips-cm.h')
-rw-r--r-- | arch/mips/include/asm/mips-cm.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/arch/mips/include/asm/mips-cm.h b/arch/mips/include/asm/mips-cm.h index 3b82ebb5b35c..f6231b91b724 100644 --- a/arch/mips/include/asm/mips-cm.h +++ b/arch/mips/include/asm/mips-cm.h @@ -329,36 +329,6 @@ GCR_CX_ACCESSOR_RW(32, 0x030, reset_ext_base) #define CM_GCR_Cx_RESET_EXT_BASE_PRESENT BIT(0) /** - * mips_cm_numcores - return the number of cores present in the system - * - * Returns the value of the PCORES field of the GCR_CONFIG register plus 1, or - * zero if no Coherence Manager is present. - */ -static inline unsigned mips_cm_numcores(void) -{ - if (!mips_cm_present()) - return 0; - - return ((read_gcr_config() & CM_GCR_CONFIG_PCORES) - >> __ffs(CM_GCR_CONFIG_PCORES)) + 1; -} - -/** - * mips_cm_numiocu - return the number of IOCUs present in the system - * - * Returns the value of the NUMIOCU field of the GCR_CONFIG register, or zero - * if no Coherence Manager is present. - */ -static inline unsigned mips_cm_numiocu(void) -{ - if (!mips_cm_present()) - return 0; - - return (read_gcr_config() & CM_GCR_CONFIG_NUMIOCU) - >> __ffs(CM_GCR_CONFIG_NUMIOCU); -} - -/** * mips_cm_l2sync - perform an L2-only sync operation * * If an L2-only sync region is present in the system then this function |