Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

Pull powerpc uapi disintegration from Benjamin Herrenschmidt.

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
UAPI: (Scripted) Disintegrate arch/powerpc/include/asm

+1705 -1528
-35
arch/powerpc/include/asm/Kbuild
··· 1 - include include/asm-generic/Kbuild.asm 2 1 3 - header-y += auxvec.h 4 - header-y += bootx.h 5 - header-y += byteorder.h 6 - header-y += cputable.h 7 - header-y += elf.h 8 - header-y += errno.h 9 - header-y += fcntl.h 10 - header-y += ioctl.h 11 - header-y += ioctls.h 12 - header-y += ipcbuf.h 13 - header-y += linkage.h 14 - header-y += msgbuf.h 15 - header-y += nvram.h 16 - header-y += param.h 17 - header-y += poll.h 18 - header-y += posix_types.h 19 - header-y += ps3fb.h 20 - header-y += resource.h 21 - header-y += seccomp.h 22 - header-y += sembuf.h 23 - header-y += shmbuf.h 24 - header-y += sigcontext.h 25 - header-y += siginfo.h 26 - header-y += signal.h 27 - header-y += socket.h 28 - header-y += sockios.h 29 - header-y += spu_info.h 30 - header-y += stat.h 31 - header-y += statfs.h 32 - header-y += termbits.h 33 - header-y += termios.h 34 - header-y += types.h 35 - header-y += ucontext.h 36 - header-y += unistd.h 37 2 38 3 generic-y += clkdev.h 39 4 generic-y += rwsem.h
arch/powerpc/include/asm/auxvec.h arch/powerpc/include/uapi/asm/auxvec.h
arch/powerpc/include/asm/bitsperlong.h arch/powerpc/include/uapi/asm/bitsperlong.h
+1 -122
arch/powerpc/include/asm/bootx.h
··· 5 5 * Written by Benjamin Herrenschmidt. 6 6 */ 7 7 8 - 9 8 #ifndef __ASM_BOOTX_H__ 10 9 #define __ASM_BOOTX_H__ 11 10 12 - #include <linux/types.h> 11 + #include <uapi/asm/bootx.h> 13 12 14 - #ifdef macintosh 15 - #include <Types.h> 16 - #include "linux_type_defs.h" 17 - #endif 18 - 19 - #ifdef macintosh 20 - /* All this requires PowerPC alignment */ 21 - #pragma options align=power 22 - #endif 23 - 24 - /* On kernel entry: 25 - * 26 - * r3 = 0x426f6f58 ('BooX') 27 - * r4 = pointer to boot_infos 28 - * r5 = NULL 29 - * 30 - * Data and instruction translation disabled, interrupts 31 - * disabled, kernel loaded at physical 0x00000000 on PCI 32 - * machines (will be different on NuBus). 33 - */ 34 - 35 - #define BOOT_INFO_VERSION 5 36 - #define BOOT_INFO_COMPATIBLE_VERSION 1 37 - 38 - /* Bit in the architecture flag mask. More to be defined in 39 - future versions. Note that either BOOT_ARCH_PCI or 40 - BOOT_ARCH_NUBUS is set. The other BOOT_ARCH_NUBUS_xxx are 41 - set additionally when BOOT_ARCH_NUBUS is set. 42 - */ 43 - #define BOOT_ARCH_PCI 0x00000001UL 44 - #define BOOT_ARCH_NUBUS 0x00000002UL 45 - #define BOOT_ARCH_NUBUS_PDM 0x00000010UL 46 - #define BOOT_ARCH_NUBUS_PERFORMA 0x00000020UL 47 - #define BOOT_ARCH_NUBUS_POWERBOOK 0x00000040UL 48 - 49 - /* Maximum number of ranges in phys memory map */ 50 - #define MAX_MEM_MAP_SIZE 26 51 - 52 - /* This is the format of an element in the physical memory map. Note that 53 - the map is optional and current BootX will only build it for pre-PCI 54 - machines */ 55 - typedef struct boot_info_map_entry 56 - { 57 - __u32 physAddr; /* Physical starting address */ 58 - __u32 size; /* Size in bytes */ 59 - } boot_info_map_entry_t; 60 - 61 - 62 - /* Here are the boot informations that are passed to the bootstrap 63 - * Note that the kernel arguments and the device tree are appended 64 - * at the end of this structure. */ 65 - typedef struct boot_infos 66 - { 67 - /* Version of this structure */ 68 - __u32 version; 69 - /* backward compatible down to version: */ 70 - __u32 compatible_version; 71 - 72 - /* NEW (vers. 2) this holds the current _logical_ base addr of 73 - the frame buffer (for use by early boot message) */ 74 - __u8* logicalDisplayBase; 75 - 76 - /* NEW (vers. 4) Apple's machine identification */ 77 - __u32 machineID; 78 - 79 - /* NEW (vers. 4) Detected hw architecture */ 80 - __u32 architecture; 81 - 82 - /* The device tree (internal addresses relative to the beginning of the tree, 83 - * device tree offset relative to the beginning of this structure). 84 - * On pre-PCI macintosh (BOOT_ARCH_PCI bit set to 0 in architecture), this 85 - * field is 0. 86 - */ 87 - __u32 deviceTreeOffset; /* Device tree offset */ 88 - __u32 deviceTreeSize; /* Size of the device tree */ 89 - 90 - /* Some infos about the current MacOS display */ 91 - __u32 dispDeviceRect[4]; /* left,top,right,bottom */ 92 - __u32 dispDeviceDepth; /* (8, 16 or 32) */ 93 - __u8* dispDeviceBase; /* base address (physical) */ 94 - __u32 dispDeviceRowBytes; /* rowbytes (in bytes) */ 95 - __u32 dispDeviceColorsOffset; /* Colormap (8 bits only) or 0 (*) */ 96 - /* Optional offset in the registry to the current 97 - * MacOS display. (Can be 0 when not detected) */ 98 - __u32 dispDeviceRegEntryOffset; 99 - 100 - /* Optional pointer to boot ramdisk (offset from this structure) */ 101 - __u32 ramDisk; 102 - __u32 ramDiskSize; /* size of ramdisk image */ 103 - 104 - /* Kernel command line arguments (offset from this structure) */ 105 - __u32 kernelParamsOffset; 106 - 107 - /* ALL BELOW NEW (vers. 4) */ 108 - 109 - /* This defines the physical memory. Valid with BOOT_ARCH_NUBUS flag 110 - (non-PCI) only. On PCI, memory is contiguous and it's size is in the 111 - device-tree. */ 112 - boot_info_map_entry_t 113 - physMemoryMap[MAX_MEM_MAP_SIZE]; /* Where the phys memory is */ 114 - __u32 physMemoryMapSize; /* How many entries in map */ 115 - 116 - 117 - /* The framebuffer size (optional, currently 0) */ 118 - __u32 frameBufferSize; /* Represents a max size, can be 0. */ 119 - 120 - /* NEW (vers. 5) */ 121 - 122 - /* Total params size (args + colormap + device tree + ramdisk) */ 123 - __u32 totalParamsSize; 124 - 125 - } boot_infos_t; 126 - 127 - #ifdef __KERNEL__ 128 13 /* (*) The format of the colormap is 256 * 3 * 2 bytes. Each color index 129 14 * is represented by 3 short words containing a 16 bits (unsigned) color 130 15 * component. Later versions may contain the gamma table for direct-color ··· 46 161 }; 47 162 48 163 extern void bootx_init(unsigned long r4, unsigned long phys); 49 - 50 - #endif /* __KERNEL__ */ 51 - 52 - #ifdef macintosh 53 - #pragma options align=reset 54 - #endif 55 164 56 165 #endif
arch/powerpc/include/asm/byteorder.h arch/powerpc/include/uapi/asm/byteorder.h
+1 -34
arch/powerpc/include/asm/cputable.h
··· 1 1 #ifndef __ASM_POWERPC_CPUTABLE_H 2 2 #define __ASM_POWERPC_CPUTABLE_H 3 3 4 - #define PPC_FEATURE_32 0x80000000 5 - #define PPC_FEATURE_64 0x40000000 6 - #define PPC_FEATURE_601_INSTR 0x20000000 7 - #define PPC_FEATURE_HAS_ALTIVEC 0x10000000 8 - #define PPC_FEATURE_HAS_FPU 0x08000000 9 - #define PPC_FEATURE_HAS_MMU 0x04000000 10 - #define PPC_FEATURE_HAS_4xxMAC 0x02000000 11 - #define PPC_FEATURE_UNIFIED_CACHE 0x01000000 12 - #define PPC_FEATURE_HAS_SPE 0x00800000 13 - #define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 14 - #define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 15 - #define PPC_FEATURE_NO_TB 0x00100000 16 - #define PPC_FEATURE_POWER4 0x00080000 17 - #define PPC_FEATURE_POWER5 0x00040000 18 - #define PPC_FEATURE_POWER5_PLUS 0x00020000 19 - #define PPC_FEATURE_CELL 0x00010000 20 - #define PPC_FEATURE_BOOKE 0x00008000 21 - #define PPC_FEATURE_SMT 0x00004000 22 - #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 23 - #define PPC_FEATURE_ARCH_2_05 0x00001000 24 - #define PPC_FEATURE_PA6T 0x00000800 25 - #define PPC_FEATURE_HAS_DFP 0x00000400 26 - #define PPC_FEATURE_POWER6_EXT 0x00000200 27 - #define PPC_FEATURE_ARCH_2_06 0x00000100 28 - #define PPC_FEATURE_HAS_VSX 0x00000080 29 - 30 - #define PPC_FEATURE_PSERIES_PERFMON_COMPAT \ 31 - 0x00000040 32 - 33 - #define PPC_FEATURE_TRUE_LE 0x00000002 34 - #define PPC_FEATURE_PPC_LE 0x00000001 35 - 36 - #ifdef __KERNEL__ 37 4 38 5 #include <asm/asm-compat.h> 39 6 #include <asm/feature-fixups.h> 7 + #include <uapi/asm/cputable.h> 40 8 41 9 #ifndef __ASSEMBLY__ 42 10 ··· 525 557 526 558 #endif /* !__ASSEMBLY__ */ 527 559 528 - #endif /* __KERNEL__ */ 529 560 #endif /* __ASM_POWERPC_CPUTABLE_H */
+6 -305
arch/powerpc/include/asm/elf.h
··· 1 - #ifndef _ASM_POWERPC_ELF_H 2 - #define _ASM_POWERPC_ELF_H 3 - 4 - #ifdef __KERNEL__ 5 - #include <linux/sched.h> /* for task_struct */ 6 - #include <asm/page.h> 7 - #include <asm/string.h> 8 - #endif 9 - 10 - #include <linux/types.h> 11 - 12 - #include <asm/ptrace.h> 13 - #include <asm/cputable.h> 14 - #include <asm/auxvec.h> 15 - 16 - /* PowerPC relocations defined by the ABIs */ 17 - #define R_PPC_NONE 0 18 - #define R_PPC_ADDR32 1 /* 32bit absolute address */ 19 - #define R_PPC_ADDR24 2 /* 26bit address, 2 bits ignored. */ 20 - #define R_PPC_ADDR16 3 /* 16bit absolute address */ 21 - #define R_PPC_ADDR16_LO 4 /* lower 16bit of absolute address */ 22 - #define R_PPC_ADDR16_HI 5 /* high 16bit of absolute address */ 23 - #define R_PPC_ADDR16_HA 6 /* adjusted high 16bit */ 24 - #define R_PPC_ADDR14 7 /* 16bit address, 2 bits ignored */ 25 - #define R_PPC_ADDR14_BRTAKEN 8 26 - #define R_PPC_ADDR14_BRNTAKEN 9 27 - #define R_PPC_REL24 10 /* PC relative 26 bit */ 28 - #define R_PPC_REL14 11 /* PC relative 16 bit */ 29 - #define R_PPC_REL14_BRTAKEN 12 30 - #define R_PPC_REL14_BRNTAKEN 13 31 - #define R_PPC_GOT16 14 32 - #define R_PPC_GOT16_LO 15 33 - #define R_PPC_GOT16_HI 16 34 - #define R_PPC_GOT16_HA 17 35 - #define R_PPC_PLTREL24 18 36 - #define R_PPC_COPY 19 37 - #define R_PPC_GLOB_DAT 20 38 - #define R_PPC_JMP_SLOT 21 39 - #define R_PPC_RELATIVE 22 40 - #define R_PPC_LOCAL24PC 23 41 - #define R_PPC_UADDR32 24 42 - #define R_PPC_UADDR16 25 43 - #define R_PPC_REL32 26 44 - #define R_PPC_PLT32 27 45 - #define R_PPC_PLTREL32 28 46 - #define R_PPC_PLT16_LO 29 47 - #define R_PPC_PLT16_HI 30 48 - #define R_PPC_PLT16_HA 31 49 - #define R_PPC_SDAREL16 32 50 - #define R_PPC_SECTOFF 33 51 - #define R_PPC_SECTOFF_LO 34 52 - #define R_PPC_SECTOFF_HI 35 53 - #define R_PPC_SECTOFF_HA 36 54 - 55 - /* PowerPC relocations defined for the TLS access ABI. */ 56 - #define R_PPC_TLS 67 /* none (sym+add)@tls */ 57 - #define R_PPC_DTPMOD32 68 /* word32 (sym+add)@dtpmod */ 58 - #define R_PPC_TPREL16 69 /* half16* (sym+add)@tprel */ 59 - #define R_PPC_TPREL16_LO 70 /* half16 (sym+add)@tprel@l */ 60 - #define R_PPC_TPREL16_HI 71 /* half16 (sym+add)@tprel@h */ 61 - #define R_PPC_TPREL16_HA 72 /* half16 (sym+add)@tprel@ha */ 62 - #define R_PPC_TPREL32 73 /* word32 (sym+add)@tprel */ 63 - #define R_PPC_DTPREL16 74 /* half16* (sym+add)@dtprel */ 64 - #define R_PPC_DTPREL16_LO 75 /* half16 (sym+add)@dtprel@l */ 65 - #define R_PPC_DTPREL16_HI 76 /* half16 (sym+add)@dtprel@h */ 66 - #define R_PPC_DTPREL16_HA 77 /* half16 (sym+add)@dtprel@ha */ 67 - #define R_PPC_DTPREL32 78 /* word32 (sym+add)@dtprel */ 68 - #define R_PPC_GOT_TLSGD16 79 /* half16* (sym+add)@got@tlsgd */ 69 - #define R_PPC_GOT_TLSGD16_LO 80 /* half16 (sym+add)@got@tlsgd@l */ 70 - #define R_PPC_GOT_TLSGD16_HI 81 /* half16 (sym+add)@got@tlsgd@h */ 71 - #define R_PPC_GOT_TLSGD16_HA 82 /* half16 (sym+add)@got@tlsgd@ha */ 72 - #define R_PPC_GOT_TLSLD16 83 /* half16* (sym+add)@got@tlsld */ 73 - #define R_PPC_GOT_TLSLD16_LO 84 /* half16 (sym+add)@got@tlsld@l */ 74 - #define R_PPC_GOT_TLSLD16_HI 85 /* half16 (sym+add)@got@tlsld@h */ 75 - #define R_PPC_GOT_TLSLD16_HA 86 /* half16 (sym+add)@got@tlsld@ha */ 76 - #define R_PPC_GOT_TPREL16 87 /* half16* (sym+add)@got@tprel */ 77 - #define R_PPC_GOT_TPREL16_LO 88 /* half16 (sym+add)@got@tprel@l */ 78 - #define R_PPC_GOT_TPREL16_HI 89 /* half16 (sym+add)@got@tprel@h */ 79 - #define R_PPC_GOT_TPREL16_HA 90 /* half16 (sym+add)@got@tprel@ha */ 80 - #define R_PPC_GOT_DTPREL16 91 /* half16* (sym+add)@got@dtprel */ 81 - #define R_PPC_GOT_DTPREL16_LO 92 /* half16* (sym+add)@got@dtprel@l */ 82 - #define R_PPC_GOT_DTPREL16_HI 93 /* half16* (sym+add)@got@dtprel@h */ 83 - #define R_PPC_GOT_DTPREL16_HA 94 /* half16* (sym+add)@got@dtprel@ha */ 84 - 85 - /* keep this the last entry. */ 86 - #define R_PPC_NUM 95 87 - 88 1 /* 89 2 * ELF register definitions.. 90 3 * ··· 6 93 * as published by the Free Software Foundation; either version 7 94 * 2 of the License, or (at your option) any later version. 8 95 */ 96 + #ifndef _ASM_POWERPC_ELF_H 97 + #define _ASM_POWERPC_ELF_H 9 98 10 - #define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ 11 - #define ELF_NFPREG 33 /* includes fpscr */ 99 + #include <linux/sched.h> /* for task_struct */ 100 + #include <asm/page.h> 101 + #include <asm/string.h> 102 + #include <uapi/asm/elf.h> 12 103 13 - typedef unsigned long elf_greg_t64; 14 - typedef elf_greg_t64 elf_gregset_t64[ELF_NGREG]; 15 - 16 - typedef unsigned int elf_greg_t32; 17 - typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG]; 18 - typedef elf_gregset_t32 compat_elf_gregset_t; 19 - 20 - /* 21 - * ELF_ARCH, CLASS, and DATA are used to set parameters in the core dumps. 22 - */ 23 - #ifdef __powerpc64__ 24 - # define ELF_NVRREG32 33 /* includes vscr & vrsave stuffed together */ 25 - # define ELF_NVRREG 34 /* includes vscr & vrsave in split vectors */ 26 - # define ELF_NVSRHALFREG 32 /* Half the vsx registers */ 27 - # define ELF_GREG_TYPE elf_greg_t64 28 - #else 29 - # define ELF_NEVRREG 34 /* includes acc (as 2) */ 30 - # define ELF_NVRREG 33 /* includes vscr */ 31 - # define ELF_GREG_TYPE elf_greg_t32 32 - # define ELF_ARCH EM_PPC 33 - # define ELF_CLASS ELFCLASS32 34 - # define ELF_DATA ELFDATA2MSB 35 - #endif /* __powerpc64__ */ 36 - 37 - #ifndef ELF_ARCH 38 - # define ELF_ARCH EM_PPC64 39 - # define ELF_CLASS ELFCLASS64 40 - # define ELF_DATA ELFDATA2MSB 41 - typedef elf_greg_t64 elf_greg_t; 42 - typedef elf_gregset_t64 elf_gregset_t; 43 - #else 44 - /* Assumption: ELF_ARCH == EM_PPC and ELF_CLASS == ELFCLASS32 */ 45 - typedef elf_greg_t32 elf_greg_t; 46 - typedef elf_gregset_t32 elf_gregset_t; 47 - #endif /* ELF_ARCH */ 48 - 49 - /* Floating point registers */ 50 - typedef double elf_fpreg_t; 51 - typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; 52 - 53 - /* Altivec registers */ 54 - /* 55 - * The entries with indexes 0-31 contain the corresponding vector registers. 56 - * The entry with index 32 contains the vscr as the last word (offset 12) 57 - * within the quadword. This allows the vscr to be stored as either a 58 - * quadword (since it must be copied via a vector register to/from storage) 59 - * or as a word. 60 - * 61 - * 64-bit kernel notes: The entry at index 33 contains the vrsave as the first 62 - * word (offset 0) within the quadword. 63 - * 64 - * This definition of the VMX state is compatible with the current PPC32 65 - * ptrace interface. This allows signal handling and ptrace to use the same 66 - * structures. This also simplifies the implementation of a bi-arch 67 - * (combined (32- and 64-bit) gdb. 68 - * 69 - * Note that it's _not_ compatible with 32 bits ucontext which stuffs the 70 - * vrsave along with vscr and so only uses 33 vectors for the register set 71 - */ 72 - typedef __vector128 elf_vrreg_t; 73 - typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; 74 - #ifdef __powerpc64__ 75 - typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32]; 76 - typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG]; 77 - #endif 78 - 79 - #ifdef __KERNEL__ 80 104 /* 81 105 * This is used to ensure we don't load something for the wrong architecture. 82 106 */ ··· 127 277 extern unsigned long arch_randomize_brk(struct mm_struct *mm); 128 278 #define arch_randomize_brk arch_randomize_brk 129 279 130 - #endif /* __KERNEL__ */ 131 - 132 - /* 133 - * The requirements here are: 134 - * - keep the final alignment of sp (sp & 0xf) 135 - * - make sure the 32-bit value at the first 16 byte aligned position of 136 - * AUXV is greater than 16 for glibc compatibility. 137 - * AT_IGNOREPPC is used for that. 138 - * - for compatibility with glibc ARCH_DLINFO must always be defined on PPC, 139 - * even if DLINFO_ARCH_ITEMS goes to zero or is undefined. 140 - * update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes 141 - */ 142 - #define ARCH_DLINFO \ 143 - do { \ 144 - /* Handle glibc compatibility. */ \ 145 - NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \ 146 - NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \ 147 - /* Cache size items */ \ 148 - NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize); \ 149 - NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize); \ 150 - NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize); \ 151 - VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->mm->context.vdso_base); \ 152 - } while (0) 153 - 154 - /* PowerPC64 relocations defined by the ABIs */ 155 - #define R_PPC64_NONE R_PPC_NONE 156 - #define R_PPC64_ADDR32 R_PPC_ADDR32 /* 32bit absolute address. */ 157 - #define R_PPC64_ADDR24 R_PPC_ADDR24 /* 26bit address, word aligned. */ 158 - #define R_PPC64_ADDR16 R_PPC_ADDR16 /* 16bit absolute address. */ 159 - #define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO /* lower 16bits of abs. address. */ 160 - #define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI /* high 16bits of abs. address. */ 161 - #define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA /* adjusted high 16bits. */ 162 - #define R_PPC64_ADDR14 R_PPC_ADDR14 /* 16bit address, word aligned. */ 163 - #define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN 164 - #define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN 165 - #define R_PPC64_REL24 R_PPC_REL24 /* PC relative 26 bit, word aligned. */ 166 - #define R_PPC64_REL14 R_PPC_REL14 /* PC relative 16 bit. */ 167 - #define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN 168 - #define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN 169 - #define R_PPC64_GOT16 R_PPC_GOT16 170 - #define R_PPC64_GOT16_LO R_PPC_GOT16_LO 171 - #define R_PPC64_GOT16_HI R_PPC_GOT16_HI 172 - #define R_PPC64_GOT16_HA R_PPC_GOT16_HA 173 - 174 - #define R_PPC64_COPY R_PPC_COPY 175 - #define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT 176 - #define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT 177 - #define R_PPC64_RELATIVE R_PPC_RELATIVE 178 - 179 - #define R_PPC64_UADDR32 R_PPC_UADDR32 180 - #define R_PPC64_UADDR16 R_PPC_UADDR16 181 - #define R_PPC64_REL32 R_PPC_REL32 182 - #define R_PPC64_PLT32 R_PPC_PLT32 183 - #define R_PPC64_PLTREL32 R_PPC_PLTREL32 184 - #define R_PPC64_PLT16_LO R_PPC_PLT16_LO 185 - #define R_PPC64_PLT16_HI R_PPC_PLT16_HI 186 - #define R_PPC64_PLT16_HA R_PPC_PLT16_HA 187 - 188 - #define R_PPC64_SECTOFF R_PPC_SECTOFF 189 - #define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO 190 - #define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI 191 - #define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA 192 - #define R_PPC64_ADDR30 37 /* word30 (S + A - P) >> 2. */ 193 - #define R_PPC64_ADDR64 38 /* doubleword64 S + A. */ 194 - #define R_PPC64_ADDR16_HIGHER 39 /* half16 #higher(S + A). */ 195 - #define R_PPC64_ADDR16_HIGHERA 40 /* half16 #highera(S + A). */ 196 - #define R_PPC64_ADDR16_HIGHEST 41 /* half16 #highest(S + A). */ 197 - #define R_PPC64_ADDR16_HIGHESTA 42 /* half16 #highesta(S + A). */ 198 - #define R_PPC64_UADDR64 43 /* doubleword64 S + A. */ 199 - #define R_PPC64_REL64 44 /* doubleword64 S + A - P. */ 200 - #define R_PPC64_PLT64 45 /* doubleword64 L + A. */ 201 - #define R_PPC64_PLTREL64 46 /* doubleword64 L + A - P. */ 202 - #define R_PPC64_TOC16 47 /* half16* S + A - .TOC. */ 203 - #define R_PPC64_TOC16_LO 48 /* half16 #lo(S + A - .TOC.). */ 204 - #define R_PPC64_TOC16_HI 49 /* half16 #hi(S + A - .TOC.). */ 205 - #define R_PPC64_TOC16_HA 50 /* half16 #ha(S + A - .TOC.). */ 206 - #define R_PPC64_TOC 51 /* doubleword64 .TOC. */ 207 - #define R_PPC64_PLTGOT16 52 /* half16* M + A. */ 208 - #define R_PPC64_PLTGOT16_LO 53 /* half16 #lo(M + A). */ 209 - #define R_PPC64_PLTGOT16_HI 54 /* half16 #hi(M + A). */ 210 - #define R_PPC64_PLTGOT16_HA 55 /* half16 #ha(M + A). */ 211 - 212 - #define R_PPC64_ADDR16_DS 56 /* half16ds* (S + A) >> 2. */ 213 - #define R_PPC64_ADDR16_LO_DS 57 /* half16ds #lo(S + A) >> 2. */ 214 - #define R_PPC64_GOT16_DS 58 /* half16ds* (G + A) >> 2. */ 215 - #define R_PPC64_GOT16_LO_DS 59 /* half16ds #lo(G + A) >> 2. */ 216 - #define R_PPC64_PLT16_LO_DS 60 /* half16ds #lo(L + A) >> 2. */ 217 - #define R_PPC64_SECTOFF_DS 61 /* half16ds* (R + A) >> 2. */ 218 - #define R_PPC64_SECTOFF_LO_DS 62 /* half16ds #lo(R + A) >> 2. */ 219 - #define R_PPC64_TOC16_DS 63 /* half16ds* (S + A - .TOC.) >> 2. */ 220 - #define R_PPC64_TOC16_LO_DS 64 /* half16ds #lo(S + A - .TOC.) >> 2. */ 221 - #define R_PPC64_PLTGOT16_DS 65 /* half16ds* (M + A) >> 2. */ 222 - #define R_PPC64_PLTGOT16_LO_DS 66 /* half16ds #lo(M + A) >> 2. */ 223 - 224 - /* PowerPC64 relocations defined for the TLS access ABI. */ 225 - #define R_PPC64_TLS 67 /* none (sym+add)@tls */ 226 - #define R_PPC64_DTPMOD64 68 /* doubleword64 (sym+add)@dtpmod */ 227 - #define R_PPC64_TPREL16 69 /* half16* (sym+add)@tprel */ 228 - #define R_PPC64_TPREL16_LO 70 /* half16 (sym+add)@tprel@l */ 229 - #define R_PPC64_TPREL16_HI 71 /* half16 (sym+add)@tprel@h */ 230 - #define R_PPC64_TPREL16_HA 72 /* half16 (sym+add)@tprel@ha */ 231 - #define R_PPC64_TPREL64 73 /* doubleword64 (sym+add)@tprel */ 232 - #define R_PPC64_DTPREL16 74 /* half16* (sym+add)@dtprel */ 233 - #define R_PPC64_DTPREL16_LO 75 /* half16 (sym+add)@dtprel@l */ 234 - #define R_PPC64_DTPREL16_HI 76 /* half16 (sym+add)@dtprel@h */ 235 - #define R_PPC64_DTPREL16_HA 77 /* half16 (sym+add)@dtprel@ha */ 236 - #define R_PPC64_DTPREL64 78 /* doubleword64 (sym+add)@dtprel */ 237 - #define R_PPC64_GOT_TLSGD16 79 /* half16* (sym+add)@got@tlsgd */ 238 - #define R_PPC64_GOT_TLSGD16_LO 80 /* half16 (sym+add)@got@tlsgd@l */ 239 - #define R_PPC64_GOT_TLSGD16_HI 81 /* half16 (sym+add)@got@tlsgd@h */ 240 - #define R_PPC64_GOT_TLSGD16_HA 82 /* half16 (sym+add)@got@tlsgd@ha */ 241 - #define R_PPC64_GOT_TLSLD16 83 /* half16* (sym+add)@got@tlsld */ 242 - #define R_PPC64_GOT_TLSLD16_LO 84 /* half16 (sym+add)@got@tlsld@l */ 243 - #define R_PPC64_GOT_TLSLD16_HI 85 /* half16 (sym+add)@got@tlsld@h */ 244 - #define R_PPC64_GOT_TLSLD16_HA 86 /* half16 (sym+add)@got@tlsld@ha */ 245 - #define R_PPC64_GOT_TPREL16_DS 87 /* half16ds* (sym+add)@got@tprel */ 246 - #define R_PPC64_GOT_TPREL16_LO_DS 88 /* half16ds (sym+add)@got@tprel@l */ 247 - #define R_PPC64_GOT_TPREL16_HI 89 /* half16 (sym+add)@got@tprel@h */ 248 - #define R_PPC64_GOT_TPREL16_HA 90 /* half16 (sym+add)@got@tprel@ha */ 249 - #define R_PPC64_GOT_DTPREL16_DS 91 /* half16ds* (sym+add)@got@dtprel */ 250 - #define R_PPC64_GOT_DTPREL16_LO_DS 92 /* half16ds (sym+add)@got@dtprel@l */ 251 - #define R_PPC64_GOT_DTPREL16_HI 93 /* half16 (sym+add)@got@dtprel@h */ 252 - #define R_PPC64_GOT_DTPREL16_HA 94 /* half16 (sym+add)@got@dtprel@ha */ 253 - #define R_PPC64_TPREL16_DS 95 /* half16ds* (sym+add)@tprel */ 254 - #define R_PPC64_TPREL16_LO_DS 96 /* half16ds (sym+add)@tprel@l */ 255 - #define R_PPC64_TPREL16_HIGHER 97 /* half16 (sym+add)@tprel@higher */ 256 - #define R_PPC64_TPREL16_HIGHERA 98 /* half16 (sym+add)@tprel@highera */ 257 - #define R_PPC64_TPREL16_HIGHEST 99 /* half16 (sym+add)@tprel@highest */ 258 - #define R_PPC64_TPREL16_HIGHESTA 100 /* half16 (sym+add)@tprel@highesta */ 259 - #define R_PPC64_DTPREL16_DS 101 /* half16ds* (sym+add)@dtprel */ 260 - #define R_PPC64_DTPREL16_LO_DS 102 /* half16ds (sym+add)@dtprel@l */ 261 - #define R_PPC64_DTPREL16_HIGHER 103 /* half16 (sym+add)@dtprel@higher */ 262 - #define R_PPC64_DTPREL16_HIGHERA 104 /* half16 (sym+add)@dtprel@highera */ 263 - #define R_PPC64_DTPREL16_HIGHEST 105 /* half16 (sym+add)@dtprel@highest */ 264 - #define R_PPC64_DTPREL16_HIGHESTA 106 /* half16 (sym+add)@dtprel@highesta */ 265 - 266 - /* Keep this the last entry. */ 267 - #define R_PPC64_NUM 107 268 - 269 - /* There's actually a third entry here, but it's unused */ 270 - struct ppc64_opd_entry 271 - { 272 - unsigned long funcaddr; 273 - unsigned long r2; 274 - }; 275 - 276 - #ifdef __KERNEL__ 277 280 278 281 #ifdef CONFIG_SPU_BASE 279 282 /* Notes used in ET_CORE. Note name is "SPU/<fd>/<filename>". */ ··· 135 432 #define ARCH_HAVE_EXTRA_ELF_NOTES 136 433 137 434 #endif /* CONFIG_SPU_BASE */ 138 - 139 - #endif /* __KERNEL */ 140 435 141 436 #endif /* _ASM_POWERPC_ELF_H */
arch/powerpc/include/asm/errno.h arch/powerpc/include/uapi/asm/errno.h
arch/powerpc/include/asm/fcntl.h arch/powerpc/include/uapi/asm/fcntl.h
arch/powerpc/include/asm/ioctl.h arch/powerpc/include/uapi/asm/ioctl.h
arch/powerpc/include/asm/ioctls.h arch/powerpc/include/uapi/asm/ioctls.h
arch/powerpc/include/asm/ipcbuf.h arch/powerpc/include/uapi/asm/ipcbuf.h
arch/powerpc/include/asm/kvm.h arch/powerpc/include/uapi/asm/kvm.h
+1 -69
arch/powerpc/include/asm/kvm_para.h
··· 16 16 * 17 17 * Authors: Hollis Blanchard <hollisb@us.ibm.com> 18 18 */ 19 - 20 19 #ifndef __POWERPC_KVM_PARA_H__ 21 20 #define __POWERPC_KVM_PARA_H__ 22 21 23 - #include <linux/types.h> 22 + #include <uapi/asm/kvm_para.h> 24 23 25 - /* 26 - * Additions to this struct must only occur at the end, and should be 27 - * accompanied by a KVM_MAGIC_FEAT flag to advertise that they are present 28 - * (albeit not necessarily relevant to the current target hardware platform). 29 - * 30 - * Struct fields are always 32 or 64 bit aligned, depending on them being 32 31 - * or 64 bit wide respectively. 32 - * 33 - * See Documentation/virtual/kvm/ppc-pv.txt 34 - */ 35 - struct kvm_vcpu_arch_shared { 36 - __u64 scratch1; 37 - __u64 scratch2; 38 - __u64 scratch3; 39 - __u64 critical; /* Guest may not get interrupts if == r1 */ 40 - __u64 sprg0; 41 - __u64 sprg1; 42 - __u64 sprg2; 43 - __u64 sprg3; 44 - __u64 srr0; 45 - __u64 srr1; 46 - __u64 dar; /* dear on BookE */ 47 - __u64 msr; 48 - __u32 dsisr; 49 - __u32 int_pending; /* Tells the guest if we have an interrupt */ 50 - __u32 sr[16]; 51 - __u32 mas0; 52 - __u32 mas1; 53 - __u64 mas7_3; 54 - __u64 mas2; 55 - __u32 mas4; 56 - __u32 mas6; 57 - __u32 esr; 58 - __u32 pir; 59 - 60 - /* 61 - * SPRG4-7 are user-readable, so we can only keep these consistent 62 - * between the shared area and the real registers when there's an 63 - * intervening exit to KVM. This also applies to SPRG3 on some 64 - * chips. 65 - * 66 - * This suffices for access by guest userspace, since in PR-mode 67 - * KVM, an exit must occur when changing the guest's MSR[PR]. 68 - * If the guest kernel writes to SPRG3-7 via the shared area, it 69 - * must also use the shared area for reading while in kernel space. 70 - */ 71 - __u64 sprg4; 72 - __u64 sprg5; 73 - __u64 sprg6; 74 - __u64 sprg7; 75 - }; 76 - 77 - #define KVM_SC_MAGIC_R0 0x4b564d21 /* "KVM!" */ 78 - #define HC_VENDOR_KVM (42 << 16) 79 - #define HC_EV_SUCCESS 0 80 - #define HC_EV_UNIMPLEMENTED 12 81 - 82 - #define KVM_FEATURE_MAGIC_PAGE 1 83 - 84 - #define KVM_MAGIC_FEAT_SR (1 << 0) 85 - 86 - /* MASn, ESR, PIR, and high SPRGs */ 87 - #define KVM_MAGIC_FEAT_MAS0_TO_SPRG7 (1 << 1) 88 - 89 - #ifdef __KERNEL__ 90 24 91 25 #ifdef CONFIG_KVM_GUEST 92 26 ··· 144 210 { 145 211 return false; 146 212 } 147 - 148 - #endif /* __KERNEL__ */ 149 213 150 214 #endif /* __POWERPC_KVM_PARA_H__ */
arch/powerpc/include/asm/linkage.h arch/powerpc/include/uapi/asm/linkage.h
+3 -24
arch/powerpc/include/asm/mman.h
··· 1 - #ifndef _ASM_POWERPC_MMAN_H 2 - #define _ASM_POWERPC_MMAN_H 3 - 4 - #include <asm-generic/mman-common.h> 5 - 6 1 /* 7 2 * This program is free software; you can redistribute it and/or 8 3 * modify it under the terms of the GNU General Public License 9 4 * as published by the Free Software Foundation; either version 10 5 * 2 of the License, or (at your option) any later version. 11 6 */ 7 + #ifndef _ASM_POWERPC_MMAN_H 8 + #define _ASM_POWERPC_MMAN_H 12 9 13 - #define PROT_SAO 0x10 /* Strong Access Ordering */ 10 + #include <uapi/asm/mman.h> 14 11 15 - #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ 16 - #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ 17 - #define MAP_LOCKED 0x80 18 - 19 - #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ 20 - #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ 21 - #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ 22 - 23 - #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ 24 - #define MCL_FUTURE 0x4000 /* lock all additions to address space */ 25 - 26 - #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ 27 - #define MAP_NONBLOCK 0x10000 /* do not block on IO */ 28 - #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ 29 - #define MAP_HUGETLB 0x40000 /* create a huge page mapping */ 30 - 31 - #ifdef __KERNEL__ 32 12 #ifdef CONFIG_PPC64 33 13 34 14 #include <asm/cputable.h> ··· 41 61 #define arch_validate_prot(prot) arch_validate_prot(prot) 42 62 43 63 #endif /* CONFIG_PPC64 */ 44 - #endif /* __KERNEL__ */ 45 64 #endif /* _ASM_POWERPC_MMAN_H */
arch/powerpc/include/asm/msgbuf.h arch/powerpc/include/uapi/asm/msgbuf.h
+1 -54
arch/powerpc/include/asm/nvram.h
··· 6 6 * as published by the Free Software Foundation; either version 7 7 * 2 of the License, or (at your option) any later version. 8 8 */ 9 - 10 9 #ifndef _ASM_POWERPC_NVRAM_H 11 10 #define _ASM_POWERPC_NVRAM_H 12 11 13 - /* Signatures for nvram partitions */ 14 - #define NVRAM_SIG_SP 0x02 /* support processor */ 15 - #define NVRAM_SIG_OF 0x50 /* open firmware config */ 16 - #define NVRAM_SIG_FW 0x51 /* general firmware */ 17 - #define NVRAM_SIG_HW 0x52 /* hardware (VPD) */ 18 - #define NVRAM_SIG_FLIP 0x5a /* Apple flip/flop header */ 19 - #define NVRAM_SIG_APPL 0x5f /* Apple "system" (???) */ 20 - #define NVRAM_SIG_SYS 0x70 /* system env vars */ 21 - #define NVRAM_SIG_CFG 0x71 /* config data */ 22 - #define NVRAM_SIG_ELOG 0x72 /* error log */ 23 - #define NVRAM_SIG_VEND 0x7e /* vendor defined */ 24 - #define NVRAM_SIG_FREE 0x7f /* Free space */ 25 - #define NVRAM_SIG_OS 0xa0 /* OS defined */ 26 - #define NVRAM_SIG_PANIC 0xa1 /* Apple OSX "panic" */ 27 - 28 - #ifdef __KERNEL__ 29 12 30 13 #include <linux/errno.h> 31 14 #include <linux/list.h> 15 + #include <uapi/asm/nvram.h> 32 16 33 17 #ifdef CONFIG_PPC_PSERIES 34 18 extern int nvram_write_error_log(char * buff, int length, ··· 40 56 extern int nvram_get_partition_size(loff_t data_index); 41 57 extern loff_t nvram_find_partition(const char *name, int sig, int *out_size); 42 58 43 - #endif /* __KERNEL__ */ 44 - 45 - /* PowerMac specific nvram stuffs */ 46 - 47 - enum { 48 - pmac_nvram_OF, /* Open Firmware partition */ 49 - pmac_nvram_XPRAM, /* MacOS XPRAM partition */ 50 - pmac_nvram_NR /* MacOS Name Registry partition */ 51 - }; 52 - 53 - #ifdef __KERNEL__ 54 59 /* Return partition offset in nvram */ 55 60 extern int pmac_get_partition(int partition); 56 61 ··· 56 83 /* Normal access to NVRAM */ 57 84 extern unsigned char nvram_read_byte(int i); 58 85 extern void nvram_write_byte(unsigned char c, int i); 59 - #endif 60 - 61 - /* Some offsets in XPRAM */ 62 - #define PMAC_XPRAM_MACHINE_LOC 0xe4 63 - #define PMAC_XPRAM_SOUND_VOLUME 0x08 64 - 65 - /* Machine location structure in PowerMac XPRAM */ 66 - struct pmac_machine_location { 67 - unsigned int latitude; /* 2+30 bit Fractional number */ 68 - unsigned int longitude; /* 2+30 bit Fractional number */ 69 - unsigned int delta; /* mix of GMT delta and DLS */ 70 - }; 71 - 72 - /* 73 - * /dev/nvram ioctls 74 - * 75 - * Note that PMAC_NVRAM_GET_OFFSET is still supported, but is 76 - * definitely obsolete. Do not use it if you can avoid it 77 - */ 78 - 79 - #define OBSOLETE_PMAC_NVRAM_GET_OFFSET \ 80 - _IOWR('p', 0x40, int) 81 - 82 - #define IOC_NVRAM_GET_OFFSET _IOWR('p', 0x42, int) /* Get NVRAM partition offset */ 83 - #define IOC_NVRAM_SYNC _IO('p', 0x43) /* Sync NVRAM image */ 84 - 85 86 #endif /* _ASM_POWERPC_NVRAM_H */
arch/powerpc/include/asm/param.h arch/powerpc/include/uapi/asm/param.h
arch/powerpc/include/asm/poll.h arch/powerpc/include/uapi/asm/poll.h
arch/powerpc/include/asm/posix_types.h arch/powerpc/include/uapi/asm/posix_types.h
arch/powerpc/include/asm/ps3fb.h arch/powerpc/include/uapi/asm/ps3fb.h
+3 -239
arch/powerpc/include/asm/ptrace.h
··· 1 - #ifndef _ASM_POWERPC_PTRACE_H 2 - #define _ASM_POWERPC_PTRACE_H 3 - 4 1 /* 5 2 * Copyright (C) 2001 PPC64 Team, IBM Corp 6 3 * ··· 20 23 * as published by the Free Software Foundation; either version 21 24 * 2 of the License, or (at your option) any later version. 22 25 */ 26 + #ifndef _ASM_POWERPC_PTRACE_H 27 + #define _ASM_POWERPC_PTRACE_H 23 28 24 - #include <linux/types.h> 29 + #include <uapi/asm/ptrace.h> 25 30 26 - #ifndef __ASSEMBLY__ 27 - 28 - struct pt_regs { 29 - unsigned long gpr[32]; 30 - unsigned long nip; 31 - unsigned long msr; 32 - unsigned long orig_gpr3; /* Used for restarting system calls */ 33 - unsigned long ctr; 34 - unsigned long link; 35 - unsigned long xer; 36 - unsigned long ccr; 37 - #ifdef __powerpc64__ 38 - unsigned long softe; /* Soft enabled/disabled */ 39 - #else 40 - unsigned long mq; /* 601 only (not used at present) */ 41 - /* Used on APUS to hold IPL value. */ 42 - #endif 43 - unsigned long trap; /* Reason for being here */ 44 - /* N.B. for critical exceptions on 4xx, the dar and dsisr 45 - fields are overloaded to hold srr0 and srr1. */ 46 - unsigned long dar; /* Fault registers */ 47 - unsigned long dsisr; /* on 4xx/Book-E used for ESR */ 48 - unsigned long result; /* Result of a system call */ 49 - }; 50 - 51 - #endif /* __ASSEMBLY__ */ 52 - 53 - #ifdef __KERNEL__ 54 31 55 32 #ifdef __powerpc64__ 56 33 ··· 193 222 194 223 #endif /* __ASSEMBLY__ */ 195 224 196 - #endif /* __KERNEL__ */ 197 - 198 - /* 199 - * Offsets used by 'ptrace' system call interface. 200 - * These can't be changed without breaking binary compatibility 201 - * with MkLinux, etc. 202 - */ 203 - #define PT_R0 0 204 - #define PT_R1 1 205 - #define PT_R2 2 206 - #define PT_R3 3 207 - #define PT_R4 4 208 - #define PT_R5 5 209 - #define PT_R6 6 210 - #define PT_R7 7 211 - #define PT_R8 8 212 - #define PT_R9 9 213 - #define PT_R10 10 214 - #define PT_R11 11 215 - #define PT_R12 12 216 - #define PT_R13 13 217 - #define PT_R14 14 218 - #define PT_R15 15 219 - #define PT_R16 16 220 - #define PT_R17 17 221 - #define PT_R18 18 222 - #define PT_R19 19 223 - #define PT_R20 20 224 - #define PT_R21 21 225 - #define PT_R22 22 226 - #define PT_R23 23 227 - #define PT_R24 24 228 - #define PT_R25 25 229 - #define PT_R26 26 230 - #define PT_R27 27 231 - #define PT_R28 28 232 - #define PT_R29 29 233 - #define PT_R30 30 234 - #define PT_R31 31 235 - 236 - #define PT_NIP 32 237 - #define PT_MSR 33 238 - #define PT_ORIG_R3 34 239 - #define PT_CTR 35 240 - #define PT_LNK 36 241 - #define PT_XER 37 242 - #define PT_CCR 38 243 225 #ifndef __powerpc64__ 244 - #define PT_MQ 39 245 - #else 246 - #define PT_SOFTE 39 247 - #endif 248 - #define PT_TRAP 40 249 - #define PT_DAR 41 250 - #define PT_DSISR 42 251 - #define PT_RESULT 43 252 - #define PT_REGS_COUNT 44 253 - 254 - #define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ 255 - 256 - #ifndef __powerpc64__ 257 - 258 - #define PT_FPR31 (PT_FPR0 + 2*31) 259 - #define PT_FPSCR (PT_FPR0 + 2*32 + 1) 260 - 261 226 #else /* __powerpc64__ */ 262 - 263 - #define PT_FPSCR (PT_FPR0 + 32) /* each FP reg occupies 1 slot in 64-bit space */ 264 - 265 - #ifdef __KERNEL__ 266 227 #define PT_FPSCR32 (PT_FPR0 + 2*32 + 1) /* each FP reg occupies 2 32-bit userspace slots */ 267 - #endif 268 - 269 - #define PT_VR0 82 /* each Vector reg occupies 2 slots in 64-bit */ 270 - #define PT_VSCR (PT_VR0 + 32*2 + 1) 271 - #define PT_VRSAVE (PT_VR0 + 33*2) 272 - 273 - #ifdef __KERNEL__ 274 228 #define PT_VR0_32 164 /* each Vector reg occupies 4 slots in 32-bit */ 275 229 #define PT_VSCR_32 (PT_VR0 + 32*4 + 3) 276 230 #define PT_VRSAVE_32 (PT_VR0 + 33*4) 277 - #endif 278 - 279 - /* 280 - * Only store first 32 VSRs here. The second 32 VSRs in VR0-31 281 - */ 282 - #define PT_VSR0 150 /* each VSR reg occupies 2 slots in 64-bit */ 283 - #define PT_VSR31 (PT_VSR0 + 2*31) 284 - #ifdef __KERNEL__ 285 231 #define PT_VSR0_32 300 /* each VSR reg occupies 4 slots in 32-bit */ 286 - #endif 287 232 #endif /* __powerpc64__ */ 288 - 289 - /* 290 - * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go. 291 - * The transfer totals 34 quadword. Quadwords 0-31 contain the 292 - * corresponding vector registers. Quadword 32 contains the vscr as the 293 - * last word (offset 12) within that quadword. Quadword 33 contains the 294 - * vrsave as the first word (offset 0) within the quadword. 295 - * 296 - * This definition of the VMX state is compatible with the current PPC32 297 - * ptrace interface. This allows signal handling and ptrace to use the same 298 - * structures. This also simplifies the implementation of a bi-arch 299 - * (combined (32- and 64-bit) gdb. 300 - */ 301 - #define PTRACE_GETVRREGS 18 302 - #define PTRACE_SETVRREGS 19 303 - 304 - /* Get/set all the upper 32-bits of the SPE registers, accumulator, and 305 - * spefscr, in one go */ 306 - #define PTRACE_GETEVRREGS 20 307 - #define PTRACE_SETEVRREGS 21 308 - 309 - /* Get the first 32 128bit VSX registers */ 310 - #define PTRACE_GETVSRREGS 27 311 - #define PTRACE_SETVSRREGS 28 312 - 313 - /* 314 - * Get or set a debug register. The first 16 are DABR registers and the 315 - * second 16 are IABR registers. 316 - */ 317 - #define PTRACE_GET_DEBUGREG 25 318 - #define PTRACE_SET_DEBUGREG 26 319 - 320 - /* (new) PTRACE requests using the same numbers as x86 and the same 321 - * argument ordering. Additionally, they support more registers too 322 - */ 323 - #define PTRACE_GETREGS 12 324 - #define PTRACE_SETREGS 13 325 - #define PTRACE_GETFPREGS 14 326 - #define PTRACE_SETFPREGS 15 327 - #define PTRACE_GETREGS64 22 328 - #define PTRACE_SETREGS64 23 329 - 330 - /* Calls to trace a 64bit program from a 32bit program */ 331 - #define PPC_PTRACE_PEEKTEXT_3264 0x95 332 - #define PPC_PTRACE_PEEKDATA_3264 0x94 333 - #define PPC_PTRACE_POKETEXT_3264 0x93 334 - #define PPC_PTRACE_POKEDATA_3264 0x92 335 - #define PPC_PTRACE_PEEKUSR_3264 0x91 336 - #define PPC_PTRACE_POKEUSR_3264 0x90 337 - 338 - #define PTRACE_SINGLEBLOCK 0x100 /* resume execution until next branch */ 339 - 340 - #define PPC_PTRACE_GETHWDBGINFO 0x89 341 - #define PPC_PTRACE_SETHWDEBUG 0x88 342 - #define PPC_PTRACE_DELHWDEBUG 0x87 343 - 344 - #ifndef __ASSEMBLY__ 345 - 346 - struct ppc_debug_info { 347 - __u32 version; /* Only version 1 exists to date */ 348 - __u32 num_instruction_bps; 349 - __u32 num_data_bps; 350 - __u32 num_condition_regs; 351 - __u32 data_bp_alignment; 352 - __u32 sizeof_condition; /* size of the DVC register */ 353 - __u64 features; 354 - }; 355 - 356 - #endif /* __ASSEMBLY__ */ 357 - 358 - /* 359 - * features will have bits indication whether there is support for: 360 - */ 361 - #define PPC_DEBUG_FEATURE_INSN_BP_RANGE 0x0000000000000001 362 - #define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x0000000000000002 363 - #define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x0000000000000004 364 - #define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x0000000000000008 365 - 366 - #ifndef __ASSEMBLY__ 367 - 368 - struct ppc_hw_breakpoint { 369 - __u32 version; /* currently, version must be 1 */ 370 - __u32 trigger_type; /* only some combinations allowed */ 371 - __u32 addr_mode; /* address match mode */ 372 - __u32 condition_mode; /* break/watchpoint condition flags */ 373 - __u64 addr; /* break/watchpoint address */ 374 - __u64 addr2; /* range end or mask */ 375 - __u64 condition_value; /* contents of the DVC register */ 376 - }; 377 - 378 - #endif /* __ASSEMBLY__ */ 379 - 380 - /* 381 - * Trigger Type 382 - */ 383 - #define PPC_BREAKPOINT_TRIGGER_EXECUTE 0x00000001 384 - #define PPC_BREAKPOINT_TRIGGER_READ 0x00000002 385 - #define PPC_BREAKPOINT_TRIGGER_WRITE 0x00000004 386 - #define PPC_BREAKPOINT_TRIGGER_RW \ 387 - (PPC_BREAKPOINT_TRIGGER_READ | PPC_BREAKPOINT_TRIGGER_WRITE) 388 - 389 - /* 390 - * Address Mode 391 - */ 392 - #define PPC_BREAKPOINT_MODE_EXACT 0x00000000 393 - #define PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE 0x00000001 394 - #define PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE 0x00000002 395 - #define PPC_BREAKPOINT_MODE_MASK 0x00000003 396 - 397 - /* 398 - * Condition Mode 399 - */ 400 - #define PPC_BREAKPOINT_CONDITION_MODE 0x00000003 401 - #define PPC_BREAKPOINT_CONDITION_NONE 0x00000000 402 - #define PPC_BREAKPOINT_CONDITION_AND 0x00000001 403 - #define PPC_BREAKPOINT_CONDITION_EXACT PPC_BREAKPOINT_CONDITION_AND 404 - #define PPC_BREAKPOINT_CONDITION_OR 0x00000002 405 - #define PPC_BREAKPOINT_CONDITION_AND_OR 0x00000003 406 - #define PPC_BREAKPOINT_CONDITION_BE_ALL 0x00ff0000 407 - #define PPC_BREAKPOINT_CONDITION_BE_SHIFT 16 408 - #define PPC_BREAKPOINT_CONDITION_BE(n) \ 409 - (1<<((n)+PPC_BREAKPOINT_CONDITION_BE_SHIFT)) 410 - 411 233 #endif /* _ASM_POWERPC_PTRACE_H */
arch/powerpc/include/asm/resource.h arch/powerpc/include/uapi/asm/resource.h
arch/powerpc/include/asm/seccomp.h arch/powerpc/include/uapi/asm/seccomp.h
arch/powerpc/include/asm/sembuf.h arch/powerpc/include/uapi/asm/sembuf.h
arch/powerpc/include/asm/setup.h arch/powerpc/include/uapi/asm/setup.h
arch/powerpc/include/asm/shmbuf.h arch/powerpc/include/uapi/asm/shmbuf.h
arch/powerpc/include/asm/sigcontext.h arch/powerpc/include/uapi/asm/sigcontext.h
arch/powerpc/include/asm/siginfo.h arch/powerpc/include/uapi/asm/siginfo.h
+1 -142
arch/powerpc/include/asm/signal.h
··· 1 1 #ifndef _ASM_POWERPC_SIGNAL_H 2 2 #define _ASM_POWERPC_SIGNAL_H 3 3 4 - #include <linux/types.h> 4 + #include <uapi/asm/signal.h> 5 5 6 - #define _NSIG 64 7 - #ifdef __powerpc64__ 8 - #define _NSIG_BPW 64 9 - #else 10 - #define _NSIG_BPW 32 11 - #endif 12 - #define _NSIG_WORDS (_NSIG / _NSIG_BPW) 13 - 14 - typedef unsigned long old_sigset_t; /* at least 32 bits */ 15 - 16 - typedef struct { 17 - unsigned long sig[_NSIG_WORDS]; 18 - } sigset_t; 19 - 20 - #define SIGHUP 1 21 - #define SIGINT 2 22 - #define SIGQUIT 3 23 - #define SIGILL 4 24 - #define SIGTRAP 5 25 - #define SIGABRT 6 26 - #define SIGIOT 6 27 - #define SIGBUS 7 28 - #define SIGFPE 8 29 - #define SIGKILL 9 30 - #define SIGUSR1 10 31 - #define SIGSEGV 11 32 - #define SIGUSR2 12 33 - #define SIGPIPE 13 34 - #define SIGALRM 14 35 - #define SIGTERM 15 36 - #define SIGSTKFLT 16 37 - #define SIGCHLD 17 38 - #define SIGCONT 18 39 - #define SIGSTOP 19 40 - #define SIGTSTP 20 41 - #define SIGTTIN 21 42 - #define SIGTTOU 22 43 - #define SIGURG 23 44 - #define SIGXCPU 24 45 - #define SIGXFSZ 25 46 - #define SIGVTALRM 26 47 - #define SIGPROF 27 48 - #define SIGWINCH 28 49 - #define SIGIO 29 50 - #define SIGPOLL SIGIO 51 - /* 52 - #define SIGLOST 29 53 - */ 54 - #define SIGPWR 30 55 - #define SIGSYS 31 56 - #define SIGUNUSED 31 57 - 58 - /* These should not be considered constants from userland. */ 59 - #define SIGRTMIN 32 60 - #define SIGRTMAX _NSIG 61 - 62 - /* 63 - * SA_FLAGS values: 64 - * 65 - * SA_ONSTACK is not currently supported, but will allow sigaltstack(2). 66 - * SA_RESTART flag to get restarting signals (which were the default long ago) 67 - * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 68 - * SA_RESETHAND clears the handler when the signal is delivered. 69 - * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. 70 - * SA_NODEFER prevents the current signal from being masked in the handler. 71 - * 72 - * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single 73 - * Unix names RESETHAND and NODEFER respectively. 74 - */ 75 - #define SA_NOCLDSTOP 0x00000001U 76 - #define SA_NOCLDWAIT 0x00000002U 77 - #define SA_SIGINFO 0x00000004U 78 - #define SA_ONSTACK 0x08000000U 79 - #define SA_RESTART 0x10000000U 80 - #define SA_NODEFER 0x40000000U 81 - #define SA_RESETHAND 0x80000000U 82 - 83 - #define SA_NOMASK SA_NODEFER 84 - #define SA_ONESHOT SA_RESETHAND 85 - 86 - #define SA_RESTORER 0x04000000U 87 - 88 - /* 89 - * sigaltstack controls 90 - */ 91 - #define SS_ONSTACK 1 92 - #define SS_DISABLE 2 93 - 94 - #define MINSIGSTKSZ 2048 95 - #define SIGSTKSZ 8192 96 - 97 - #include <asm-generic/signal-defs.h> 98 - 99 - struct old_sigaction { 100 - __sighandler_t sa_handler; 101 - old_sigset_t sa_mask; 102 - unsigned long sa_flags; 103 - __sigrestore_t sa_restorer; 104 - }; 105 - 106 - struct sigaction { 107 - __sighandler_t sa_handler; 108 - unsigned long sa_flags; 109 - __sigrestore_t sa_restorer; 110 - sigset_t sa_mask; /* mask last for extensibility */ 111 - }; 112 - 113 - struct k_sigaction { 114 - struct sigaction sa; 115 - }; 116 - 117 - typedef struct sigaltstack { 118 - void __user *ss_sp; 119 - int ss_flags; 120 - size_t ss_size; 121 - } stack_t; 122 - 123 - #ifdef __KERNEL__ 124 6 struct pt_regs; 125 7 #define ptrace_signal_deliver(regs, cookie) do { } while (0) 126 - #endif /* __KERNEL__ */ 127 - 128 - #ifndef __powerpc64__ 129 - /* 130 - * These are parameters to dbg_sigreturn syscall. They enable or 131 - * disable certain debugging things that can be done from signal 132 - * handlers. The dbg_sigreturn syscall *must* be called from a 133 - * SA_SIGINFO signal so the ucontext can be passed to it. It takes an 134 - * array of struct sig_dbg_op, which has the debug operations to 135 - * perform before returning from the signal. 136 - */ 137 - struct sig_dbg_op { 138 - int dbg_type; 139 - unsigned long dbg_value; 140 - }; 141 - 142 - /* Enable or disable single-stepping. The value sets the state. */ 143 - #define SIG_DBG_SINGLE_STEPPING 1 144 - 145 - /* Enable or disable branch tracing. The value sets the state. */ 146 - #define SIG_DBG_BRANCH_TRACING 2 147 - #endif /* ! __powerpc64__ */ 148 - 149 8 #endif /* _ASM_POWERPC_SIGNAL_H */
arch/powerpc/include/asm/socket.h arch/powerpc/include/uapi/asm/socket.h
arch/powerpc/include/asm/sockios.h arch/powerpc/include/uapi/asm/sockios.h
+1 -28
arch/powerpc/include/asm/spu_info.h
··· 19 19 * along with this program; if not, write to the Free Software 20 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 21 */ 22 - 23 22 #ifndef _SPU_INFO_H 24 23 #define _SPU_INFO_H 25 24 26 - #include <linux/types.h> 27 - 28 - #ifdef __KERNEL__ 29 25 #include <asm/spu.h> 30 - #else 31 - struct mfc_cq_sr { 32 - __u64 mfc_cq_data0_RW; 33 - __u64 mfc_cq_data1_RW; 34 - __u64 mfc_cq_data2_RW; 35 - __u64 mfc_cq_data3_RW; 36 - }; 37 - #endif /* __KERNEL__ */ 38 - 39 - struct spu_dma_info { 40 - __u64 dma_info_type; 41 - __u64 dma_info_mask; 42 - __u64 dma_info_status; 43 - __u64 dma_info_stall_and_notify; 44 - __u64 dma_info_atomic_command_status; 45 - struct mfc_cq_sr dma_info_command_data[16]; 46 - }; 47 - 48 - struct spu_proxydma_info { 49 - __u64 proxydma_info_type; 50 - __u64 proxydma_info_mask; 51 - __u64 proxydma_info_status; 52 - struct mfc_cq_sr proxydma_info_command_data[8]; 53 - }; 26 + #include <uapi/asm/spu_info.h> 54 27 55 28 #endif
arch/powerpc/include/asm/stat.h arch/powerpc/include/uapi/asm/stat.h
arch/powerpc/include/asm/statfs.h arch/powerpc/include/uapi/asm/statfs.h
+3 -12
arch/powerpc/include/asm/swab.h
··· 1 - #ifndef _ASM_POWERPC_SWAB_H 2 - #define _ASM_POWERPC_SWAB_H 3 - 4 1 /* 5 2 * This program is free software; you can redistribute it and/or 6 3 * modify it under the terms of the GNU General Public License 7 4 * as published by the Free Software Foundation; either version 8 5 * 2 of the License, or (at your option) any later version. 9 6 */ 7 + #ifndef _ASM_POWERPC_SWAB_H 8 + #define _ASM_POWERPC_SWAB_H 10 9 11 - #include <linux/types.h> 12 - #include <linux/compiler.h> 10 + #include <uapi/asm/swab.h> 13 11 14 12 #ifdef __GNUC__ 15 - 16 13 #ifndef __powerpc64__ 17 - #define __SWAB_64_THRU_32__ 18 14 #endif /* __powerpc64__ */ 19 - 20 - #ifdef __KERNEL__ 21 15 22 16 static __inline__ __u16 ld_le16(const volatile __u16 *addr) 23 17 { ··· 77 83 } 78 84 #define __arch_swab32 __arch_swab32 79 85 80 - #endif /* __KERNEL__ */ 81 - 82 86 #endif /* __GNUC__ */ 83 - 84 87 #endif /* _ASM_POWERPC_SWAB_H */
arch/powerpc/include/asm/termbits.h arch/powerpc/include/uapi/asm/termbits.h
+3 -66
arch/powerpc/include/asm/termios.h
··· 1 - #ifndef _ASM_POWERPC_TERMIOS_H 2 - #define _ASM_POWERPC_TERMIOS_H 3 - 4 1 /* 5 2 * Liberally adapted from alpha/termios.h. In particular, the c_cc[] 6 3 * fields have been reordered so that termio & termios share the ··· 9 12 * as published by the Free Software Foundation; either version 10 13 * 2 of the License, or (at your option) any later version. 11 14 */ 15 + #ifndef _ASM_POWERPC_TERMIOS_H 16 + #define _ASM_POWERPC_TERMIOS_H 12 17 13 - #include <asm/ioctls.h> 14 - #include <asm/termbits.h> 18 + #include <uapi/asm/termios.h> 15 19 16 - struct sgttyb { 17 - char sg_ispeed; 18 - char sg_ospeed; 19 - char sg_erase; 20 - char sg_kill; 21 - short sg_flags; 22 - }; 23 - 24 - struct tchars { 25 - char t_intrc; 26 - char t_quitc; 27 - char t_startc; 28 - char t_stopc; 29 - char t_eofc; 30 - char t_brkc; 31 - }; 32 - 33 - struct ltchars { 34 - char t_suspc; 35 - char t_dsuspc; 36 - char t_rprntc; 37 - char t_flushc; 38 - char t_werasc; 39 - char t_lnextc; 40 - }; 41 - 42 - struct winsize { 43 - unsigned short ws_row; 44 - unsigned short ws_col; 45 - unsigned short ws_xpixel; 46 - unsigned short ws_ypixel; 47 - }; 48 - 49 - #define NCC 10 50 - struct termio { 51 - unsigned short c_iflag; /* input mode flags */ 52 - unsigned short c_oflag; /* output mode flags */ 53 - unsigned short c_cflag; /* control mode flags */ 54 - unsigned short c_lflag; /* local mode flags */ 55 - unsigned char c_line; /* line discipline */ 56 - unsigned char c_cc[NCC]; /* control characters */ 57 - }; 58 - 59 - /* c_cc characters */ 60 - #define _VINTR 0 61 - #define _VQUIT 1 62 - #define _VERASE 2 63 - #define _VKILL 3 64 - #define _VEOF 4 65 - #define _VMIN 5 66 - #define _VEOL 6 67 - #define _VTIME 7 68 - #define _VEOL2 8 69 - #define _VSWTC 9 70 - 71 - #ifdef __KERNEL__ 72 20 /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ 73 21 #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" 74 - #endif 75 - 76 - #ifdef __KERNEL__ 77 22 78 23 #include <asm-generic/termios-base.h> 79 - 80 - #endif /* __KERNEL__ */ 81 24 82 25 #endif /* _ASM_POWERPC_TERMIOS_H */
+3 -27
arch/powerpc/include/asm/types.h
··· 1 - #ifndef _ASM_POWERPC_TYPES_H 2 - #define _ASM_POWERPC_TYPES_H 3 - 4 - /* 5 - * This is here because we used to use l64 for 64bit powerpc 6 - * and we don't want to impact user mode with our change to ll64 7 - * in the kernel. 8 - * 9 - * However, some user programs are fine with this. They can 10 - * flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here. 11 - */ 12 - #if !defined(__SANE_USERSPACE_TYPES__) && defined(__powerpc64__) && !defined(__KERNEL__) 13 - # include <asm-generic/int-l64.h> 14 - #else 15 - # include <asm-generic/int-ll64.h> 16 - #endif 17 - 18 - #ifndef __ASSEMBLY__ 19 - 20 1 /* 21 2 * This file is never included by application software unless 22 3 * explicitly requested (e.g., via linux/types.h) in which case the ··· 10 29 * as published by the Free Software Foundation; either version 11 30 * 2 of the License, or (at your option) any later version. 12 31 */ 32 + #ifndef _ASM_POWERPC_TYPES_H 33 + #define _ASM_POWERPC_TYPES_H 13 34 14 - typedef struct { 15 - __u32 u[4]; 16 - } __attribute__((aligned(16))) __vector128; 35 + #include <uapi/asm/types.h> 17 36 18 - #endif /* __ASSEMBLY__ */ 19 - 20 - #ifdef __KERNEL__ 21 37 #ifndef __ASSEMBLY__ 22 38 23 39 typedef __vector128 vector128; ··· 26 48 } func_descr_t; 27 49 28 50 #endif /* __ASSEMBLY__ */ 29 - 30 - #endif /* __KERNEL__ */ 31 51 32 52 #endif /* _ASM_POWERPC_TYPES_H */
arch/powerpc/include/asm/ucontext.h arch/powerpc/include/uapi/asm/ucontext.h
+3 -371
arch/powerpc/include/asm/unistd.h
··· 1 - #ifndef _ASM_POWERPC_UNISTD_H_ 2 - #define _ASM_POWERPC_UNISTD_H_ 3 - 4 1 /* 5 2 * This file contains the system call numbers. 6 3 * ··· 6 9 * as published by the Free Software Foundation; either version 7 10 * 2 of the License, or (at your option) any later version. 8 11 */ 12 + #ifndef _ASM_POWERPC_UNISTD_H_ 13 + #define _ASM_POWERPC_UNISTD_H_ 9 14 10 - #define __NR_restart_syscall 0 11 - #define __NR_exit 1 12 - #define __NR_fork 2 13 - #define __NR_read 3 14 - #define __NR_write 4 15 - #define __NR_open 5 16 - #define __NR_close 6 17 - #define __NR_waitpid 7 18 - #define __NR_creat 8 19 - #define __NR_link 9 20 - #define __NR_unlink 10 21 - #define __NR_execve 11 22 - #define __NR_chdir 12 23 - #define __NR_time 13 24 - #define __NR_mknod 14 25 - #define __NR_chmod 15 26 - #define __NR_lchown 16 27 - #define __NR_break 17 28 - #define __NR_oldstat 18 29 - #define __NR_lseek 19 30 - #define __NR_getpid 20 31 - #define __NR_mount 21 32 - #define __NR_umount 22 33 - #define __NR_setuid 23 34 - #define __NR_getuid 24 35 - #define __NR_stime 25 36 - #define __NR_ptrace 26 37 - #define __NR_alarm 27 38 - #define __NR_oldfstat 28 39 - #define __NR_pause 29 40 - #define __NR_utime 30 41 - #define __NR_stty 31 42 - #define __NR_gtty 32 43 - #define __NR_access 33 44 - #define __NR_nice 34 45 - #define __NR_ftime 35 46 - #define __NR_sync 36 47 - #define __NR_kill 37 48 - #define __NR_rename 38 49 - #define __NR_mkdir 39 50 - #define __NR_rmdir 40 51 - #define __NR_dup 41 52 - #define __NR_pipe 42 53 - #define __NR_times 43 54 - #define __NR_prof 44 55 - #define __NR_brk 45 56 - #define __NR_setgid 46 57 - #define __NR_getgid 47 58 - #define __NR_signal 48 59 - #define __NR_geteuid 49 60 - #define __NR_getegid 50 61 - #define __NR_acct 51 62 - #define __NR_umount2 52 63 - #define __NR_lock 53 64 - #define __NR_ioctl 54 65 - #define __NR_fcntl 55 66 - #define __NR_mpx 56 67 - #define __NR_setpgid 57 68 - #define __NR_ulimit 58 69 - #define __NR_oldolduname 59 70 - #define __NR_umask 60 71 - #define __NR_chroot 61 72 - #define __NR_ustat 62 73 - #define __NR_dup2 63 74 - #define __NR_getppid 64 75 - #define __NR_getpgrp 65 76 - #define __NR_setsid 66 77 - #define __NR_sigaction 67 78 - #define __NR_sgetmask 68 79 - #define __NR_ssetmask 69 80 - #define __NR_setreuid 70 81 - #define __NR_setregid 71 82 - #define __NR_sigsuspend 72 83 - #define __NR_sigpending 73 84 - #define __NR_sethostname 74 85 - #define __NR_setrlimit 75 86 - #define __NR_getrlimit 76 87 - #define __NR_getrusage 77 88 - #define __NR_gettimeofday 78 89 - #define __NR_settimeofday 79 90 - #define __NR_getgroups 80 91 - #define __NR_setgroups 81 92 - #define __NR_select 82 93 - #define __NR_symlink 83 94 - #define __NR_oldlstat 84 95 - #define __NR_readlink 85 96 - #define __NR_uselib 86 97 - #define __NR_swapon 87 98 - #define __NR_reboot 88 99 - #define __NR_readdir 89 100 - #define __NR_mmap 90 101 - #define __NR_munmap 91 102 - #define __NR_truncate 92 103 - #define __NR_ftruncate 93 104 - #define __NR_fchmod 94 105 - #define __NR_fchown 95 106 - #define __NR_getpriority 96 107 - #define __NR_setpriority 97 108 - #define __NR_profil 98 109 - #define __NR_statfs 99 110 - #define __NR_fstatfs 100 111 - #define __NR_ioperm 101 112 - #define __NR_socketcall 102 113 - #define __NR_syslog 103 114 - #define __NR_setitimer 104 115 - #define __NR_getitimer 105 116 - #define __NR_stat 106 117 - #define __NR_lstat 107 118 - #define __NR_fstat 108 119 - #define __NR_olduname 109 120 - #define __NR_iopl 110 121 - #define __NR_vhangup 111 122 - #define __NR_idle 112 123 - #define __NR_vm86 113 124 - #define __NR_wait4 114 125 - #define __NR_swapoff 115 126 - #define __NR_sysinfo 116 127 - #define __NR_ipc 117 128 - #define __NR_fsync 118 129 - #define __NR_sigreturn 119 130 - #define __NR_clone 120 131 - #define __NR_setdomainname 121 132 - #define __NR_uname 122 133 - #define __NR_modify_ldt 123 134 - #define __NR_adjtimex 124 135 - #define __NR_mprotect 125 136 - #define __NR_sigprocmask 126 137 - #define __NR_create_module 127 138 - #define __NR_init_module 128 139 - #define __NR_delete_module 129 140 - #define __NR_get_kernel_syms 130 141 - #define __NR_quotactl 131 142 - #define __NR_getpgid 132 143 - #define __NR_fchdir 133 144 - #define __NR_bdflush 134 145 - #define __NR_sysfs 135 146 - #define __NR_personality 136 147 - #define __NR_afs_syscall 137 /* Syscall for Andrew File System */ 148 - #define __NR_setfsuid 138 149 - #define __NR_setfsgid 139 150 - #define __NR__llseek 140 151 - #define __NR_getdents 141 152 - #define __NR__newselect 142 153 - #define __NR_flock 143 154 - #define __NR_msync 144 155 - #define __NR_readv 145 156 - #define __NR_writev 146 157 - #define __NR_getsid 147 158 - #define __NR_fdatasync 148 159 - #define __NR__sysctl 149 160 - #define __NR_mlock 150 161 - #define __NR_munlock 151 162 - #define __NR_mlockall 152 163 - #define __NR_munlockall 153 164 - #define __NR_sched_setparam 154 165 - #define __NR_sched_getparam 155 166 - #define __NR_sched_setscheduler 156 167 - #define __NR_sched_getscheduler 157 168 - #define __NR_sched_yield 158 169 - #define __NR_sched_get_priority_max 159 170 - #define __NR_sched_get_priority_min 160 171 - #define __NR_sched_rr_get_interval 161 172 - #define __NR_nanosleep 162 173 - #define __NR_mremap 163 174 - #define __NR_setresuid 164 175 - #define __NR_getresuid 165 176 - #define __NR_query_module 166 177 - #define __NR_poll 167 178 - #define __NR_nfsservctl 168 179 - #define __NR_setresgid 169 180 - #define __NR_getresgid 170 181 - #define __NR_prctl 171 182 - #define __NR_rt_sigreturn 172 183 - #define __NR_rt_sigaction 173 184 - #define __NR_rt_sigprocmask 174 185 - #define __NR_rt_sigpending 175 186 - #define __NR_rt_sigtimedwait 176 187 - #define __NR_rt_sigqueueinfo 177 188 - #define __NR_rt_sigsuspend 178 189 - #define __NR_pread64 179 190 - #define __NR_pwrite64 180 191 - #define __NR_chown 181 192 - #define __NR_getcwd 182 193 - #define __NR_capget 183 194 - #define __NR_capset 184 195 - #define __NR_sigaltstack 185 196 - #define __NR_sendfile 186 197 - #define __NR_getpmsg 187 /* some people actually want streams */ 198 - #define __NR_putpmsg 188 /* some people actually want streams */ 199 - #define __NR_vfork 189 200 - #define __NR_ugetrlimit 190 /* SuS compliant getrlimit */ 201 - #define __NR_readahead 191 202 - #ifndef __powerpc64__ /* these are 32-bit only */ 203 - #define __NR_mmap2 192 204 - #define __NR_truncate64 193 205 - #define __NR_ftruncate64 194 206 - #define __NR_stat64 195 207 - #define __NR_lstat64 196 208 - #define __NR_fstat64 197 209 - #endif 210 - #define __NR_pciconfig_read 198 211 - #define __NR_pciconfig_write 199 212 - #define __NR_pciconfig_iobase 200 213 - #define __NR_multiplexer 201 214 - #define __NR_getdents64 202 215 - #define __NR_pivot_root 203 216 - #ifndef __powerpc64__ 217 - #define __NR_fcntl64 204 218 - #endif 219 - #define __NR_madvise 205 220 - #define __NR_mincore 206 221 - #define __NR_gettid 207 222 - #define __NR_tkill 208 223 - #define __NR_setxattr 209 224 - #define __NR_lsetxattr 210 225 - #define __NR_fsetxattr 211 226 - #define __NR_getxattr 212 227 - #define __NR_lgetxattr 213 228 - #define __NR_fgetxattr 214 229 - #define __NR_listxattr 215 230 - #define __NR_llistxattr 216 231 - #define __NR_flistxattr 217 232 - #define __NR_removexattr 218 233 - #define __NR_lremovexattr 219 234 - #define __NR_fremovexattr 220 235 - #define __NR_futex 221 236 - #define __NR_sched_setaffinity 222 237 - #define __NR_sched_getaffinity 223 238 - /* 224 currently unused */ 239 - #define __NR_tuxcall 225 240 - #ifndef __powerpc64__ 241 - #define __NR_sendfile64 226 242 - #endif 243 - #define __NR_io_setup 227 244 - #define __NR_io_destroy 228 245 - #define __NR_io_getevents 229 246 - #define __NR_io_submit 230 247 - #define __NR_io_cancel 231 248 - #define __NR_set_tid_address 232 249 - #define __NR_fadvise64 233 250 - #define __NR_exit_group 234 251 - #define __NR_lookup_dcookie 235 252 - #define __NR_epoll_create 236 253 - #define __NR_epoll_ctl 237 254 - #define __NR_epoll_wait 238 255 - #define __NR_remap_file_pages 239 256 - #define __NR_timer_create 240 257 - #define __NR_timer_settime 241 258 - #define __NR_timer_gettime 242 259 - #define __NR_timer_getoverrun 243 260 - #define __NR_timer_delete 244 261 - #define __NR_clock_settime 245 262 - #define __NR_clock_gettime 246 263 - #define __NR_clock_getres 247 264 - #define __NR_clock_nanosleep 248 265 - #define __NR_swapcontext 249 266 - #define __NR_tgkill 250 267 - #define __NR_utimes 251 268 - #define __NR_statfs64 252 269 - #define __NR_fstatfs64 253 270 - #ifndef __powerpc64__ 271 - #define __NR_fadvise64_64 254 272 - #endif 273 - #define __NR_rtas 255 274 - #define __NR_sys_debug_setcontext 256 275 - /* Number 257 is reserved for vserver */ 276 - #define __NR_migrate_pages 258 277 - #define __NR_mbind 259 278 - #define __NR_get_mempolicy 260 279 - #define __NR_set_mempolicy 261 280 - #define __NR_mq_open 262 281 - #define __NR_mq_unlink 263 282 - #define __NR_mq_timedsend 264 283 - #define __NR_mq_timedreceive 265 284 - #define __NR_mq_notify 266 285 - #define __NR_mq_getsetattr 267 286 - #define __NR_kexec_load 268 287 - #define __NR_add_key 269 288 - #define __NR_request_key 270 289 - #define __NR_keyctl 271 290 - #define __NR_waitid 272 291 - #define __NR_ioprio_set 273 292 - #define __NR_ioprio_get 274 293 - #define __NR_inotify_init 275 294 - #define __NR_inotify_add_watch 276 295 - #define __NR_inotify_rm_watch 277 296 - #define __NR_spu_run 278 297 - #define __NR_spu_create 279 298 - #define __NR_pselect6 280 299 - #define __NR_ppoll 281 300 - #define __NR_unshare 282 301 - #define __NR_splice 283 302 - #define __NR_tee 284 303 - #define __NR_vmsplice 285 304 - #define __NR_openat 286 305 - #define __NR_mkdirat 287 306 - #define __NR_mknodat 288 307 - #define __NR_fchownat 289 308 - #define __NR_futimesat 290 309 - #ifdef __powerpc64__ 310 - #define __NR_newfstatat 291 311 - #else 312 - #define __NR_fstatat64 291 313 - #endif 314 - #define __NR_unlinkat 292 315 - #define __NR_renameat 293 316 - #define __NR_linkat 294 317 - #define __NR_symlinkat 295 318 - #define __NR_readlinkat 296 319 - #define __NR_fchmodat 297 320 - #define __NR_faccessat 298 321 - #define __NR_get_robust_list 299 322 - #define __NR_set_robust_list 300 323 - #define __NR_move_pages 301 324 - #define __NR_getcpu 302 325 - #define __NR_epoll_pwait 303 326 - #define __NR_utimensat 304 327 - #define __NR_signalfd 305 328 - #define __NR_timerfd_create 306 329 - #define __NR_eventfd 307 330 - #define __NR_sync_file_range2 308 331 - #define __NR_fallocate 309 332 - #define __NR_subpage_prot 310 333 - #define __NR_timerfd_settime 311 334 - #define __NR_timerfd_gettime 312 335 - #define __NR_signalfd4 313 336 - #define __NR_eventfd2 314 337 - #define __NR_epoll_create1 315 338 - #define __NR_dup3 316 339 - #define __NR_pipe2 317 340 - #define __NR_inotify_init1 318 341 - #define __NR_perf_event_open 319 342 - #define __NR_preadv 320 343 - #define __NR_pwritev 321 344 - #define __NR_rt_tgsigqueueinfo 322 345 - #define __NR_fanotify_init 323 346 - #define __NR_fanotify_mark 324 347 - #define __NR_prlimit64 325 348 - #define __NR_socket 326 349 - #define __NR_bind 327 350 - #define __NR_connect 328 351 - #define __NR_listen 329 352 - #define __NR_accept 330 353 - #define __NR_getsockname 331 354 - #define __NR_getpeername 332 355 - #define __NR_socketpair 333 356 - #define __NR_send 334 357 - #define __NR_sendto 335 358 - #define __NR_recv 336 359 - #define __NR_recvfrom 337 360 - #define __NR_shutdown 338 361 - #define __NR_setsockopt 339 362 - #define __NR_getsockopt 340 363 - #define __NR_sendmsg 341 364 - #define __NR_recvmsg 342 365 - #define __NR_recvmmsg 343 366 - #define __NR_accept4 344 367 - #define __NR_name_to_handle_at 345 368 - #define __NR_open_by_handle_at 346 369 - #define __NR_clock_adjtime 347 370 - #define __NR_syncfs 348 371 - #define __NR_sendmmsg 349 372 - #define __NR_setns 350 373 - #define __NR_process_vm_readv 351 374 - #define __NR_process_vm_writev 352 15 + #include <uapi/asm/unistd.h> 375 16 376 - #ifdef __KERNEL__ 377 17 378 18 #define __NR_syscalls 353 379 19 ··· 65 431 asmlinkage long x (void) __attribute__((weak,alias("sys_ni_syscall"))) 66 432 67 433 #endif /* __ASSEMBLY__ */ 68 - #endif /* __KERNEL__ */ 69 - 70 434 #endif /* _ASM_POWERPC_UNISTD_H_ */
+41
arch/powerpc/include/uapi/asm/Kbuild
··· 1 1 # UAPI Header export list 2 2 include include/uapi/asm-generic/Kbuild.asm 3 3 4 + header-y += auxvec.h 5 + header-y += bitsperlong.h 6 + header-y += bootx.h 7 + header-y += byteorder.h 8 + header-y += cputable.h 9 + header-y += elf.h 10 + header-y += errno.h 11 + header-y += fcntl.h 12 + header-y += ioctl.h 13 + header-y += ioctls.h 14 + header-y += ipcbuf.h 15 + header-y += kvm.h 16 + header-y += kvm_para.h 17 + header-y += linkage.h 18 + header-y += mman.h 19 + header-y += msgbuf.h 20 + header-y += nvram.h 21 + header-y += param.h 22 + header-y += poll.h 23 + header-y += posix_types.h 24 + header-y += ps3fb.h 25 + header-y += ptrace.h 26 + header-y += resource.h 27 + header-y += seccomp.h 28 + header-y += sembuf.h 29 + header-y += setup.h 30 + header-y += shmbuf.h 31 + header-y += sigcontext.h 32 + header-y += siginfo.h 33 + header-y += signal.h 34 + header-y += socket.h 35 + header-y += sockios.h 36 + header-y += spu_info.h 37 + header-y += stat.h 38 + header-y += statfs.h 39 + header-y += swab.h 40 + header-y += termbits.h 41 + header-y += termios.h 42 + header-y += types.h 43 + header-y += ucontext.h 44 + header-y += unistd.h
+132
arch/powerpc/include/uapi/asm/bootx.h
··· 1 + /* 2 + * This file describes the structure passed from the BootX application 3 + * (for MacOS) when it is used to boot Linux. 4 + * 5 + * Written by Benjamin Herrenschmidt. 6 + */ 7 + 8 + 9 + #ifndef _UAPI__ASM_BOOTX_H__ 10 + #define _UAPI__ASM_BOOTX_H__ 11 + 12 + #include <linux/types.h> 13 + 14 + #ifdef macintosh 15 + #include <Types.h> 16 + #include "linux_type_defs.h" 17 + #endif 18 + 19 + #ifdef macintosh 20 + /* All this requires PowerPC alignment */ 21 + #pragma options align=power 22 + #endif 23 + 24 + /* On kernel entry: 25 + * 26 + * r3 = 0x426f6f58 ('BooX') 27 + * r4 = pointer to boot_infos 28 + * r5 = NULL 29 + * 30 + * Data and instruction translation disabled, interrupts 31 + * disabled, kernel loaded at physical 0x00000000 on PCI 32 + * machines (will be different on NuBus). 33 + */ 34 + 35 + #define BOOT_INFO_VERSION 5 36 + #define BOOT_INFO_COMPATIBLE_VERSION 1 37 + 38 + /* Bit in the architecture flag mask. More to be defined in 39 + future versions. Note that either BOOT_ARCH_PCI or 40 + BOOT_ARCH_NUBUS is set. The other BOOT_ARCH_NUBUS_xxx are 41 + set additionally when BOOT_ARCH_NUBUS is set. 42 + */ 43 + #define BOOT_ARCH_PCI 0x00000001UL 44 + #define BOOT_ARCH_NUBUS 0x00000002UL 45 + #define BOOT_ARCH_NUBUS_PDM 0x00000010UL 46 + #define BOOT_ARCH_NUBUS_PERFORMA 0x00000020UL 47 + #define BOOT_ARCH_NUBUS_POWERBOOK 0x00000040UL 48 + 49 + /* Maximum number of ranges in phys memory map */ 50 + #define MAX_MEM_MAP_SIZE 26 51 + 52 + /* This is the format of an element in the physical memory map. Note that 53 + the map is optional and current BootX will only build it for pre-PCI 54 + machines */ 55 + typedef struct boot_info_map_entry 56 + { 57 + __u32 physAddr; /* Physical starting address */ 58 + __u32 size; /* Size in bytes */ 59 + } boot_info_map_entry_t; 60 + 61 + 62 + /* Here are the boot informations that are passed to the bootstrap 63 + * Note that the kernel arguments and the device tree are appended 64 + * at the end of this structure. */ 65 + typedef struct boot_infos 66 + { 67 + /* Version of this structure */ 68 + __u32 version; 69 + /* backward compatible down to version: */ 70 + __u32 compatible_version; 71 + 72 + /* NEW (vers. 2) this holds the current _logical_ base addr of 73 + the frame buffer (for use by early boot message) */ 74 + __u8* logicalDisplayBase; 75 + 76 + /* NEW (vers. 4) Apple's machine identification */ 77 + __u32 machineID; 78 + 79 + /* NEW (vers. 4) Detected hw architecture */ 80 + __u32 architecture; 81 + 82 + /* The device tree (internal addresses relative to the beginning of the tree, 83 + * device tree offset relative to the beginning of this structure). 84 + * On pre-PCI macintosh (BOOT_ARCH_PCI bit set to 0 in architecture), this 85 + * field is 0. 86 + */ 87 + __u32 deviceTreeOffset; /* Device tree offset */ 88 + __u32 deviceTreeSize; /* Size of the device tree */ 89 + 90 + /* Some infos about the current MacOS display */ 91 + __u32 dispDeviceRect[4]; /* left,top,right,bottom */ 92 + __u32 dispDeviceDepth; /* (8, 16 or 32) */ 93 + __u8* dispDeviceBase; /* base address (physical) */ 94 + __u32 dispDeviceRowBytes; /* rowbytes (in bytes) */ 95 + __u32 dispDeviceColorsOffset; /* Colormap (8 bits only) or 0 (*) */ 96 + /* Optional offset in the registry to the current 97 + * MacOS display. (Can be 0 when not detected) */ 98 + __u32 dispDeviceRegEntryOffset; 99 + 100 + /* Optional pointer to boot ramdisk (offset from this structure) */ 101 + __u32 ramDisk; 102 + __u32 ramDiskSize; /* size of ramdisk image */ 103 + 104 + /* Kernel command line arguments (offset from this structure) */ 105 + __u32 kernelParamsOffset; 106 + 107 + /* ALL BELOW NEW (vers. 4) */ 108 + 109 + /* This defines the physical memory. Valid with BOOT_ARCH_NUBUS flag 110 + (non-PCI) only. On PCI, memory is contiguous and it's size is in the 111 + device-tree. */ 112 + boot_info_map_entry_t 113 + physMemoryMap[MAX_MEM_MAP_SIZE]; /* Where the phys memory is */ 114 + __u32 physMemoryMapSize; /* How many entries in map */ 115 + 116 + 117 + /* The framebuffer size (optional, currently 0) */ 118 + __u32 frameBufferSize; /* Represents a max size, can be 0. */ 119 + 120 + /* NEW (vers. 5) */ 121 + 122 + /* Total params size (args + colormap + device tree + ramdisk) */ 123 + __u32 totalParamsSize; 124 + 125 + } boot_infos_t; 126 + 127 + 128 + #ifdef macintosh 129 + #pragma options align=reset 130 + #endif 131 + 132 + #endif /* _UAPI__ASM_BOOTX_H__ */
+36
arch/powerpc/include/uapi/asm/cputable.h
··· 1 + #ifndef _UAPI__ASM_POWERPC_CPUTABLE_H 2 + #define _UAPI__ASM_POWERPC_CPUTABLE_H 3 + 4 + #define PPC_FEATURE_32 0x80000000 5 + #define PPC_FEATURE_64 0x40000000 6 + #define PPC_FEATURE_601_INSTR 0x20000000 7 + #define PPC_FEATURE_HAS_ALTIVEC 0x10000000 8 + #define PPC_FEATURE_HAS_FPU 0x08000000 9 + #define PPC_FEATURE_HAS_MMU 0x04000000 10 + #define PPC_FEATURE_HAS_4xxMAC 0x02000000 11 + #define PPC_FEATURE_UNIFIED_CACHE 0x01000000 12 + #define PPC_FEATURE_HAS_SPE 0x00800000 13 + #define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 14 + #define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 15 + #define PPC_FEATURE_NO_TB 0x00100000 16 + #define PPC_FEATURE_POWER4 0x00080000 17 + #define PPC_FEATURE_POWER5 0x00040000 18 + #define PPC_FEATURE_POWER5_PLUS 0x00020000 19 + #define PPC_FEATURE_CELL 0x00010000 20 + #define PPC_FEATURE_BOOKE 0x00008000 21 + #define PPC_FEATURE_SMT 0x00004000 22 + #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 23 + #define PPC_FEATURE_ARCH_2_05 0x00001000 24 + #define PPC_FEATURE_PA6T 0x00000800 25 + #define PPC_FEATURE_HAS_DFP 0x00000400 26 + #define PPC_FEATURE_POWER6_EXT 0x00000200 27 + #define PPC_FEATURE_ARCH_2_06 0x00000100 28 + #define PPC_FEATURE_HAS_VSX 0x00000080 29 + 30 + #define PPC_FEATURE_PSERIES_PERFMON_COMPAT \ 31 + 0x00000040 32 + 33 + #define PPC_FEATURE_TRUE_LE 0x00000002 34 + #define PPC_FEATURE_PPC_LE 0x00000001 35 + 36 + #endif /* _UAPI__ASM_POWERPC_CPUTABLE_H */
+307
arch/powerpc/include/uapi/asm/elf.h
··· 1 + /* 2 + * ELF register definitions.. 3 + * 4 + * This program is free software; you can redistribute it and/or 5 + * modify it under the terms of the GNU General Public License 6 + * as published by the Free Software Foundation; either version 7 + * 2 of the License, or (at your option) any later version. 8 + */ 9 + #ifndef _UAPI_ASM_POWERPC_ELF_H 10 + #define _UAPI_ASM_POWERPC_ELF_H 11 + 12 + 13 + #include <linux/types.h> 14 + 15 + #include <asm/ptrace.h> 16 + #include <asm/cputable.h> 17 + #include <asm/auxvec.h> 18 + 19 + /* PowerPC relocations defined by the ABIs */ 20 + #define R_PPC_NONE 0 21 + #define R_PPC_ADDR32 1 /* 32bit absolute address */ 22 + #define R_PPC_ADDR24 2 /* 26bit address, 2 bits ignored. */ 23 + #define R_PPC_ADDR16 3 /* 16bit absolute address */ 24 + #define R_PPC_ADDR16_LO 4 /* lower 16bit of absolute address */ 25 + #define R_PPC_ADDR16_HI 5 /* high 16bit of absolute address */ 26 + #define R_PPC_ADDR16_HA 6 /* adjusted high 16bit */ 27 + #define R_PPC_ADDR14 7 /* 16bit address, 2 bits ignored */ 28 + #define R_PPC_ADDR14_BRTAKEN 8 29 + #define R_PPC_ADDR14_BRNTAKEN 9 30 + #define R_PPC_REL24 10 /* PC relative 26 bit */ 31 + #define R_PPC_REL14 11 /* PC relative 16 bit */ 32 + #define R_PPC_REL14_BRTAKEN 12 33 + #define R_PPC_REL14_BRNTAKEN 13 34 + #define R_PPC_GOT16 14 35 + #define R_PPC_GOT16_LO 15 36 + #define R_PPC_GOT16_HI 16 37 + #define R_PPC_GOT16_HA 17 38 + #define R_PPC_PLTREL24 18 39 + #define R_PPC_COPY 19 40 + #define R_PPC_GLOB_DAT 20 41 + #define R_PPC_JMP_SLOT 21 42 + #define R_PPC_RELATIVE 22 43 + #define R_PPC_LOCAL24PC 23 44 + #define R_PPC_UADDR32 24 45 + #define R_PPC_UADDR16 25 46 + #define R_PPC_REL32 26 47 + #define R_PPC_PLT32 27 48 + #define R_PPC_PLTREL32 28 49 + #define R_PPC_PLT16_LO 29 50 + #define R_PPC_PLT16_HI 30 51 + #define R_PPC_PLT16_HA 31 52 + #define R_PPC_SDAREL16 32 53 + #define R_PPC_SECTOFF 33 54 + #define R_PPC_SECTOFF_LO 34 55 + #define R_PPC_SECTOFF_HI 35 56 + #define R_PPC_SECTOFF_HA 36 57 + 58 + /* PowerPC relocations defined for the TLS access ABI. */ 59 + #define R_PPC_TLS 67 /* none (sym+add)@tls */ 60 + #define R_PPC_DTPMOD32 68 /* word32 (sym+add)@dtpmod */ 61 + #define R_PPC_TPREL16 69 /* half16* (sym+add)@tprel */ 62 + #define R_PPC_TPREL16_LO 70 /* half16 (sym+add)@tprel@l */ 63 + #define R_PPC_TPREL16_HI 71 /* half16 (sym+add)@tprel@h */ 64 + #define R_PPC_TPREL16_HA 72 /* half16 (sym+add)@tprel@ha */ 65 + #define R_PPC_TPREL32 73 /* word32 (sym+add)@tprel */ 66 + #define R_PPC_DTPREL16 74 /* half16* (sym+add)@dtprel */ 67 + #define R_PPC_DTPREL16_LO 75 /* half16 (sym+add)@dtprel@l */ 68 + #define R_PPC_DTPREL16_HI 76 /* half16 (sym+add)@dtprel@h */ 69 + #define R_PPC_DTPREL16_HA 77 /* half16 (sym+add)@dtprel@ha */ 70 + #define R_PPC_DTPREL32 78 /* word32 (sym+add)@dtprel */ 71 + #define R_PPC_GOT_TLSGD16 79 /* half16* (sym+add)@got@tlsgd */ 72 + #define R_PPC_GOT_TLSGD16_LO 80 /* half16 (sym+add)@got@tlsgd@l */ 73 + #define R_PPC_GOT_TLSGD16_HI 81 /* half16 (sym+add)@got@tlsgd@h */ 74 + #define R_PPC_GOT_TLSGD16_HA 82 /* half16 (sym+add)@got@tlsgd@ha */ 75 + #define R_PPC_GOT_TLSLD16 83 /* half16* (sym+add)@got@tlsld */ 76 + #define R_PPC_GOT_TLSLD16_LO 84 /* half16 (sym+add)@got@tlsld@l */ 77 + #define R_PPC_GOT_TLSLD16_HI 85 /* half16 (sym+add)@got@tlsld@h */ 78 + #define R_PPC_GOT_TLSLD16_HA 86 /* half16 (sym+add)@got@tlsld@ha */ 79 + #define R_PPC_GOT_TPREL16 87 /* half16* (sym+add)@got@tprel */ 80 + #define R_PPC_GOT_TPREL16_LO 88 /* half16 (sym+add)@got@tprel@l */ 81 + #define R_PPC_GOT_TPREL16_HI 89 /* half16 (sym+add)@got@tprel@h */ 82 + #define R_PPC_GOT_TPREL16_HA 90 /* half16 (sym+add)@got@tprel@ha */ 83 + #define R_PPC_GOT_DTPREL16 91 /* half16* (sym+add)@got@dtprel */ 84 + #define R_PPC_GOT_DTPREL16_LO 92 /* half16* (sym+add)@got@dtprel@l */ 85 + #define R_PPC_GOT_DTPREL16_HI 93 /* half16* (sym+add)@got@dtprel@h */ 86 + #define R_PPC_GOT_DTPREL16_HA 94 /* half16* (sym+add)@got@dtprel@ha */ 87 + 88 + /* keep this the last entry. */ 89 + #define R_PPC_NUM 95 90 + 91 + 92 + #define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ 93 + #define ELF_NFPREG 33 /* includes fpscr */ 94 + 95 + typedef unsigned long elf_greg_t64; 96 + typedef elf_greg_t64 elf_gregset_t64[ELF_NGREG]; 97 + 98 + typedef unsigned int elf_greg_t32; 99 + typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG]; 100 + typedef elf_gregset_t32 compat_elf_gregset_t; 101 + 102 + /* 103 + * ELF_ARCH, CLASS, and DATA are used to set parameters in the core dumps. 104 + */ 105 + #ifdef __powerpc64__ 106 + # define ELF_NVRREG32 33 /* includes vscr & vrsave stuffed together */ 107 + # define ELF_NVRREG 34 /* includes vscr & vrsave in split vectors */ 108 + # define ELF_NVSRHALFREG 32 /* Half the vsx registers */ 109 + # define ELF_GREG_TYPE elf_greg_t64 110 + #else 111 + # define ELF_NEVRREG 34 /* includes acc (as 2) */ 112 + # define ELF_NVRREG 33 /* includes vscr */ 113 + # define ELF_GREG_TYPE elf_greg_t32 114 + # define ELF_ARCH EM_PPC 115 + # define ELF_CLASS ELFCLASS32 116 + # define ELF_DATA ELFDATA2MSB 117 + #endif /* __powerpc64__ */ 118 + 119 + #ifndef ELF_ARCH 120 + # define ELF_ARCH EM_PPC64 121 + # define ELF_CLASS ELFCLASS64 122 + # define ELF_DATA ELFDATA2MSB 123 + typedef elf_greg_t64 elf_greg_t; 124 + typedef elf_gregset_t64 elf_gregset_t; 125 + #else 126 + /* Assumption: ELF_ARCH == EM_PPC and ELF_CLASS == ELFCLASS32 */ 127 + typedef elf_greg_t32 elf_greg_t; 128 + typedef elf_gregset_t32 elf_gregset_t; 129 + #endif /* ELF_ARCH */ 130 + 131 + /* Floating point registers */ 132 + typedef double elf_fpreg_t; 133 + typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; 134 + 135 + /* Altivec registers */ 136 + /* 137 + * The entries with indexes 0-31 contain the corresponding vector registers. 138 + * The entry with index 32 contains the vscr as the last word (offset 12) 139 + * within the quadword. This allows the vscr to be stored as either a 140 + * quadword (since it must be copied via a vector register to/from storage) 141 + * or as a word. 142 + * 143 + * 64-bit kernel notes: The entry at index 33 contains the vrsave as the first 144 + * word (offset 0) within the quadword. 145 + * 146 + * This definition of the VMX state is compatible with the current PPC32 147 + * ptrace interface. This allows signal handling and ptrace to use the same 148 + * structures. This also simplifies the implementation of a bi-arch 149 + * (combined (32- and 64-bit) gdb. 150 + * 151 + * Note that it's _not_ compatible with 32 bits ucontext which stuffs the 152 + * vrsave along with vscr and so only uses 33 vectors for the register set 153 + */ 154 + typedef __vector128 elf_vrreg_t; 155 + typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; 156 + #ifdef __powerpc64__ 157 + typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32]; 158 + typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG]; 159 + #endif 160 + 161 + 162 + /* 163 + * The requirements here are: 164 + * - keep the final alignment of sp (sp & 0xf) 165 + * - make sure the 32-bit value at the first 16 byte aligned position of 166 + * AUXV is greater than 16 for glibc compatibility. 167 + * AT_IGNOREPPC is used for that. 168 + * - for compatibility with glibc ARCH_DLINFO must always be defined on PPC, 169 + * even if DLINFO_ARCH_ITEMS goes to zero or is undefined. 170 + * update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes 171 + */ 172 + #define ARCH_DLINFO \ 173 + do { \ 174 + /* Handle glibc compatibility. */ \ 175 + NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \ 176 + NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \ 177 + /* Cache size items */ \ 178 + NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize); \ 179 + NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize); \ 180 + NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize); \ 181 + VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->mm->context.vdso_base); \ 182 + } while (0) 183 + 184 + /* PowerPC64 relocations defined by the ABIs */ 185 + #define R_PPC64_NONE R_PPC_NONE 186 + #define R_PPC64_ADDR32 R_PPC_ADDR32 /* 32bit absolute address. */ 187 + #define R_PPC64_ADDR24 R_PPC_ADDR24 /* 26bit address, word aligned. */ 188 + #define R_PPC64_ADDR16 R_PPC_ADDR16 /* 16bit absolute address. */ 189 + #define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO /* lower 16bits of abs. address. */ 190 + #define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI /* high 16bits of abs. address. */ 191 + #define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA /* adjusted high 16bits. */ 192 + #define R_PPC64_ADDR14 R_PPC_ADDR14 /* 16bit address, word aligned. */ 193 + #define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN 194 + #define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN 195 + #define R_PPC64_REL24 R_PPC_REL24 /* PC relative 26 bit, word aligned. */ 196 + #define R_PPC64_REL14 R_PPC_REL14 /* PC relative 16 bit. */ 197 + #define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN 198 + #define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN 199 + #define R_PPC64_GOT16 R_PPC_GOT16 200 + #define R_PPC64_GOT16_LO R_PPC_GOT16_LO 201 + #define R_PPC64_GOT16_HI R_PPC_GOT16_HI 202 + #define R_PPC64_GOT16_HA R_PPC_GOT16_HA 203 + 204 + #define R_PPC64_COPY R_PPC_COPY 205 + #define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT 206 + #define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT 207 + #define R_PPC64_RELATIVE R_PPC_RELATIVE 208 + 209 + #define R_PPC64_UADDR32 R_PPC_UADDR32 210 + #define R_PPC64_UADDR16 R_PPC_UADDR16 211 + #define R_PPC64_REL32 R_PPC_REL32 212 + #define R_PPC64_PLT32 R_PPC_PLT32 213 + #define R_PPC64_PLTREL32 R_PPC_PLTREL32 214 + #define R_PPC64_PLT16_LO R_PPC_PLT16_LO 215 + #define R_PPC64_PLT16_HI R_PPC_PLT16_HI 216 + #define R_PPC64_PLT16_HA R_PPC_PLT16_HA 217 + 218 + #define R_PPC64_SECTOFF R_PPC_SECTOFF 219 + #define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO 220 + #define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI 221 + #define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA 222 + #define R_PPC64_ADDR30 37 /* word30 (S + A - P) >> 2. */ 223 + #define R_PPC64_ADDR64 38 /* doubleword64 S + A. */ 224 + #define R_PPC64_ADDR16_HIGHER 39 /* half16 #higher(S + A). */ 225 + #define R_PPC64_ADDR16_HIGHERA 40 /* half16 #highera(S + A). */ 226 + #define R_PPC64_ADDR16_HIGHEST 41 /* half16 #highest(S + A). */ 227 + #define R_PPC64_ADDR16_HIGHESTA 42 /* half16 #highesta(S + A). */ 228 + #define R_PPC64_UADDR64 43 /* doubleword64 S + A. */ 229 + #define R_PPC64_REL64 44 /* doubleword64 S + A - P. */ 230 + #define R_PPC64_PLT64 45 /* doubleword64 L + A. */ 231 + #define R_PPC64_PLTREL64 46 /* doubleword64 L + A - P. */ 232 + #define R_PPC64_TOC16 47 /* half16* S + A - .TOC. */ 233 + #define R_PPC64_TOC16_LO 48 /* half16 #lo(S + A - .TOC.). */ 234 + #define R_PPC64_TOC16_HI 49 /* half16 #hi(S + A - .TOC.). */ 235 + #define R_PPC64_TOC16_HA 50 /* half16 #ha(S + A - .TOC.). */ 236 + #define R_PPC64_TOC 51 /* doubleword64 .TOC. */ 237 + #define R_PPC64_PLTGOT16 52 /* half16* M + A. */ 238 + #define R_PPC64_PLTGOT16_LO 53 /* half16 #lo(M + A). */ 239 + #define R_PPC64_PLTGOT16_HI 54 /* half16 #hi(M + A). */ 240 + #define R_PPC64_PLTGOT16_HA 55 /* half16 #ha(M + A). */ 241 + 242 + #define R_PPC64_ADDR16_DS 56 /* half16ds* (S + A) >> 2. */ 243 + #define R_PPC64_ADDR16_LO_DS 57 /* half16ds #lo(S + A) >> 2. */ 244 + #define R_PPC64_GOT16_DS 58 /* half16ds* (G + A) >> 2. */ 245 + #define R_PPC64_GOT16_LO_DS 59 /* half16ds #lo(G + A) >> 2. */ 246 + #define R_PPC64_PLT16_LO_DS 60 /* half16ds #lo(L + A) >> 2. */ 247 + #define R_PPC64_SECTOFF_DS 61 /* half16ds* (R + A) >> 2. */ 248 + #define R_PPC64_SECTOFF_LO_DS 62 /* half16ds #lo(R + A) >> 2. */ 249 + #define R_PPC64_TOC16_DS 63 /* half16ds* (S + A - .TOC.) >> 2. */ 250 + #define R_PPC64_TOC16_LO_DS 64 /* half16ds #lo(S + A - .TOC.) >> 2. */ 251 + #define R_PPC64_PLTGOT16_DS 65 /* half16ds* (M + A) >> 2. */ 252 + #define R_PPC64_PLTGOT16_LO_DS 66 /* half16ds #lo(M + A) >> 2. */ 253 + 254 + /* PowerPC64 relocations defined for the TLS access ABI. */ 255 + #define R_PPC64_TLS 67 /* none (sym+add)@tls */ 256 + #define R_PPC64_DTPMOD64 68 /* doubleword64 (sym+add)@dtpmod */ 257 + #define R_PPC64_TPREL16 69 /* half16* (sym+add)@tprel */ 258 + #define R_PPC64_TPREL16_LO 70 /* half16 (sym+add)@tprel@l */ 259 + #define R_PPC64_TPREL16_HI 71 /* half16 (sym+add)@tprel@h */ 260 + #define R_PPC64_TPREL16_HA 72 /* half16 (sym+add)@tprel@ha */ 261 + #define R_PPC64_TPREL64 73 /* doubleword64 (sym+add)@tprel */ 262 + #define R_PPC64_DTPREL16 74 /* half16* (sym+add)@dtprel */ 263 + #define R_PPC64_DTPREL16_LO 75 /* half16 (sym+add)@dtprel@l */ 264 + #define R_PPC64_DTPREL16_HI 76 /* half16 (sym+add)@dtprel@h */ 265 + #define R_PPC64_DTPREL16_HA 77 /* half16 (sym+add)@dtprel@ha */ 266 + #define R_PPC64_DTPREL64 78 /* doubleword64 (sym+add)@dtprel */ 267 + #define R_PPC64_GOT_TLSGD16 79 /* half16* (sym+add)@got@tlsgd */ 268 + #define R_PPC64_GOT_TLSGD16_LO 80 /* half16 (sym+add)@got@tlsgd@l */ 269 + #define R_PPC64_GOT_TLSGD16_HI 81 /* half16 (sym+add)@got@tlsgd@h */ 270 + #define R_PPC64_GOT_TLSGD16_HA 82 /* half16 (sym+add)@got@tlsgd@ha */ 271 + #define R_PPC64_GOT_TLSLD16 83 /* half16* (sym+add)@got@tlsld */ 272 + #define R_PPC64_GOT_TLSLD16_LO 84 /* half16 (sym+add)@got@tlsld@l */ 273 + #define R_PPC64_GOT_TLSLD16_HI 85 /* half16 (sym+add)@got@tlsld@h */ 274 + #define R_PPC64_GOT_TLSLD16_HA 86 /* half16 (sym+add)@got@tlsld@ha */ 275 + #define R_PPC64_GOT_TPREL16_DS 87 /* half16ds* (sym+add)@got@tprel */ 276 + #define R_PPC64_GOT_TPREL16_LO_DS 88 /* half16ds (sym+add)@got@tprel@l */ 277 + #define R_PPC64_GOT_TPREL16_HI 89 /* half16 (sym+add)@got@tprel@h */ 278 + #define R_PPC64_GOT_TPREL16_HA 90 /* half16 (sym+add)@got@tprel@ha */ 279 + #define R_PPC64_GOT_DTPREL16_DS 91 /* half16ds* (sym+add)@got@dtprel */ 280 + #define R_PPC64_GOT_DTPREL16_LO_DS 92 /* half16ds (sym+add)@got@dtprel@l */ 281 + #define R_PPC64_GOT_DTPREL16_HI 93 /* half16 (sym+add)@got@dtprel@h */ 282 + #define R_PPC64_GOT_DTPREL16_HA 94 /* half16 (sym+add)@got@dtprel@ha */ 283 + #define R_PPC64_TPREL16_DS 95 /* half16ds* (sym+add)@tprel */ 284 + #define R_PPC64_TPREL16_LO_DS 96 /* half16ds (sym+add)@tprel@l */ 285 + #define R_PPC64_TPREL16_HIGHER 97 /* half16 (sym+add)@tprel@higher */ 286 + #define R_PPC64_TPREL16_HIGHERA 98 /* half16 (sym+add)@tprel@highera */ 287 + #define R_PPC64_TPREL16_HIGHEST 99 /* half16 (sym+add)@tprel@highest */ 288 + #define R_PPC64_TPREL16_HIGHESTA 100 /* half16 (sym+add)@tprel@highesta */ 289 + #define R_PPC64_DTPREL16_DS 101 /* half16ds* (sym+add)@dtprel */ 290 + #define R_PPC64_DTPREL16_LO_DS 102 /* half16ds (sym+add)@dtprel@l */ 291 + #define R_PPC64_DTPREL16_HIGHER 103 /* half16 (sym+add)@dtprel@higher */ 292 + #define R_PPC64_DTPREL16_HIGHERA 104 /* half16 (sym+add)@dtprel@highera */ 293 + #define R_PPC64_DTPREL16_HIGHEST 105 /* half16 (sym+add)@dtprel@highest */ 294 + #define R_PPC64_DTPREL16_HIGHESTA 106 /* half16 (sym+add)@dtprel@highesta */ 295 + 296 + /* Keep this the last entry. */ 297 + #define R_PPC64_NUM 107 298 + 299 + /* There's actually a third entry here, but it's unused */ 300 + struct ppc64_opd_entry 301 + { 302 + unsigned long funcaddr; 303 + unsigned long r2; 304 + }; 305 + 306 + 307 + #endif /* _UAPI_ASM_POWERPC_ELF_H */
+90
arch/powerpc/include/uapi/asm/kvm_para.h
··· 1 + /* 2 + * This program is free software; you can redistribute it and/or modify 3 + * it under the terms of the GNU General Public License, version 2, as 4 + * published by the Free Software Foundation. 5 + * 6 + * This program is distributed in the hope that it will be useful, 7 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 8 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 + * GNU General Public License for more details. 10 + * 11 + * You should have received a copy of the GNU General Public License 12 + * along with this program; if not, write to the Free Software 13 + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 14 + * 15 + * Copyright IBM Corp. 2008 16 + * 17 + * Authors: Hollis Blanchard <hollisb@us.ibm.com> 18 + */ 19 + 20 + #ifndef _UAPI__POWERPC_KVM_PARA_H__ 21 + #define _UAPI__POWERPC_KVM_PARA_H__ 22 + 23 + #include <linux/types.h> 24 + 25 + /* 26 + * Additions to this struct must only occur at the end, and should be 27 + * accompanied by a KVM_MAGIC_FEAT flag to advertise that they are present 28 + * (albeit not necessarily relevant to the current target hardware platform). 29 + * 30 + * Struct fields are always 32 or 64 bit aligned, depending on them being 32 31 + * or 64 bit wide respectively. 32 + * 33 + * See Documentation/virtual/kvm/ppc-pv.txt 34 + */ 35 + struct kvm_vcpu_arch_shared { 36 + __u64 scratch1; 37 + __u64 scratch2; 38 + __u64 scratch3; 39 + __u64 critical; /* Guest may not get interrupts if == r1 */ 40 + __u64 sprg0; 41 + __u64 sprg1; 42 + __u64 sprg2; 43 + __u64 sprg3; 44 + __u64 srr0; 45 + __u64 srr1; 46 + __u64 dar; /* dear on BookE */ 47 + __u64 msr; 48 + __u32 dsisr; 49 + __u32 int_pending; /* Tells the guest if we have an interrupt */ 50 + __u32 sr[16]; 51 + __u32 mas0; 52 + __u32 mas1; 53 + __u64 mas7_3; 54 + __u64 mas2; 55 + __u32 mas4; 56 + __u32 mas6; 57 + __u32 esr; 58 + __u32 pir; 59 + 60 + /* 61 + * SPRG4-7 are user-readable, so we can only keep these consistent 62 + * between the shared area and the real registers when there's an 63 + * intervening exit to KVM. This also applies to SPRG3 on some 64 + * chips. 65 + * 66 + * This suffices for access by guest userspace, since in PR-mode 67 + * KVM, an exit must occur when changing the guest's MSR[PR]. 68 + * If the guest kernel writes to SPRG3-7 via the shared area, it 69 + * must also use the shared area for reading while in kernel space. 70 + */ 71 + __u64 sprg4; 72 + __u64 sprg5; 73 + __u64 sprg6; 74 + __u64 sprg7; 75 + }; 76 + 77 + #define KVM_SC_MAGIC_R0 0x4b564d21 /* "KVM!" */ 78 + #define HC_VENDOR_KVM (42 << 16) 79 + #define HC_EV_SUCCESS 0 80 + #define HC_EV_UNIMPLEMENTED 12 81 + 82 + #define KVM_FEATURE_MAGIC_PAGE 1 83 + 84 + #define KVM_MAGIC_FEAT_SR (1 << 0) 85 + 86 + /* MASn, ESR, PIR, and high SPRGs */ 87 + #define KVM_MAGIC_FEAT_MAS0_TO_SPRG7 (1 << 1) 88 + 89 + 90 + #endif /* _UAPI__POWERPC_KVM_PARA_H__ */
+31
arch/powerpc/include/uapi/asm/mman.h
··· 1 + /* 2 + * This program is free software; you can redistribute it and/or 3 + * modify it under the terms of the GNU General Public License 4 + * as published by the Free Software Foundation; either version 5 + * 2 of the License, or (at your option) any later version. 6 + */ 7 + #ifndef _UAPI_ASM_POWERPC_MMAN_H 8 + #define _UAPI_ASM_POWERPC_MMAN_H 9 + 10 + #include <asm-generic/mman-common.h> 11 + 12 + 13 + #define PROT_SAO 0x10 /* Strong Access Ordering */ 14 + 15 + #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ 16 + #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ 17 + #define MAP_LOCKED 0x80 18 + 19 + #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ 20 + #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ 21 + #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ 22 + 23 + #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ 24 + #define MCL_FUTURE 0x4000 /* lock all additions to address space */ 25 + 26 + #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ 27 + #define MAP_NONBLOCK 0x10000 /* do not block on IO */ 28 + #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ 29 + #define MAP_HUGETLB 0x40000 /* create a huge page mapping */ 30 + 31 + #endif /* _UAPI_ASM_POWERPC_MMAN_H */
+62
arch/powerpc/include/uapi/asm/nvram.h
··· 1 + /* 2 + * NVRAM definitions and access functions. 3 + * 4 + * This program is free software; you can redistribute it and/or 5 + * modify it under the terms of the GNU General Public License 6 + * as published by the Free Software Foundation; either version 7 + * 2 of the License, or (at your option) any later version. 8 + */ 9 + 10 + #ifndef _UAPI_ASM_POWERPC_NVRAM_H 11 + #define _UAPI_ASM_POWERPC_NVRAM_H 12 + 13 + /* Signatures for nvram partitions */ 14 + #define NVRAM_SIG_SP 0x02 /* support processor */ 15 + #define NVRAM_SIG_OF 0x50 /* open firmware config */ 16 + #define NVRAM_SIG_FW 0x51 /* general firmware */ 17 + #define NVRAM_SIG_HW 0x52 /* hardware (VPD) */ 18 + #define NVRAM_SIG_FLIP 0x5a /* Apple flip/flop header */ 19 + #define NVRAM_SIG_APPL 0x5f /* Apple "system" (???) */ 20 + #define NVRAM_SIG_SYS 0x70 /* system env vars */ 21 + #define NVRAM_SIG_CFG 0x71 /* config data */ 22 + #define NVRAM_SIG_ELOG 0x72 /* error log */ 23 + #define NVRAM_SIG_VEND 0x7e /* vendor defined */ 24 + #define NVRAM_SIG_FREE 0x7f /* Free space */ 25 + #define NVRAM_SIG_OS 0xa0 /* OS defined */ 26 + #define NVRAM_SIG_PANIC 0xa1 /* Apple OSX "panic" */ 27 + 28 + 29 + /* PowerMac specific nvram stuffs */ 30 + 31 + enum { 32 + pmac_nvram_OF, /* Open Firmware partition */ 33 + pmac_nvram_XPRAM, /* MacOS XPRAM partition */ 34 + pmac_nvram_NR /* MacOS Name Registry partition */ 35 + }; 36 + 37 + 38 + /* Some offsets in XPRAM */ 39 + #define PMAC_XPRAM_MACHINE_LOC 0xe4 40 + #define PMAC_XPRAM_SOUND_VOLUME 0x08 41 + 42 + /* Machine location structure in PowerMac XPRAM */ 43 + struct pmac_machine_location { 44 + unsigned int latitude; /* 2+30 bit Fractional number */ 45 + unsigned int longitude; /* 2+30 bit Fractional number */ 46 + unsigned int delta; /* mix of GMT delta and DLS */ 47 + }; 48 + 49 + /* 50 + * /dev/nvram ioctls 51 + * 52 + * Note that PMAC_NVRAM_GET_OFFSET is still supported, but is 53 + * definitely obsolete. Do not use it if you can avoid it 54 + */ 55 + 56 + #define OBSOLETE_PMAC_NVRAM_GET_OFFSET \ 57 + _IOWR('p', 0x40, int) 58 + 59 + #define IOC_NVRAM_GET_OFFSET _IOWR('p', 0x42, int) /* Get NVRAM partition offset */ 60 + #define IOC_NVRAM_SYNC _IO('p', 0x43) /* Sync NVRAM image */ 61 + 62 + #endif /* _UAPI_ASM_POWERPC_NVRAM_H */
+259
arch/powerpc/include/uapi/asm/ptrace.h
··· 1 + /* 2 + * Copyright (C) 2001 PPC64 Team, IBM Corp 3 + * 4 + * This struct defines the way the registers are stored on the 5 + * kernel stack during a system call or other kernel entry. 6 + * 7 + * this should only contain volatile regs 8 + * since we can keep non-volatile in the thread_struct 9 + * should set this up when only volatiles are saved 10 + * by intr code. 11 + * 12 + * Since this is going on the stack, *CARE MUST BE TAKEN* to insure 13 + * that the overall structure is a multiple of 16 bytes in length. 14 + * 15 + * Note that the offsets of the fields in this struct correspond with 16 + * the PT_* values below. This simplifies arch/powerpc/kernel/ptrace.c. 17 + * 18 + * This program is free software; you can redistribute it and/or 19 + * modify it under the terms of the GNU General Public License 20 + * as published by the Free Software Foundation; either version 21 + * 2 of the License, or (at your option) any later version. 22 + */ 23 + #ifndef _UAPI_ASM_POWERPC_PTRACE_H 24 + #define _UAPI_ASM_POWERPC_PTRACE_H 25 + 26 + 27 + #include <linux/types.h> 28 + 29 + #ifndef __ASSEMBLY__ 30 + 31 + struct pt_regs { 32 + unsigned long gpr[32]; 33 + unsigned long nip; 34 + unsigned long msr; 35 + unsigned long orig_gpr3; /* Used for restarting system calls */ 36 + unsigned long ctr; 37 + unsigned long link; 38 + unsigned long xer; 39 + unsigned long ccr; 40 + #ifdef __powerpc64__ 41 + unsigned long softe; /* Soft enabled/disabled */ 42 + #else 43 + unsigned long mq; /* 601 only (not used at present) */ 44 + /* Used on APUS to hold IPL value. */ 45 + #endif 46 + unsigned long trap; /* Reason for being here */ 47 + /* N.B. for critical exceptions on 4xx, the dar and dsisr 48 + fields are overloaded to hold srr0 and srr1. */ 49 + unsigned long dar; /* Fault registers */ 50 + unsigned long dsisr; /* on 4xx/Book-E used for ESR */ 51 + unsigned long result; /* Result of a system call */ 52 + }; 53 + 54 + #endif /* __ASSEMBLY__ */ 55 + 56 + 57 + /* 58 + * Offsets used by 'ptrace' system call interface. 59 + * These can't be changed without breaking binary compatibility 60 + * with MkLinux, etc. 61 + */ 62 + #define PT_R0 0 63 + #define PT_R1 1 64 + #define PT_R2 2 65 + #define PT_R3 3 66 + #define PT_R4 4 67 + #define PT_R5 5 68 + #define PT_R6 6 69 + #define PT_R7 7 70 + #define PT_R8 8 71 + #define PT_R9 9 72 + #define PT_R10 10 73 + #define PT_R11 11 74 + #define PT_R12 12 75 + #define PT_R13 13 76 + #define PT_R14 14 77 + #define PT_R15 15 78 + #define PT_R16 16 79 + #define PT_R17 17 80 + #define PT_R18 18 81 + #define PT_R19 19 82 + #define PT_R20 20 83 + #define PT_R21 21 84 + #define PT_R22 22 85 + #define PT_R23 23 86 + #define PT_R24 24 87 + #define PT_R25 25 88 + #define PT_R26 26 89 + #define PT_R27 27 90 + #define PT_R28 28 91 + #define PT_R29 29 92 + #define PT_R30 30 93 + #define PT_R31 31 94 + 95 + #define PT_NIP 32 96 + #define PT_MSR 33 97 + #define PT_ORIG_R3 34 98 + #define PT_CTR 35 99 + #define PT_LNK 36 100 + #define PT_XER 37 101 + #define PT_CCR 38 102 + #ifndef __powerpc64__ 103 + #define PT_MQ 39 104 + #else 105 + #define PT_SOFTE 39 106 + #endif 107 + #define PT_TRAP 40 108 + #define PT_DAR 41 109 + #define PT_DSISR 42 110 + #define PT_RESULT 43 111 + #define PT_REGS_COUNT 44 112 + 113 + #define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ 114 + 115 + #ifndef __powerpc64__ 116 + 117 + #define PT_FPR31 (PT_FPR0 + 2*31) 118 + #define PT_FPSCR (PT_FPR0 + 2*32 + 1) 119 + 120 + #else /* __powerpc64__ */ 121 + 122 + #define PT_FPSCR (PT_FPR0 + 32) /* each FP reg occupies 1 slot in 64-bit space */ 123 + 124 + 125 + #define PT_VR0 82 /* each Vector reg occupies 2 slots in 64-bit */ 126 + #define PT_VSCR (PT_VR0 + 32*2 + 1) 127 + #define PT_VRSAVE (PT_VR0 + 33*2) 128 + 129 + 130 + /* 131 + * Only store first 32 VSRs here. The second 32 VSRs in VR0-31 132 + */ 133 + #define PT_VSR0 150 /* each VSR reg occupies 2 slots in 64-bit */ 134 + #define PT_VSR31 (PT_VSR0 + 2*31) 135 + #endif /* __powerpc64__ */ 136 + 137 + /* 138 + * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go. 139 + * The transfer totals 34 quadword. Quadwords 0-31 contain the 140 + * corresponding vector registers. Quadword 32 contains the vscr as the 141 + * last word (offset 12) within that quadword. Quadword 33 contains the 142 + * vrsave as the first word (offset 0) within the quadword. 143 + * 144 + * This definition of the VMX state is compatible with the current PPC32 145 + * ptrace interface. This allows signal handling and ptrace to use the same 146 + * structures. This also simplifies the implementation of a bi-arch 147 + * (combined (32- and 64-bit) gdb. 148 + */ 149 + #define PTRACE_GETVRREGS 18 150 + #define PTRACE_SETVRREGS 19 151 + 152 + /* Get/set all the upper 32-bits of the SPE registers, accumulator, and 153 + * spefscr, in one go */ 154 + #define PTRACE_GETEVRREGS 20 155 + #define PTRACE_SETEVRREGS 21 156 + 157 + /* Get the first 32 128bit VSX registers */ 158 + #define PTRACE_GETVSRREGS 27 159 + #define PTRACE_SETVSRREGS 28 160 + 161 + /* 162 + * Get or set a debug register. The first 16 are DABR registers and the 163 + * second 16 are IABR registers. 164 + */ 165 + #define PTRACE_GET_DEBUGREG 25 166 + #define PTRACE_SET_DEBUGREG 26 167 + 168 + /* (new) PTRACE requests using the same numbers as x86 and the same 169 + * argument ordering. Additionally, they support more registers too 170 + */ 171 + #define PTRACE_GETREGS 12 172 + #define PTRACE_SETREGS 13 173 + #define PTRACE_GETFPREGS 14 174 + #define PTRACE_SETFPREGS 15 175 + #define PTRACE_GETREGS64 22 176 + #define PTRACE_SETREGS64 23 177 + 178 + /* Calls to trace a 64bit program from a 32bit program */ 179 + #define PPC_PTRACE_PEEKTEXT_3264 0x95 180 + #define PPC_PTRACE_PEEKDATA_3264 0x94 181 + #define PPC_PTRACE_POKETEXT_3264 0x93 182 + #define PPC_PTRACE_POKEDATA_3264 0x92 183 + #define PPC_PTRACE_PEEKUSR_3264 0x91 184 + #define PPC_PTRACE_POKEUSR_3264 0x90 185 + 186 + #define PTRACE_SINGLEBLOCK 0x100 /* resume execution until next branch */ 187 + 188 + #define PPC_PTRACE_GETHWDBGINFO 0x89 189 + #define PPC_PTRACE_SETHWDEBUG 0x88 190 + #define PPC_PTRACE_DELHWDEBUG 0x87 191 + 192 + #ifndef __ASSEMBLY__ 193 + 194 + struct ppc_debug_info { 195 + __u32 version; /* Only version 1 exists to date */ 196 + __u32 num_instruction_bps; 197 + __u32 num_data_bps; 198 + __u32 num_condition_regs; 199 + __u32 data_bp_alignment; 200 + __u32 sizeof_condition; /* size of the DVC register */ 201 + __u64 features; 202 + }; 203 + 204 + #endif /* __ASSEMBLY__ */ 205 + 206 + /* 207 + * features will have bits indication whether there is support for: 208 + */ 209 + #define PPC_DEBUG_FEATURE_INSN_BP_RANGE 0x0000000000000001 210 + #define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x0000000000000002 211 + #define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x0000000000000004 212 + #define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x0000000000000008 213 + 214 + #ifndef __ASSEMBLY__ 215 + 216 + struct ppc_hw_breakpoint { 217 + __u32 version; /* currently, version must be 1 */ 218 + __u32 trigger_type; /* only some combinations allowed */ 219 + __u32 addr_mode; /* address match mode */ 220 + __u32 condition_mode; /* break/watchpoint condition flags */ 221 + __u64 addr; /* break/watchpoint address */ 222 + __u64 addr2; /* range end or mask */ 223 + __u64 condition_value; /* contents of the DVC register */ 224 + }; 225 + 226 + #endif /* __ASSEMBLY__ */ 227 + 228 + /* 229 + * Trigger Type 230 + */ 231 + #define PPC_BREAKPOINT_TRIGGER_EXECUTE 0x00000001 232 + #define PPC_BREAKPOINT_TRIGGER_READ 0x00000002 233 + #define PPC_BREAKPOINT_TRIGGER_WRITE 0x00000004 234 + #define PPC_BREAKPOINT_TRIGGER_RW \ 235 + (PPC_BREAKPOINT_TRIGGER_READ | PPC_BREAKPOINT_TRIGGER_WRITE) 236 + 237 + /* 238 + * Address Mode 239 + */ 240 + #define PPC_BREAKPOINT_MODE_EXACT 0x00000000 241 + #define PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE 0x00000001 242 + #define PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE 0x00000002 243 + #define PPC_BREAKPOINT_MODE_MASK 0x00000003 244 + 245 + /* 246 + * Condition Mode 247 + */ 248 + #define PPC_BREAKPOINT_CONDITION_MODE 0x00000003 249 + #define PPC_BREAKPOINT_CONDITION_NONE 0x00000000 250 + #define PPC_BREAKPOINT_CONDITION_AND 0x00000001 251 + #define PPC_BREAKPOINT_CONDITION_EXACT PPC_BREAKPOINT_CONDITION_AND 252 + #define PPC_BREAKPOINT_CONDITION_OR 0x00000002 253 + #define PPC_BREAKPOINT_CONDITION_AND_OR 0x00000003 254 + #define PPC_BREAKPOINT_CONDITION_BE_ALL 0x00ff0000 255 + #define PPC_BREAKPOINT_CONDITION_BE_SHIFT 16 256 + #define PPC_BREAKPOINT_CONDITION_BE(n) \ 257 + (1<<((n)+PPC_BREAKPOINT_CONDITION_BE_SHIFT)) 258 + 259 + #endif /* _UAPI_ASM_POWERPC_PTRACE_H */
+145
arch/powerpc/include/uapi/asm/signal.h
··· 1 + #ifndef _UAPI_ASM_POWERPC_SIGNAL_H 2 + #define _UAPI_ASM_POWERPC_SIGNAL_H 3 + 4 + #include <linux/types.h> 5 + 6 + #define _NSIG 64 7 + #ifdef __powerpc64__ 8 + #define _NSIG_BPW 64 9 + #else 10 + #define _NSIG_BPW 32 11 + #endif 12 + #define _NSIG_WORDS (_NSIG / _NSIG_BPW) 13 + 14 + typedef unsigned long old_sigset_t; /* at least 32 bits */ 15 + 16 + typedef struct { 17 + unsigned long sig[_NSIG_WORDS]; 18 + } sigset_t; 19 + 20 + #define SIGHUP 1 21 + #define SIGINT 2 22 + #define SIGQUIT 3 23 + #define SIGILL 4 24 + #define SIGTRAP 5 25 + #define SIGABRT 6 26 + #define SIGIOT 6 27 + #define SIGBUS 7 28 + #define SIGFPE 8 29 + #define SIGKILL 9 30 + #define SIGUSR1 10 31 + #define SIGSEGV 11 32 + #define SIGUSR2 12 33 + #define SIGPIPE 13 34 + #define SIGALRM 14 35 + #define SIGTERM 15 36 + #define SIGSTKFLT 16 37 + #define SIGCHLD 17 38 + #define SIGCONT 18 39 + #define SIGSTOP 19 40 + #define SIGTSTP 20 41 + #define SIGTTIN 21 42 + #define SIGTTOU 22 43 + #define SIGURG 23 44 + #define SIGXCPU 24 45 + #define SIGXFSZ 25 46 + #define SIGVTALRM 26 47 + #define SIGPROF 27 48 + #define SIGWINCH 28 49 + #define SIGIO 29 50 + #define SIGPOLL SIGIO 51 + /* 52 + #define SIGLOST 29 53 + */ 54 + #define SIGPWR 30 55 + #define SIGSYS 31 56 + #define SIGUNUSED 31 57 + 58 + /* These should not be considered constants from userland. */ 59 + #define SIGRTMIN 32 60 + #define SIGRTMAX _NSIG 61 + 62 + /* 63 + * SA_FLAGS values: 64 + * 65 + * SA_ONSTACK is not currently supported, but will allow sigaltstack(2). 66 + * SA_RESTART flag to get restarting signals (which were the default long ago) 67 + * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 68 + * SA_RESETHAND clears the handler when the signal is delivered. 69 + * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. 70 + * SA_NODEFER prevents the current signal from being masked in the handler. 71 + * 72 + * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single 73 + * Unix names RESETHAND and NODEFER respectively. 74 + */ 75 + #define SA_NOCLDSTOP 0x00000001U 76 + #define SA_NOCLDWAIT 0x00000002U 77 + #define SA_SIGINFO 0x00000004U 78 + #define SA_ONSTACK 0x08000000U 79 + #define SA_RESTART 0x10000000U 80 + #define SA_NODEFER 0x40000000U 81 + #define SA_RESETHAND 0x80000000U 82 + 83 + #define SA_NOMASK SA_NODEFER 84 + #define SA_ONESHOT SA_RESETHAND 85 + 86 + #define SA_RESTORER 0x04000000U 87 + 88 + /* 89 + * sigaltstack controls 90 + */ 91 + #define SS_ONSTACK 1 92 + #define SS_DISABLE 2 93 + 94 + #define MINSIGSTKSZ 2048 95 + #define SIGSTKSZ 8192 96 + 97 + #include <asm-generic/signal-defs.h> 98 + 99 + struct old_sigaction { 100 + __sighandler_t sa_handler; 101 + old_sigset_t sa_mask; 102 + unsigned long sa_flags; 103 + __sigrestore_t sa_restorer; 104 + }; 105 + 106 + struct sigaction { 107 + __sighandler_t sa_handler; 108 + unsigned long sa_flags; 109 + __sigrestore_t sa_restorer; 110 + sigset_t sa_mask; /* mask last for extensibility */ 111 + }; 112 + 113 + struct k_sigaction { 114 + struct sigaction sa; 115 + }; 116 + 117 + typedef struct sigaltstack { 118 + void __user *ss_sp; 119 + int ss_flags; 120 + size_t ss_size; 121 + } stack_t; 122 + 123 + 124 + #ifndef __powerpc64__ 125 + /* 126 + * These are parameters to dbg_sigreturn syscall. They enable or 127 + * disable certain debugging things that can be done from signal 128 + * handlers. The dbg_sigreturn syscall *must* be called from a 129 + * SA_SIGINFO signal so the ucontext can be passed to it. It takes an 130 + * array of struct sig_dbg_op, which has the debug operations to 131 + * perform before returning from the signal. 132 + */ 133 + struct sig_dbg_op { 134 + int dbg_type; 135 + unsigned long dbg_value; 136 + }; 137 + 138 + /* Enable or disable single-stepping. The value sets the state. */ 139 + #define SIG_DBG_SINGLE_STEPPING 1 140 + 141 + /* Enable or disable branch tracing. The value sets the state. */ 142 + #define SIG_DBG_BRANCH_TRACING 2 143 + #endif /* ! __powerpc64__ */ 144 + 145 + #endif /* _UAPI_ASM_POWERPC_SIGNAL_H */
+53
arch/powerpc/include/uapi/asm/spu_info.h
··· 1 + /* 2 + * SPU info structures 3 + * 4 + * (C) Copyright 2006 IBM Corp. 5 + * 6 + * Author: Dwayne Grant McConnell <decimal@us.ibm.com> 7 + * 8 + * This program is free software; you can redistribute it and/or modify 9 + * it under the terms of the GNU General Public License as published by 10 + * the Free Software Foundation; either version 2, or (at your option) 11 + * any later version. 12 + * 13 + * This program is distributed in the hope that it will be useful, 14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 + * GNU General Public License for more details. 17 + * 18 + * You should have received a copy of the GNU General Public License 19 + * along with this program; if not, write to the Free Software 20 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 + */ 22 + 23 + #ifndef _UAPI_SPU_INFO_H 24 + #define _UAPI_SPU_INFO_H 25 + 26 + #include <linux/types.h> 27 + 28 + #ifndef __KERNEL__ 29 + struct mfc_cq_sr { 30 + __u64 mfc_cq_data0_RW; 31 + __u64 mfc_cq_data1_RW; 32 + __u64 mfc_cq_data2_RW; 33 + __u64 mfc_cq_data3_RW; 34 + }; 35 + #endif /* __KERNEL__ */ 36 + 37 + struct spu_dma_info { 38 + __u64 dma_info_type; 39 + __u64 dma_info_mask; 40 + __u64 dma_info_status; 41 + __u64 dma_info_stall_and_notify; 42 + __u64 dma_info_atomic_command_status; 43 + struct mfc_cq_sr dma_info_command_data[16]; 44 + }; 45 + 46 + struct spu_proxydma_info { 47 + __u64 proxydma_info_type; 48 + __u64 proxydma_info_mask; 49 + __u64 proxydma_info_status; 50 + struct mfc_cq_sr proxydma_info_command_data[8]; 51 + }; 52 + 53 + #endif /* _UAPI_SPU_INFO_H */
+23
arch/powerpc/include/uapi/asm/swab.h
··· 1 + /* 2 + * This program is free software; you can redistribute it and/or 3 + * modify it under the terms of the GNU General Public License 4 + * as published by the Free Software Foundation; either version 5 + * 2 of the License, or (at your option) any later version. 6 + */ 7 + #ifndef _UAPI_ASM_POWERPC_SWAB_H 8 + #define _UAPI_ASM_POWERPC_SWAB_H 9 + 10 + 11 + #include <linux/types.h> 12 + #include <linux/compiler.h> 13 + 14 + #ifdef __GNUC__ 15 + 16 + #ifndef __powerpc64__ 17 + #define __SWAB_64_THRU_32__ 18 + #endif /* __powerpc64__ */ 19 + 20 + 21 + #endif /* __GNUC__ */ 22 + 23 + #endif /* _UAPI_ASM_POWERPC_SWAB_H */
+76
arch/powerpc/include/uapi/asm/termios.h
··· 1 + /* 2 + * Liberally adapted from alpha/termios.h. In particular, the c_cc[] 3 + * fields have been reordered so that termio & termios share the 4 + * common subset in the same order (for brain dead programs that don't 5 + * know or care about the differences). 6 + * 7 + * This program is free software; you can redistribute it and/or 8 + * modify it under the terms of the GNU General Public License 9 + * as published by the Free Software Foundation; either version 10 + * 2 of the License, or (at your option) any later version. 11 + */ 12 + #ifndef _UAPI_ASM_POWERPC_TERMIOS_H 13 + #define _UAPI_ASM_POWERPC_TERMIOS_H 14 + 15 + 16 + #include <asm/ioctls.h> 17 + #include <asm/termbits.h> 18 + 19 + struct sgttyb { 20 + char sg_ispeed; 21 + char sg_ospeed; 22 + char sg_erase; 23 + char sg_kill; 24 + short sg_flags; 25 + }; 26 + 27 + struct tchars { 28 + char t_intrc; 29 + char t_quitc; 30 + char t_startc; 31 + char t_stopc; 32 + char t_eofc; 33 + char t_brkc; 34 + }; 35 + 36 + struct ltchars { 37 + char t_suspc; 38 + char t_dsuspc; 39 + char t_rprntc; 40 + char t_flushc; 41 + char t_werasc; 42 + char t_lnextc; 43 + }; 44 + 45 + struct winsize { 46 + unsigned short ws_row; 47 + unsigned short ws_col; 48 + unsigned short ws_xpixel; 49 + unsigned short ws_ypixel; 50 + }; 51 + 52 + #define NCC 10 53 + struct termio { 54 + unsigned short c_iflag; /* input mode flags */ 55 + unsigned short c_oflag; /* output mode flags */ 56 + unsigned short c_cflag; /* control mode flags */ 57 + unsigned short c_lflag; /* local mode flags */ 58 + unsigned char c_line; /* line discipline */ 59 + unsigned char c_cc[NCC]; /* control characters */ 60 + }; 61 + 62 + /* c_cc characters */ 63 + #define _VINTR 0 64 + #define _VQUIT 1 65 + #define _VERASE 2 66 + #define _VKILL 3 67 + #define _VEOF 4 68 + #define _VMIN 5 69 + #define _VEOL 6 70 + #define _VTIME 7 71 + #define _VEOL2 8 72 + #define _VSWTC 9 73 + 74 + 75 + 76 + #endif /* _UAPI_ASM_POWERPC_TERMIOS_H */
+40
arch/powerpc/include/uapi/asm/types.h
··· 1 + /* 2 + * This file is never included by application software unless 3 + * explicitly requested (e.g., via linux/types.h) in which case the 4 + * application is Linux specific so (user-) name space pollution is 5 + * not a major issue. However, for interoperability, libraries still 6 + * need to be careful to avoid a name clashes. 7 + * 8 + * This program is free software; you can redistribute it and/or 9 + * modify it under the terms of the GNU General Public License 10 + * as published by the Free Software Foundation; either version 11 + * 2 of the License, or (at your option) any later version. 12 + */ 13 + #ifndef _UAPI_ASM_POWERPC_TYPES_H 14 + #define _UAPI_ASM_POWERPC_TYPES_H 15 + 16 + /* 17 + * This is here because we used to use l64 for 64bit powerpc 18 + * and we don't want to impact user mode with our change to ll64 19 + * in the kernel. 20 + * 21 + * However, some user programs are fine with this. They can 22 + * flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here. 23 + */ 24 + #if !defined(__SANE_USERSPACE_TYPES__) && defined(__powerpc64__) && !defined(__KERNEL__) 25 + # include <asm-generic/int-l64.h> 26 + #else 27 + # include <asm-generic/int-ll64.h> 28 + #endif 29 + 30 + #ifndef __ASSEMBLY__ 31 + 32 + 33 + typedef struct { 34 + __u32 u[4]; 35 + } __attribute__((aligned(16))) __vector128; 36 + 37 + #endif /* __ASSEMBLY__ */ 38 + 39 + 40 + #endif /* _UAPI_ASM_POWERPC_TYPES_H */
+380
arch/powerpc/include/uapi/asm/unistd.h
··· 1 + /* 2 + * This file contains the system call numbers. 3 + * 4 + * This program is free software; you can redistribute it and/or 5 + * modify it under the terms of the GNU General Public License 6 + * as published by the Free Software Foundation; either version 7 + * 2 of the License, or (at your option) any later version. 8 + */ 9 + #ifndef _UAPI_ASM_POWERPC_UNISTD_H_ 10 + #define _UAPI_ASM_POWERPC_UNISTD_H_ 11 + 12 + 13 + #define __NR_restart_syscall 0 14 + #define __NR_exit 1 15 + #define __NR_fork 2 16 + #define __NR_read 3 17 + #define __NR_write 4 18 + #define __NR_open 5 19 + #define __NR_close 6 20 + #define __NR_waitpid 7 21 + #define __NR_creat 8 22 + #define __NR_link 9 23 + #define __NR_unlink 10 24 + #define __NR_execve 11 25 + #define __NR_chdir 12 26 + #define __NR_time 13 27 + #define __NR_mknod 14 28 + #define __NR_chmod 15 29 + #define __NR_lchown 16 30 + #define __NR_break 17 31 + #define __NR_oldstat 18 32 + #define __NR_lseek 19 33 + #define __NR_getpid 20 34 + #define __NR_mount 21 35 + #define __NR_umount 22 36 + #define __NR_setuid 23 37 + #define __NR_getuid 24 38 + #define __NR_stime 25 39 + #define __NR_ptrace 26 40 + #define __NR_alarm 27 41 + #define __NR_oldfstat 28 42 + #define __NR_pause 29 43 + #define __NR_utime 30 44 + #define __NR_stty 31 45 + #define __NR_gtty 32 46 + #define __NR_access 33 47 + #define __NR_nice 34 48 + #define __NR_ftime 35 49 + #define __NR_sync 36 50 + #define __NR_kill 37 51 + #define __NR_rename 38 52 + #define __NR_mkdir 39 53 + #define __NR_rmdir 40 54 + #define __NR_dup 41 55 + #define __NR_pipe 42 56 + #define __NR_times 43 57 + #define __NR_prof 44 58 + #define __NR_brk 45 59 + #define __NR_setgid 46 60 + #define __NR_getgid 47 61 + #define __NR_signal 48 62 + #define __NR_geteuid 49 63 + #define __NR_getegid 50 64 + #define __NR_acct 51 65 + #define __NR_umount2 52 66 + #define __NR_lock 53 67 + #define __NR_ioctl 54 68 + #define __NR_fcntl 55 69 + #define __NR_mpx 56 70 + #define __NR_setpgid 57 71 + #define __NR_ulimit 58 72 + #define __NR_oldolduname 59 73 + #define __NR_umask 60 74 + #define __NR_chroot 61 75 + #define __NR_ustat 62 76 + #define __NR_dup2 63 77 + #define __NR_getppid 64 78 + #define __NR_getpgrp 65 79 + #define __NR_setsid 66 80 + #define __NR_sigaction 67 81 + #define __NR_sgetmask 68 82 + #define __NR_ssetmask 69 83 + #define __NR_setreuid 70 84 + #define __NR_setregid 71 85 + #define __NR_sigsuspend 72 86 + #define __NR_sigpending 73 87 + #define __NR_sethostname 74 88 + #define __NR_setrlimit 75 89 + #define __NR_getrlimit 76 90 + #define __NR_getrusage 77 91 + #define __NR_gettimeofday 78 92 + #define __NR_settimeofday 79 93 + #define __NR_getgroups 80 94 + #define __NR_setgroups 81 95 + #define __NR_select 82 96 + #define __NR_symlink 83 97 + #define __NR_oldlstat 84 98 + #define __NR_readlink 85 99 + #define __NR_uselib 86 100 + #define __NR_swapon 87 101 + #define __NR_reboot 88 102 + #define __NR_readdir 89 103 + #define __NR_mmap 90 104 + #define __NR_munmap 91 105 + #define __NR_truncate 92 106 + #define __NR_ftruncate 93 107 + #define __NR_fchmod 94 108 + #define __NR_fchown 95 109 + #define __NR_getpriority 96 110 + #define __NR_setpriority 97 111 + #define __NR_profil 98 112 + #define __NR_statfs 99 113 + #define __NR_fstatfs 100 114 + #define __NR_ioperm 101 115 + #define __NR_socketcall 102 116 + #define __NR_syslog 103 117 + #define __NR_setitimer 104 118 + #define __NR_getitimer 105 119 + #define __NR_stat 106 120 + #define __NR_lstat 107 121 + #define __NR_fstat 108 122 + #define __NR_olduname 109 123 + #define __NR_iopl 110 124 + #define __NR_vhangup 111 125 + #define __NR_idle 112 126 + #define __NR_vm86 113 127 + #define __NR_wait4 114 128 + #define __NR_swapoff 115 129 + #define __NR_sysinfo 116 130 + #define __NR_ipc 117 131 + #define __NR_fsync 118 132 + #define __NR_sigreturn 119 133 + #define __NR_clone 120 134 + #define __NR_setdomainname 121 135 + #define __NR_uname 122 136 + #define __NR_modify_ldt 123 137 + #define __NR_adjtimex 124 138 + #define __NR_mprotect 125 139 + #define __NR_sigprocmask 126 140 + #define __NR_create_module 127 141 + #define __NR_init_module 128 142 + #define __NR_delete_module 129 143 + #define __NR_get_kernel_syms 130 144 + #define __NR_quotactl 131 145 + #define __NR_getpgid 132 146 + #define __NR_fchdir 133 147 + #define __NR_bdflush 134 148 + #define __NR_sysfs 135 149 + #define __NR_personality 136 150 + #define __NR_afs_syscall 137 /* Syscall for Andrew File System */ 151 + #define __NR_setfsuid 138 152 + #define __NR_setfsgid 139 153 + #define __NR__llseek 140 154 + #define __NR_getdents 141 155 + #define __NR__newselect 142 156 + #define __NR_flock 143 157 + #define __NR_msync 144 158 + #define __NR_readv 145 159 + #define __NR_writev 146 160 + #define __NR_getsid 147 161 + #define __NR_fdatasync 148 162 + #define __NR__sysctl 149 163 + #define __NR_mlock 150 164 + #define __NR_munlock 151 165 + #define __NR_mlockall 152 166 + #define __NR_munlockall 153 167 + #define __NR_sched_setparam 154 168 + #define __NR_sched_getparam 155 169 + #define __NR_sched_setscheduler 156 170 + #define __NR_sched_getscheduler 157 171 + #define __NR_sched_yield 158 172 + #define __NR_sched_get_priority_max 159 173 + #define __NR_sched_get_priority_min 160 174 + #define __NR_sched_rr_get_interval 161 175 + #define __NR_nanosleep 162 176 + #define __NR_mremap 163 177 + #define __NR_setresuid 164 178 + #define __NR_getresuid 165 179 + #define __NR_query_module 166 180 + #define __NR_poll 167 181 + #define __NR_nfsservctl 168 182 + #define __NR_setresgid 169 183 + #define __NR_getresgid 170 184 + #define __NR_prctl 171 185 + #define __NR_rt_sigreturn 172 186 + #define __NR_rt_sigaction 173 187 + #define __NR_rt_sigprocmask 174 188 + #define __NR_rt_sigpending 175 189 + #define __NR_rt_sigtimedwait 176 190 + #define __NR_rt_sigqueueinfo 177 191 + #define __NR_rt_sigsuspend 178 192 + #define __NR_pread64 179 193 + #define __NR_pwrite64 180 194 + #define __NR_chown 181 195 + #define __NR_getcwd 182 196 + #define __NR_capget 183 197 + #define __NR_capset 184 198 + #define __NR_sigaltstack 185 199 + #define __NR_sendfile 186 200 + #define __NR_getpmsg 187 /* some people actually want streams */ 201 + #define __NR_putpmsg 188 /* some people actually want streams */ 202 + #define __NR_vfork 189 203 + #define __NR_ugetrlimit 190 /* SuS compliant getrlimit */ 204 + #define __NR_readahead 191 205 + #ifndef __powerpc64__ /* these are 32-bit only */ 206 + #define __NR_mmap2 192 207 + #define __NR_truncate64 193 208 + #define __NR_ftruncate64 194 209 + #define __NR_stat64 195 210 + #define __NR_lstat64 196 211 + #define __NR_fstat64 197 212 + #endif 213 + #define __NR_pciconfig_read 198 214 + #define __NR_pciconfig_write 199 215 + #define __NR_pciconfig_iobase 200 216 + #define __NR_multiplexer 201 217 + #define __NR_getdents64 202 218 + #define __NR_pivot_root 203 219 + #ifndef __powerpc64__ 220 + #define __NR_fcntl64 204 221 + #endif 222 + #define __NR_madvise 205 223 + #define __NR_mincore 206 224 + #define __NR_gettid 207 225 + #define __NR_tkill 208 226 + #define __NR_setxattr 209 227 + #define __NR_lsetxattr 210 228 + #define __NR_fsetxattr 211 229 + #define __NR_getxattr 212 230 + #define __NR_lgetxattr 213 231 + #define __NR_fgetxattr 214 232 + #define __NR_listxattr 215 233 + #define __NR_llistxattr 216 234 + #define __NR_flistxattr 217 235 + #define __NR_removexattr 218 236 + #define __NR_lremovexattr 219 237 + #define __NR_fremovexattr 220 238 + #define __NR_futex 221 239 + #define __NR_sched_setaffinity 222 240 + #define __NR_sched_getaffinity 223 241 + /* 224 currently unused */ 242 + #define __NR_tuxcall 225 243 + #ifndef __powerpc64__ 244 + #define __NR_sendfile64 226 245 + #endif 246 + #define __NR_io_setup 227 247 + #define __NR_io_destroy 228 248 + #define __NR_io_getevents 229 249 + #define __NR_io_submit 230 250 + #define __NR_io_cancel 231 251 + #define __NR_set_tid_address 232 252 + #define __NR_fadvise64 233 253 + #define __NR_exit_group 234 254 + #define __NR_lookup_dcookie 235 255 + #define __NR_epoll_create 236 256 + #define __NR_epoll_ctl 237 257 + #define __NR_epoll_wait 238 258 + #define __NR_remap_file_pages 239 259 + #define __NR_timer_create 240 260 + #define __NR_timer_settime 241 261 + #define __NR_timer_gettime 242 262 + #define __NR_timer_getoverrun 243 263 + #define __NR_timer_delete 244 264 + #define __NR_clock_settime 245 265 + #define __NR_clock_gettime 246 266 + #define __NR_clock_getres 247 267 + #define __NR_clock_nanosleep 248 268 + #define __NR_swapcontext 249 269 + #define __NR_tgkill 250 270 + #define __NR_utimes 251 271 + #define __NR_statfs64 252 272 + #define __NR_fstatfs64 253 273 + #ifndef __powerpc64__ 274 + #define __NR_fadvise64_64 254 275 + #endif 276 + #define __NR_rtas 255 277 + #define __NR_sys_debug_setcontext 256 278 + /* Number 257 is reserved for vserver */ 279 + #define __NR_migrate_pages 258 280 + #define __NR_mbind 259 281 + #define __NR_get_mempolicy 260 282 + #define __NR_set_mempolicy 261 283 + #define __NR_mq_open 262 284 + #define __NR_mq_unlink 263 285 + #define __NR_mq_timedsend 264 286 + #define __NR_mq_timedreceive 265 287 + #define __NR_mq_notify 266 288 + #define __NR_mq_getsetattr 267 289 + #define __NR_kexec_load 268 290 + #define __NR_add_key 269 291 + #define __NR_request_key 270 292 + #define __NR_keyctl 271 293 + #define __NR_waitid 272 294 + #define __NR_ioprio_set 273 295 + #define __NR_ioprio_get 274 296 + #define __NR_inotify_init 275 297 + #define __NR_inotify_add_watch 276 298 + #define __NR_inotify_rm_watch 277 299 + #define __NR_spu_run 278 300 + #define __NR_spu_create 279 301 + #define __NR_pselect6 280 302 + #define __NR_ppoll 281 303 + #define __NR_unshare 282 304 + #define __NR_splice 283 305 + #define __NR_tee 284 306 + #define __NR_vmsplice 285 307 + #define __NR_openat 286 308 + #define __NR_mkdirat 287 309 + #define __NR_mknodat 288 310 + #define __NR_fchownat 289 311 + #define __NR_futimesat 290 312 + #ifdef __powerpc64__ 313 + #define __NR_newfstatat 291 314 + #else 315 + #define __NR_fstatat64 291 316 + #endif 317 + #define __NR_unlinkat 292 318 + #define __NR_renameat 293 319 + #define __NR_linkat 294 320 + #define __NR_symlinkat 295 321 + #define __NR_readlinkat 296 322 + #define __NR_fchmodat 297 323 + #define __NR_faccessat 298 324 + #define __NR_get_robust_list 299 325 + #define __NR_set_robust_list 300 326 + #define __NR_move_pages 301 327 + #define __NR_getcpu 302 328 + #define __NR_epoll_pwait 303 329 + #define __NR_utimensat 304 330 + #define __NR_signalfd 305 331 + #define __NR_timerfd_create 306 332 + #define __NR_eventfd 307 333 + #define __NR_sync_file_range2 308 334 + #define __NR_fallocate 309 335 + #define __NR_subpage_prot 310 336 + #define __NR_timerfd_settime 311 337 + #define __NR_timerfd_gettime 312 338 + #define __NR_signalfd4 313 339 + #define __NR_eventfd2 314 340 + #define __NR_epoll_create1 315 341 + #define __NR_dup3 316 342 + #define __NR_pipe2 317 343 + #define __NR_inotify_init1 318 344 + #define __NR_perf_event_open 319 345 + #define __NR_preadv 320 346 + #define __NR_pwritev 321 347 + #define __NR_rt_tgsigqueueinfo 322 348 + #define __NR_fanotify_init 323 349 + #define __NR_fanotify_mark 324 350 + #define __NR_prlimit64 325 351 + #define __NR_socket 326 352 + #define __NR_bind 327 353 + #define __NR_connect 328 354 + #define __NR_listen 329 355 + #define __NR_accept 330 356 + #define __NR_getsockname 331 357 + #define __NR_getpeername 332 358 + #define __NR_socketpair 333 359 + #define __NR_send 334 360 + #define __NR_sendto 335 361 + #define __NR_recv 336 362 + #define __NR_recvfrom 337 363 + #define __NR_shutdown 338 364 + #define __NR_setsockopt 339 365 + #define __NR_getsockopt 340 366 + #define __NR_sendmsg 341 367 + #define __NR_recvmsg 342 368 + #define __NR_recvmmsg 343 369 + #define __NR_accept4 344 370 + #define __NR_name_to_handle_at 345 371 + #define __NR_open_by_handle_at 346 372 + #define __NR_clock_adjtime 347 373 + #define __NR_syncfs 348 374 + #define __NR_sendmmsg 349 375 + #define __NR_setns 350 376 + #define __NR_process_vm_readv 351 377 + #define __NR_process_vm_writev 352 378 + 379 + 380 + #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */