aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/fiq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/fiq.c')
-rw-r--r--arch/arm/kernel/fiq.c45
1 files changed, 2 insertions, 43 deletions
diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c
index e72dc34eea1c..4c164ece5891 100644
--- a/arch/arm/kernel/fiq.c
+++ b/arch/arm/kernel/fiq.c
@@ -89,47 +89,6 @@ void set_fiq_handler(void *start, unsigned int length)
89 flush_icache_range(0x1c, 0x1c + length); 89 flush_icache_range(0x1c, 0x1c + length);
90} 90}
91 91
92/*
93 * Taking an interrupt in FIQ mode is death, so both these functions
94 * disable irqs for the duration. Note - these functions are almost
95 * entirely coded in assembly.
96 */
97void __naked set_fiq_regs(struct pt_regs *regs)
98{
99 register unsigned long tmp;
100 asm volatile (
101 "mov ip, sp\n\
102 stmfd sp!, {fp, ip, lr, pc}\n\
103 sub fp, ip, #4\n\
104 mrs %0, cpsr\n\
105 msr cpsr_c, %2 @ select FIQ mode\n\
106 mov r0, r0\n\
107 ldmia %1, {r8 - r14}\n\
108 msr cpsr_c, %0 @ return to SVC mode\n\
109 mov r0, r0\n\
110 ldmfd sp, {fp, sp, pc}"
111 : "=&r" (tmp)
112 : "r" (&regs->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE));
113}
114
115void __naked get_fiq_regs(struct pt_regs *regs)
116{
117 register unsigned long tmp;
118 asm volatile (
119 "mov ip, sp\n\
120 stmfd sp!, {fp, ip, lr, pc}\n\
121 sub fp, ip, #4\n\
122 mrs %0, cpsr\n\
123 msr cpsr_c, %2 @ select FIQ mode\n\
124 mov r0, r0\n\
125 stmia %1, {r8 - r14}\n\
126 msr cpsr_c, %0 @ return to SVC mode\n\
127 mov r0, r0\n\
128 ldmfd sp, {fp, sp, pc}"
129 : "=&r" (tmp)
130 : "r" (&regs->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE));
131}
132
133int claim_fiq(struct fiq_handler *f) 92int claim_fiq(struct fiq_handler *f)
134{ 93{
135 int ret = 0; 94 int ret = 0;
@@ -174,8 +133,8 @@ void disable_fiq(int fiq)
174} 133}
175 134
176EXPORT_SYMBOL(set_fiq_handler); 135EXPORT_SYMBOL(set_fiq_handler);
177EXPORT_SYMBOL(set_fiq_regs); 136EXPORT_SYMBOL(__set_fiq_regs); /* defined in fiqasm.S */
178EXPORT_SYMBOL(get_fiq_regs); 137EXPORT_SYMBOL(__get_fiq_regs); /* defined in fiqasm.S */
179EXPORT_SYMBOL(claim_fiq); 138EXPORT_SYMBOL(claim_fiq);
180EXPORT_SYMBOL(release_fiq); 139EXPORT_SYMBOL(release_fiq);
181EXPORT_SYMBOL(enable_fiq); 140EXPORT_SYMBOL(enable_fiq);