Print this page
de-linting of .s files
*** 22,33 ****
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
- #pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/asm_linkage.h>
#include <sys/vtrace.h>
#include <sys/machthread.h>
--- 22,31 ----
*** 35,47 ****
#include <sys/asi.h>
#include <sys/fsr.h>
#include <sys/privregs.h>
#include <sys/fpras_impl.h>
- #if !defined(lint)
#include "assym.h"
- #endif /* lint */
/*
* Pseudo-code to aid in understanding the control flow of the
* bcopy/copyin/copyout routines.
*
--- 33,43 ----
*** 619,629 ****
* of the restore complete before we return to whoever has the fp regs
* in use. To avoid repeated membar #Sync we make it the responsibility
* of the copy code to membar #Sync immediately after copy is complete
* and before using the BLD_*_FROMSTACK macro.
*/
- #if !defined(lint)
#define BST_FPQ1Q3_TOSTACK(tmp1) \
/* membar #Sync */ ;\
add %fp, STACK_BIAS - SAVED_FPREGS_ADJUST, tmp1 ;\
and tmp1, -VIS_BLOCKSIZE, tmp1 /* block align */ ;\
stda %f0, [tmp1]ASI_BLK_P ;\
--- 615,624 ----
*** 655,665 ****
and tmp1, -VIS_BLOCKSIZE, tmp1 /* block align */ ;\
ldda [tmp1]ASI_BLK_P, %f16 ;\
add tmp1, VIS_BLOCKSIZE, tmp1 ;\
ldda [tmp1]ASI_BLK_P, %f48 ;\
membar #Sync
- #endif
/*
* FP_NOMIGRATE and FP_ALLOWMIGRATE. Prevent migration (or, stronger,
* prevent preemption if there is no t_lwp to save FP state to on context
* switch) before commencing a FP copy, and reallow it on completion or
--- 650,659 ----
*** 735,753 ****
* Copy a block of storage, returning an error code if `from' or
* `to' takes a kernel pagefault which cannot be resolved.
* Returns errno value on pagefault error, 0 if all ok
*/
- #if defined(lint)
-
- /* ARGSUSED */
- int
- kcopy(const void *from, void *to, size_t count)
- { return(0); }
-
- #else /* lint */
-
.seg ".text"
.align 4
ENTRY(kcopy)
--- 729,738 ----
*** 911,921 ****
3:
jmp %o4 ! goto real handler
mov %g0, %o0 !
SET_SIZE(kcopy)
- #endif /* lint */
/*
* Copy a block of storage - must not overlap (from + len <= to).
* Registers: l6 - saved t_lofault
--- 896,905 ----
*** 922,940 ****
* (for short copies, o4 - saved t_lofault)
*
* Copy a page of memory.
* Assumes double word alignment and a count >= 256.
*/
- #if defined(lint)
- /* ARGSUSED */
- void
- bcopy(const void *from, void *to, size_t count)
- {}
-
- #else /* lint */
-
ENTRY(bcopy)
cmp %o2, VIS_COPY_THRESHOLD ! check for leaf rtn case
bleu,pt %ncc, .bcopy_small ! go to larger cases
xor %o0, %o1, %o3 ! are src, dst alignable?
--- 906,916 ----
*** 1500,1524 ****
ret
restore %g0, 0, %o0
SET_SIZE(bcopy_more)
- #endif /* lint */
-
/*
* Block copy with possibly overlapped operands.
*/
- #if defined(lint)
-
- /*ARGSUSED*/
- void
- ovbcopy(const void *from, void *to, size_t count)
- {}
-
- #else /* lint */
-
ENTRY(ovbcopy)
tst %o2 ! check count
bgu,a %ncc, 1f ! nothing to do or bad arguments
subcc %o0, %o1, %o3 ! difference of from and to address
--- 1476,1489 ----
*** 1558,1583 ****
retl ! return
nop
SET_SIZE(ovbcopy)
- #endif /* lint */
-
/*
* hwblkpagecopy()
*
* Copies exactly one page. This routine assumes the caller (ppcopy)
* has already disabled kernel preemption and has checked
* use_hw_bcopy. Preventing preemption also prevents cpu migration.
*/
- #ifdef lint
- /*ARGSUSED*/
- void
- hwblkpagecopy(const void *src, void *dst)
- { }
- #else /* lint */
ENTRY(hwblkpagecopy)
! get another window w/space for three aligned blocks of saved fpregs
save %sp, -SA(MINFRAME + HWCOPYFRAMESIZE), %sp
! %i0 - source address (arg)
--- 1523,1540 ----
*** 1701,1711 ****
3: wr %l0, 0, %fprs ! restore fprs
ret
restore %g0, 0, %o0
SET_SIZE(hwblkpagecopy)
- #endif /* lint */
/*
* Transfer data to and from user space -
* Note that these routines can cause faults
--- 1658,1667 ----
*** 1760,1773 ****
/*
* Copy kernel data to user space (copyout/xcopyout/xcopyout_little).
*/
- #if defined(lint)
-
-
- #else /* lint */
/*
* We save the arguments in the following registers in case of a fault:
* kaddr - %l1
* uaddr - %l2
* count - %l3
--- 1716,1725 ----
*** 1830,1850 ****
mov SAVE_COUNT, %i2
SET_SIZE(copyio_fault)
- #endif
-
- #if defined(lint)
-
- /*ARGSUSED*/
- int
- copyout(const void *kaddr, void *uaddr, size_t count)
- { return (0); }
-
- #else /* lint */
-
ENTRY(copyout)
cmp %o2, VIS_COPY_THRESHOLD ! check for leaf rtn case
bleu,pt %ncc, .copyout_small ! go to larger cases
xor %o0, %o1, %o3 ! are src, dst alignable?
--- 1782,1791 ----
*** 2465,2486 ****
restore %g0, -1, %o0 ! return error value
SET_SIZE(copyout_more)
- #endif /* lint */
-
- #ifdef lint
-
- /*ARGSUSED*/
- int
- xcopyout(const void *kaddr, void *uaddr, size_t count)
- { return (0); }
-
- #else /* lint */
-
ENTRY(xcopyout)
cmp %o2, VIS_COPY_THRESHOLD ! check for leaf rtn case
bleu,pt %ncc, .xcopyout_small ! go to larger cases
xor %o0, %o1, %o3 ! are src, dst alignable?
btst 7, %o3 !
--- 2406,2416 ----
*** 2581,2601 ****
retl
or %g1, 0, %o0 ! return errno value
SET_SIZE(xcopyout)
- #endif /* lint */
-
- #ifdef lint
-
- /*ARGSUSED*/
- int
- xcopyout_little(const void *kaddr, void *uaddr, size_t count)
- { return (0); }
-
- #else /* lint */
-
ENTRY(xcopyout_little)
sethi %hi(.xcopyio_err), %o5
or %o5, %lo(.xcopyio_err), %o5
ldn [THREAD_REG + T_LOFAULT], %o4
membar #Sync ! sync error barrier
--- 2511,2520 ----
*** 2622,2646 ****
retl
mov %g0, %o0 ! return (0)
SET_SIZE(xcopyout_little)
- #endif /* lint */
-
/*
* Copy user data to kernel space (copyin/xcopyin/xcopyin_little)
*/
- #if defined(lint)
-
- /*ARGSUSED*/
- int
- copyin(const void *uaddr, void *kaddr, size_t count)
- { return (0); }
-
- #else /* lint */
-
ENTRY(copyin)
cmp %o2, VIS_COPY_THRESHOLD ! check for leaf rtn case
bleu,pt %ncc, .copyin_small ! go to larger cases
xor %o0, %o1, %o3 ! are src, dst alignable?
btst 7, %o3 !
--- 2541,2554 ----
*** 3252,3272 ****
restore %g0, -1, %o0 ! return error value
SET_SIZE(copyin_more)
- #endif /* lint */
-
- #ifdef lint
-
- /*ARGSUSED*/
- int
- xcopyin(const void *uaddr, void *kaddr, size_t count)
- { return (0); }
-
- #else /* lint */
-
ENTRY(xcopyin)
cmp %o2, VIS_COPY_THRESHOLD ! check for leaf rtn case
bleu,pt %ncc, .xcopyin_small ! go to larger cases
xor %o0, %o1, %o3 ! are src, dst alignable?
--- 3160,3169 ----
*** 3368,3388 ****
retl
or %g1, 0, %o0 ! return errno value
SET_SIZE(xcopyin)
- #endif /* lint */
-
- #ifdef lint
-
- /*ARGSUSED*/
- int
- xcopyin_little(const void *uaddr, void *kaddr, size_t count)
- { return (0); }
-
- #else /* lint */
-
ENTRY(xcopyin_little)
sethi %hi(.xcopyio_err), %o5
or %o5, %lo(.xcopyio_err), %o5
ldn [THREAD_REG + T_LOFAULT], %o4
membar #Sync ! sync error barrier
--- 3265,3274 ----
*** 3415,3439 ****
retl
mov %g1, %o0
SET_SIZE(xcopyin_little)
- #endif /* lint */
-
/*
* Copy a block of storage - must not overlap (from + len <= to).
* No fault handler installed (to be called under on_fault())
*/
- #if defined(lint)
-
- /* ARGSUSED */
- void
- copyin_noerr(const void *ufrom, void *kto, size_t count)
- {}
-
- #else /* lint */
ENTRY(copyin_noerr)
cmp %o2, VIS_COPY_THRESHOLD ! check for leaf rtn case
bleu,pt %ncc, .copyin_ne_small ! go to larger cases
xor %o0, %o1, %o3 ! are src, dst alignable?
--- 3301,3315 ----
*** 3513,3537 ****
stn %o4, [THREAD_REG + T_LOFAULT] ! restore t_lofault
jmp %o4
nop
SET_SIZE(copyin_noerr)
- #endif /* lint */
/*
* Copy a block of storage - must not overlap (from + len <= to).
* No fault handler installed (to be called under on_fault())
*/
- #if defined(lint)
-
- /* ARGSUSED */
- void
- copyout_noerr(const void *kfrom, void *uto, size_t count)
- {}
-
- #else /* lint */
ENTRY(copyout_noerr)
cmp %o2, VIS_COPY_THRESHOLD ! check for leaf rtn case
bleu,pt %ncc, .copyout_ne_small ! go to larger cases
xor %o0, %o1, %o3 ! are src, dst alignable?
--- 3389,3404 ----
*** 3601,3611 ****
sethi %hi(.copyio_noerr), REAL_LOFAULT
ba,pt %ncc, .do_copyout
or REAL_LOFAULT, %lo(.copyio_noerr), REAL_LOFAULT
SET_SIZE(copyout_noerr)
- #endif /* lint */
/*
* hwblkclr - clears block-aligned, block-multiple-sized regions that are
* longer than 256 bytes in length using spitfire's block stores. If
--- 3468,3477 ----
*** 3612,3629 ****
* the criteria for using this routine are not met then it calls bzero
* and returns 1. Otherwise 0 is returned indicating success.
* Caller is responsible for ensuring use_hw_bzero is true and that
* kpreempt_disable() has been called.
*/
- #ifdef lint
- /*ARGSUSED*/
- int
- hwblkclr(void *addr, size_t len)
- {
- return(0);
- }
- #else /* lint */
! %i0 - start address
! %i1 - length of region (multiple of 64)
! %l0 - saved fprs
! %l1 - pointer to saved %d0 block
! %l2 - saved curthread->t_lwp
--- 3478,3487 ----
*** 3720,3737 ****
.pz_finished:
ret
restore %g0, 0, %o0 ! return (bzero or not)
SET_SIZE(hwblkclr)
- #endif /* lint */
- #ifdef lint
- /*ARGSUSED*/
- void
- hw_pa_bcopy32(uint64_t src, uint64_t dst)
- {}
- #else /*!lint */
/*
* Copy 32 bytes of data from src (%o0) to dst (%o1)
* using physical addresses.
*/
ENTRY_NP(hw_pa_bcopy32)
--- 3578,3588 ----
*** 3762,3784 ****
retl
wrpr %g0, %g1, %pstate
SET_SIZE(hw_pa_bcopy32)
- #endif /* lint */
-
- #if defined(lint)
-
- int use_hw_bcopy = 1;
- int use_hw_bzero = 1;
- uint_t hw_copy_limit_1 = 0;
- uint_t hw_copy_limit_2 = 0;
- uint_t hw_copy_limit_4 = 0;
- uint_t hw_copy_limit_8 = 0;
-
- #else /* !lint */
-
DGDEF(use_hw_bcopy)
.word 1
DGDEF(use_hw_bzero)
.word 1
DGDEF(hw_copy_limit_1)
--- 3613,3622 ----
*** 3790,3795 ****
DGDEF(hw_copy_limit_8)
.word 0
.align 64
.section ".text"
- #endif /* !lint */
--- 3628,3632 ----