Print this page
restore sparc comments
de-linting of .s files
*** 20,32 ****
*/
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
*/
- #if !defined(lint)
#include "assym.h"
- #endif /* !lint */
/*
* General assembly language routines.
* It is the intent of this file to contain routines that are
* specific to cpu architecture.
--- 20,30 ----
*** 211,230 ****
#endif /* !CHEETAH && !HUMMINGBIRD */
#include <sys/clock.h>
- #if defined(lint)
- #include <sys/types.h>
- #include <sys/scb.h>
- #include <sys/systm.h>
- #include <sys/regset.h>
- #include <sys/sunddi.h>
- #include <sys/lockstat.h>
- #endif /* lint */
-
#include <sys/asm_linkage.h>
#include <sys/privregs.h>
#include <sys/machparam.h> /* To get SYSBASE and PAGESIZE */
#include <sys/machthread.h>
#include <sys/clock.h>
--- 209,219 ----
*** 232,273 ****
#include <sys/psr_compat.h>
#include <sys/isa_defs.h>
#include <sys/dditypes.h>
#include <sys/intr.h>
- #if !defined(lint)
#include "assym.h"
- #endif /* !lint */
- #if defined(lint)
-
- uint_t
- get_impl(void)
- { return (0); }
-
- #else /* lint */
-
ENTRY(get_impl)
GET_CPU_IMPL(%o0)
retl
nop
SET_SIZE(get_impl)
- #endif /* lint */
-
- #if defined(lint)
/*
* Softint generated when counter field of tick reg matches value field
* of tick_cmpr reg
*/
- /*ARGSUSED*/
- void
- tickcmpr_set(uint64_t clock_cycles)
- {}
-
- #else /* lint */
-
ENTRY_NP(tickcmpr_set)
! get 64-bit clock_cycles interval
mov %o0, %o2
mov 8, %o3 ! A reasonable initial step size
1:
--- 221,242 ----
*** 285,337 ****
2:
retl
nop
SET_SIZE(tickcmpr_set)
- #endif /* lint */
-
- #if defined(lint)
-
- void
- tickcmpr_disable(void)
- {}
-
- #else /* lint */
-
ENTRY_NP(tickcmpr_disable)
mov 1, %g1
sllx %g1, TICKINT_DIS_SHFT, %o0
WR_TICKCMPR(%o0,%o4,%o5,__LINE__) ! Write to TICK_CMPR
retl
nop
SET_SIZE(tickcmpr_disable)
! #endif /* lint */
- #if defined(lint)
-
/*
* tick_write_delta() increments %tick by the specified delta. This should
* only be called after a CPR event to assure that gethrtime() continues to
* increase monotonically. Obviously, writing %tick needs to de done very
* carefully to avoid introducing unnecessary %tick skew across CPUs. For
* this reason, we make sure we're i-cache hot before actually writing to
* %tick.
*/
- /*ARGSUSED*/
- void
- tick_write_delta(uint64_t delta)
- {}
-
- #else /* lint */
-
- #ifdef DEBUG
- .seg ".text"
- tick_write_panic:
- .asciz "tick_write_delta: interrupts already disabled on entry"
- #endif /* DEBUG */
-
ENTRY_NP(tick_write_delta)
rdpr %pstate, %g1
#ifdef DEBUG
andcc %g1, PSTATE_IE, %g0 ! If DEBUG, check that interrupts
bnz 0f ! aren't already disabled.
--- 254,285 ----
2:
retl
nop
SET_SIZE(tickcmpr_set)
ENTRY_NP(tickcmpr_disable)
mov 1, %g1
sllx %g1, TICKINT_DIS_SHFT, %o0
WR_TICKCMPR(%o0,%o4,%o5,__LINE__) ! Write to TICK_CMPR
retl
nop
SET_SIZE(tickcmpr_disable)
! #ifdef DEBUG
! .seg ".text"
! tick_write_panic:
! .asciz "tick_write_delta: interrupts already disabled on entry"
! #endif /* DEBUG */
/*
* tick_write_delta() increments %tick by the specified delta. This should
* only be called after a CPR event to assure that gethrtime() continues to
* increase monotonically. Obviously, writing %tick needs to de done very
* carefully to avoid introducing unnecessary %tick skew across CPUs. For
* this reason, we make sure we're i-cache hot before actually writing to
* %tick.
*/
ENTRY_NP(tick_write_delta)
rdpr %pstate, %g1
#ifdef DEBUG
andcc %g1, PSTATE_IE, %g0 ! If DEBUG, check that interrupts
bnz 0f ! aren't already disabled.
*** 348,488 ****
0: nop ! The next 3 instructions are now hot.
DELTA_NATIVE_TIME(%o2, %o3, %o4, %o5, %g2) ! read/inc/write %tick
retl ! Return
wrpr %g0, %g1, %pstate ! delay: Re-enable interrupts
- #endif /* lint */
- #if defined(lint)
- /*
- * return 1 if disabled
- */
-
- int
- tickcmpr_disabled(void)
- { return (0); }
-
- #else /* lint */
-
ENTRY_NP(tickcmpr_disabled)
RD_TICKCMPR(%g1, %o0)
retl
srlx %g1, TICKINT_DIS_SHFT, %o0
SET_SIZE(tickcmpr_disabled)
- #endif /* lint */
-
/*
* Get current tick
*/
- #if defined(lint)
- u_longlong_t
- gettick(void)
- { return (0); }
-
- u_longlong_t
- randtick(void)
- { return (0); }
-
- #else /* lint */
-
ENTRY(gettick)
ALTENTRY(randtick)
GET_NATIVE_TIME(%o0, %o2, %o3)
retl
nop
SET_SIZE(randtick)
SET_SIZE(gettick)
- #endif /* lint */
-
/*
* Return the counter portion of the tick register.
*/
- #if defined(lint)
-
- uint64_t
- gettick_counter(void)
- { return(0); }
-
- #else /* lint */
-
ENTRY_NP(gettick_counter)
rdpr %tick, %o0
sllx %o0, 1, %o0
retl
srlx %o0, 1, %o0 ! shake off npt bit
SET_SIZE(gettick_counter)
- #endif /* lint */
/*
* Provide a C callable interface to the trap that reads the hi-res timer.
* Returns 64-bit nanosecond timestamp in %o0 and %o1.
*/
- #if defined(lint)
-
- hrtime_t
- gethrtime(void)
- {
- return ((hrtime_t)0);
- }
-
- hrtime_t
- gethrtime_unscaled(void)
- {
- return ((hrtime_t)0);
- }
-
- hrtime_t
- gethrtime_max(void)
- {
- return ((hrtime_t)0);
- }
-
- void
- scalehrtime(hrtime_t *hrt)
- {
- *hrt = 0;
- }
-
- void
- gethrestime(timespec_t *tp)
- {
- tp->tv_sec = 0;
- tp->tv_nsec = 0;
- }
-
- time_t
- gethrestime_sec(void)
- {
- return (0);
- }
-
- void
- gethrestime_lasttick(timespec_t *tp)
- {
- tp->tv_sec = 0;
- tp->tv_nsec = 0;
- }
-
- /*ARGSUSED*/
- void
- hres_tick(void)
- {
- }
-
- void
- panic_hres_tick(void)
- {
- }
-
- #else /* lint */
-
ENTRY_NP(gethrtime)
GET_HRTIME(%g1, %o0, %o1, %o2, %o3, %o4, %o5, %g2)
! %g1 = hrtime
retl
mov %g1, %o0
--- 296,341 ----
*** 770,783 ****
call panic
or %o0, %lo(hrtime_base_panic), %o0
SET_SIZE(hres_tick)
- #endif /* lint */
-
- #if !defined(lint) && !defined(__lint)
-
.seg ".text"
kstat_q_panic_msg:
.asciz "kstat_q_exit: qlen == 0"
ENTRY(kstat_q_panic)
--- 623,632 ----
*** 883,906 ****
KSTAT_Q_UPDATE_ND(sub, 1:, KSTAT_IO_R)
#endif
KSTAT_Q_UPDATE(add, BRZPT, 1f, 1:retl, KSTAT_IO_W)
SET_SIZE(kstat_runq_back_to_waitq)
- #endif /* !(lint || __lint) */
-
- #ifdef lint
-
- int64_t timedelta;
- hrtime_t hres_last_tick;
- volatile timestruc_t hrestime;
- int64_t hrestime_adj;
- volatile int hres_lock;
- uint_t nsec_scale;
- hrtime_t hrtime_base;
- int traptrace_use_stick;
-
- #else /* lint */
/*
* -- WARNING --
*
* The following variables MUST be together on a 128-byte boundary.
* In addition to the primary performance motivation (having them all
--- 732,741 ----
*** 934,946 ****
nsec_shift:
.word NSEC_SHIFT
adj_shift:
.word ADJ_SHIFT
- #endif /* lint */
-
/*
* drv_usecwait(clock_t n) [DDI/DKI - section 9F]
* usec_delay(int n) [compatibility - should go one day]
* Delay by spinning.
*
--- 769,779 ----
*** 956,979 ****
* the code down to spitfire/us3/opl specific asm files - but this
* is alot of code duplication just to add one "sleep" instruction.
* We chose less code duplication for this.
*/
- #if defined(lint)
-
- /*ARGSUSED*/
- void
- drv_usecwait(clock_t n)
- {}
-
- /*ARGSUSED*/
- void
- usec_delay(int n)
- {}
-
- #else /* lint */
-
ENTRY(drv_usecwait)
ALTENTRY(usec_delay)
brlez,a,pn %o0, 0f
mov 1, %o0
0:
--- 789,798 ----
*** 994,1014 ****
nop
retl
nop
SET_SIZE(usec_delay)
SET_SIZE(drv_usecwait)
- #endif /* lint */
- #if defined(lint)
-
- /* ARGSUSED */
- void
- pil14_interrupt(int level)
- {}
-
- #else /* lint */
-
/*
* Level-14 interrupt prologue.
*/
ENTRY_NP(pil14_interrupt)
CPU_ADDR(%g1, %g2)
--- 813,823 ----
*** 1094,1114 ****
2: ba current_thread_complete
nop
SET_SIZE(tick_rtt)
- #endif /* lint */
-
- #if defined(lint)
-
- /* ARGSUSED */
- void
- pil15_interrupt(int level)
- {}
-
- #else /* lint */
-
/*
* Level-15 interrupt prologue.
*/
ENTRY_NP(pil15_interrupt)
CPU_ADDR(%g1, %g2)
--- 903,912 ----
*** 1122,1144 ****
stn %g0, [%g1 + CPU_CPCPROFILE_PC] ! zero kernel PC
1: ba pil15_epilogue ! must be large-disp branch
stn %g0, [%g1 + CPU_CPCPROFILE_UPC] ! zero user PC
SET_SIZE(pil15_interrupt)
- #endif /* lint */
-
- #if defined(lint) || defined(__lint)
-
- /* ARGSUSED */
- uint64_t
- find_cpufrequency(volatile uchar_t *clock_ptr)
- {
- return (0);
- }
-
- #else /* lint */
-
#ifdef DEBUG
.seg ".text"
find_cpufreq_panic:
.asciz "find_cpufrequency: interrupts already disabled on entry"
#endif /* DEBUG */
--- 920,929 ----
*** 1182,1209 ****
retl
sub %o5, %o3, %o0 ! return the difference in ticks
SET_SIZE(find_cpufrequency)
- #endif /* lint */
-
- #if defined(lint)
- /*
- * Prefetch a page_t for write or read, this assumes a linear
- * scan of sequential page_t's.
- */
- /*ARGSUSED*/
- void
- prefetch_page_w(void *pp)
- {}
-
- /*ARGSUSED*/
- void
- prefetch_page_r(void *pp)
- {}
- #else /* lint */
-
#if defined(CHEETAH) || defined(CHEETAH_PLUS) || defined(JALAPENO) || \
defined(SERRANO)
!
! On US-III, the prefetch instruction queue is 8 entries deep.
! Also, prefetches for write put data in the E$, which has
--- 967,976 ----
*** 1285,1294 ****
--- 1052,1065 ----
#if STRIDE1 != (PAGE_SIZE * 4)
#error "STRIDE1 != (PAGE_SIZE * 4)"
#endif /* STRIDE1 != (PAGE_SIZE * 4) */
+ /*
+ * Prefetch a page_t for write or read, this assumes a linear
+ * scan of sequential page_t's.
+ */
ENTRY(prefetch_page_w)
prefetch [%o0+STRIDE1], #n_writes
retl
prefetch [%o0+STRIDE2], #n_writes
SET_SIZE(prefetch_page_w)
*** 1356,1377 ****
#error "You need to fix this for your new cpu type."
#endif /* OLYMPUS_C */
- #endif /* lint */
-
- #if defined(lint)
- /*
- * Prefetch struct smap for write.
- */
- /*ARGSUSED*/
- void
- prefetch_smap_w(void *smp)
- {}
- #else /* lint */
-
#if defined(CHEETAH) || defined(CHEETAH_PLUS) || defined(JALAPENO) || \
defined(SERRANO)
#define PREFETCH_Q_LEN 8
--- 1127,1136 ----
*** 1414,1440 ****
#define SMAP_SIZE 48
#define SMAP_STRIDE (PREFETCH_Q_LEN * SMAP_SIZE)
#endif /* SEGKPM_SUPPORT */
ENTRY(prefetch_smap_w)
retl
prefetch [%o0-SMAP_STRIDE], #n_writes
SET_SIZE(prefetch_smap_w)
- #endif /* lint */
-
- #if defined(lint) || defined(__lint)
-
- /* ARGSUSED */
- uint64_t
- getidsr(void)
- { return 0; }
-
- #else /* lint */
-
ENTRY_NP(getidsr)
retl
ldxa [%g0]ASI_INTR_DISPATCH_STATUS, %o0
SET_SIZE(getidsr)
- #endif /* lint */
--- 1173,1190 ----
#define SMAP_SIZE 48
#define SMAP_STRIDE (PREFETCH_Q_LEN * SMAP_SIZE)
#endif /* SEGKPM_SUPPORT */
+ /*
+ * Prefetch struct smap for write.
+ */
ENTRY(prefetch_smap_w)
retl
prefetch [%o0-SMAP_STRIDE], #n_writes
SET_SIZE(prefetch_smap_w)
ENTRY_NP(getidsr)
retl
ldxa [%g0]ASI_INTR_DISPATCH_STATUS, %o0
SET_SIZE(getidsr)