From: Paul Burton Date: Tue, 28 Jan 2014 14:28:43 +0000 (+0000) Subject: MIPS: Warn if vector register partitioning is implemented X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a8ad136789b4256fa372d59daaddb91b72aa0753;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git MIPS: Warn if vector register partitioning is implemented No current systems implementing MSA include support for vector register partitioning which makes it somewhat difficult to implement support for it in the kernel. Thus for the moment the kernel includes no such support. However if the kernel were to be run on a system which implemented register partitioning then it would not function correctly, mishandling MSA disabled exceptions. Print a warning if run on a system with vector register partitioning implemented to indicate this problem should it occur. Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6494/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 420d2fc595d0..dec20f580cea 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c @@ -1195,8 +1195,11 @@ void cpu_probe(void) else c->srsets = 1; - if (cpu_has_msa) + if (cpu_has_msa) { c->msa_id = cpu_get_msa_id(); + WARN(c->msa_id & MSA_IR_WRPF, + "Vector register partitioning unimplemented!"); + } cpu_probe_vmbits(c);