Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King: "This fixes various issues found during July" * 'fixes' of git://git.linaro.org/people/rmk/linux-arm: ARM: 7479/1: mm: avoid NULL dereference when flushing gate_vma with VIVT caches ARM: Fix undefined instruction exception handling ARM: 7480/1: only call smp_send_stop() on SMP ARM: 7478/1: errata: extend workaround for erratum #720789 ARM: 7477/1: vfp: Always save VFP state in vfp_pm_suspend on UP ARM: 7476/1: vfp: only clear vfp state for current cpu in vfp_pm_suspend ARM: 7468/1: ftrace: Trace function entry before updating index ARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+ ARM: 7466/1: disable interrupt before spinning endlessly ARM: 7465/1: Handle >4GB memory sizes in device tree and mem=size@start option
This commit is contained in:
@@ -7,18 +7,20 @@
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Basic entry code, called from the kernel's undefined instruction trap.
|
||||
* r0 = faulted instruction
|
||||
* r5 = faulted PC+4
|
||||
* r9 = successful return
|
||||
* r10 = thread_info structure
|
||||
* lr = failure return
|
||||
*/
|
||||
#include <asm/thread_info.h>
|
||||
#include <asm/vfpmacros.h>
|
||||
#include "../kernel/entry-header.S"
|
||||
|
||||
@ VFP entry point.
|
||||
@
|
||||
@ r0 = instruction opcode (32-bit ARM or two 16-bit Thumb)
|
||||
@ r2 = PC value to resume execution after successful emulation
|
||||
@ r9 = normal "successful" return address
|
||||
@ r10 = this threads thread_info structure
|
||||
@ lr = unrecognised instruction return address
|
||||
@ IRQs disabled.
|
||||
@
|
||||
ENTRY(do_vfp)
|
||||
#ifdef CONFIG_PREEMPT
|
||||
ldr r4, [r10, #TI_PREEMPT] @ get preempt count
|
||||
|
@@ -62,13 +62,13 @@
|
||||
|
||||
@ VFP hardware support entry point.
|
||||
@
|
||||
@ r0 = faulted instruction
|
||||
@ r2 = faulted PC+4
|
||||
@ r9 = successful return
|
||||
@ r0 = instruction opcode (32-bit ARM or two 16-bit Thumb)
|
||||
@ r2 = PC value to resume execution after successful emulation
|
||||
@ r9 = normal "successful" return address
|
||||
@ r10 = vfp_state union
|
||||
@ r11 = CPU number
|
||||
@ lr = failure return
|
||||
|
||||
@ lr = unrecognised instruction return address
|
||||
@ IRQs enabled.
|
||||
ENTRY(vfp_support_entry)
|
||||
DBGSTR3 "instr %08x pc %08x state %p", r0, r2, r10
|
||||
|
||||
@@ -162,9 +162,12 @@ vfp_hw_state_valid:
|
||||
@ exception before retrying branch
|
||||
@ out before setting an FPEXC that
|
||||
@ stops us reading stuff
|
||||
VFPFMXR FPEXC, r1 @ restore FPEXC last
|
||||
sub r2, r2, #4
|
||||
str r2, [sp, #S_PC] @ retry the instruction
|
||||
VFPFMXR FPEXC, r1 @ Restore FPEXC last
|
||||
sub r2, r2, #4 @ Retry current instruction - if Thumb
|
||||
str r2, [sp, #S_PC] @ mode it's two 16-bit instructions,
|
||||
@ else it's one 32-bit instruction, so
|
||||
@ always subtract 4 from the following
|
||||
@ instruction address.
|
||||
#ifdef CONFIG_PREEMPT
|
||||
get_thread_info r10
|
||||
ldr r4, [r10, #TI_PREEMPT] @ get preempt count
|
||||
|
@@ -457,10 +457,16 @@ static int vfp_pm_suspend(void)
|
||||
|
||||
/* disable, just in case */
|
||||
fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
|
||||
} else if (vfp_current_hw_state[ti->cpu]) {
|
||||
#ifndef CONFIG_SMP
|
||||
fmxr(FPEXC, fpexc | FPEXC_EN);
|
||||
vfp_save_state(vfp_current_hw_state[ti->cpu], fpexc);
|
||||
fmxr(FPEXC, fpexc);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* clear any information we had about last context state */
|
||||
memset(vfp_current_hw_state, 0, sizeof(vfp_current_hw_state));
|
||||
vfp_current_hw_state[ti->cpu] = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user