diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-10-06 11:53:53 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-10-09 03:14:13 -0400 |
commit | 8070361799ae1e3f4ef347bd10f0a508ac10acfb (patch) | |
tree | 9846c0633cd28a86dc62eca55a4268fed513fcfd /arch/s390/kernel/nmi.c | |
parent | 42f4dd613fe808676126472bbe1283e452201148 (diff) |
s390: add support for vector extension
The vector extension introduces 32 128-bit vector registers and a set of
instruction to operate on the vector registers.
The kernel can control the use of vector registers for the problem state
program with a bit in control register 0. Once enabled for a process the
kernel needs to retain the content of the vector registers on context
switch. The signal frame is extended to include the vector registers.
Two new register sets NT_S390_VXRS_LOW and NT_S390_VXRS_HIGH are added
to the regset interface for the debugger and core dumps.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/nmi.c')
-rw-r--r-- | arch/s390/kernel/nmi.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c index 210e1285f75a..db96b418160a 100644 --- a/arch/s390/kernel/nmi.c +++ b/arch/s390/kernel/nmi.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/cputime.h> | 20 | #include <asm/cputime.h> |
21 | #include <asm/nmi.h> | 21 | #include <asm/nmi.h> |
22 | #include <asm/crw.h> | 22 | #include <asm/crw.h> |
23 | #include <asm/switch_to.h> | ||
23 | 24 | ||
24 | struct mcck_struct { | 25 | struct mcck_struct { |
25 | int kill_task; | 26 | int kill_task; |
@@ -163,6 +164,21 @@ static int notrace s390_revalidate_registers(struct mci *mci) | |||
163 | " ld 15,120(%0)\n" | 164 | " ld 15,120(%0)\n" |
164 | : : "a" (fpt_save_area)); | 165 | : : "a" (fpt_save_area)); |
165 | } | 166 | } |
167 | |||
168 | #ifdef CONFIG_64BIT | ||
169 | /* Revalidate vector registers */ | ||
170 | if (MACHINE_HAS_VX && current->thread.vxrs) { | ||
171 | if (!mci->vr) { | ||
172 | /* | ||
173 | * Vector registers can't be restored and therefore | ||
174 | * the process needs to be terminated. | ||
175 | */ | ||
176 | kill_task = 1; | ||
177 | } | ||
178 | restore_vx_regs((__vector128 *) | ||
179 | S390_lowcore.vector_save_area_addr); | ||
180 | } | ||
181 | #endif | ||
166 | /* Revalidate access registers */ | 182 | /* Revalidate access registers */ |
167 | asm volatile( | 183 | asm volatile( |
168 | " lam 0,15,0(%0)" | 184 | " lam 0,15,0(%0)" |