]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Unify checks for sibling CPUs
authorPaul Burton <paul.burton@imgtec.com>
Sun, 13 Aug 2017 02:49:37 +0000 (19:49 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 29 Aug 2017 22:57:27 +0000 (00:57 +0200)
commit763a7bc6f51a5464c70334413f06e6020c62f73b
tree116de1ad4eb37d1e5944c322c889505d5ac5e1e3
parent4f99eaded680021ce92b1b564a92ec761ea41aaa
MIPS: Unify checks for sibling CPUs

Up until now we have open-coded checks for whether CPUs are siblings,
with slight variations on whether we consider the package ID or not.

This will only get more complex when we introduce cluster support, so in
preparation for that this patch introduces a cpus_are_siblings()
function which can be used to check whether or not 2 CPUs are siblings
in a consistent manner.

By checking globalnumber with the VP ID masked out this also has the
neat side effect of being ready for multi-cluster systems already.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Rafael J. Wysocki <rjw@rjwysocki.net>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17011/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/cpu-info.h
arch/mips/kernel/smp-cps.c
arch/mips/kernel/smp.c
drivers/cpuidle/cpuidle-cps.c
drivers/irqchip/irq-mips-cpu.c