Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _PPC64_PPC32_H |
| 2 | #define _PPC64_PPC32_H |
| 3 | |
| 4 | #include <linux/compat.h> |
| 5 | #include <asm/siginfo.h> |
| 6 | #include <asm/signal.h> |
| 7 | |
| 8 | /* |
| 9 | * Data types and macros for providing 32b PowerPC support. |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or |
| 12 | * modify it under the terms of the GNU General Public License |
| 13 | * as published by the Free Software Foundation; either version |
| 14 | * 2 of the License, or (at your option) any later version. |
| 15 | */ |
| 16 | |
| 17 | /* These are here to support 32-bit syscalls on a 64-bit kernel. */ |
| 18 | |
Stephen Rothwell | da80d46 | 2005-11-03 15:14:36 +1100 | [diff] [blame] | 19 | struct pt_regs32 { |
| 20 | unsigned int gpr[32]; |
| 21 | unsigned int nip; |
| 22 | unsigned int msr; |
| 23 | unsigned int orig_gpr3; /* Used for restarting system calls */ |
| 24 | unsigned int ctr; |
| 25 | unsigned int link; |
| 26 | unsigned int xer; |
| 27 | unsigned int ccr; |
| 28 | unsigned int mq; /* 601 only (not used at present) */ |
| 29 | unsigned int trap; /* Reason for being here */ |
| 30 | unsigned int dar; /* Fault registers */ |
| 31 | unsigned int dsisr; |
| 32 | unsigned int result; /* Result of a system call */ |
| 33 | }; |
| 34 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | struct sigcontext32 { |
| 36 | unsigned int _unused[4]; |
| 37 | int signal; |
Stephen Rothwell | 81e7009 | 2005-10-18 11:17:58 +1000 | [diff] [blame] | 38 | compat_uptr_t handler; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | unsigned int oldmask; |
Stephen Rothwell | 81e7009 | 2005-10-18 11:17:58 +1000 | [diff] [blame] | 40 | compat_uptr_t regs; /* 4 byte pointer to the pt_regs32 structure. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | }; |
| 42 | |
| 43 | struct mcontext32 { |
| 44 | elf_gregset_t32 mc_gregs; |
| 45 | elf_fpregset_t mc_fregs; |
| 46 | unsigned int mc_pad[2]; |
| 47 | elf_vrregset_t32 mc_vregs __attribute__((__aligned__(16))); |
Michael Neuling | ce48b21 | 2008-06-25 14:07:18 +1000 | [diff] [blame] | 48 | elf_vsrreghalf_t32 mc_vsregs __attribute__((__aligned__(16))); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | struct ucontext32 { |
| 52 | unsigned int uc_flags; |
| 53 | unsigned int uc_link; |
Al Viro | 7cce246 | 2012-12-23 03:26:46 -0500 | [diff] [blame] | 54 | compat_stack_t uc_stack; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | int uc_pad[7]; |
Stephen Rothwell | 81e7009 | 2005-10-18 11:17:58 +1000 | [diff] [blame] | 56 | compat_uptr_t uc_regs; /* points to uc_mcontext field */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ |
| 58 | /* glibc has 1024-bit signal masks, ours are 64-bit */ |
| 59 | int uc_maskext[30]; |
| 60 | int uc_pad2[3]; |
| 61 | struct mcontext32 uc_mcontext; |
| 62 | }; |
| 63 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 64 | #endif /* _PPC64_PPC32_H */ |