Print this page
de-linting of .s files

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4u/cpu/cheetah_copy.s
          +++ new/usr/src/uts/sun4u/cpu/cheetah_copy.s
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
  23   23   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  28      -
  29   27  #include <sys/param.h>
  30   28  #include <sys/errno.h>
  31   29  #include <sys/asm_linkage.h>
  32   30  #include <sys/vtrace.h>
  33   31  #include <sys/machthread.h>
  34   32  #include <sys/clock.h>
  35   33  #include <sys/asi.h>
  36   34  #include <sys/fsr.h>
  37   35  #include <sys/privregs.h>
  38   36  #include <sys/fpras_impl.h>
  39   37  
  40      -#if !defined(lint)
  41   38  #include "assym.h"
  42      -#endif  /* lint */
  43   39  
  44   40  /*
  45   41   * Pseudo-code to aid in understanding the control flow of the
  46   42   * bcopy/copyin/copyout routines.
  47   43   *
  48   44   * On entry:
  49   45   *
  50   46   *      ! Determine whether to use the FP register version
  51   47   *      ! or the leaf routine version depending on size
  52   48   *      ! of copy and flags.  Set up error handling accordingly.
↓ open down ↓ 561 lines elided ↑ open up ↑
 614  610   * on block load).
 615  611   *
 616  612   * Similarly: a membar #Sync before restore allows the block stores of
 617  613   * the copy operation to complete before we fill the quadrants with their
 618  614   * original data, and a membar #Sync after restore lets the block loads
 619  615   * of the restore complete before we return to whoever has the fp regs
 620  616   * in use.  To avoid repeated membar #Sync we make it the responsibility
 621  617   * of the copy code to membar #Sync immediately after copy is complete
 622  618   * and before using the BLD_*_FROMSTACK macro.
 623  619   */
 624      -#if !defined(lint)
 625  620  #define BST_FPQ1Q3_TOSTACK(tmp1)                                \
 626  621          /* membar #Sync */                                      ;\
 627  622          add     %fp, STACK_BIAS - SAVED_FPREGS_ADJUST, tmp1     ;\
 628  623          and     tmp1, -VIS_BLOCKSIZE, tmp1 /* block align */    ;\
 629  624          stda    %f0, [tmp1]ASI_BLK_P                            ;\
 630  625          add     tmp1, VIS_BLOCKSIZE, tmp1                       ;\
 631  626          stda    %f32, [tmp1]ASI_BLK_P                           ;\
 632  627          membar  #Sync
 633  628  
 634  629  #define BLD_FPQ1Q3_FROMSTACK(tmp1)                              \
↓ open down ↓ 15 lines elided ↑ open up ↑
 650  645          membar  #Sync
 651  646  
 652  647  #define BLD_FPQ2Q4_FROMSTACK(tmp1)                              \
 653  648          /* membar #Sync - provided at copy completion */        ;\
 654  649          add     %fp, STACK_BIAS - SAVED_FPREGS_ADJUST, tmp1     ;\
 655  650          and     tmp1, -VIS_BLOCKSIZE, tmp1 /* block align */    ;\
 656  651          ldda    [tmp1]ASI_BLK_P, %f16                           ;\
 657  652          add     tmp1, VIS_BLOCKSIZE, tmp1                       ;\
 658  653          ldda    [tmp1]ASI_BLK_P, %f48                           ;\
 659  654          membar  #Sync
 660      -#endif
 661  655  
 662  656  /*
 663  657   * FP_NOMIGRATE and FP_ALLOWMIGRATE.  Prevent migration (or, stronger,
 664  658   * prevent preemption if there is no t_lwp to save FP state to on context
 665  659   * switch) before commencing a FP copy, and reallow it on completion or
 666  660   * in error trampoline paths when we were using FP copy.
 667  661   *
 668  662   * Both macros may call other functions, so be aware that all outputs are
 669  663   * forfeit after using these macros.  For this reason we do not pass registers
 670  664   * to use - we just use any outputs we want.
↓ open down ↓ 59 lines elided ↑ open up ↑
 730  724          call    kpreempt                                        ;\
 731  725            rdpr  %pil, %o0                                       ;\
 732  726  label2:
 733  727  
 734  728  /*
 735  729   * Copy a block of storage, returning an error code if `from' or
 736  730   * `to' takes a kernel pagefault which cannot be resolved.
 737  731   * Returns errno value on pagefault error, 0 if all ok
 738  732   */
 739  733  
 740      -#if defined(lint)
 741      -
 742      -/* ARGSUSED */
 743      -int
 744      -kcopy(const void *from, void *to, size_t count)
 745      -{ return(0); }
 746      -
 747      -#else   /* lint */
 748      -
 749  734          .seg    ".text"
 750  735          .align  4
 751  736  
 752  737          ENTRY(kcopy)
 753  738  
 754  739          cmp     %o2, VIS_COPY_THRESHOLD         ! check for leaf rtn case
 755  740          bleu,pt %ncc, .kcopy_small              ! go to larger cases
 756  741            xor   %o0, %o1, %o3                   ! are src, dst alignable?
 757  742          btst    7, %o3                          !
 758  743          bz,pt   %ncc, .kcopy_8                  ! check for longword alignment
↓ open down ↓ 147 lines elided ↑ open up ↑
 906  891          andn    %o4, TRAMP_FLAG, %o4
 907  892          bnz,pn  %ncc, 3f
 908  893            stn   %o4, [THREAD_REG + T_LOFAULT]   ! restore old t_lofault
 909  894          retl
 910  895            mov   %g1, %o0
 911  896  3:
 912  897          jmp     %o4                             ! goto real handler
 913  898            mov   %g0, %o0                        ! 
 914  899  
 915  900          SET_SIZE(kcopy)
 916      -#endif  /* lint */
 917  901  
 918  902  
 919  903  /*
 920  904   * Copy a block of storage - must not overlap (from + len <= to).
 921  905   * Registers: l6 - saved t_lofault
 922  906   * (for short copies, o4 - saved t_lofault)
 923  907   *
 924  908   * Copy a page of memory.
 925  909   * Assumes double word alignment and a count >= 256.
 926  910   */
 927      -#if defined(lint)
 928  911  
 929      -/* ARGSUSED */
 930      -void
 931      -bcopy(const void *from, void *to, size_t count)
 932      -{}
 933      -
 934      -#else   /* lint */
 935      -
 936  912          ENTRY(bcopy)
 937  913  
 938  914          cmp     %o2, VIS_COPY_THRESHOLD         ! check for leaf rtn case
 939  915          bleu,pt %ncc, .bcopy_small              ! go to larger cases
 940  916            xor   %o0, %o1, %o3                   ! are src, dst alignable?
 941  917          btst    7, %o3                          !
 942  918          bz,pt   %ncc, .bcopy_8                  ! check for longword alignment
 943  919            nop
 944  920          btst    1, %o3                          ! 
 945  921          bz,pt   %ncc, .bcopy_2                  ! check for half-word
↓ open down ↓ 549 lines elided ↑ open up ↑
1495 1471  2:
1496 1472          membar  #Sync                           ! sync error barrier
1497 1473          andn    %l6, MASK_FLAGS, %l6
1498 1474          stn     %l6, [THREAD_REG + T_LOFAULT]   ! restore old t_lofault
1499 1475          FP_ALLOWMIGRATE(5, 6)
1500 1476          ret
1501 1477            restore       %g0, 0, %o0
1502 1478  
1503 1479          SET_SIZE(bcopy_more)
1504 1480  
1505      -#endif  /* lint */
1506      -
1507 1481  /*
1508 1482   * Block copy with possibly overlapped operands.
1509 1483   */
1510 1484  
1511      -#if defined(lint)
1512      -
1513      -/*ARGSUSED*/
1514      -void
1515      -ovbcopy(const void *from, void *to, size_t count)
1516      -{}
1517      -
1518      -#else   /* lint */
1519      -
1520 1485          ENTRY(ovbcopy)
1521 1486          tst     %o2                     ! check count
1522 1487          bgu,a   %ncc, 1f                ! nothing to do or bad arguments
1523 1488            subcc %o0, %o1, %o3           ! difference of from and to address
1524 1489  
1525 1490          retl                            ! return
1526 1491            nop
1527 1492  1:
1528 1493          bneg,a  %ncc, 2f
1529 1494            neg   %o3                     ! if < 0, make it positive
↓ open down ↓ 23 lines elided ↑ open up ↑
1553 1518          deccc   %o2                     ! dec count
1554 1519          ldub    [%o0 + %o2], %o3        ! get byte at end of src
1555 1520          bgu     %ncc, .ov_bkwd          ! loop till done
1556 1521            stb   %o3, [%o1 + %o2]        ! delay slot, store at end of dst
1557 1522  
1558 1523          retl                            ! return
1559 1524            nop
1560 1525  
1561 1526          SET_SIZE(ovbcopy)
1562 1527  
1563      -#endif  /* lint */
1564 1528  
1565      -
1566 1529  /*
1567 1530   * hwblkpagecopy()
1568 1531   *
1569 1532   * Copies exactly one page.  This routine assumes the caller (ppcopy)
1570 1533   * has already disabled kernel preemption and has checked
1571 1534   * use_hw_bcopy.  Preventing preemption also prevents cpu migration.
1572 1535   */
1573      -#ifdef lint
1574      -/*ARGSUSED*/
1575      -void
1576      -hwblkpagecopy(const void *src, void *dst)
1577      -{ }
1578      -#else /* lint */
1579 1536          ENTRY(hwblkpagecopy)
1580 1537          ! get another window w/space for three aligned blocks of saved fpregs
1581 1538          save    %sp, -SA(MINFRAME + HWCOPYFRAMESIZE), %sp
1582 1539  
1583 1540          ! %i0 - source address (arg)
1584 1541          ! %i1 - destination address (arg)
1585 1542          ! %i2 - length of region (not arg)
1586 1543          ! %l0 - saved fprs
1587 1544          ! %l1 - pointer to saved fpregs
1588 1545  
↓ open down ↓ 107 lines elided ↑ open up ↑
1696 1653          ba      3f
1697 1654            nop
1698 1655  
1699 1656  2:      FZEROQ1Q3
1700 1657  
1701 1658  3:      wr      %l0, 0, %fprs           ! restore fprs
1702 1659          ret
1703 1660            restore       %g0, 0, %o0
1704 1661  
1705 1662          SET_SIZE(hwblkpagecopy)
1706      -#endif  /* lint */
1707 1663  
1708 1664  
1709 1665  /*
1710 1666   * Transfer data to and from user space -
1711 1667   * Note that these routines can cause faults
1712 1668   * It is assumed that the kernel has nothing at
1713 1669   * less than KERNELBASE in the virtual address space.
1714 1670   *
1715 1671   * Note that copyin(9F) and copyout(9F) are part of the
1716 1672   * DDI/DKI which specifies that they return '-1' on "errors."
↓ open down ↓ 38 lines elided ↑ open up ↑
1755 1711   *
1756 1712   * See the description of bcopy above for more details of the
1757 1713   * data copying algorithm and the default limits.
1758 1714   *
1759 1715   */
1760 1716  
1761 1717  /*
1762 1718   * Copy kernel data to user space (copyout/xcopyout/xcopyout_little).
1763 1719   */
1764 1720  
1765      -#if defined(lint)
1766      -
1767      -
1768      -#else   /* lint */
1769 1721  /*
1770 1722   * We save the arguments in the following registers in case of a fault:
1771 1723   *      kaddr - %l1
1772 1724   *      uaddr - %l2
1773 1725   *      count - %l3
1774 1726   */
1775 1727  #define SAVE_SRC        %l1
1776 1728  #define SAVE_DST        %l2
1777 1729  #define SAVE_COUNT      %l3
1778 1730  
↓ open down ↓ 46 lines elided ↑ open up ↑
1825 1777          FP_ALLOWMIGRATE(5, 6)
1826 1778  
1827 1779          mov     SAVE_SRC, %i0
1828 1780          mov     SAVE_DST, %i1
1829 1781          jmp     REAL_LOFAULT
1830 1782            mov   SAVE_COUNT, %i2
1831 1783  
1832 1784          SET_SIZE(copyio_fault)
1833 1785  
1834 1786  
1835      -#endif
1836      -
1837      -#if defined(lint)
1838      -
1839      -/*ARGSUSED*/
1840      -int
1841      -copyout(const void *kaddr, void *uaddr, size_t count)
1842      -{ return (0); }
1843      -
1844      -#else   /* lint */
1845      -
1846 1787          ENTRY(copyout)
1847 1788  
1848 1789          cmp     %o2, VIS_COPY_THRESHOLD         ! check for leaf rtn case
1849 1790          bleu,pt %ncc, .copyout_small            ! go to larger cases
1850 1791            xor   %o0, %o1, %o3                   ! are src, dst alignable?
1851 1792          btst    7, %o3                          !
1852 1793          bz,pt   %ncc, .copyout_8                ! check for longword alignment
1853 1794            nop
1854 1795          btst    1, %o3                          ! 
1855 1796          bz,pt   %ncc, .copyout_2                ! check for half-word
↓ open down ↓ 604 lines elided ↑ open up ↑
2460 2401          ldn     [%o4 + CP_COPYOUT], %g2         ! if handler, invoke it with
2461 2402          jmp     %g2                             ! original arguments
2462 2403            restore %g0, 0, %g0                   ! dispose of copy window
2463 2404  2:
2464 2405          ret
2465 2406            restore %g0, -1, %o0                  ! return error value
2466 2407  
2467 2408  
2468 2409          SET_SIZE(copyout_more)
2469 2410  
2470      -#endif  /* lint */
2471 2411  
2472      -
2473      -#ifdef  lint
2474      -
2475      -/*ARGSUSED*/
2476      -int
2477      -xcopyout(const void *kaddr, void *uaddr, size_t count)
2478      -{ return (0); }
2479      -
2480      -#else   /* lint */
2481      -
2482 2412          ENTRY(xcopyout)
2483 2413          cmp     %o2, VIS_COPY_THRESHOLD         ! check for leaf rtn case
2484 2414          bleu,pt %ncc, .xcopyout_small           ! go to larger cases
2485 2415            xor   %o0, %o1, %o3                   ! are src, dst alignable?
2486 2416          btst    7, %o3                          !
2487 2417          bz,pt   %ncc, .xcopyout_8               !
2488 2418            nop
2489 2419          btst    1, %o3                          ! 
2490 2420          bz,pt   %ncc, .xcopyout_2               ! check for half-word
2491 2421            nop
↓ open down ↓ 84 lines elided ↑ open up ↑
2576 2506            nop
2577 2507          ldn     [%o3 + CP_XCOPYOUT], %o5        ! if handler, invoke it with
2578 2508          jmp     %o5                             ! original arguments
2579 2509            nop
2580 2510  3:
2581 2511          retl
2582 2512            or    %g1, 0, %o0             ! return errno value
2583 2513  
2584 2514          SET_SIZE(xcopyout)
2585 2515  
2586      -#endif  /* lint */
2587      -        
2588      -#ifdef  lint
2589      -
2590      -/*ARGSUSED*/
2591      -int
2592      -xcopyout_little(const void *kaddr, void *uaddr, size_t count)
2593      -{ return (0); }
2594      -
2595      -#else   /* lint */
2596      -
2597 2516          ENTRY(xcopyout_little)
2598 2517          sethi   %hi(.xcopyio_err), %o5
2599 2518          or      %o5, %lo(.xcopyio_err), %o5
2600 2519          ldn     [THREAD_REG + T_LOFAULT], %o4
2601 2520          membar  #Sync                           ! sync error barrier
2602 2521          stn     %o5, [THREAD_REG + T_LOFAULT]
2603 2522          mov     %o4, %o5
2604 2523  
2605 2524          subcc   %g0, %o2, %o3
2606 2525          add     %o0, %o2, %o0
↓ open down ↓ 10 lines elided ↑ open up ↑
2617 2536            ldub  [%o0 + %o3], %o4
2618 2537  
2619 2538  2:
2620 2539          membar  #Sync                           ! sync error barrier
2621 2540          stn     %o5, [THREAD_REG + T_LOFAULT]   ! restore old t_lofault
2622 2541          retl
2623 2542            mov   %g0, %o0                ! return (0)
2624 2543  
2625 2544          SET_SIZE(xcopyout_little)
2626 2545  
2627      -#endif  /* lint */
2628      -
2629 2546  /*
2630 2547   * Copy user data to kernel space (copyin/xcopyin/xcopyin_little)
2631 2548   */
2632 2549  
2633      -#if defined(lint)
2634      -
2635      -/*ARGSUSED*/
2636      -int
2637      -copyin(const void *uaddr, void *kaddr, size_t count)
2638      -{ return (0); }
2639      -
2640      -#else   /* lint */
2641      -
2642 2550          ENTRY(copyin)
2643 2551          cmp     %o2, VIS_COPY_THRESHOLD         ! check for leaf rtn case
2644 2552          bleu,pt %ncc, .copyin_small             ! go to larger cases
2645 2553            xor   %o0, %o1, %o3                   ! are src, dst alignable?
2646 2554          btst    7, %o3                          !
2647 2555          bz,pt   %ncc, .copyin_8                 ! check for longword alignment
2648 2556            nop
2649 2557          btst    1, %o3                          ! 
2650 2558          bz,pt   %ncc, .copyin_2                 ! check for half-word
2651 2559            nop
↓ open down ↓ 595 lines elided ↑ open up ↑
3247 3155          ldn     [%o4 + CP_COPYIN], %g2          ! if handler, invoke it with
3248 3156          jmp     %g2                             ! original arguments
3249 3157          restore %g0, 0, %g0                     ! dispose of copy window
3250 3158  2:
3251 3159          ret
3252 3160          restore %g0, -1, %o0                    ! return error value
3253 3161  
3254 3162  
3255 3163          SET_SIZE(copyin_more)
3256 3164  
3257      -#endif  /* lint */
3258      -
3259      -#ifdef  lint
3260      -
3261      -/*ARGSUSED*/
3262      -int
3263      -xcopyin(const void *uaddr, void *kaddr, size_t count)
3264      -{ return (0); }
3265      -
3266      -#else   /* lint */
3267      -
3268 3165          ENTRY(xcopyin)
3269 3166  
3270 3167          cmp     %o2, VIS_COPY_THRESHOLD         ! check for leaf rtn case
3271 3168          bleu,pt %ncc, .xcopyin_small            ! go to larger cases
3272 3169            xor   %o0, %o1, %o3                   ! are src, dst alignable?
3273 3170          btst    7, %o3                          !
3274 3171          bz,pt   %ncc, .xcopyin_8                ! check for longword alignment
3275 3172            nop
3276 3173          btst    1, %o3                          ! 
3277 3174          bz,pt   %ncc, .xcopyin_2                ! check for half-word
↓ open down ↓ 85 lines elided ↑ open up ↑
3363 3260            nop
3364 3261          ldn     [%o3 + CP_XCOPYIN], %o5         ! if handler, invoke it with
3365 3262          jmp     %o5                             ! original arguments
3366 3263            nop
3367 3264  3:
3368 3265          retl
3369 3266            or    %g1, 0, %o0             ! return errno value
3370 3267  
3371 3268          SET_SIZE(xcopyin)
3372 3269  
3373      -#endif  /* lint */
3374      -
3375      -#ifdef  lint
3376      -
3377      -/*ARGSUSED*/
3378      -int
3379      -xcopyin_little(const void *uaddr, void *kaddr, size_t count)
3380      -{ return (0); }
3381      -
3382      -#else   /* lint */
3383      -
3384 3270          ENTRY(xcopyin_little)
3385 3271          sethi   %hi(.xcopyio_err), %o5
3386 3272          or      %o5, %lo(.xcopyio_err), %o5
3387 3273          ldn     [THREAD_REG + T_LOFAULT], %o4
3388 3274          membar  #Sync                           ! sync error barrier
3389 3275          stn     %o5, [THREAD_REG + T_LOFAULT]   
3390 3276          mov     %o4, %o5
3391 3277  
3392 3278          subcc   %g0, %o2, %o3
3393 3279          add     %o0, %o2, %o0
↓ open down ↓ 16 lines elided ↑ open up ↑
3410 3296            mov   %g0, %o0                ! return (0)
3411 3297  
3412 3298  .xcopyio_err:
3413 3299          membar  #Sync                           ! sync error barrier
3414 3300          stn     %o5, [THREAD_REG + T_LOFAULT]   ! restore old t_lofault
3415 3301          retl
3416 3302            mov   %g1, %o0
3417 3303  
3418 3304          SET_SIZE(xcopyin_little)
3419 3305  
3420      -#endif  /* lint */
3421 3306  
3422      -
3423 3307  /*
3424 3308   * Copy a block of storage - must not overlap (from + len <= to).
3425 3309   * No fault handler installed (to be called under on_fault())
3426 3310   */
3427      -#if defined(lint)
3428      -
3429      -/* ARGSUSED */
3430      -void
3431      -copyin_noerr(const void *ufrom, void *kto, size_t count)
3432      -{}
3433      -
3434      -#else   /* lint */
3435 3311          ENTRY(copyin_noerr)
3436 3312  
3437 3313          cmp     %o2, VIS_COPY_THRESHOLD         ! check for leaf rtn case
3438 3314          bleu,pt %ncc, .copyin_ne_small          ! go to larger cases
3439 3315            xor   %o0, %o1, %o3                   ! are src, dst alignable?
3440 3316          btst    7, %o3                          !
3441 3317          bz,pt   %ncc, .copyin_ne_8              ! check for longword alignment
3442 3318            nop
3443 3319          btst    1, %o3                          ! 
3444 3320          bz,pt   %ncc, .copyin_ne_2              ! check for half-word
↓ open down ↓ 63 lines elided ↑ open up ↑
3508 3384          jmp     %l6
3509 3385            restore %g0,0,%g0
3510 3386  
3511 3387  .sm_copyio_noerr:
3512 3388          membar  #Sync
3513 3389          stn     %o4, [THREAD_REG + T_LOFAULT]   ! restore t_lofault
3514 3390          jmp     %o4
3515 3391            nop
3516 3392  
3517 3393          SET_SIZE(copyin_noerr)
3518      -#endif /* lint */
3519 3394  
3520 3395  /*
3521 3396   * Copy a block of storage - must not overlap (from + len <= to).
3522 3397   * No fault handler installed (to be called under on_fault())
3523 3398   */
3524 3399  
3525      -#if defined(lint)
3526      -
3527      -/* ARGSUSED */
3528      -void
3529      -copyout_noerr(const void *kfrom, void *uto, size_t count)
3530      -{}
3531      -
3532      -#else   /* lint */
3533 3400          ENTRY(copyout_noerr)
3534 3401  
3535 3402          cmp     %o2, VIS_COPY_THRESHOLD         ! check for leaf rtn case
3536 3403          bleu,pt %ncc, .copyout_ne_small         ! go to larger cases
3537 3404            xor   %o0, %o1, %o3                   ! are src, dst alignable?
3538 3405          btst    7, %o3                          !
3539 3406          bz,pt   %ncc, .copyout_ne_8             ! check for longword alignment
3540 3407            nop
3541 3408          btst    1, %o3                          ! 
3542 3409          bz,pt   %ncc, .copyout_ne_2             ! check for half-word
↓ open down ↓ 53 lines elided ↑ open up ↑
3596 3463          ba,pt   %ncc, .sm_do_copyout
3597 3464          stn     %o5, [THREAD_REG + T_LOFAULT]   ! set/save t_lofault
3598 3465  
3599 3466  .copyout_noerr_more:
3600 3467          save    %sp, -SA(MINFRAME + HWCOPYFRAMESIZE), %sp
3601 3468          sethi   %hi(.copyio_noerr), REAL_LOFAULT
3602 3469          ba,pt   %ncc, .do_copyout
3603 3470            or    REAL_LOFAULT, %lo(.copyio_noerr), REAL_LOFAULT
3604 3471  
3605 3472          SET_SIZE(copyout_noerr)
3606      -#endif /* lint */
3607 3473  
3608 3474  
3609 3475  /*
3610 3476   * hwblkclr - clears block-aligned, block-multiple-sized regions that are
3611 3477   * longer than 256 bytes in length using spitfire's block stores.  If
3612 3478   * the criteria for using this routine are not met then it calls bzero
3613 3479   * and returns 1.  Otherwise 0 is returned indicating success.
3614 3480   * Caller is responsible for ensuring use_hw_bzero is true and that
3615 3481   * kpreempt_disable() has been called.
3616 3482   */
3617      -#ifdef lint
3618      -/*ARGSUSED*/
3619      -int
3620      -hwblkclr(void *addr, size_t len)
3621      -{ 
3622      -        return(0);
3623      -}
3624      -#else /* lint */
3625 3483          ! %i0 - start address
3626 3484          ! %i1 - length of region (multiple of 64)
3627 3485          ! %l0 - saved fprs
3628 3486          ! %l1 - pointer to saved %d0 block
3629 3487          ! %l2 - saved curthread->t_lwp
3630 3488  
3631 3489          ENTRY(hwblkclr)
3632 3490          ! get another window w/space for one aligned block of saved fpregs
3633 3491          save    %sp, -SA(MINFRAME + 2*VIS_BLOCKSIZE), %sp
3634 3492  
↓ open down ↓ 80 lines elided ↑ open up ↑
3715 3573          ! restore fpregs from stack
3716 3574          ldda    [%l1]ASI_BLK_P, %d0
3717 3575          membar  #Sync
3718 3576          wr      %l0, 0, %fprs           ! restore fprs
3719 3577  
3720 3578  .pz_finished:
3721 3579          ret
3722 3580            restore       %g0, 0, %o0             ! return (bzero or not)
3723 3581  
3724 3582          SET_SIZE(hwblkclr)
3725      -#endif  /* lint */
3726 3583  
3727      -#ifdef lint
3728      -/*ARGSUSED*/
3729      -void
3730      -hw_pa_bcopy32(uint64_t src, uint64_t dst)
3731      -{}
3732      -#else /*!lint */
3733 3584          /*
3734 3585           * Copy 32 bytes of data from src (%o0) to dst (%o1)
3735 3586           * using physical addresses.
3736 3587           */
3737 3588          ENTRY_NP(hw_pa_bcopy32)
3738 3589          rdpr    %pstate, %g1
3739 3590          andn    %g1, PSTATE_IE, %g2
3740 3591          wrpr    %g0, %g2, %pstate
3741 3592  
3742 3593          rdpr    %pstate, %g0
↓ open down ↓ 14 lines elided ↑ open up ↑
3757 3608          add     %o1, 8, %o1
3758 3609          stxa    %o4, [%o1]ASI_MEM
3759 3610          add     %o1, 8, %o1
3760 3611          stxa    %o5, [%o1]ASI_MEM
3761 3612  
3762 3613          retl
3763 3614            wrpr    %g0, %g1, %pstate
3764 3615  
3765 3616          SET_SIZE(hw_pa_bcopy32)
3766 3617  
3767      -#endif /* lint */
3768      -
3769      -#if defined(lint)
3770      -
3771      -int use_hw_bcopy = 1;
3772      -int use_hw_bzero = 1;
3773      -uint_t hw_copy_limit_1 = 0;
3774      -uint_t hw_copy_limit_2 = 0;
3775      -uint_t hw_copy_limit_4 = 0;
3776      -uint_t hw_copy_limit_8 = 0;
3777      -
3778      -#else /* !lint */
3779      -
3780 3618          DGDEF(use_hw_bcopy)
3781 3619          .word   1
3782 3620          DGDEF(use_hw_bzero)
3783 3621          .word   1
3784 3622          DGDEF(hw_copy_limit_1)
3785 3623          .word   0
3786 3624          DGDEF(hw_copy_limit_2)
3787 3625          .word   0
3788 3626          DGDEF(hw_copy_limit_4)
3789 3627          .word   0
3790 3628          DGDEF(hw_copy_limit_8)
3791 3629          .word   0
3792 3630  
3793 3631          .align  64
3794 3632          .section ".text"
3795      -#endif /* !lint */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX