Print this page
de-linting of .s files

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4v/cpu/niagara_copy.s
          +++ new/usr/src/uts/sun4v/cpu/niagara_copy.s
↓ open down ↓ 27 lines elided ↑ open up ↑
  28   28  #include <sys/asm_linkage.h>
  29   29  #include <sys/vtrace.h>
  30   30  #include <sys/machthread.h>
  31   31  #include <sys/clock.h>
  32   32  #include <sys/asi.h>
  33   33  #include <sys/fsr.h>
  34   34  #include <sys/privregs.h>
  35   35  #include <sys/machasi.h>
  36   36  #include <sys/niagaraasi.h>
  37   37  
  38      -#if !defined(lint)
  39   38  #include "assym.h"
  40      -#endif  /* lint */
  41   39  
  42   40  
  43   41  /*
  44   42   * Pseudo-code to aid in understanding the control flow of the
  45   43   * bcopy/kcopy routine.
  46   44   *
  47   45   *      ! WARNING : <Register usage convention>
  48   46   *      ! In kcopy() the %o5, holds previous error handler and a flag
  49   47   *      ! LOFAULT_SET (low bits). The %o5 is null in bcopy().
  50   48   *      ! The %o5 is not available for any other use.
↓ open down ↓ 316 lines elided ↑ open up ↑
 367  365          fmuld   %f0, %f2, %f30          ;\
 368  366          faddd   %f0, %f2, %f48          ;\
 369  367          fmuld   %f0, %f2, %f50          ;\
 370  368          faddd   %f0, %f2, %f52          ;\
 371  369          fmuld   %f0, %f2, %f54          ;\
 372  370          faddd   %f0, %f2, %f56          ;\
 373  371          fmuld   %f0, %f2, %f58          ;\
 374  372          faddd   %f0, %f2, %f60          ;\
 375  373          fmuld   %f0, %f2, %f62
 376  374  
 377      -#if !defined(lint)
 378      -
 379  375  /*
 380  376   * Macros to save and restore fp registers to/from the stack.
 381  377   * Used to save and restore in-use fp registers when we want to use FP.
 382  378   */
 383  379  #define BST_FP_TOSTACK(tmp1)                                    \
 384  380          /* membar #Sync */                                      ;\
 385  381          add     %fp, STACK_BIAS - SAVED_FPREGS_ADJUST, tmp1     ;\
 386  382          and     tmp1, -VIS_BLOCKSIZE, tmp1 /* block align */    ;\
 387  383          stda    %f0, [tmp1]ASI_BLK_P                            ;\
 388  384          add     tmp1, VIS_BLOCKSIZE, tmp1                       ;\
↓ open down ↓ 5 lines elided ↑ open up ↑
 394  390  #define BLD_FP_FROMSTACK(tmp1)                                  \
 395  391          /* membar #Sync - provided at copy completion */        ;\
 396  392          add     %fp, STACK_BIAS - SAVED_FPREGS_ADJUST, tmp1     ;\
 397  393          and     tmp1, -VIS_BLOCKSIZE, tmp1 /* block align */    ;\
 398  394          ldda    [tmp1]ASI_BLK_P, %f0                            ;\
 399  395          add     tmp1, VIS_BLOCKSIZE, tmp1                       ;\
 400  396          ldda    [tmp1]ASI_BLK_P, %f16                           ;\
 401  397          add     tmp1, VIS_BLOCKSIZE, tmp1                       ;\
 402  398          ldda    [tmp1]ASI_BLK_P, %f48                           ;\
 403  399          membar  #Sync
 404      -#endif  /* NIAGARA_IMPL */
 405  400  
 406      -#endif  /* lint */
      401 +#endif
 407  402  /*
 408  403   * Copy a block of storage, returning an error code if `from' or
 409  404   * `to' takes a kernel pagefault which cannot be resolved.
 410  405   * Returns errno value on pagefault error, 0 if all ok
 411  406   */
 412  407  
 413      -#if defined(lint)
 414      -
 415      -/* ARGSUSED */
 416      -int
 417      -kcopy(const void *from, void *to, size_t count)
 418      -{ return(0); }
 419      -
 420      -#else   /* lint */
 421      -
 422  408          .seg    ".text"
 423  409          .align  4
 424  410  
 425  411          ENTRY(kcopy)
 426  412  #if !defined(NIAGARA_IMPL)
 427  413          cmp     %o2, FP_COPY                    ! check for small copy/leaf case
 428  414          bgt,pt  %ncc, .kcopy_more               !
 429  415          nop
 430  416  .kcopy_small:                                   ! setup error handler
 431  417          sethi   %hi(.sm_copyerr), %o4
