aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-10-09 04:47:26 -0400
committerDavid Howells <dhowells@redhat.com>2012-10-09 04:47:26 -0400
commitc3617f72036c909e1f6086b5b9e364e0ef90a6da (patch)
tree0c70e14cd6b42bc832f49f33f068e3f81b565cda /arch/powerpc
parent9e2d8656f5e8aa214e66b462680cf86b210b74a8 (diff)
UAPI: (Scripted) Disintegrate arch/powerpc/include/asm
Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/include/asm/Kbuild35
-rw-r--r--arch/powerpc/include/asm/bootx.h123
-rw-r--r--arch/powerpc/include/asm/cputable.h35
-rw-r--r--arch/powerpc/include/asm/elf.h311
-rw-r--r--arch/powerpc/include/asm/kvm_para.h70
-rw-r--r--arch/powerpc/include/asm/mman.h27
-rw-r--r--arch/powerpc/include/asm/nvram.h55
-rw-r--r--arch/powerpc/include/asm/ptrace.h242
-rw-r--r--arch/powerpc/include/asm/signal.h143
-rw-r--r--arch/powerpc/include/asm/spu_info.h29
-rw-r--r--arch/powerpc/include/asm/swab.h15
-rw-r--r--arch/powerpc/include/asm/termios.h69
-rw-r--r--arch/powerpc/include/asm/types.h30
-rw-r--r--arch/powerpc/include/asm/unistd.h374
-rw-r--r--arch/powerpc/include/uapi/asm/Kbuild41
-rw-r--r--arch/powerpc/include/uapi/asm/auxvec.h (renamed from arch/powerpc/include/asm/auxvec.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/bitsperlong.h (renamed from arch/powerpc/include/asm/bitsperlong.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/bootx.h132
-rw-r--r--arch/powerpc/include/uapi/asm/byteorder.h (renamed from arch/powerpc/include/asm/byteorder.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/cputable.h36
-rw-r--r--arch/powerpc/include/uapi/asm/elf.h307
-rw-r--r--arch/powerpc/include/uapi/asm/errno.h (renamed from arch/powerpc/include/asm/errno.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/fcntl.h (renamed from arch/powerpc/include/asm/fcntl.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/ioctl.h (renamed from arch/powerpc/include/asm/ioctl.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/ioctls.h (renamed from arch/powerpc/include/asm/ioctls.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/ipcbuf.h (renamed from arch/powerpc/include/asm/ipcbuf.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/kvm.h (renamed from arch/powerpc/include/asm/kvm.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/kvm_para.h90
-rw-r--r--arch/powerpc/include/uapi/asm/linkage.h (renamed from arch/powerpc/include/asm/linkage.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/mman.h31
-rw-r--r--arch/powerpc/include/uapi/asm/msgbuf.h (renamed from arch/powerpc/include/asm/msgbuf.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/nvram.h62
-rw-r--r--arch/powerpc/include/uapi/asm/param.h (renamed from arch/powerpc/include/asm/param.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/poll.h (renamed from arch/powerpc/include/asm/poll.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/posix_types.h (renamed from arch/powerpc/include/asm/posix_types.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/ps3fb.h (renamed from arch/powerpc/include/asm/ps3fb.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/ptrace.h259
-rw-r--r--arch/powerpc/include/uapi/asm/resource.h (renamed from arch/powerpc/include/asm/resource.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/seccomp.h (renamed from arch/powerpc/include/asm/seccomp.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/sembuf.h (renamed from arch/powerpc/include/asm/sembuf.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/setup.h (renamed from arch/powerpc/include/asm/setup.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/shmbuf.h (renamed from arch/powerpc/include/asm/shmbuf.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/sigcontext.h (renamed from arch/powerpc/include/asm/sigcontext.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/siginfo.h (renamed from arch/powerpc/include/asm/siginfo.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/signal.h145
-rw-r--r--arch/powerpc/include/uapi/asm/socket.h (renamed from arch/powerpc/include/asm/socket.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/sockios.h (renamed from arch/powerpc/include/asm/sockios.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/spu_info.h53
-rw-r--r--arch/powerpc/include/uapi/asm/stat.h (renamed from arch/powerpc/include/asm/stat.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/statfs.h (renamed from arch/powerpc/include/asm/statfs.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/swab.h23
-rw-r--r--arch/powerpc/include/uapi/asm/termbits.h (renamed from arch/powerpc/include/asm/termbits.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/termios.h76
-rw-r--r--arch/powerpc/include/uapi/asm/types.h40
-rw-r--r--arch/powerpc/include/uapi/asm/ucontext.h (renamed from arch/powerpc/include/asm/ucontext.h)0
-rw-r--r--arch/powerpc/include/uapi/asm/unistd.h380
56 files changed, 1705 insertions, 1528 deletions
diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild
index ace53dbde2c..a4fe15e33c6 100644
--- a/arch/powerpc/include/asm/Kbuild
+++ b/arch/powerpc/include/asm/Kbuild
@@ -1,39 +1,4 @@
1include include/asm-generic/Kbuild.asm
2 1
3header-y += auxvec.h
4header-y += bootx.h
5header-y += byteorder.h
6header-y += cputable.h
7header-y += elf.h
8header-y += errno.h
9header-y += fcntl.h
10header-y += ioctl.h
11header-y += ioctls.h
12header-y += ipcbuf.h
13header-y += linkage.h
14header-y += msgbuf.h
15header-y += nvram.h
16header-y += param.h
17header-y += poll.h
18header-y += posix_types.h
19header-y += ps3fb.h
20header-y += resource.h
21header-y += seccomp.h
22header-y += sembuf.h
23header-y += shmbuf.h
24header-y += sigcontext.h
25header-y += siginfo.h
26header-y += signal.h
27header-y += socket.h
28header-y += sockios.h
29header-y += spu_info.h
30header-y += stat.h
31header-y += statfs.h
32header-y += termbits.h
33header-y += termios.h
34header-y += types.h
35header-y += ucontext.h
36header-y += unistd.h
37 2
38generic-y += clkdev.h 3generic-y += clkdev.h
39generic-y += rwsem.h 4generic-y += rwsem.h
diff --git a/arch/powerpc/include/asm/bootx.h b/arch/powerpc/include/asm/bootx.h
index 60a3c9ef301..dd9461003df 100644
--- a/arch/powerpc/include/asm/bootx.h
+++ b/arch/powerpc/include/asm/bootx.h
@@ -5,126 +5,11 @@
5 * Written by Benjamin Herrenschmidt. 5 * Written by Benjamin Herrenschmidt.
6 */ 6 */
7 7
8
9#ifndef __ASM_BOOTX_H__ 8#ifndef __ASM_BOOTX_H__
10#define __ASM_BOOTX_H__ 9#define __ASM_BOOTX_H__
11 10
12#include <linux/types.h> 11#include <uapi/asm/bootx.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 */
55typedef 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. */
65typedef 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 12
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/* (*) The format of the colormap is 256 * 3 * 2 bytes. Each color index 13/* (*) The format of the colormap is 256 * 3 * 2 bytes. Each color index
129 * is represented by 3 short words containing a 16 bits (unsigned) color 14 * is represented by 3 short words containing a 16 bits (unsigned) color
130 * component. Later versions may contain the gamma table for direct-color 15 * component. Later versions may contain the gamma table for direct-color
@@ -162,10 +47,4 @@ struct bootx_dt_node {
162 47
163extern void bootx_init(unsigned long r4, unsigned long phys); 48extern void bootx_init(unsigned long r4, unsigned long phys);
164 49
165#endif /* __KERNEL__ */
166
167#ifdef macintosh
168#pragma options align=reset
169#endif
170
171#endif 50#endif
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h
index b3c083de17a..21a0687b8c4 100644
--- a/arch/powerpc/include/asm/cputable.h
+++ b/arch/powerpc/include/asm/cputable.h
@@ -1,42 +1,10 @@
1#ifndef __ASM_POWERPC_CPUTABLE_H 1#ifndef __ASM_POWERPC_CPUTABLE_H
2#define __ASM_POWERPC_CPUTABLE_H 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#include <asm/asm-compat.h> 5#include <asm/asm-compat.h>
39#include <asm/feature-fixups.h> 6#include <asm/feature-fixups.h>
7#include <uapi/asm/cputable.h>
40 8
41#ifndef __ASSEMBLY__ 9#ifndef __ASSEMBLY__
42 10
@@ -557,5 +525,4 @@ static inline int cpu_has_feature(unsigned long feature)
557 525
558#endif /* !__ASSEMBLY__ */ 526#endif /* !__ASSEMBLY__ */
559 527
560#endif /* __KERNEL__ */
561#endif /* __ASM_POWERPC_CPUTABLE_H */ 528#endif /* __ASM_POWERPC_CPUTABLE_H */
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index 3bf9cca3514..6abf0a16323 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -1,90 +1,3 @@
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 * ELF register definitions.. 2 * ELF register definitions..
90 * 3 *
@@ -93,77 +6,14 @@
93 * as published by the Free Software Foundation; either version 6 * as published by the Free Software Foundation; either version
94 * 2 of the License, or (at your option) any later version. 7 * 2 of the License, or (at your option) any later version.
95 */ 8 */
9#ifndef _ASM_POWERPC_ELF_H
10#define _ASM_POWERPC_ELF_H
96 11
97#define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ 12#include <linux/sched.h> /* for task_struct */
98#define ELF_NFPREG 33 /* includes fpscr */ 13#include <asm/page.h>
99 14#include <asm/string.h>
100typedef unsigned long elf_greg_t64; 15#include <uapi/asm/elf.h>
101typedef elf_greg_t64 elf_gregset_t64[ELF_NGREG];
102
103typedef unsigned int elf_greg_t32;
104typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG];
105typedef elf_gregset_t32 compat_elf_gregset_t;
106
107/*
108 * ELF_ARCH, CLASS, and DATA are used to set parameters in the core dumps.
109 */
110#ifdef __powerpc64__
111# define ELF_NVRREG32 33 /* includes vscr & vrsave stuffed together */
112# define ELF_NVRREG 34 /* includes vscr & vrsave in split vectors */
113# define ELF_NVSRHALFREG 32 /* Half the vsx registers */
114# define ELF_GREG_TYPE elf_greg_t64
115#else
116# define ELF_NEVRREG 34 /* includes acc (as 2) */
117# define ELF_NVRREG 33 /* includes vscr */
118# define ELF_GREG_TYPE elf_greg_t32
119# define ELF_ARCH EM_PPC
120# define ELF_CLASS ELFCLASS32
121# define ELF_DATA ELFDATA2MSB
122#endif /* __powerpc64__ */
123
124#ifndef ELF_ARCH
125# define ELF_ARCH EM_PPC64
126# define ELF_CLASS ELFCLASS64
127# define ELF_DATA ELFDATA2MSB
128 typedef elf_greg_t64 elf_greg_t;
129 typedef elf_gregset_t64 elf_gregset_t;
130#else
131 /* Assumption: ELF_ARCH == EM_PPC and ELF_CLASS == ELFCLASS32 */
132 typedef elf_greg_t32 elf_greg_t;
133 typedef elf_gregset_t32 elf_gregset_t;
134#endif /* ELF_ARCH */
135
136/* Floating point registers */
137typedef double elf_fpreg_t;
138typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
139
140/* Altivec registers */
141/*
142 * The entries with indexes 0-31 contain the corresponding vector registers.
143 * The entry with index 32 contains the vscr as the last word (offset 12)
144 * within the quadword. This allows the vscr to be stored as either a
145 * quadword (since it must be copied via a vector register to/from storage)
146 * or as a word.
147 *
148 * 64-bit kernel notes: The entry at index 33 contains the vrsave as the first
149 * word (offset 0) within the quadword.
150 *
151 * This definition of the VMX state is compatible with the current PPC32
152 * ptrace interface. This allows signal handling and ptrace to use the same
153 * structures. This also simplifies the implementation of a bi-arch
154 * (combined (32- and 64-bit) gdb.
155 *
156 * Note that it's _not_ compatible with 32 bits ucontext which stuffs the
157 * vrsave along with vscr and so only uses 33 vectors for the register set
158 */
159typedef __vector128 elf_vrreg_t;
160typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
161#ifdef __powerpc64__
162typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32];
163typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG];
164#endif
165 16
166#ifdef __KERNEL__
167/* 17/*
168 * This is used to ensure we don't load something for the wrong architecture. 18 * This is used to ensure we don't load something for the wrong architecture.
169 */ 19 */
@@ -277,153 +127,6 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
277extern unsigned long arch_randomize_brk(struct mm_struct *mm); 127extern unsigned long arch_randomize_brk(struct mm_struct *mm);
278#define arch_randomize_brk arch_randomize_brk 128#define arch_randomize_brk arch_randomize_brk
279 129
280#endif /* __KERNEL__ */
281
282/*
283 * The requirements here are:
284 * - keep the final alignment of sp (sp & 0xf)
285 * - make sure the 32-bit value at the first 16 byte aligned position of
286 * AUXV is greater than 16 for glibc compatibility.
287 * AT_IGNOREPPC is used for that.
288 * - for compatibility with glibc ARCH_DLINFO must always be defined on PPC,
289 * even if DLINFO_ARCH_ITEMS goes to zero or is undefined.
290 * update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes
291 */
292#define ARCH_DLINFO \
293do { \
294 /* Handle glibc compatibility. */ \
295 NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \
296 NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \
297 /* Cache size items */ \
298 NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize); \
299 NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize); \
300 NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize); \
301 VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->mm->context.vdso_base); \
302} while (0)
303
304/* PowerPC64 relocations defined by the ABIs */
305#define R_PPC64_NONE R_PPC_NONE
306#define R_PPC64_ADDR32 R_PPC_ADDR32 /* 32bit absolute address. */
307#define R_PPC64_ADDR24 R_PPC_ADDR24 /* 26bit address, word aligned. */
308#define R_PPC64_ADDR16 R_PPC_ADDR16 /* 16bit absolute address. */
309#define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO /* lower 16bits of abs. address. */
310#define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI /* high 16bits of abs. address. */
311#define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA /* adjusted high 16bits. */
312#define R_PPC64_ADDR14 R_PPC_ADDR14 /* 16bit address, word aligned. */
313#define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN
314#define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN
315#define R_PPC64_REL24 R_PPC_REL24 /* PC relative 26 bit, word aligned. */
316#define R_PPC64_REL14 R_PPC_REL14 /* PC relative 16 bit. */
317#define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN
318#define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN
319#define R_PPC64_GOT16 R_PPC_GOT16
320#define R_PPC64_GOT16_LO R_PPC_GOT16_LO
321#define R_PPC64_GOT16_HI R_PPC_GOT16_HI
322#define R_PPC64_GOT16_HA R_PPC_GOT16_HA
323
324#define R_PPC64_COPY R_PPC_COPY
325#define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT
326#define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT
327#define R_PPC64_RELATIVE R_PPC_RELATIVE
328
329#define R_PPC64_UADDR32 R_PPC_UADDR32
330#define R_PPC64_UADDR16 R_PPC_UADDR16
331#define R_PPC64_REL32 R_PPC_REL32
332#define R_PPC64_PLT32 R_PPC_PLT32
333#define R_PPC64_PLTREL32 R_PPC_PLTREL32
334#define R_PPC64_PLT16_LO R_PPC_PLT16_LO
335#define R_PPC64_PLT16_HI R_PPC_PLT16_HI
336#define R_PPC64_PLT16_HA R_PPC_PLT16_HA
337
338#define R_PPC64_SECTOFF R_PPC_SECTOFF
339#define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO
340#define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI
341#define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA
342#define R_PPC64_ADDR30 37 /* word30 (S + A - P) >> 2. */
343#define R_PPC64_ADDR64 38 /* doubleword64 S + A. */
344#define R_PPC64_ADDR16_HIGHER 39 /* half16 #higher(S + A). */
345#define R_PPC64_ADDR16_HIGHERA 40 /* half16 #highera(S + A). */
346#define R_PPC64_ADDR16_HIGHEST 41 /* half16 #highest(S + A). */
347#define R_PPC64_ADDR16_HIGHESTA 42 /* half16 #highesta(S + A). */
348#define R_PPC64_UADDR64 43 /* doubleword64 S + A. */
349#define R_PPC64_REL64 44 /* doubleword64 S + A - P. */
350#define R_PPC64_PLT64 45 /* doubleword64 L + A. */
351#define R_PPC64_PLTREL64 46 /* doubleword64 L + A - P. */
352#define R_PPC64_TOC16 47 /* half16* S + A - .TOC. */
353#define R_PPC64_TOC16_LO 48 /* half16 #lo(S + A - .TOC.). */
354#define R_PPC64_TOC16_HI 49 /* half16 #hi(S + A - .TOC.). */
355#define R_PPC64_TOC16_HA 50 /* half16 #ha(S + A - .TOC.). */
356#define R_PPC64_TOC 51 /* doubleword64 .TOC. */
357#define R_PPC64_PLTGOT16 52 /* half16* M + A. */
358#define R_PPC64_PLTGOT16_LO 53 /* half16 #lo(M + A). */
359#define R_PPC64_PLTGOT16_HI 54 /* half16 #hi(M + A). */
360#define R_PPC64_PLTGOT16_HA 55 /* half16 #ha(M + A). */
361
362#define R_PPC64_ADDR16_DS 56 /* half16ds* (S + A) >> 2. */
363#define R_PPC64_ADDR16_LO_DS 57 /* half16ds #lo(S + A) >> 2. */
364#define R_PPC64_GOT16_DS 58 /* half16ds* (G + A) >> 2. */
365#define R_PPC64_GOT16_LO_DS 59 /* half16ds #lo(G + A) >> 2. */
366#define R_PPC64_PLT16_LO_DS 60 /* half16ds #lo(L + A) >> 2. */
367#define R_PPC64_SECTOFF_DS 61 /* half16ds* (R + A) >> 2. */
368#define R_PPC64_SECTOFF_LO_DS 62 /* half16ds #lo(R + A) >> 2. */
369#define R_PPC64_TOC16_DS 63 /* half16ds* (S + A - .TOC.) >> 2. */
370#define R_PPC64_TOC16_LO_DS 64 /* half16ds #lo(S + A - .TOC.) >> 2. */
371#define R_PPC64_PLTGOT16_DS 65 /* half16ds* (M + A) >> 2. */
372#define R_PPC64_PLTGOT16_LO_DS 66 /* half16ds #lo(M + A) >> 2. */
373
374/* PowerPC64 relocations defined for the TLS access ABI. */
375#define R_PPC64_TLS 67 /* none (sym+add)@tls */
376#define R_PPC64_DTPMOD64 68 /* doubleword64 (sym+add)@dtpmod */
377#define R_PPC64_TPREL16 69 /* half16* (sym+add)@tprel */
378#define R_PPC64_TPREL16_LO 70 /* half16 (sym+add)@tprel@l */
379#define R_PPC64_TPREL16_HI 71 /* half16 (sym+add)@tprel@h */
380#define R_PPC64_TPREL16_HA 72 /* half16 (sym+add)@tprel@ha */
381#define R_PPC64_TPREL64 73 /* doubleword64 (sym+add)@tprel */
382#define R_PPC64_DTPREL16 74 /* half16* (sym+add)@dtprel */
383#define R_PPC64_DTPREL16_LO 75 /* half16 (sym+add)@dtprel@l */
384#define R_PPC64_DTPREL16_HI 76 /* half16 (sym+add)@dtprel@h */
385#define R_PPC64_DTPREL16_HA 77 /* half16 (sym+add)@dtprel@ha */
386#define R_PPC64_DTPREL64 78 /* doubleword64 (sym+add)@dtprel */
387#define R_PPC64_GOT_TLSGD16 79 /* half16* (sym+add)@got@tlsgd */
388#define R_PPC64_GOT_TLSGD16_LO 80 /* half16 (sym+add)@got@tlsgd@l */
389#define R_PPC64_GOT_TLSGD16_HI 81 /* half16 (sym+add)@got@tlsgd@h */
390#define R_PPC64_GOT_TLSGD16_HA 82 /* half16 (sym+add)@got@tlsgd@ha */
391#define R_PPC64_GOT_TLSLD16 83 /* half16* (sym+add)@got@tlsld */
392#define R_PPC64_GOT_TLSLD16_LO 84 /* half16 (sym+add)@got@tlsld@l */
393#define R_PPC64_GOT_TLSLD16_HI 85 /* half16 (sym+add)@got@tlsld@h */
394#define R_PPC64_GOT_TLSLD16_HA 86 /* half16 (sym+add)@got@tlsld@ha */
395#define R_PPC64_GOT_TPREL16_DS 87 /* half16ds* (sym+add)@got@tprel */
396#define R_PPC64_GOT_TPREL16_LO_DS 88 /* half16ds (sym+add)@got@tprel@l */
397#define R_PPC64_GOT_TPREL16_HI 89 /* half16 (sym+add)@got@tprel@h */
398#define R_PPC64_GOT_TPREL16_HA 90 /* half16 (sym+add)@got@tprel@ha */
399#define R_PPC64_GOT_DTPREL16_DS 91 /* half16ds* (sym+add)@got@dtprel */
400#define R_PPC64_GOT_DTPREL16_LO_DS 92 /* half16ds (sym+add)@got@dtprel@l */
401#define R_PPC64_GOT_DTPREL16_HI 93 /* half16 (sym+add)@got@dtprel@h */
402#define R_PPC64_GOT_DTPREL16_HA 94 /* half16 (sym+add)@got@dtprel@ha */
403#define R_PPC64_TPREL16_DS 95 /* half16ds* (sym+add)@tprel */
404#define R_PPC64_TPREL16_LO_DS 96 /* half16ds (sym+add)@tprel@l */
405#define R_PPC64_TPREL16_HIGHER 97 /* half16 (sym+add)@tprel@higher */
406#define R_PPC64_TPREL16_HIGHERA 98 /* half16 (sym+add)@tprel@highera */
407#define R_PPC64_TPREL16_HIGHEST 99 /* half16 (sym+add)@tprel@highest */
408#define R_PPC64_TPREL16_HIGHESTA 100 /* half16 (sym+add)@tprel@highesta */
409#define R_PPC64_DTPREL16_DS 101 /* half16ds* (sym+add)@dtprel */
410#define R_PPC64_DTPREL16_LO_DS 102 /* half16ds (sym+add)@dtprel@l */
411#define R_PPC64_DTPREL16_HIGHER 103 /* half16 (sym+add)@dtprel@higher */
412#define R_PPC64_DTPREL16_HIGHERA 104 /* half16 (sym+add)@dtprel@highera */
413#define R_PPC64_DTPREL16_HIGHEST 105 /* half16 (sym+add)@dtprel@highest */
414#define R_PPC64_DTPREL16_HIGHESTA 106 /* half16 (sym+add)@dtprel@highesta */
415
416/* Keep this the last entry. */
417#define R_PPC64_NUM 107
418
419/* There's actually a third entry here, but it's unused */
420struct ppc64_opd_entry
421{
422 unsigned long funcaddr;
423 unsigned long r2;
424};
425
426#ifdef __KERNEL__
427 130
428#ifdef CONFIG_SPU_BASE 131#ifdef CONFIG_SPU_BASE
429/* Notes used in ET_CORE. Note name is "SPU/<fd>/<filename>". */ 132/* Notes used in ET_CORE. Note name is "SPU/<fd>/<filename>". */
@@ -433,6 +136,4 @@ struct ppc64_opd_entry
433 136
434#endif /* CONFIG_SPU_BASE */ 137#endif /* CONFIG_SPU_BASE */
435 138
436#endif /* __KERNEL */
437
438#endif /* _ASM_POWERPC_ELF_H */ 139#endif /* _ASM_POWERPC_ELF_H */
diff --git a/arch/powerpc/include/asm/kvm_para.h b/arch/powerpc/include/asm/kvm_para.h
index c18916bff68..9365860fb7f 100644
--- a/arch/powerpc/include/asm/kvm_para.h
+++ b/arch/powerpc/include/asm/kvm_para.h
@@ -16,77 +16,11 @@
16 * 16 *
17 * Authors: Hollis Blanchard <hollisb@us.ibm.com> 17 * Authors: Hollis Blanchard <hollisb@us.ibm.com>
18 */ 18 */
19
20#ifndef __POWERPC_KVM_PARA_H__ 19#ifndef __POWERPC_KVM_PARA_H__
21#define __POWERPC_KVM_PARA_H__ 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 */
35struct 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#ifdef CONFIG_KVM_GUEST 25#ifdef CONFIG_KVM_GUEST
92 26
@@ -211,6 +145,4 @@ static inline bool kvm_check_and_clear_guest_paused(void)
211 return false; 145 return false;
212} 146}
213 147
214#endif /* __KERNEL__ */
215
216#endif /* __POWERPC_KVM_PARA_H__ */ 148#endif /* __POWERPC_KVM_PARA_H__ */
diff --git a/arch/powerpc/include/asm/mman.h b/arch/powerpc/include/asm/mman.h
index d4a7f645c5d..8565c254151 100644
--- a/arch/powerpc/include/asm/mman.h
+++ b/arch/powerpc/include/asm/mman.h
@@ -1,34 +1,14 @@
1#ifndef _ASM_POWERPC_MMAN_H
2#define _ASM_POWERPC_MMAN_H
3
4#include <asm-generic/mman-common.h>
5
6/* 1/*
7 * This program is free software; you can redistribute it and/or 2 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License 3 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 4 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version. 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
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 11
31#ifdef __KERNEL__
32#ifdef CONFIG_PPC64 12#ifdef CONFIG_PPC64
33 13
34#include <asm/cputable.h> 14#include <asm/cputable.h>
@@ -61,5 +41,4 @@ static inline int arch_validate_prot(unsigned long prot)
61#define arch_validate_prot(prot) arch_validate_prot(prot) 41#define arch_validate_prot(prot) arch_validate_prot(prot)
62 42
63#endif /* CONFIG_PPC64 */ 43#endif /* CONFIG_PPC64 */
64#endif /* __KERNEL__ */
65#endif /* _ASM_POWERPC_MMAN_H */ 44#endif /* _ASM_POWERPC_MMAN_H */
diff --git a/arch/powerpc/include/asm/nvram.h b/arch/powerpc/include/asm/nvram.h
index 9d1aafe607c..b0fe0fe4e62 100644
--- a/arch/powerpc/include/asm/nvram.h
+++ b/arch/powerpc/include/asm/nvram.h
@@ -6,29 +6,13 @@
6 * as published by the Free Software Foundation; either version 6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version. 7 * 2 of the License, or (at your option) any later version.
8 */ 8 */
9
10#ifndef _ASM_POWERPC_NVRAM_H 9#ifndef _ASM_POWERPC_NVRAM_H
11#define _ASM_POWERPC_NVRAM_H 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#include <linux/errno.h> 13#include <linux/errno.h>
31#include <linux/list.h> 14#include <linux/list.h>
15#include <uapi/asm/nvram.h>
32 16
33#ifdef CONFIG_PPC_PSERIES 17#ifdef CONFIG_PPC_PSERIES
34extern int nvram_write_error_log(char * buff, int length, 18extern int nvram_write_error_log(char * buff, int length,
@@ -56,17 +40,6 @@ extern int nvram_remove_partition(const char *name, int sig,
56extern int nvram_get_partition_size(loff_t data_index); 40extern int nvram_get_partition_size(loff_t data_index);
57extern loff_t nvram_find_partition(const char *name, int sig, int *out_size); 41extern loff_t nvram_find_partition(const char *name, int sig, int *out_size);
58 42
59#endif /* __KERNEL__ */
60
61/* PowerMac specific nvram stuffs */
62
63enum {
64 pmac_nvram_OF, /* Open Firmware partition */
65 pmac_nvram_XPRAM, /* MacOS XPRAM partition */
66 pmac_nvram_NR /* MacOS Name Registry partition */
67};
68
69#ifdef __KERNEL__
70/* Return partition offset in nvram */ 43/* Return partition offset in nvram */
71extern int pmac_get_partition(int partition); 44extern int pmac_get_partition(int partition);
72 45
@@ -83,30 +56,4 @@ extern ssize_t nvram_get_size(void);
83/* Normal access to NVRAM */ 56/* Normal access to NVRAM */
84extern unsigned char nvram_read_byte(int i); 57extern unsigned char nvram_read_byte(int i);
85extern void nvram_write_byte(unsigned char c, int i); 58extern void nvram_write_byte(unsigned char c, int i);
86#endif
87
88/* Some offsets in XPRAM */
89#define PMAC_XPRAM_MACHINE_LOC 0xe4
90#define PMAC_XPRAM_SOUND_VOLUME 0x08
91
92/* Machine location structure in PowerMac XPRAM */
93struct pmac_machine_location {
94 unsigned int latitude; /* 2+30 bit Fractional number */
95 unsigned int longitude; /* 2+30 bit Fractional number */
96 unsigned int delta; /* mix of GMT delta and DLS */
97};
98
99/*
100 * /dev/nvram ioctls
101 *
102 * Note that PMAC_NVRAM_GET_OFFSET is still supported, but is
103 * definitely obsolete. Do not use it if you can avoid it
104 */
105
106#define OBSOLETE_PMAC_NVRAM_GET_OFFSET \
107 _IOWR('p', 0x40, int)
108
109#define IOC_NVRAM_GET_OFFSET _IOWR('p', 0x42, int) /* Get NVRAM partition offset */
110#define IOC_NVRAM_SYNC _IO('p', 0x43) /* Sync NVRAM image */
111
112#endif /* _ASM_POWERPC_NVRAM_H */ 59#endif /* _ASM_POWERPC_NVRAM_H */
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h
index 9c21ed42aba..55380dc16f9 100644
--- a/arch/powerpc/include/asm/ptrace.h
+++ b/arch/powerpc/include/asm/ptrace.h
@@ -1,6 +1,3 @@
1#ifndef _ASM_POWERPC_PTRACE_H
2#define _ASM_POWERPC_PTRACE_H
3
4/* 1/*
5 * Copyright (C) 2001 PPC64 Team, IBM Corp 2 * Copyright (C) 2001 PPC64 Team, IBM Corp
6 * 3 *
@@ -23,37 +20,11 @@
23 * as published by the Free Software Foundation; either version 20 * as published by the Free Software Foundation; either version
24 * 2 of the License, or (at your option) any later version. 21 * 2 of the License, or (at your option) any later version.
25 */ 22 */
23#ifndef _ASM_POWERPC_PTRACE_H
24#define _ASM_POWERPC_PTRACE_H
26 25
27#include <linux/types.h> 26#include <uapi/asm/ptrace.h>
28
29#ifndef __ASSEMBLY__
30
31struct 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 27
56#ifdef __KERNEL__
57 28
58#ifdef __powerpc64__ 29#ifdef __powerpc64__
59 30
@@ -220,219 +191,12 @@ static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs,
220 191
221#endif /* __ASSEMBLY__ */ 192#endif /* __ASSEMBLY__ */
222 193
223#endif /* __KERNEL__ */
224
225/*
226 * Offsets used by 'ptrace' system call interface.
227 * These can't be changed without breaking binary compatibility
228 * with MkLinux, etc.
229 */
230#define PT_R0 0
231#define PT_R1 1
232#define PT_R2 2
233#define PT_R3 3
234#define PT_R4 4
235#define PT_R5 5
236#define PT_R6 6
237#define PT_R7 7
238#define PT_R8 8
239#define PT_R9 9
240#define PT_R10 10
241#define PT_R11 11
242#define PT_R12 12
243#define PT_R13 13
244#define PT_R14 14
245#define PT_R15 15
246#define PT_R16 16
247#define PT_R17 17
248#define PT_R18 18
249#define PT_R19 19
250#define PT_R20 20
251#define PT_R21 21
252#define PT_R22 22
253#define PT_R23 23
254#define PT_R24 24
255#define PT_R25 25
256#define PT_R26 26
257#define PT_R27 27
258#define PT_R28 28
259#define PT_R29 29
260#define PT_R30 30
261#define PT_R31 31
262
263#define PT_NIP 32
264#define PT_MSR 33
265#define PT_ORIG_R3 34
266#define PT_CTR 35
267#define PT_LNK 36
268#define PT_XER 37
269#define PT_CCR 38
270#ifndef __powerpc64__
271#define PT_MQ 39
272#else
273#define PT_SOFTE 39
274#endif
275#define PT_TRAP 40
276#define PT_DAR 41
277#define PT_DSISR 42
278#define PT_RESULT 43
279#define PT_REGS_COUNT 44
280
281#define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */
282
283#ifndef __powerpc64__ 194#ifndef __powerpc64__
284
285#define PT_FPR31 (PT_FPR0 + 2*31)
286#define PT_FPSCR (PT_FPR0 + 2*32 + 1)
287
288#else /* __powerpc64__ */ 195#else /* __powerpc64__ */
289
290#define PT_FPSCR (PT_FPR0 + 32) /* each FP reg occupies 1 slot in 64-bit space */
291
292#ifdef __KERNEL__
293#define PT_FPSCR32 (PT_FPR0 + 2*32 + 1) /* each FP reg occupies 2 32-bit userspace slots */ 196#define PT_FPSCR32 (PT_FPR0 + 2*32 + 1) /* each FP reg occupies 2 32-bit userspace slots */
294#endif
295
296#define PT_VR0 82 /* each Vector reg occupies 2 slots in 64-bit */
297#define PT_VSCR (PT_VR0 + 32*2 + 1)
298#define PT_VRSAVE (PT_VR0 + 33*2)
299
300#ifdef __KERNEL__
301#define PT_VR0_32 164 /* each Vector reg occupies 4 slots in 32-bit */ 197#define PT_VR0_32 164 /* each Vector reg occupies 4 slots in 32-bit */
302#define PT_VSCR_32 (PT_VR0 + 32*4 + 3) 198#define PT_VSCR_32 (PT_VR0 + 32*4 + 3)
303#define PT_VRSAVE_32 (PT_VR0 + 33*4) 199#define PT_VRSAVE_32 (PT_VR0 + 33*4)
304#endif
305
306/*
307 * Only store first 32 VSRs here. The second 32 VSRs in VR0-31
308 */
309#define PT_VSR0 150 /* each VSR reg occupies 2 slots in 64-bit */
310#define PT_VSR31 (PT_VSR0 + 2*31)
311#ifdef __KERNEL__
312#define PT_VSR0_32 300 /* each VSR reg occupies 4 slots in 32-bit */ 200#define PT_VSR0_32 300 /* each VSR reg occupies 4 slots in 32-bit */
313#endif
314#endif /* __powerpc64__ */ 201#endif /* __powerpc64__ */
315
316/*
317 * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go.
318 * The transfer totals 34 quadword. Quadwords 0-31 contain the
319 * corresponding vector registers. Quadword 32 contains the vscr as the
320 * last word (offset 12) within that quadword. Quadword 33 contains the
321 * vrsave as the first word (offset 0) within the quadword.
322 *
323 * This definition of the VMX state is compatible with the current PPC32
324 * ptrace interface. This allows signal handling and ptrace to use the same
325 * structures. This also simplifies the implementation of a bi-arch
326 * (combined (32- and 64-bit) gdb.
327 */
328#define PTRACE_GETVRREGS 18
329#define PTRACE_SETVRREGS 19
330
331/* Get/set all the upper 32-bits of the SPE registers, accumulator, and
332 * spefscr, in one go */
333#define PTRACE_GETEVRREGS 20
334#define PTRACE_SETEVRREGS 21
335
336/* Get the first 32 128bit VSX registers */
337#define PTRACE_GETVSRREGS 27
338#define PTRACE_SETVSRREGS 28
339
340/*
341 * Get or set a debug register. The first 16 are DABR registers and the
342 * second 16 are IABR registers.
343 */
344#define PTRACE_GET_DEBUGREG 25
345#define PTRACE_SET_DEBUGREG 26
346
347/* (new) PTRACE requests using the same numbers as x86 and the same
348 * argument ordering. Additionally, they support more registers too
349 */
350#define PTRACE_GETREGS 12
351#define PTRACE_SETREGS 13
352#define PTRACE_GETFPREGS 14
353#define PTRACE_SETFPREGS 15
354#define PTRACE_GETREGS64 22
355#define PTRACE_SETREGS64 23
356
357/* Calls to trace a 64bit program from a 32bit program */
358#define PPC_PTRACE_PEEKTEXT_3264 0x95
359#define PPC_PTRACE_PEEKDATA_3264 0x94
360#define PPC_PTRACE_POKETEXT_3264 0x93
361#define PPC_PTRACE_POKEDATA_3264 0x92
362#define PPC_PTRACE_PEEKUSR_3264 0x91
363#define PPC_PTRACE_POKEUSR_3264 0x90
364
365#define PTRACE_SINGLEBLOCK 0x100 /* resume execution until next branch */
366
367#define PPC_PTRACE_GETHWDBGINFO 0x89
368#define PPC_PTRACE_SETHWDEBUG 0x88
369#define PPC_PTRACE_DELHWDEBUG 0x87
370
371#ifndef __ASSEMBLY__
372
373struct ppc_debug_info {
374 __u32 version; /* Only version 1 exists to date */
375 __u32 num_instruction_bps;
376 __u32 num_data_bps;
377 __u32 num_condition_regs;
378 __u32 data_bp_alignment;
379 __u32 sizeof_condition; /* size of the DVC register */
380 __u64 features;
381};
382
383#endif /* __ASSEMBLY__ */
384
385/*
386 * features will have bits indication whether there is support for:
387 */
388#define PPC_DEBUG_FEATURE_INSN_BP_RANGE 0x0000000000000001
389#define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x0000000000000002
390#define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x0000000000000004
391#define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x0000000000000008
392
393#ifndef __ASSEMBLY__
394
395struct ppc_hw_breakpoint {
396 __u32 version; /* currently, version must be 1 */
397 __u32 trigger_type; /* only some combinations allowed */
398 __u32 addr_mode; /* address match mode */
399 __u32 condition_mode; /* break/watchpoint condition flags */
400 __u64 addr; /* break/watchpoint address */
401 __u64 addr2; /* range end or mask */
402 __u64 condition_value; /* contents of the DVC register */
403};
404
405#endif /* __ASSEMBLY__ */
406
407/*
408 * Trigger Type
409 */
410#define PPC_BREAKPOINT_TRIGGER_EXECUTE 0x00000001
411#define PPC_BREAKPOINT_TRIGGER_READ 0x00000002
412#define PPC_BREAKPOINT_TRIGGER_WRITE 0x00000004
413#define PPC_BREAKPOINT_TRIGGER_RW \
414 (PPC_BREAKPOINT_TRIGGER_READ | PPC_BREAKPOINT_TRIGGER_WRITE)
415
416/*
417 * Address Mode
418 */
419#define PPC_BREAKPOINT_MODE_EXACT 0x00000000
420#define PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE 0x00000001
421#define PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE 0x00000002
422#define PPC_BREAKPOINT_MODE_MASK 0x00000003
423
424/*
425 * Condition Mode
426 */
427#define PPC_BREAKPOINT_CONDITION_MODE 0x00000003
428#define PPC_BREAKPOINT_CONDITION_NONE 0x00000000
429#define PPC_BREAKPOINT_CONDITION_AND 0x00000001
430#define PPC_BREAKPOINT_CONDITION_EXACT PPC_BREAKPOINT_CONDITION_AND
431#define PPC_BREAKPOINT_CONDITION_OR 0x00000002
432#define PPC_BREAKPOINT_CONDITION_AND_OR 0x00000003
433#define PPC_BREAKPOINT_CONDITION_BE_ALL 0x00ff0000
434#define PPC_BREAKPOINT_CONDITION_BE_SHIFT 16
435#define PPC_BREAKPOINT_CONDITION_BE(n) \
436 (1<<((n)+PPC_BREAKPOINT_CONDITION_BE_SHIFT))
437
438#endif /* _ASM_POWERPC_PTRACE_H */ 202#endif /* _ASM_POWERPC_PTRACE_H */
diff --git a/arch/powerpc/include/asm/signal.h b/arch/powerpc/include/asm/signal.h
index 3eb13be11d8..189998bb61c 100644
--- a/arch/powerpc/include/asm/signal.h
+++ b/arch/powerpc/include/asm/signal.h
@@ -1,149 +1,8 @@
1#ifndef _ASM_POWERPC_SIGNAL_H 1#ifndef _ASM_POWERPC_SIGNAL_H
2#define _ASM_POWERPC_SIGNAL_H 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
14typedef unsigned long old_sigset_t; /* at least 32 bits */
15
16typedef 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
99struct 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
106struct 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
113struct k_sigaction {
114 struct sigaction sa;
115};
116
117typedef struct sigaltstack {
118 void __user *ss_sp;
119 int ss_flags;
120 size_t ss_size;
121} stack_t;
122
123#ifdef __KERNEL__
124struct pt_regs; 6struct pt_regs;
125#define ptrace_signal_deliver(regs, cookie) do { } while (0) 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 */
137struct 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#endif /* _ASM_POWERPC_SIGNAL_H */ 8#endif /* _ASM_POWERPC_SIGNAL_H */
diff --git a/arch/powerpc/include/asm/spu_info.h b/arch/powerpc/include/asm/spu_info.h
index 1286c823f0d..7146b78e40f 100644
--- a/arch/powerpc/include/asm/spu_info.h
+++ b/arch/powerpc/include/asm/spu_info.h
@@ -19,37 +19,10 @@
19 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */ 21 */
22
23#ifndef _SPU_INFO_H 22#ifndef _SPU_INFO_H
24#define _SPU_INFO_H 23#define _SPU_INFO_H
25 24
26#include <linux/types.h>
27
28#ifdef __KERNEL__
29#include <asm/spu.h> 25#include <asm/spu.h>
30#else 26#include <uapi/asm/spu_info.h>
31struct 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
39struct 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
48struct 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};
54 27
55#endif 28#endif
diff --git a/arch/powerpc/include/asm/swab.h b/arch/powerpc/include/asm/swab.h
index c581e3ef73e..b9bd1ca944d 100644
--- a/arch/powerpc/include/asm/swab.h
+++ b/arch/powerpc/include/asm/swab.h
@@ -1,24 +1,18 @@
1#ifndef _ASM_POWERPC_SWAB_H
2#define _ASM_POWERPC_SWAB_H
3
4/* 1/*
5 * This program is free software; you can redistribute it and/or 2 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License 3 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 4 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version. 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> 10#include <uapi/asm/swab.h>
12#include <linux/compiler.h>
13 11
14#ifdef __GNUC__ 12#ifdef __GNUC__
15
16#ifndef __powerpc64__ 13#ifndef __powerpc64__
17#define __SWAB_64_THRU_32__
18#endif /* __powerpc64__ */ 14#endif /* __powerpc64__ */
19 15
20#ifdef __KERNEL__
21
22static __inline__ __u16 ld_le16(const volatile __u16 *addr) 16static __inline__ __u16 ld_le16(const volatile __u16 *addr)
23{ 17{
24 __u16 val; 18 __u16 val;
@@ -83,8 +77,5 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 value)
83} 77}
84#define __arch_swab32 __arch_swab32 78#define __arch_swab32 __arch_swab32
85 79
86#endif /* __KERNEL__ */
87
88#endif /* __GNUC__ */ 80#endif /* __GNUC__ */
89
90#endif /* _ASM_POWERPC_SWAB_H */ 81#endif /* _ASM_POWERPC_SWAB_H */
diff --git a/arch/powerpc/include/asm/termios.h b/arch/powerpc/include/asm/termios.h
index a24f48704a3..b8353e2032d 100644
--- a/arch/powerpc/include/asm/termios.h
+++ b/arch/powerpc/include/asm/termios.h
@@ -1,6 +1,3 @@
1#ifndef _ASM_POWERPC_TERMIOS_H
2#define _ASM_POWERPC_TERMIOS_H
3
4/* 1/*
5 * Liberally adapted from alpha/termios.h. In particular, the c_cc[] 2 * Liberally adapted from alpha/termios.h. In particular, the c_cc[]
6 * fields have been reordered so that termio & termios share the 3 * fields have been reordered so that termio & termios share the
@@ -12,74 +9,14 @@
12 * as published by the Free Software Foundation; either version 9 * as published by the Free Software Foundation; either version
13 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
14 */ 11 */
12#ifndef _ASM_POWERPC_TERMIOS_H
13#define _ASM_POWERPC_TERMIOS_H
15 14
16#include <asm/ioctls.h> 15#include <uapi/asm/termios.h>
17#include <asm/termbits.h>
18
19struct sgttyb {
20 char sg_ispeed;
21 char sg_ospeed;
22 char sg_erase;
23 char sg_kill;
24 short sg_flags;
25};
26
27struct 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
36struct 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
45struct 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
53struct 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 16
74#ifdef __KERNEL__
75/* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ 17/* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */
76#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" 18#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025"
77#endif
78
79#ifdef __KERNEL__
80 19
81#include <asm-generic/termios-base.h> 20#include <asm-generic/termios-base.h>
82 21
83#endif /* __KERNEL__ */
84
85#endif /* _ASM_POWERPC_TERMIOS_H */ 22#endif /* _ASM_POWERPC_TERMIOS_H */
diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/asm/types.h
index 0abf7f2c6df..bfb6ded38ff 100644
--- a/arch/powerpc/include/asm/types.h
+++ b/arch/powerpc/include/asm/types.h
@@ -1,22 +1,3 @@
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 * This file is never included by application software unless 2 * This file is never included by application software unless
22 * explicitly requested (e.g., via linux/types.h) in which case the 3 * explicitly requested (e.g., via linux/types.h) in which case the
@@ -29,14 +10,11 @@
29 * as published by the Free Software Foundation; either version 10 * as published by the Free Software Foundation; either version
30 * 2 of the License, or (at your option) any later version. 11 * 2 of the License, or (at your option) any later version.
31 */ 12 */
13#ifndef _ASM_POWERPC_TYPES_H
14#define _ASM_POWERPC_TYPES_H
32 15
33typedef struct { 16#include <uapi/asm/types.h>
34 __u32 u[4];
35} __attribute__((aligned(16))) __vector128;
36
37#endif /* __ASSEMBLY__ */
38 17
39#ifdef __KERNEL__
40#ifndef __ASSEMBLY__ 18#ifndef __ASSEMBLY__
41 19
42typedef __vector128 vector128; 20typedef __vector128 vector128;
@@ -49,6 +27,4 @@ typedef struct {
49 27
50#endif /* __ASSEMBLY__ */ 28#endif /* __ASSEMBLY__ */
51 29
52#endif /* __KERNEL__ */
53
54#endif /* _ASM_POWERPC_TYPES_H */ 30#endif /* _ASM_POWERPC_TYPES_H */
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index c683fa350ad..d974bca0c33 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -1,6 +1,3 @@
1#ifndef _ASM_POWERPC_UNISTD_H_
2#define _ASM_POWERPC_UNISTD_H_
3
4/* 1/*
5 * This file contains the system call numbers. 2 * This file contains the system call numbers.
6 * 3 *
@@ -9,374 +6,11 @@
9 * as published by the Free Software Foundation; either version 6 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version. 7 * 2 of the License, or (at your option) any later version.
11 */ 8 */
9#ifndef _ASM_POWERPC_UNISTD_H_
10#define _ASM_POWERPC_UNISTD_H_
12 11
13#define __NR_restart_syscall 0 12#include <uapi/asm/unistd.h>
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 13
379#ifdef __KERNEL__
380 14
381#define __NR_syscalls 353 15#define __NR_syscalls 353
382 16
@@ -429,6 +63,4 @@
429 asmlinkage long x (void) __attribute__((weak,alias("sys_ni_syscall"))) 63 asmlinkage long x (void) __attribute__((weak,alias("sys_ni_syscall")))
430 64
431#endif /* __ASSEMBLY__ */ 65#endif /* __ASSEMBLY__ */
432#endif /* __KERNEL__ */
433
434#endif /* _ASM_POWERPC_UNISTD_H_ */ 66#endif /* _ASM_POWERPC_UNISTD_H_ */
diff --git a/arch/powerpc/include/uapi/asm/Kbuild b/arch/powerpc/include/uapi/asm/Kbuild
index baebb3da1d4..a33c3c03bb2 100644
--- a/arch/powerpc/include/uapi/asm/Kbuild
+++ b/arch/powerpc/include/uapi/asm/Kbuild
@@ -1,3 +1,44 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4header-y += auxvec.h
5header-y += bitsperlong.h
6header-y += bootx.h
7header-y += byteorder.h
8header-y += cputable.h
9header-y += elf.h
10header-y += errno.h
11header-y += fcntl.h
12header-y += ioctl.h
13header-y += ioctls.h
14header-y += ipcbuf.h
15header-y += kvm.h
16header-y += kvm_para.h
17header-y += linkage.h
18header-y += mman.h
19header-y += msgbuf.h
20header-y += nvram.h
21header-y += param.h
22header-y += poll.h
23header-y += posix_types.h
24header-y += ps3fb.h
25header-y += ptrace.h
26header-y += resource.h
27header-y += seccomp.h
28header-y += sembuf.h
29header-y += setup.h
30header-y += shmbuf.h
31header-y += sigcontext.h
32header-y += siginfo.h
33header-y += signal.h
34header-y += socket.h
35header-y += sockios.h
36header-y += spu_info.h
37header-y += stat.h
38header-y += statfs.h
39header-y += swab.h
40header-y += termbits.h
41header-y += termios.h
42header-y += types.h
43header-y += ucontext.h
44header-y += unistd.h
diff --git a/arch/powerpc/include/asm/auxvec.h b/arch/powerpc/include/uapi/asm/auxvec.h
index ce17d2c9eb4..ce17d2c9eb4 100644
--- a/arch/powerpc/include/asm/auxvec.h
+++ b/arch/powerpc/include/uapi/asm/auxvec.h
diff --git a/arch/powerpc/include/asm/bitsperlong.h b/arch/powerpc/include/uapi/asm/bitsperlong.h
index 5f1659032c4..5f1659032c4 100644
--- a/arch/powerpc/include/asm/bitsperlong.h
+++ b/arch/powerpc/include/uapi/asm/bitsperlong.h
diff --git a/arch/powerpc/include/uapi/asm/bootx.h b/arch/powerpc/include/uapi/asm/bootx.h
new file mode 100644
index 00000000000..6e51cf0708a
--- /dev/null
+++ b/arch/powerpc/include/uapi/asm/bootx.h
@@ -0,0 +1,132 @@
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 */
55typedef 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. */
65typedef 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__ */
diff --git a/arch/powerpc/include/asm/byteorder.h b/arch/powerpc/include/uapi/asm/byteorder.h
index aa6cc4fac96..aa6cc4fac96 100644
--- a/arch/powerpc/include/asm/byteorder.h
+++ b/arch/powerpc/include/uapi/asm/byteorder.h
diff --git a/arch/powerpc/include/uapi/asm/cputable.h b/arch/powerpc/include/uapi/asm/cputable.h
new file mode 100644
index 00000000000..ed9dd815696
--- /dev/null
+++ b/arch/powerpc/include/uapi/asm/cputable.h
@@ -0,0 +1,36 @@
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 */
diff --git a/arch/powerpc/include/uapi/asm/elf.h b/arch/powerpc/include/uapi/asm/elf.h
new file mode 100644
index 00000000000..05b8d560cfb
--- /dev/null
+++ b/arch/powerpc/include/uapi/asm/elf.h
@@ -0,0 +1,307 @@
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
95typedef unsigned long elf_greg_t64;
96typedef elf_greg_t64 elf_gregset_t64[ELF_NGREG];
97
98typedef unsigned int elf_greg_t32;
99typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG];
100typedef 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 */
132typedef double elf_fpreg_t;
133typedef 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 */
154typedef __vector128 elf_vrreg_t;
155typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
156#ifdef __powerpc64__
157typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32];
158typedef 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 \
173do { \
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 */
300struct ppc64_opd_entry
301{
302 unsigned long funcaddr;
303 unsigned long r2;
304};
305
306
307#endif /* _UAPI_ASM_POWERPC_ELF_H */
diff --git a/arch/powerpc/include/asm/errno.h b/arch/powerpc/include/uapi/asm/errno.h
index 8c145fd17d8..8c145fd17d8 100644
--- a/arch/powerpc/include/asm/errno.h
+++ b/arch/powerpc/include/uapi/asm/errno.h
diff --git a/arch/powerpc/include/asm/fcntl.h b/arch/powerpc/include/uapi/asm/fcntl.h
index ce5c4516d40..ce5c4516d40 100644
--- a/arch/powerpc/include/asm/fcntl.h
+++ b/arch/powerpc/include/uapi/asm/fcntl.h
diff --git a/arch/powerpc/include/asm/ioctl.h b/arch/powerpc/include/uapi/asm/ioctl.h
index 57d68304218..57d68304218 100644
--- a/arch/powerpc/include/asm/ioctl.h
+++ b/arch/powerpc/include/uapi/asm/ioctl.h
diff --git a/arch/powerpc/include/asm/ioctls.h b/arch/powerpc/include/uapi/asm/ioctls.h
index e9b78870aaa..e9b78870aaa 100644
--- a/arch/powerpc/include/asm/ioctls.h
+++ b/arch/powerpc/include/uapi/asm/ioctls.h
diff --git a/arch/powerpc/include/asm/ipcbuf.h b/arch/powerpc/include/uapi/asm/ipcbuf.h
index 2c3e1d94db1..2c3e1d94db1 100644
--- a/arch/powerpc/include/asm/ipcbuf.h
+++ b/arch/powerpc/include/uapi/asm/ipcbuf.h
diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h
index 1bea4d8ea6f..1bea4d8ea6f 100644
--- a/arch/powerpc/include/asm/kvm.h
+++ b/arch/powerpc/include/uapi/asm/kvm.h
diff --git a/arch/powerpc/include/uapi/asm/kvm_para.h b/arch/powerpc/include/uapi/asm/kvm_para.h
new file mode 100644
index 00000000000..5e04383a1db
--- /dev/null
+++ b/arch/powerpc/include/uapi/asm/kvm_para.h
@@ -0,0 +1,90 @@
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 */
35struct 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__ */
diff --git a/arch/powerpc/include/asm/linkage.h b/arch/powerpc/include/uapi/asm/linkage.h
index e1c4ac1cc4b..e1c4ac1cc4b 100644
--- a/arch/powerpc/include/asm/linkage.h
+++ b/arch/powerpc/include/uapi/asm/linkage.h
diff --git a/arch/powerpc/include/uapi/asm/mman.h b/arch/powerpc/include/uapi/asm/mman.h
new file mode 100644
index 00000000000..6ea26df0a73
--- /dev/null
+++ b/arch/powerpc/include/uapi/asm/mman.h
@@ -0,0 +1,31 @@
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 */
diff --git a/arch/powerpc/include/asm/msgbuf.h b/arch/powerpc/include/uapi/asm/msgbuf.h
index dd76743c753..dd76743c753 100644
--- a/arch/powerpc/include/asm/msgbuf.h
+++ b/arch/powerpc/include/uapi/asm/msgbuf.h
diff --git a/arch/powerpc/include/uapi/asm/nvram.h b/arch/powerpc/include/uapi/asm/nvram.h
new file mode 100644
index 00000000000..608bdc8aedd
--- /dev/null
+++ b/arch/powerpc/include/uapi/asm/nvram.h
@@ -0,0 +1,62 @@
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
31enum {
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 */
43struct 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 */
diff --git a/arch/powerpc/include/asm/param.h b/arch/powerpc/include/uapi/asm/param.h
index 965d4542797..965d4542797 100644
--- a/arch/powerpc/include/asm/param.h
+++ b/arch/powerpc/include/uapi/asm/param.h
diff --git a/arch/powerpc/include/asm/poll.h b/arch/powerpc/include/uapi/asm/poll.h
index c98509d3149..c98509d3149 100644
--- a/arch/powerpc/include/asm/poll.h
+++ b/arch/powerpc/include/uapi/asm/poll.h
diff --git a/arch/powerpc/include/asm/posix_types.h b/arch/powerpc/include/uapi/asm/posix_types.h
index 2958c5b97b2..2958c5b97b2 100644
--- a/arch/powerpc/include/asm/posix_types.h
+++ b/arch/powerpc/include/uapi/asm/posix_types.h
diff --git a/arch/powerpc/include/asm/ps3fb.h b/arch/powerpc/include/uapi/asm/ps3fb.h
index e7233a84968..e7233a84968 100644
--- a/arch/powerpc/include/asm/ps3fb.h
+++ b/arch/powerpc/include/uapi/asm/ps3fb.h
diff --git a/arch/powerpc/include/uapi/asm/ptrace.h b/arch/powerpc/include/uapi/asm/ptrace.h
new file mode 100644
index 00000000000..ee67a2bc91b
--- /dev/null
+++ b/arch/powerpc/include/uapi/asm/ptrace.h
@@ -0,0 +1,259 @@
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
31struct 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
194struct 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
216struct 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 */
diff --git a/arch/powerpc/include/asm/resource.h b/arch/powerpc/include/uapi/asm/resource.h
index 04bc4db8921..04bc4db8921 100644
--- a/arch/powerpc/include/asm/resource.h
+++ b/arch/powerpc/include/uapi/asm/resource.h
diff --git a/arch/powerpc/include/asm/seccomp.h b/arch/powerpc/include/uapi/asm/seccomp.h
index 00c1d9133cf..00c1d9133cf 100644
--- a/arch/powerpc/include/asm/seccomp.h
+++ b/arch/powerpc/include/uapi/asm/seccomp.h
diff --git a/arch/powerpc/include/asm/sembuf.h b/arch/powerpc/include/uapi/asm/sembuf.h
index 99a41938ae3..99a41938ae3 100644
--- a/arch/powerpc/include/asm/sembuf.h
+++ b/arch/powerpc/include/uapi/asm/sembuf.h
diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/uapi/asm/setup.h
index 8b9a306260b..8b9a306260b 100644
--- a/arch/powerpc/include/asm/setup.h
+++ b/arch/powerpc/include/uapi/asm/setup.h
diff --git a/arch/powerpc/include/asm/shmbuf.h b/arch/powerpc/include/uapi/asm/shmbuf.h
index 8efa39698b6..8efa39698b6 100644
--- a/arch/powerpc/include/asm/shmbuf.h
+++ b/arch/powerpc/include/uapi/asm/shmbuf.h
diff --git a/arch/powerpc/include/asm/sigcontext.h b/arch/powerpc/include/uapi/asm/sigcontext.h
index 9c1f24fd5d1..9c1f24fd5d1 100644
--- a/arch/powerpc/include/asm/sigcontext.h
+++ b/arch/powerpc/include/uapi/asm/sigcontext.h
diff --git a/arch/powerpc/include/asm/siginfo.h b/arch/powerpc/include/uapi/asm/siginfo.h
index ccce3ef5cd8..ccce3ef5cd8 100644
--- a/arch/powerpc/include/asm/siginfo.h
+++ b/arch/powerpc/include/uapi/asm/siginfo.h
diff --git a/arch/powerpc/include/uapi/asm/signal.h b/arch/powerpc/include/uapi/asm/signal.h
new file mode 100644
index 00000000000..48fa8d3f2f9
--- /dev/null
+++ b/arch/powerpc/include/uapi/asm/signal.h
@@ -0,0 +1,145 @@
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
14typedef unsigned long old_sigset_t; /* at least 32 bits */
15
16typedef 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
99struct 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
106struct 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
113struct k_sigaction {
114 struct sigaction sa;
115};
116
117typedef 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 */
133struct 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 */
diff --git a/arch/powerpc/include/asm/socket.h b/arch/powerpc/include/uapi/asm/socket.h
index 3d5179bb122..3d5179bb122 100644
--- a/arch/powerpc/include/asm/socket.h
+++ b/arch/powerpc/include/uapi/asm/socket.h
diff --git a/arch/powerpc/include/asm/sockios.h b/arch/powerpc/include/uapi/asm/sockios.h
index 55cef7675a3..55cef7675a3 100644
--- a/arch/powerpc/include/asm/sockios.h
+++ b/arch/powerpc/include/uapi/asm/sockios.h
diff --git a/arch/powerpc/include/uapi/asm/spu_info.h b/arch/powerpc/include/uapi/asm/spu_info.h
new file mode 100644
index 00000000000..ed071bf9770
--- /dev/null
+++ b/arch/powerpc/include/uapi/asm/spu_info.h
@@ -0,0 +1,53 @@
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__
29struct 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
37struct 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
46struct 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 */
diff --git a/arch/powerpc/include/asm/stat.h b/arch/powerpc/include/uapi/asm/stat.h
index 84880b80cc1..84880b80cc1 100644
--- a/arch/powerpc/include/asm/stat.h
+++ b/arch/powerpc/include/uapi/asm/stat.h
diff --git a/arch/powerpc/include/asm/statfs.h b/arch/powerpc/include/uapi/asm/statfs.h
index 5244834583a..5244834583a 100644
--- a/arch/powerpc/include/asm/statfs.h
+++ b/arch/powerpc/include/uapi/asm/statfs.h
diff --git a/arch/powerpc/include/uapi/asm/swab.h b/arch/powerpc/include/uapi/asm/swab.h
new file mode 100644
index 00000000000..b6c368aa5c0
--- /dev/null
+++ b/arch/powerpc/include/uapi/asm/swab.h
@@ -0,0 +1,23 @@
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 */
diff --git a/arch/powerpc/include/asm/termbits.h b/arch/powerpc/include/uapi/asm/termbits.h
index 549d700e18f..549d700e18f 100644
--- a/arch/powerpc/include/asm/termbits.h
+++ b/arch/powerpc/include/uapi/asm/termbits.h
diff --git a/arch/powerpc/include/uapi/asm/termios.h b/arch/powerpc/include/uapi/asm/termios.h
new file mode 100644
index 00000000000..6cca5cdfec0
--- /dev/null
+++ b/arch/powerpc/include/uapi/asm/termios.h
@@ -0,0 +1,76 @@
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
19struct sgttyb {
20 char sg_ispeed;
21 char sg_ospeed;
22 char sg_erase;
23 char sg_kill;
24 short sg_flags;
25};
26
27struct 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
36struct 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
45struct 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
53struct 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 */
diff --git a/arch/powerpc/include/uapi/asm/types.h b/arch/powerpc/include/uapi/asm/types.h
new file mode 100644
index 00000000000..4b8ab990a3c
--- /dev/null
+++ b/arch/powerpc/include/uapi/asm/types.h
@@ -0,0 +1,40 @@
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
33typedef struct {
34 __u32 u[4];
35} __attribute__((aligned(16))) __vector128;
36
37#endif /* __ASSEMBLY__ */
38
39
40#endif /* _UAPI_ASM_POWERPC_TYPES_H */
diff --git a/arch/powerpc/include/asm/ucontext.h b/arch/powerpc/include/uapi/asm/ucontext.h
index d9a4ddf0cc8..d9a4ddf0cc8 100644
--- a/arch/powerpc/include/asm/ucontext.h
+++ b/arch/powerpc/include/uapi/asm/ucontext.h
diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h
new file mode 100644
index 00000000000..380b5d37a90
--- /dev/null
+++ b/arch/powerpc/include/uapi/asm/unistd.h
@@ -0,0 +1,380 @@
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_ */