.. | .. |
---|
16 | 16 | #include <asm/vdso.h> |
---|
17 | 17 | #include <asm/switch_to.h> |
---|
18 | 18 | #include <asm/csr.h> |
---|
| 19 | +#include <asm/cacheflush.h> |
---|
19 | 20 | |
---|
20 | 21 | extern u32 __user_rt_sigreturn[2]; |
---|
21 | 22 | |
---|
.. | .. |
---|
178 | 179 | { |
---|
179 | 180 | struct rt_sigframe __user *frame; |
---|
180 | 181 | long err = 0; |
---|
| 182 | + unsigned long __maybe_unused addr; |
---|
181 | 183 | |
---|
182 | 184 | frame = get_sigframe(ksig, regs, sizeof(*frame)); |
---|
183 | 185 | if (!access_ok(frame, sizeof(*frame))) |
---|
.. | .. |
---|
206 | 208 | if (copy_to_user(&frame->sigreturn_code, __user_rt_sigreturn, |
---|
207 | 209 | sizeof(frame->sigreturn_code))) |
---|
208 | 210 | return -EFAULT; |
---|
209 | | - regs->ra = (unsigned long)&frame->sigreturn_code; |
---|
| 211 | + |
---|
| 212 | + addr = (unsigned long)&frame->sigreturn_code; |
---|
| 213 | + /* Make sure the two instructions are pushed to icache. */ |
---|
| 214 | + flush_icache_range(addr, addr + sizeof(frame->sigreturn_code)); |
---|
| 215 | + |
---|
| 216 | + regs->ra = addr; |
---|
210 | 217 | #endif /* CONFIG_MMU */ |
---|
211 | 218 | |
---|
212 | 219 | /* |
---|