diff options
Diffstat (limited to 'include')
31 files changed, 327 insertions, 810 deletions
diff --git a/include/asm-powerpc/bugs.h b/include/asm-powerpc/bugs.h new file mode 100644 index 000000000000..310187d0e33a --- /dev/null +++ b/include/asm-powerpc/bugs.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef _POWERPC_BUGS_H | ||
2 | #define _POWERPC_BUGS_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 | /* | ||
12 | * This file is included by 'init/main.c' to check for | ||
13 | * architecture-dependent bugs. | ||
14 | */ | ||
15 | |||
16 | extern void check_bugs(void); | ||
17 | |||
18 | #endif /* _POWERPC_BUGS_H */ | ||
diff --git a/include/asm-ppc64/mc146818rtc.h b/include/asm-powerpc/mc146818rtc.h index f713e1bbb533..a5619a2a1393 100644 --- a/include/asm-ppc64/mc146818rtc.h +++ b/include/asm-powerpc/mc146818rtc.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _POWERPC_MC146818RTC_H | ||
2 | #define _POWERPC_MC146818RTC_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * Machine dependent access functions for RTC registers. | 5 | * Machine dependent access functions for RTC registers. |
3 | * | 6 | * |
@@ -6,8 +9,8 @@ | |||
6 | * as published by the Free Software Foundation; either version | 9 | * as published by the Free Software Foundation; either version |
7 | * 2 of the License, or (at your option) any later version. | 10 | * 2 of the License, or (at your option) any later version. |
8 | */ | 11 | */ |
9 | #ifndef __ASM_PPC64_MC146818RTC_H | 12 | |
10 | #define __ASM_PPC64_MC146818RTC_H | 13 | #ifdef __KERNEL__ |
11 | 14 | ||
12 | #include <asm/io.h> | 15 | #include <asm/io.h> |
13 | 16 | ||
@@ -29,4 +32,5 @@ outb_p((addr),RTC_PORT(0)); \ | |||
29 | outb_p((val),RTC_PORT(1)); \ | 32 | outb_p((val),RTC_PORT(1)); \ |
30 | }) | 33 | }) |
31 | 34 | ||
32 | #endif /* __ASM_PPC64_MC146818RTC_H */ | 35 | #endif /* __KERNEL__ */ |
36 | #endif /* _POWERPC_MC146818RTC_H */ | ||
diff --git a/include/asm-ppc64/mman.h b/include/asm-powerpc/mman.h index d4f93446a52c..f2d55988d749 100644 --- a/include/asm-ppc64/mman.h +++ b/include/asm-powerpc/mman.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __PPC64_MMAN_H__ | 1 | #ifndef _POWERPC_MMAN_H |
2 | #define __PPC64_MMAN_H__ | 2 | #define _POWERPC_MMAN_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * This program is free software; you can redistribute it and/or | 5 | * This program is free software; you can redistribute it and/or |
@@ -49,4 +49,4 @@ | |||
49 | #define MAP_ANON MAP_ANONYMOUS | 49 | #define MAP_ANON MAP_ANONYMOUS |
50 | #define MAP_FILE 0 | 50 | #define MAP_FILE 0 |
51 | 51 | ||
52 | #endif /* __PPC64_MMAN_H__ */ | 52 | #endif /* _POWERPC_MMAN_H */ |
diff --git a/include/asm-powerpc/module.h b/include/asm-powerpc/module.h new file mode 100644 index 000000000000..4438f4fd6524 --- /dev/null +++ b/include/asm-powerpc/module.h | |||
@@ -0,0 +1,77 @@ | |||
1 | #ifndef _POWERPC_MODULE_H | ||
2 | #define _POWERPC_MODULE_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/list.h> | ||
12 | #include <asm/bug.h> | ||
13 | |||
14 | |||
15 | #ifndef __powerpc64__ | ||
16 | /* | ||
17 | * Thanks to Paul M for explaining this. | ||
18 | * | ||
19 | * PPC can only do rel jumps += 32MB, and often the kernel and other | ||
20 | * modules are furthur away than this. So, we jump to a table of | ||
21 | * trampolines attached to the module (the Procedure Linkage Table) | ||
22 | * whenever that happens. | ||
23 | */ | ||
24 | |||
25 | struct ppc_plt_entry { | ||
26 | /* 16 byte jump instruction sequence (4 instructions) */ | ||
27 | unsigned int jump[4]; | ||
28 | }; | ||
29 | #endif /* __powerpc64__ */ | ||
30 | |||
31 | |||
32 | struct mod_arch_specific { | ||
33 | #ifdef __powerpc64__ | ||
34 | unsigned int stubs_section; /* Index of stubs section in module */ | ||
35 | unsigned int toc_section; /* What section is the TOC? */ | ||
36 | #else | ||
37 | /* Indices of PLT sections within module. */ | ||
38 | unsigned int core_plt_section; | ||
39 | unsigned int init_plt_section; | ||
40 | #endif | ||
41 | |||
42 | /* List of BUG addresses, source line numbers and filenames */ | ||
43 | struct list_head bug_list; | ||
44 | struct bug_entry *bug_table; | ||
45 | unsigned int num_bugs; | ||
46 | }; | ||
47 | |||
48 | extern struct bug_entry *module_find_bug(unsigned long bugaddr); | ||
49 | |||
50 | /* | ||
51 | * Select ELF headers. | ||
52 | * Make empty section for module_frob_arch_sections to expand. | ||
53 | */ | ||
54 | |||
55 | #ifdef __powerpc64__ | ||
56 | # define Elf_Shdr Elf64_Shdr | ||
57 | # define Elf_Sym Elf64_Sym | ||
58 | # define Elf_Ehdr Elf64_Ehdr | ||
59 | # ifdef MODULE | ||
60 | asm(".section .stubs,\"ax\",@nobits; .align 3; .previous"); | ||
61 | # endif | ||
62 | #else | ||
63 | # define Elf_Shdr Elf32_Shdr | ||
64 | # define Elf_Sym Elf32_Sym | ||
65 | # define Elf_Ehdr Elf32_Ehdr | ||
66 | # ifdef MODULE | ||
67 | asm(".section .plt,\"ax\",@nobits; .align 3; .previous"); | ||
68 | asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous"); | ||
69 | # endif /* MODULE */ | ||
70 | #endif | ||
71 | |||
72 | |||
73 | struct exception_table_entry; | ||
74 | void sort_ex_table(struct exception_table_entry *start, | ||
75 | struct exception_table_entry *finish); | ||
76 | |||
77 | #endif /* _POWERPC_MODULE_H */ | ||
diff --git a/include/asm-ppc64/sembuf.h b/include/asm-powerpc/sembuf.h index 172e59000767..c98fc18fe805 100644 --- a/include/asm-ppc64/sembuf.h +++ b/include/asm-powerpc/sembuf.h | |||
@@ -1,27 +1,36 @@ | |||
1 | #ifndef _PPC64_SEMBUF_H | 1 | #ifndef _POWERPC_SEMBUF_H |
2 | #define _PPC64_SEMBUF_H | 2 | #define _POWERPC_SEMBUF_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * The semid64_ds structure for PPC architecture. | ||
6 | * | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | 5 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 6 | * modify it under the terms of the GNU General Public License |
10 | * as published by the Free Software Foundation; either version | 7 | * as published by the Free Software Foundation; either version |
11 | * 2 of the License, or (at your option) any later version. | 8 | * 2 of the License, or (at your option) any later version. |
9 | */ | ||
10 | |||
11 | /* | ||
12 | * The semid64_ds structure for PPC architecture. | ||
13 | * Note extra padding because this structure is passed back and forth | ||
14 | * between kernel and user space. | ||
12 | * | 15 | * |
13 | * Pad space is left for: | 16 | * Pad space is left for: |
14 | * - 2 miscellaneous 64-bit values | 17 | * - 64-bit time_t to solve y2038 problem |
18 | * - 2 miscellaneous 32-bit values | ||
15 | */ | 19 | */ |
16 | 20 | ||
17 | struct semid64_ds { | 21 | struct semid64_ds { |
18 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | 22 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ |
23 | #ifndef __powerpc64__ | ||
24 | unsigned long __unused1; | ||
25 | #endif | ||
19 | __kernel_time_t sem_otime; /* last semop time */ | 26 | __kernel_time_t sem_otime; /* last semop time */ |
27 | #ifndef __powerpc64__ | ||
28 | unsigned long __unused2; | ||
29 | #endif | ||
20 | __kernel_time_t sem_ctime; /* last change time */ | 30 | __kernel_time_t sem_ctime; /* last change time */ |
21 | unsigned long sem_nsems; /* no. of semaphores in array */ | 31 | unsigned long sem_nsems; /* no. of semaphores in array */ |
22 | 32 | unsigned long __unused3; | |
23 | unsigned long __unused1; | 33 | unsigned long __unused4; |
24 | unsigned long __unused2; | ||
25 | }; | 34 | }; |
26 | 35 | ||
27 | #endif /* _PPC64_SEMBUF_H */ | 36 | #endif /* _POWERPC_SEMBUF_H */ |
diff --git a/include/asm-ppc64/shmbuf.h b/include/asm-powerpc/shmbuf.h index 02e99d6ec925..29632db3b178 100644 --- a/include/asm-ppc64/shmbuf.h +++ b/include/asm-powerpc/shmbuf.h | |||
@@ -1,31 +1,47 @@ | |||
1 | #ifndef _PPC64_SHMBUF_H | 1 | #ifndef _POWERPC_SHMBUF_H |
2 | #define _PPC64_SHMBUF_H | 2 | #define _POWERPC_SHMBUF_H |
3 | 3 | ||
4 | /* | 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 | 5 | * This program is free software; you can redistribute it and/or |
13 | * modify it under the terms of the GNU General Public License | 6 | * modify it under the terms of the GNU General Public License |
14 | * as published by the Free Software Foundation; either version | 7 | * as published by the Free Software Foundation; either version |
15 | * 2 of the License, or (at your option) any later version. | 8 | * 2 of the License, or (at your option) any later version. |
16 | */ | 9 | */ |
17 | 10 | ||
11 | /* | ||
12 | * The shmid64_ds structure for PPC architecture. | ||
13 | * | ||
14 | * Note extra padding because this structure is passed back and forth | ||
15 | * between kernel and user space. | ||
16 | * | ||
17 | * Pad space is left for: | ||
18 | * - 64-bit time_t to solve y2038 problem | ||
19 | * - 2 miscellaneous 32-bit values | ||
20 | */ | ||
21 | |||
18 | struct shmid64_ds { | 22 | struct shmid64_ds { |
19 | struct ipc64_perm shm_perm; /* operation perms */ | 23 | struct ipc64_perm shm_perm; /* operation perms */ |
24 | #ifndef __power64__ | ||
25 | unsigned long __unused1; | ||
26 | #endif | ||
20 | __kernel_time_t shm_atime; /* last attach time */ | 27 | __kernel_time_t shm_atime; /* last attach time */ |
28 | #ifndef __power64__ | ||
29 | unsigned long __unused2; | ||
30 | #endif | ||
21 | __kernel_time_t shm_dtime; /* last detach time */ | 31 | __kernel_time_t shm_dtime; /* last detach time */ |
32 | #ifndef __power64__ | ||
33 | unsigned long __unused3; | ||
34 | #endif | ||
22 | __kernel_time_t shm_ctime; /* last change time */ | 35 | __kernel_time_t shm_ctime; /* last change time */ |
36 | #ifndef __power64__ | ||
37 | unsigned long __unused4; | ||
38 | #endif | ||
23 | size_t shm_segsz; /* size of segment (bytes) */ | 39 | size_t shm_segsz; /* size of segment (bytes) */ |
24 | __kernel_pid_t shm_cpid; /* pid of creator */ | 40 | __kernel_pid_t shm_cpid; /* pid of creator */ |
25 | __kernel_pid_t shm_lpid; /* pid of last operator */ | 41 | __kernel_pid_t shm_lpid; /* pid of last operator */ |
26 | unsigned long shm_nattch; /* no. of current attaches */ | 42 | unsigned long shm_nattch; /* no. of current attaches */ |
27 | unsigned long __unused1; | 43 | unsigned long __unused5; |
28 | unsigned long __unused2; | 44 | unsigned long __unused6; |
29 | }; | 45 | }; |
30 | 46 | ||
31 | struct shminfo64 { | 47 | struct shminfo64 { |
@@ -40,4 +56,4 @@ struct shminfo64 { | |||
40 | unsigned long __unused4; | 56 | unsigned long __unused4; |
41 | }; | 57 | }; |
42 | 58 | ||
43 | #endif /* _PPC64_SHMBUF_H */ | 59 | #endif /* _POWERPC_SHMBUF_H */ |
diff --git a/include/asm-ppc64/siginfo.h b/include/asm-powerpc/siginfo.h index 3a7c23dcb5aa..ae70b8010b19 100644 --- a/include/asm-ppc64/siginfo.h +++ b/include/asm-powerpc/siginfo.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _PPC64_SIGINFO_H | 1 | #ifndef _POWERPC_SIGINFO_H |
2 | #define _PPC64_SIGINFO_H | 2 | #define _POWERPC_SIGINFO_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * This program is free software; you can redistribute it and/or | 5 | * This program is free software; you can redistribute it and/or |
@@ -8,9 +8,11 @@ | |||
8 | * 2 of the License, or (at your option) any later version. | 8 | * 2 of the License, or (at your option) any later version. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | 11 | #ifdef __powerpc64__ |
12 | #define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) | 12 | # define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) |
13 | # define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) | ||
14 | #endif | ||
13 | 15 | ||
14 | #include <asm-generic/siginfo.h> | 16 | #include <asm-generic/siginfo.h> |
15 | 17 | ||
16 | #endif /* _PPC64_SIGINFO_H */ | 18 | #endif /* _POWERPC_SIGINFO_H */ |
diff --git a/include/asm-ppc64/socket.h b/include/asm-powerpc/socket.h index 9e1af8eb2d96..51a0cf5ee9f0 100644 --- a/include/asm-ppc64/socket.h +++ b/include/asm-powerpc/socket.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_SOCKET_H | 1 | #ifndef _POWERPC_SOCKET_H |
2 | #define _ASM_SOCKET_H | 2 | #define _POWERPC_SOCKET_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * This program is free software; you can redistribute it and/or | 5 | * This program is free software; you can redistribute it and/or |
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | #include <asm/sockios.h> | 11 | #include <asm/sockios.h> |
12 | 12 | ||
13 | /* For setsockoptions(2) */ | 13 | /* For setsockopt(2) */ |
14 | #define SOL_SOCKET 1 | 14 | #define SOL_SOCKET 1 |
15 | 15 | ||
16 | #define SO_DEBUG 1 | 16 | #define SO_DEBUG 1 |
@@ -52,8 +52,8 @@ | |||
52 | #define SO_TIMESTAMP 29 | 52 | #define SO_TIMESTAMP 29 |
53 | #define SCM_TIMESTAMP SO_TIMESTAMP | 53 | #define SCM_TIMESTAMP SO_TIMESTAMP |
54 | 54 | ||
55 | #define SO_ACCEPTCONN 30 | 55 | #define SO_ACCEPTCONN 30 |
56 | 56 | ||
57 | #define SO_PEERSEC 31 | 57 | #define SO_PEERSEC 31 |
58 | 58 | ||
59 | #endif /* _ASM_SOCKET_H */ | 59 | #endif /* _POWERPC_SOCKET_H */ |
diff --git a/include/asm-ppc64/sockios.h b/include/asm-powerpc/sockios.h index 6bd1a22af4f6..ef7ff664167e 100644 --- a/include/asm-ppc64/sockios.h +++ b/include/asm-powerpc/sockios.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_PPC64_SOCKIOS_H | 1 | #ifndef _POWERPC_SOCKIOS_H |
2 | #define _ASM_PPC64_SOCKIOS_H | 2 | #define _POWERPC_SOCKIOS_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * This program is free software; you can redistribute it and/or | 5 | * This program is free software; you can redistribute it and/or |
@@ -16,4 +16,4 @@ | |||
16 | #define SIOCATMARK 0x8905 | 16 | #define SIOCATMARK 0x8905 |
17 | #define SIOCGSTAMP 0x8906 /* Get stamp */ | 17 | #define SIOCGSTAMP 0x8906 /* Get stamp */ |
18 | 18 | ||
19 | #endif /* _ASM_PPC64_SOCKIOS_H */ | 19 | #endif /* _POWERPC_SOCKIOS_H */ |
diff --git a/include/asm-ppc64/termbits.h b/include/asm-powerpc/termbits.h index d1a2bee10cef..2c5bf85a8c3c 100644 --- a/include/asm-ppc64/termbits.h +++ b/include/asm-powerpc/termbits.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _PPC64_TERMBITS_H | 1 | #ifndef _POWERPC_TERMBITS_H |
2 | #define _PPC64_TERMBITS_H | 2 | #define _POWERPC_TERMBITS_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * This program is free software; you can redistribute it and/or | 5 | * This program is free software; you can redistribute it and/or |
@@ -8,8 +8,6 @@ | |||
8 | * 2 of the License, or (at your option) any later version. | 8 | * 2 of the License, or (at your option) any later version. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/posix_types.h> | ||
12 | |||
13 | typedef unsigned char cc_t; | 11 | typedef unsigned char cc_t; |
14 | typedef unsigned int speed_t; | 12 | typedef unsigned int speed_t; |
15 | typedef unsigned int tcflag_t; | 13 | typedef unsigned int tcflag_t; |
@@ -190,4 +188,4 @@ struct termios { | |||
190 | #define TCSADRAIN 1 | 188 | #define TCSADRAIN 1 |
191 | #define TCSAFLUSH 2 | 189 | #define TCSAFLUSH 2 |
192 | 190 | ||
193 | #endif /* _PPC64_TERMBITS_H */ | 191 | #endif /* _POWERPC_TERMBITS_H */ |
diff --git a/include/asm-ppc64/termios.h b/include/asm-powerpc/termios.h index 02c3d283aa62..237533bb0e9f 100644 --- a/include/asm-ppc64/termios.h +++ b/include/asm-powerpc/termios.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _PPC64_TERMIOS_H | 1 | #ifndef _POWERPC_TERMIOS_H |
2 | #define _PPC64_TERMIOS_H | 2 | #define _POWERPC_TERMIOS_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Liberally adapted from alpha/termios.h. In particular, the c_cc[] | 5 | * Liberally adapted from alpha/termios.h. In particular, the c_cc[] |
@@ -87,6 +87,7 @@ struct termio { | |||
87 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | 87 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ |
88 | #define N_HDLC 13 /* synchronous HDLC */ | 88 | #define N_HDLC 13 /* synchronous HDLC */ |
89 | #define N_SYNC_PPP 14 | 89 | #define N_SYNC_PPP 14 |
90 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
90 | 91 | ||
91 | #ifdef __KERNEL__ | 92 | #ifdef __KERNEL__ |
92 | /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ | 93 | /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ |
@@ -232,4 +233,4 @@ struct termio { | |||
232 | 233 | ||
233 | #endif /* __KERNEL__ */ | 234 | #endif /* __KERNEL__ */ |
234 | 235 | ||
235 | #endif /* _PPC64_TERMIOS_H */ | 236 | #endif /* _POWERPC_TERMIOS_H */ |
diff --git a/include/asm-ppc/bugs.h b/include/asm-ppc/bugs.h deleted file mode 100644 index 8dce1e290fd0..000000000000 --- a/include/asm-ppc/bugs.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | /* | ||
2 | * This file is included by 'init/main.c' | ||
3 | */ | ||
4 | |||
5 | extern void | ||
6 | check_bugs(void); | ||
diff --git a/include/asm-ppc/mc146818rtc.h b/include/asm-ppc/mc146818rtc.h deleted file mode 100644 index 227018b2fef8..000000000000 --- a/include/asm-ppc/mc146818rtc.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * Machine dependent access functions for RTC registers. | ||
3 | */ | ||
4 | #ifdef __KERNEL__ | ||
5 | #ifndef __ASM_PPC_MC146818RTC_H | ||
6 | #define __ASM_PPC_MC146818RTC_H | ||
7 | |||
8 | #include <asm/io.h> | ||
9 | |||
10 | #ifndef RTC_PORT | ||
11 | #define RTC_PORT(x) (0x70 + (x)) | ||
12 | #define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */ | ||
13 | #endif | ||
14 | |||
15 | /* | ||
16 | * The yet supported machines all access the RTC index register via | ||
17 | * an ISA port access but the way to access the date register differs ... | ||
18 | */ | ||
19 | #define CMOS_READ(addr) ({ \ | ||
20 | outb_p((addr),RTC_PORT(0)); \ | ||
21 | inb_p(RTC_PORT(1)); \ | ||
22 | }) | ||
23 | #define CMOS_WRITE(val, addr) ({ \ | ||
24 | outb_p((addr),RTC_PORT(0)); \ | ||
25 | outb_p((val),RTC_PORT(1)); \ | ||
26 | }) | ||
27 | |||
28 | #define RTC_IRQ 8 | ||
29 | |||
30 | #endif /* __ASM_PPC_MC146818RTC_H */ | ||
31 | #endif /* __KERNEL__ */ | ||
diff --git a/include/asm-ppc/mman.h b/include/asm-ppc/mman.h deleted file mode 100644 index 5fd19fd4936c..000000000000 --- a/include/asm-ppc/mman.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | #ifndef __PPC_MMAN_H__ | ||
2 | #define __PPC_MMAN_H__ | ||
3 | |||
4 | #define PROT_READ 0x1 /* page can be read */ | ||
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | ||
18 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | ||
19 | #define MAP_LOCKED 0x80 | ||
20 | |||
21 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | ||
22 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | ||
23 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | ||
24 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | ||
25 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
26 | |||
27 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
28 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
29 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
30 | |||
31 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | ||
32 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | ||
33 | |||
34 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
35 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
36 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
37 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
38 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __PPC_MMAN_H__ */ | ||
diff --git a/include/asm-ppc/module.h b/include/asm-ppc/module.h deleted file mode 100644 index fb63492562b0..000000000000 --- a/include/asm-ppc/module.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | #ifndef _ASM_PPC_MODULE_H | ||
2 | #define _ASM_PPC_MODULE_H | ||
3 | /* Module stuff for PPC. (C) 2001 Rusty Russell */ | ||
4 | |||
5 | #include <linux/list.h> | ||
6 | #include <asm/bug.h> | ||
7 | |||
8 | /* Thanks to Paul M for explaining this. | ||
9 | |||
10 | PPC can only do rel jumps += 32MB, and often the kernel and other | ||
11 | modules are furthur away than this. So, we jump to a table of | ||
12 | trampolines attached to the module (the Procedure Linkage Table) | ||
13 | whenever that happens. | ||
14 | */ | ||
15 | |||
16 | struct ppc_plt_entry | ||
17 | { | ||
18 | /* 16 byte jump instruction sequence (4 instructions) */ | ||
19 | unsigned int jump[4]; | ||
20 | }; | ||
21 | |||
22 | struct mod_arch_specific | ||
23 | { | ||
24 | /* Indices of PLT sections within module. */ | ||
25 | unsigned int core_plt_section, init_plt_section; | ||
26 | |||
27 | /* List of BUG addresses, source line numbers and filenames */ | ||
28 | struct list_head bug_list; | ||
29 | struct bug_entry *bug_table; | ||
30 | unsigned int num_bugs; | ||
31 | }; | ||
32 | |||
33 | extern struct bug_entry *module_find_bug(unsigned long bugaddr); | ||
34 | |||
35 | #define Elf_Shdr Elf32_Shdr | ||
36 | #define Elf_Sym Elf32_Sym | ||
37 | #define Elf_Ehdr Elf32_Ehdr | ||
38 | |||
39 | /* Make empty sections for module_frob_arch_sections to expand. */ | ||
40 | #ifdef MODULE | ||
41 | asm(".section .plt,\"ax\",@nobits; .align 3; .previous"); | ||
42 | asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous"); | ||
43 | #endif | ||
44 | #endif /* _ASM_PPC_MODULE_H */ | ||
diff --git a/include/asm-ppc/pmac_feature.h b/include/asm-ppc/pmac_feature.h index 8beb162873f4..e9683bcff19b 100644 --- a/include/asm-ppc/pmac_feature.h +++ b/include/asm-ppc/pmac_feature.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #define __PPC_ASM_PMAC_FEATURE_H | 32 | #define __PPC_ASM_PMAC_FEATURE_H |
33 | 33 | ||
34 | #include <asm/macio.h> | 34 | #include <asm/macio.h> |
35 | #include <asm/machdep.h> | ||
35 | 36 | ||
36 | /* | 37 | /* |
37 | * Known Mac motherboard models | 38 | * Known Mac motherboard models |
diff --git a/include/asm-ppc/sembuf.h b/include/asm-ppc/sembuf.h deleted file mode 100644 index 883f682f85b8..000000000000 --- a/include/asm-ppc/sembuf.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #ifndef _PPC_SEMBUF_H | ||
2 | #define _PPC_SEMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The semid64_ds structure for PPC architecture. | ||
6 | */ | ||
7 | |||
8 | struct semid64_ds { | ||
9 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | ||
10 | unsigned int __unused1; | ||
11 | __kernel_time_t sem_otime; /* last semop time */ | ||
12 | unsigned int __unused2; | ||
13 | __kernel_time_t sem_ctime; /* last change time */ | ||
14 | unsigned long sem_nsems; /* no. of semaphores in array */ | ||
15 | unsigned long __unused3; | ||
16 | unsigned long __unused4; | ||
17 | }; | ||
18 | |||
19 | #endif /* _PPC_SEMBUF_H */ | ||
diff --git a/include/asm-ppc/shmbuf.h b/include/asm-ppc/shmbuf.h deleted file mode 100644 index 7ac0bd38cbd8..000000000000 --- a/include/asm-ppc/shmbuf.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | #ifndef _PPC_SHMBUF_H | ||
2 | #define _PPC_SHMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The shmid64_ds structure for PPC architecture. | ||
6 | */ | ||
7 | |||
8 | struct shmid64_ds { | ||
9 | struct ipc64_perm shm_perm; /* operation perms */ | ||
10 | unsigned int __unused1; | ||
11 | __kernel_time_t shm_atime; /* last attach time */ | ||
12 | unsigned int __unused2; | ||
13 | __kernel_time_t shm_dtime; /* last detach time */ | ||
14 | unsigned int __unused3; | ||
15 | __kernel_time_t shm_ctime; /* last change time */ | ||
16 | unsigned int __unused4; | ||
17 | size_t shm_segsz; /* size of segment (bytes) */ | ||
18 | __kernel_pid_t shm_cpid; /* pid of creator */ | ||
19 | __kernel_pid_t shm_lpid; /* pid of last operator */ | ||
20 | unsigned long shm_nattch; /* no. of current attaches */ | ||
21 | unsigned long __unused5; | ||
22 | unsigned long __unused6; | ||
23 | }; | ||
24 | |||
25 | struct shminfo64 { | ||
26 | unsigned long shmmax; | ||
27 | unsigned long shmmin; | ||
28 | unsigned long shmmni; | ||
29 | unsigned long shmseg; | ||
30 | unsigned long shmall; | ||
31 | unsigned long __unused1; | ||
32 | unsigned long __unused2; | ||
33 | unsigned long __unused3; | ||
34 | unsigned long __unused4; | ||
35 | }; | ||
36 | |||
37 | #endif /* _PPC_SHMBUF_H */ | ||
diff --git a/include/asm-ppc/siginfo.h b/include/asm-ppc/siginfo.h deleted file mode 100644 index 4b9435bb9049..000000000000 --- a/include/asm-ppc/siginfo.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _PPC_SIGINFO_H | ||
2 | #define _PPC_SIGINFO_H | ||
3 | |||
4 | #include <asm-generic/siginfo.h> | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-ppc/socket.h b/include/asm-ppc/socket.h deleted file mode 100644 index 296e1a3469d0..000000000000 --- a/include/asm-ppc/socket.h +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | #ifndef _ASM_SOCKET_H | ||
2 | #define _ASM_SOCKET_H | ||
3 | |||
4 | /* Socket-level I/O control calls. */ | ||
5 | #define FIOSETOWN 0x8901 | ||
6 | #define SIOCSPGRP 0x8902 | ||
7 | #define FIOGETOWN 0x8903 | ||
8 | #define SIOCGPGRP 0x8904 | ||
9 | #define SIOCATMARK 0x8905 | ||
10 | #define SIOCGSTAMP 0x8906 /* Get stamp */ | ||
11 | |||
12 | /* For setsockopt(2) */ | ||
13 | #define SOL_SOCKET 1 | ||
14 | |||
15 | #define SO_DEBUG 1 | ||
16 | #define SO_REUSEADDR 2 | ||
17 | #define SO_TYPE 3 | ||
18 | #define SO_ERROR 4 | ||
19 | #define SO_DONTROUTE 5 | ||
20 | #define SO_BROADCAST 6 | ||
21 | #define SO_SNDBUF 7 | ||
22 | #define SO_RCVBUF 8 | ||
23 | #define SO_SNDBUFFORCE 32 | ||
24 | #define SO_RCVBUFFORCE 33 | ||
25 | #define SO_KEEPALIVE 9 | ||
26 | #define SO_OOBINLINE 10 | ||
27 | #define SO_NO_CHECK 11 | ||
28 | #define SO_PRIORITY 12 | ||
29 | #define SO_LINGER 13 | ||
30 | #define SO_BSDCOMPAT 14 | ||
31 | /* To add :#define SO_REUSEPORT 15 */ | ||
32 | #define SO_RCVLOWAT 16 | ||
33 | #define SO_SNDLOWAT 17 | ||
34 | #define SO_RCVTIMEO 18 | ||
35 | #define SO_SNDTIMEO 19 | ||
36 | #define SO_PASSCRED 20 | ||
37 | #define SO_PEERCRED 21 | ||
38 | |||
39 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | ||
40 | #define SO_SECURITY_AUTHENTICATION 22 | ||
41 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 | ||
42 | #define SO_SECURITY_ENCRYPTION_NETWORK 24 | ||
43 | |||
44 | #define SO_BINDTODEVICE 25 | ||
45 | |||
46 | /* Socket filtering */ | ||
47 | #define SO_ATTACH_FILTER 26 | ||
48 | #define SO_DETACH_FILTER 27 | ||
49 | |||
50 | #define SO_PEERNAME 28 | ||
51 | #define SO_TIMESTAMP 29 | ||
52 | #define SCM_TIMESTAMP SO_TIMESTAMP | ||
53 | |||
54 | #define SO_ACCEPTCONN 30 | ||
55 | |||
56 | #define SO_PEERSEC 31 | ||
57 | |||
58 | #endif /* _ASM_SOCKET_H */ | ||
diff --git a/include/asm-ppc/sockios.h b/include/asm-ppc/sockios.h deleted file mode 100644 index 385aedc55ceb..000000000000 --- a/include/asm-ppc/sockios.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #ifndef _ASM_PPC_SOCKIOS_H | ||
2 | #define _ASM_PPC_SOCKIOS_H | ||
3 | |||
4 | #if 0 /* These are defined this way on Alpha - maybe later. */ | ||
5 | /* Socket-level I/O control calls. */ | ||
6 | |||
7 | #define FIOGETOWN _IOR('f', 123, int) | ||
8 | #define FIOSETOWN _IOW('f', 124, int) | ||
9 | |||
10 | #define SIOCATMARK _IOR('s', 7, int) | ||
11 | #define SIOCSPGRP _IOW('s', 8, pid_t) | ||
12 | #define SIOCGPGRP _IOR('s', 9, pid_t) | ||
13 | |||
14 | #define SIOCGSTAMP 0x8906 /* Get stamp - linux-specific */ | ||
15 | #endif | ||
16 | |||
17 | #endif /* _ASM_PPC_SOCKIOS_H */ | ||
diff --git a/include/asm-ppc/termbits.h b/include/asm-ppc/termbits.h deleted file mode 100644 index c343fb7bdfed..000000000000 --- a/include/asm-ppc/termbits.h +++ /dev/null | |||
@@ -1,185 +0,0 @@ | |||
1 | #ifndef _PPC_TERMBITS_H | ||
2 | #define _PPC_TERMBITS_H | ||
3 | |||
4 | typedef unsigned char cc_t; | ||
5 | typedef unsigned int speed_t; | ||
6 | typedef unsigned int tcflag_t; | ||
7 | |||
8 | /* | ||
9 | * termios type and macro definitions. Be careful about adding stuff | ||
10 | * to this file since it's used in GNU libc and there are strict rules | ||
11 | * concerning namespace pollution. | ||
12 | */ | ||
13 | |||
14 | #define NCCS 19 | ||
15 | struct termios { | ||
16 | tcflag_t c_iflag; /* input mode flags */ | ||
17 | tcflag_t c_oflag; /* output mode flags */ | ||
18 | tcflag_t c_cflag; /* control mode flags */ | ||
19 | tcflag_t c_lflag; /* local mode flags */ | ||
20 | cc_t c_cc[NCCS]; /* control characters */ | ||
21 | cc_t c_line; /* line discipline (== c_cc[19]) */ | ||
22 | speed_t c_ispeed; /* input speed */ | ||
23 | speed_t c_ospeed; /* output speed */ | ||
24 | }; | ||
25 | |||
26 | /* c_cc characters */ | ||
27 | #define VINTR 0 | ||
28 | #define VQUIT 1 | ||
29 | #define VERASE 2 | ||
30 | #define VKILL 3 | ||
31 | #define VEOF 4 | ||
32 | #define VMIN 5 | ||
33 | #define VEOL 6 | ||
34 | #define VTIME 7 | ||
35 | #define VEOL2 8 | ||
36 | #define VSWTC 9 | ||
37 | |||
38 | #define VWERASE 10 | ||
39 | #define VREPRINT 11 | ||
40 | #define VSUSP 12 | ||
41 | #define VSTART 13 | ||
42 | #define VSTOP 14 | ||
43 | #define VLNEXT 15 | ||
44 | #define VDISCARD 16 | ||
45 | |||
46 | /* c_iflag bits */ | ||
47 | #define IGNBRK 0000001 | ||
48 | #define BRKINT 0000002 | ||
49 | #define IGNPAR 0000004 | ||
50 | #define PARMRK 0000010 | ||
51 | #define INPCK 0000020 | ||
52 | #define ISTRIP 0000040 | ||
53 | #define INLCR 0000100 | ||
54 | #define IGNCR 0000200 | ||
55 | #define ICRNL 0000400 | ||
56 | #define IXON 0001000 | ||
57 | #define IXOFF 0002000 | ||
58 | #define IXANY 0004000 | ||
59 | #define IUCLC 0010000 | ||
60 | #define IMAXBEL 0020000 | ||
61 | #define IUTF8 0040000 | ||
62 | |||
63 | /* c_oflag bits */ | ||
64 | #define OPOST 0000001 | ||
65 | #define ONLCR 0000002 | ||
66 | #define OLCUC 0000004 | ||
67 | |||
68 | #define OCRNL 0000010 | ||
69 | #define ONOCR 0000020 | ||
70 | #define ONLRET 0000040 | ||
71 | |||
72 | #define OFILL 00000100 | ||
73 | #define OFDEL 00000200 | ||
74 | #define NLDLY 00001400 | ||
75 | #define NL0 00000000 | ||
76 | #define NL1 00000400 | ||
77 | #define NL2 00001000 | ||
78 | #define NL3 00001400 | ||
79 | #define TABDLY 00006000 | ||
80 | #define TAB0 00000000 | ||
81 | #define TAB1 00002000 | ||
82 | #define TAB2 00004000 | ||
83 | #define TAB3 00006000 | ||
84 | #define XTABS 00006000 /* required by POSIX to == TAB3 */ | ||
85 | #define CRDLY 00030000 | ||
86 | #define CR0 00000000 | ||
87 | #define CR1 00010000 | ||
88 | #define CR2 00020000 | ||
89 | #define CR3 00030000 | ||
90 | #define FFDLY 00040000 | ||
91 | #define FF0 00000000 | ||
92 | #define FF1 00040000 | ||
93 | #define BSDLY 00100000 | ||
94 | #define BS0 00000000 | ||
95 | #define BS1 00100000 | ||
96 | #define VTDLY 00200000 | ||
97 | #define VT0 00000000 | ||
98 | #define VT1 00200000 | ||
99 | |||
100 | /* c_cflag bit meaning */ | ||
101 | #define CBAUD 0000377 | ||
102 | #define B0 0000000 /* hang up */ | ||
103 | #define B50 0000001 | ||
104 | #define B75 0000002 | ||
105 | #define B110 0000003 | ||
106 | #define B134 0000004 | ||
107 | #define B150 0000005 | ||
108 | #define B200 0000006 | ||
109 | #define B300 0000007 | ||
110 | #define B600 0000010 | ||
111 | #define B1200 0000011 | ||
112 | #define B1800 0000012 | ||
113 | #define B2400 0000013 | ||
114 | #define B4800 0000014 | ||
115 | #define B9600 0000015 | ||
116 | #define B19200 0000016 | ||
117 | #define B38400 0000017 | ||
118 | #define EXTA B19200 | ||
119 | #define EXTB B38400 | ||
120 | #define CBAUDEX 0000000 | ||
121 | #define B57600 00020 | ||
122 | #define B115200 00021 | ||
123 | #define B230400 00022 | ||
124 | #define B460800 00023 | ||
125 | #define B500000 00024 | ||
126 | #define B576000 00025 | ||
127 | #define B921600 00026 | ||
128 | #define B1000000 00027 | ||
129 | #define B1152000 00030 | ||
130 | #define B1500000 00031 | ||
131 | #define B2000000 00032 | ||
132 | #define B2500000 00033 | ||
133 | #define B3000000 00034 | ||
134 | #define B3500000 00035 | ||
135 | #define B4000000 00036 | ||
136 | |||
137 | #define CSIZE 00001400 | ||
138 | #define CS5 00000000 | ||
139 | #define CS6 00000400 | ||
140 | #define CS7 00001000 | ||
141 | #define CS8 00001400 | ||
142 | |||
143 | #define CSTOPB 00002000 | ||
144 | #define CREAD 00004000 | ||
145 | #define PARENB 00010000 | ||
146 | #define PARODD 00020000 | ||
147 | #define HUPCL 00040000 | ||
148 | |||
149 | #define CLOCAL 00100000 | ||
150 | #define CRTSCTS 020000000000 /* flow control */ | ||
151 | |||
152 | /* c_lflag bits */ | ||
153 | #define ISIG 0x00000080 | ||
154 | #define ICANON 0x00000100 | ||
155 | #define XCASE 0x00004000 | ||
156 | #define ECHO 0x00000008 | ||
157 | #define ECHOE 0x00000002 | ||
158 | #define ECHOK 0x00000004 | ||
159 | #define ECHONL 0x00000010 | ||
160 | #define NOFLSH 0x80000000 | ||
161 | #define TOSTOP 0x00400000 | ||
162 | #define ECHOCTL 0x00000040 | ||
163 | #define ECHOPRT 0x00000020 | ||
164 | #define ECHOKE 0x00000001 | ||
165 | #define FLUSHO 0x00800000 | ||
166 | #define PENDIN 0x20000000 | ||
167 | #define IEXTEN 0x00000400 | ||
168 | |||
169 | /* Values for the ACTION argument to `tcflow'. */ | ||
170 | #define TCOOFF 0 | ||
171 | #define TCOON 1 | ||
172 | #define TCIOFF 2 | ||
173 | #define TCION 3 | ||
174 | |||
175 | /* Values for the QUEUE_SELECTOR argument to `tcflush'. */ | ||
176 | #define TCIFLUSH 0 | ||
177 | #define TCOFLUSH 1 | ||
178 | #define TCIOFLUSH 2 | ||
179 | |||
180 | /* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */ | ||
181 | #define TCSANOW 0 | ||
182 | #define TCSADRAIN 1 | ||
183 | #define TCSAFLUSH 2 | ||
184 | |||
185 | #endif /* _PPC_TERMBITS_H */ | ||
diff --git a/include/asm-ppc/termios.h b/include/asm-ppc/termios.h deleted file mode 100644 index 97c6287a6cba..000000000000 --- a/include/asm-ppc/termios.h +++ /dev/null | |||
@@ -1,232 +0,0 @@ | |||
1 | #ifndef _PPC_TERMIOS_H | ||
2 | #define _PPC_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 | |||
11 | #include <asm/ioctls.h> | ||
12 | #include <asm/termbits.h> | ||
13 | |||
14 | struct sgttyb { | ||
15 | char sg_ispeed; | ||
16 | char sg_ospeed; | ||
17 | char sg_erase; | ||
18 | char sg_kill; | ||
19 | short sg_flags; | ||
20 | }; | ||
21 | |||
22 | struct tchars { | ||
23 | char t_intrc; | ||
24 | char t_quitc; | ||
25 | char t_startc; | ||
26 | char t_stopc; | ||
27 | char t_eofc; | ||
28 | char t_brkc; | ||
29 | }; | ||
30 | |||
31 | struct ltchars { | ||
32 | char t_suspc; | ||
33 | char t_dsuspc; | ||
34 | char t_rprntc; | ||
35 | char t_flushc; | ||
36 | char t_werasc; | ||
37 | char t_lnextc; | ||
38 | }; | ||
39 | |||
40 | #define FIOCLEX _IO('f', 1) | ||
41 | #define FIONCLEX _IO('f', 2) | ||
42 | #define FIOASYNC _IOW('f', 125, int) | ||
43 | #define FIONBIO _IOW('f', 126, int) | ||
44 | #define FIONREAD _IOR('f', 127, int) | ||
45 | #define TIOCINQ FIONREAD | ||
46 | #define FIOQSIZE _IOR('f', 128, loff_t) | ||
47 | |||
48 | #define TIOCGETP _IOR('t', 8, struct sgttyb) | ||
49 | #define TIOCSETP _IOW('t', 9, struct sgttyb) | ||
50 | #define TIOCSETN _IOW('t', 10, struct sgttyb) /* TIOCSETP wo flush */ | ||
51 | |||
52 | #define TIOCSETC _IOW('t', 17, struct tchars) | ||
53 | #define TIOCGETC _IOR('t', 18, struct tchars) | ||
54 | #define TCGETS _IOR('t', 19, struct termios) | ||
55 | #define TCSETS _IOW('t', 20, struct termios) | ||
56 | #define TCSETSW _IOW('t', 21, struct termios) | ||
57 | #define TCSETSF _IOW('t', 22, struct termios) | ||
58 | |||
59 | #define TCGETA _IOR('t', 23, struct termio) | ||
60 | #define TCSETA _IOW('t', 24, struct termio) | ||
61 | #define TCSETAW _IOW('t', 25, struct termio) | ||
62 | #define TCSETAF _IOW('t', 28, struct termio) | ||
63 | |||
64 | #define TCSBRK _IO('t', 29) | ||
65 | #define TCXONC _IO('t', 30) | ||
66 | #define TCFLSH _IO('t', 31) | ||
67 | |||
68 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) | ||
69 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) | ||
70 | #define TIOCSTART _IO('t', 110) /* start output, like ^Q */ | ||
71 | #define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ | ||
72 | #define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ | ||
73 | |||
74 | #define TIOCGLTC _IOR('t', 116, struct ltchars) | ||
75 | #define TIOCSLTC _IOW('t', 117, struct ltchars) | ||
76 | #define TIOCSPGRP _IOW('t', 118, int) | ||
77 | #define TIOCGPGRP _IOR('t', 119, int) | ||
78 | |||
79 | #define TIOCEXCL 0x540C | ||
80 | #define TIOCNXCL 0x540D | ||
81 | #define TIOCSCTTY 0x540E | ||
82 | |||
83 | #define TIOCSTI 0x5412 | ||
84 | #define TIOCMGET 0x5415 | ||
85 | #define TIOCMBIS 0x5416 | ||
86 | #define TIOCMBIC 0x5417 | ||
87 | #define TIOCMSET 0x5418 | ||
88 | #define TIOCGSOFTCAR 0x5419 | ||
89 | #define TIOCSSOFTCAR 0x541A | ||
90 | #define TIOCLINUX 0x541C | ||
91 | #define TIOCCONS 0x541D | ||
92 | #define TIOCGSERIAL 0x541E | ||
93 | #define TIOCSSERIAL 0x541F | ||
94 | #define TIOCPKT 0x5420 | ||
95 | |||
96 | #define TIOCNOTTY 0x5422 | ||
97 | #define TIOCSETD 0x5423 | ||
98 | #define TIOCGETD 0x5424 | ||
99 | #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ | ||
100 | |||
101 | #define TIOCSERCONFIG 0x5453 | ||
102 | #define TIOCSERGWILD 0x5454 | ||
103 | #define TIOCSERSWILD 0x5455 | ||
104 | #define TIOCGLCKTRMIOS 0x5456 | ||
105 | #define TIOCSLCKTRMIOS 0x5457 | ||
106 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ | ||
107 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ | ||
108 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ | ||
109 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ | ||
110 | |||
111 | #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ | ||
112 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ | ||
113 | |||
114 | /* Used for packet mode */ | ||
115 | #define TIOCPKT_DATA 0 | ||
116 | #define TIOCPKT_FLUSHREAD 1 | ||
117 | #define TIOCPKT_FLUSHWRITE 2 | ||
118 | #define TIOCPKT_STOP 4 | ||
119 | #define TIOCPKT_START 8 | ||
120 | #define TIOCPKT_NOSTOP 16 | ||
121 | #define TIOCPKT_DOSTOP 32 | ||
122 | |||
123 | struct winsize { | ||
124 | unsigned short ws_row; | ||
125 | unsigned short ws_col; | ||
126 | unsigned short ws_xpixel; | ||
127 | unsigned short ws_ypixel; | ||
128 | }; | ||
129 | |||
130 | #define NCC 10 | ||
131 | struct termio { | ||
132 | unsigned short c_iflag; /* input mode flags */ | ||
133 | unsigned short c_oflag; /* output mode flags */ | ||
134 | unsigned short c_cflag; /* control mode flags */ | ||
135 | unsigned short c_lflag; /* local mode flags */ | ||
136 | unsigned char c_line; /* line discipline */ | ||
137 | unsigned char c_cc[NCC]; /* control characters */ | ||
138 | }; | ||
139 | |||
140 | /* c_cc characters */ | ||
141 | #define _VINTR 0 | ||
142 | #define _VQUIT 1 | ||
143 | #define _VERASE 2 | ||
144 | #define _VKILL 3 | ||
145 | #define _VEOF 4 | ||
146 | #define _VMIN 5 | ||
147 | #define _VEOL 6 | ||
148 | #define _VTIME 7 | ||
149 | #define _VEOL2 8 | ||
150 | #define _VSWTC 9 | ||
151 | |||
152 | #ifdef __KERNEL__ | ||
153 | /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ | ||
154 | #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" | ||
155 | #endif /* __KERNEL__ */ | ||
156 | |||
157 | /* modem lines */ | ||
158 | #define TIOCM_LE 0x001 | ||
159 | #define TIOCM_DTR 0x002 | ||
160 | #define TIOCM_RTS 0x004 | ||
161 | #define TIOCM_ST 0x008 | ||
162 | #define TIOCM_SR 0x010 | ||
163 | #define TIOCM_CTS 0x020 | ||
164 | #define TIOCM_CAR 0x040 | ||
165 | #define TIOCM_RNG 0x080 | ||
166 | #define TIOCM_DSR 0x100 | ||
167 | #define TIOCM_CD TIOCM_CAR | ||
168 | #define TIOCM_RI TIOCM_RNG | ||
169 | #define TIOCM_OUT1 0x2000 | ||
170 | #define TIOCM_OUT2 0x4000 | ||
171 | #define TIOCM_LOOP 0x8000 | ||
172 | |||
173 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
174 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | ||
175 | |||
176 | /* line disciplines */ | ||
177 | #define N_TTY 0 | ||
178 | #define N_SLIP 1 | ||
179 | #define N_MOUSE 2 | ||
180 | #define N_PPP 3 | ||
181 | #define N_STRIP 4 | ||
182 | #define N_AX25 5 | ||
183 | #define N_X25 6 /* X.25 async */ | ||
184 | #define N_6PACK 7 | ||
185 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
186 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
187 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
188 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
189 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
190 | #define N_HDLC 13 /* synchronous HDLC */ | ||
191 | #define N_SYNC_PPP 14 | ||
192 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
193 | |||
194 | #ifdef __KERNEL__ | ||
195 | |||
196 | /* | ||
197 | * Translate a "termio" structure into a "termios". Ugh. | ||
198 | */ | ||
199 | #define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ | ||
200 | unsigned short __tmp; \ | ||
201 | get_user(__tmp,&(termio)->x); \ | ||
202 | (termios)->x = (0xffff0000 & (termios)->x) | __tmp; \ | ||
203 | } | ||
204 | |||
205 | #define user_termio_to_kernel_termios(termios, termio) \ | ||
206 | ({ \ | ||
207 | SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ | ||
208 | SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ | ||
209 | SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ | ||
210 | SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ | ||
211 | copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ | ||
212 | }) | ||
213 | |||
214 | /* | ||
215 | * Translate a "termios" structure into a "termio". Ugh. | ||
216 | */ | ||
217 | #define kernel_termios_to_user_termio(termio, termios) \ | ||
218 | ({ \ | ||
219 | put_user((termios)->c_iflag, &(termio)->c_iflag); \ | ||
220 | put_user((termios)->c_oflag, &(termio)->c_oflag); \ | ||
221 | put_user((termios)->c_cflag, &(termio)->c_cflag); \ | ||
222 | put_user((termios)->c_lflag, &(termio)->c_lflag); \ | ||
223 | put_user((termios)->c_line, &(termio)->c_line); \ | ||
224 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | ||
225 | }) | ||
226 | |||
227 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
228 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
229 | |||
230 | #endif /* __KERNEL__ */ | ||
231 | |||
232 | #endif /* _PPC_TERMIOS_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/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/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/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/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/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 |