aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorDave Martin <dave.martin@linaro.org>2011-05-23 07:22:10 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-05-26 05:31:06 -0400
commitdc2eb928a1bcf6a48f40c1f2ff21b66bdbf91a3c (patch)
tree3f877569ca481ad79378ed0e5932006434a1cc1e /arch/arm/include
parent4db70f73e56961b9bcdfd0c36c62847a18b7dbb5 (diff)
ARM: 6938/1: fiq: Refactor {get,set}_fiq_regs() for Thumb-2
* To remove the risk of inconvenient register allocation decisions by the compiler, these functions are separated out as pure assembler. * The apcs frame manipulation code is not applicable for Thumb-2 (and also not easily compatible). Since it's not essential to have a full frame on these leaf assembler functions, the frame manipulation is removed, in the interests of simplicity. * Split up ldm/stm instructions to be compatible with Thumb-2, as well as avoiding instruction forms deprecated on >= ARMv7. Signed-off-by: Dave Martin <dave.martin@linaro.org> Reviewed-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/fiq.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/arm/include/asm/fiq.h b/arch/arm/include/asm/fiq.h
index 2242ce22ec6c..45bb3eeeab7c 100644
--- a/arch/arm/include/asm/fiq.h
+++ b/arch/arm/include/asm/fiq.h
@@ -29,9 +29,21 @@ struct fiq_handler {
29extern int claim_fiq(struct fiq_handler *f); 29extern int claim_fiq(struct fiq_handler *f);
30extern void release_fiq(struct fiq_handler *f); 30extern void release_fiq(struct fiq_handler *f);
31extern void set_fiq_handler(void *start, unsigned int length); 31extern void set_fiq_handler(void *start, unsigned int length);
32extern void set_fiq_regs(struct pt_regs *regs);
33extern void get_fiq_regs(struct pt_regs *regs);
34extern void enable_fiq(int fiq); 32extern void enable_fiq(int fiq);
35extern void disable_fiq(int fiq); 33extern void disable_fiq(int fiq);
36 34
35/* helpers defined in fiqasm.S: */
36extern void __set_fiq_regs(unsigned long const *regs);
37extern void __get_fiq_regs(unsigned long *regs);
38
39static inline void set_fiq_regs(struct pt_regs const *regs)
40{
41 __set_fiq_regs(&regs->ARM_r8);
42}
43
44static inline void get_fiq_regs(struct pt_regs *regs)
45{
46 __get_fiq_regs(&regs->ARM_r8);
47}
48
37#endif 49#endif