Commit 62e1dfa3 authored by Hendrik Brueckner's avatar Hendrik Brueckner Committed by Daniel Borkmann

s390/uapi: correct whitespace & coding style in asm/ptrace.h

Correct whitespace and coding style issues in the s390 asm/ptrace.h
uapi header file.  This is preparatory work to copy it to the tools/
directory for inclusion by selftests and perf.
Signed-off-by: default avatarHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent a39cada7
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
#define GPR_SIZE 8 #define GPR_SIZE 8
#define CR_SIZE 8 #define CR_SIZE 8
#define STACK_FRAME_OVERHEAD 160 /* size of minimum stack frame */ #define STACK_FRAME_OVERHEAD 160 /* size of minimum stack frame */
#endif /* __s390x__ */ #endif /* __s390x__ */
...@@ -179,17 +179,16 @@ ...@@ -179,17 +179,16 @@
#define ACR_SIZE 4 #define ACR_SIZE 4
#define PTRACE_OLDSETOPTIONS 21 #define PTRACE_OLDSETOPTIONS 21
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/types.h> #include <linux/types.h>
typedef union typedef union {
{ float f;
float f; double d;
double d; __u64 ui;
__u64 ui;
struct struct
{ {
__u32 hi; __u32 hi;
...@@ -197,23 +196,21 @@ typedef union ...@@ -197,23 +196,21 @@ typedef union
} fp; } fp;
} freg_t; } freg_t;
typedef struct typedef struct {
{ __u32 fpc;
__u32 fpc;
__u32 pad; __u32 pad;
freg_t fprs[NUM_FPRS]; freg_t fprs[NUM_FPRS];
} s390_fp_regs; } s390_fp_regs;
#define FPC_EXCEPTION_MASK 0xF8000000 #define FPC_EXCEPTION_MASK 0xF8000000
#define FPC_FLAGS_MASK 0x00F80000 #define FPC_FLAGS_MASK 0x00F80000
#define FPC_DXC_MASK 0x0000FF00 #define FPC_DXC_MASK 0x0000FF00
#define FPC_RM_MASK 0x00000003 #define FPC_RM_MASK 0x00000003
/* this typedef defines how a Program Status Word looks like */ /* this typedef defines how a Program Status Word looks like */
typedef struct typedef struct {
{ unsigned long mask;
unsigned long mask; unsigned long addr;
unsigned long addr;
} __attribute__ ((aligned(8))) psw_t; } __attribute__ ((aligned(8))) psw_t;
#ifndef __s390x__ #ifndef __s390x__
...@@ -282,8 +279,7 @@ typedef struct ...@@ -282,8 +279,7 @@ typedef struct
/* /*
* The s390_regs structure is used to define the elf_gregset_t. * The s390_regs structure is used to define the elf_gregset_t.
*/ */
typedef struct typedef struct {
{
psw_t psw; psw_t psw;
unsigned long gprs[NUM_GPRS]; unsigned long gprs[NUM_GPRS];
unsigned int acrs[NUM_ACRS]; unsigned int acrs[NUM_ACRS];
...@@ -294,8 +290,7 @@ typedef struct ...@@ -294,8 +290,7 @@ typedef struct
* The user_pt_regs structure exports the beginning of * The user_pt_regs structure exports the beginning of
* the in-kernel pt_regs structure to user space. * the in-kernel pt_regs structure to user space.
*/ */
typedef struct typedef struct {
{
unsigned long args[1]; unsigned long args[1];
psw_t psw; psw_t psw;
unsigned long gprs[NUM_GPRS]; unsigned long gprs[NUM_GPRS];
...@@ -307,19 +302,17 @@ typedef struct ...@@ -307,19 +302,17 @@ typedef struct
* touch or even look at it if you don't want to modify the user-space * touch or even look at it if you don't want to modify the user-space
* ptrace interface. In particular stay away from it for in-kernel PER. * ptrace interface. In particular stay away from it for in-kernel PER.
*/ */
typedef struct typedef struct {
{
unsigned long cr[NUM_CR_WORDS]; unsigned long cr[NUM_CR_WORDS];
} per_cr_words; } per_cr_words;
#define PER_EM_MASK 0xE8000000UL #define PER_EM_MASK 0xE8000000UL
typedef struct typedef struct {
{
#ifdef __s390x__ #ifdef __s390x__
unsigned : 32; unsigned : 32;
#endif /* __s390x__ */ #endif /* __s390x__ */
unsigned em_branching : 1; unsigned em_branching : 1;
unsigned em_instruction_fetch : 1; unsigned em_instruction_fetch : 1;
/* /*
* Switching on storage alteration automatically fixes * Switching on storage alteration automatically fixes
...@@ -328,44 +321,41 @@ typedef struct ...@@ -328,44 +321,41 @@ typedef struct
unsigned em_storage_alteration : 1; unsigned em_storage_alteration : 1;
unsigned em_gpr_alt_unused : 1; unsigned em_gpr_alt_unused : 1;
unsigned em_store_real_address : 1; unsigned em_store_real_address : 1;
unsigned : 3; unsigned : 3;
unsigned branch_addr_ctl : 1; unsigned branch_addr_ctl : 1;
unsigned : 1; unsigned : 1;
unsigned storage_alt_space_ctl : 1; unsigned storage_alt_space_ctl : 1;
unsigned : 21; unsigned : 21;
unsigned long starting_addr; unsigned long starting_addr;
unsigned long ending_addr; unsigned long ending_addr;
} per_cr_bits; } per_cr_bits;
typedef struct typedef struct {
{
unsigned short perc_atmid; unsigned short perc_atmid;
unsigned long address; unsigned long address;
unsigned char access_id; unsigned char access_id;
} per_lowcore_words; } per_lowcore_words;
typedef struct typedef struct {
{ unsigned perc_branching : 1;
unsigned perc_branching : 1;
unsigned perc_instruction_fetch : 1; unsigned perc_instruction_fetch : 1;
unsigned perc_storage_alteration : 1; unsigned perc_storage_alteration : 1;
unsigned perc_gpr_alt_unused : 1; unsigned perc_gpr_alt_unused : 1;
unsigned perc_store_real_address : 1; unsigned perc_store_real_address : 1;
unsigned : 3; unsigned : 3;
unsigned atmid_psw_bit_31 : 1; unsigned atmid_psw_bit_31 : 1;
unsigned atmid_validity_bit : 1; unsigned atmid_validity_bit : 1;
unsigned atmid_psw_bit_32 : 1; unsigned atmid_psw_bit_32 : 1;
unsigned atmid_psw_bit_5 : 1; unsigned atmid_psw_bit_5 : 1;
unsigned atmid_psw_bit_16 : 1; unsigned atmid_psw_bit_16 : 1;
unsigned atmid_psw_bit_17 : 1; unsigned atmid_psw_bit_17 : 1;
unsigned si : 2; unsigned si : 2;
unsigned long address; unsigned long address;
unsigned : 4; unsigned : 4;
unsigned access_id : 4; unsigned access_id : 4;
} per_lowcore_bits; } per_lowcore_bits;
typedef struct typedef struct {
{
union { union {
per_cr_words words; per_cr_words words;
per_cr_bits bits; per_cr_bits bits;
...@@ -375,9 +365,9 @@ typedef struct ...@@ -375,9 +365,9 @@ typedef struct
* the kernel always sets them to zero. To enable single * the kernel always sets them to zero. To enable single
* stepping use ptrace(PTRACE_SINGLESTEP) instead. * stepping use ptrace(PTRACE_SINGLESTEP) instead.
*/ */
unsigned single_step : 1; unsigned single_step : 1;
unsigned instruction_fetch : 1; unsigned instruction_fetch : 1;
unsigned : 30; unsigned : 30;
/* /*
* These addresses are copied into cr10 & cr11 if single * These addresses are copied into cr10 & cr11 if single
* stepping is switched off * stepping is switched off
...@@ -387,11 +377,10 @@ typedef struct ...@@ -387,11 +377,10 @@ typedef struct
union { union {
per_lowcore_words words; per_lowcore_words words;
per_lowcore_bits bits; per_lowcore_bits bits;
} lowcore; } lowcore;
} per_struct; } per_struct;
typedef struct typedef struct {
{
unsigned int len; unsigned int len;
unsigned long kernel_addr; unsigned long kernel_addr;
unsigned long process_addr; unsigned long process_addr;
...@@ -401,12 +390,12 @@ typedef struct ...@@ -401,12 +390,12 @@ typedef struct
* S/390 specific non posix ptrace requests. I chose unusual values so * S/390 specific non posix ptrace requests. I chose unusual values so
* they are unlikely to clash with future ptrace definitions. * they are unlikely to clash with future ptrace definitions.
*/ */
#define PTRACE_PEEKUSR_AREA 0x5000 #define PTRACE_PEEKUSR_AREA 0x5000
#define PTRACE_POKEUSR_AREA 0x5001 #define PTRACE_POKEUSR_AREA 0x5001
#define PTRACE_PEEKTEXT_AREA 0x5002 #define PTRACE_PEEKTEXT_AREA 0x5002
#define PTRACE_PEEKDATA_AREA 0x5003 #define PTRACE_PEEKDATA_AREA 0x5003
#define PTRACE_POKETEXT_AREA 0x5004 #define PTRACE_POKETEXT_AREA 0x5004
#define PTRACE_POKEDATA_AREA 0x5005 #define PTRACE_POKEDATA_AREA 0x5005
#define PTRACE_GET_LAST_BREAK 0x5006 #define PTRACE_GET_LAST_BREAK 0x5006
#define PTRACE_PEEK_SYSTEM_CALL 0x5007 #define PTRACE_PEEK_SYSTEM_CALL 0x5007
#define PTRACE_POKE_SYSTEM_CALL 0x5008 #define PTRACE_POKE_SYSTEM_CALL 0x5008
...@@ -424,21 +413,19 @@ typedef struct ...@@ -424,21 +413,19 @@ typedef struct
* PT_PROT definition is loosely based on hppa bsd definition in * PT_PROT definition is loosely based on hppa bsd definition in
* gdb/hppab-nat.c * gdb/hppab-nat.c
*/ */
#define PTRACE_PROT 21 #define PTRACE_PROT 21
typedef enum typedef enum {
{
ptprot_set_access_watchpoint, ptprot_set_access_watchpoint,
ptprot_set_write_watchpoint, ptprot_set_write_watchpoint,
ptprot_disable_watchpoint ptprot_disable_watchpoint
} ptprot_flags; } ptprot_flags;
typedef struct typedef struct {
{
unsigned long lowaddr; unsigned long lowaddr;
unsigned long hiaddr; unsigned long hiaddr;
ptprot_flags prot; ptprot_flags prot;
} ptprot_area; } ptprot_area;
/* Sequence of bytes for breakpoint illegal instruction. */ /* Sequence of bytes for breakpoint illegal instruction. */
#define S390_BREAKPOINT {0x0,0x1} #define S390_BREAKPOINT {0x0,0x1}
...@@ -450,8 +437,7 @@ typedef struct ...@@ -450,8 +437,7 @@ typedef struct
* The user_regs_struct defines the way the user registers are * The user_regs_struct defines the way the user registers are
* store on the stack for signal handling. * store on the stack for signal handling.
*/ */
struct user_regs_struct struct user_regs_struct {
{
psw_t psw; psw_t psw;
unsigned long gprs[NUM_GPRS]; unsigned long gprs[NUM_GPRS];
unsigned int acrs[NUM_ACRS]; unsigned int acrs[NUM_ACRS];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment