~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mips/kernel/signal.c

Version: ~ [ linux-5.6-rc3 ] ~ [ linux-5.5.6 ] ~ [ linux-5.4.22 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.106 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.171 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.214 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.214 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.82 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * This file is subject to the terms and conditions of the GNU General Public
  3  * License.  See the file "COPYING" in the main directory of this archive
  4  * for more details.
  5  *
  6  * Copyright (C) 1991, 1992  Linus Torvalds
  7  * Copyright (C) 1994 - 2000  Ralf Baechle
  8  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
  9  */
 10 #include <linux/cache.h>
 11 #include <linux/irqflags.h>
 12 #include <linux/sched.h>
 13 #include <linux/mm.h>
 14 #include <linux/personality.h>
 15 #include <linux/smp.h>
 16 #include <linux/kernel.h>
 17 #include <linux/signal.h>
 18 #include <linux/errno.h>
 19 #include <linux/wait.h>
 20 #include <linux/ptrace.h>
 21 #include <linux/unistd.h>
 22 #include <linux/compiler.h>
 23 #include <linux/syscalls.h>
 24 #include <linux/uaccess.h>
 25 #include <linux/tracehook.h>
 26 
 27 #include <asm/abi.h>
 28 #include <asm/asm.h>
 29 #include <linux/bitops.h>
 30 #include <asm/cacheflush.h>
 31 #include <asm/fpu.h>
 32 #include <asm/sim.h>
 33 #include <asm/ucontext.h>
 34 #include <asm/cpu-features.h>
 35 #include <asm/war.h>
 36 #include <asm/vdso.h>
 37 #include <asm/dsp.h>
 38 
 39 #include "signal-common.h"
 40 
 41 static int (*save_fp_context)(struct sigcontext __user *sc);
 42 static int (*restore_fp_context)(struct sigcontext __user *sc);
 43 
 44 extern asmlinkage int _save_fp_context(struct sigcontext __user *sc);
 45 extern asmlinkage int _restore_fp_context(struct sigcontext __user *sc);
 46 
 47 extern asmlinkage int fpu_emulator_save_context(struct sigcontext __user *sc);
 48 extern asmlinkage int fpu_emulator_restore_context(struct sigcontext __user *sc);
 49 
 50 struct sigframe {
 51         u32 sf_ass[4];          /* argument save space for o32 */
 52         u32 sf_pad[2];          /* Was: signal trampoline */
 53         struct sigcontext sf_sc;
 54         sigset_t sf_mask;
 55 };
 56 
 57 struct rt_sigframe {
 58         u32 rs_ass[4];          /* argument save space for o32 */
 59         u32 rs_pad[2];          /* Was: signal trampoline */
 60         struct siginfo rs_info;
 61         struct ucontext rs_uc;
 62 };
 63 
 64 /*
 65  * Helper routines
 66  */
 67 static int protected_save_fp_context(struct sigcontext __user *sc)
 68 {
 69         int err;
 70         while (1) {
 71                 lock_fpu_owner();
 72                 own_fpu_inatomic(1);
 73                 err = save_fp_context(sc); /* this might fail */
 74                 unlock_fpu_owner();
 75                 if (likely(!err))
 76                         break;
 77                 /* touch the sigcontext and try again */
 78                 err = __put_user(0, &sc->sc_fpregs[0]) |
 79                         __put_user(0, &sc->sc_fpregs[31]) |
 80                         __put_user(0, &sc->sc_fpc_csr);
 81                 if (err)
 82                         break;  /* really bad sigcontext */
 83         }
 84         return err;
 85 }
 86 
 87 static int protected_restore_fp_context(struct sigcontext __user *sc)
 88 {
 89         int err, tmp __maybe_unused;
 90         while (1) {
 91                 lock_fpu_owner();
 92                 own_fpu_inatomic(0);
 93                 err = restore_fp_context(sc); /* this might fail */
 94                 unlock_fpu_owner();
 95                 if (likely(!err))
 96                         break;
 97                 /* touch the sigcontext and try again */
 98                 err = __get_user(tmp, &sc->sc_fpregs[0]) |
 99                         __get_user(tmp, &sc->sc_fpregs[31]) |
100                         __get_user(tmp, &sc->sc_fpc_csr);
101                 if (err)
102                         break;  /* really bad sigcontext */
103         }
104         return err;
105 }
106 
107 int setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
108 {
109         int err = 0;
110         int i;
111         unsigned int used_math;
112 
113         err |= __put_user(regs->cp0_epc, &sc->sc_pc);
114 
115         err |= __put_user(0, &sc->sc_regs[0]);
116         for (i = 1; i < 32; i++)
117                 err |= __put_user(regs->regs[i], &sc->sc_regs[i]);
118 
119 #ifdef CONFIG_CPU_HAS_SMARTMIPS
120         err |= __put_user(regs->acx, &sc->sc_acx);
121 #endif
122         err |= __put_user(regs->hi, &sc->sc_mdhi);
123         err |= __put_user(regs->lo, &sc->sc_mdlo);
124         if (cpu_has_dsp) {
125                 err |= __put_user(mfhi1(), &sc->sc_hi1);
126                 err |= __put_user(mflo1(), &sc->sc_lo1);
127                 err |= __put_user(mfhi2(), &sc->sc_hi2);
128                 err |= __put_user(mflo2(), &sc->sc_lo2);
129                 err |= __put_user(mfhi3(), &sc->sc_hi3);
130                 err |= __put_user(mflo3(), &sc->sc_lo3);
131                 err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp);
132         }
133 
134         used_math = !!used_math();
135         err |= __put_user(used_math, &sc->sc_used_math);
136 
137         if (used_math) {
138                 /*
139                  * Save FPU state to signal context. Signal handler
140                  * will "inherit" current FPU state.
141                  */
142                 err |= protected_save_fp_context(sc);
143         }
144         return err;
145 }
146 
147 int fpcsr_pending(unsigned int __user *fpcsr)
148 {
149         int err, sig = 0;
150         unsigned int csr, enabled;
151 
152         err = __get_user(csr, fpcsr);
153         enabled = FPU_CSR_UNI_X | ((csr & FPU_CSR_ALL_E) << 5);
154         /*
155          * If the signal handler set some FPU exceptions, clear it and
156          * send SIGFPE.
157          */
158         if (csr & enabled) {
159                 csr &= ~enabled;
160                 err |= __put_user(csr, fpcsr);
161                 sig = SIGFPE;
162         }
163         return err ?: sig;
164 }
165 
166 static int
167 check_and_restore_fp_context(struct sigcontext __user *sc)
168 {
169         int err, sig;
170 
171         err = sig = fpcsr_pending(&sc->sc_fpc_csr);
172         if (err > 0)
173                 err = 0;
174         err |= protected_restore_fp_context(sc);
175         return err ?: sig;
176 }
177 
178 int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
179 {
180         unsigned int used_math;
181         unsigned long treg;
182         int err = 0;
183         int i;
184 
185         /* Always make any pending restarted system calls return -EINTR */
186         current_thread_info()->restart_block.fn = do_no_restart_syscall;
187 
188         err |= __get_user(regs->cp0_epc, &sc->sc_pc);
189 
190 #ifdef CONFIG_CPU_HAS_SMARTMIPS
191         err |= __get_user(regs->acx, &sc->sc_acx);
192 #endif
193         err |= __get_user(regs->hi, &sc->sc_mdhi);
194         err |= __get_user(regs->lo, &sc->sc_mdlo);
195         if (cpu_has_dsp) {
196                 err |= __get_user(treg, &sc->sc_hi1); mthi1(treg);
197                 err |= __get_user(treg, &sc->sc_lo1); mtlo1(treg);
198                 err |= __get_user(treg, &sc->sc_hi2); mthi2(treg);
199                 err |= __get_user(treg, &sc->sc_lo2); mtlo2(treg);
200                 err |= __get_user(treg, &sc->sc_hi3); mthi3(treg);
201                 err |= __get_user(treg, &sc->sc_lo3); mtlo3(treg);
202                 err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK);
203         }
204 
205         for (i = 1; i < 32; i++)
206                 err |= __get_user(regs->regs[i], &sc->sc_regs[i]);
207 
208         err |= __get_user(used_math, &sc->sc_used_math);
209         conditional_used_math(used_math);
210 
211         if (used_math) {
212                 /* restore fpu context if we have used it before */
213                 if (!err)
214                         err = check_and_restore_fp_context(sc);
215         } else {
216                 /* signal handler may have used FPU.  Give it up. */
217                 lose_fpu(0);
218         }
219 
220         return err;
221 }
222 
223 void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
224                           size_t frame_size)
225 {
226         unsigned long sp;
227 
228         /* Default to using normal stack */
229         sp = regs->regs[29];
230 
231         /*
232          * FPU emulator may have it's own trampoline active just
233          * above the user stack, 16-bytes before the next lowest
234          * 16 byte boundary.  Try to avoid trashing it.
235          */
236         sp -= 32;
237 
238         /* This is the X/Open sanctioned signal stack switching.  */
239         if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags (sp) == 0))
240                 sp = current->sas_ss_sp + current->sas_ss_size;
241 
242         return (void __user *)((sp - frame_size) & (ICACHE_REFILLS_WORKAROUND_WAR ? ~(cpu_icache_line_size()-1) : ALMASK));
243 }
244 
245 /*
246  * Atomically swap in the new signal mask, and wait for a signal.
247  */
248 
249 #ifdef CONFIG_TRAD_SIGNALS
250 SYSCALL_DEFINE1(sigsuspend, sigset_t __user *, uset)
251 {
252         return sys_rt_sigsuspend(uset, sizeof(sigset_t));
253 }
254 #endif
255 
256 #ifdef CONFIG_TRAD_SIGNALS
257 SYSCALL_DEFINE3(sigaction, int, sig, const struct sigaction __user *, act,
258         struct sigaction __user *, oact)
259 {
260         struct k_sigaction new_ka, old_ka;
261         int ret;
262         int err = 0;
263 
264         if (act) {
265                 old_sigset_t mask;
266 
267                 if (!access_ok(VERIFY_READ, act, sizeof(*act)))
268                         return -EFAULT;
269                 err |= __get_user(new_ka.sa.sa_handler, &act->sa_handler);
270                 err |= __get_user(new_ka.sa.sa_flags, &act->sa_flags);
271                 err |= __get_user(mask, &act->sa_mask.sig[0]);
272                 if (err)
273                         return -EFAULT;
274 
275                 siginitset(&new_ka.sa.sa_mask, mask);
276         }
277 
278         ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
279 
280         if (!ret && oact) {
281                 if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)))
282                         return -EFAULT;
283                 err |= __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
284                 err |= __put_user(old_ka.sa.sa_handler, &oact->sa_handler);
285                 err |= __put_user(old_ka.sa.sa_mask.sig[0], oact->sa_mask.sig);
286                 err |= __put_user(0, &oact->sa_mask.sig[1]);
287                 err |= __put_user(0, &oact->sa_mask.sig[2]);
288                 err |= __put_user(0, &oact->sa_mask.sig[3]);
289                 if (err)
290                         return -EFAULT;
291         }
292 
293         return ret;
294 }
295 #endif
296 
297 #ifdef CONFIG_TRAD_SIGNALS
298 asmlinkage void sys_sigreturn(nabi_no_regargs struct pt_regs regs)
299 {
300         struct sigframe __user *frame;
301         sigset_t blocked;
302         int sig;
303 
304         frame = (struct sigframe __user *) regs.regs[29];
305         if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
306                 goto badframe;
307         if (__copy_from_user(&blocked, &frame->sf_mask, sizeof(blocked)))
308                 goto badframe;
309 
310         set_current_blocked(&blocked);
311 
312         sig = restore_sigcontext(&regs, &frame->sf_sc);
313         if (sig < 0)
314                 goto badframe;
315         else if (sig)
316                 force_sig(sig, current);
317 
318         /*
319          * Don't let your children do this ...
320          */
321         __asm__ __volatile__(
322                 "move\t$29, %0\n\t"
323                 "j\tsyscall_exit"
324                 :/* no outputs */
325                 :"r" (&regs));
326         /* Unreached */
327 
328 badframe:
329         force_sig(SIGSEGV, current);
330 }
331 #endif /* CONFIG_TRAD_SIGNALS */
332 
333 asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
334 {
335         struct rt_sigframe __user *frame;
336         sigset_t set;
337         int sig;
338 
339         frame = (struct rt_sigframe __user *) regs.regs[29];
340         if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
341                 goto badframe;
342         if (__copy_from_user(&set, &frame->rs_uc.uc_sigmask, sizeof(set)))
343                 goto badframe;
344 
345         set_current_blocked(&set);
346 
347         sig = restore_sigcontext(&regs, &frame->rs_uc.uc_mcontext);
348         if (sig < 0)
349                 goto badframe;
350         else if (sig)
351                 force_sig(sig, current);
352 
353         if (restore_altstack(&frame->rs_uc.uc_stack))
354                 goto badframe;
355 
356         /*
357          * Don't let your children do this ...
358          */
359         __asm__ __volatile__(
360                 "move\t$29, %0\n\t"
361                 "j\tsyscall_exit"
362                 :/* no outputs */
363                 :"r" (&regs));
364         /* Unreached */
365 
366 badframe:
367         force_sig(SIGSEGV, current);
368 }
369 
370 #ifdef CONFIG_TRAD_SIGNALS
371 static int setup_frame(void *sig_return, struct k_sigaction *ka,
372                        struct pt_regs *regs, int signr, sigset_t *set)
373 {
374         struct sigframe __user *frame;
375         int err = 0;
376 
377         frame = get_sigframe(ka, regs, sizeof(*frame));
378         if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))
379                 goto give_sigsegv;
380 
381         err |= setup_sigcontext(regs, &frame->sf_sc);
382         err |= __copy_to_user(&frame->sf_mask, set, sizeof(*set));
383         if (err)
384                 goto give_sigsegv;
385 
386         /*
387          * Arguments to signal handler:
388          *
389          *   a0 = signal number
390          *   a1 = 0 (should be cause)
391          *   a2 = pointer to struct sigcontext
392          *
393          * $25 and c0_epc point to the signal handler, $29 points to the
394          * struct sigframe.
395          */
396         regs->regs[ 4] = signr;
397         regs->regs[ 5] = 0;
398         regs->regs[ 6] = (unsigned long) &frame->sf_sc;
399         regs->regs[29] = (unsigned long) frame;
400         regs->regs[31] = (unsigned long) sig_return;
401         regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler;
402 
403         DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n",
404                current->comm, current->pid,
405                frame, regs->cp0_epc, regs->regs[31]);
406         return 0;
407 
408 give_sigsegv:
409         force_sigsegv(signr, current);
410         return -EFAULT;
411 }
412 #endif
413 
414 static int setup_rt_frame(void *sig_return, struct k_sigaction *ka,
415                           struct pt_regs *regs, int signr, sigset_t *set,
416                           siginfo_t *info)
417 {
418         struct rt_sigframe __user *frame;
419         int err = 0;
420 
421         frame = get_sigframe(ka, regs, sizeof(*frame));
422         if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))
423                 goto give_sigsegv;
424 
425         /* Create siginfo.  */
426         err |= copy_siginfo_to_user(&frame->rs_info, info);
427 
428         /* Create the ucontext.  */
429         err |= __put_user(0, &frame->rs_uc.uc_flags);
430         err |= __put_user(NULL, &frame->rs_uc.uc_link);
431         err |= __save_altstack(&frame->rs_uc.uc_stack, regs->regs[29]);
432         err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext);
433         err |= __copy_to_user(&frame->rs_uc.uc_sigmask, set, sizeof(*set));
434 
435         if (err)
436                 goto give_sigsegv;
437 
438         /*
439          * Arguments to signal handler:
440          *
441          *   a0 = signal number
442          *   a1 = 0 (should be cause)
443          *   a2 = pointer to ucontext
444          *
445          * $25 and c0_epc point to the signal handler, $29 points to
446          * the struct rt_sigframe.
447          */
448         regs->regs[ 4] = signr;
449         regs->regs[ 5] = (unsigned long) &frame->rs_info;
450         regs->regs[ 6] = (unsigned long) &frame->rs_uc;
451         regs->regs[29] = (unsigned long) frame;
452         regs->regs[31] = (unsigned long) sig_return;
453         regs->cp0_epc = regs->regs[25] = (unsigned long) ka->sa.sa_handler;
454 
455         DEBUGP("SIG deliver (%s:%d): sp=0x%p pc=0x%lx ra=0x%lx\n",
456                current->comm, current->pid,
457                frame, regs->cp0_epc, regs->regs[31]);
458 
459         return 0;
460 
461 give_sigsegv:
462         force_sigsegv(signr, current);
463         return -EFAULT;
464 }
465 
466 struct mips_abi mips_abi = {
467 #ifdef CONFIG_TRAD_SIGNALS
468         .setup_frame    = setup_frame,
469         .signal_return_offset = offsetof(struct mips_vdso, signal_trampoline),
470 #endif
471         .setup_rt_frame = setup_rt_frame,
472         .rt_signal_return_offset =
473                 offsetof(struct mips_vdso, rt_signal_trampoline),
474         .restart        = __NR_restart_syscall
475 };
476 
477 static void handle_signal(unsigned long sig, siginfo_t *info,
478         struct k_sigaction *ka, struct pt_regs *regs)
479 {
480         sigset_t *oldset = sigmask_to_save();
481         int ret;
482         struct mips_abi *abi = current->thread.abi;
483         void *vdso = current->mm->context.vdso;
484 
485         if (regs->regs[0]) {
486                 switch(regs->regs[2]) {
487                 case ERESTART_RESTARTBLOCK:
488                 case ERESTARTNOHAND:
489                         regs->regs[2] = EINTR;
490                         break;
491                 case ERESTARTSYS:
492                         if (!(ka->sa.sa_flags & SA_RESTART)) {
493                                 regs->regs[2] = EINTR;
494                                 break;
495                         }
496                 /* fallthrough */
497                 case ERESTARTNOINTR:
498                         regs->regs[7] = regs->regs[26];
499                         regs->regs[2] = regs->regs[0];
500                         regs->cp0_epc -= 4;
501                 }
502 
503                 regs->regs[0] = 0;              /* Don't deal with this again.  */
504         }
505 
506         if (sig_uses_siginfo(ka))
507                 ret = abi->setup_rt_frame(vdso + abi->rt_signal_return_offset,
508                                           ka, regs, sig, oldset, info);
509         else
510                 ret = abi->setup_frame(vdso + abi->signal_return_offset,
511                                        ka, regs, sig, oldset);
512 
513         if (ret)
514                 return;
515 
516         signal_delivered(sig, info, ka, regs, 0);
517 }
518 
519 static void do_signal(struct pt_regs *regs)
520 {
521         struct k_sigaction ka;
522         siginfo_t info;
523         int signr;
524 
525         signr = get_signal_to_deliver(&info, &ka, regs, NULL);
526         if (signr > 0) {
527                 /* Whee!  Actually deliver the signal.  */
528                 handle_signal(signr, &info, &ka, regs);
529                 return;
530         }
531 
532         if (regs->regs[0]) {
533                 switch (regs->regs[2]) {
534                 case ERESTARTNOHAND:
535                 case ERESTARTSYS:
536                 case ERESTARTNOINTR:
537                         regs->regs[2] = regs->regs[0];
538                         regs->regs[7] = regs->regs[26];
539                         regs->cp0_epc -= 4;
540                         break;
541 
542                 case ERESTART_RESTARTBLOCK:
543                         regs->regs[2] = current->thread.abi->restart;
544                         regs->regs[7] = regs->regs[26];
545                         regs->cp0_epc -= 4;
546                         break;
547                 }
548                 regs->regs[0] = 0;      /* Don't deal with this again.  */
549         }
550 
551         /*
552          * If there's no signal to deliver, we just put the saved sigmask
553          * back
554          */
555         restore_saved_sigmask();
556 }
557 
558 /*
559  * notification of userspace execution resumption
560  * - triggered by the TIF_WORK_MASK flags
561  */
562 asmlinkage void do_notify_resume(struct pt_regs *regs, void *unused,
563         __u32 thread_info_flags)
564 {
565         local_irq_enable();
566 
567         /* deal with pending signal delivery */
568         if (thread_info_flags & _TIF_SIGPENDING)
569                 do_signal(regs);
570 
571         if (thread_info_flags & _TIF_NOTIFY_RESUME) {
572                 clear_thread_flag(TIF_NOTIFY_RESUME);
573                 tracehook_notify_resume(regs);
574         }
575 }
576 
577 #ifdef CONFIG_SMP
578 static int smp_save_fp_context(struct sigcontext __user *sc)
579 {
580         return raw_cpu_has_fpu
581                ? _save_fp_context(sc)
582                : fpu_emulator_save_context(sc);
583 }
584 
585 static int smp_restore_fp_context(struct sigcontext __user *sc)
586 {
587         return raw_cpu_has_fpu
588                ? _restore_fp_context(sc)
589                : fpu_emulator_restore_context(sc);
590 }
591 #endif
592 
593 static int signal_setup(void)
594 {
595 #ifdef CONFIG_SMP
596         /* For now just do the cpu_has_fpu check when the functions are invoked */
597         save_fp_context = smp_save_fp_context;
598         restore_fp_context = smp_restore_fp_context;
599 #else
600         if (cpu_has_fpu) {
601                 save_fp_context = _save_fp_context;
602                 restore_fp_context = _restore_fp_context;
603         } else {
604                 save_fp_context = fpu_emulator_save_context;
605                 restore_fp_context = fpu_emulator_restore_context;
606         }
607 #endif
608 
609         return 0;
610 }
611 
612 arch_initcall(signal_setup);
613 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp