diff options
author | Dan Smith <danms@us.ibm.com> | 2009-03-26 10:24:40 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-03-26 10:24:25 -0400 |
commit | eaf1b6fbca8d9be87bef2eafaa3f40bffe26ce04 (patch) | |
tree | 13376d104cff8d398be925d060d2f89b760948e5 /arch/s390 | |
parent | 1fbc9f46a024535d95c3d5f136901decd86b109e (diff) |
[S390] Expose a constant for the number of words representing the CRs
We need to use this value in the checkpoint/restart code and would like to
have a constant instead of a magic '3'.
Cc: linux-s390@vger.kernel.org
Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/include/asm/ptrace.h | 4 | ||||
-rw-r--r-- | arch/s390/kernel/compat_ptrace.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/s390/include/asm/ptrace.h b/arch/s390/include/asm/ptrace.h index 8920025c3c02..f1b051630c50 100644 --- a/arch/s390/include/asm/ptrace.h +++ b/arch/s390/include/asm/ptrace.h | |||
@@ -172,6 +172,8 @@ | |||
172 | #define NUM_CRS 16 | 172 | #define NUM_CRS 16 |
173 | #define NUM_ACRS 16 | 173 | #define NUM_ACRS 16 |
174 | 174 | ||
175 | #define NUM_CR_WORDS 3 | ||
176 | |||
175 | #define FPR_SIZE 8 | 177 | #define FPR_SIZE 8 |
176 | #define FPC_SIZE 4 | 178 | #define FPC_SIZE 4 |
177 | #define FPC_PAD_SIZE 4 /* gcc insists on aligning the fpregs */ | 179 | #define FPC_PAD_SIZE 4 /* gcc insists on aligning the fpregs */ |
@@ -334,7 +336,7 @@ struct pt_regs | |||
334 | */ | 336 | */ |
335 | typedef struct | 337 | typedef struct |
336 | { | 338 | { |
337 | unsigned long cr[3]; | 339 | unsigned long cr[NUM_CR_WORDS]; |
338 | } per_cr_words; | 340 | } per_cr_words; |
339 | 341 | ||
340 | #define PER_EM_MASK 0xE8000000UL | 342 | #define PER_EM_MASK 0xE8000000UL |
diff --git a/arch/s390/kernel/compat_ptrace.h b/arch/s390/kernel/compat_ptrace.h index a2be3a978d5c..123dd660d7fb 100644 --- a/arch/s390/kernel/compat_ptrace.h +++ b/arch/s390/kernel/compat_ptrace.h | |||
@@ -1,10 +1,11 @@ | |||
1 | #ifndef _PTRACE32_H | 1 | #ifndef _PTRACE32_H |
2 | #define _PTRACE32_H | 2 | #define _PTRACE32_H |
3 | 3 | ||
4 | #include <asm/ptrace.h> /* needed for NUM_CR_WORDS */ | ||
4 | #include "compat_linux.h" /* needed for psw_compat_t */ | 5 | #include "compat_linux.h" /* needed for psw_compat_t */ |
5 | 6 | ||
6 | typedef struct { | 7 | typedef struct { |
7 | __u32 cr[3]; | 8 | __u32 cr[NUM_CR_WORDS]; |
8 | } per_cr_words32; | 9 | } per_cr_words32; |
9 | 10 | ||
10 | typedef struct { | 11 | typedef struct { |