Print this page
de-linting of .s files

@@ -21,19 +21,10 @@
 /*
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
-#if defined(lint)
-#include <sys/types.h>
-#include <sys/t_lock.h>
-#include <sys/promif.h>
-#include <sys/prom_isa.h>
-#endif  /* lint */
-
 #include <sys/asm_linkage.h>
 #include <sys/intreg.h>
 #include <sys/ivintr.h>
 #include <sys/mmu.h>
 #include <sys/machpcb.h>

@@ -44,17 +35,11 @@
 #include <sys/traptrace.h>
 #include <sys/panic.h>
 #include <sys/machasi.h>
 #include <sys/clock.h>
 #include <vm/hat_sfmmu.h>
-#if defined(lint)
 
-#include <sys/thread.h>
-#include <sys/time.h>
-
-#else   /* lint */
-
 #include "assym.h"
 
 
 !
 ! REGOFF must add up to allow double word access to r_tstate.

@@ -172,20 +157,10 @@
 
         .align  8
 _local_p1275cis:
         .nword  0
 
-#endif  /* lint */
-
-#if defined(lint)
-
-void
-_start(void)
-{}
-
-#else /* lint */
-
         .seg    ".data"
 
         .global nwindows, nwin_minus_one, winmask
 nwindows:
         .word   8

@@ -354,13 +329,11 @@
 
 .mainretmsg:
         .asciz  "main returned"
         .align  4
 
-#endif  /* lint */
 
-
 /*
  * Generic system trap handler.
  *
  * Some kernel trap handlers save themselves from buying a window by
  * borrowing some of sys_trap's unused locals. %l0 thru %l3 may be used

@@ -392,18 +365,10 @@
  *          uint32_t arg2 [%g3.l], uint32_t arg3 [%g3.h])
  *      func(struct regs *rp, uint32_t arg1 [%g2.l],
  *          uint32_t arg2 [%g3.l], uint32_t arg3 [%g3.h], uint32_t [%g2.h])
  */
 
-#if defined(lint)
-
-void
-sys_trap(void)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(sys_trap)
         !
         ! force tl=1, update %cwp, branch to correct handler
         !
         wrpr    %g0, 1, %tl

@@ -873,14 +838,10 @@
         retry
         /* NOTREACHED */
         SET_SIZE(priv_rtt)
         SET_SIZE(ktl0)
 
-#endif  /* lint */
-
-#ifndef lint
-
 #ifdef DEBUG
         .seg    ".data"
         .align  4
 
         .global bad_g4_called

@@ -897,31 +858,22 @@
         mov     %o2, %o1
         call    panic
         mov     %o3, %o2
         SET_SIZE(bad_g4)
 #endif /* DEBUG */
-#endif /* lint */
 
 /*
  * sys_tl1_panic can be called by traps at tl1 which
  * really want to panic, but need the rearrangement of
  * the args as provided by this wrapper routine.
  */
-#if defined(lint)
-
-void
-sys_tl1_panic(void)
-{}
-
-#else   /* lint */
         ENTRY_NP(sys_tl1_panic)
         mov     %o1, %o0
         mov     %o2, %o1
         call    panic
         mov     %o3, %o2
         SET_SIZE(sys_tl1_panic)
-#endif /* lint */
 
 /*
  * Turn on or off bits in the auxiliary i/o register.
  *
  * set_auxioreg(bit, flag)

@@ -930,19 +882,10 @@
  *
  * This is intrinsicly ugly but is used by the floppy driver.  It is also
  * used to turn on/off the led.
  */
 
-#if defined(lint)
-
-/* ARGSUSED */
-void
-set_auxioreg(int bit, int flag)
-{}
-
-#else   /* lint */
-
         .seg    ".data"
         .align  4
 auxio_panic:
         .asciz  "set_auxioreg: interrupts already disabled on entry"
         .align  4

@@ -978,42 +921,22 @@
         stb     %g1, [%o4]              /* write aux i/o register */
         retl
          wrpr   %g0, %o2, %pstate       /* enable interrupt */
         SET_SIZE(set_auxioreg)
 
-#endif /* lint */
-
 /*
  * Flush all windows to memory, except for the one we entered in.
  * We do this by doing NWINDOW-2 saves then the same number of restores.
  * This leaves the WIM immediately before window entered in.
  * This is used for context switching.
  */
 
-#if defined(lint)
-
-void
-flush_windows(void)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(flush_windows)
         retl
         flushw
         SET_SIZE(flush_windows)
 
-#endif  /* lint */
-
-#if defined(lint)
-
-void
-debug_flush_windows(void)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(debug_flush_windows)
         set     nwindows, %g1
         ld      [%g1], %g1
         mov     %g1, %g2
 

@@ -1031,24 +954,14 @@
         retl
         nop
 
         SET_SIZE(debug_flush_windows)
 
-#endif  /* lint */
-
 /*
  * flush user windows to memory.
  */
 
-#if defined(lint)
-
-void
-flush_user_windows(void)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(flush_user_windows)
         rdpr    %otherwin, %g1
         brz     %g1, 3f
         clr     %g2
 1:

@@ -1063,27 +976,17 @@
 3:
         retl
         nop
         SET_SIZE(flush_user_windows)
 
-#endif  /* lint */
-
 /*
  * Throw out any user windows in the register file.
  * Used by setregs (exec) to clean out old user.
  * Used by sigcleanup to remove extraneous windows when returning from a
  * signal.
  */
 
-#if defined(lint)
-
-void
-trash_user_windows(void)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(trash_user_windows)
         rdpr    %otherwin, %g1
         brz     %g1, 3f                 ! no user windows?
         ldn     [THREAD_REG + T_STACK], %g5
 

