Skip to content

Commit

Permalink
[ARM] Move enable_irq and disable_irq to assembler.h
Browse files Browse the repository at this point in the history
5d25ac0 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>
  • Loading branch information
Russell King authored and Russell King committed Mar 23, 2006
1 parent 7d42089 commit 9c42954
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
18 changes: 0 additions & 18 deletions arch/arm/kernel/entry-header.S
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,6 @@
#endif
.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
mov \rd, sp, lsr #13
mov \rd, \rd, lsl #13
Expand Down
1 change: 1 addition & 0 deletions arch/arm/vfp/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/linkage.h>
#include <linux/init.h>
#include <asm/asm-offsets.h>
#include <asm/assembler.h>
#include <asm/vfpmacros.h>

.globl do_vfp
Expand Down
27 changes: 22 additions & 5 deletions include/asm-arm/assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,33 @@
instr regs

/*
* Save the current IRQ state and disable IRQs. Note that this macro
* assumes FIQs are enabled, and that the processor is in SVC mode.
* Enable and disable interrupts
*/
.macro save_and_disable_irqs, oldcpsr
mrs \oldcpsr, cpsr
#if __LINUX_ARM_ARCH__ >= 6
.macro disable_irq
cpsid i
.endm

.macro enable_irq
cpsie i
.endm
#else
msr cpsr_c, #PSR_I_BIT | MODE_SVC
.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
* assumes FIQs are enabled, and that the processor is in SVC mode.
*/
.macro save_and_disable_irqs, oldcpsr
mrs \oldcpsr, cpsr
disable_irq
.endm

/*
Expand Down

0 comments on commit 9c42954

Please sign in to comment.