diff options
Diffstat (limited to 'include/asm-ppc64')
31 files changed, 312 insertions, 890 deletions
diff --git a/include/asm-ppc64/auxvec.h b/include/asm-ppc64/auxvec.h new file mode 100644 index 000000000000..ac6381a106e1 --- /dev/null +++ b/include/asm-ppc64/auxvec.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef __PPC64_AUXVEC_H | ||
2 | #define __PPC64_AUXVEC_H | ||
3 | |||
4 | /* | ||
5 | * We need to put in some extra aux table entries to tell glibc what | ||
6 | * the cache block size is, so it can use the dcbz instruction safely. | ||
7 | */ | ||
8 | #define AT_DCACHEBSIZE 19 | ||
9 | #define AT_ICACHEBSIZE 20 | ||
10 | #define AT_UCACHEBSIZE 21 | ||
11 | /* A special ignored type value for PPC, for glibc compatibility. */ | ||
12 | #define AT_IGNOREPPC 22 | ||
13 | |||
14 | /* The vDSO location. We have to use the same value as x86 for glibc's | ||
15 | * sake :-) | ||
16 | */ | ||
17 | #define AT_SYSINFO_EHDR 33 | ||
18 | |||
19 | #endif /* __PPC64_AUXVEC_H */ | ||
diff --git a/include/asm-ppc64/bugs.h b/include/asm-ppc64/bugs.h deleted file mode 100644 index 861074b3cf71..000000000000 --- a/include/asm-ppc64/bugs.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | /* | ||
2 | * This file is included by 'init/main.c' to check for architecture-dependent | ||
3 | * bugs. | ||
4 | * | ||
5 | */ | ||
6 | #ifndef _ASM_PPC64_BUGS_H | ||
7 | #define _ASM_PPC64_BUGS_H | ||
8 | |||
9 | static void check_bugs(void) { | ||
10 | } | ||
11 | |||
12 | #endif /* _ASM_PPC64_BUGS_H */ | ||
diff --git a/include/asm-ppc64/compat.h b/include/asm-ppc64/compat.h index 12414f5fc666..6ec62cd2d1d1 100644 --- a/include/asm-ppc64/compat.h +++ b/include/asm-ppc64/compat.h | |||
@@ -13,8 +13,10 @@ typedef s32 compat_ssize_t; | |||
13 | typedef s32 compat_time_t; | 13 | typedef s32 compat_time_t; |
14 | typedef s32 compat_clock_t; | 14 | typedef s32 compat_clock_t; |
15 | typedef s32 compat_pid_t; | 15 | typedef s32 compat_pid_t; |
16 | typedef u32 compat_uid_t; | 16 | typedef u32 __compat_uid_t; |
17 | typedef u32 compat_gid_t; | 17 | typedef u32 __compat_gid_t; |
18 | typedef u32 __compat_uid32_t; | ||
19 | typedef u32 __compat_gid32_t; | ||
18 | typedef u32 compat_mode_t; | 20 | typedef u32 compat_mode_t; |
19 | typedef u32 compat_ino_t; | 21 | typedef u32 compat_ino_t; |
20 | typedef u32 compat_dev_t; | 22 | typedef u32 compat_dev_t; |
@@ -48,8 +50,8 @@ struct compat_stat { | |||
48 | compat_ino_t st_ino; | 50 | compat_ino_t st_ino; |
49 | compat_mode_t st_mode; | 51 | compat_mode_t st_mode; |
50 | compat_nlink_t st_nlink; | 52 | compat_nlink_t st_nlink; |
51 | compat_uid_t st_uid; | 53 | __compat_uid32_t st_uid; |
52 | compat_gid_t st_gid; | 54 | __compat_gid32_t st_gid; |
53 | compat_dev_t st_rdev; | 55 | compat_dev_t st_rdev; |
54 | compat_off_t st_size; | 56 | compat_off_t st_size; |
55 | compat_off_t st_blksize; | 57 | compat_off_t st_blksize; |
@@ -144,10 +146,10 @@ static inline void __user *compat_alloc_user_space(long len) | |||
144 | */ | 146 | */ |
145 | struct compat_ipc64_perm { | 147 | struct compat_ipc64_perm { |
146 | compat_key_t key; | 148 | compat_key_t key; |
147 | compat_uid_t uid; | 149 | __compat_uid_t uid; |
148 | compat_gid_t gid; | 150 | __compat_gid_t gid; |
149 | compat_uid_t cuid; | 151 | __compat_uid_t cuid; |
150 | compat_gid_t cgid; | 152 | __compat_gid_t cgid; |
151 | compat_mode_t mode; | 153 | compat_mode_t mode; |
152 | unsigned int seq; | 154 | unsigned int seq; |
153 | unsigned int __pad2; | 155 | unsigned int __pad2; |
diff --git a/include/asm-ppc64/cputable.h b/include/asm-ppc64/cputable.h index ae6cf3830108..acc9b4d6c168 100644 --- a/include/asm-ppc64/cputable.h +++ b/include/asm-ppc64/cputable.h | |||
@@ -36,6 +36,7 @@ | |||
36 | * via the mkdefs mechanism. | 36 | * via the mkdefs mechanism. |
37 | */ | 37 | */ |
38 | struct cpu_spec; | 38 | struct cpu_spec; |
39 | struct op_ppc64_model; | ||
39 | 40 | ||
40 | typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec); | 41 | typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec); |
41 | 42 | ||
@@ -52,10 +53,19 @@ struct cpu_spec { | |||
52 | unsigned int icache_bsize; | 53 | unsigned int icache_bsize; |
53 | unsigned int dcache_bsize; | 54 | unsigned int dcache_bsize; |
54 | 55 | ||
56 | /* number of performance monitor counters */ | ||
57 | unsigned int num_pmcs; | ||
58 | |||
55 | /* this is called to initialize various CPU bits like L1 cache, | 59 | /* this is called to initialize various CPU bits like L1 cache, |
56 | * BHT, SPD, etc... from head.S before branching to identify_machine | 60 | * BHT, SPD, etc... from head.S before branching to identify_machine |
57 | */ | 61 | */ |
58 | cpu_setup_t cpu_setup; | 62 | cpu_setup_t cpu_setup; |
63 | |||
64 | /* Used by oprofile userspace to select the right counters */ | ||
65 | char *oprofile_cpu_type; | ||
66 | |||
67 | /* Processor specific oprofile operations */ | ||
68 | struct op_ppc64_model *oprofile_model; | ||
59 | }; | 69 | }; |
60 | 70 | ||
61 | extern struct cpu_spec cpu_specs[]; | 71 | extern struct cpu_spec cpu_specs[]; |
@@ -95,7 +105,7 @@ static inline unsigned long cpu_has_feature(unsigned long feature) | |||
95 | #define CPU_FTR_NODSISRALIGN ASM_CONST(0x0000001000000000) | 105 | #define CPU_FTR_NODSISRALIGN ASM_CONST(0x0000001000000000) |
96 | #define CPU_FTR_IABR ASM_CONST(0x0000002000000000) | 106 | #define CPU_FTR_IABR ASM_CONST(0x0000002000000000) |
97 | #define CPU_FTR_MMCRA ASM_CONST(0x0000004000000000) | 107 | #define CPU_FTR_MMCRA ASM_CONST(0x0000004000000000) |
98 | #define CPU_FTR_PMC8 ASM_CONST(0x0000008000000000) | 108 | /* unused ASM_CONST(0x0000008000000000) */ |
99 | #define CPU_FTR_SMT ASM_CONST(0x0000010000000000) | 109 | #define CPU_FTR_SMT ASM_CONST(0x0000010000000000) |
100 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0000020000000000) | 110 | #define CPU_FTR_COHERENT_ICACHE ASM_CONST(0x0000020000000000) |
101 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0000040000000000) | 111 | #define CPU_FTR_LOCKLESS_TLBIE ASM_CONST(0x0000040000000000) |
diff --git a/include/asm-ppc64/elf.h b/include/asm-ppc64/elf.h index 085eedb956fe..c919a89343db 100644 --- a/include/asm-ppc64/elf.h +++ b/include/asm-ppc64/elf.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | #include <asm/ptrace.h> | 5 | #include <asm/ptrace.h> |
6 | #include <asm/cputable.h> | 6 | #include <asm/cputable.h> |
7 | #include <asm/auxvec.h> | ||
7 | 8 | ||
8 | /* PowerPC relocations defined by the ABIs */ | 9 | /* PowerPC relocations defined by the ABIs */ |
9 | #define R_PPC_NONE 0 | 10 | #define R_PPC_NONE 0 |
@@ -237,21 +238,6 @@ do { \ | |||
237 | 238 | ||
238 | #endif | 239 | #endif |
239 | 240 | ||
240 | /* | ||
241 | * We need to put in some extra aux table entries to tell glibc what | ||
242 | * the cache block size is, so it can use the dcbz instruction safely. | ||
243 | */ | ||
244 | #define AT_DCACHEBSIZE 19 | ||
245 | #define AT_ICACHEBSIZE 20 | ||
246 | #define AT_UCACHEBSIZE 21 | ||
247 | /* A special ignored type value for PPC, for glibc compatibility. */ | ||
248 | #define AT_IGNOREPPC 22 | ||
249 | |||
250 | /* The vDSO location. We have to use the same value as x86 for glibc's | ||
251 | * sake :-) | ||
252 | */ | ||
253 | #define AT_SYSINFO_EHDR 33 | ||
254 | |||
255 | extern int dcache_bsize; | 241 | extern int dcache_bsize; |
256 | extern int icache_bsize; | 242 | extern int icache_bsize; |
257 | extern int ucache_bsize; | 243 | extern int ucache_bsize; |
diff --git a/include/asm-ppc64/fcntl.h b/include/asm-ppc64/fcntl.h deleted file mode 100644 index 842560d50656..000000000000 --- a/include/asm-ppc64/fcntl.h +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | #ifndef _PPC64_FCNTL_H | ||
2 | #define _PPC64_FCNTL_H | ||
3 | |||
4 | /* | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version | ||
8 | * 2 of the License, or (at your option) any later version. | ||
9 | */ | ||
10 | |||
11 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | ||
12 | located on an ext2 file system */ | ||
13 | #define O_ACCMODE 0003 | ||
14 | #define O_RDONLY 00 | ||
15 | #define O_WRONLY 01 | ||
16 | #define O_RDWR 02 | ||
17 | #define O_CREAT 0100 /* not fcntl */ | ||
18 | #define O_EXCL 0200 /* not fcntl */ | ||
19 | #define O_NOCTTY 0400 /* not fcntl */ | ||
20 | #define O_TRUNC 01000 /* not fcntl */ | ||
21 | #define O_APPEND 02000 | ||
22 | #define O_NONBLOCK 04000 | ||
23 | #define O_NDELAY O_NONBLOCK | ||
24 | #define O_SYNC 010000 | ||
25 | #define FASYNC 020000 /* fcntl, for BSD compatibility */ | ||
26 | #define O_DIRECTORY 040000 /* must be a directory */ | ||
27 | #define O_NOFOLLOW 0100000 /* don't follow links */ | ||
28 | #define O_LARGEFILE 0200000 | ||
29 | #define O_DIRECT 0400000 /* direct disk access hint */ | ||
30 | #define O_NOATIME 01000000 | ||
31 | |||
32 | #define F_DUPFD 0 /* dup */ | ||
33 | #define F_GETFD 1 /* get close_on_exec */ | ||
34 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
35 | #define F_GETFL 3 /* get file->f_flags */ | ||
36 | #define F_SETFL 4 /* set file->f_flags */ | ||
37 | #define F_GETLK 5 | ||
38 | #define F_SETLK 6 | ||
39 | #define F_SETLKW 7 | ||
40 | |||
41 | #define F_SETOWN 8 /* for sockets. */ | ||
42 | #define F_GETOWN 9 /* for sockets. */ | ||
43 | #define F_SETSIG 10 /* for sockets. */ | ||
44 | #define F_GETSIG 11 /* for sockets. */ | ||
45 | |||
46 | /* for F_[GET|SET]FL */ | ||
47 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
48 | |||
49 | /* for posix fcntl() and lockf() */ | ||
50 | #define F_RDLCK 0 | ||
51 | #define F_WRLCK 1 | ||
52 | #define F_UNLCK 2 | ||
53 | |||
54 | /* for old implementation of bsd flock () */ | ||
55 | #define F_EXLCK 4 /* or 3 */ | ||
56 | #define F_SHLCK 8 /* or 4 */ | ||
57 | |||
58 | /* for leases */ | ||
59 | #define F_INPROGRESS 16 | ||
60 | |||
61 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
62 | #define LOCK_SH 1 /* shared lock */ | ||
63 | #define LOCK_EX 2 /* exclusive lock */ | ||
64 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
65 | blocking */ | ||
66 | #define LOCK_UN 8 /* remove lock */ | ||
67 | |||
68 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
69 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
70 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
71 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
72 | |||
73 | #ifdef __KERNEL__ | ||
74 | #define F_POSIX 1 | ||
75 | #define F_FLOCK 2 | ||
76 | #define F_BROKEN 4 /* broken flock() emulation */ | ||
77 | #endif /* __KERNEL__ */ | ||
78 | |||
79 | struct flock { | ||
80 | short l_type; | ||
81 | short l_whence; | ||
82 | off_t l_start; | ||
83 | off_t l_len; | ||
84 | pid_t l_pid; | ||
85 | }; | ||
86 | |||
87 | #define F_LINUX_SPECIFIC_BASE 1024 | ||
88 | |||
89 | #endif /* _PPC64_FCNTL_H */ | ||
diff --git a/include/asm-ppc64/futex.h b/include/asm-ppc64/futex.h new file mode 100644 index 000000000000..cb2640b3a408 --- /dev/null +++ b/include/asm-ppc64/futex.h | |||
@@ -0,0 +1,83 @@ | |||
1 | #ifndef _ASM_FUTEX_H | ||
2 | #define _ASM_FUTEX_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <linux/futex.h> | ||
7 | #include <asm/errno.h> | ||
8 | #include <asm/memory.h> | ||
9 | #include <asm/uaccess.h> | ||
10 | |||
11 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ | ||
12 | __asm__ __volatile (SYNC_ON_SMP \ | ||
13 | "1: lwarx %0,0,%2\n" \ | ||
14 | insn \ | ||
15 | "2: stwcx. %1,0,%2\n\ | ||
16 | bne- 1b\n\ | ||
17 | li %1,0\n\ | ||
18 | 3: .section .fixup,\"ax\"\n\ | ||
19 | 4: li %1,%3\n\ | ||
20 | b 3b\n\ | ||
21 | .previous\n\ | ||
22 | .section __ex_table,\"a\"\n\ | ||
23 | .align 3\n\ | ||
24 | .llong 1b,4b,2b,4b\n\ | ||
25 | .previous" \ | ||
26 | : "=&r" (oldval), "=&r" (ret) \ | ||
27 | : "b" (uaddr), "i" (-EFAULT), "1" (oparg) \ | ||
28 | : "cr0", "memory") | ||
29 | |||
30 | static inline int | ||
31 | futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | ||
32 | { | ||
33 | int op = (encoded_op >> 28) & 7; | ||
34 | int cmp = (encoded_op >> 24) & 15; | ||
35 | int oparg = (encoded_op << 8) >> 20; | ||
36 | int cmparg = (encoded_op << 20) >> 20; | ||
37 | int oldval = 0, ret; | ||
38 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
39 | oparg = 1 << oparg; | ||
40 | |||
41 | if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int))) | ||
42 | return -EFAULT; | ||
43 | |||
44 | inc_preempt_count(); | ||
45 | |||
46 | switch (op) { | ||
47 | case FUTEX_OP_SET: | ||
48 | __futex_atomic_op("", ret, oldval, uaddr, oparg); | ||
49 | break; | ||
50 | case FUTEX_OP_ADD: | ||
51 | __futex_atomic_op("add %1,%0,%1\n", ret, oldval, uaddr, oparg); | ||
52 | break; | ||
53 | case FUTEX_OP_OR: | ||
54 | __futex_atomic_op("or %1,%0,%1\n", ret, oldval, uaddr, oparg); | ||
55 | break; | ||
56 | case FUTEX_OP_ANDN: | ||
57 | __futex_atomic_op("andc %1,%0,%1\n", ret, oldval, uaddr, oparg); | ||
58 | break; | ||
59 | case FUTEX_OP_XOR: | ||
60 | __futex_atomic_op("xor %1,%0,%1\n", ret, oldval, uaddr, oparg); | ||
61 | break; | ||
62 | default: | ||
63 | ret = -ENOSYS; | ||
64 | } | ||
65 | |||
66 | dec_preempt_count(); | ||
67 | |||
68 | if (!ret) { | ||
69 | switch (cmp) { | ||
70 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
71 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
72 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
73 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
74 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
75 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
76 | default: ret = -ENOSYS; | ||
77 | } | ||
78 | } | ||
79 | return ret; | ||
80 | } | ||
81 | |||
82 | #endif | ||
83 | #endif | ||
diff --git a/include/asm-ppc64/irq.h b/include/asm-ppc64/irq.h index 570678b1da95..99782afb4cde 100644 --- a/include/asm-ppc64/irq.h +++ b/include/asm-ppc64/irq.h | |||
@@ -33,6 +33,11 @@ | |||
33 | #define IRQ_POLARITY_POSITIVE 0x2 /* high level or low->high edge */ | 33 | #define IRQ_POLARITY_POSITIVE 0x2 /* high level or low->high edge */ |
34 | #define IRQ_POLARITY_NEGATIVE 0x0 /* low level or high->low edge */ | 34 | #define IRQ_POLARITY_NEGATIVE 0x0 /* low level or high->low edge */ |
35 | 35 | ||
36 | /* | ||
37 | * IRQ line status macro IRQ_PER_CPU is used | ||
38 | */ | ||
39 | #define ARCH_HAS_IRQ_PER_CPU | ||
40 | |||
36 | #define get_irq_desc(irq) (&irq_desc[(irq)]) | 41 | #define get_irq_desc(irq) (&irq_desc[(irq)]) |
37 | 42 | ||
38 | /* Define a way to iterate across irqs. */ | 43 | /* Define a way to iterate across irqs. */ |
diff --git a/include/asm-ppc64/kprobes.h b/include/asm-ppc64/kprobes.h index 0802919c3235..d9129d2b038e 100644 --- a/include/asm-ppc64/kprobes.h +++ b/include/asm-ppc64/kprobes.h | |||
@@ -42,6 +42,9 @@ typedef unsigned int kprobe_opcode_t; | |||
42 | 42 | ||
43 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)((func_descr_t *)pentry) | 43 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)((func_descr_t *)pentry) |
44 | 44 | ||
45 | #define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \ | ||
46 | IS_TWI(instr) || IS_TDI(instr)) | ||
47 | |||
45 | #define ARCH_SUPPORTS_KRETPROBES | 48 | #define ARCH_SUPPORTS_KRETPROBES |
46 | void kretprobe_trampoline(void); | 49 | void kretprobe_trampoline(void); |
47 | 50 | ||
diff --git a/include/asm-ppc64/lmb.h b/include/asm-ppc64/lmb.h index cb368bf0f264..de91e034bd98 100644 --- a/include/asm-ppc64/lmb.h +++ b/include/asm-ppc64/lmb.h | |||
@@ -56,4 +56,26 @@ extern void lmb_dump_all(void); | |||
56 | 56 | ||
57 | extern unsigned long io_hole_start; | 57 | extern unsigned long io_hole_start; |
58 | 58 | ||
59 | static inline unsigned long | ||
60 | lmb_size_bytes(struct lmb_region *type, unsigned long region_nr) | ||
61 | { | ||
62 | return type->region[region_nr].size; | ||
63 | } | ||
64 | static inline unsigned long | ||
65 | lmb_size_pages(struct lmb_region *type, unsigned long region_nr) | ||
66 | { | ||
67 | return lmb_size_bytes(type, region_nr) >> PAGE_SHIFT; | ||
68 | } | ||
69 | static inline unsigned long | ||
70 | lmb_start_pfn(struct lmb_region *type, unsigned long region_nr) | ||
71 | { | ||
72 | return type->region[region_nr].base >> PAGE_SHIFT; | ||
73 | } | ||
74 | static inline unsigned long | ||
75 | lmb_end_pfn(struct lmb_region *type, unsigned long region_nr) | ||
76 | { | ||
77 | return lmb_start_pfn(type, region_nr) + | ||
78 | lmb_size_pages(type, region_nr); | ||
79 | } | ||
80 | |||
59 | #endif /* _PPC64_LMB_H */ | 81 | #endif /* _PPC64_LMB_H */ |
diff --git a/include/asm-ppc64/lppaca.h b/include/asm-ppc64/lppaca.h index 70766b5f26c1..9e2a6c0649a0 100644 --- a/include/asm-ppc64/lppaca.h +++ b/include/asm-ppc64/lppaca.h | |||
@@ -108,7 +108,7 @@ struct lppaca | |||
108 | volatile u32 virtual_decr; // Virtual DECR for shared procsx78-x7B | 108 | volatile u32 virtual_decr; // Virtual DECR for shared procsx78-x7B |
109 | u16 slb_count; // # of SLBs to maintain x7C-x7D | 109 | u16 slb_count; // # of SLBs to maintain x7C-x7D |
110 | u8 idle; // Indicate OS is idle x7E | 110 | u8 idle; // Indicate OS is idle x7E |
111 | u8 reserved5; // Reserved x7F | 111 | u8 vmxregs_in_use; // VMX registers in use x7F |
112 | 112 | ||
113 | 113 | ||
114 | //============================================================================= | 114 | //============================================================================= |
diff --git a/include/asm-ppc64/machdep.h b/include/asm-ppc64/machdep.h index ff2c9287d3b6..9a1ef4427ed2 100644 --- a/include/asm-ppc64/machdep.h +++ b/include/asm-ppc64/machdep.h | |||
@@ -103,11 +103,6 @@ struct machdep_calls { | |||
103 | 103 | ||
104 | void (*progress)(char *, unsigned short); | 104 | void (*progress)(char *, unsigned short); |
105 | 105 | ||
106 | /* Debug interface. Low level I/O to some terminal device */ | ||
107 | void (*udbg_putc)(unsigned char c); | ||
108 | unsigned char (*udbg_getc)(void); | ||
109 | int (*udbg_getc_poll)(void); | ||
110 | |||
111 | /* Interface for platform error logging */ | 106 | /* Interface for platform error logging */ |
112 | void (*log_error)(char *buf, unsigned int err_type, int fatal); | 107 | void (*log_error)(char *buf, unsigned int err_type, int fatal); |
113 | 108 | ||
diff --git a/include/asm-ppc64/mc146818rtc.h b/include/asm-ppc64/mc146818rtc.h deleted file mode 100644 index f713e1bbb533..000000000000 --- a/include/asm-ppc64/mc146818rtc.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * Machine dependent access functions for RTC registers. | ||
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 __ASM_PPC64_MC146818RTC_H | ||
10 | #define __ASM_PPC64_MC146818RTC_H | ||
11 | |||
12 | #include <asm/io.h> | ||
13 | |||
14 | #ifndef RTC_PORT | ||
15 | #define RTC_PORT(x) (0x70 + (x)) | ||
16 | #define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */ | ||
17 | #endif | ||
18 | |||
19 | /* | ||
20 | * The yet supported machines all access the RTC index register via | ||
21 | * an ISA port access but the way to access the date register differs ... | ||
22 | */ | ||
23 | #define CMOS_READ(addr) ({ \ | ||
24 | outb_p((addr),RTC_PORT(0)); \ | ||
25 | inb_p(RTC_PORT(1)); \ | ||
26 | }) | ||
27 | #define CMOS_WRITE(val, addr) ({ \ | ||
28 | outb_p((addr),RTC_PORT(0)); \ | ||
29 | outb_p((val),RTC_PORT(1)); \ | ||
30 | }) | ||
31 | |||
32 | #endif /* __ASM_PPC64_MC146818RTC_H */ | ||
diff --git a/include/asm-ppc64/memory.h b/include/asm-ppc64/memory.h index 56e09face9a8..af53ffb55726 100644 --- a/include/asm-ppc64/memory.h +++ b/include/asm-ppc64/memory.h | |||
@@ -18,9 +18,11 @@ | |||
18 | #ifdef CONFIG_SMP | 18 | #ifdef CONFIG_SMP |
19 | #define EIEIO_ON_SMP "eieio\n" | 19 | #define EIEIO_ON_SMP "eieio\n" |
20 | #define ISYNC_ON_SMP "\n\tisync" | 20 | #define ISYNC_ON_SMP "\n\tisync" |
21 | #define SYNC_ON_SMP "lwsync\n\t" | ||
21 | #else | 22 | #else |
22 | #define EIEIO_ON_SMP | 23 | #define EIEIO_ON_SMP |
23 | #define ISYNC_ON_SMP | 24 | #define ISYNC_ON_SMP |
25 | #define SYNC_ON_SMP | ||
24 | #endif | 26 | #endif |
25 | 27 | ||
26 | static inline void eieio(void) | 28 | static inline void eieio(void) |
diff --git a/include/asm-ppc64/mman.h b/include/asm-ppc64/mman.h deleted file mode 100644 index d4f93446a52c..000000000000 --- a/include/asm-ppc64/mman.h +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | #ifndef __PPC64_MMAN_H__ | ||
2 | #define __PPC64_MMAN_H__ | ||
3 | |||
4 | /* | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version | ||
8 | * 2 of the License, or (at your option) any later version. | ||
9 | */ | ||
10 | |||
11 | #define PROT_READ 0x1 /* page can be read */ | ||
12 | #define PROT_WRITE 0x2 /* page can be written */ | ||
13 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
14 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
15 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
16 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
17 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
18 | |||
19 | #define MAP_SHARED 0x01 /* Share changes */ | ||
20 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
21 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
22 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
23 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
24 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | ||
25 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | ||
26 | #define MAP_LOCKED 0x80 | ||
27 | |||
28 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | ||
29 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | ||
30 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | ||
31 | |||
32 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
33 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
34 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
35 | |||
36 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | ||
37 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | ||
38 | |||
39 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | ||
40 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
41 | |||
42 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
43 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
44 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
45 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
46 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
47 | |||
48 | /* compatibility flags */ | ||
49 | #define MAP_ANON MAP_ANONYMOUS | ||
50 | #define MAP_FILE 0 | ||
51 | |||
52 | #endif /* __PPC64_MMAN_H__ */ | ||
diff --git a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h index ad36bb28de29..7bc42eb087ad 100644 --- a/include/asm-ppc64/mmu.h +++ b/include/asm-ppc64/mmu.h | |||
@@ -54,8 +54,10 @@ extern char initial_stab[]; | |||
54 | #define SLB_VSID_C ASM_CONST(0x0000000000000080) /* class */ | 54 | #define SLB_VSID_C ASM_CONST(0x0000000000000080) /* class */ |
55 | #define SLB_VSID_LS ASM_CONST(0x0000000000000070) /* size of largepage */ | 55 | #define SLB_VSID_LS ASM_CONST(0x0000000000000070) /* size of largepage */ |
56 | 56 | ||
57 | #define SLB_VSID_KERNEL (SLB_VSID_KP|SLB_VSID_C) | 57 | #define SLB_VSID_KERNEL (SLB_VSID_KP) |
58 | #define SLB_VSID_USER (SLB_VSID_KP|SLB_VSID_KS) | 58 | #define SLB_VSID_USER (SLB_VSID_KP|SLB_VSID_KS|SLB_VSID_C) |
59 | |||
60 | #define SLBIE_C (0x08000000) | ||
59 | 61 | ||
60 | /* | 62 | /* |
61 | * Hash table | 63 | * Hash table |
diff --git a/include/asm-ppc64/module.h b/include/asm-ppc64/module.h deleted file mode 100644 index 0581607826e8..000000000000 --- a/include/asm-ppc64/module.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | #ifndef _ASM_PPC64_MODULE_H | ||
2 | #define _ASM_PPC64_MODULE_H | ||
3 | |||
4 | #include <linux/list.h> | ||
5 | #include <asm/bug.h> | ||
6 | |||
7 | struct mod_arch_specific | ||
8 | { | ||
9 | /* Index of stubs section within module. */ | ||
10 | unsigned int stubs_section; | ||
11 | |||
12 | /* What section is the TOC? */ | ||
13 | unsigned int toc_section; | ||
14 | |||
15 | /* List of BUG addresses, source line numbers and filenames */ | ||
16 | struct list_head bug_list; | ||
17 | struct bug_entry *bug_table; | ||
18 | unsigned int num_bugs; | ||
19 | }; | ||
20 | |||
21 | extern struct bug_entry *module_find_bug(unsigned long bugaddr); | ||
22 | |||
23 | #define Elf_Shdr Elf64_Shdr | ||
24 | #define Elf_Sym Elf64_Sym | ||
25 | #define Elf_Ehdr Elf64_Ehdr | ||
26 | |||
27 | /* Make empty section for module_frob_arch_sections to expand. */ | ||
28 | #ifdef MODULE | ||
29 | asm(".section .stubs,\"ax\",@nobits; .align 3; .previous"); | ||
30 | #endif | ||
31 | |||
32 | struct exception_table_entry; | ||
33 | void sort_ex_table(struct exception_table_entry *start, | ||
34 | struct exception_table_entry *finish); | ||
35 | |||
36 | #endif /* _ASM_PPC64_MODULE_H */ | ||
diff --git a/include/asm-ppc64/oprofile_impl.h b/include/asm-ppc64/oprofile_impl.h new file mode 100644 index 000000000000..b04f1dfb1421 --- /dev/null +++ b/include/asm-ppc64/oprofile_impl.h | |||
@@ -0,0 +1,111 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004 Anton Blanchard <anton@au.ibm.com>, IBM | ||
3 | * | ||
4 | * Based on alpha version. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef OP_IMPL_H | ||
13 | #define OP_IMPL_H 1 | ||
14 | |||
15 | #define OP_MAX_COUNTER 8 | ||
16 | |||
17 | /* Per-counter configuration as set via oprofilefs. */ | ||
18 | struct op_counter_config { | ||
19 | unsigned long valid; | ||
20 | unsigned long enabled; | ||
21 | unsigned long event; | ||
22 | unsigned long count; | ||
23 | unsigned long kernel; | ||
24 | /* We dont support per counter user/kernel selection */ | ||
25 | unsigned long user; | ||
26 | unsigned long unit_mask; | ||
27 | }; | ||
28 | |||
29 | /* System-wide configuration as set via oprofilefs. */ | ||
30 | struct op_system_config { | ||
31 | unsigned long mmcr0; | ||
32 | unsigned long mmcr1; | ||
33 | unsigned long mmcra; | ||
34 | unsigned long enable_kernel; | ||
35 | unsigned long enable_user; | ||
36 | unsigned long backtrace_spinlocks; | ||
37 | }; | ||
38 | |||
39 | /* Per-arch configuration */ | ||
40 | struct op_ppc64_model { | ||
41 | void (*reg_setup) (struct op_counter_config *, | ||
42 | struct op_system_config *, | ||
43 | int num_counters); | ||
44 | void (*cpu_setup) (void *); | ||
45 | void (*start) (struct op_counter_config *); | ||
46 | void (*stop) (void); | ||
47 | void (*handle_interrupt) (struct pt_regs *, | ||
48 | struct op_counter_config *); | ||
49 | int num_counters; | ||
50 | }; | ||
51 | |||
52 | extern struct op_ppc64_model op_model_rs64; | ||
53 | extern struct op_ppc64_model op_model_power4; | ||
54 | |||
55 | static inline unsigned int ctr_read(unsigned int i) | ||
56 | { | ||
57 | switch(i) { | ||
58 | case 0: | ||
59 | return mfspr(SPRN_PMC1); | ||
60 | case 1: | ||
61 | return mfspr(SPRN_PMC2); | ||
62 | case 2: | ||
63 | return mfspr(SPRN_PMC3); | ||
64 | case 3: | ||
65 | return mfspr(SPRN_PMC4); | ||
66 | case 4: | ||
67 | return mfspr(SPRN_PMC5); | ||
68 | case 5: | ||
69 | return mfspr(SPRN_PMC6); | ||
70 | case 6: | ||
71 | return mfspr(SPRN_PMC7); | ||
72 | case 7: | ||
73 | return mfspr(SPRN_PMC8); | ||
74 | default: | ||
75 | return 0; | ||
76 | } | ||
77 | } | ||
78 | |||
79 | static inline void ctr_write(unsigned int i, unsigned int val) | ||
80 | { | ||
81 | switch(i) { | ||
82 | case 0: | ||
83 | mtspr(SPRN_PMC1, val); | ||
84 | break; | ||
85 | case 1: | ||
86 | mtspr(SPRN_PMC2, val); | ||
87 | break; | ||
88 | case 2: | ||
89 | mtspr(SPRN_PMC3, val); | ||
90 | break; | ||
91 | case 3: | ||
92 | mtspr(SPRN_PMC4, val); | ||
93 | break; | ||
94 | case 4: | ||
95 | mtspr(SPRN_PMC5, val); | ||
96 | break; | ||
97 | case 5: | ||
98 | mtspr(SPRN_PMC6, val); | ||
99 | break; | ||
100 | case 6: | ||
101 | mtspr(SPRN_PMC7, val); | ||
102 | break; | ||
103 | case 7: | ||
104 | mtspr(SPRN_PMC8, val); | ||
105 | break; | ||
106 | default: | ||
107 | break; | ||
108 | } | ||
109 | } | ||
110 | |||
111 | #endif | ||
diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h index a79a08df62bd..a15422bcf30d 100644 --- a/include/asm-ppc64/page.h +++ b/include/asm-ppc64/page.h | |||
@@ -172,20 +172,6 @@ typedef unsigned long pgprot_t; | |||
172 | 172 | ||
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | /* Pure 2^n version of get_order */ | ||
176 | static inline int get_order(unsigned long size) | ||
177 | { | ||
178 | int order; | ||
179 | |||
180 | size = (size-1) >> (PAGE_SHIFT-1); | ||
181 | order = -1; | ||
182 | do { | ||
183 | size >>= 1; | ||
184 | order++; | ||
185 | } while (size); | ||
186 | return order; | ||
187 | } | ||
188 | |||
189 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) | 175 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) |
190 | 176 | ||
191 | extern int page_is_ram(unsigned long pfn); | 177 | extern int page_is_ram(unsigned long pfn); |
@@ -270,4 +256,7 @@ extern u64 ppc64_pft_size; /* Log 2 of page table size */ | |||
270 | VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64) | 256 | VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64) |
271 | 257 | ||
272 | #endif /* __KERNEL__ */ | 258 | #endif /* __KERNEL__ */ |
259 | |||
260 | #include <asm-generic/page.h> | ||
261 | |||
273 | #endif /* _PPC64_PAGE_H */ | 262 | #endif /* _PPC64_PAGE_H */ |
diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h index 7bd4796f1236..8bd7aa959385 100644 --- a/include/asm-ppc64/processor.h +++ b/include/asm-ppc64/processor.h | |||
@@ -311,6 +311,20 @@ name: \ | |||
311 | .type GLUE(.,name),@function; \ | 311 | .type GLUE(.,name),@function; \ |
312 | GLUE(.,name): | 312 | GLUE(.,name): |
313 | 313 | ||
314 | #define _KPROBE(name) \ | ||
315 | .section ".kprobes.text","a"; \ | ||
316 | .align 2 ; \ | ||
317 | .globl name; \ | ||
318 | .globl GLUE(.,name); \ | ||
319 | .section ".opd","aw"; \ | ||
320 | name: \ | ||
321 | .quad GLUE(.,name); \ | ||
322 | .quad .TOC.@tocbase; \ | ||
323 | .quad 0; \ | ||
324 | .previous; \ | ||
325 | .type GLUE(.,name),@function; \ | ||
326 | GLUE(.,name): | ||
327 | |||
314 | #define _STATIC(name) \ | 328 | #define _STATIC(name) \ |
315 | .section ".text"; \ | 329 | .section ".text"; \ |
316 | .align 2 ; \ | 330 | .align 2 ; \ |
diff --git a/include/asm-ppc64/sembuf.h b/include/asm-ppc64/sembuf.h deleted file mode 100644 index 172e59000767..000000000000 --- a/include/asm-ppc64/sembuf.h +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | #ifndef _PPC64_SEMBUF_H | ||
2 | #define _PPC64_SEMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The semid64_ds structure for PPC architecture. | ||
6 | * | ||
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 | * Pad space is left for: | ||
14 | * - 2 miscellaneous 64-bit values | ||
15 | */ | ||
16 | |||
17 | struct semid64_ds { | ||
18 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | ||
19 | __kernel_time_t sem_otime; /* last semop time */ | ||
20 | __kernel_time_t sem_ctime; /* last change time */ | ||
21 | unsigned long sem_nsems; /* no. of semaphores in array */ | ||
22 | |||
23 | unsigned long __unused1; | ||
24 | unsigned long __unused2; | ||
25 | }; | ||
26 | |||
27 | #endif /* _PPC64_SEMBUF_H */ | ||
diff --git a/include/asm-ppc64/shmbuf.h b/include/asm-ppc64/shmbuf.h deleted file mode 100644 index 02e99d6ec925..000000000000 --- a/include/asm-ppc64/shmbuf.h +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | #ifndef _PPC64_SHMBUF_H | ||
2 | #define _PPC64_SHMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The shmid64_ds structure for PPC64 architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 2 miscellaneous 64-bit values | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version | ||
15 | * 2 of the License, or (at your option) any later version. | ||
16 | */ | ||
17 | |||
18 | struct shmid64_ds { | ||
19 | struct ipc64_perm shm_perm; /* operation perms */ | ||
20 | __kernel_time_t shm_atime; /* last attach time */ | ||
21 | __kernel_time_t shm_dtime; /* last detach time */ | ||
22 | __kernel_time_t shm_ctime; /* last change time */ | ||
23 | size_t shm_segsz; /* size of segment (bytes) */ | ||
24 | __kernel_pid_t shm_cpid; /* pid of creator */ | ||
25 | __kernel_pid_t shm_lpid; /* pid of last operator */ | ||
26 | unsigned long shm_nattch; /* no. of current attaches */ | ||
27 | unsigned long __unused1; | ||
28 | unsigned long __unused2; | ||
29 | }; | ||
30 | |||
31 | struct shminfo64 { | ||
32 | unsigned long shmmax; | ||
33 | unsigned long shmmin; | ||
34 | unsigned long shmmni; | ||
35 | unsigned long shmseg; | ||
36 | unsigned long shmall; | ||
37 | unsigned long __unused1; | ||
38 | unsigned long __unused2; | ||
39 | unsigned long __unused3; | ||
40 | unsigned long __unused4; | ||
41 | }; | ||
42 | |||
43 | #endif /* _PPC64_SHMBUF_H */ | ||
diff --git a/include/asm-ppc64/siginfo.h b/include/asm-ppc64/siginfo.h deleted file mode 100644 index 3a7c23dcb5aa..000000000000 --- a/include/asm-ppc64/siginfo.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #ifndef _PPC64_SIGINFO_H | ||
2 | #define _PPC64_SIGINFO_H | ||
3 | |||
4 | /* | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version | ||
8 | * 2 of the License, or (at your option) any later version. | ||
9 | */ | ||
10 | |||
11 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | ||
12 | #define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) | ||
13 | |||
14 | #include <asm-generic/siginfo.h> | ||
15 | |||
16 | #endif /* _PPC64_SIGINFO_H */ | ||
diff --git a/include/asm-ppc64/socket.h b/include/asm-ppc64/socket.h deleted file mode 100644 index 9e1af8eb2d96..000000000000 --- a/include/asm-ppc64/socket.h +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | #ifndef _ASM_SOCKET_H | ||
2 | #define _ASM_SOCKET_H | ||
3 | |||
4 | /* | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version | ||
8 | * 2 of the License, or (at your option) any later version. | ||
9 | */ | ||
10 | |||
11 | #include <asm/sockios.h> | ||
12 | |||
13 | /* For setsockoptions(2) */ | ||
14 | #define SOL_SOCKET 1 | ||
15 | |||
16 | #define SO_DEBUG 1 | ||
17 | #define SO_REUSEADDR 2 | ||
18 | #define SO_TYPE 3 | ||
19 | #define SO_ERROR 4 | ||
20 | #define SO_DONTROUTE 5 | ||
21 | #define SO_BROADCAST 6 | ||
22 | #define SO_SNDBUF 7 | ||
23 | #define SO_RCVBUF 8 | ||
24 | #define SO_SNDBUFFORCE 32 | ||
25 | #define SO_RCVBUFFORCE 33 | ||
26 | #define SO_KEEPALIVE 9 | ||
27 | #define SO_OOBINLINE 10 | ||
28 | #define SO_NO_CHECK 11 | ||
29 | #define SO_PRIORITY 12 | ||
30 | #define SO_LINGER 13 | ||
31 | #define SO_BSDCOMPAT 14 | ||
32 | /* To add :#define SO_REUSEPORT 15 */ | ||
33 | #define SO_RCVLOWAT 16 | ||
34 | #define SO_SNDLOWAT 17 | ||
35 | #define SO_RCVTIMEO 18 | ||
36 | #define SO_SNDTIMEO 19 | ||
37 | #define SO_PASSCRED 20 | ||
38 | #define SO_PEERCRED 21 | ||
39 | |||
40 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | ||
41 | #define SO_SECURITY_AUTHENTICATION 22 | ||
42 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 | ||
43 | #define SO_SECURITY_ENCRYPTION_NETWORK 24 | ||
44 | |||
45 | #define SO_BINDTODEVICE 25 | ||
46 | |||
47 | /* Socket filtering */ | ||
48 | #define SO_ATTACH_FILTER 26 | ||
49 | #define SO_DETACH_FILTER 27 | ||
50 | |||
51 | #define SO_PEERNAME 28 | ||
52 | #define SO_TIMESTAMP 29 | ||
53 | #define SCM_TIMESTAMP SO_TIMESTAMP | ||
54 | |||
55 | #define SO_ACCEPTCONN 30 | ||
56 | |||
57 | #define SO_PEERSEC 31 | ||
58 | |||
59 | #endif /* _ASM_SOCKET_H */ | ||
diff --git a/include/asm-ppc64/sockios.h b/include/asm-ppc64/sockios.h deleted file mode 100644 index 6bd1a22af4f6..000000000000 --- a/include/asm-ppc64/sockios.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #ifndef _ASM_PPC64_SOCKIOS_H | ||
2 | #define _ASM_PPC64_SOCKIOS_H | ||
3 | |||
4 | /* | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version | ||
8 | * 2 of the License, or (at your option) any later version. | ||
9 | */ | ||
10 | |||
11 | /* Socket-level I/O control calls. */ | ||
12 | #define FIOSETOWN 0x8901 | ||
13 | #define SIOCSPGRP 0x8902 | ||
14 | #define FIOGETOWN 0x8903 | ||
15 | #define SIOCGPGRP 0x8904 | ||
16 | #define SIOCATMARK 0x8905 | ||
17 | #define SIOCGSTAMP 0x8906 /* Get stamp */ | ||
18 | |||
19 | #endif /* _ASM_PPC64_SOCKIOS_H */ | ||
diff --git a/include/asm-ppc64/system.h b/include/asm-ppc64/system.h index b9e1835351e9..c0396428cc3c 100644 --- a/include/asm-ppc64/system.h +++ b/include/asm-ppc64/system.h | |||
@@ -158,7 +158,7 @@ static inline int __is_processor(unsigned long pv) | |||
158 | * is more like most of the other architectures. | 158 | * is more like most of the other architectures. |
159 | */ | 159 | */ |
160 | static __inline__ unsigned long | 160 | static __inline__ unsigned long |
161 | __xchg_u32(volatile int *m, unsigned long val) | 161 | __xchg_u32(volatile unsigned int *m, unsigned long val) |
162 | { | 162 | { |
163 | unsigned long dummy; | 163 | unsigned long dummy; |
164 | 164 | ||
@@ -200,7 +200,7 @@ __xchg_u64(volatile long *m, unsigned long val) | |||
200 | extern void __xchg_called_with_bad_pointer(void); | 200 | extern void __xchg_called_with_bad_pointer(void); |
201 | 201 | ||
202 | static __inline__ unsigned long | 202 | static __inline__ unsigned long |
203 | __xchg(volatile void *ptr, unsigned long x, int size) | 203 | __xchg(volatile void *ptr, unsigned long x, unsigned int size) |
204 | { | 204 | { |
205 | switch (size) { | 205 | switch (size) { |
206 | case 4: | 206 | case 4: |
@@ -223,7 +223,7 @@ __xchg(volatile void *ptr, unsigned long x, int size) | |||
223 | #define __HAVE_ARCH_CMPXCHG 1 | 223 | #define __HAVE_ARCH_CMPXCHG 1 |
224 | 224 | ||
225 | static __inline__ unsigned long | 225 | static __inline__ unsigned long |
226 | __cmpxchg_u32(volatile int *p, int old, int new) | 226 | __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) |
227 | { | 227 | { |
228 | unsigned int prev; | 228 | unsigned int prev; |
229 | 229 | ||
@@ -271,7 +271,8 @@ __cmpxchg_u64(volatile long *p, unsigned long old, unsigned long new) | |||
271 | extern void __cmpxchg_called_with_bad_pointer(void); | 271 | extern void __cmpxchg_called_with_bad_pointer(void); |
272 | 272 | ||
273 | static __inline__ unsigned long | 273 | static __inline__ unsigned long |
274 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | 274 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, |
275 | unsigned int size) | ||
275 | { | 276 | { |
276 | switch (size) { | 277 | switch (size) { |
277 | case 4: | 278 | case 4: |
@@ -283,13 +284,9 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
283 | return old; | 284 | return old; |
284 | } | 285 | } |
285 | 286 | ||
286 | #define cmpxchg(ptr,o,n) \ | 287 | #define cmpxchg(ptr,o,n)\ |
287 | ({ \ | 288 | ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ |
288 | __typeof__(*(ptr)) _o_ = (o); \ | 289 | (unsigned long)(n),sizeof(*(ptr)))) |
289 | __typeof__(*(ptr)) _n_ = (n); \ | ||
290 | (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \ | ||
291 | (unsigned long)_n_, sizeof(*(ptr))); \ | ||
292 | }) | ||
293 | 290 | ||
294 | /* | 291 | /* |
295 | * We handle most unaligned accesses in hardware. On the other hand | 292 | * We handle most unaligned accesses in hardware. On the other hand |
diff --git a/include/asm-ppc64/termbits.h b/include/asm-ppc64/termbits.h deleted file mode 100644 index d1a2bee10cef..000000000000 --- a/include/asm-ppc64/termbits.h +++ /dev/null | |||
@@ -1,193 +0,0 @@ | |||
1 | #ifndef _PPC64_TERMBITS_H | ||
2 | #define _PPC64_TERMBITS_H | ||
3 | |||
4 | /* | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version | ||
8 | * 2 of the License, or (at your option) any later version. | ||
9 | */ | ||
10 | |||
11 | #include <linux/posix_types.h> | ||
12 | |||
13 | typedef unsigned char cc_t; | ||
14 | typedef unsigned int speed_t; | ||
15 | typedef unsigned int tcflag_t; | ||
16 | |||
17 | /* | ||
18 | * termios type and macro definitions. Be careful about adding stuff | ||
19 | * to this file since it's used in GNU libc and there are strict rules | ||
20 | * concerning namespace pollution. | ||
21 | */ | ||
22 | |||
23 | #define NCCS 19 | ||
24 | struct termios { | ||
25 | tcflag_t c_iflag; /* input mode flags */ | ||
26 | tcflag_t c_oflag; /* output mode flags */ | ||
27 | tcflag_t c_cflag; /* control mode flags */ | ||
28 | tcflag_t c_lflag; /* local mode flags */ | ||
29 | cc_t c_cc[NCCS]; /* control characters */ | ||
30 | cc_t c_line; /* line discipline (== c_cc[19]) */ | ||
31 | speed_t c_ispeed; /* input speed */ | ||
32 | speed_t c_ospeed; /* output speed */ | ||
33 | }; | ||
34 | |||
35 | /* c_cc characters */ | ||
36 | #define VINTR 0 | ||
37 | #define VQUIT 1 | ||
38 | #define VERASE 2 | ||
39 | #define VKILL 3 | ||
40 | #define VEOF 4 | ||
41 | #define VMIN 5 | ||
42 | #define VEOL 6 | ||
43 | #define VTIME 7 | ||
44 | #define VEOL2 8 | ||
45 | #define VSWTC 9 | ||
46 | #define VWERASE 10 | ||
47 | #define VREPRINT 11 | ||
48 | #define VSUSP 12 | ||
49 | #define VSTART 13 | ||
50 | #define VSTOP 14 | ||
51 | #define VLNEXT 15 | ||
52 | #define VDISCARD 16 | ||
53 | |||
54 | /* c_iflag bits */ | ||
55 | #define IGNBRK 0000001 | ||
56 | #define BRKINT 0000002 | ||
57 | #define IGNPAR 0000004 | ||
58 | #define PARMRK 0000010 | ||
59 | #define INPCK 0000020 | ||
60 | #define ISTRIP 0000040 | ||
61 | #define INLCR 0000100 | ||
62 | #define IGNCR 0000200 | ||
63 | #define ICRNL 0000400 | ||
64 | #define IXON 0001000 | ||
65 | #define IXOFF 0002000 | ||
66 | #define IXANY 0004000 | ||
67 | #define IUCLC 0010000 | ||
68 | #define IMAXBEL 0020000 | ||
69 | #define IUTF8 0040000 | ||
70 | |||
71 | /* c_oflag bits */ | ||
72 | #define OPOST 0000001 | ||
73 | #define ONLCR 0000002 | ||
74 | #define OLCUC 0000004 | ||
75 | |||
76 | #define OCRNL 0000010 | ||
77 | #define ONOCR 0000020 | ||
78 | #define ONLRET 0000040 | ||
79 | |||
80 | #define OFILL 00000100 | ||
81 | #define OFDEL 00000200 | ||
82 | #define NLDLY 00001400 | ||
83 | #define NL0 00000000 | ||
84 | #define NL1 00000400 | ||
85 | #define NL2 00001000 | ||
86 | #define NL3 00001400 | ||
87 | #define TABDLY 00006000 | ||
88 | #define TAB0 00000000 | ||
89 | #define TAB1 00002000 | ||
90 | #define TAB2 00004000 | ||
91 | #define TAB3 00006000 | ||
92 | #define XTABS 00006000 /* required by POSIX to == TAB3 */ | ||
93 | #define CRDLY 00030000 | ||
94 | #define CR0 00000000 | ||
95 | #define CR1 00010000 | ||
96 | #define CR2 00020000 | ||
97 | #define CR3 00030000 | ||
98 | #define FFDLY 00040000 | ||
99 | #define FF0 00000000 | ||
100 | #define FF1 00040000 | ||
101 | #define BSDLY 00100000 | ||
102 | #define BS0 00000000 | ||
103 | #define BS1 00100000 | ||
104 | #define VTDLY 00200000 | ||
105 | #define VT0 00000000 | ||
106 | #define VT1 00200000 | ||
107 | |||
108 | /* c_cflag bit meaning */ | ||
109 | #define CBAUD 0000377 | ||
110 | #define B0 0000000 /* hang up */ | ||
111 | #define B50 0000001 | ||
112 | #define B75 0000002 | ||
113 | #define B110 0000003 | ||
114 | #define B134 0000004 | ||
115 | #define B150 0000005 | ||
116 | #define B200 0000006 | ||
117 | #define B300 0000007 | ||
118 | #define B600 0000010 | ||
119 | #define B1200 0000011 | ||
120 | #define B1800 0000012 | ||
121 | #define B2400 0000013 | ||
122 | #define B4800 0000014 | ||
123 | #define B9600 0000015 | ||
124 | #define B19200 0000016 | ||
125 | #define B38400 0000017 | ||
126 | #define EXTA B19200 | ||
127 | #define EXTB B38400 | ||
128 | #define CBAUDEX 0000000 | ||
129 | #define B57600 00020 | ||
130 | #define B115200 00021 | ||
131 | #define B230400 00022 | ||
132 | #define B460800 00023 | ||
133 | #define B500000 00024 | ||
134 | #define B576000 00025 | ||
135 | #define B921600 00026 | ||
136 | #define B1000000 00027 | ||
137 | #define B1152000 00030 | ||
138 | #define B1500000 00031 | ||
139 | #define B2000000 00032 | ||
140 | #define B2500000 00033 | ||
141 | #define B3000000 00034 | ||
142 | #define B3500000 00035 | ||
143 | #define B4000000 00036 | ||
144 | |||
145 | #define CSIZE 00001400 | ||
146 | #define CS5 00000000 | ||
147 | #define CS6 00000400 | ||
148 | #define CS7 00001000 | ||
149 | #define CS8 00001400 | ||
150 | |||
151 | #define CSTOPB 00002000 | ||
152 | #define CREAD 00004000 | ||
153 | #define PARENB 00010000 | ||
154 | #define PARODD 00020000 | ||
155 | #define HUPCL 00040000 | ||
156 | |||
157 | #define CLOCAL 00100000 | ||
158 | #define CRTSCTS 020000000000 /* flow control */ | ||
159 | |||
160 | /* c_lflag bits */ | ||
161 | #define ISIG 0x00000080 | ||
162 | #define ICANON 0x00000100 | ||
163 | #define XCASE 0x00004000 | ||
164 | #define ECHO 0x00000008 | ||
165 | #define ECHOE 0x00000002 | ||
166 | #define ECHOK 0x00000004 | ||
167 | #define ECHONL 0x00000010 | ||
168 | #define NOFLSH 0x80000000 | ||
169 | #define TOSTOP 0x00400000 | ||
170 | #define ECHOCTL 0x00000040 | ||
171 | #define ECHOPRT 0x00000020 | ||
172 | #define ECHOKE 0x00000001 | ||
173 | #define FLUSHO 0x00800000 | ||
174 | #define PENDIN 0x20000000 | ||
175 | #define IEXTEN 0x00000400 | ||
176 | |||
177 | /* Values for the ACTION argument to `tcflow'. */ | ||
178 | #define TCOOFF 0 | ||
179 | #define TCOON 1 | ||
180 | #define TCIOFF 2 | ||
181 | #define TCION 3 | ||
182 | |||
183 | /* Values for the QUEUE_SELECTOR argument to `tcflush'. */ | ||
184 | #define TCIFLUSH 0 | ||
185 | #define TCOFLUSH 1 | ||
186 | #define TCIOFLUSH 2 | ||
187 | |||
188 | /* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */ | ||
189 | #define TCSANOW 0 | ||
190 | #define TCSADRAIN 1 | ||
191 | #define TCSAFLUSH 2 | ||
192 | |||
193 | #endif /* _PPC64_TERMBITS_H */ | ||
diff --git a/include/asm-ppc64/termios.h b/include/asm-ppc64/termios.h deleted file mode 100644 index 02c3d283aa62..000000000000 --- a/include/asm-ppc64/termios.h +++ /dev/null | |||
@@ -1,235 +0,0 @@ | |||
1 | #ifndef _PPC64_TERMIOS_H | ||
2 | #define _PPC64_TERMIOS_H | ||
3 | |||
4 | /* | ||
5 | * Liberally adapted from alpha/termios.h. In particular, the c_cc[] | ||
6 | * fields have been reordered so that termio & termios share the | ||
7 | * common subset in the same order (for brain dead programs that don't | ||
8 | * know or care about the differences). | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License | ||
12 | * as published by the Free Software Foundation; either version | ||
13 | * 2 of the License, or (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #include <asm/ioctls.h> | ||
17 | #include <asm/termbits.h> | ||
18 | |||
19 | struct sgttyb { | ||
20 | char sg_ispeed; | ||
21 | char sg_ospeed; | ||
22 | char sg_erase; | ||
23 | char sg_kill; | ||
24 | short sg_flags; | ||
25 | }; | ||
26 | |||
27 | struct tchars { | ||
28 | char t_intrc; | ||
29 | char t_quitc; | ||
30 | char t_startc; | ||
31 | char t_stopc; | ||
32 | char t_eofc; | ||
33 | char t_brkc; | ||
34 | }; | ||
35 | |||
36 | struct ltchars { | ||
37 | char t_suspc; | ||
38 | char t_dsuspc; | ||
39 | char t_rprntc; | ||
40 | char t_flushc; | ||
41 | char t_werasc; | ||
42 | char t_lnextc; | ||
43 | }; | ||
44 | |||
45 | struct winsize { | ||
46 | unsigned short ws_row; | ||
47 | unsigned short ws_col; | ||
48 | unsigned short ws_xpixel; | ||
49 | unsigned short ws_ypixel; | ||
50 | }; | ||
51 | |||
52 | #define NCC 10 | ||
53 | struct termio { | ||
54 | unsigned short c_iflag; /* input mode flags */ | ||
55 | unsigned short c_oflag; /* output mode flags */ | ||
56 | unsigned short c_cflag; /* control mode flags */ | ||
57 | unsigned short c_lflag; /* local mode flags */ | ||
58 | unsigned char c_line; /* line discipline */ | ||
59 | unsigned char c_cc[NCC]; /* control characters */ | ||
60 | }; | ||
61 | |||
62 | /* c_cc characters */ | ||
63 | #define _VINTR 0 | ||
64 | #define _VQUIT 1 | ||
65 | #define _VERASE 2 | ||
66 | #define _VKILL 3 | ||
67 | #define _VEOF 4 | ||
68 | #define _VMIN 5 | ||
69 | #define _VEOL 6 | ||
70 | #define _VTIME 7 | ||
71 | #define _VEOL2 8 | ||
72 | #define _VSWTC 9 | ||
73 | |||
74 | /* line disciplines */ | ||
75 | #define N_TTY 0 | ||
76 | #define N_SLIP 1 | ||
77 | #define N_MOUSE 2 | ||
78 | #define N_PPP 3 | ||
79 | #define N_STRIP 4 | ||
80 | #define N_AX25 5 | ||
81 | #define N_X25 6 /* X.25 async */ | ||
82 | #define N_6PACK 7 | ||
83 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
84 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
85 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
86 | #define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */ | ||
87 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
88 | #define N_HDLC 13 /* synchronous HDLC */ | ||
89 | #define N_SYNC_PPP 14 | ||
90 | |||
91 | #ifdef __KERNEL__ | ||
92 | /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ | ||
93 | #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" | ||
94 | #endif | ||
95 | |||
96 | #define FIOCLEX _IO('f', 1) | ||
97 | #define FIONCLEX _IO('f', 2) | ||
98 | #define FIOASYNC _IOW('f', 125, int) | ||
99 | #define FIONBIO _IOW('f', 126, int) | ||
100 | #define FIONREAD _IOR('f', 127, int) | ||
101 | #define TIOCINQ FIONREAD | ||
102 | |||
103 | #define TIOCGETP _IOR('t', 8, struct sgttyb) | ||
104 | #define TIOCSETP _IOW('t', 9, struct sgttyb) | ||
105 | #define TIOCSETN _IOW('t', 10, struct sgttyb) /* TIOCSETP wo flush */ | ||
106 | |||
107 | #define TIOCSETC _IOW('t', 17, struct tchars) | ||
108 | #define TIOCGETC _IOR('t', 18, struct tchars) | ||
109 | #define TCGETS _IOR('t', 19, struct termios) | ||
110 | #define TCSETS _IOW('t', 20, struct termios) | ||
111 | #define TCSETSW _IOW('t', 21, struct termios) | ||
112 | #define TCSETSF _IOW('t', 22, struct termios) | ||
113 | |||
114 | #define TCGETA _IOR('t', 23, struct termio) | ||
115 | #define TCSETA _IOW('t', 24, struct termio) | ||
116 | #define TCSETAW _IOW('t', 25, struct termio) | ||
117 | #define TCSETAF _IOW('t', 28, struct termio) | ||
118 | |||
119 | #define TCSBRK _IO('t', 29) | ||
120 | #define TCXONC _IO('t', 30) | ||
121 | #define TCFLSH _IO('t', 31) | ||
122 | |||
123 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) | ||
124 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) | ||
125 | #define TIOCSTART _IO('t', 110) /* start output, like ^Q */ | ||
126 | #define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ | ||
127 | #define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ | ||
128 | |||
129 | #define TIOCGLTC _IOR('t', 116, struct ltchars) | ||
130 | #define TIOCSLTC _IOW('t', 117, struct ltchars) | ||
131 | #define TIOCSPGRP _IOW('t', 118, int) | ||
132 | #define TIOCGPGRP _IOR('t', 119, int) | ||
133 | |||
134 | #define TIOCEXCL 0x540C | ||
135 | #define TIOCNXCL 0x540D | ||
136 | #define TIOCSCTTY 0x540E | ||
137 | |||
138 | #define TIOCSTI 0x5412 | ||
139 | #define TIOCMGET 0x5415 | ||
140 | #define TIOCMBIS 0x5416 | ||
141 | #define TIOCMBIC 0x5417 | ||
142 | #define TIOCMSET 0x5418 | ||
143 | #define TIOCGSOFTCAR 0x5419 | ||
144 | #define TIOCSSOFTCAR 0x541A | ||
145 | #define TIOCLINUX 0x541C | ||
146 | #define TIOCCONS 0x541D | ||
147 | #define TIOCGSERIAL 0x541E | ||
148 | #define TIOCSSERIAL 0x541F | ||
149 | #define TIOCPKT 0x5420 | ||
150 | |||
151 | #define TIOCNOTTY 0x5422 | ||
152 | #define TIOCSETD 0x5423 | ||
153 | #define TIOCGETD 0x5424 | ||
154 | #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ | ||
155 | |||
156 | #define TIOCSERCONFIG 0x5453 | ||
157 | #define TIOCSERGWILD 0x5454 | ||
158 | #define TIOCSERSWILD 0x5455 | ||
159 | #define TIOCGLCKTRMIOS 0x5456 | ||
160 | #define TIOCSLCKTRMIOS 0x5457 | ||
161 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ | ||
162 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ | ||
163 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ | ||
164 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ | ||
165 | |||
166 | #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ | ||
167 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ | ||
168 | |||
169 | /* Used for packet mode */ | ||
170 | #define TIOCPKT_DATA 0 | ||
171 | #define TIOCPKT_FLUSHREAD 1 | ||
172 | #define TIOCPKT_FLUSHWRITE 2 | ||
173 | #define TIOCPKT_STOP 4 | ||
174 | #define TIOCPKT_START 8 | ||
175 | #define TIOCPKT_NOSTOP 16 | ||
176 | #define TIOCPKT_DOSTOP 32 | ||
177 | |||
178 | /* modem lines */ | ||
179 | #define TIOCM_LE 0x001 | ||
180 | #define TIOCM_DTR 0x002 | ||
181 | #define TIOCM_RTS 0x004 | ||
182 | #define TIOCM_ST 0x008 | ||
183 | #define TIOCM_SR 0x010 | ||
184 | #define TIOCM_CTS 0x020 | ||
185 | #define TIOCM_CAR 0x040 | ||
186 | #define TIOCM_RNG 0x080 | ||
187 | #define TIOCM_DSR 0x100 | ||
188 | #define TIOCM_CD TIOCM_CAR | ||
189 | #define TIOCM_RI TIOCM_RNG | ||
190 | #define TIOCM_OUT1 0x2000 | ||
191 | #define TIOCM_OUT2 0x4000 | ||
192 | #define TIOCM_LOOP 0x8000 | ||
193 | |||
194 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
195 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | ||
196 | |||
197 | #ifdef __KERNEL__ | ||
198 | |||
199 | /* | ||
200 | * Translate a "termio" structure into a "termios". Ugh. | ||
201 | */ | ||
202 | #define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ | ||
203 | unsigned short __tmp; \ | ||
204 | get_user(__tmp,&(termio)->x); \ | ||
205 | (termios)->x = (0xffff0000 & (termios)->x) | __tmp; \ | ||
206 | } | ||
207 | |||
208 | #define user_termio_to_kernel_termios(termios, termio) \ | ||
209 | ({ \ | ||
210 | SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ | ||
211 | SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ | ||
212 | SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ | ||
213 | SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ | ||
214 | copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ | ||
215 | }) | ||
216 | |||
217 | /* | ||
218 | * Translate a "termios" structure into a "termio". Ugh. | ||
219 | */ | ||
220 | #define kernel_termios_to_user_termio(termio, termios) \ | ||
221 | ({ \ | ||
222 | put_user((termios)->c_iflag, &(termio)->c_iflag); \ | ||
223 | put_user((termios)->c_oflag, &(termio)->c_oflag); \ | ||
224 | put_user((termios)->c_cflag, &(termio)->c_cflag); \ | ||
225 | put_user((termios)->c_lflag, &(termio)->c_lflag); \ | ||
226 | put_user((termios)->c_line, &(termio)->c_line); \ | ||
227 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | ||
228 | }) | ||
229 | |||
230 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
231 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
232 | |||
233 | #endif /* __KERNEL__ */ | ||
234 | |||
235 | #endif /* _PPC64_TERMIOS_H */ | ||
diff --git a/include/asm-ppc64/types.h b/include/asm-ppc64/types.h index 5b8c2cfa1138..bf294c1761b2 100644 --- a/include/asm-ppc64/types.h +++ b/include/asm-ppc64/types.h | |||
@@ -72,7 +72,6 @@ typedef struct { | |||
72 | unsigned long env; | 72 | unsigned long env; |
73 | } func_descr_t; | 73 | } func_descr_t; |
74 | 74 | ||
75 | typedef unsigned int kmem_bufctl_t; | ||
76 | #endif /* __ASSEMBLY__ */ | 75 | #endif /* __ASSEMBLY__ */ |
77 | 76 | ||
78 | #endif /* __KERNEL__ */ | 77 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc64/uaccess.h b/include/asm-ppc64/uaccess.h index 05b5943ab1ee..c181a60d868c 100644 --- a/include/asm-ppc64/uaccess.h +++ b/include/asm-ppc64/uaccess.h | |||
@@ -56,13 +56,6 @@ | |||
56 | #define access_ok(type,addr,size) \ | 56 | #define access_ok(type,addr,size) \ |
57 | __access_ok(((__force unsigned long)(addr)),(size),get_fs()) | 57 | __access_ok(((__force unsigned long)(addr)),(size),get_fs()) |
58 | 58 | ||
59 | /* this function will go away soon - use access_ok() instead */ | ||
60 | static inline int __deprecated verify_area(int type, const void __user *addr, unsigned long size) | ||
61 | { | ||
62 | return access_ok(type,addr,size) ? 0 : -EFAULT; | ||
63 | } | ||
64 | |||
65 | |||
66 | /* | 59 | /* |
67 | * The exception table consists of pairs of addresses: the first is the | 60 | * The exception table consists of pairs of addresses: the first is the |
68 | * address of an instruction that is allowed to fault, and the second is | 61 | * address of an instruction that is allowed to fault, and the second is |
diff --git a/include/asm-ppc64/udbg.h b/include/asm-ppc64/udbg.h index a6e04d014b2b..c786604aef02 100644 --- a/include/asm-ppc64/udbg.h +++ b/include/asm-ppc64/udbg.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __UDBG_HDR | 2 | #define __UDBG_HDR |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/init.h> | ||
5 | 6 | ||
6 | /* | 7 | /* |
7 | * c 2001 PPC 64 Team, IBM Corp | 8 | * c 2001 PPC 64 Team, IBM Corp |
@@ -12,17 +13,19 @@ | |||
12 | * 2 of the License, or (at your option) any later version. | 13 | * 2 of the License, or (at your option) any later version. |
13 | */ | 14 | */ |
14 | 15 | ||
15 | void udbg_init_uart(void __iomem *comport, unsigned int speed); | 16 | extern void (*udbg_putc)(unsigned char c); |
16 | void udbg_putc(unsigned char c); | 17 | extern unsigned char (*udbg_getc)(void); |
17 | unsigned char udbg_getc(void); | 18 | extern int (*udbg_getc_poll)(void); |
18 | int udbg_getc_poll(void); | ||
19 | void udbg_puts(const char *s); | ||
20 | int udbg_write(const char *s, int n); | ||
21 | int udbg_read(char *buf, int buflen); | ||
22 | struct console; | ||
23 | void udbg_console_write(struct console *con, const char *s, unsigned int n); | ||
24 | void udbg_printf(const char *fmt, ...); | ||
25 | void udbg_ppcdbg(unsigned long flags, const char *fmt, ...); | ||
26 | unsigned long udbg_ifdebug(unsigned long flags); | ||
27 | 19 | ||
20 | extern void udbg_puts(const char *s); | ||
21 | extern int udbg_write(const char *s, int n); | ||
22 | extern int udbg_read(char *buf, int buflen); | ||
23 | |||
24 | extern void register_early_udbg_console(void); | ||
25 | extern void udbg_printf(const char *fmt, ...); | ||
26 | extern void udbg_ppcdbg(unsigned long flags, const char *fmt, ...); | ||
27 | extern unsigned long udbg_ifdebug(unsigned long flags); | ||
28 | extern void __init ppcdbg_initialize(void); | ||
29 | |||
30 | extern void udbg_init_uart(void __iomem *comport, unsigned int speed); | ||
28 | #endif | 31 | #endif |