@@ -1105,47 +1008,20 @@
         retl
         clr     [%g5 + MPCB_WBCNT]       ! zero window buffer cnt
         SET_SIZE(trash_user_windows)
 
 
-#endif  /* lint */
-
 /*
  * Setup g7 via the CPU data structure.
  */
-#if defined(lint)
 
-struct scb *
-set_tbr(struct scb *s)
-{ return (s); }
-
-#else   /* lint */
-
         ENTRY_NP(set_tbr)
         retl
         ta      72              ! no tbr, stop simulation
         SET_SIZE(set_tbr)
 
-#endif  /* lint */
 
-
-#if defined(lint)
-/*
- * These need to be defined somewhere to lint and there is no "hicore.s"...
- */
-char etext[1], end[1];
-#endif  /* lint*/
-
-#if defined (lint)
-
-/* ARGSUSED */
-void
-ptl1_panic(u_int reason)
-{}
-
-#else /* lint */
-
 #define PTL1_SAVE_WINDOW(RP)                                            \
         stxa    %l0, [RP + RW64_LOCAL + (0 * RW64_LOCAL_INCR)] %asi;    \
         stxa    %l1, [RP + RW64_LOCAL + (1 * RW64_LOCAL_INCR)] %asi;    \
         stxa    %l2, [RP + RW64_LOCAL + (2 * RW64_LOCAL_INCR)] %asi;    \
         stxa    %l3, [RP + RW64_LOCAL + (3 * RW64_LOCAL_INCR)] %asi;    \

@@ -1416,29 +1292,13 @@
         !
         ba,pt   %xcc, ptl1_panic_handler
           mov   %l1, %o0
         /*NOTREACHED*/
         SET_SIZE(ptl1_panic)
-#endif /* lint */
 
 #ifdef  PTL1_PANIC_DEBUG
-#if defined (lint)
-/*
- * ptl1_recurse() calls itself a number of times to either set up a known
- * stack or to cause a kernel stack overflow. It decrements the arguments 
- * on each recursion.
- * It's called by #ifdef PTL1_PANIC_DEBUG code in startup.c to set the
- * registers to a known state to facilitate debugging.
- */
 
-/* ARGSUSED */
-void 
-ptl1_recurse(int count_threshold, int trap_threshold)
-{}
-
-#else /* lint */
-
         ENTRY_NP(ptl1_recurse)
         save    %sp, -SA(MINFRAME), %sp
 
         set     ptl1_recurse_call, %o7
         cmp     %o7, %i7                        ! if ptl1_recurse is called

@@ -1499,42 +1359,22 @@
 ptl1_recurse_trap:
         ta      PTL1_DEBUG_TRAP;                ! Trap Always to ptl1_panic()
           nop                                   ! NOTREACHED 
         SET_SIZE(ptl1_recurse)
 
-#endif /* lint */
-
-#if defined (lint)
-
-/* ARGSUSED */
-void
-ptl1_panic_xt(int arg1, int arg2)
-{}
-
-#else /* lint */
         /*
          * Asm function to handle a cross trap to call ptl1_panic()
          */
         ENTRY_NP(ptl1_panic_xt)
         ba      ptl1_panic
           mov   PTL1_BAD_DEBUG, %g1
         SET_SIZE(ptl1_panic_xt)
 
-#endif /* lint */
-
 #endif  /* PTL1_PANIC_DEBUG */
 
 #ifdef  TRAPTRACE
-#if     defined (lint)
 
-void
-trace_ptr_panic(void)
-{
-}
-
-#else   /* lint */
-
         ENTRY_NP(trace_ptr_panic)
         !
         ! freeze the trap trace to disable the assertions.  Otherwise,
         ! ptl1_panic is likely to be repeatedly called from there.
         ! %g2 and %g3 are used as scratch registers in ptl1_panic.

@@ -1552,52 +1392,25 @@
 
         ba      ptl1_panic
         mov     PTL1_BAD_TRACE_PTR, %g1
         SET_SIZE(trace_ptr_panic)
 
-#endif  /* lint */
 #endif  /* TRAPTRACE */
         
-#if     defined (lint)
-/*
- * set_kcontextreg() sets PCONTEXT to kctx
- * if PCONTEXT==kctx, do nothing
- * if N_pgsz0|N_pgsz1 differ, do demap all first
- */
-
-/* ARGSUSED */
-void
-set_kcontextreg()
-{
-}
-
-#else   /* lint */
-
         ENTRY_NP(set_kcontextreg)
         ! SET_KCONTEXTREG(reg0, reg1, reg2, reg3, reg4, label1, label2, label3)
         SET_KCONTEXTREG(%o0, %o1, %o2, %o3, %o4, l1, l2, l3)
         retl
         nop
         SET_SIZE(set_kcontextreg)
         
-#endif /* lint */
         
-
 /*
  * The interface for a 32-bit client program that takes over the TBA
  * calling the 64-bit romvec OBP.
  */
 
-#if defined(lint)
-
-/* ARGSUSED */
-int
-client_handler(void *cif_handler, void *arg_array)
-{ return 0; }
-
-#else   /* lint */
-
         ENTRY(client_handler)
         save    %sp, -SA64(MINFRAME64), %sp     ! 32 bit frame, 64 bit sized
         sethi   %hi(tba_taken_over), %l2
         ld      [%l2+%lo(tba_taken_over)], %l3
         brz     %l3, 1f                         ! is the tba_taken_over = 1 ?

@@ -1662,8 +1475,6 @@
 #endif /* _OPL */
 
 1:      ret                                     ! Return result ...
         restore %o0, %g0, %o0                   ! delay; result in %o0
         SET_SIZE(client_handler)
-
-#endif  /* lint */