Print this page
de-linting of .s files
*** 33,45 ****
#include <sys/fsr.h>
#include <sys/privregs.h>
#include <sys/machasi.h>
#include <sys/niagaraasi.h>
- #if !defined(lint)
#include "assym.h"
- #endif /* lint */
/*
* Pseudo-code to aid in understanding the control flow of the
* bcopy/kcopy routine.
--- 33,43 ----
*** 372,383 ****
faddd %f0, %f2, %f56 ;\
fmuld %f0, %f2, %f58 ;\
faddd %f0, %f2, %f60 ;\
fmuld %f0, %f2, %f62
- #if !defined(lint)
-
/*
* Macros to save and restore fp registers to/from the stack.
* Used to save and restore in-use fp registers when we want to use FP.
*/
#define BST_FP_TOSTACK(tmp1) \
--- 370,379 ----
*** 399,426 ****
add tmp1, VIS_BLOCKSIZE, tmp1 ;\
ldda [tmp1]ASI_BLK_P, %f16 ;\
add tmp1, VIS_BLOCKSIZE, tmp1 ;\
ldda [tmp1]ASI_BLK_P, %f48 ;\
membar #Sync
- #endif /* NIAGARA_IMPL */
! #endif /* lint */
/*
* 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)
#if !defined(NIAGARA_IMPL)
--- 395,412 ----
add tmp1, VIS_BLOCKSIZE, tmp1 ;\
ldda [tmp1]ASI_BLK_P, %f16 ;\
add tmp1, VIS_BLOCKSIZE, tmp1 ;\
ldda [tmp1]ASI_BLK_P, %f48 ;\
membar #Sync
! #endif
/*
* 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
*/
.seg ".text"
.align 4
ENTRY(kcopy)
#if !defined(NIAGARA_IMPL)
*** 590,614 ****
ret
restore %g1, 0, %o0
#endif /* NIAGARA_IMPL */
SET_SIZE(kcopy)
- #endif /* lint */
/*
* Copy a block of storage - must not overlap (from + len <= to).
*/
- #if defined(lint)
- /* ARGSUSED */
- void
- bcopy(const void *from, void *to, size_t count)
- {}
-
- #else /* lint */
-
ENTRY(bcopy)
#if !defined(NIAGARA_IMPL)
cmp %o2, FP_COPY ! check for small copy/leaf case
bgt,pt %ncc, .bcopy_more !
nop
--- 576,591 ----
*** 2684,2708 ****
SET_SIZE(bcopy)
#endif /* NIAGARA_IMPL */
- #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
--- 2661,2674 ----
*** 2741,2765 ****
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.
*/
- #ifdef lint
- /*ARGSUSED*/
- void
- hwblkpagecopy(const void *src, void *dst)
- { }
- #else /* lint */
ENTRY(hwblkpagecopy)
save %sp, -SA(MINFRAME), %sp
! %i0 - source address (arg)
! %i1 - destination address (arg)
--- 2707,2723 ----
*** 2808,2818 ****
membar #Sync
ret
restore %g0, 0, %o0
SET_SIZE(hwblkpagecopy)
- #endif /* lint */
/*
* Transfer data to and from user space -
* Note that these routines can cause faults
--- 2766,2775 ----
*** 2902,2920 ****
/*
* Copy kernel data to user space (copyout/xcopyout/xcopyout_little).
*/
- #if defined(lint)
-
- /*ARGSUSED*/
- int
- copyout(const void *kaddr, void *uaddr, size_t count)
- { return (0); }
-
- #else /* lint */
-
/*
* We save the arguments in the following registers in case of a fault:
* kaddr - %g2
* uaddr - %g3
* count - %g4
--- 2859,2868 ----
*** 5097,5118 ****
retl
mov -1, %o0
#endif /* NIAGARA_IMPL */
SET_SIZE(copyout)
- #endif /* lint */
-
- #ifdef lint
-
- /*ARGSUSED*/
- int
- xcopyout(const void *kaddr, void *uaddr, size_t count)
- { return (0); }
-
- #else /* lint */
-
ENTRY(xcopyout)
sethi %hi(.xcopyout_err), REAL_LOFAULT
b .do_copyout
or REAL_LOFAULT, %lo(.xcopyout_err), REAL_LOFAULT
.xcopyout_err:
--- 5045,5055 ----
*** 5125,5145 ****
2:
retl
mov %g1, %o0
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(.little_err), %o4
ldn [THREAD_REG + T_LOFAULT], %o5
or %o4, %lo(.little_err), %o4
membar #Sync ! sync error barrier
--- 5062,5071 ----
*** 5163,5187 ****
stn %o5, [THREAD_REG + T_LOFAULT] ! restore old t_lofault
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)
sethi %hi(.copyin_err), REAL_LOFAULT
or REAL_LOFAULT, %lo(.copyin_err), REAL_LOFAULT
#if !defined(NIAGARA_IMPL)
--- 5089,5102 ----
*** 7281,7301 ****
retl
mov -1, %o0
#endif /* NIAGARA_IMPL */
SET_SIZE(copyin)
- #endif /* lint */
-
- #ifdef lint
-
- /*ARGSUSED*/
- int
- xcopyin(const void *uaddr, void *kaddr, size_t count)
- { return (0); }
-
- #else /* lint */
-
ENTRY(xcopyin)
sethi %hi(.xcopyin_err), REAL_LOFAULT
b .do_copyin
or REAL_LOFAULT, %lo(.xcopyin_err), REAL_LOFAULT
.xcopyin_err:
--- 7196,7205 ----
*** 7308,7328 ****
2:
retl
mov %g1, %o0
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(.little_err), %o4
ldn [THREAD_REG + T_LOFAULT], %o5
or %o4, %lo(.little_err), %o4
membar #Sync ! sync error barrier
--- 7212,7221 ----
*** 7352,7421 ****
stn %o5, [THREAD_REG + T_LOFAULT] ! restore old t_lofault
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)
sethi %hi(.copyio_noerr), REAL_LOFAULT
b .do_copyin
or REAL_LOFAULT, %lo(.copyio_noerr), REAL_LOFAULT
.copyio_noerr:
jmp SAVED_LOFAULT
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)
sethi %hi(.copyio_noerr), REAL_LOFAULT
b .do_copyout
or REAL_LOFAULT, %lo(.copyio_noerr), REAL_LOFAULT
SET_SIZE(copyout_noerr)
- #endif /* lint */
-
- #if defined(lint)
-
- int use_hw_bcopy = 1;
- int use_hw_bzero = 1;
- uint_t hw_copy_limit_1 = 0x100;
- uint_t hw_copy_limit_2 = 0x200;
- uint_t hw_copy_limit_4 = 0x400;
- uint_t hw_copy_limit_8 = 0x400;
-
- #else /* !lint */
-
.align 4
DGDEF(use_hw_bcopy)
.word 1
DGDEF(use_hw_bzero)
.word 1
--- 7245,7280 ----
*** 7428,7455 ****
DGDEF(hw_copy_limit_8)
.word 0x400
.align 64
.section ".text"
- #endif /* !lint */
/*
* hwblkclr - clears block-aligned, block-multiple-sized regions that are
* longer than 256 bytes in length using Niagara's block stores/quad store.
* If 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)
ENTRY(hwblkclr)
save %sp, -SA(MINFRAME), %sp
--- 7287,7305 ----
*** 7543,7562 ****
.pz_finish:
membar #Sync
ret
restore %g0, 0, %o0 ! return (bzero or not)
SET_SIZE(hwblkclr)
- #endif /* lint */
- #ifdef lint
- /* Copy 32 bytes of data from src to dst using physical addresses */
- /*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)
--- 7393,7403 ----
*** 7581,7591 ****
membar #Sync
retl
wrpr %g0, %g1, %pstate
SET_SIZE(hw_pa_bcopy32)
- #endif /* lint */
/*
* Zero a block of storage.
*
* uzero is used by the kernel to zero a block in user address space.
--- 7422,7431 ----
*** 7606,7629 ****
* store using ASI_BLK_INIT_QUAD_LDD_AIUS (uzero)
* }
* Store as many 8-byte chunks, followed by trailing bytes.
*/
- #if defined(lint)
-
- /* ARGSUSED */
- int
- kzero(void *addr, size_t count)
- { return(0); }
-
- /* ARGSUSED */
- void
- uzero(void *addr, size_t count)
- {}
-
- #else /* lint */
-
ENTRY(uzero)
!
! Set a new lo_fault handler only if we came in with one
! already specified.
!
--- 7446,7455 ----
*** 7692,7716 ****
jmp %o5 ! goto real handler
nop
SET_SIZE(kzero)
SET_SIZE(uzero)
- #endif /* lint */
-
/*
* Zero a block of storage.
*/
- #if defined(lint)
-
- /* ARGSUSED */
- void
- bzero(void *addr, size_t count)
- {}
-
- #else /* lint */
-
ENTRY(bzero)
wr %g0, ASI_P, %asi
ldn [THREAD_REG + T_LOFAULT], %o5 ! save old vector
tst %o5
--- 7518,7531 ----
*** 7917,7922 ****
1:
retl
clr %o0 ! return (0)
SET_SIZE(bzero)
- #endif /* lint */
--- 7732,7736 ----