summaryrefslogtreecommitdiff
path: root/usr/src/uts/sun4v/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/sun4v/cpu')
-rw-r--r--usr/src/uts/sun4v/cpu/common_asm.s304
-rw-r--r--usr/src/uts/sun4v/cpu/generic_copy.s179
-rw-r--r--usr/src/uts/sun4v/cpu/niagara2_asm.s41
-rw-r--r--usr/src/uts/sun4v/cpu/niagara_asm.s42
-rw-r--r--usr/src/uts/sun4v/cpu/niagara_copy.s189
-rw-r--r--usr/src/uts/sun4v/cpu/niagara_perfctr.c8
6 files changed, 15 insertions, 748 deletions
diff --git a/usr/src/uts/sun4v/cpu/common_asm.s b/usr/src/uts/sun4v/cpu/common_asm.s
index fda53b4d2a..2646a46357 100644
--- a/usr/src/uts/sun4v/cpu/common_asm.s
+++ b/usr/src/uts/sun4v/cpu/common_asm.s
@@ -22,9 +22,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
*/
-#if !defined(lint)
#include "assym.h"
-#endif
/*
* General assembly language routines.
@@ -44,15 +42,6 @@
#include <sys/machclock.h>
#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>
@@ -67,24 +56,14 @@
#include <sys/intr.h>
#include <sys/hypervisor_api.h>
-#if !defined(lint)
#include "assym.h"
-#endif
#define ICACHE_FLUSHSZ 0x20
-#if defined(lint)
/*
- * Softint generated when counter field of tick reg matches value field
+ * 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
@@ -106,16 +85,6 @@ tickcmpr_set(uint64_t clock_cycles)
nop
SET_SIZE(tickcmpr_set)
-#endif /* lint */
-
-#if defined(lint)
-
-void
-tickcmpr_disable(void)
-{}
-
-#else
-
ENTRY_NP(tickcmpr_disable)
mov 1, %g1
sllx %g1, TICKINT_DIS_SHFT, %o0
@@ -124,9 +93,9 @@ tickcmpr_disable(void)
nop
SET_SIZE(tickcmpr_disable)
-#endif
-
-#if defined(lint)
+ .seg ".text"
+tick_write_delta_panic:
+ .asciz "tick_write_delta: not supported, delta: 0x%lx"
/*
* tick_write_delta() is intended to increment %stick by the specified delta,
@@ -139,18 +108,6 @@ tickcmpr_disable(void)
* system. The negative delta could be caused by improper %stick
* synchronization after a suspend/resume.
*/
-
-/*ARGSUSED*/
-void
-tick_write_delta(uint64_t delta)
-{}
-
-#else /* lint */
-
- .seg ".text"
-tick_write_delta_panic:
- .asciz "tick_write_delta: not supported, delta: 0x%lx"
-
ENTRY_NP(tick_write_delta)
sethi %hi(tick_write_delta_panic), %o1
save %sp, -SA(MINFRAME), %sp ! get a new window to preserve caller
@@ -160,18 +117,6 @@ tick_write_delta_panic:
/*NOTREACHED*/
retl
nop
-#endif
-
-#if defined(lint)
-/*
- * return 1 if disabled
- */
-
-int
-tickcmpr_disabled(void)
-{ return (0); }
-
-#else /* lint */
ENTRY_NP(tickcmpr_disabled)
RD_TICKCMPR(%g1,%o0,%o1,__LINE__)
@@ -179,22 +124,9 @@ tickcmpr_disabled(void)
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)
@@ -204,45 +136,19 @@ randtick(void)
SET_SIZE(randtick)
SET_SIZE(gettick)
-#endif /* lint */
-
/*
* Get current tick. For trapstat use only.
*/
-#if defined (lint)
-
-hrtime_t
-rdtick()
-{ return (0); }
-
-#else
ENTRY(rdtick)
retl
RD_TICK_PHYSICAL(%o0)
SET_SIZE(rdtick)
-#endif /* lint */
/*
* Return the counter portion of the tick register.
*/
-#if defined(lint)
-
-uint64_t
-gettick_counter(void)
-{ return(0); }
-
-uint64_t
-gettick_npt(void)
-{ return(0); }
-
-uint64_t
-getstick_npt(void)
-{ return(0); }
-
-#else /* lint */
-
ENTRY_NP(gettick_counter)
RD_TICK(%o0,%o1,%o2,__LINE__)
retl
@@ -260,72 +166,12 @@ getstick_npt(void)
retl
srlx %o0, 63, %o0
SET_SIZE(getstick_npt)
-#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,__LINE__)
! %g1 = hrtime
@@ -618,10 +464,6 @@ hrtime_base_panic:
SET_SIZE(hres_tick)
-#endif /* lint */
-
-#if !defined(lint) && !defined(__lint)
-
.seg ".text"
kstat_q_panic_msg:
.asciz "kstat_q_exit: qlen == 0"
@@ -731,20 +573,6 @@ QRETURN; \
KSTAT_Q_UPDATE(add, BRZPT, 1f, 1:retl, KSTAT_IO_W)
SET_SIZE(kstat_runq_back_to_waitq)
-#endif /* 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
/*
* -- WARNING --
*
@@ -788,8 +616,6 @@ native_tick_offset:
native_stick_offset:
.word 0, 0
-#endif
-
/*
* drv_usecwait(clock_t n) [DDI/DKI - section 9F]
@@ -803,20 +629,6 @@ native_stick_offset:
* use %stick to implement this routine.
*/
-#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
@@ -837,16 +649,6 @@ usec_delay(int n)
nop
SET_SIZE(usec_delay)
SET_SIZE(drv_usecwait)
-#endif /* lint */
-
-#if defined(lint)
-
-/* ARGSUSED */
-void
-pil14_interrupt(int level)
-{}
-
-#else
/*
* Level-14 interrupt prologue.
@@ -933,17 +735,6 @@ pil14_interrupt(int level)
nop
SET_SIZE(tick_rtt)
-#endif /* lint */
-
-#if defined(lint)
-
-/* ARGSUSED */
-void
-pil15_interrupt(int level)
-{}
-
-#else /* lint */
-
/*
* Level-15 interrupt prologue.
*/
@@ -961,24 +752,10 @@ pil15_interrupt(int level)
stn %g0, [%g1 + CPU_CPCPROFILE_UPC] ! zero user PC
SET_SIZE(pil15_interrupt)
-#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 */
-
/* XXXQ These should be inline templates, not functions */
ENTRY(prefetch_page_w)
retl
@@ -990,79 +767,19 @@ prefetch_page_r(void *pp)
nop
SET_SIZE(prefetch_page_r)
-#endif /* lint */
-
-#if defined(lint)
/*
- * Prefetch struct smap for write.
+ * Prefetch struct smap for write.
*/
-/*ARGSUSED*/
-void
-prefetch_smap_w(void *smp)
-{}
-#else /* lint */
-
/* XXXQ These should be inline templates, not functions */
ENTRY(prefetch_smap_w)
retl
nop
SET_SIZE(prefetch_smap_w)
-#endif /* lint */
-
/*
* Generic sun4v MMU and Cache operations.
*/
-#if defined(lint)
-
-/*ARGSUSED*/
-void
-vtag_flushpage(caddr_t vaddr, uint64_t sfmmup)
-{}
-
-/*ARGSUSED*/
-void
-vtag_flushall(void)
-{}
-
-/*ARGSUSED*/
-void
-vtag_unmap_perm_tl1(uint64_t vaddr, uint64_t ctxnum)
-{}
-
-/*ARGSUSED*/
-void
-vtag_flushpage_tl1(uint64_t vaddr, uint64_t sfmmup)
-{}
-
-/*ARGSUSED*/
-void
-vtag_flush_pgcnt_tl1(uint64_t vaddr, uint64_t sfmmup_pgcnt)
-{}
-
-/*ARGSUSED*/
-void
-vtag_flushall_tl1(uint64_t dummy1, uint64_t dummy2)
-{}
-
-/*ARGSUSED*/
-void
-vac_flushpage(pfn_t pfnum, int vcolor)
-{}
-
-/*ARGSUSED*/
-void
-vac_flushpage_tl1(uint64_t pfnum, uint64_t vcolor)
-{}
-
-/*ARGSUSED*/
-void
-flush_instr_mem(caddr_t vaddr, size_t len)
-{}
-
-#else /* lint */
-
ENTRY_NP(vtag_flushpage)
/*
* flush page from the tlb
@@ -1262,22 +979,12 @@ flush_instr_mem(caddr_t vaddr, size_t len)
nop
SET_SIZE(flush_instr_mem)
-#endif /* !lint */
-
#if !defined(CUSTOM_FPZERO)
/*
* fp_zero() - clear all fp data registers and the fsr
*/
-#if defined(lint) || defined(__lint)
-
-void
-fp_zero(void)
-{}
-
-#else /* lint */
-
.global fp_zero_zero
.align 8
fp_zero_zero:
@@ -1321,5 +1028,4 @@ fp_zero_zero:
fmovd %f0, %f62
SET_SIZE(fp_zero)
-#endif /* lint */
#endif /* CUSTOM_FPZERO */
diff --git a/usr/src/uts/sun4v/cpu/generic_copy.s b/usr/src/uts/sun4v/cpu/generic_copy.s
index dce82ad9ec..a98115264f 100644
--- a/usr/src/uts/sun4v/cpu/generic_copy.s
+++ b/usr/src/uts/sun4v/cpu/generic_copy.s
@@ -35,9 +35,7 @@
#include <sys/fsr.h>
#include <sys/privregs.h>
-#if !defined(lint)
#include "assym.h"
-#endif /* lint */
/*
@@ -60,15 +58,6 @@
-#if defined(lint)
-
-/* ARGSUSED */
-int
-kcopy(const void *from, void *to, size_t count)
-{ return(0); }
-
-#else /* lint */
-
.seg ".text"
.align 4
@@ -97,20 +86,11 @@ kcopy(const void *from, void *to, size_t count)
restore %g1, 0, %o0
SET_SIZE(kcopy)
-#endif /* lint */
/*
* Copy a block of storage - must not overlap (from + len <= to).
*/
-#if defined(lint)
-
-/* ARGSUSED */
-void
-bcopy(const void *from, void *to, size_t count)
-{}
-
-#else /* lint */
ENTRY(bcopy)
@@ -375,21 +355,10 @@ bcopy(const void *from, void *to, size_t count)
andn %i2, %o0, %i3 ! return size of aligned bytes
SET_SIZE(bcopy)
-#endif /* lint */
-
/*
* Block copy with possibly overlapped operands.
*/
-#if defined(lint)
-
-/*ARGSUSED*/
-void
-ovbcopy(const void *from, void *to, size_t count)
-{}
-
-#else /* lint */
-
ENTRY(ovbcopy)
tst %o2 ! check count
bgu,a %ncc, 1f ! nothing to do or bad arguments
@@ -432,8 +401,6 @@ ovbcopy(const void *from, void *to, size_t count)
nop
SET_SIZE(ovbcopy)
-#endif /* lint */
-
/*
* hwblkpagecopy()
*
@@ -441,12 +408,6 @@ ovbcopy(const void *from, void *to, size_t count)
* has already disabled kernel preemption and has checked
* use_hw_bcopy.
*/
-#ifdef lint
-/*ARGSUSED*/
-void
-hwblkpagecopy(const void *src, void *dst)
-{ }
-#else /* lint */
ENTRY(hwblkpagecopy)
save %sp, -SA(MINFRAME), %sp
@@ -509,7 +470,6 @@ hwblkpagecopy(const void *src, void *dst)
ret
restore %g0, 0, %o0
SET_SIZE(hwblkpagecopy)
-#endif /* lint */
/*
@@ -579,15 +539,6 @@ hwblkpagecopy(const void *src, void *dst)
* Copy kernel data to user space (copyout/xcopyout/xcopyout_little).
*/
-#if defined(lint)
-
-/*ARGSUSED*/
-int
-copyout(const void *kaddr, void *uaddr, size_t count)
-{ return (0); }
-
-#else /* lint */
-
/*
* We save the arguments in the following registers in case of a fault:
* kaddr - %g2
@@ -821,17 +772,6 @@ copyout(const void *kaddr, void *uaddr, size_t count)
mov -1, %o0
SET_SIZE(copyout)
-#endif /* lint */
-
-
-#ifdef lint
-
-/*ARGSUSED*/
-int
-xcopyout(const void *kaddr, void *uaddr, size_t count)
-{ return (0); }
-
-#else /* lint */
ENTRY(xcopyout)
sethi %hi(.xcopyout_err), REAL_LOFAULT
@@ -849,17 +789,6 @@ xcopyout(const void *kaddr, void *uaddr, size_t count)
mov %g1, %o0
SET_SIZE(xcopyout)
-#endif /* lint */
-
-#ifdef lint
-
-/*ARGSUSED*/
-int
-xcopyout_little(const void *kaddr, void *uaddr, size_t count)
-{ return (0); }
-
-#else /* lint */
-
ENTRY(xcopyout_little)
sethi %hi(.little_err), %o4
ldn [THREAD_REG + T_LOFAULT], %o5
@@ -887,21 +816,10 @@ xcopyout_little(const void *kaddr, void *uaddr, size_t count)
mov %g0, %o0 ! return (0)
SET_SIZE(xcopyout_little)
-#endif /* lint */
-
/*
* Copy user data to kernel space (copyin/xcopyin/xcopyin_little)
*/
-#if defined(lint)
-
-/*ARGSUSED*/
-int
-copyin(const void *uaddr, void *kaddr, size_t count)
-{ return (0); }
-
-#else /* lint */
-
ENTRY(copyin)
sethi %hi(.copyin_err), REAL_LOFAULT
or REAL_LOFAULT, %lo(.copyin_err), REAL_LOFAULT
@@ -1091,17 +1009,6 @@ copyin(const void *uaddr, void *kaddr, size_t count)
mov -1, %o0
SET_SIZE(copyin)
-#endif /* lint */
-
-#ifdef lint
-
-/*ARGSUSED*/
-int
-xcopyin(const void *uaddr, void *kaddr, size_t count)
-{ return (0); }
-
-#else /* lint */
-
ENTRY(xcopyin)
sethi %hi(.xcopyin_err), REAL_LOFAULT
b .do_copyin
@@ -1118,17 +1025,6 @@ xcopyin(const void *uaddr, void *kaddr, size_t count)
mov %g1, %o0
SET_SIZE(xcopyin)
-#endif /* lint */
-
-#ifdef lint
-
-/*ARGSUSED*/
-int
-xcopyin_little(const void *uaddr, void *kaddr, size_t count)
-{ return (0); }
-
-#else /* lint */
-
ENTRY(xcopyin_little)
sethi %hi(.little_err), %o4
ldn [THREAD_REG + T_LOFAULT], %o5
@@ -1162,21 +1058,11 @@ xcopyin_little(const void *uaddr, void *kaddr, size_t count)
mov %g1, %o0
SET_SIZE(xcopyin_little)
-#endif /* lint */
-
/*
* Copy a block of storage - must not overlap (from + len <= to).
* No fault handler installed (to be called under on_fault())
*/
-#if defined(lint)
-
-/* ARGSUSED */
-void
-copyin_noerr(const void *ufrom, void *kto, size_t count)
-{}
-
-#else /* lint */
ENTRY(copyin_noerr)
sethi %hi(.copyio_noerr), REAL_LOFAULT
@@ -1187,37 +1073,17 @@ copyin_noerr(const void *ufrom, void *kto, size_t count)
nop
SET_SIZE(copyin_noerr)
-#endif /* lint */
-
/*
* Copy a block of storage - must not overlap (from + len <= to).
* No fault handler installed (to be called under on_fault())
*/
-#if defined(lint)
-
-/* ARGSUSED */
-void
-copyout_noerr(const void *kfrom, void *uto, size_t count)
-{}
-
-#else /* lint */
-
ENTRY(copyout_noerr)
sethi %hi(.copyio_noerr), REAL_LOFAULT
b .do_copyout
or REAL_LOFAULT, %lo(.copyio_noerr), REAL_LOFAULT
SET_SIZE(copyout_noerr)
-#endif /* lint */
-
-#if defined(lint)
-
-int use_hw_bcopy = 1;
-int use_hw_bzero = 1;
-
-#else /* !lint */
-
.align 4
DGDEF(use_hw_bcopy)
.word 1
@@ -1226,7 +1092,6 @@ int use_hw_bzero = 1;
.align 64
.section ".text"
-#endif /* !lint */
/*
@@ -1237,14 +1102,6 @@ int use_hw_bzero = 1;
* Caller is responsible for ensuring use_hw_bzero is true and that
* kpreempt_disable() has been called.
*/
-#ifdef lint
-/*ARGSUSED*/
-int
-hwblkclr(void *addr, size_t len)
-{
- return(0);
-}
-#else /* lint */
! %i0 - start address
! %i1 - length of region (multiple of 64)
@@ -1259,15 +1116,6 @@ hwblkclr(void *addr, size_t len)
restore %g0, 1, %o0 ! return (1) - did not use block operations
SET_SIZE(hwblkclr)
-#endif /* lint */
-
-#ifdef lint
-/* Copy 32 bytes of data from src to dst using physical addresses */
-/*ARGSUSED*/
-void
-hw_pa_bcopy32(uint64_t src, uint64_t dst)
-{}
-#else /*!lint */
/*
* Copy 32 bytes of data from src (%o0) to dst (%o1)
@@ -1297,7 +1145,6 @@ hw_pa_bcopy32(uint64_t src, uint64_t dst)
retl
wrpr %g0, %g1, %pstate
SET_SIZE(hw_pa_bcopy32)
-#endif /* lint */
/*
* Zero a block of storage.
@@ -1306,20 +1153,6 @@ hw_pa_bcopy32(uint64_t src, uint64_t dst)
*/
-#if defined(lint)
-
-/* ARGSUSED */
-int
-kzero(void *addr, size_t count)
-{ return(0); }
-
-/* ARGSUSED */
-void
-uzero(void *addr, size_t count)
-{}
-
-#else /* lint */
-
ENTRY(uzero)
!
! Set a new lo_fault handler only if we came in with one
@@ -1392,21 +1225,10 @@ uzero(void *addr, size_t count)
SET_SIZE(kzero)
SET_SIZE(uzero)
-#endif /* lint */
-
/*
* Zero a block of storage.
*/
-#if defined(lint)
-
-/* ARGSUSED */
-void
-bzero(void *addr, size_t count)
-{}
-
-#else /* lint */
-
ENTRY(bzero)
wr %g0, ASI_P, %asi
@@ -1596,4 +1418,3 @@ bzero(void *addr, size_t count)
clr %o0 ! return (0)
SET_SIZE(bzero)
-#endif /* lint */
diff --git a/usr/src/uts/sun4v/cpu/niagara2_asm.s b/usr/src/uts/sun4v/cpu/niagara2_asm.s
index da80b8b590..c780fae4be 100644
--- a/usr/src/uts/sun4v/cpu/niagara2_asm.s
+++ b/usr/src/uts/sun4v/cpu/niagara2_asm.s
@@ -23,9 +23,7 @@
* Use is subject to license terms.
*/
-#if !defined(lint)
#include "assym.h"
-#endif
/*
* Niagara2 processor specific assembly routines
@@ -40,19 +38,6 @@
#include <sys/niagaraasi.h>
#include <vm/hat_sfmmu.h>
-#if defined(lint)
-/*ARGSUSED*/
-uint64_t
-hv_niagara_getperf(uint64_t perfreg, uint64_t *datap)
-{ return (0); }
-
-/*ARGSUSED*/
-uint64_t
-hv_niagara_setperf(uint64_t perfreg, uint64_t data)
-{ return (0); }
-
-#else /* lint */
-
/*
* hv_niagara_getperf(uint64_t perfreg, uint64_t *datap)
*/
@@ -89,9 +74,6 @@ hv_niagara_setperf(uint64_t perfreg, uint64_t data)
nop
SET_SIZE(hv_niagara_setperf)
-#endif /* !lint */
-
-#if defined (lint)
/*
* Invalidate all of the entries within the TSB, by setting the inv bit
* in the tte_tag field of each tsbe.
@@ -103,13 +85,6 @@ hv_niagara_setperf(uint64_t perfreg, uint64_t data)
* (in short, we set all bits in the upper word of the tag, and we give the
* invalid bit precedence over other tag bits in both places).
*/
-/*ARGSUSED*/
-void
-cpu_inv_tsb(caddr_t tsb_base, uint_t tsb_bytes)
-{}
-
-#else /* lint */
-
ENTRY(cpu_inv_tsb)
/*
@@ -151,22 +126,14 @@ cpu_inv_tsb(caddr_t tsb_base, uint_t tsb_bytes)
nop
SET_SIZE(cpu_inv_tsb)
-#endif /* lint */
-#if defined (lint)
-/*
- * This is CPU specific delay routine for atomic backoff. It is used in case
- * of Niagara2 and VF CPUs. The rd instruction uses less resources than casx
- * on these CPUs.
- */
-void
-cpu_atomic_delay(void)
-{}
-#else /* lint */
+ /*
+ * The rd instruction uses less resources than casx on Niagara2 and VF
+ * CPUs.
+ */
ENTRY(cpu_atomic_delay)
rd %ccr, %g0
rd %ccr, %g0
retl
rd %ccr, %g0
SET_SIZE(cpu_atomic_delay)
-#endif /* lint */
diff --git a/usr/src/uts/sun4v/cpu/niagara_asm.s b/usr/src/uts/sun4v/cpu/niagara_asm.s
index f19102a19d..9aaeb54004 100644
--- a/usr/src/uts/sun4v/cpu/niagara_asm.s
+++ b/usr/src/uts/sun4v/cpu/niagara_asm.s
@@ -23,11 +23,7 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#if !defined(lint)
#include "assym.h"
-#endif
/*
* Niagara processor specific assembly routines
@@ -42,19 +38,6 @@
#include <sys/niagaraasi.h>
#include <vm/hat_sfmmu.h>
-#if defined(lint)
-/*ARGSUSED*/
-uint64_t
-hv_niagara_getperf(uint64_t perfreg, uint64_t *datap)
-{ return (0); }
-
-/*ARGSUSED*/
-uint64_t
-hv_niagara_setperf(uint64_t perfreg, uint64_t data)
-{ return (0); }
-
-#else /* lint */
-
/*
* hv_niagara_getperf(uint64_t perfreg, uint64_t *datap)
*/
@@ -79,9 +62,6 @@ hv_niagara_setperf(uint64_t perfreg, uint64_t data)
nop
SET_SIZE(hv_niagara_setperf)
-#endif /* !lint */
-
-#if defined (lint)
/*
* Invalidate all of the entries within the TSB, by setting the inv bit
* in the tte_tag field of each tsbe.
@@ -93,13 +73,6 @@ hv_niagara_setperf(uint64_t perfreg, uint64_t data)
* (in short, we set all bits in the upper word of the tag, and we give the
* invalid bit precedence over other tag bits in both places).
*/
-/*ARGSUSED*/
-void
-cpu_inv_tsb(caddr_t tsb_base, uint_t tsb_bytes)
-{}
-
-#else /* lint */
-
ENTRY(cpu_inv_tsb)
/*
@@ -141,20 +114,6 @@ cpu_inv_tsb(caddr_t tsb_base, uint_t tsb_bytes)
nop
SET_SIZE(cpu_inv_tsb)
-#endif /* lint */
-
-#if defined(lint)
-/*ARGSUSED*/
-uint64_t
-hv_niagara_mmustat_conf(uint64_t buf, uint64_t *prev_buf)
-{ return (0); }
-
-/*ARGSUSED*/
-uint64_t
-hv_niagara_mmustat_info(uint64_t *buf)
-{ return (0); }
-
-#else /* lint */
/*
* hv_niagara_mmustat_conf(uint64_t buf, uint64_t *prev_buf)
@@ -178,4 +137,3 @@ hv_niagara_mmustat_info(uint64_t *buf)
stx %o1, [%o4]
SET_SIZE(hv_niagara_mmustat_info)
-#endif /* !lint */
diff --git a/usr/src/uts/sun4v/cpu/niagara_copy.s b/usr/src/uts/sun4v/cpu/niagara_copy.s
index d0c0c81c75..4613cff995 100644
--- a/usr/src/uts/sun4v/cpu/niagara_copy.s
+++ b/usr/src/uts/sun4v/cpu/niagara_copy.s
@@ -35,9 +35,7 @@
#include <sys/machasi.h>
#include <sys/niagaraasi.h>
-#if !defined(lint)
#include "assym.h"
-#endif /* lint */
/*
@@ -374,8 +372,6 @@
faddd %f0, %f2, %f60 ;\
fmuld %f0, %f2, %f62
-#if !defined(lint)
-
/*
* Macros to save and restore fp registers to/from the stack.
* Used to save and restore in-use fp registers when we want to use FP.
@@ -401,24 +397,15 @@
add tmp1, VIS_BLOCKSIZE, tmp1 ;\
ldda [tmp1]ASI_BLK_P, %f48 ;\
membar #Sync
-#endif /* NIAGARA_IMPL */
-#endif /* lint */
+#endif /* !NIAGARA_IMPL */
+
/*
* Copy a block of storage, returning an error code if `from' or
* `to' takes a kernel pagefault which cannot be resolved.
* Returns errno value on pagefault error, 0 if all ok
*/
-#if defined(lint)
-
-/* ARGSUSED */
-int
-kcopy(const void *from, void *to, size_t count)
-{ return(0); }
-
-#else /* lint */
-
.seg ".text"
.align 4
@@ -592,20 +579,11 @@ fp_panic_msg:
#endif /* NIAGARA_IMPL */
SET_SIZE(kcopy)
-#endif /* lint */
/*
* Copy a block of storage - must not overlap (from + len <= to).
*/
-#if defined(lint)
-
-/* ARGSUSED */
-void
-bcopy(const void *from, void *to, size_t count)
-{}
-
-#else /* lint */
ENTRY(bcopy)
#if !defined(NIAGARA_IMPL)
@@ -2686,21 +2664,10 @@ loop2:
#endif /* NIAGARA_IMPL */
-#endif /* lint */
-
/*
* Block copy with possibly overlapped operands.
*/
-#if defined(lint)
-
-/*ARGSUSED*/
-void
-ovbcopy(const void *from, void *to, size_t count)
-{}
-
-#else /* lint */
-
ENTRY(ovbcopy)
tst %o2 ! check count
bgu,a %ncc, 1f ! nothing to do or bad arguments
@@ -2743,8 +2710,6 @@ ovbcopy(const void *from, void *to, size_t count)
nop
SET_SIZE(ovbcopy)
-#endif /* lint */
-
/*
* hwblkpagecopy()
*
@@ -2752,12 +2717,6 @@ ovbcopy(const void *from, void *to, size_t count)
* has already disabled kernel preemption and has checked
* use_hw_bcopy.
*/
-#ifdef lint
-/*ARGSUSED*/
-void
-hwblkpagecopy(const void *src, void *dst)
-{ }
-#else /* lint */
ENTRY(hwblkpagecopy)
save %sp, -SA(MINFRAME), %sp
@@ -2810,7 +2769,6 @@ hwblkpagecopy(const void *src, void *dst)
ret
restore %g0, 0, %o0
SET_SIZE(hwblkpagecopy)
-#endif /* lint */
/*
@@ -2904,15 +2862,6 @@ hwblkpagecopy(const void *src, void *dst)
* Copy kernel data to user space (copyout/xcopyout/xcopyout_little).
*/
-#if defined(lint)
-
-/*ARGSUSED*/
-int
-copyout(const void *kaddr, void *uaddr, size_t count)
-{ return (0); }
-
-#else /* lint */
-
/*
* We save the arguments in the following registers in case of a fault:
* kaddr - %g2
@@ -5099,17 +5048,6 @@ copyout_blalign:
#endif /* NIAGARA_IMPL */
SET_SIZE(copyout)
-#endif /* lint */
-
-
-#ifdef lint
-
-/*ARGSUSED*/
-int
-xcopyout(const void *kaddr, void *uaddr, size_t count)
-{ return (0); }
-
-#else /* lint */
ENTRY(xcopyout)
sethi %hi(.xcopyout_err), REAL_LOFAULT
@@ -5127,17 +5065,6 @@ xcopyout(const void *kaddr, void *uaddr, size_t count)
mov %g1, %o0
SET_SIZE(xcopyout)
-#endif /* lint */
-
-#ifdef lint
-
-/*ARGSUSED*/
-int
-xcopyout_little(const void *kaddr, void *uaddr, size_t count)
-{ return (0); }
-
-#else /* lint */
-
ENTRY(xcopyout_little)
sethi %hi(.little_err), %o4
ldn [THREAD_REG + T_LOFAULT], %o5
@@ -5165,21 +5092,10 @@ xcopyout_little(const void *kaddr, void *uaddr, size_t count)
mov %g0, %o0 ! return (0)
SET_SIZE(xcopyout_little)
-#endif /* lint */
-
/*
* Copy user data to kernel space (copyin/xcopyin/xcopyin_little)
*/
-#if defined(lint)
-
-/*ARGSUSED*/
-int
-copyin(const void *uaddr, void *kaddr, size_t count)
-{ return (0); }
-
-#else /* lint */
-
ENTRY(copyin)
sethi %hi(.copyin_err), REAL_LOFAULT
or REAL_LOFAULT, %lo(.copyin_err), REAL_LOFAULT
@@ -7283,17 +7199,6 @@ copyin_blalign:
#endif /* NIAGARA_IMPL */
SET_SIZE(copyin)
-#endif /* lint */
-
-#ifdef lint
-
-/*ARGSUSED*/
-int
-xcopyin(const void *uaddr, void *kaddr, size_t count)
-{ return (0); }
-
-#else /* lint */
-
ENTRY(xcopyin)
sethi %hi(.xcopyin_err), REAL_LOFAULT
b .do_copyin
@@ -7310,17 +7215,6 @@ xcopyin(const void *uaddr, void *kaddr, size_t count)
mov %g1, %o0
SET_SIZE(xcopyin)
-#endif /* lint */
-
-#ifdef lint
-
-/*ARGSUSED*/
-int
-xcopyin_little(const void *uaddr, void *kaddr, size_t count)
-{ return (0); }
-
-#else /* lint */
-
ENTRY(xcopyin_little)
sethi %hi(.little_err), %o4
ldn [THREAD_REG + T_LOFAULT], %o5
@@ -7354,21 +7248,11 @@ xcopyin_little(const void *uaddr, void *kaddr, size_t count)
mov %g1, %o0
SET_SIZE(xcopyin_little)
-#endif /* lint */
-
/*
* Copy a block of storage - must not overlap (from + len <= to).
* No fault handler installed (to be called under on_fault())
*/
-#if defined(lint)
-
-/* ARGSUSED */
-void
-copyin_noerr(const void *ufrom, void *kto, size_t count)
-{}
-
-#else /* lint */
ENTRY(copyin_noerr)
sethi %hi(.copyio_noerr), REAL_LOFAULT
@@ -7379,41 +7263,17 @@ copyin_noerr(const void *ufrom, void *kto, size_t count)
nop
SET_SIZE(copyin_noerr)
-#endif /* lint */
-
/*
* Copy a block of storage - must not overlap (from + len <= to).
* No fault handler installed (to be called under on_fault())
*/
-#if defined(lint)
-
-/* ARGSUSED */
-void
-copyout_noerr(const void *kfrom, void *uto, size_t count)
-{}
-
-#else /* lint */
-
ENTRY(copyout_noerr)
sethi %hi(.copyio_noerr), REAL_LOFAULT
b .do_copyout
or REAL_LOFAULT, %lo(.copyio_noerr), REAL_LOFAULT
SET_SIZE(copyout_noerr)
-#endif /* lint */
-
-#if defined(lint)
-
-int use_hw_bcopy = 1;
-int use_hw_bzero = 1;
-uint_t hw_copy_limit_1 = 0x100;
-uint_t hw_copy_limit_2 = 0x200;
-uint_t hw_copy_limit_4 = 0x400;
-uint_t hw_copy_limit_8 = 0x400;
-
-#else /* !lint */
-
.align 4
DGDEF(use_hw_bcopy)
.word 1
@@ -7430,7 +7290,6 @@ uint_t hw_copy_limit_8 = 0x400;
.align 64
.section ".text"
-#endif /* !lint */
/*
* hwblkclr - clears block-aligned, block-multiple-sized regions that are
@@ -7440,14 +7299,6 @@ uint_t hw_copy_limit_8 = 0x400;
* Caller is responsible for ensuring use_hw_bzero is true and that
* kpreempt_disable() has been called.
*/
-#ifdef lint
-/*ARGSUSED*/
-int
-hwblkclr(void *addr, size_t len)
-{
- return(0);
-}
-#else /* lint */
! %i0 - start address
! %i1 - length of region (multiple of 64)
@@ -7545,15 +7396,6 @@ hwblkclr(void *addr, size_t len)
ret
restore %g0, 0, %o0 ! return (bzero or not)
SET_SIZE(hwblkclr)
-#endif /* lint */
-
-#ifdef lint
-/* Copy 32 bytes of data from src to dst using physical addresses */
-/*ARGSUSED*/
-void
-hw_pa_bcopy32(uint64_t src, uint64_t dst)
-{}
-#else /*!lint */
/*
* Copy 32 bytes of data from src (%o0) to dst (%o1)
@@ -7583,7 +7425,6 @@ hw_pa_bcopy32(uint64_t src, uint64_t dst)
retl
wrpr %g0, %g1, %pstate
SET_SIZE(hw_pa_bcopy32)
-#endif /* lint */
/*
* Zero a block of storage.
@@ -7608,20 +7449,6 @@ hw_pa_bcopy32(uint64_t src, uint64_t dst)
* Store as many 8-byte chunks, followed by trailing bytes.
*/
-#if defined(lint)
-
-/* ARGSUSED */
-int
-kzero(void *addr, size_t count)
-{ return(0); }
-
-/* ARGSUSED */
-void
-uzero(void *addr, size_t count)
-{}
-
-#else /* lint */
-
ENTRY(uzero)
!
! Set a new lo_fault handler only if we came in with one
@@ -7694,21 +7521,10 @@ uzero(void *addr, size_t count)
SET_SIZE(kzero)
SET_SIZE(uzero)
-#endif /* lint */
-
/*
* Zero a block of storage.
*/
-#if defined(lint)
-
-/* ARGSUSED */
-void
-bzero(void *addr, size_t count)
-{}
-
-#else /* lint */
-
ENTRY(bzero)
wr %g0, ASI_P, %asi
@@ -7919,4 +7735,3 @@ bzero(void *addr, size_t count)
clr %o0 ! return (0)
SET_SIZE(bzero)
-#endif /* lint */
diff --git a/usr/src/uts/sun4v/cpu/niagara_perfctr.c b/usr/src/uts/sun4v/cpu/niagara_perfctr.c
index d32191727b..2dfb8fbdfa 100644
--- a/usr/src/uts/sun4v/cpu/niagara_perfctr.c
+++ b/usr/src/uts/sun4v/cpu/niagara_perfctr.c
@@ -58,7 +58,7 @@ typedef struct ni_kev_mask {
* counters.
*/
#define NUM_OF_PICS 2
-#define NUM_OF_PIC_REGS 1
+#define NUM_OF_PIC_REGS 2
typedef struct ni_ksinfo {
uint8_t pic_no_evs; /* number of events */
@@ -598,7 +598,7 @@ ni_delete_name_kstat(ni_ksinfo_t *pp)
*/
static kstat_t *
ni_create_picN_kstat(char *mod_name, int pic, int pic_sel_shift,
- int num_ev, ni_kev_mask_t *ev_array)
+ int num_ev, ni_kev_mask_t *ev_array)
{
struct kstat_named *pic_named_data;
int inst = 0;
@@ -608,7 +608,7 @@ ni_create_picN_kstat(char *mod_name, int pic, int pic_sel_shift,
(void) sprintf(pic_name, "pic%d", pic);
if ((picN_ksp = kstat_create(mod_name, inst, pic_name,
- "bus", KSTAT_TYPE_NAMED, num_ev, NULL)) == NULL) {
+ "bus", KSTAT_TYPE_NAMED, num_ev, 0)) == NULL) {
cmn_err(CE_WARN, "%s %s : kstat create failed",
mod_name, pic_name);
@@ -656,7 +656,7 @@ ni_create_picN_kstat(char *mod_name, int pic, int pic_sel_shift,
*/
static kstat_t *
ni_create_cntr_kstat(char *name, int instance, int (*update)(kstat_t *, int),
- void *ksinfop)
+ void *ksinfop)
{
struct kstat *counters_ksp;
struct kstat_named *counters_named_data;