diff options
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/asm-offsets.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/ptrace.c | 14 | ||||
-rw-r--r-- | arch/arm/kernel/time.c | 10 |
3 files changed, 13 insertions, 15 deletions
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index 0abbce8c70bc..b324dcac1c56 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c | |||
@@ -57,7 +57,9 @@ int main(void) | |||
57 | DEFINE(TI_TP_VALUE, offsetof(struct thread_info, tp_value)); | 57 | DEFINE(TI_TP_VALUE, offsetof(struct thread_info, tp_value)); |
58 | DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate)); | 58 | DEFINE(TI_FPSTATE, offsetof(struct thread_info, fpstate)); |
59 | DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate)); | 59 | DEFINE(TI_VFPSTATE, offsetof(struct thread_info, vfpstate)); |
60 | DEFINE(TI_IWMMXT_STATE, (offsetof(struct thread_info, fpstate)+4)&~7); | 60 | #ifdef CONFIG_IWMMXT |
61 | DEFINE(TI_IWMMXT_STATE, offsetof(struct thread_info, fpstate.iwmmxt)); | ||
62 | #endif | ||
61 | BLANK(); | 63 | BLANK(); |
62 | DEFINE(S_R0, offsetof(struct pt_regs, ARM_r0)); | 64 | DEFINE(S_R0, offsetof(struct pt_regs, ARM_r0)); |
63 | DEFINE(S_R1, offsetof(struct pt_regs, ARM_r1)); | 65 | DEFINE(S_R1, offsetof(struct pt_regs, ARM_r1)); |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 7b6256bb590e..bc9e2f8ae326 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -610,15 +610,12 @@ static int ptrace_setfpregs(struct task_struct *tsk, void __user *ufp) | |||
610 | static int ptrace_getwmmxregs(struct task_struct *tsk, void __user *ufp) | 610 | static int ptrace_getwmmxregs(struct task_struct *tsk, void __user *ufp) |
611 | { | 611 | { |
612 | struct thread_info *thread = task_thread_info(tsk); | 612 | struct thread_info *thread = task_thread_info(tsk); |
613 | void *ptr = &thread->fpstate; | ||
614 | 613 | ||
615 | if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) | 614 | if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) |
616 | return -ENODATA; | 615 | return -ENODATA; |
617 | iwmmxt_task_disable(thread); /* force it to ram */ | 616 | iwmmxt_task_disable(thread); /* force it to ram */ |
618 | /* The iWMMXt state is stored doubleword-aligned. */ | 617 | return copy_to_user(ufp, &thread->fpstate.iwmmxt, IWMMXT_SIZE) |
619 | if (((long) ptr) & 4) | 618 | ? -EFAULT : 0; |
620 | ptr += 4; | ||
621 | return copy_to_user(ufp, ptr, 0x98) ? -EFAULT : 0; | ||
622 | } | 619 | } |
623 | 620 | ||
624 | /* | 621 | /* |
@@ -627,15 +624,12 @@ static int ptrace_getwmmxregs(struct task_struct *tsk, void __user *ufp) | |||
627 | static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp) | 624 | static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp) |
628 | { | 625 | { |
629 | struct thread_info *thread = task_thread_info(tsk); | 626 | struct thread_info *thread = task_thread_info(tsk); |
630 | void *ptr = &thread->fpstate; | ||
631 | 627 | ||
632 | if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) | 628 | if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT)) |
633 | return -EACCES; | 629 | return -EACCES; |
634 | iwmmxt_task_release(thread); /* force a reload */ | 630 | iwmmxt_task_release(thread); /* force a reload */ |
635 | /* The iWMMXt state is stored doubleword-aligned. */ | 631 | return copy_from_user(&thead->fpstate.iwmmxt, ufp, IWMMXT_SIZE) |
636 | if (((long) ptr) & 4) | 632 | ? -EFAULT : 0; |
637 | ptr += 4; | ||
638 | return copy_from_user(ptr, ufp, 0x98) ? -EFAULT : 0; | ||
639 | } | 633 | } |
640 | 634 | ||
641 | #endif | 635 | #endif |
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index d7d932c02866..d6bd435a6857 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -422,12 +422,14 @@ static int timer_dyn_tick_disable(void) | |||
422 | void timer_dyn_reprogram(void) | 422 | void timer_dyn_reprogram(void) |
423 | { | 423 | { |
424 | struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick; | 424 | struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick; |
425 | unsigned long next, seq; | ||
425 | 426 | ||
426 | if (dyn_tick) { | 427 | if (dyn_tick && (dyn_tick->state & DYN_TICK_ENABLED)) { |
427 | write_seqlock(&xtime_lock); | 428 | next = next_timer_interrupt(); |
428 | if (dyn_tick->state & DYN_TICK_ENABLED) | 429 | do { |
430 | seq = read_seqbegin(&xtime_lock); | ||
429 | dyn_tick->reprogram(next_timer_interrupt() - jiffies); | 431 | dyn_tick->reprogram(next_timer_interrupt() - jiffies); |
430 | write_sequnlock(&xtime_lock); | 432 | } while (read_seqretry(&xtime_lock, seq)); |
431 | } | 433 | } |
432 | } | 434 | } |
433 | 435 | ||