Print this page
de-linting of .s files

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4u/ml/mach_copy.s
          +++ new/usr/src/uts/sun4u/ml/mach_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 2005 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  
  39      -#if !defined(lint)
  40   37  #include "assym.h"
  41      -#endif  /* lint */
  42   38  
  43   39  #define FP_USED 1
  44   40  #define LOFAULT_SET 2
  45   41  
  46   42  /*
  47   43   * Error barrier:
  48   44   * We use membar sync to establish an error barrier for
  49   45   * deferred errors. Membar syncs are added before any update
  50   46   * to t_lofault to ensure that deferred errors from earlier
  51   47   * accesses will not be reported after the membar. This error
↓ open down ↓ 1 lines elided ↑ open up ↑
  53   49   * errors which tries to distinguish kernel accesses to user
  54   50   * data.
  55   51   */
  56   52  
  57   53  /*
  58   54   * Zero a block of storage.
  59   55   *
  60   56   * uzero is used by the kernel to zero a block in user address space.
  61   57   */
  62   58  
  63      -#if defined(lint)
  64      -
  65      -/* ARGSUSED */
  66      -int
  67      -kzero(void *addr, size_t count)
  68      -{ return(0); }
  69      -
  70      -/* ARGSUSED */
  71      -void
  72      -uzero(void *addr, size_t count)
  73      -{}
  74      -
  75      -#else   /* lint */
  76      -
  77   59          ENTRY(uzero)
  78   60          !
  79   61          ! Set a new lo_fault handler only if we came in with one
  80   62          ! already specified.
  81   63          !
  82   64          wr      %g0, ASI_USER, %asi
  83   65          ldn     [THREAD_REG + T_LOFAULT], %o5
  84   66          tst     %o5
  85   67          bz,pt   %ncc, .do_zero
  86   68          sethi   %hi(.zeroerr), %o2
↓ open down ↓ 60 lines elided ↑ open up ↑
 147  129          ! before we either simply return the error or we invoke the
 148  130          ! previously specified handler.
 149  131          !
 150  132          be      %ncc, 2b
 151  133          stn     %o5, [THREAD_REG + T_LOFAULT]
 152  134          jmp     %o5                     ! goto real handler
 153  135            nop
 154  136          SET_SIZE(kzero)
 155  137          SET_SIZE(uzero)
 156  138  
 157      -#endif  /* lint */
 158      -
 159  139  /*
 160  140   * Zero a block of storage.
 161  141   */
 162  142  
 163      -#if defined(lint)
 164      -
 165      -/* ARGSUSED */
 166      -void
 167      -bzero(void *addr, size_t count)
 168      -{}
 169      -
 170      -#else   /* lint */
 171      -
 172  143          ENTRY(bzero)
 173  144          wr      %g0, ASI_P, %asi
 174  145  
 175  146          ldn     [THREAD_REG + T_LOFAULT], %o5   ! save old vector
 176  147          tst     %o5
 177  148          bz,pt   %ncc, .do_zero
 178  149          sethi   %hi(.zeroerr), %o2
 179  150          or      %o2, %lo(.zeroerr), %o2
 180  151          membar  #Sync                           ! sync error barrier
 181  152          stn     %o2, [THREAD_REG + T_LOFAULT]   ! install new vector
↓ open down ↓ 285 lines elided ↑ open up ↑
 467  438          tst     %o5
 468  439          bz      %ncc, 1f
 469  440          andn    %o5, LOFAULT_SET, %o5
 470  441          membar  #Sync                           ! sync error barrier
 471  442          stn     %o5, [THREAD_REG + T_LOFAULT]   ! restore old t_lofault
 472  443  1:
 473  444          retl
 474  445          clr     %o0                     ! return (0)
 475  446  
 476  447          SET_SIZE(bzero)
 477      -#endif  /* lint */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX