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 ----
*** 34,46 **** #include <sys/clock.h> #include <sys/asi.h> #include <sys/fsr.h> #include <sys/privregs.h> - #if !defined(lint) #include "assym.h" - #endif /* lint */ /* * Pseudo-code to aid in understanding the control flow of the * bcopy routine. --- 32,42 ----
*** 480,498 **** * 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) --- 476,485 ----
*** 615,643 **** .copyerr2: set fp_panic_msg, %o0 call panic nop SET_SIZE(kcopy) - #endif /* lint */ /* * Copy a block of storage - must not overlap (from + len <= to). * Registers: l6 - 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) save %sp, -SA(MINFRAME + HWCOPYFRAMESIZE), %sp ldn [THREAD_REG + T_LOFAULT], %l6 ! save t_lofault tst %l6 --- 602,621 ----
*** 1868,1892 **** retl andn %i2, %o0, %i3 ! return size of aligned bytes SET_SIZE(bcopy) - #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 --- 1846,1859 ----
*** 1925,1949 **** 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) ! get another window w/space for three aligned blocks of saved fpregs save %sp, -SA(MINFRAME + 4*64), %sp ! %i0 - source address (arg) --- 1892,1908 ----
*** 2017,2027 **** 4: wr %l0, 0, %fprs ! restore fprs 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 --- 1976,1985 ----
*** 2129,2147 **** /* * 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 --- 2087,2096 ----
*** 3390,3411 **** 2: retl mov -1, %o0 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: --- 3339,3349 ----
*** 3418,3438 **** 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 --- 3356,3365 ----
*** 3456,3480 **** 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 .do_copyin: --- 3383,3396 ----
*** 4628,4648 **** 2: retl mov -1, %o0 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: --- 4544,4553 ----
*** 4655,4675 **** 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 --- 4560,4569 ----
*** 4699,4769 **** 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_copyio = 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 */ - .align 4 DGDEF(use_hw_bcopy) .word 1 DGDEF(use_hw_copyio) .word 1 --- 4593,4628 ----
*** 4778,4788 **** DGDEF(hw_copy_limit_8) .word 0 .align 64 .section ".text" - #endif /* !lint */ /* * hwblkclr - clears block-aligned, block-multiple-sized regions that are * longer than 256 bytes in length using spitfire's block stores. If --- 4637,4646 ----
*** 4789,4806 **** * 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 --- 4647,4656 ----
*** 4896,4915 **** .pz_finished: 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) --- 4746,4756 ----
*** 4934,4939 **** membar #Sync retl wrpr %g0, %g1, %pstate SET_SIZE(hw_pa_bcopy32) - #endif /* lint */ --- 4775,4779 ----