aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-ebsa285/debug-macro.S7
-rw-r--r--include/asm-arm/arch-rpc/debug-macro.S5
-rw-r--r--include/asm-arm/ptrace.h5
-rw-r--r--include/asm-arm/system.h3
-rw-r--r--include/asm-sparc/unistd.h6
-rw-r--r--include/asm-sparc64/cacheflush.h22
-rw-r--r--include/asm-sparc64/compat.h40
-rw-r--r--include/asm-sparc64/stat.h49
-rw-r--r--include/asm-sparc64/unistd.h6
9 files changed, 87 insertions, 56 deletions
diff --git a/include/asm-arm/arch-ebsa285/debug-macro.S b/include/asm-arm/arch-ebsa285/debug-macro.S
index 237853db6e2..97d15fc629a 100644
--- a/include/asm-arm/arch-ebsa285/debug-macro.S
+++ b/include/asm-arm/arch-ebsa285/debug-macro.S
@@ -45,9 +45,12 @@
.equ dc21285_low, ARMCSR_BASE & 0x00ffffff
.macro addruart,rx
- mov \rx, #dc21285_high
+ mrc p15, 0, \rx, c1, c0
+ tst \rx, #1 @ MMU enabled?
+ moveq \rx, #0x42000000
+ movne \rx, #dc21285_high
.if dc21285_low
- orr \rx, \rx, #dc21285_low
+ orrne \rx, \rx, #dc21285_low
.endif
.endm
diff --git a/include/asm-arm/arch-rpc/debug-macro.S b/include/asm-arm/arch-rpc/debug-macro.S
index 0711828164c..456d3d754c3 100644
--- a/include/asm-arm/arch-rpc/debug-macro.S
+++ b/include/asm-arm/arch-rpc/debug-macro.S
@@ -12,7 +12,10 @@
*/
.macro addruart,rx
- mov \rx, #0xe0000000
+ mrc p15, 0, \rx, c1, c0
+ tst \rx, #1 @ MMU enabled?
+ moveq \rx, #0x03000000
+ movne \rx, #0xe0000000
orr \rx, \rx, #0x00010000
orr \rx, \rx, #0x00000fe0
.endm
diff --git a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h
index 604e3a186cf..4377e22b7e1 100644
--- a/include/asm-arm/ptrace.h
+++ b/include/asm-arm/ptrace.h
@@ -142,11 +142,8 @@ extern unsigned long profile_pc(struct pt_regs *regs);
#endif
#ifdef __KERNEL__
-extern void show_regs(struct pt_regs *);
-
-#define predicate(x) (x & 0xf0000000)
+#define predicate(x) ((x) & 0xf0000000)
#define PREDICATE_ALWAYS 0xe0000000
-
#endif
#endif /* __ASSEMBLY__ */
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index b5731290b4e..b13a8da4847 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -99,6 +99,9 @@ void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int,
#define tas(ptr) (xchg((ptr),1))
extern asmlinkage void __backtrace(void);
+extern asmlinkage void c_backtrace(unsigned long fp, int pmode);
+extern void show_pte(struct mm_struct *mm, unsigned long addr);
+extern void __show_regs(struct pt_regs *);
extern int cpu_architecture(void);
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h
index d1f63caaa32..84670840390 100644
--- a/include/asm-sparc/unistd.h
+++ b/include/asm-sparc/unistd.h
@@ -79,7 +79,7 @@
#define __NR_umask 60 /* Common */
#define __NR_chroot 61 /* Common */
#define __NR_fstat 62 /* Common */
-#define __NR_fstat64 63 /* Linux sparc32 Specific */
+#define __NR_fstat64 63 /* Linux Specific */
#define __NR_getpagesize 64 /* Common */
#define __NR_msync 65 /* Common in newer 1.3.x revs... */
#define __NR_vfork 66 /* Common */
@@ -148,14 +148,14 @@
#define __NR_truncate 129 /* Common */
#define __NR_ftruncate 130 /* Common */
#define __NR_flock 131 /* Common */
-#define __NR_lstat64 132 /* Linux sparc32 Specific */
+#define __NR_lstat64 132 /* Linux Specific */
#define __NR_sendto 133 /* Common */
#define __NR_shutdown 134 /* Common */
#define __NR_socketpair 135 /* Common */
#define __NR_mkdir 136 /* Common */
#define __NR_rmdir 137 /* Common */
#define __NR_utimes 138 /* SunOS Specific */
-#define __NR_stat64 139 /* Linux sparc32 Specific */
+#define __NR_stat64 139 /* Linux Specific */
#define __NR_sendfile64 140 /* adjtime under SunOS */
#define __NR_getpeername 141 /* Common */
#define __NR_futex 142 /* gethostid under SunOS */
diff --git a/include/asm-sparc64/cacheflush.h b/include/asm-sparc64/cacheflush.h
index 86f02937ff1..51b26e81d82 100644
--- a/include/asm-sparc64/cacheflush.h
+++ b/include/asm-sparc64/cacheflush.h
@@ -49,16 +49,22 @@ extern void flush_dcache_page(struct page *page);
#define flush_icache_page(vma, pg) do { } while(0)
#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
-#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
- do { \
- flush_cache_page(vma, vaddr, page_to_pfn(page));\
- memcpy(dst, src, len); \
+extern void flush_ptrace_access(struct vm_area_struct *, struct page *,
+ unsigned long uaddr, void *kaddr,
+ unsigned long len, int write);
+
+#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
+ do { \
+ flush_cache_page(vma, vaddr, page_to_pfn(page)); \
+ memcpy(dst, src, len); \
+ flush_ptrace_access(vma, page, vaddr, src, len, 0); \
} while (0)
-#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
- do { \
- flush_cache_page(vma, vaddr, page_to_pfn(page));\
- memcpy(dst, src, len); \
+#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
+ do { \
+ flush_cache_page(vma, vaddr, page_to_pfn(page)); \
+ memcpy(dst, src, len); \
+ flush_ptrace_access(vma, page, vaddr, dst, len, 1); \
} while (0)
#define flush_dcache_mmap_lock(mapping) do { } while (0)
diff --git a/include/asm-sparc64/compat.h b/include/asm-sparc64/compat.h
index 2950279dd77..22f58055b8a 100644
--- a/include/asm-sparc64/compat.h
+++ b/include/asm-sparc64/compat.h
@@ -51,16 +51,50 @@ struct compat_stat {
compat_dev_t st_rdev;
compat_off_t st_size;
compat_time_t st_atime;
- u32 __unused1;
+ compat_ulong_t st_atime_nsec;
compat_time_t st_mtime;
- u32 __unused2;
+ compat_ulong_t st_mtime_nsec;
compat_time_t st_ctime;
- u32 __unused3;
+ compat_ulong_t st_ctime_nsec;
compat_off_t st_blksize;
compat_off_t st_blocks;
u32 __unused4[2];
};
+struct compat_stat64 {
+ unsigned long long st_dev;
+
+ unsigned long long st_ino;
+
+ unsigned int st_mode;
+ unsigned int st_nlink;
+
+ unsigned int st_uid;
+ unsigned int st_gid;
+
+ unsigned long long st_rdev;
+
+ unsigned char __pad3[8];
+
+ long long st_size;
+ unsigned int st_blksize;
+
+ unsigned char __pad4[8];
+ unsigned int st_blocks;
+
+ unsigned int st_atime;
+ unsigned int st_atime_nsec;
+
+ unsigned int st_mtime;
+ unsigned int st_mtime_nsec;
+
+ unsigned int st_ctime;
+ unsigned int st_ctime_nsec;
+
+ unsigned int __unused4;
+ unsigned int __unused5;
+};
+
struct compat_flock {
short l_type;
short l_whence;
diff --git a/include/asm-sparc64/stat.h b/include/asm-sparc64/stat.h
index 48e06618a5a..128c27e57f0 100644
--- a/include/asm-sparc64/stat.h
+++ b/include/asm-sparc64/stat.h
@@ -21,43 +21,28 @@ struct stat {
unsigned long __unused4[2];
};
-#ifdef __KERNEL__
-/* This is sparc32 stat64 structure. */
-
struct stat64 {
- unsigned long long st_dev;
-
- unsigned long long st_ino;
+ unsigned long st_dev;
+ unsigned long st_ino;
+ unsigned long st_nlink;
unsigned int st_mode;
- unsigned int st_nlink;
-
unsigned int st_uid;
unsigned int st_gid;
-
- unsigned long long st_rdev;
-
- unsigned char __pad3[8];
-
- long long st_size;
- unsigned int st_blksize;
-
- unsigned char __pad4[8];
- unsigned int st_blocks;
-
- unsigned int st_atime;
- unsigned int st_atime_nsec;
-
- unsigned int st_mtime;
- unsigned int st_mtime_nsec;
-
- unsigned int st_ctime;
- unsigned int st_ctime_nsec;
-
- unsigned int __unused4;
- unsigned int __unused5;
+ unsigned int __pad0;
+
+ unsigned long st_rdev;
+ long st_size;
+ long st_blksize;
+ long st_blocks;
+
+ unsigned long st_atime;
+ unsigned long st_atime_nsec;
+ unsigned long st_mtime;
+ unsigned long st_mtime_nsec;
+ unsigned long st_ctime;
+ unsigned long st_ctime_nsec;
+ long __unused[3];
};
#endif
-
-#endif
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h
index 3c00065eea8..5b8dcf5786a 100644
--- a/include/asm-sparc64/unistd.h
+++ b/include/asm-sparc64/unistd.h
@@ -79,7 +79,7 @@
#define __NR_umask 60 /* Common */
#define __NR_chroot 61 /* Common */
#define __NR_fstat 62 /* Common */
-/* #define __NR_fstat64 63 Linux sparc32 Specific */
+#define __NR_fstat64 63 /* Linux Specific */
#define __NR_getpagesize 64 /* Common */
#define __NR_msync 65 /* Common in newer 1.3.x revs... */
#define __NR_vfork 66 /* Common */
@@ -148,14 +148,14 @@
#define __NR_truncate 129 /* Common */
#define __NR_ftruncate 130 /* Common */
#define __NR_flock 131 /* Common */
-/* #define __NR_lstat64 132 Linux sparc32 Specific */
+#define __NR_lstat64 132 /* Linux Specific */
#define __NR_sendto 133 /* Common */
#define __NR_shutdown 134 /* Common */
#define __NR_socketpair 135 /* Common */
#define __NR_mkdir 136 /* Common */
#define __NR_rmdir 137 /* Common */
#define __NR_utimes 138 /* SunOS Specific */
-/* #define __NR_stat64 139 Linux sparc32 Specific */
+#define __NR_stat64 139 /* Linux Specific */
#define __NR_sendfile64 140 /* adjtime under SunOS */
#define __NR_getpeername 141 /* Common */
#define __NR_futex 142 /* gethostid under SunOS */