diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh5/entry.S')
-rw-r--r-- | arch/sh/kernel/cpu/sh5/entry.S | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/arch/sh/kernel/cpu/sh5/entry.S b/arch/sh/kernel/cpu/sh5/entry.S index ff1f0e6e9bec..b7cf6a547f11 100644 --- a/arch/sh/kernel/cpu/sh5/entry.S +++ b/arch/sh/kernel/cpu/sh5/entry.S | |||
@@ -1569,86 +1569,6 @@ ___clear_user_exit: | |||
1569 | #endif /* CONFIG_MMU */ | 1569 | #endif /* CONFIG_MMU */ |
1570 | 1570 | ||
1571 | /* | 1571 | /* |
1572 | * int __strncpy_from_user(unsigned long __dest, unsigned long __src, | ||
1573 | * int __count) | ||
1574 | * | ||
1575 | * Inputs: | ||
1576 | * (r2) target address | ||
1577 | * (r3) source address | ||
1578 | * (r4) maximum size in bytes | ||
1579 | * | ||
1580 | * Ouputs: | ||
1581 | * (*r2) copied data | ||
1582 | * (r2) -EFAULT (in case of faulting) | ||
1583 | * copied data (otherwise) | ||
1584 | */ | ||
1585 | .global __strncpy_from_user | ||
1586 | __strncpy_from_user: | ||
1587 | pta ___strncpy_from_user1, tr0 | ||
1588 | pta ___strncpy_from_user_done, tr1 | ||
1589 | or r4, ZERO, r5 /* r5 = original count */ | ||
1590 | beq/u r4, r63, tr1 /* early exit if r4==0 */ | ||
1591 | movi -(EFAULT), r6 /* r6 = reply, no real fixup */ | ||
1592 | or ZERO, ZERO, r7 /* r7 = data, clear top byte of data */ | ||
1593 | |||
1594 | ___strncpy_from_user1: | ||
1595 | ld.b r3, 0, r7 /* Fault address: only in reading */ | ||
1596 | st.b r2, 0, r7 | ||
1597 | addi r2, 1, r2 | ||
1598 | addi r3, 1, r3 | ||
1599 | beq/u ZERO, r7, tr1 | ||
1600 | addi r4, -1, r4 /* return real number of copied bytes */ | ||
1601 | bne/l ZERO, r4, tr0 | ||
1602 | |||
1603 | ___strncpy_from_user_done: | ||
1604 | sub r5, r4, r6 /* If done, return copied */ | ||
1605 | |||
1606 | ___strncpy_from_user_exit: | ||
1607 | or r6, ZERO, r2 | ||
1608 | ptabs LINK, tr0 | ||
1609 | blink tr0, ZERO | ||
1610 | |||
1611 | /* | ||
1612 | * extern long __strnlen_user(const char *__s, long __n) | ||
1613 | * | ||
1614 | * Inputs: | ||
1615 | * (r2) source address | ||
1616 | * (r3) source size in bytes | ||
1617 | * | ||
1618 | * Ouputs: | ||
1619 | * (r2) -EFAULT (in case of faulting) | ||
1620 | * string length (otherwise) | ||
1621 | */ | ||
1622 | .global __strnlen_user | ||
1623 | __strnlen_user: | ||
1624 | pta ___strnlen_user_set_reply, tr0 | ||
1625 | pta ___strnlen_user1, tr1 | ||
1626 | or ZERO, ZERO, r5 /* r5 = counter */ | ||
1627 | movi -(EFAULT), r6 /* r6 = reply, no real fixup */ | ||
1628 | or ZERO, ZERO, r7 /* r7 = data, clear top byte of data */ | ||
1629 | beq r3, ZERO, tr0 | ||
1630 | |||
1631 | ___strnlen_user1: | ||
1632 | ldx.b r2, r5, r7 /* Fault address: only in reading */ | ||
1633 | addi r3, -1, r3 /* No real fixup */ | ||
1634 | addi r5, 1, r5 | ||
1635 | beq r3, ZERO, tr0 | ||
1636 | bne r7, ZERO, tr1 | ||
1637 | ! The line below used to be active. This meant led to a junk byte lying between each pair | ||
1638 | ! of entries in the argv & envp structures in memory. Whilst the program saw the right data | ||
1639 | ! via the argv and envp arguments to main, it meant the 'flat' representation visible through | ||
1640 | ! /proc/$pid/cmdline was corrupt, causing trouble with ps, for example. | ||
1641 | ! addi r5, 1, r5 /* Include '\0' */ | ||
1642 | |||
1643 | ___strnlen_user_set_reply: | ||
1644 | or r5, ZERO, r6 /* If done, return counter */ | ||
1645 | |||
1646 | ___strnlen_user_exit: | ||
1647 | or r6, ZERO, r2 | ||
1648 | ptabs LINK, tr0 | ||
1649 | blink tr0, ZERO | ||
1650 | |||
1651 | /* | ||
1652 | * extern long __get_user_asm_?(void *val, long addr) | 1572 | * extern long __get_user_asm_?(void *val, long addr) |
1653 | * | 1573 | * |
1654 | * Inputs: | 1574 | * Inputs: |
@@ -1982,8 +1902,6 @@ asm_uaccess_start: | |||
1982 | .long ___copy_user2, ___copy_user_exit | 1902 | .long ___copy_user2, ___copy_user_exit |
1983 | .long ___clear_user1, ___clear_user_exit | 1903 | .long ___clear_user1, ___clear_user_exit |
1984 | #endif | 1904 | #endif |
1985 | .long ___strncpy_from_user1, ___strncpy_from_user_exit | ||
1986 | .long ___strnlen_user1, ___strnlen_user_exit | ||
1987 | .long ___get_user_asm_b1, ___get_user_asm_b_exit | 1905 | .long ___get_user_asm_b1, ___get_user_asm_b_exit |
1988 | .long ___get_user_asm_w1, ___get_user_asm_w_exit | 1906 | .long ___get_user_asm_w1, ___get_user_asm_w_exit |
1989 | .long ___get_user_asm_l1, ___get_user_asm_l_exit | 1907 | .long ___get_user_asm_l1, ___get_user_asm_l_exit |