Skip to content

Commit

Permalink
UAPI: (Scripted) Disintegrate arch/score/include/asm
Browse files Browse the repository at this point in the history
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
Acked-by: Lennox Wu <lennox.wu@gmail.com>
Acked-by: Liqin Chen <liqin299@gmail.com>
  • Loading branch information
David Howells committed Dec 20, 2012
1 parent f01af9f commit d66d8c7
Show file tree
Hide file tree
Showing 35 changed files with 118 additions and 80 deletions.
1 change: 0 additions & 1 deletion arch/score/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include include/asm-generic/Kbuild.asm

header-y +=

Expand Down
74 changes: 1 addition & 73 deletions arch/score/include/asm/ptrace.h
Original file line number Diff line number Diff line change
@@ -1,78 +1,8 @@
#ifndef _ASM_SCORE_PTRACE_H
#define _ASM_SCORE_PTRACE_H

#define PTRACE_GETREGS 12
#define PTRACE_SETREGS 13
#include <uapi/asm/ptrace.h>

#define PC 32
#define CONDITION 33
#define ECR 34
#define EMA 35
#define CEH 36
#define CEL 37
#define COUNTER 38
#define LDCR 39
#define STCR 40
#define PSR 41

#define SINGLESTEP16_INSN 0x7006
#define SINGLESTEP32_INSN 0x840C8000
#define BREAKPOINT16_INSN 0x7002 /* work on SPG300 */
#define BREAKPOINT32_INSN 0x84048000 /* work on SPG300 */

/* Define instruction mask */
#define INSN32_MASK 0x80008000

#define J32 0x88008000 /* 1_00010_0000000000_1_000000000000000 */
#define J32M 0xFC008000 /* 1_11111_0000000000_1_000000000000000 */

#define B32 0x90008000 /* 1_00100_0000000000_1_000000000000000 */
#define B32M 0xFC008000
#define BL32 0x90008001 /* 1_00100_0000000000_1_000000000000001 */
#define BL32M B32
#define BR32 0x80008008 /* 1_00000_0000000000_1_00000000_000100_0 */
#define BR32M 0xFFE0807E
#define BRL32 0x80008009 /* 1_00000_0000000000_1_00000000_000100_1 */
#define BRL32M BR32M

#define B32_SET (J32 | B32 | BL32 | BR32 | BRL32)

#define J16 0x3000 /* 0_011_....... */
#define J16M 0xF000
#define B16 0x4000 /* 0_100_....... */
#define B16M 0xF000
#define BR16 0x0004 /* 0_000.......0100 */
#define BR16M 0xF00F
#define B16_SET (J16 | B16 | BR16)


/*
* This struct defines the way the registers are stored on the stack during a
* system call/exception. As usual the registers k0/k1 aren't being saved.
*/
struct pt_regs {
unsigned long pad0[6]; /* stack arguments */
unsigned long orig_r4;
unsigned long orig_r7;
long is_syscall;

unsigned long regs[32];

unsigned long cel;
unsigned long ceh;

unsigned long sr0; /* cnt */
unsigned long sr1; /* lcr */
unsigned long sr2; /* scr */

unsigned long cp0_epc;
unsigned long cp0_ema;
unsigned long cp0_psr;
unsigned long cp0_ecr;
unsigned long cp0_condition;
};

#ifdef __KERNEL__

struct task_struct;

Expand All @@ -91,6 +21,4 @@ extern int read_tsk_short(struct task_struct *, unsigned long,

#define arch_has_single_step() (1)

#endif /* __KERNEL__ */

#endif /* _ASM_SCORE_PTRACE_H */
7 changes: 1 addition & 6 deletions arch/score/include/asm/setup.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#ifndef _ASM_SCORE_SETUP_H
#define _ASM_SCORE_SETUP_H

#define COMMAND_LINE_SIZE 256
#define MEMORY_START 0
#define MEMORY_SIZE 0x2000000
#include <uapi/asm/setup.h>

#ifdef __KERNEL__

extern void pagetable_init(void);
extern void pgd_init(unsigned long page);
Expand Down Expand Up @@ -36,6 +33,4 @@ extern void debug_exception_vector(void);
extern void general_exception_vector(void);
extern void interrupt_exception_vector(void);

#endif /* __KERNEL__ */

#endif /* _ASM_SCORE_SETUP_H */
31 changes: 31 additions & 0 deletions arch/score/include/uapi/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm

header-y += auxvec.h
header-y += bitsperlong.h
header-y += byteorder.h
header-y += errno.h
header-y += fcntl.h
header-y += ioctl.h
header-y += ioctls.h
header-y += ipcbuf.h
header-y += kvm_para.h
header-y += mman.h
header-y += msgbuf.h
header-y += param.h
header-y += poll.h
header-y += posix_types.h
header-y += ptrace.h
header-y += resource.h
header-y += sembuf.h
header-y += setup.h
header-y += shmbuf.h
header-y += sigcontext.h
header-y += siginfo.h
header-y += signal.h
header-y += socket.h
header-y += sockios.h
header-y += stat.h
header-y += statfs.h
header-y += swab.h
header-y += termbits.h
header-y += termios.h
header-y += types.h
header-y += unistd.h
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
76 changes: 76 additions & 0 deletions arch/score/include/uapi/asm/ptrace.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#ifndef _UAPI_ASM_SCORE_PTRACE_H
#define _UAPI_ASM_SCORE_PTRACE_H

#define PTRACE_GETREGS 12
#define PTRACE_SETREGS 13

#define PC 32
#define CONDITION 33
#define ECR 34
#define EMA 35
#define CEH 36
#define CEL 37
#define COUNTER 38
#define LDCR 39
#define STCR 40
#define PSR 41

#define SINGLESTEP16_INSN 0x7006
#define SINGLESTEP32_INSN 0x840C8000
#define BREAKPOINT16_INSN 0x7002 /* work on SPG300 */
#define BREAKPOINT32_INSN 0x84048000 /* work on SPG300 */

/* Define instruction mask */
#define INSN32_MASK 0x80008000

#define J32 0x88008000 /* 1_00010_0000000000_1_000000000000000 */
#define J32M 0xFC008000 /* 1_11111_0000000000_1_000000000000000 */

#define B32 0x90008000 /* 1_00100_0000000000_1_000000000000000 */
#define B32M 0xFC008000
#define BL32 0x90008001 /* 1_00100_0000000000_1_000000000000001 */
#define BL32M B32
#define BR32 0x80008008 /* 1_00000_0000000000_1_00000000_000100_0 */
#define BR32M 0xFFE0807E
#define BRL32 0x80008009 /* 1_00000_0000000000_1_00000000_000100_1 */
#define BRL32M BR32M

#define B32_SET (J32 | B32 | BL32 | BR32 | BRL32)

#define J16 0x3000 /* 0_011_....... */
#define J16M 0xF000
#define B16 0x4000 /* 0_100_....... */
#define B16M 0xF000
#define BR16 0x0004 /* 0_000.......0100 */
#define BR16M 0xF00F
#define B16_SET (J16 | B16 | BR16)


/*
* This struct defines the way the registers are stored on the stack during a
* system call/exception. As usual the registers k0/k1 aren't being saved.
*/
struct pt_regs {
unsigned long pad0[6]; /* stack arguments */
unsigned long orig_r4;
unsigned long orig_r7;
long is_syscall;

unsigned long regs[32];

unsigned long cel;
unsigned long ceh;

unsigned long sr0; /* cnt */
unsigned long sr1; /* lcr */
unsigned long sr2; /* scr */

unsigned long cp0_epc;
unsigned long cp0_ema;
unsigned long cp0_psr;
unsigned long cp0_ecr;
unsigned long cp0_condition;
};


#endif /* _UAPI_ASM_SCORE_PTRACE_H */
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions arch/score/include/uapi/asm/setup.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef _UAPI_ASM_SCORE_SETUP_H
#define _UAPI_ASM_SCORE_SETUP_H

#define COMMAND_LINE_SIZE 256
#define MEMORY_START 0
#define MEMORY_SIZE 0x2000000


#endif /* _UAPI_ASM_SCORE_SETUP_H */
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d66d8c7

Please sign in to comment.