diff options
| author | Michael Ellerman <michael@ellerman.id.au> | 2005-11-03 20:12:52 -0500 |
|---|---|---|
| committer | Michael Ellerman <michael@ellerman.id.au> | 2005-11-03 20:12:52 -0500 |
| commit | dc3a9efb5ee89493a42c3365d219e339e4720c2b (patch) | |
| tree | a0d261c2933f3083f351c858b01de7677356d4b7 /include/asm-ppc | |
| parent | 30415f6a63f3383a18e9adf7c144acabe6893f63 (diff) | |
| parent | d3ab57ebdc6457543b346255fa47b0ecd7671136 (diff) | |
Merge with Paulus
Diffstat (limited to 'include/asm-ppc')
| -rw-r--r-- | include/asm-ppc/commproc.h | 2 | ||||
| -rw-r--r-- | include/asm-ppc/ptrace.h | 152 | ||||
| -rw-r--r-- | include/asm-ppc/sigcontext.h | 15 | ||||
| -rw-r--r-- | include/asm-ppc/stat.h | 69 | ||||
| -rw-r--r-- | include/asm-ppc/ucontext.h | 27 |
5 files changed, 2 insertions, 263 deletions
diff --git a/include/asm-ppc/commproc.h b/include/asm-ppc/commproc.h index 5bbb8e2c1c6d..973e60908234 100644 --- a/include/asm-ppc/commproc.h +++ b/include/asm-ppc/commproc.h | |||
| @@ -83,6 +83,8 @@ extern uint m8xx_cpm_hostalloc(uint size); | |||
| 83 | extern int m8xx_cpm_hostfree(uint start); | 83 | extern int m8xx_cpm_hostfree(uint start); |
| 84 | extern void m8xx_cpm_hostdump(void); | 84 | extern void m8xx_cpm_hostdump(void); |
| 85 | 85 | ||
| 86 | extern void cpm_load_patch(volatile immap_t *immr); | ||
| 87 | |||
| 86 | /* Buffer descriptors used by many of the CPM protocols. | 88 | /* Buffer descriptors used by many of the CPM protocols. |
| 87 | */ | 89 | */ |
| 88 | typedef struct cpm_buf_desc { | 90 | typedef struct cpm_buf_desc { |
diff --git a/include/asm-ppc/ptrace.h b/include/asm-ppc/ptrace.h deleted file mode 100644 index c34fb4e37a97..000000000000 --- a/include/asm-ppc/ptrace.h +++ /dev/null | |||
| @@ -1,152 +0,0 @@ | |||
| 1 | #ifndef _PPC_PTRACE_H | ||
| 2 | #define _PPC_PTRACE_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * This struct defines the way the registers are stored on the | ||
| 6 | * kernel stack during a system call or other kernel entry. | ||
| 7 | * | ||
| 8 | * this should only contain volatile regs | ||
| 9 | * since we can keep non-volatile in the thread_struct | ||
| 10 | * should set this up when only volatiles are saved | ||
| 11 | * by intr code. | ||
| 12 | * | ||
| 13 | * Since this is going on the stack, *CARE MUST BE TAKEN* to insure | ||
| 14 | * that the overall structure is a multiple of 16 bytes in length. | ||
| 15 | * | ||
| 16 | * Note that the offsets of the fields in this struct correspond with | ||
| 17 | * the PT_* values below. This simplifies arch/ppc/kernel/ptrace.c. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef __ASSEMBLY__ | ||
| 21 | struct pt_regs { | ||
| 22 | unsigned long gpr[32]; | ||
| 23 | unsigned long nip; | ||
| 24 | unsigned long msr; | ||
| 25 | unsigned long orig_gpr3; /* Used for restarting system calls */ | ||
| 26 | unsigned long ctr; | ||
| 27 | unsigned long link; | ||
| 28 | unsigned long xer; | ||
| 29 | unsigned long ccr; | ||
| 30 | unsigned long mq; /* 601 only (not used at present) */ | ||
| 31 | /* Used on APUS to hold IPL value. */ | ||
| 32 | unsigned long trap; /* Reason for being here */ | ||
| 33 | /* N.B. for critical exceptions on 4xx, the dar and dsisr | ||
| 34 | fields are overloaded to hold srr0 and srr1. */ | ||
| 35 | unsigned long dar; /* Fault registers */ | ||
| 36 | unsigned long dsisr; /* on 4xx/Book-E used for ESR */ | ||
| 37 | unsigned long result; /* Result of a system call */ | ||
| 38 | }; | ||
| 39 | |||
| 40 | #endif /* __ASSEMBLY__ */ | ||
| 41 | |||
| 42 | #ifdef __KERNEL__ | ||
| 43 | #define STACK_FRAME_OVERHEAD 16 /* size of minimum stack frame */ | ||
| 44 | |||
| 45 | /* Size of stack frame allocated when calling signal handler. */ | ||
| 46 | #define __SIGNAL_FRAMESIZE 64 | ||
| 47 | |||
| 48 | #ifndef __ASSEMBLY__ | ||
| 49 | #define instruction_pointer(regs) ((regs)->nip) | ||
| 50 | #ifdef CONFIG_SMP | ||
| 51 | extern unsigned long profile_pc(struct pt_regs *regs); | ||
| 52 | #else | ||
| 53 | #define profile_pc(regs) instruction_pointer(regs) | ||
| 54 | #endif | ||
| 55 | |||
| 56 | #define user_mode(regs) (((regs)->msr & MSR_PR) != 0) | ||
| 57 | |||
| 58 | #define force_successful_syscall_return() \ | ||
| 59 | do { \ | ||
| 60 | current_thread_info()->syscall_noerror = 1; \ | ||
| 61 | } while(0) | ||
| 62 | |||
| 63 | /* | ||
| 64 | * We use the least-significant bit of the trap field to indicate | ||
| 65 | * whether we have saved the full set of registers, or only a | ||
| 66 | * partial set. A 1 there means the partial set. | ||
| 67 | * On 4xx we use the next bit to indicate whether the exception | ||
| 68 | * is a critical exception (1 means it is). | ||
| 69 | */ | ||
| 70 | #define FULL_REGS(regs) (((regs)->trap & 1) == 0) | ||
| 71 | #define IS_CRITICAL_EXC(regs) (((regs)->trap & 2) == 0) | ||
| 72 | #define TRAP(regs) ((regs)->trap & ~0xF) | ||
| 73 | |||
| 74 | #define CHECK_FULL_REGS(regs) \ | ||
| 75 | do { \ | ||
| 76 | if ((regs)->trap & 1) \ | ||
| 77 | printk(KERN_CRIT "%s: partial register set\n", __FUNCTION__); \ | ||
| 78 | } while (0) | ||
| 79 | #endif /* __ASSEMBLY__ */ | ||
| 80 | |||
| 81 | #endif /* __KERNEL__ */ | ||
| 82 | |||
| 83 | /* | ||
| 84 | * Offsets used by 'ptrace' system call interface. | ||
| 85 | * These can't be changed without breaking binary compatibility | ||
| 86 | * with MkLinux, etc. | ||
| 87 | */ | ||
| 88 | #define PT_R0 0 | ||
| 89 | #define PT_R1 1 | ||
| 90 | #define PT_R2 2 | ||
| 91 | #define PT_R3 3 | ||
| 92 | #define PT_R4 4 | ||
| 93 | #define PT_R5 5 | ||
| 94 | #define PT_R6 6 | ||
| 95 | #define PT_R7 7 | ||
| 96 | #define PT_R8 8 | ||
| 97 | #define PT_R9 9 | ||
| 98 | #define PT_R10 10 | ||
| 99 | #define PT_R11 11 | ||
| 100 | #define PT_R12 12 | ||
| 101 | #define PT_R13 13 | ||
| 102 | #define PT_R14 14 | ||
| 103 | #define PT_R15 15 | ||
| 104 | #define PT_R16 16 | ||
| 105 | #define PT_R17 17 | ||
| 106 | #define PT_R18 18 | ||
| 107 | #define PT_R19 19 | ||
| 108 | #define PT_R20 20 | ||
| 109 | #define PT_R21 21 | ||
| 110 | #define PT_R22 22 | ||
| 111 | #define PT_R23 23 | ||
| 112 | #define PT_R24 24 | ||
| 113 | #define PT_R25 25 | ||
| 114 | #define PT_R26 26 | ||
| 115 | #define PT_R27 27 | ||
| 116 | #define PT_R28 28 | ||
| 117 | #define PT_R29 29 | ||
| 118 | #define PT_R30 30 | ||
| 119 | #define PT_R31 31 | ||
| 120 | |||
| 121 | #define PT_NIP 32 | ||
| 122 | #define PT_MSR 33 | ||
| 123 | #ifdef __KERNEL__ | ||
| 124 | #define PT_ORIG_R3 34 | ||
| 125 | #endif | ||
| 126 | #define PT_CTR 35 | ||
| 127 | #define PT_LNK 36 | ||
| 128 | #define PT_XER 37 | ||
| 129 | #define PT_CCR 38 | ||
| 130 | #define PT_MQ 39 | ||
| 131 | |||
| 132 | #define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ | ||
| 133 | #define PT_FPR31 (PT_FPR0 + 2*31) | ||
| 134 | #define PT_FPSCR (PT_FPR0 + 2*32 + 1) | ||
| 135 | |||
| 136 | /* Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go */ | ||
| 137 | #define PTRACE_GETVRREGS 18 | ||
| 138 | #define PTRACE_SETVRREGS 19 | ||
| 139 | |||
| 140 | /* Get/set all the upper 32-bits of the SPE registers, accumulator, and | ||
| 141 | * spefscr, in one go */ | ||
| 142 | #define PTRACE_GETEVRREGS 20 | ||
| 143 | #define PTRACE_SETEVRREGS 21 | ||
| 144 | |||
| 145 | /* | ||
| 146 | * Get or set a debug register. The first 16 are DABR registers and the | ||
| 147 | * second 16 are IABR registers. | ||
| 148 | */ | ||
| 149 | #define PTRACE_GET_DEBUGREG 25 | ||
| 150 | #define PTRACE_SET_DEBUGREG 26 | ||
| 151 | |||
| 152 | #endif | ||
diff --git a/include/asm-ppc/sigcontext.h b/include/asm-ppc/sigcontext.h deleted file mode 100644 index b7a417e0a921..000000000000 --- a/include/asm-ppc/sigcontext.h +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | #ifndef _ASM_PPC_SIGCONTEXT_H | ||
| 2 | #define _ASM_PPC_SIGCONTEXT_H | ||
| 3 | |||
| 4 | #include <asm/ptrace.h> | ||
| 5 | #include <linux/compiler.h> | ||
| 6 | |||
| 7 | struct sigcontext { | ||
| 8 | unsigned long _unused[4]; | ||
| 9 | int signal; | ||
| 10 | unsigned long handler; | ||
| 11 | unsigned long oldmask; | ||
| 12 | struct pt_regs __user *regs; | ||
| 13 | }; | ||
| 14 | |||
| 15 | #endif | ||
diff --git a/include/asm-ppc/stat.h b/include/asm-ppc/stat.h deleted file mode 100644 index cadb34298496..000000000000 --- a/include/asm-ppc/stat.h +++ /dev/null | |||
| @@ -1,69 +0,0 @@ | |||
| 1 | #ifndef _PPC_STAT_H | ||
| 2 | #define _PPC_STAT_H | ||
| 3 | |||
| 4 | #ifdef __KERNEL__ | ||
| 5 | #include <linux/types.h> | ||
| 6 | #endif /* __KERNEL__ */ | ||
| 7 | |||
| 8 | struct __old_kernel_stat { | ||
| 9 | unsigned short st_dev; | ||
| 10 | unsigned short st_ino; | ||
| 11 | unsigned short st_mode; | ||
| 12 | unsigned short st_nlink; | ||
| 13 | unsigned short st_uid; | ||
| 14 | unsigned short st_gid; | ||
| 15 | unsigned short st_rdev; | ||
| 16 | unsigned long st_size; | ||
| 17 | unsigned long st_atime; | ||
| 18 | unsigned long st_mtime; | ||
| 19 | unsigned long st_ctime; | ||
| 20 | }; | ||
| 21 | |||
| 22 | #define STAT_HAVE_NSEC 1 | ||
| 23 | |||
| 24 | struct stat { | ||
| 25 | unsigned st_dev; | ||
| 26 | ino_t st_ino; | ||
| 27 | mode_t st_mode; | ||
| 28 | nlink_t st_nlink; | ||
| 29 | uid_t st_uid; | ||
| 30 | gid_t st_gid; | ||
| 31 | unsigned st_rdev; | ||
| 32 | off_t st_size; | ||
| 33 | unsigned long st_blksize; | ||
| 34 | unsigned long st_blocks; | ||
| 35 | unsigned long st_atime; | ||
| 36 | unsigned long st_atime_nsec; | ||
| 37 | unsigned long st_mtime; | ||
| 38 | unsigned long st_mtime_nsec; | ||
| 39 | unsigned long st_ctime; | ||
| 40 | unsigned long st_ctime_nsec; | ||
| 41 | unsigned long __unused4; | ||
| 42 | unsigned long __unused5; | ||
| 43 | }; | ||
| 44 | |||
| 45 | /* This matches struct stat64 in glibc2.1. | ||
| 46 | */ | ||
| 47 | struct stat64 { | ||
| 48 | unsigned long long st_dev; /* Device. */ | ||
| 49 | unsigned long long st_ino; /* File serial number. */ | ||
| 50 | unsigned int st_mode; /* File mode. */ | ||
| 51 | unsigned int st_nlink; /* Link count. */ | ||
| 52 | unsigned int st_uid; /* User ID of the file's owner. */ | ||
| 53 | unsigned int st_gid; /* Group ID of the file's group. */ | ||
| 54 | unsigned long long st_rdev; /* Device number, if device. */ | ||
| 55 | unsigned short int __pad2; | ||
| 56 | long long st_size; /* Size of file, in bytes. */ | ||
| 57 | long st_blksize; /* Optimal block size for I/O. */ | ||
| 58 | |||
| 59 | long long st_blocks; /* Number 512-byte blocks allocated. */ | ||
| 60 | long st_atime; /* Time of last access. */ | ||
| 61 | unsigned long st_atime_nsec; | ||
| 62 | long st_mtime; /* Time of last modification. */ | ||
| 63 | unsigned long int st_mtime_nsec; | ||
| 64 | long st_ctime; /* Time of last status change. */ | ||
| 65 | unsigned long int st_ctime_nsec; | ||
| 66 | unsigned long int __unused4; | ||
| 67 | unsigned long int __unused5; | ||
| 68 | }; | ||
| 69 | #endif | ||
diff --git a/include/asm-ppc/ucontext.h b/include/asm-ppc/ucontext.h deleted file mode 100644 index 664bc984d51f..000000000000 --- a/include/asm-ppc/ucontext.h +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | #ifndef _ASMPPC_UCONTEXT_H | ||
| 2 | #define _ASMPPC_UCONTEXT_H | ||
| 3 | |||
| 4 | #include <asm/elf.h> | ||
| 5 | #include <asm/signal.h> | ||
| 6 | |||
| 7 | struct mcontext { | ||
| 8 | elf_gregset_t mc_gregs; | ||
| 9 | elf_fpregset_t mc_fregs; | ||
| 10 | unsigned long mc_pad[2]; | ||
| 11 | elf_vrregset_t mc_vregs __attribute__((__aligned__(16))); | ||
| 12 | }; | ||
| 13 | |||
| 14 | struct ucontext { | ||
| 15 | unsigned long uc_flags; | ||
| 16 | struct ucontext __user *uc_link; | ||
| 17 | stack_t uc_stack; | ||
| 18 | int uc_pad[7]; | ||
| 19 | struct mcontext __user *uc_regs;/* points to uc_mcontext field */ | ||
| 20 | sigset_t uc_sigmask; | ||
| 21 | /* glibc has 1024-bit signal masks, ours are 64-bit */ | ||
| 22 | int uc_maskext[30]; | ||
| 23 | int uc_pad2[3]; | ||
| 24 | struct mcontext uc_mcontext; | ||
| 25 | }; | ||
| 26 | |||
| 27 | #endif /* !_ASMPPC_UCONTEXT_H */ | ||
