2 * linux/arch/arm/kernel/fiqasm.S
4 * Derived from code originally in linux/arch/arm/kernel/fiq.c:
6 * Copyright (C) 1998 Russell King
7 * Copyright (C) 1998, 1999 Phil Blundell
8 * Copyright (C) 2011, Linaro Limited
10 * FIQ support written by Philip Blundell <philb@gnu.org>, 1998.
12 * FIQ support re-written by Russell King to be more generic
14 * v7/Thumb-2 compatibility modifications by Linaro Limited, 2011.
17 #include <linux/linkage.h>
18 #include <asm/assembler.h>
21 * Taking an interrupt in FIQ mode is death, so both these functions
22 * disable irqs for the duration.
26 mov r2, #PSR_I_BIT | PSR_F_BIT | FIQ_MODE
28 msr cpsr_c, r2 @ select FIQ mode
29 mov r0, r0 @ avoid hazard prior to ARMv4
33 msr cpsr_c, r1 @ return to SVC mode
34 mov r0, r0 @ avoid hazard prior to ARMv4
36 ENDPROC(__set_fiq_regs)
39 mov r2, #PSR_I_BIT | PSR_F_BIT | FIQ_MODE
41 msr cpsr_c, r2 @ select FIQ mode
42 mov r0, r0 @ avoid hazard prior to ARMv4
46 msr cpsr_c, r1 @ return to SVC mode
47 mov r0, r0 @ avoid hazard prior to ARMv4
49 ENDPROC(__get_fiq_regs)