diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2005-08-19 00:52:31 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-08-28 20:53:33 -0400 |
commit | 0ab20002f4b41f4b1799bad5948389da1c4c8444 (patch) | |
tree | 631d3f533f47bfbc18be3a18233d9c1ad11d7870 /arch/ppc64/kernel/head.S | |
parent | c59c464a3e29830bcfae5eea1777cad9e00087f3 (diff) |
[PATCH] Remove general use functions from head.S
As well as the interrupt vectors and initialization code, head.S
contains several asm functions which are used during runtime. This
patch moves these to misc.S, a more sensible location for random asm
support code. A couple The functions moved are:
disable_kernel_fp
giveup_fpu
disable_kernel_altivec
giveup_altivec
__setup_cpu_power3 (empty function)
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/kernel/head.S')
-rw-r--r-- | arch/ppc64/kernel/head.S | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S index 7de38ebbe973..70e10403b697 100644 --- a/arch/ppc64/kernel/head.S +++ b/arch/ppc64/kernel/head.S | |||
@@ -1542,98 +1542,6 @@ _GLOBAL(copy_and_flush) | |||
1542 | .align 8 | 1542 | .align 8 |
1543 | copy_to_here: | 1543 | copy_to_here: |
1544 | 1544 | ||
1545 | /* | ||
1546 | * disable_kernel_fp() | ||
1547 | * Disable the FPU. | ||
1548 | */ | ||
1549 | _GLOBAL(disable_kernel_fp) | ||
1550 | mfmsr r3 | ||
1551 | rldicl r0,r3,(63-MSR_FP_LG),1 | ||
1552 | rldicl r3,r0,(MSR_FP_LG+1),0 | ||
1553 | mtmsrd r3 /* disable use of fpu now */ | ||
1554 | isync | ||
1555 | blr | ||
1556 | |||
1557 | /* | ||
1558 | * giveup_fpu(tsk) | ||
1559 | * Disable FP for the task given as the argument, | ||
1560 | * and save the floating-point registers in its thread_struct. | ||
1561 | * Enables the FPU for use in the kernel on return. | ||
1562 | */ | ||
1563 | _GLOBAL(giveup_fpu) | ||
1564 | mfmsr r5 | ||
1565 | ori r5,r5,MSR_FP | ||
1566 | mtmsrd r5 /* enable use of fpu now */ | ||
1567 | isync | ||
1568 | cmpdi 0,r3,0 | ||
1569 | beqlr- /* if no previous owner, done */ | ||
1570 | addi r3,r3,THREAD /* want THREAD of task */ | ||
1571 | ld r5,PT_REGS(r3) | ||
1572 | cmpdi 0,r5,0 | ||
1573 | SAVE_32FPRS(0, r3) | ||
1574 | mffs fr0 | ||
1575 | stfd fr0,THREAD_FPSCR(r3) | ||
1576 | beq 1f | ||
1577 | ld r4,_MSR-STACK_FRAME_OVERHEAD(r5) | ||
1578 | li r3,MSR_FP|MSR_FE0|MSR_FE1 | ||
1579 | andc r4,r4,r3 /* disable FP for previous task */ | ||
1580 | std r4,_MSR-STACK_FRAME_OVERHEAD(r5) | ||
1581 | 1: | ||
1582 | #ifndef CONFIG_SMP | ||
1583 | li r5,0 | ||
1584 | ld r4,last_task_used_math@got(r2) | ||
1585 | std r5,0(r4) | ||
1586 | #endif /* CONFIG_SMP */ | ||
1587 | blr | ||
1588 | |||
1589 | #ifdef CONFIG_ALTIVEC | ||
1590 | /* | ||
1591 | * disable_kernel_altivec() | ||
1592 | * Disable the VMX. | ||
1593 | */ | ||
1594 | _GLOBAL(disable_kernel_altivec) | ||
1595 | mfmsr r3 | ||
1596 | rldicl r0,r3,(63-MSR_VEC_LG),1 | ||
1597 | rldicl r3,r0,(MSR_VEC_LG+1),0 | ||
1598 | mtmsrd r3 /* disable use of VMX now */ | ||
1599 | isync | ||
1600 | blr | ||
1601 | |||
1602 | /* | ||
1603 | * giveup_altivec(tsk) | ||
1604 | * Disable VMX for the task given as the argument, | ||
1605 | * and save the vector registers in its thread_struct. | ||
1606 | * Enables the VMX for use in the kernel on return. | ||
1607 | */ | ||
1608 | _GLOBAL(giveup_altivec) | ||
1609 | mfmsr r5 | ||
1610 | oris r5,r5,MSR_VEC@h | ||
1611 | mtmsrd r5 /* enable use of VMX now */ | ||
1612 | isync | ||
1613 | cmpdi 0,r3,0 | ||
1614 | beqlr- /* if no previous owner, done */ | ||
1615 | addi r3,r3,THREAD /* want THREAD of task */ | ||
1616 | ld r5,PT_REGS(r3) | ||
1617 | cmpdi 0,r5,0 | ||
1618 | SAVE_32VRS(0,r4,r3) | ||
1619 | mfvscr vr0 | ||
1620 | li r4,THREAD_VSCR | ||
1621 | stvx vr0,r4,r3 | ||
1622 | beq 1f | ||
1623 | ld r4,_MSR-STACK_FRAME_OVERHEAD(r5) | ||
1624 | lis r3,MSR_VEC@h | ||
1625 | andc r4,r4,r3 /* disable FP for previous task */ | ||
1626 | std r4,_MSR-STACK_FRAME_OVERHEAD(r5) | ||
1627 | 1: | ||
1628 | #ifndef CONFIG_SMP | ||
1629 | li r5,0 | ||
1630 | ld r4,last_task_used_altivec@got(r2) | ||
1631 | std r5,0(r4) | ||
1632 | #endif /* CONFIG_SMP */ | ||
1633 | blr | ||
1634 | |||
1635 | #endif /* CONFIG_ALTIVEC */ | ||
1636 | |||
1637 | #ifdef CONFIG_SMP | 1545 | #ifdef CONFIG_SMP |
1638 | #ifdef CONFIG_PPC_PMAC | 1546 | #ifdef CONFIG_PPC_PMAC |
1639 | /* | 1547 | /* |
@@ -1984,9 +1892,6 @@ _STATIC(start_here_common) | |||
1984 | 1892 | ||
1985 | bl .start_kernel | 1893 | bl .start_kernel |
1986 | 1894 | ||
1987 | _GLOBAL(__setup_cpu_power3) | ||
1988 | blr | ||
1989 | |||
1990 | _GLOBAL(hmt_init) | 1895 | _GLOBAL(hmt_init) |
1991 | #ifdef CONFIG_HMT | 1896 | #ifdef CONFIG_HMT |
1992 | LOADADDR(r5, hmt_thread_data) | 1897 | LOADADDR(r5, hmt_thread_data) |