Skip to content

Commit eaf1b6f

Browse files
kk7dsMartin Schwidefsky
authored andcommitted
[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>
1 parent 1fbc9f4 commit eaf1b6f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

arch/s390/include/asm/ptrace.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@
172172
#define NUM_CRS 16
173173
#define NUM_ACRS 16
174174

175+
#define NUM_CR_WORDS 3
176+
175177
#define FPR_SIZE 8
176178
#define FPC_SIZE 4
177179
#define FPC_PAD_SIZE 4 /* gcc insists on aligning the fpregs */
@@ -334,7 +336,7 @@ struct pt_regs
334336
*/
335337
typedef struct
336338
{
337-
unsigned long cr[3];
339+
unsigned long cr[NUM_CR_WORDS];
338340
} per_cr_words;
339341

340342
#define PER_EM_MASK 0xE8000000UL

arch/s390/kernel/compat_ptrace.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#ifndef _PTRACE32_H
22
#define _PTRACE32_H
33

4+
#include <asm/ptrace.h> /* needed for NUM_CR_WORDS */
45
#include "compat_linux.h" /* needed for psw_compat_t */
56

67
typedef struct {
7-
__u32 cr[3];
8+
__u32 cr[NUM_CR_WORDS];
89
} per_cr_words32;
910

1011
typedef struct {

0 commit comments

Comments
 (0)