X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-arm%2Fassembler.h;h=911393b2c6f000cc39bf84d73a7385883c105e5f;hb=4982d6b37a5ccebe6c2af79970c7a15c1939243a;hp=f31ac92b6c7f1c0f69dc90e861a0bad367ff6c5e;hpb=ac111bfaa6b0b3c0edc63c27bd9617d6b08851ff;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-arm/assembler.h b/include/asm-arm/assembler.h index f31ac92b6c7..911393b2c6f 100644 --- a/include/asm-arm/assembler.h +++ b/include/asm-arm/assembler.h @@ -55,29 +55,41 @@ #define PLD(code...) #endif -#define MODE_USR USR_MODE -#define MODE_FIQ FIQ_MODE -#define MODE_IRQ IRQ_MODE -#define MODE_SVC SVC_MODE - -#define DEFAULT_FIQ MODE_FIQ - /* - * LOADREGS - ldm with PC in register list (eg, ldmfd sp!, {pc}) + * This can be used to enable code to cacheline align the destination + * pointer when bulk writing to memory. Experiments on StrongARM and + * XScale didn't show this a worthwhile thing to do when the cache is not + * set to write-allocate (this would need further testing on XScale when WA + * is used). + * + * On Feroceon there is much to gain however, regardless of cache mode. */ -#ifdef __STDC__ -#define LOADREGS(cond, base, reglist...)\ - ldm##cond base,reglist +#ifdef CONFIG_CPU_FEROCEON +#define CALGN(code...) code #else -#define LOADREGS(cond, base, reglist...)\ - ldm/**/cond base,reglist +#define CALGN(code...) #endif /* - * Build a return instruction for this processor type. + * Enable and disable interrupts */ -#define RETINSTR(instr, regs...)\ - instr regs +#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 @@ -85,11 +97,7 @@ */ .macro save_and_disable_irqs, oldcpsr mrs \oldcpsr, cpsr -#if __LINUX_ARM_ARCH__ >= 6 - cpsid i -#else - msr cpsr_c, #PSR_I_BIT | MODE_SVC -#endif + disable_irq .endm /* @@ -100,18 +108,6 @@ msr cpsr_c, \oldcpsr .endm -/* - * These two are used to save LR/restore PC over a user-based access. - * The old 26-bit architecture requires that we do. On 32-bit - * architecture, we can safely ignore this requirement. - */ - .macro save_lr - .endm - - .macro restore_pc - mov pc, lr - .endm - #define USER(x...) \ 9999: x; \ .section __ex_table,"a"; \