Print this page
de-linting of .s files

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4u/sunfire/ml/fhc_asm.s
          +++ new/usr/src/uts/sun4u/sunfire/ml/fhc_asm.s
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2003 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/machthread.h>
  33   31  #include <sys/asi.h>
  34   32  #include <sys/privregs.h>
  35   33  #include <sys/spitregs.h>
  36   34  
  37      -#if defined(lint)
  38      -
  39      -#else   /* lint */
  40   35  #include "assym.h"
  41      -#endif  /* lint */
  42   36  
  43   37  /*
  44   38   * fhc_shutdown_asm(u_longlong_t base, int size)
  45   39   *
  46   40   * Flush cpu E$ then shutdown.
  47   41   * This function is special in that it really sets the D-tags to
  48   42   * a known state.  And this is the behavior we're looking for.
  49   43   *
  50   44   * The flush address is known to be a cpu-unique non-existent
  51   45   * cacheable address.  We write to non-existent memory, using
  52   46   * the side effect of d-tag invalidation.
  53   47   *
  54   48   * Also, note that this function is never run from main memory.
  55   49   * Rather it is copied to non-cacheable SRAM (hence the ..._end
  56   50   * label at the bottom of the function).  This implies that the
  57   51   * function must be position independent code that doesn't reference 
  58   52   * cacheable real memory.
  59   53   */
  60      -#if defined(lint)
  61   54  
  62      -/*ARGSUSED*/
  63      -void
  64      -fhc_shutdown_asm(u_longlong_t base, int size)
  65      -{}
  66      -
  67      -#else   /* lint */
  68      -
  69   55          ENTRY(fhc_shutdown_asm)
  70   56          ! turn off errors (we'll be writing to non-existent memory)
  71   57          stxa    %g0, [%g0]ASI_ESTATE_ERR
  72   58          membar  #Sync                   ! SYNC
  73   59  
  74   60          rdpr    %pstate, %o4
  75   61          andn    %o4, PSTATE_IE | PSTATE_AM, %o3
  76   62          wrpr    %o3, %g0, %pstate
  77   63  1:
  78   64          brlez,pn %o1, 2f                ! if (len <= 0) exit loop
↓ open down ↓ 8 lines elided ↑ open up ↑
  87   73  
  88   74          ! if, for some reason, this cpu doesn't shutdown, just sit here
  89   75  3:
  90   76          ba      3b
  91   77            nop                           ! eventually the master will notice
  92   78          SET_SIZE(fhc_shutdown_asm)
  93   79  
  94   80          .global fhc_shutdown_asm_end
  95   81  fhc_shutdown_asm_end:
  96   82  
  97      -#endif  /* lint */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX