[ARM] Move enable_irq and disable_irq to assembler.h
5d25ac038a
broke VFP builds due to
enable_irq not being defined as an assembly macro. Move it to
assembler.h so everyone can use it.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
committed by
Russell King
parent
7d42089625
commit
9c42954dfd
@@ -37,24 +37,6 @@
|
|||||||
#endif
|
#endif
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
#if __LINUX_ARM_ARCH__ >= 6
|
|
||||||
.macro disable_irq
|
|
||||||
cpsid i
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro enable_irq
|
|
||||||
cpsie i
|
|
||||||
.endm
|
|
||||||
#else
|
|
||||||
.macro disable_irq
|
|
||||||
msr cpsr_c, #PSR_I_BIT | SVC_MODE
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro enable_irq
|
|
||||||
msr cpsr_c, #SVC_MODE
|
|
||||||
.endm
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.macro get_thread_info, rd
|
.macro get_thread_info, rd
|
||||||
mov \rd, sp, lsr #13
|
mov \rd, sp, lsr #13
|
||||||
mov \rd, \rd, lsl #13
|
mov \rd, \rd, lsl #13
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <asm/asm-offsets.h>
|
#include <asm/asm-offsets.h>
|
||||||
|
#include <asm/assembler.h>
|
||||||
#include <asm/vfpmacros.h>
|
#include <asm/vfpmacros.h>
|
||||||
|
|
||||||
.globl do_vfp
|
.globl do_vfp
|
||||||
|
@@ -79,17 +79,34 @@
|
|||||||
#define RETINSTR(instr, regs...)\
|
#define RETINSTR(instr, regs...)\
|
||||||
instr regs
|
instr regs
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enable and disable interrupts
|
||||||
|
*/
|
||||||
|
#if __LINUX_ARM_ARCH__ >= 6
|
||||||
|
.macro disable_irq
|
||||||
|
cpsid i
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro enable_irq
|
||||||
|
cpsie i
|
||||||
|
.endm
|
||||||
|
#else
|
||||||
|
.macro disable_irq
|
||||||
|
msr cpsr_c, #PSR_I_BIT | SVC_MODE
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro enable_irq
|
||||||
|
msr cpsr_c, #SVC_MODE
|
||||||
|
.endm
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Save the current IRQ state and disable IRQs. Note that this macro
|
* Save the current IRQ state and disable IRQs. Note that this macro
|
||||||
* assumes FIQs are enabled, and that the processor is in SVC mode.
|
* assumes FIQs are enabled, and that the processor is in SVC mode.
|
||||||
*/
|
*/
|
||||||
.macro save_and_disable_irqs, oldcpsr
|
.macro save_and_disable_irqs, oldcpsr
|
||||||
mrs \oldcpsr, cpsr
|
mrs \oldcpsr, cpsr
|
||||||
#if __LINUX_ARM_ARCH__ >= 6
|
disable_irq
|
||||||
cpsid i
|
|
||||||
#else
|
|
||||||
msr cpsr_c, #PSR_I_BIT | MODE_SVC
|
|
||||||
#endif
|
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user