diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2009-11-24 14:35:41 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-12-16 20:57:32 -0500 |
commit | 137f6f3e284e8215a940cf20dbf2aef449fe5a60 (patch) | |
tree | a8243dc24c2e00eb2d6b0c924b2dde3910912eb0 /arch/mips/kernel/traps.c | |
parent | 69f3a7de1f1ec935924b1b13f83812f8b30e92ce (diff) |
MIPS: Cleanup signal code initialization
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/709/
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r-- | arch/mips/kernel/traps.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 9fe21fb65305..308e43460864 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -1395,77 +1395,6 @@ void *set_vi_handler(int n, vi_handler_t addr) | |||
1395 | return set_vi_srs_handler(n, addr, 0); | 1395 | return set_vi_srs_handler(n, addr, 0); |
1396 | } | 1396 | } |
1397 | 1397 | ||
1398 | /* | ||
1399 | * This is used by native signal handling | ||
1400 | */ | ||
1401 | asmlinkage int (*save_fp_context)(struct sigcontext __user *sc); | ||
1402 | asmlinkage int (*restore_fp_context)(struct sigcontext __user *sc); | ||
1403 | |||
1404 | extern asmlinkage int _save_fp_context(struct sigcontext __user *sc); | ||
1405 | extern asmlinkage int _restore_fp_context(struct sigcontext __user *sc); | ||
1406 | |||
1407 | extern asmlinkage int fpu_emulator_save_context(struct sigcontext __user *sc); | ||
1408 | extern asmlinkage int fpu_emulator_restore_context(struct sigcontext __user *sc); | ||
1409 | |||
1410 | #ifdef CONFIG_SMP | ||
1411 | static int smp_save_fp_context(struct sigcontext __user *sc) | ||
1412 | { | ||
1413 | return raw_cpu_has_fpu | ||
1414 | ? _save_fp_context(sc) | ||
1415 | : fpu_emulator_save_context(sc); | ||
1416 | } | ||
1417 | |||
1418 | static int smp_restore_fp_context(struct sigcontext __user *sc) | ||
1419 | { | ||
1420 | return raw_cpu_has_fpu | ||
1421 | ? _restore_fp_context(sc) | ||
1422 | : fpu_emulator_restore_context(sc); | ||
1423 | } | ||
1424 | #endif | ||
1425 | |||
1426 | static inline void signal_init(void) | ||
1427 | { | ||
1428 | #ifdef CONFIG_SMP | ||
1429 | /* For now just do the cpu_has_fpu check when the functions are invoked */ | ||
1430 | save_fp_context = smp_save_fp_context; | ||
1431 | restore_fp_context = smp_restore_fp_context; | ||
1432 | #else | ||
1433 | if (cpu_has_fpu) { | ||
1434 | save_fp_context = _save_fp_context; | ||
1435 | restore_fp_context = _restore_fp_context; | ||
1436 | } else { | ||
1437 | save_fp_context = fpu_emulator_save_context; | ||
1438 | restore_fp_context = fpu_emulator_restore_context; | ||
1439 | } | ||
1440 | #endif | ||
1441 | } | ||
1442 | |||
1443 | #ifdef CONFIG_MIPS32_COMPAT | ||
1444 | |||
1445 | /* | ||
1446 | * This is used by 32-bit signal stuff on the 64-bit kernel | ||
1447 | */ | ||
1448 | asmlinkage int (*save_fp_context32)(struct sigcontext32 __user *sc); | ||
1449 | asmlinkage int (*restore_fp_context32)(struct sigcontext32 __user *sc); | ||
1450 | |||
1451 | extern asmlinkage int _save_fp_context32(struct sigcontext32 __user *sc); | ||
1452 | extern asmlinkage int _restore_fp_context32(struct sigcontext32 __user *sc); | ||
1453 | |||
1454 | extern asmlinkage int fpu_emulator_save_context32(struct sigcontext32 __user *sc); | ||
1455 | extern asmlinkage int fpu_emulator_restore_context32(struct sigcontext32 __user *sc); | ||
1456 | |||
1457 | static inline void signal32_init(void) | ||
1458 | { | ||
1459 | if (cpu_has_fpu) { | ||
1460 | save_fp_context32 = _save_fp_context32; | ||
1461 | restore_fp_context32 = _restore_fp_context32; | ||
1462 | } else { | ||
1463 | save_fp_context32 = fpu_emulator_save_context32; | ||
1464 | restore_fp_context32 = fpu_emulator_restore_context32; | ||
1465 | } | ||
1466 | } | ||
1467 | #endif | ||
1468 | |||
1469 | extern void cpu_cache_init(void); | 1398 | extern void cpu_cache_init(void); |
1470 | extern void tlb_init(void); | 1399 | extern void tlb_init(void); |
1471 | extern void flush_tlb_handlers(void); | 1400 | extern void flush_tlb_handlers(void); |
@@ -1779,11 +1708,6 @@ void __init trap_init(void) | |||
1779 | else | 1708 | else |
1780 | memcpy((void *)(ebase + 0x080), &except_vec3_generic, 0x80); | 1709 | memcpy((void *)(ebase + 0x080), &except_vec3_generic, 0x80); |
1781 | 1710 | ||
1782 | signal_init(); | ||
1783 | #ifdef CONFIG_MIPS32_COMPAT | ||
1784 | signal32_init(); | ||
1785 | #endif | ||
1786 | |||
1787 | local_flush_icache_range(ebase, ebase + 0x400); | 1711 | local_flush_icache_range(ebase, ebase + 0x400); |
1788 | flush_tlb_handlers(); | 1712 | flush_tlb_handlers(); |
1789 | 1713 | ||