Print this page
de-linting of .s files

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4v/ml/mach_xc.s
          +++ new/usr/src/uts/sun4v/ml/mach_xc.s
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26      -#if defined(lint)
  27      -#include <sys/types.h>
  28      -#include <sys/cpuvar.h>
  29      -#else   /*lint */
  30   26  #include "assym.h"
  31      -#endif  /* lint */
  32   27  
  33   28  #include <sys/asm_linkage.h>
  34   29  #include <sys/privregs.h>
  35   30  #include <sys/x_call.h>
  36   31  #include <sys/xc_impl.h>
  37   32  #include <sys/machthread.h>
  38   33  #include <sys/hypervisor_api.h>
  39   34  
  40   35  #ifdef TRAPTRACE
  41   36  #include <sys/traptrace.h>
  42   37  #endif /* TRAPTRACE */
  43   38  
  44   39  
  45      -#if defined(lint)
  46      -
  47      -/* ARGSUSED */
  48      -void
  49      -self_xcall(struct cpu *cpu, uint64_t arg1, uint64_t arg2, xcfunc_t *func)
  50      -{}
  51      -
  52      -#else
  53      -
  54   40  /*
  55   41   * Entered by the software trap (TT=ST_SELFXCALL, TL>0) thru send_self_xcall().
  56   42   * Emulate the mondo handler - vec_interrupt().
  57   43   *
  58   44   * Global registers are the Alternate Globals.
  59   45   * Arguments:
  60   46   *      %o0 - CPU
  61   47   *      ILP32 kernel:
  62   48   *              %o5 - function to call
  63   49   *              %o1, %o2, %o3, %o4  - arguments
↓ open down ↓ 33 lines elided ↑ open up ↑
  97   83  #endif /* TRAPTRACE */
  98   84          !
  99   85          ! Load the arguments for the fast trap handler.
 100   86          !
 101   87          mov     %o1, %g1
 102   88          jmp     %o3                             ! call the fast trap handler
 103   89          mov     %o2, %g2
 104   90          /* Not Reached */
 105   91          SET_SIZE(self_xcall)
 106   92  
 107      -#endif  /* lint */
 108      -
 109   93  #ifdef  TRAPTRACE
 110      -#if defined(lint)
 111      -
 112      -/* ARGSUSED */
 113      -void
 114      -xc_trace(u_int traptype, cpuset_t *cpu_set, xcfunc_t *func,
 115      -        uint64_t arg1, uint64_t arg2)
 116      -{}
 117      -
 118      -#else   /* lint */
 119   94          ENTRY(xc_trace)
 120   95          rdpr    %pstate, %g1
 121   96          andn    %g1, PSTATE_IE | PSTATE_AM, %g2
 122   97          wrpr    %g0, %g2, %pstate                       /* disable interrupts */
 123   98          TRACE_PTR(%g3, %g4)
 124   99          GET_TRACE_TICK(%g6, %g4)
 125  100          stxa    %g6, [%g3 + TRAP_ENT_TICK]%asi
 126  101          stha    %g0, [%g3 + TRAP_ENT_TL]%asi
 127  102          set     TT_XCALL, %g2
 128  103          or      %o0, %g2, %g4
↓ open down ↓ 52 lines elided ↑ open up ↑
 181  156  2:      
 182  157          TRACE_NEXT(%g2, %g3, %g4)
 183  158          cmp     %o1, %g5
 184  159          bl      1b
 185  160          inc     %o2
 186  161  #endif  /* CPUSET_SIZE */
 187  162          retl
 188  163          wrpr    %g0, %g1, %pstate                       /* enable interrupts */
 189  164          SET_SIZE(xc_trace)
 190  165  
 191      -#endif  /* lint */
 192  166  #endif  /* TRAPTRACE */
 193  167  
 194      -#if defined(lint)
 195      -
 196      -/*ARGSUSED*/
 197      -void
 198      -init_mondo(xcfunc_t *func, uint64_t arg1, uint64_t arg2)
 199      -{}
 200      -
 201      -/*ARGSUSED*/
 202      -int
 203      -shipit(int n, uint64_t cpuid)
 204      -{ return(0); }
 205      -
 206      -#else   /* lint */
 207  168  /*
 208  169   * Setup interrupt dispatch data registers
 209  170   * Entry:
 210  171   *      %o0 - function or inumber to call
 211  172   *      %o1, %o2 - arguments (2 uint64_t's)
 212  173   */
 213  174          ENTRY(init_mondo)
 214  175          ALTENTRY(init_mondo_nocheck)
 215  176          CPU_ADDR(%g1, %g4)                      ! load CPU struct addr
 216  177          add     %g1, CPU_MCPU, %g1
↓ open down ↓ 17 lines elided ↑ open up ↑
 234  195          /* For now use dummy interface:  cpu# func arg1 arg2 */
 235  196          CPU_ADDR(%g1, %g4)
 236  197          add     %g1, CPU_MCPU, %g1
 237  198          ldx     [%g1 + MCPU_MONDO_DATA_RA],     %o2
 238  199          mov     HV_INTR_SEND, %o5
 239  200          ta      FAST_TRAP
 240  201          retl
 241  202          membar  #Sync
 242  203          SET_SIZE(shipit)
 243  204  
 244      -#endif  /* lint */
 245      -
 246      -#if defined(lint)
 247      -
 248      -/*ARGSUSED*/
 249      -uint64_t
 250      -get_cpuaddr(uint64_t reg, uint64_t scr)
 251      -{ return (0);}
 252      -
 253      -#else   /* lint */
 254  205  /*
 255  206   * Get cpu structure
 256  207   * Entry:
 257  208   *      %o0 - register for CPU_ADDR macro
 258  209   *      %o1 - scratch for CPU_ADDR macro
 259  210   */
 260  211          ENTRY(get_cpuaddr)
 261  212          CPU_ADDR(%o0, %o1)      ! %o0 == CPU struct addr
 262  213          retl
 263  214          nop
 264  215          SET_SIZE(get_cpuaddr)
 265  216  
 266      -#endif  /* lint */
 267      -
 268      -#if defined(lint)
 269      -/* ARGSUSED */
 270      -void
 271      -xt_sync_tl1(uint64_t *cpu_sync_addr)
 272      -{}
 273      -
 274      -#else /* lint */
 275  217  /*
 276  218   * This is to ensure that previously called xtrap handlers have executed on
 277  219   * sun4v. We zero out the byte corresponding to its cpuid in the
 278  220   * array passed to us from xt_sync(), so the sender knows the previous
 279  221   * mondo has been executed.
 280  222   * Register:
 281  223   *              %g1 - Addr of the cpu_sync array.
 282  224   */
 283  225          ENTRY_NP(xt_sync_tl1)
 284  226          CPU_INDEX(%g3, %g4)             /* %g3 = cpu id */
 285  227          stb     %g0, [%g1 + %g3] 
 286  228          retry
 287  229          SET_SIZE(xt_sync_tl1)
 288  230  
 289      -#endif  /* lint */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX