aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/Kbuild2
-rw-r--r--include/asm-powerpc/elf.h47
-rw-r--r--include/asm-powerpc/floppy.h2
-rw-r--r--include/asm-powerpc/io.h17
-rw-r--r--include/asm-powerpc/ipc.h1
-rw-r--r--include/asm-powerpc/semaphore.h1
-rw-r--r--include/asm-powerpc/system.h1
-rw-r--r--include/asm-powerpc/types.h6
8 files changed, 33 insertions, 44 deletions
diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild
index 4869513b872f..5f640e542475 100644
--- a/include/asm-powerpc/Kbuild
+++ b/include/asm-powerpc/Kbuild
@@ -13,9 +13,7 @@ header-y += shmbuf.h
13header-y += socket.h 13header-y += socket.h
14header-y += termbits.h 14header-y += termbits.h
15header-y += fcntl.h 15header-y += fcntl.h
16header-y += ipc.h
17header-y += poll.h 16header-y += poll.h
18header-y += shmparam.h
19header-y += sockios.h 17header-y += sockios.h
20header-y += ucontext.h 18header-y += ucontext.h
21header-y += ioctl.h 19header-y += ioctl.h
diff --git a/include/asm-powerpc/elf.h b/include/asm-powerpc/elf.h
index e42820d6d25b..6bd07ef78ac4 100644
--- a/include/asm-powerpc/elf.h
+++ b/include/asm-powerpc/elf.h
@@ -101,6 +101,7 @@ typedef elf_greg_t64 elf_gregset_t64[ELF_NGREG];
101 101
102typedef unsigned int elf_greg_t32; 102typedef unsigned int elf_greg_t32;
103typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG]; 103typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG];
104typedef elf_gregset_t32 compat_elf_gregset_t;
104 105
105/* 106/*
106 * ELF_ARCH, CLASS, and DATA are used to set parameters in the core dumps. 107 * ELF_ARCH, CLASS, and DATA are used to set parameters in the core dumps.
@@ -175,26 +176,27 @@ typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32];
175 176
176#define ELF_ET_DYN_BASE (0x20000000) 177#define ELF_ET_DYN_BASE (0x20000000)
177 178
178/* Common routine for both 32-bit and 64-bit processes */ 179/*
180 * Our registers are always unsigned longs, whether we're a 32 bit
181 * process or 64 bit, on either a 64 bit or 32 bit kernel.
182 *
183 * This macro relies on elf_regs[i] having the right type to truncate to,
184 * either u32 or u64. It defines the body of the elf_core_copy_regs
185 * function, either the native one with elf_gregset_t elf_regs or
186 * the 32-bit one with elf_gregset_t32 elf_regs.
187 */
188#define PPC_ELF_CORE_COPY_REGS(elf_regs, regs) \
189 int i, nregs = min(sizeof(*regs) / sizeof(unsigned long), \
190 (size_t)ELF_NGREG); \
191 for (i = 0; i < nregs; i++) \
192 elf_regs[i] = ((unsigned long *) regs)[i]; \
193 memset(&elf_regs[i], 0, (ELF_NGREG - i) * sizeof(elf_regs[0]))
194
195/* Common routine for both 32-bit and 64-bit native processes */
179static inline void ppc_elf_core_copy_regs(elf_gregset_t elf_regs, 196static inline void ppc_elf_core_copy_regs(elf_gregset_t elf_regs,
180 struct pt_regs *regs) 197 struct pt_regs *regs)
181{ 198{
182 int i, nregs; 199 PPC_ELF_CORE_COPY_REGS(elf_regs, regs);
183
184 memset((void *)elf_regs, 0, sizeof(elf_gregset_t));
185
186 /* Our registers are always unsigned longs, whether we're a 32 bit
187 * process or 64 bit, on either a 64 bit or 32 bit kernel.
188 * Don't use ELF_GREG_TYPE here. */
189 nregs = sizeof(struct pt_regs) / sizeof(unsigned long);
190 if (nregs > ELF_NGREG)
191 nregs = ELF_NGREG;
192
193 for (i = 0; i < nregs; i++) {
194 /* This will correctly truncate 64 bit registers to 32 bits
195 * for a 32 bit process on a 64 bit kernel. */
196 elf_regs[i] = (elf_greg_t)((ELF_GREG_TYPE *)regs)[i];
197 }
198} 200}
199#define ELF_CORE_COPY_REGS(gregs, regs) ppc_elf_core_copy_regs(gregs, regs); 201#define ELF_CORE_COPY_REGS(gregs, regs) ppc_elf_core_copy_regs(gregs, regs);
200 202
@@ -212,6 +214,14 @@ static inline int dump_task_regs(struct task_struct *tsk,
212extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); 214extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
213#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) 215#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
214 216
217typedef elf_vrregset_t elf_fpxregset_t;
218
219#ifdef CONFIG_ALTIVEC
220extern int dump_task_altivec(struct task_struct *, elf_vrregset_t *vrregs);
221#define ELF_CORE_COPY_XFPREGS(tsk, regs) dump_task_altivec(tsk, regs)
222#define ELF_CORE_XFPREG_TYPE NT_PPC_VMX
223#endif
224
215#endif /* __KERNEL__ */ 225#endif /* __KERNEL__ */
216 226
217/* ELF_HWCAP yields a mask that user programs can use to figure out what 227/* ELF_HWCAP yields a mask that user programs can use to figure out what
@@ -281,6 +291,7 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
281 * AT_IGNOREPPC is used for that. 291 * AT_IGNOREPPC is used for that.
282 * - for compatibility with glibc ARCH_DLINFO must always be defined on PPC, 292 * - for compatibility with glibc ARCH_DLINFO must always be defined on PPC,
283 * even if DLINFO_ARCH_ITEMS goes to zero or is undefined. 293 * even if DLINFO_ARCH_ITEMS goes to zero or is undefined.
294 * update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes
284 */ 295 */
285#define ARCH_DLINFO \ 296#define ARCH_DLINFO \
286do { \ 297do { \
diff --git a/include/asm-powerpc/floppy.h b/include/asm-powerpc/floppy.h
index 34146f0eea63..24bd34c57e9d 100644
--- a/include/asm-powerpc/floppy.h
+++ b/include/asm-powerpc/floppy.h
@@ -202,8 +202,6 @@ static int FDC2 = -1;
202#define N_FDC 2 /* Don't change this! */ 202#define N_FDC 2 /* Don't change this! */
203#define N_DRIVE 8 203#define N_DRIVE 8
204 204
205#define FLOPPY_MOTOR_MASK 0xf0
206
207/* 205/*
208 * The PowerPC has no problems with floppy DMA crossing 64k borders. 206 * The PowerPC has no problems with floppy DMA crossing 64k borders.
209 */ 207 */
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h
index 0d0589ef8ea6..bf14ab4ef4c9 100644
--- a/include/asm-powerpc/io.h
+++ b/include/asm-powerpc/io.h
@@ -498,23 +498,6 @@ static inline void name at \
498#define writeq writeq 498#define writeq writeq
499#endif 499#endif
500 500
501#ifdef CONFIG_NOT_COHERENT_CACHE
502
503#define dma_cache_inv(_start,_size) \
504 invalidate_dcache_range(_start, (_start + _size))
505#define dma_cache_wback(_start,_size) \
506 clean_dcache_range(_start, (_start + _size))
507#define dma_cache_wback_inv(_start,_size) \
508 flush_dcache_range(_start, (_start + _size))
509
510#else /* CONFIG_NOT_COHERENT_CACHE */
511
512#define dma_cache_inv(_start,_size) do { } while (0)
513#define dma_cache_wback(_start,_size) do { } while (0)
514#define dma_cache_wback_inv(_start,_size) do { } while (0)
515
516#endif /* !CONFIG_NOT_COHERENT_CACHE */
517
518/* 501/*
519 * Convert a physical pointer to a virtual kernel pointer for /dev/mem 502 * Convert a physical pointer to a virtual kernel pointer for /dev/mem
520 * access 503 * access
diff --git a/include/asm-powerpc/ipc.h b/include/asm-powerpc/ipc.h
deleted file mode 100644
index a46e3d9c2a3f..000000000000
--- a/include/asm-powerpc/ipc.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/ipc.h>
diff --git a/include/asm-powerpc/semaphore.h b/include/asm-powerpc/semaphore.h
index 57369d2cadef..48dd32e07749 100644
--- a/include/asm-powerpc/semaphore.h
+++ b/include/asm-powerpc/semaphore.h
@@ -35,7 +35,6 @@ struct semaphore {
35 struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) 35 struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
36 36
37#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name, 1) 37#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name, 1)
38#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name, 0)
39 38
40static inline void sema_init (struct semaphore *sem, int val) 39static inline void sema_init (struct semaphore *sem, int val)
41{ 40{
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h
index d10e99bf5001..87be8c3bc9cb 100644
--- a/include/asm-powerpc/system.h
+++ b/include/asm-powerpc/system.h
@@ -40,6 +40,7 @@
40#define set_mb(var, value) do { var = value; mb(); } while (0) 40#define set_mb(var, value) do { var = value; mb(); } while (0)
41 41
42#ifdef __KERNEL__ 42#ifdef __KERNEL__
43#define AT_VECTOR_SIZE_ARCH 6 /* entries in ARCH_DLINFO */
43#ifdef CONFIG_SMP 44#ifdef CONFIG_SMP
44#define smp_mb() mb() 45#define smp_mb() mb()
45#define smp_rmb() rmb() 46#define smp_rmb() rmb()
diff --git a/include/asm-powerpc/types.h b/include/asm-powerpc/types.h
index a584341c87e3..903fd1932436 100644
--- a/include/asm-powerpc/types.h
+++ b/include/asm-powerpc/types.h
@@ -40,9 +40,9 @@ typedef unsigned int __u32;
40typedef __signed__ long __s64; 40typedef __signed__ long __s64;
41typedef unsigned long __u64; 41typedef unsigned long __u64;
42#else 42#else
43#if defined(__GNUC__) && !defined(__STRICT_ANSI__) 43#if defined(__GNUC__)
44typedef __signed__ long long __s64; 44__extension__ typedef __signed__ long long __s64;
45typedef unsigned long long __u64; 45__extension__ typedef unsigned long long __u64;
46#endif 46#endif
47#endif /* __powerpc64__ */ 47#endif /* __powerpc64__ */
48 48