linux-mips
[Top] [All Lists]

[PATCH v2 14/15] mips: warn if vector register partitioning is implement

To: <linux-mips@linux-mips.org>
Subject: [PATCH v2 14/15] mips: warn if vector register partitioning is implemented
From: Paul Burton <paul.burton@imgtec.com>
Date: Tue, 28 Jan 2014 14:28:43 +0000
Cc: Paul Burton <paul.burton@imgtec.com>
In-reply-to: <20140128142019.GE43648@pburton-linux.le.imgtec.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20140128142019.GE43648@pburton-linux.le.imgtec.org>
Sender: linux-mips-bounce@linux-mips.org
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 <paul.burton@imgtec.com>
---
Changes in v2:
  - Switch from panic to WARN so that console output can be seen.
---
 arch/mips/kernel/cpu-probe.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 852e085..8605eb6 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -1193,8 +1193,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);
 
-- 
1.8.5.3



<Prev in Thread] Current Thread [Next in Thread>