summaryrefslogtreecommitdiffstats
path: root/include/asm-ppc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc')
-rw-r--r--include/asm-ppc/elf.h2
-rw-r--r--include/asm-ppc/mman.h12
-rw-r--r--include/asm-ppc/smplock.h2
-rw-r--r--include/asm-ppc/types.h10
4 files changed, 18 insertions, 8 deletions
diff --git a/include/asm-ppc/elf.h b/include/asm-ppc/elf.h
index 3ae89d9cc..758e1a93c 100644
--- a/include/asm-ppc/elf.h
+++ b/include/asm-ppc/elf.h
@@ -38,9 +38,11 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
typedef double elf_fpreg_t;
typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+#ifdef __KERNEL__
/* Altivec registers */
typedef vector128 elf_vrreg_t;
typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
+#endif /* __KERNEL__ */
#define ELF_CORE_COPY_REGS(gregs, regs) \
memcpy(gregs, regs, \
diff --git a/include/asm-ppc/mman.h b/include/asm-ppc/mman.h
index ebea80172..99a5c8386 100644
--- a/include/asm-ppc/mman.h
+++ b/include/asm-ppc/mman.h
@@ -16,14 +16,20 @@
#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
-#define MAP_EXECUTABLE 0x1000 /* mark it as a executable */
+#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
#define MS_ASYNC 1 /* sync memory asynchronously */
#define MS_INVALIDATE 2 /* invalidate the caches */
#define MS_SYNC 4 /* synchronous memory sync */
-#define MCL_CURRENT 0x2000 /* lock all currently mapped pages */
-#define MCL_FUTURE 0x4000 /* lock all additions to address space */
+#define MCL_CURRENT 1 /* lock all current mappings */
+#define MCL_FUTURE 2 /* lock all future mappings */
+
+#define MADV_NORMAL 0x0 /* default page-in behavior */
+#define MADV_RANDOM 0x1 /* page-in minimum required */
+#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */
+#define MADV_WILLNEED 0x3 /* pre-fault pages */
+#define MADV_DONTNEED 0x4 /* discard these pages */
/* compatibility flags */
#define MAP_ANON MAP_ANONYMOUS
diff --git a/include/asm-ppc/smplock.h b/include/asm-ppc/smplock.h
index 1590fafe9..96565069c 100644
--- a/include/asm-ppc/smplock.h
+++ b/include/asm-ppc/smplock.h
@@ -8,6 +8,8 @@
extern spinlock_t kernel_flag;
+#define kernel_locked() spin_is_locked(&kernel_flag)
+
/*
* Release global kernel lock and global interrupt lock
*/
diff --git a/include/asm-ppc/types.h b/include/asm-ppc/types.h
index ca2fb0529..4ebbb9e02 100644
--- a/include/asm-ppc/types.h
+++ b/include/asm-ppc/types.h
@@ -2,7 +2,6 @@
#define _PPC_TYPES_H
#ifndef __ASSEMBLY__
-#ifdef __KERNEL__
typedef unsigned short umode_t;
@@ -20,6 +19,11 @@ typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif
+typedef struct {
+ __u32 u[4];
+} __attribute((aligned(16))) vector128;
+
+#ifdef __KERNEL__
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
@@ -35,10 +39,6 @@ typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
-typedef struct {
- u32 u[4];
-} __attribute((aligned(16))) vector128;
-
#define BITS_PER_LONG 32
/* DMA addresses are 32-bits wide */