↓ open down ↓ 153 lines elided ↑ open up ↑
 585  571          ! into %o5 to indicate it has set t_lofault handler. Need to clear
 586  572          ! LOFAULT_SET flag before restoring the error handler.
 587  573          andn    %o5, LOFAULT_SET, %o5
 588  574          membar  #Sync                           ! sync error barrier
 589  575          stn     %o5, [THREAD_REG + T_LOFAULT]   ! restore old t_lofault
 590  576          ret
 591  577          restore %g1, 0, %o0
 592  578  #endif  /* NIAGARA_IMPL */
 593  579  
 594  580          SET_SIZE(kcopy)
 595      -#endif  /* lint */
 596  581  
 597  582  
 598  583  /*
 599  584   * Copy a block of storage - must not overlap (from + len <= to).
 600  585   */
 601      -#if defined(lint)
 602  586  
 603      -/* ARGSUSED */
 604      -void
 605      -bcopy(const void *from, void *to, size_t count)
 606      -{}
 607      -
 608      -#else   /* lint */
 609      -
 610  587          ENTRY(bcopy)
 611  588  #if !defined(NIAGARA_IMPL)
 612  589          cmp     %o2, FP_COPY                    ! check for small copy/leaf case
 613  590          bgt,pt  %ncc, .bcopy_more               !
 614  591          nop
 615  592  .bcopy_small:                                   ! setup error handler
 616  593          ldn     [THREAD_REG + T_LOFAULT], %o5   ! save existing handler
 617  594          tst     %o5
 618  595          bz,pt   %icc, .sm_do_copy
 619  596          sethi   %hi(.sm_copyerr), %o4
