Print this page
de-linting of .s files

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4u/opl/ml/drmach_asm.s
          +++ new/usr/src/uts/sun4u/opl/ml/drmach_asm.s
↓ open down ↓ 22 lines elided ↑ open up ↑
  23   23   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  /*
  28   28   * This file is through cpp before being used as
  29   29   * an inline.  It contains support routines used
  30   30   * only by DR for the copy-rename sequence.
  31   31   */
  32   32  
  33      -#if defined(lint)
  34      -#include <sys/types.h>
  35      -#else
  36   33  #include "assym.h"
  37   34  #include "drmach_offsets.h"
  38      -#endif /* lint */
  39   35  
  40   36  #include <sys/asm_linkage.h>
  41   37  #include <sys/param.h>
  42   38  #include <sys/privregs.h>
  43   39  #include <sys/spitregs.h>
  44   40  #include <sys/mmu.h>
  45   41  #include <sys/machthread.h>
  46   42  #include <sys/pte.h>
  47   43  #include <sys/stack.h>
  48   44  #include <sys/vis.h>
  49   45  #include <sys/intreg.h>
  50   46  #include <sys/cheetahregs.h>
  51   47  #include <sys/drmach.h>
  52   48  #include <sys/sbd_ioctl.h>
  53   49  
  54      -#if !defined(lint)
  55      -
  56   50  /*
  57   51   * turn off speculative mode to prevent unwanted memory access
  58   52   * when we are in the FMEM loops
  59   53   */
  60   54  
  61   55  #define FJSV_SPECULATIVE_OFF(reg, tmp1, tmp2)                           \
  62   56          rdpr    %pstate, reg                                            ;\
  63   57          andn    reg, PSTATE_IE, tmp1                                    ;\
  64   58          wrpr    %g0, tmp1, %pstate                                      ;\
  65   59          ldxa    [%g0]ASI_MCNTL, tmp1                                    ;\
  66   60          set     1, tmp2                                                 ;\
  67   61          sllx    tmp2, MCNTL_SPECULATIVE_SHIFT, tmp2                                             ;\
  68   62          or      tmp1, tmp2, tmp1                                        ;\
  69   63          stxa    tmp1, [%g0]ASI_MCNTL                                    ;\
  70   64          membar #Sync
  71      -#endif
  72   65  
  73   66  
  74      -#if defined(lint)
  75      -/*ARGSUSED*/
  76      -void
  77      -drmach_fmem_loop_script(caddr_t critical, int size, caddr_t stat)
  78      -{ return; }
  79      -#else /* lint */
  80   67          .align  8
  81   68          ENTRY_NP(drmach_fmem_loop_script)
  82   69          /* turn off speculative mode */
  83   70          FJSV_SPECULATIVE_OFF(%o5, %o3, %o4);
  84   71  
  85   72          /* read the critical region to get everything in the cache */
  86   73          mov     %o0, %o3
  87   74  0:
  88   75          ldx     [%o3], %o4
  89   76          sub     %o1, 8, %o1
↓ open down ↓ 61 lines elided ↑ open up ↑
 151  138  .align 8
 152  139  5:
 153  140          ALTENTRY(drmach_fmem_loop_script_rtn)
 154  141          /*
 155  142           * busy wait will affect sibling strands so
 156  143           * we put sleep instruction in the delay slot
 157  144           */
 158  145          ba      2b
 159  146  .word    0x81b01060
 160  147          SET_SIZE(drmach_fmem_loop_script)
 161      -#endif /* lint */
 162  148  
 163      -#if defined(lint)
 164      -/*ARGSUSED*/
 165      -void
 166      -drmach_flush_icache(void)
 167      -{ return; }
 168      -#else /* lint */
 169  149          .align  8
 170  150          ENTRY_NP(drmach_flush_icache)
 171  151          stxa    %g0, [%g0]ASI_ALL_FLUSH_L1I
 172  152          membar  #Sync
 173  153          retl
 174  154           nop
 175  155          SET_SIZE(drmach_flush_icache)
 176      -#endif
 177  156  
 178      -#if defined(lint)
 179      -/*ARGSUSED*/
 180      -int
 181      -drmach_fmem_exec_script(caddr_t critical, int size)
 182      -{ return (0); }
 183      -#else /* lint */
 184  157  .align 32
 185  158          ENTRY_NP(drmach_fmem_exec_script)
 186  159          /* turn off speculative mode */
 187  160          FJSV_SPECULATIVE_OFF(%o5, %o3, %o4);
 188  161          /* save locals to save area */
 189  162          add     %o0, SAVE_LOCAL, %o2
 190  163          stx     %l0, [%o2+8*0]
 191  164          stx     %l1, [%o2+8*1]
 192  165          stx     %l2, [%o2+8*2]
 193  166          stx     %l3, [%o2+8*3]
↓ open down ↓ 254 lines elided ↑ open up ↑
 448  421          cmp     %l5, %l2
 449  422          bge     %xcc, 3b
 450  423           nop
 451  424          set     EOPL_FMEM_TIMEOUT, %o4
 452  425  
 453  426          /* we are done or timed out */
 454  427  6:
 455  428          ba,a    1b
 456  429           nop
 457  430          SET_SIZE(drmach_fmem_exec_script)
 458      -#endif /* lint */
 459  431  
 460      -#if defined(lint)
 461      -/*ARGSUSED*/
 462      -void
 463      -drmach_fmem_exec_script_end(caddr_t critical, int size)
 464      -{ return; }
 465      -#else /* lint */
 466  432          ENTRY_NP(drmach_fmem_exec_script_end)
 467  433          nop
 468  434          SET_SIZE(drmach_fmem_exec_script_end)
 469      -#endif /* lint */
 470  435  
 471      -#if defined(lint)
 472      -uint64_t
 473      -patch_inst(uint64_t *x, uint64_t y)
 474      -{
 475      -        *x = y;
 476      -        return (0);
 477      -}
 478      -
 479      -#else   /* lint */
 480      -
 481  436          ENTRY_NP(patch_inst)
 482  437          ldx     [%o0], %o2
 483  438          casx    [%o0], %o2, %o1
 484  439          flush   %o0
 485  440          membar #Sync
 486  441          ldx     [%o0], %o2
 487  442          retl
 488  443           mov    %o2, %o0
 489  444          SET_SIZE(patch_inst)
 490  445  
 491      -#endif /* lint */
 492      -
 493      -#if defined(lint)
 494      -void
 495      -drmach_sys_trap()
 496      -{
 497      -}
 498      -#else   /* lint */
 499  446          ENTRY_NP(drmach_sys_trap)
 500  447          mov     -1, %g4
 501  448          set     sys_trap, %g5
 502  449          jmp     %g5
 503  450           nop
 504  451          SET_SIZE(drmach_sys_trap)
 505      -#endif /* lint */
 506  452  
 507      -#if defined(lint)
 508      -uint64_t
 509      -drmach_get_stick()
 510      -{
 511      -        return (0);
 512      -}
 513      -#else   /* lint */
 514  453          ENTRY_NP(drmach_get_stick)
 515  454          retl
 516  455          rd      STICK, %o0
 517  456          SET_SIZE(drmach_get_stick)
 518      -#endif /* lint */
 519  457  
 520      -#if defined(lint)
 521      -/*ARGSUSED*/
 522      -void
 523      -drmach_flush(drmach_copy_rename_critical_t *x, uint_t y)
 524      -{}
 525      -
 526      -#else /* lint */
 527  458          ENTRY_NP(drmach_flush)
 528  459          mov     %o0, %o2
 529  460  0:
 530  461          flush   %o2
 531  462          sub     %o1, 8, %o1
 532  463          brnz    %o1, 0b
 533  464           add    %o2, 8, %o2
 534  465          retl
 535  466           nop
 536  467          SET_SIZE(drmach_flush)
 537      -#endif /* lint */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX