Print this page
de-linting of .s files
@@ -21,12 +21,10 @@
/*
* Copyright 2006 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>
@@ -33,13 +31,11 @@
#include <sys/clock.h>
#include <sys/asi.h>
#include <sys/fsr.h>
#include <sys/privregs.h>
-#if !defined(lint)
#include "assym.h"
-#endif /* lint */
/*
* Error barrier:
* We use membar sync to establish an error barrier for
* deferred errors. Membar syncs are added before any update
@@ -58,19 +54,10 @@
* copystr(from, to, maxlength, lencopied)
* caddr_t from, to;
* u_int maxlength, *lencopied;
*/
-#if defined(lint)
-
-/* ARGSUSED */
-int
-copystr(const char *from, char *to, size_t maxlength, size_t *lencopied)
-{ return(0); }
-
-#else /* lint */
-
ENTRY(copystr)
orcc %o2, %g0, %o4 ! save original count
bg,a %ncc, 1f
sub %o0, %o1, %o0 ! o0 gets the difference of src and dst
@@ -111,27 +98,16 @@
2:
retl
nop
SET_SIZE(copystr)
-#endif /* lint */
-
/*
* Copy a null terminated string from the user address space into
* the kernel address space.
*/
-#if defined(lint)
-/* ARGSUSED */
-int
-copyinstr(const char *uaddr, char *kaddr, size_t maxlength,
- size_t *lencopied)
-{ return (0); }
-
-#else /* lint */
-
ENTRY(copyinstr)
sethi %hi(.copyinstr_err), %o4
ldn [THREAD_REG + T_LOFAULT], %o5 ! catch faults
or %o4, %lo(.copyinstr_err), %o4
membar #Sync ! sync error barrier
@@ -192,22 +168,11 @@
2:
membar #Sync ! sync error barrier
retl
stn %o5, [THREAD_REG + T_LOFAULT] ! stop catching faults
SET_SIZE(copyinstr)
-#endif
-#if defined(lint)
-
-/* ARGSUSED */
-int
-copyinstr_noerr(const char *uaddr, char *kaddr, size_t maxlength,
- size_t *lencopied)
-{ return (0); }
-
-#else /* lint */
-
ENTRY(copyinstr_noerr)
mov %o2, %o4 ! save original count
! maxlength is unsigned so the only error is if it's 0
brz,a,pn %o2, .copyinstr_noerr_out
@@ -245,27 +210,15 @@
2:
retl
nop
SET_SIZE(copyinstr_noerr)
-#endif /* lint */
-
/*
* Copy a null terminated string from the kernel
* address space to the user address space.
*/
-#if defined(lint)
-
-/* ARGSUSED */
-int
-copyoutstr(const char *kaddr, char *uaddr, size_t maxlength,
- size_t *lencopied)
-{ return (0); }
-
-#else /* lint */
-
ENTRY(copyoutstr)
sethi %hi(.copyoutstr_err), %o5
ldn [THREAD_REG + T_LOFAULT], %o4 ! catch faults
or %o5, %lo(.copyoutstr_err), %o5
membar #Sync ! sync error barrier
@@ -328,22 +281,10 @@
membar #Sync ! sync error barrier
retl
stn %o5, [THREAD_REG + T_LOFAULT] ! stop catching faults
SET_SIZE(copyoutstr)
-#endif /* lint */
-
-#if defined(lint)
-
-/* ARGSUSED */
-int
-copyoutstr_noerr(const char *kaddr, char *uaddr, size_t maxlength,
- size_t *lencopied)
-{ return (0); }
-
-#else /* lint */
-
ENTRY(copyoutstr_noerr)
mov %o2, %o4 ! save original count
brz,a,pn %o2, .copyoutstr_noerr_out
mov ENAMETOOLONG, %o0
@@ -380,28 +321,17 @@
2:
retl
nop
SET_SIZE(copyoutstr_noerr)
-#endif /* lint */
-
/*
* Copy a block of storage. If the source and target regions overlap,
* one or both of the regions will be silently corrupted.
* No fault handler installed (to be called under on_fault())
*/
-#if defined(lint)
-
-/* ARGSUSED */
-void
-ucopy(const void *ufrom, void *uto, size_t ulength)
-{}
-
-#else /* lint */
-
ENTRY(ucopy)
save %sp, -SA(MINFRAME), %sp ! get another window
subcc %g0, %i2, %i3
add %i0, %i2, %i0
@@ -415,27 +345,17 @@
5:
ret
restore %g0, 0, %o0 ! return (0)
SET_SIZE(ucopy)
-#endif /* lint */
/*
* Copy a user-land string. If the source and target regions overlap,
* one or both of the regions will be silently corrupted.
* No fault handler installed (to be called under on_fault())
*/
-#if defined(lint)
-
-/* ARGSUSED */
-void
-ucopystr(const char *ufrom, char *uto, size_t umaxlength, size_t *ulencopied)
-{}
-
-#else /* lint */
-
ENTRY(ucopystr)
save %sp, -SA(MINFRAME), %sp ! get another window
brz %i2, 5f
clr %i5
@@ -453,6 +373,5 @@
6:
ret
restore %g0, 0, %o0 ! return (0)
SET_SIZE(ucopystr)
-#endif /* lint */