↓ open down ↓ 2059 lines elided ↑ open up ↑
2679 2656          bnz,a   1b
2680 2657          ldub    [%i0], %o4              ! read next byte
2681 2658  
2682 2659          retl
2683 2660          andn    %i2, %o0, %i3           ! return size of aligned bytes
2684 2661          
2685 2662          SET_SIZE(bcopy)
2686 2663  
2687 2664  #endif  /* NIAGARA_IMPL */
2688 2665  
2689      -#endif  /* lint */
2690      -
2691 2666  /*
2692 2667   * Block copy with possibly overlapped operands.
2693 2668   */
2694 2669  
2695      -#if defined(lint)
2696      -
2697      -/*ARGSUSED*/
2698      -void
2699      -ovbcopy(const void *from, void *to, size_t count)
2700      -{}
2701      -
2702      -#else   /* lint */
2703      -
2704 2670          ENTRY(ovbcopy)
2705 2671          tst     %o2                     ! check count
2706 2672          bgu,a   %ncc, 1f                ! nothing to do or bad arguments
2707 2673          subcc   %o0, %o1, %o3           ! difference of from and to address
2708 2674  
2709 2675          retl                            ! return
2710 2676          nop
2711 2677  1:
2712 2678          bneg,a  %ncc, 2f
2713 2679          neg     %o3                     ! if < 0, make it positive
↓ open down ↓ 22 lines elided ↑ open up ↑
2736 2702  .ov_bkwd:
2737 2703          deccc   %o2                     ! dec count
2738 2704          ldub    [%o0 + %o2], %o3        ! get byte at end of src
2739 2705          bgu     %ncc, .ov_bkwd          ! loop till done
2740 2706          stb     %o3, [%o1 + %o2]        ! delay slot, store at end of dst
2741 2707  
2742 2708          retl                            ! return
2743 2709          nop
2744 2710          SET_SIZE(ovbcopy)
2745 2711  
2746      -#endif  /* lint */
2747      -
2748 2712  /*
2749 2713   * hwblkpagecopy()
2750 2714   *
2751 2715   * Copies exactly one page.  This routine assumes the caller (ppcopy)
2752 2716   * has already disabled kernel preemption and has checked
2753 2717   * use_hw_bcopy.
2754 2718   */
2755      -#ifdef lint
2756      -/*ARGSUSED*/
2757      -void
2758      -hwblkpagecopy(const void *src, void *dst)
2759      -{ }
2760      -#else /* lint */
2761 2719          ENTRY(hwblkpagecopy)
2762 2720          save    %sp, -SA(MINFRAME), %sp
2763 2721  
2764 2722          ! %i0 - source address (arg)
2765 2723          ! %i1 - destination address (arg)
2766 2724          ! %i2 - length of region (not arg)
2767 2725  
2768 2726          set     PAGESIZE, %i2
2769 2727  
2770 2728          /*
↓ open down ↓ 32 lines elided ↑ open up ↑
2803 2761  
2804 2762          add     %i0, 0x80, %i0
2805 2763          subcc   %i2, 0x80, %i2
2806 2764          bgu,pt  %xcc, 1b
2807 2765          add     %i1, 0x80, %i1
2808 2766  
2809 2767          membar #Sync
2810 2768          ret
2811 2769          restore %g0, 0, %o0
2812 2770          SET_SIZE(hwblkpagecopy)
2813      -#endif  /* lint */
2814 2771  
2815 2772  
2816 2773  /*
2817 2774   * Transfer data to and from user space -
2818 2775   * Note that these routines can cause faults
2819 2776   * It is assumed that the kernel has nothing at
2820 2777   * less than KERNELBASE in the virtual address space.
2821 2778   *
2822 2779   * Note that copyin(9F) and copyout(9F) are part of the
2823 2780   * DDI/DKI which specifies that they return '-1' on "errors."
↓ open down ↓ 73 lines elided ↑ open up ↑
2897 2854   * to do the work specific to the invidual operation.  The handler
2898 2855   * for copyOP and xcopyOP are found at the end of individual function.
2899 2856   * The handlers for xcopyOP_little are found at the end of xcopyin_little.
2900 2857   * The handlers for copyOP_noerr are found at the end of copyin_noerr.
2901 2858   */
2902 2859  
2903 2860  /*
2904 2861   * Copy kernel data to user space (copyout/xcopyout/xcopyout_little).
2905 2862   */
2906 2863  
2907      -#if defined(lint)
2908      -
2909      -/*ARGSUSED*/
2910      -int
2911      -copyout(const void *kaddr, void *uaddr, size_t count)
2912      -{ return (0); }
2913      -
2914      -#else   /* lint */
2915      -
2916 2864  /*
2917 2865   * We save the arguments in the following registers in case of a fault:
2918 2866   *      kaddr - %g2
2919 2867   *      uaddr - %g3
2920 2868   *      count - %g4
2921 2869   */
2922 2870  #define SAVE_SRC        %g2
2923 2871  #define SAVE_DST        %g3
2924 2872  #define SAVE_COUNT      %g4
2925 2873  
↓ open down ↓ 2166 lines elided ↑ open up ↑
5092 5040          nop
5093 5041          ldn     [%o4 + CP_COPYOUT], %g2
5094 5042          jmp     %g2
5095 5043          nop
5096 5044  2:
5097 5045          retl
5098 5046          mov     -1, %o0
5099 5047  #endif  /* NIAGARA_IMPL */
5100 5048          SET_SIZE(copyout)
5101 5049  
5102      -#endif  /* lint */
5103 5050  
5104      -
5105      -#ifdef  lint
5106      -
5107      -/*ARGSUSED*/
5108      -int
5109      -xcopyout(const void *kaddr, void *uaddr, size_t count)
5110      -{ return (0); }
5111      -
5112      -#else   /* lint */
5113      -
5114 5051          ENTRY(xcopyout)
5115 5052          sethi   %hi(.xcopyout_err), REAL_LOFAULT
5116 5053          b       .do_copyout
5117 5054          or      REAL_LOFAULT, %lo(.xcopyout_err), REAL_LOFAULT
5118 5055  .xcopyout_err:
5119 5056          ldn     [THREAD_REG + T_COPYOPS], %o4
5120 5057          brz     %o4, 2f
5121 5058          nop
5122 5059          ldn     [%o4 + CP_XCOPYOUT], %g2
5123 5060          jmp     %g2
5124 5061          nop
5125 5062  2:
5126 5063          retl
5127 5064          mov     %g1, %o0
5128 5065          SET_SIZE(xcopyout)
5129 5066  
5130      -#endif  /* lint */
5131      -        
5132      -#ifdef  lint
5133      -
5134      -/*ARGSUSED*/
5135      -int
5136      -xcopyout_little(const void *kaddr, void *uaddr, size_t count)
5137      -{ return (0); }
5138      -
5139      -#else   /* lint */
5140      -
5141 5067          ENTRY(xcopyout_little)
5142 5068          sethi   %hi(.little_err), %o4
5143 5069          ldn     [THREAD_REG + T_LOFAULT], %o5
5144 5070          or      %o4, %lo(.little_err), %o4
5145 5071          membar  #Sync                   ! sync error barrier
5146 5072          stn     %o4, [THREAD_REG + T_LOFAULT]
5147 5073  
5148 5074          subcc   %g0, %o2, %o3
5149 5075          add     %o0, %o2, %o0
5150 5076          bz,pn   %ncc, 2f                ! check for zero bytes
↓ open down ↓ 7 lines elided ↑ open up ↑
5158 5084          sub     %o0, 2, %o0             ! get next byte
5159 5085          bcc,a,pt %ncc, 1b
5160 5086          ldub    [%o0+%o3], %o4
5161 5087  
5162 5088  2:      membar  #Sync                   ! sync error barrier
5163 5089          stn     %o5, [THREAD_REG + T_LOFAULT]   ! restore old t_lofault
5164 5090          retl
5165 5091          mov     %g0, %o0                ! return (0)
5166 5092          SET_SIZE(xcopyout_little)
5167 5093  
5168      -#endif  /* lint */
5169      -
5170 5094  /*
5171 5095   * Copy user data to kernel space (copyin/xcopyin/xcopyin_little)
5172 5096   */
5173 5097  
5174      -#if defined(lint)
5175      -
5176      -/*ARGSUSED*/
5177      -int
5178      -copyin(const void *uaddr, void *kaddr, size_t count)
5179      -{ return (0); }
5180      -
5181      -#else   /* lint */
5182      -
5183 5098          ENTRY(copyin)
5184 5099          sethi   %hi(.copyin_err), REAL_LOFAULT
5185 5100          or      REAL_LOFAULT, %lo(.copyin_err), REAL_LOFAULT
5186 5101  
5187 5102  #if !defined(NIAGARA_IMPL)
5188 5103  .do_copyin:
5189 5104          tst     %o2                     ! check for zero count;  quick exit
5190 5105          bz,pt   %ncc, .ci_smallqx
5191 5106          mov     %o0, SAVE_SRC
5192 5107          mov     %o1, SAVE_DST
↓ open down ↓ 2083 lines elided ↑ open up ↑
7276 7191          nop
7277 7192          ldn     [%o4 + CP_COPYIN], %g2
7278 7193          jmp     %g2
7279 7194          nop
7280 7195  2:
7281 7196          retl
7282 7197          mov     -1, %o0
7283 7198  #endif  /* NIAGARA_IMPL */
7284 7199          SET_SIZE(copyin)
7285 7200  
7286      -#endif  /* lint */
7287      -
7288      -#ifdef  lint
7289      -
7290      -/*ARGSUSED*/
7291      -int
7292      -xcopyin(const void *uaddr, void *kaddr, size_t count)
7293      -{ return (0); }
7294      -
7295      -#else   /* lint */
7296      -
7297 7201          ENTRY(xcopyin)
7298 7202          sethi   %hi(.xcopyin_err), REAL_LOFAULT
7299 7203          b       .do_copyin
7300 7204          or      REAL_LOFAULT, %lo(.xcopyin_err), REAL_LOFAULT
7301 7205  .xcopyin_err:
7302 7206          ldn     [THREAD_REG + T_COPYOPS], %o4
7303 7207          brz     %o4, 2f
7304 7208          nop
7305 7209          ldn     [%o4 + CP_XCOPYIN], %g2
7306 7210          jmp     %g2
7307 7211          nop
7308 7212  2:
7309 7213          retl
7310 7214          mov     %g1, %o0
7311 7215          SET_SIZE(xcopyin)
7312 7216  
7313      -#endif  /* lint */
7314      -
7315      -#ifdef  lint
7316      -
7317      -/*ARGSUSED*/
7318      -int
7319      -xcopyin_little(const void *uaddr, void *kaddr, size_t count)
7320      -{ return (0); }
7321      -
7322      -#else   /* lint */
7323      -
7324 7217          ENTRY(xcopyin_little)
7325 7218          sethi   %hi(.little_err), %o4
7326 7219          ldn     [THREAD_REG + T_LOFAULT], %o5
7327 7220          or      %o4, %lo(.little_err), %o4
7328 7221          membar  #Sync                           ! sync error barrier
7329 7222          stn     %o4, [THREAD_REG + T_LOFAULT]   
7330 7223  
7331 7224          subcc   %g0, %o2, %o3
7332 7225          add     %o0, %o2, %o0
7333 7226          bz,pn   %ncc, 2f                ! check for zero bytes
↓ open down ↓ 13 lines elided ↑ open up ↑
7347 7240          retl
7348 7241          mov     %g0, %o0                ! return (0)
7349 7242  
7350 7243  .little_err:
7351 7244          membar  #Sync                           ! sync error barrier
7352 7245          stn     %o5, [THREAD_REG + T_LOFAULT]   ! restore old t_lofault
7353 7246          retl
7354 7247          mov     %g1, %o0
7355 7248          SET_SIZE(xcopyin_little)
7356 7249  
7357      -#endif  /* lint */
7358 7250  
7359      -
7360 7251  /*
7361 7252   * Copy a block of storage - must not overlap (from + len <= to).
7362 7253   * No fault handler installed (to be called under on_fault())
7363 7254   */
7364      -#if defined(lint)
7365 7255  
7366      -/* ARGSUSED */
7367      -void
7368      -copyin_noerr(const void *ufrom, void *kto, size_t count)
7369      -{}
7370      -
7371      -#else   /* lint */
7372      -
7373 7256          ENTRY(copyin_noerr)
7374 7257          sethi   %hi(.copyio_noerr), REAL_LOFAULT
7375 7258          b       .do_copyin
7376 7259          or      REAL_LOFAULT, %lo(.copyio_noerr), REAL_LOFAULT
7377 7260  .copyio_noerr:
7378 7261          jmp     SAVED_LOFAULT
7379 7262          nop
7380 7263          SET_SIZE(copyin_noerr)
7381 7264  
7382      -#endif /* lint */
7383      -
7384 7265  /*
7385 7266   * Copy a block of storage - must not overlap (from + len <= to).
7386 7267   * No fault handler installed (to be called under on_fault())
7387 7268   */
7388 7269  
7389      -#if defined(lint)
7390      -
7391      -/* ARGSUSED */
7392      -void
7393      -copyout_noerr(const void *kfrom, void *uto, size_t count)
7394      -{}
7395      -
7396      -#else   /* lint */
7397      -
7398 7270          ENTRY(copyout_noerr)
7399 7271          sethi   %hi(.copyio_noerr), REAL_LOFAULT
7400 7272          b       .do_copyout
7401 7273          or      REAL_LOFAULT, %lo(.copyio_noerr), REAL_LOFAULT
7402 7274          SET_SIZE(copyout_noerr)
7403 7275  
7404      -#endif /* lint */
7405      -
7406      -#if defined(lint)
7407      -
7408      -int use_hw_bcopy = 1;
7409      -int use_hw_bzero = 1;
7410      -uint_t hw_copy_limit_1 = 0x100;
7411      -uint_t hw_copy_limit_2 = 0x200;
7412      -uint_t hw_copy_limit_4 = 0x400;
7413      -uint_t hw_copy_limit_8 = 0x400;
7414      -
7415      -#else /* !lint */
7416      -
7417 7276          .align  4
7418 7277          DGDEF(use_hw_bcopy)
7419 7278          .word   1
7420 7279          DGDEF(use_hw_bzero)
7421 7280          .word   1
7422 7281          DGDEF(hw_copy_limit_1)
7423 7282          .word   0x100
7424 7283          DGDEF(hw_copy_limit_2)
7425 7284          .word   0x200
7426 7285          DGDEF(hw_copy_limit_4)
7427 7286          .word   0x400
7428 7287          DGDEF(hw_copy_limit_8)
7429 7288          .word   0x400
7430 7289  
7431 7290          .align  64
7432 7291          .section ".text"
7433      -#endif /* !lint */
7434 7292  
7435 7293  /*
7436 7294   * hwblkclr - clears block-aligned, block-multiple-sized regions that are
7437 7295   * longer than 256 bytes in length using Niagara's block stores/quad store.
7438 7296   * If the criteria for using this routine are not met then it calls bzero
7439 7297   * and returns 1.  Otherwise 0 is returned indicating success.
7440 7298   * Caller is responsible for ensuring use_hw_bzero is true and that
7441 7299   * kpreempt_disable() has been called.
7442 7300   */
7443      -#ifdef lint
7444      -/*ARGSUSED*/
7445      -int
7446      -hwblkclr(void *addr, size_t len)
7447      -{ 
7448      -        return(0);
7449      -}
7450      -#else /* lint */
7451 7301          ! %i0 - start address
7452 7302          ! %i1 - length of region (multiple of 64)
7453 7303  
7454 7304          ENTRY(hwblkclr)
7455 7305          save    %sp, -SA(MINFRAME), %sp
7456 7306  
7457 7307          ! Must be block-aligned
7458 7308          andcc   %i0, 0x3f, %g0
7459 7309          bnz,pn  %ncc, 1f
7460 7310          nop
↓ open down ↓ 77 lines elided ↑ open up ↑
7538 7388  
7539 7389          subcc   %i1, 0x40, %i1
7540 7390          bgu,pt  %ncc, 3b
7541 7391          add     %i0, 0x40, %i0
7542 7392  
7543 7393  .pz_finish:
7544 7394          membar  #Sync
7545 7395          ret
7546 7396          restore %g0, 0, %o0             ! return (bzero or not)
7547 7397          SET_SIZE(hwblkclr)
7548      -#endif  /* lint */
7549 7398  
7550      -#ifdef  lint
7551      -/* Copy 32 bytes of data from src to dst using physical addresses */
7552      -/*ARGSUSED*/
7553      -void
7554      -hw_pa_bcopy32(uint64_t src, uint64_t dst)
7555      -{}
7556      -#else   /*!lint */
7557      -
7558 7399          /*
7559 7400           * Copy 32 bytes of data from src (%o0) to dst (%o1)
7560 7401           * using physical addresses.
7561 7402           */
7562 7403          ENTRY_NP(hw_pa_bcopy32)
7563 7404          rdpr    %pstate, %g1
7564 7405          andn    %g1, PSTATE_IE, %g2
7565 7406          wrpr    %g0, %g2, %pstate
7566 7407  
7567 7408          ldxa    [%o0]ASI_MEM, %o2
↓ open down ↓ 8 lines elided ↑ open up ↑
7576 7417          stxa    %o3, [%o1]ASI_MEM
7577 7418          add     %o1, 8, %o1
7578 7419          stxa    %o4, [%o1]ASI_MEM
7579 7420          add     %o1, 8, %o1
7580 7421          stxa    %o5, [%o1]ASI_MEM
7581 7422  
7582 7423          membar  #Sync
7583 7424          retl
7584 7425          wrpr    %g0, %g1, %pstate
7585 7426          SET_SIZE(hw_pa_bcopy32)
7586      -#endif /* lint */
7587 7427  
7588 7428  /*
7589 7429   * Zero a block of storage.
7590 7430   *
7591 7431   * uzero is used by the kernel to zero a block in user address space.
7592 7432   */
7593 7433  
7594 7434  /*
7595 7435   * Control flow of the bzero/kzero/uzero routine.
7596 7436   *
↓ open down ↓ 4 lines elided ↑ open up ↑
7601 7441   *
7602 7442   *      For sizes greater than 15 bytes, align the address on 8 byte boundary.
7603 7443   *      if (count > 128) {
7604 7444   *              store as many 8-bytes chunks to block align the address
7605 7445   *              store using ASI_BLK_INIT_ST_QUAD_LDD_P (bzero/kzero) OR
7606 7446   *              store using ASI_BLK_INIT_QUAD_LDD_AIUS (uzero)
7607 7447   *      }
7608 7448   *      Store as many 8-byte chunks, followed by trailing bytes.
7609 7449   */
7610 7450  
7611      -#if defined(lint)
7612      -
7613      -/* ARGSUSED */
7614      -int
7615      -kzero(void *addr, size_t count)
7616      -{ return(0); }
7617      -
7618      -/* ARGSUSED */
7619      -void
7620      -uzero(void *addr, size_t count)
7621      -{}
7622      -
7623      -#else   /* lint */
7624      -
7625 7451          ENTRY(uzero)
7626 7452          !
7627 7453          ! Set a new lo_fault handler only if we came in with one
7628 7454          ! already specified.
7629 7455          !
7630 7456          wr      %g0, ASI_USER, %asi
7631 7457          ldn     [THREAD_REG + T_LOFAULT], %o5
7632 7458          tst     %o5
7633 7459          bz,pt   %ncc, .do_zero
7634 7460          sethi   %hi(.zeroerr), %o2
↓ open down ↓ 52 lines elided ↑ open up ↑
7687 7513          ! before we either simply return the error or we invoke the
7688 7514          ! previously specified handler.
7689 7515          !
7690 7516          be      %ncc, 2b
7691 7517          stn     %o5, [THREAD_REG + T_LOFAULT]
7692 7518          jmp     %o5                     ! goto real handler
7693 7519          nop
7694 7520          SET_SIZE(kzero)
7695 7521          SET_SIZE(uzero)
7696 7522  
7697      -#endif  /* lint */
7698      -
7699 7523  /*
7700 7524   * Zero a block of storage.
7701 7525   */
7702 7526  
7703      -#if defined(lint)
7704      -
7705      -/* ARGSUSED */
7706      -void
7707      -bzero(void *addr, size_t count)
7708      -{}
7709      -
7710      -#else   /* lint */
7711      -
7712 7527          ENTRY(bzero)
7713 7528          wr      %g0, ASI_P, %asi
7714 7529  
7715 7530          ldn     [THREAD_REG + T_LOFAULT], %o5   ! save old vector
7716 7531          tst     %o5
7717 7532          bz,pt   %ncc, .do_zero
7718 7533          sethi   %hi(.zeroerr), %o2
7719 7534          or      %o2, %lo(.zeroerr), %o2
7720 7535          membar  #Sync                           ! sync error barrier
7721 7536          stn     %o2, [THREAD_REG + T_LOFAULT]   ! install new vector
↓ open down ↓ 190 lines elided ↑ open up ↑
7912 7727          tst     %o5
7913 7728          bz      %ncc, 1f
7914 7729          andn    %o5, LOFAULT_SET, %o5
7915 7730          membar  #Sync                           ! sync error barrier
7916 7731          stn     %o5, [THREAD_REG + T_LOFAULT]   ! restore old t_lofault
7917 7732  1:
7918 7733          retl
7919 7734          clr     %o0                     ! return (0)
7920 7735  
7921 7736          SET_SIZE(bzero)
7922      -#endif  /* lint */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX