Commit 3db0d708 authored by Russell King's avatar Russell King

Merge flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5

into flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-rmk
parents 0e3a6c7d 2a544e1b
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
HEAD = head.o HEAD = head.o
OBJS = misc.o OBJS = misc.o
FONTC = drivers/video/font_acorn_8x8.c FONTC = drivers/video/console/font_acorn_8x8.c
# #
# Architecture dependencies # Architecture dependencies
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#else #else
__syscall_start: __syscall_start:
/* 0 */ .long sys_ni_syscall /* 0 */ .long sys_restart_syscall
.long sys_exit .long sys_exit
.long sys_fork_wrapper .long sys_fork_wrapper
.long sys_read .long sys_read
......
...@@ -603,7 +603,7 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall) ...@@ -603,7 +603,7 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
case SIGQUIT: case SIGILL: case SIGTRAP: case SIGQUIT: case SIGILL: case SIGTRAP:
case SIGABRT: case SIGFPE: case SIGSEGV: case SIGABRT: case SIGFPE: case SIGSEGV:
case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ: case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ:
if (do_coredump(signr, regs)) if (do_coredump(signr, exit_code, regs))
exit_code |= 0x80; exit_code |= 0x80;
/* FALLTHRU */ /* FALLTHRU */
...@@ -615,7 +615,11 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall) ...@@ -615,7 +615,11 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
/* Are we from a system call? */ /* Are we from a system call? */
if (syscall) { if (syscall) {
/* If so, check system call restarting.. */
switch (regs->ARM_r0) { switch (regs->ARM_r0) {
case -ERESTART_RESTARTBLOCK:
current_thread_info()->restart_block.fn =
do_no_restart_syscall;
case -ERESTARTNOHAND: case -ERESTARTNOHAND:
regs->ARM_r0 = -EINTR; regs->ARM_r0 = -EINTR;
break; break;
...@@ -638,12 +642,35 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall) ...@@ -638,12 +642,35 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
return 1; return 1;
} }
if (syscall && /*
(regs->ARM_r0 == -ERESTARTNOHAND || * No signal to deliver to the process - restart the syscall.
regs->ARM_r0 == -ERESTARTSYS || */
regs->ARM_r0 == -ERESTARTNOINTR)) { if (syscall) {
regs->ARM_r0 = regs->ARM_ORIG_r0; if (regs->ARM_r0 == -ERESTART_RESTARTBLOCK) {
regs->ARM_pc -= 4; if (thumb_mode(regs)) {
regs->ARM_r7 = __NR_restart_syscall;
regs->ARM_pc -= 2;
} else {
u32 *usp;
regs->ARM_sp -= 12;
usp = (u32 *)regs->ARM_sp;
put_user(regs->ARM_pc, &usp[0]);
/* swi __NR_restart_syscall */
put_user(0xef000000 | __NR_restart_syscall, &usp[1]);
/* ldr pc, [sp], #12 */
put_user(0xe49df00c, &usp[2]);
regs->ARM_pc = regs->ARM_sp + 4;
}
}
if (regs->ARM_r0 == -ERESTARTNOHAND ||
regs->ARM_r0 == -ERESTARTSYS ||
regs->ARM_r0 == -ERESTARTNOINTR) {
regs->ARM_r0 = regs->ARM_ORIG_r0;
regs->ARM_pc -= 4;
}
} }
if (single_stepping) if (single_stepping)
ptrace_set_bpt(current); ptrace_set_bpt(current);
......
...@@ -148,9 +148,11 @@ static int integrator_set_policy(struct cpufreq_policy *policy) ...@@ -148,9 +148,11 @@ static int integrator_set_policy(struct cpufreq_policy *policy)
static struct cpufreq_policy integrator_policy = { static struct cpufreq_policy integrator_policy = {
.cpu = 0, .cpu = 0,
.policy = CPUFREQ_POLICY_POWERSAVE, .policy = CPUFREQ_POLICY_POWERSAVE,
.cpuinfo.max_cpu_freq = 160000, .cpuinfo = {
.cpuinfo.min_cpu_freq = 12000, .max_cpu_freq = 160000,
.cpuinfo.transition_latency = CPUFREQ_ETERNAL, .min_cpu_freq = 12000,
.transition_latency = CPUFREQ_ETERNAL,
},
}; };
static struct cpufreq_driver integrator_driver = { static struct cpufreq_driver integrator_driver = {
......
...@@ -203,9 +203,11 @@ static int sa1100_setspeed(struct cpufreq_policy *policy) ...@@ -203,9 +203,11 @@ static int sa1100_setspeed(struct cpufreq_policy *policy)
static struct cpufreq_policy sa1100_policy = { static struct cpufreq_policy sa1100_policy = {
.cpu = 0, .cpu = 0,
.policy = CPUFREQ_POLICY_POWERSAVE, .policy = CPUFREQ_POLICY_POWERSAVE,
.cpuinfo.max_freq = 287000, .cpuinfo = {
.cpuinfo.min_freq = 59000, .max_freq = 287000,
.cpuinfo.transition_latency = CPUFREQ_ETERNAL, .min_freq = 59000,
.transition_latency = CPUFREQ_ETERNAL,
},
}; };
static struct cpufreq_driver sa1100_driver = { static struct cpufreq_driver sa1100_driver = {
......
...@@ -298,9 +298,11 @@ static int sa1110_setspeed(struct cpufreq_policy *policy) ...@@ -298,9 +298,11 @@ static int sa1110_setspeed(struct cpufreq_policy *policy)
static struct cpufreq_policy sa1110_policy = { static struct cpufreq_policy sa1110_policy = {
.cpu = 0, .cpu = 0,
.policy = CPUFREQ_POLICY_POWERSAVE, .policy = CPUFREQ_POLICY_POWERSAVE,
.cpuinfo.max_freq = 287000, .cpuinfo = {
.cpuinfo.min_freq = 59000, .max_freq = 287000,
.cpuinfo.transition_latency = CPUFREQ_ETERNAL, .min_freq = 59000,
.transition_latency = CPUFREQ_ETERNAL,
},
}; };
static struct cpufreq_driver sa1110_driver = { static struct cpufreq_driver sa1110_driver = {
......
...@@ -26,6 +26,9 @@ SECTIONS ...@@ -26,6 +26,9 @@ SECTIONS
__setup_start = .; __setup_start = .;
*(.init.setup) *(.init.setup)
__setup_end = .; __setup_end = .;
__start___param = .;
*(__param)
__stop___param = .;
__initcall_start = .; __initcall_start = .;
*(.initcall1.init) *(.initcall1.init)
*(.initcall2.init) *(.initcall2.init)
......
#ifndef _ASMARM_CURRENT_H #ifndef _ASMARM_CURRENT_H
#define _ASMARM_CURRENT_H #define _ASMARM_CURRENT_H
#include <asm/thread_info.h> #include <linux/thread_info.h>
static inline struct task_struct *get_current(void) __attribute__ (( __const__ )); static inline struct task_struct *get_current(void) __attribute__ (( __const__ ));
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
" blmi " #fail \ " blmi " #fail \
: \ : \
: "r" (ptr), "I" (1) \ : "r" (ptr), "I" (1) \
: "ip", "lr", "cc"); \ : "ip", "lr", "cc", "memory"); \
}) })
#define __down_op_ret(ptr,fail) \ #define __down_op_ret(ptr,fail) \
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
" mov %0, ip" \ " mov %0, ip" \
: "=&r" (ret) \ : "=&r" (ret) \
: "r" (ptr), "I" (1) \ : "r" (ptr), "I" (1) \
: "ip", "lr", "cc"); \ : "ip", "lr", "cc", "memory"); \
ret; \ ret; \
}) })
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
" blne " #fail \ " blne " #fail \
: \ : \
: "r" (ptr), "I" (RW_LOCK_BIAS) \ : "r" (ptr), "I" (RW_LOCK_BIAS) \
: "ip", "lr", "cc"); \ : "ip", "lr", "cc", "memory"); \
}) })
#define __up_op_write(ptr,wake) \ #define __up_op_write(ptr,wake) \
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
" blcs " #wake \ " blcs " #wake \
: \ : \
: "r" (ptr), "I" (RW_LOCK_BIAS) \ : "r" (ptr), "I" (RW_LOCK_BIAS) \
: "ip", "lr", "cc"); \ : "ip", "lr", "cc", "memory"); \
}) })
#define __down_op_read(ptr,fail) \ #define __down_op_read(ptr,fail) \
......
...@@ -37,7 +37,7 @@ static inline void set_fs (mm_segment_t fs) ...@@ -37,7 +37,7 @@ static inline void set_fs (mm_segment_t fs)
: "cc"); \ : "cc"); \
(flag == 0); }) (flag == 0); })
#define __put_user_asm_byte(x,addr,err) \ #define __put_user_asm_byte(x,__pu_addr,err) \
__asm__ __volatile__( \ __asm__ __volatile__( \
"1: strbt %1,[%2],#0\n" \ "1: strbt %1,[%2],#0\n" \
"2:\n" \ "2:\n" \
...@@ -51,27 +51,26 @@ static inline void set_fs (mm_segment_t fs) ...@@ -51,27 +51,26 @@ static inline void set_fs (mm_segment_t fs)
" .long 1b, 3b\n" \ " .long 1b, 3b\n" \
" .previous" \ " .previous" \
: "=r" (err) \ : "=r" (err) \
: "r" (x), "r" (addr), "i" (-EFAULT), "0" (err)) : "r" (x), "r" (__pu_addr), "i" (-EFAULT), "0" (err) \
: "cc")
#ifndef __ARMEB__ #ifndef __ARMEB__
#define __put_user_asm_half(x,addr,err) \ #define __put_user_asm_half(x,__pu_addr,err) \
({ \ ({ \
unsigned long __temp = (unsigned long)(x); \ unsigned long __temp = (unsigned long)(x); \
unsigned long __ptr = (unsigned long)(addr); \ __put_user_asm_byte(__temp, __pu_addr, err); \
__put_user_asm_byte(__temp, __ptr, err); \ __put_user_asm_byte(__temp >> 8, __pu_addr + 1, err); \
__put_user_asm_byte(__temp >> 8, __ptr + 1, err); \
}) })
#else #else
#define __put_user_asm_half(x,addr,err) \ #define __put_user_asm_half(x,__pu_addr,err) \
({ \ ({ \
unsigned long __temp = (unsigned long)(x); \ unsigned long __temp = (unsigned long)(x); \
unsigned long __ptr = (unsigned long)(addr); \ __put_user_asm_byte(__temp >> 8, __pu_addr, err); \
__put_user_asm_byte(__temp >> 8, __ptr, err); \ __put_user_asm_byte(__temp, __pu_addr + 1, err); \
__put_user_asm_byte(__temp, __ptr + 1, err); \
}) })
#endif #endif
#define __put_user_asm_word(x,addr,err) \ #define __put_user_asm_word(x,__pu_addr,err) \
__asm__ __volatile__( \ __asm__ __volatile__( \
"1: strt %1,[%2],#0\n" \ "1: strt %1,[%2],#0\n" \
"2:\n" \ "2:\n" \
...@@ -85,7 +84,31 @@ static inline void set_fs (mm_segment_t fs) ...@@ -85,7 +84,31 @@ static inline void set_fs (mm_segment_t fs)
" .long 1b, 3b\n" \ " .long 1b, 3b\n" \
" .previous" \ " .previous" \
: "=r" (err) \ : "=r" (err) \
: "r" (x), "r" (addr), "i" (-EFAULT), "0" (err)) : "r" (x), "r" (__pu_addr), "i" (-EFAULT), "0" (err))
#define __put_user_asm_dword(x,__pu_addr,err) \
({ \
unsigned long long __temp = (unsigned long long)x; \
__asm__ __volatile__( \
"1: strt %1, [%2], #0\n" \
"2: strt %3, [%4], #0\n" \
"3:\n" \
" .section .fixup,\"ax\"\n" \
" .align 2\n" \
"4: mov %0, %5\n" \
" b 3b\n" \
" .previous\n" \
" .section __ex_table,\"a\"\n" \
" .align 3\n" \
" .long 1b, 4b\n" \
" .long 2b, 4b\n" \
" .previous" \
: "=r" (err) \
: "r" (__temp), "r" (__pu_addr), \
"r" (__temp >> 32), "r" (__pu_addr + 4), \
"i" (-EFAULT), "0" (err) \
: "cc"); \
})
#define __get_user_asm_byte(x,addr,err) \ #define __get_user_asm_byte(x,addr,err) \
__asm__ __volatile__( \ __asm__ __volatile__( \
......
...@@ -51,17 +51,21 @@ struct thread_info { ...@@ -51,17 +51,21 @@ struct thread_info {
__u32 cpu; /* cpu */ __u32 cpu; /* cpu */
__u32 cpu_domain; /* cpu domain */ __u32 cpu_domain; /* cpu domain */
struct cpu_context_save cpu_context; /* cpu context */ struct cpu_context_save cpu_context; /* cpu context */
struct restart_block restart_block;
union fp_state fpstate; union fp_state fpstate;
}; };
#define INIT_THREAD_INFO(tsk) \ #define INIT_THREAD_INFO(tsk) \
{ \ { \
task: &tsk, \ .task = &tsk, \
exec_domain: &default_exec_domain, \ .exec_domain = &default_exec_domain, \
flags: 0, \ .flags = 0, \
preempt_count: 0, \ .preempt_count = 1, \
addr_limit: KERNEL_DS, \ .addr_limit = KERNEL_DS, \
INIT_EXTRA_THREAD_INFO, \ .restart_block = { \
.fn = do_no_restart_syscall, \
}, \
INIT_EXTRA_THREAD_INFO, \
} }
#define init_thread_info (init_thread_union.thread_info) #define init_thread_info (init_thread_union.thread_info)
......
...@@ -81,7 +81,7 @@ extern int __get_user_bad(void); ...@@ -81,7 +81,7 @@ extern int __get_user_bad(void);
const register typeof(*(p)) *__p asm("r0") = (p); \ const register typeof(*(p)) *__p asm("r0") = (p); \
register typeof(*(p)) __r1 asm("r1"); \ register typeof(*(p)) __r1 asm("r1"); \
register int __e asm("r0"); \ register int __e asm("r0"); \
switch (sizeof(*(p))) { \ switch (sizeof(*(__p))) { \
case 1: \ case 1: \
__get_user_x(__r1, __p, __e, 1, "lr"); \ __get_user_x(__r1, __p, __e, 1, "lr"); \
break; \ break; \
...@@ -120,7 +120,7 @@ extern int __put_user_bad(void); ...@@ -120,7 +120,7 @@ extern int __put_user_bad(void);
const register typeof(*(p)) __r1 asm("r1") = (x); \ const register typeof(*(p)) __r1 asm("r1") = (x); \
const register typeof(*(p)) *__p asm("r0") = (p); \ const register typeof(*(p)) *__p asm("r0") = (p); \
register int __e asm("r0"); \ register int __e asm("r0"); \
switch (sizeof(*(p))) { \ switch (sizeof(*(__p))) { \
case 1: \ case 1: \
__put_user_x(__r1, __p, __e, 1, "r2", "lr"); \ __put_user_x(__r1, __p, __e, 1, "r2", "lr"); \
break; \ break; \
...@@ -256,14 +256,15 @@ static inline long strnlen_user(const char *s, long n) ...@@ -256,14 +256,15 @@ static inline long strnlen_user(const char *s, long n)
#define __put_user_nocheck(x,ptr,size) \ #define __put_user_nocheck(x,ptr,size) \
({ \ ({ \
long __pu_err = 0; \ long __pu_err = 0; \
__typeof__(*(ptr)) *__pu_addr = (ptr); \ unsigned long __pu_addr = (unsigned long)(ptr); \
__put_user_size((x),__pu_addr,(size),__pu_err); \ __put_user_size((x),__pu_addr,(size),__pu_err); \
__pu_err; \ __pu_err; \
}) })
#define __put_user_nocheck_error(x,ptr,size,err) \ #define __put_user_nocheck_error(x,ptr,size,err) \
({ \ ({ \
__put_user_size((x),(ptr),(size),err); \ unsigned long __pu_addr = (unsigned long)(ptr); \
__put_user_size((x),__pu_addr,(size),err); \
(void) 0; \ (void) 0; \
}) })
...@@ -273,6 +274,7 @@ do { \ ...@@ -273,6 +274,7 @@ do { \
case 1: __get_user_asm_byte(x,ptr,retval); break; \ case 1: __get_user_asm_byte(x,ptr,retval); break; \
case 2: __get_user_asm_half(x,ptr,retval); break; \ case 2: __get_user_asm_half(x,ptr,retval); break; \
case 4: __get_user_asm_word(x,ptr,retval); break; \ case 4: __get_user_asm_word(x,ptr,retval); break; \
case 8: __get_user_asm_dword(x,ptr,retval); break; \
default: (x) = __get_user_bad(); \ default: (x) = __get_user_bad(); \
} \ } \
} while (0) } while (0)
...@@ -283,6 +285,7 @@ do { \ ...@@ -283,6 +285,7 @@ do { \
case 1: __put_user_asm_byte(x,ptr,retval); break; \ case 1: __put_user_asm_byte(x,ptr,retval); break; \
case 2: __put_user_asm_half(x,ptr,retval); break; \ case 2: __put_user_asm_half(x,ptr,retval); break; \
case 4: __put_user_asm_word(x,ptr,retval); break; \ case 4: __put_user_asm_word(x,ptr,retval); break; \
case 8: __put_user_asm_dword(x,ptr,retval); break; \
default: __put_user_bad(); \ default: __put_user_bad(); \
} \ } \
} while (0) } while (0)
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
* This file contains the system call numbers. * This file contains the system call numbers.
*/ */
#define __NR_restart_syscall (__NR_SYSCALL_BASE+ 0)
#define __NR_exit (__NR_SYSCALL_BASE+ 1) #define __NR_exit (__NR_SYSCALL_BASE+ 1)
#define __NR_fork (__NR_SYSCALL_BASE+ 2) #define __NR_fork (__NR_SYSCALL_BASE+ 2)
#define __NR_read (__NR_SYSCALL_BASE+ 3) #define __NR_read (__NR_SYSCALL_BASE+ 3)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment