X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-arm%2Fassembler.h;h=add451ab89473948804619434181e9b216cdef6c;hb=1b93a71755f2b15450b3e3045dab58a633e37b18;hp=69a28f96bee2ee14994a11d9fba1516306496534;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=linux-2.6 diff --git a/include/asm-arm/assembler.h b/include/asm-arm/assembler.h index 69a28f96be..add451ab89 100644 --- a/include/asm-arm/assembler.h +++ b/include/asm-arm/assembler.h @@ -63,30 +63,33 @@ #define DEFAULT_FIQ MODE_FIQ /* - * LOADREGS - ldm with PC in register list (eg, ldmfd sp!, {pc}) + * Enable and disable interrupts */ -#ifdef __STDC__ -#define LOADREGS(cond, base, reglist...)\ - ldm##cond base,reglist +#if __LINUX_ARM_ARCH__ >= 6 + .macro disable_irq + cpsid i + .endm + + .macro enable_irq + cpsie i + .endm #else -#define LOADREGS(cond, base, reglist...)\ - ldm/**/cond base,reglist -#endif + .macro disable_irq + msr cpsr_c, #PSR_I_BIT | SVC_MODE + .endm -/* - * Build a return instruction for this processor type. - */ -#define RETINSTR(instr, regs...)\ - instr regs + .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, temp + .macro save_and_disable_irqs, oldcpsr mrs \oldcpsr, cpsr - mov \temp, #PSR_I_BIT | MODE_SVC - msr cpsr_c, \temp + disable_irq .endm /*