diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-09 21:05:17 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-09 21:05:17 -0700 |
commit | 4d15393d20c1934a296a999d8ede125532d21cc4 (patch) | |
tree | a1ad6f5314857c1d9dfd4ba981003c2853b8027f /arch/sparc/include | |
parent | 7fbd15f9b42f2c30ceeb94776a111d0c28669e0c (diff) | |
parent | 2dc4ec5de039d5db4805dff170ab80f4e990e977 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc64: Update defconfig.
sparc: Kill user copy check code.
sparc64: Fix perf_arch_get_caller_regs().
sparc64: Add missing ID to parport probing code.
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/parport.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/perf_event.h | 25 | ||||
-rw-r--r-- | arch/sparc/include/asm/uaccess_32.h | 15 | ||||
-rw-r--r-- | arch/sparc/include/asm/uaccess_64.h | 23 |
4 files changed, 29 insertions, 38 deletions
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h index 4f7afa01b2ae..aa4c82648d88 100644 --- a/arch/sparc/include/asm/parport.h +++ b/arch/sparc/include/asm/parport.h @@ -228,6 +228,10 @@ static const struct of_device_id ecpp_match[] = { .name = "parallel", .compatible = "ns87317-ecpp", }, + { + .name = "parallel", + .compatible = "pnpALI,1533,3", + }, {}, }; diff --git a/arch/sparc/include/asm/perf_event.h b/arch/sparc/include/asm/perf_event.h index 74c4e0cd889c..727af70646cb 100644 --- a/arch/sparc/include/asm/perf_event.h +++ b/arch/sparc/include/asm/perf_event.h @@ -10,11 +10,26 @@ extern void set_perf_event_pending(void); extern void init_hw_perf_events(void); -extern void -__perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); - -#define perf_arch_fetch_caller_regs(pt_regs, ip) \ - __perf_arch_fetch_caller_regs(pt_regs, ip, 1); +#define perf_arch_fetch_caller_regs(regs, ip) \ +do { \ + unsigned long _pstate, _asi, _pil, _i7, _fp; \ + __asm__ __volatile__("rdpr %%pstate, %0\n\t" \ + "rd %%asi, %1\n\t" \ + "rdpr %%pil, %2\n\t" \ + "mov %%i7, %3\n\t" \ + "mov %%i6, %4\n\t" \ + : "=r" (_pstate), \ + "=r" (_asi), \ + "=r" (_pil), \ + "=r" (_i7), \ + "=r" (_fp)); \ + (regs)->tstate = (_pstate << 8) | \ + (_asi << 24) | (_pil << 20); \ + (regs)->tpc = (ip); \ + (regs)->tnpc = (regs)->tpc + 4; \ + (regs)->u_regs[UREG_I6] = _fp; \ + (regs)->u_regs[UREG_I7] = _i7; \ +} while (0) #else static inline void init_hw_perf_events(void) { } #endif diff --git a/arch/sparc/include/asm/uaccess_32.h b/arch/sparc/include/asm/uaccess_32.h index 25f1d10155e8..8303ac481034 100644 --- a/arch/sparc/include/asm/uaccess_32.h +++ b/arch/sparc/include/asm/uaccess_32.h @@ -260,23 +260,8 @@ static inline unsigned long __copy_to_user(void __user *to, const void *from, un return __copy_user(to, (__force void __user *) from, n); } -extern void copy_from_user_overflow(void) -#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS - __compiletime_error("copy_from_user() buffer size is not provably correct") -#else - __compiletime_warning("copy_from_user() buffer size is not provably correct") -#endif -; - static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) { - int sz = __compiletime_object_size(to); - - if (unlikely(sz != -1 && sz < n)) { - copy_from_user_overflow(); - return n; - } - if (n && __access_ok((unsigned long) from, n)) return __copy_user((__force void __user *) to, from, n); else diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h index 2406788bfe5f..3e1449f07798 100644 --- a/arch/sparc/include/asm/uaccess_64.h +++ b/arch/sparc/include/asm/uaccess_64.h @@ -205,14 +205,6 @@ __asm__ __volatile__( \ extern int __get_user_bad(void); -extern void copy_from_user_overflow(void) -#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS - __compiletime_error("copy_from_user() buffer size is not provably correct") -#else - __compiletime_warning("copy_from_user() buffer size is not provably correct") -#endif -; - extern unsigned long __must_check ___copy_from_user(void *to, const void __user *from, unsigned long size); @@ -221,16 +213,11 @@ extern unsigned long copy_from_user_fixup(void *to, const void __user *from, static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long size) { - int sz = __compiletime_object_size(to); - unsigned long ret = size; - - if (likely(sz == -1 || sz >= size)) { - ret = ___copy_from_user(to, from, size); - if (unlikely(ret)) - ret = copy_from_user_fixup(to, from, size); - } else { - copy_from_user_overflow(); - } + unsigned long ret = ___copy_from_user(to, from, size); + + if (unlikely(ret)) + ret = copy_from_user_fixup(to, from, size); + return ret; } #define __copy_from_user copy_from_user |